ESP
0.1
The Example-based Sensor Predictions (ESP) system tries to bring machine learning to the maker community.
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
stream.h
Go to the documentation of this file.
1
#pragma once
2
#include <atomic>
3
4
#include <atomic>
5
6
class
Stream
{
7
public
:
8
Stream
() :
has_started_
(false) {}
9
13
virtual
bool
start
() {
has_started_
=
true
;
return
true
; }
14
virtual
void
stop
() {
has_started_
=
false
; }
15
16
void
toggle
() {
17
if
(
has_started_
) {
stop
(); }
18
else
{
start
(); }
19
}
20
21
bool
hasStarted
() {
return
has_started_
; }
22
23
protected
:
24
std::atomic_bool
has_started_
;
25
};
Stream
Definition:
stream.h:6
Stream::hasStarted
bool hasStarted()
Definition:
stream.h:21
Stream::has_started_
std::atomic_bool has_started_
Definition:
stream.h:24
Stream::start
virtual bool start()
Definition:
stream.h:13
Stream::toggle
void toggle()
Definition:
stream.h:16
Stream::Stream
Stream()
Definition:
stream.h:8
Stream::stop
virtual void stop()
Definition:
stream.h:14
src
stream.h
Generated by
1.8.11