ESP  0.1
The Example-based Sensor Predictions (ESP) system tries to bring machine learning to the maker community.
iostream.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "istream.h"
4 #include "ostream.h"
5 
6 class IOStream : public virtual InputStream, public OStream {};
7 class IOStreamVector : public virtual InputStream, public OStreamVector {};
8 
21  public:
22  using BaseSerialInputStream::BaseSerialInputStream; // inherit constructors
23 
24  virtual void onReceive(uint32_t label);
25  virtual void onReceive(vector<double> data);
26 
27  private:
28  virtual void parseSerial(vector<unsigned char> &buffer);
29 };
30 
32  public:
33  using BaseSerialInputStream::BaseSerialInputStream; // inherit constructors
34 
35  virtual void onReceive(uint32_t label);
36  virtual void onReceive(vector<double> data);
37 
38  private:
39  virtual void parseSerial(vector<unsigned char> &buffer);
40 };
virtual void onReceive(uint32_t label)=0
BaseSerialInputStream(uint32_t usb_port_num, uint32_t baud, int numDimensions)
Definition: istream.cpp:122
Definition: iostream.h:31
Definition: iostream.h:6
OStream supports emitting prediction results to some downstream consumers, e.g. Mac OS Keyboard Emula...
Base class for output streams that forward ESP prediction results to other systems.
Definition: ostream.h:43
Input stream for reading ASCII data from a (USB) serial port.
Definition: iostream.h:20
Base class for output streams that forward ESP pipeline output to other systems.
Definition: ostream.h:60
Definition: iostream.h:7
Definition: istream.h:127
Base class for input streams that provide live sensor data to the ESP system. To use an InputStream i...
Definition: istream.h:31