| 
    ESP
    0.1
    
   The Example-based Sensor Predictions (ESP) system tries to bring machine learning to the maker community. 
   | 
 
Input stream for reading ASCII data from a (USB) serial port. More...
#include <iostream.h>
  
 Public Member Functions | |
| virtual void | onReceive (uint32_t label) | 
| virtual void | onReceive (vector< double > data) | 
  Public Member Functions inherited from BaseSerialInputStream | |
| BaseSerialInputStream (uint32_t usb_port_num, uint32_t baud, int numDimensions) | |
| BaseSerialInputStream (uint32_t baud, int numDimensions) | |
| virtual bool | start () final | 
| virtual void | stop () final | 
| virtual int | getNumInputDimensions () final | 
| vector< string > | getSerialDeviceList () | 
| bool | selectSerialDevice (uint32_t port) | 
  Public Member Functions inherited from InputStream | |
| InputStream () | |
| virtual | ~InputStream ()=default | 
| virtual int | getNumOutputDimensions () | 
| void | useNormalizer (normalizeFunc f) | 
| void | useNormalizer (vectorNormalizeFunc f) | 
| void | onDataReadyEvent (onDataReadyCallback callback) | 
| template<typename T1 , typename arg , class T > | |
| void | onDataReadyEvent (T1 *owner, void(T::*listenerMethod)(arg)) | 
| void | setLabelsForAllDimensions (const vector< string > labels) | 
| void | setLabelsForAllDimensions (std::initializer_list< string > list) | 
| const vector< string > & | getLabels () const | 
  Public Member Functions inherited from Stream | |
| Stream () | |
| void | toggle () | 
| bool | hasStarted () | 
Additional Inherited Members | |
  Public Types inherited from InputStream | |
| using | normalizeFunc = std::function< double(double)> | 
| using | vectorNormalizeFunc = std::function< vector< double >(vector< double >)> | 
| typedef std::function< void(GRT::MatrixDouble)> | onDataReadyCallback | 
  Protected Member Functions inherited from InputStream | |
| vector< double > | normalize (vector< double >) | 
  Protected Attributes inherited from BaseSerialInputStream | |
| unique_ptr< ofSerial > | serial_ | 
  Protected Attributes inherited from InputStream | |
| vector< string > | InputStream_labels_ | 
| onDataReadyCallback | data_ready_callback_ | 
| normalizeFunc | normalizer_ | 
| vectorNormalizeFunc | vectorNormalizer_ | 
  Protected Attributes inherited from Stream | |
| std::atomic_bool | has_started_ | 
Input stream for reading ASCII data from a (USB) serial port.
Data should be formatted as ASCII text, in newline-terminated lines. Each line consists of whitespace-separated numbers, e.g.
123 45 678 90
The numbers in each line of text are turned into a single data sample.
To use an ASCIISerialStream in your application, pass it to useStream() in your setup() function.
      
  | 
  virtual | 
Implements OStream.
      
  | 
  virtual | 
Implements OStreamVector.