|
Avionics
Core avionics package for CURE flight computers
|
Buffers sensor samples and forwards them to an IDataSaver at a controlled rate. More...
#include <SensorDataHandler.h>

Public Member Functions | |
| SensorDataHandler (uint8_t name, IDataSaver *dataSaver) | |
| Construct a handler for a specific sensor. | |
| int | addData (DataPoint data) |
| Ingest a data point and persist it if the save interval elapsed. | |
| void | restrictSaveSpeed (uint16_t interval_ms) |
| Set the minimum gap between persisted samples. | |
| uint8_t | getName () const |
| DataPoint | getLastDataPointSaved () const |
Protected Attributes | |
| IDataSaver * | dataSaver |
Buffers sensor samples and forwards them to an IDataSaver at a controlled rate.
Definition at line 24 of file SensorDataHandler.h.
| SensorDataHandler::SensorDataHandler | ( | uint8_t | name, |
| IDataSaver * | dataSaver ) |
Construct a handler for a specific sensor.
| name | 8-bit identifier for the sensor/channel. |
| dataSaver | Destination used when saving samples. |
Definition at line 6 of file SensorDataHandler.cpp.
| int SensorDataHandler::addData | ( | DataPoint | data | ) |
Ingest a data point and persist it if the save interval elapsed.
| data | Data point to record. |
Definition at line 19 of file SensorDataHandler.cpp.
|
inline |
Definition at line 53 of file SensorDataHandler.h.
|
inline |
Definition at line 51 of file SensorDataHandler.h.
| void SensorDataHandler::restrictSaveSpeed | ( | uint16_t | interval_ms | ) |
Set the minimum gap between persisted samples.
| interval_ms | Minimum milliseconds between writes. |
Definition at line 14 of file SensorDataHandler.cpp.
|
protected |
Definition at line 59 of file SensorDataHandler.h.