template<typename T_CONVERTED>
class semf::app::Sensor< T_CONVERTED >
Application class for a sensor system.
In Sensor
a measurement cycle can be triggered by calling update()
. After completion dataAvailable
gets emitted and the function currentValue()
and averageValue()
can be used to acquire the measured values. Multiple Sensor
objects can be connected to one HardwareSensor
. For having a simple conversion function, SimpleSensorConverter
can be an simple option.
For building a sensor system, you need:
- Object from a class inheriting from
HardwareSensor
like AnalogSensor
or AnalogDmaSensor
.
- Data buffer.
- Object from a class inheriting from
Sensor
base class and overwriting the convert()
function.
- Template Parameters
-
T_CONVERTED | Type of an application/usable sensor value which has an unit, e.g. float for temperature [°C]. |
- See also
SensorConverter
-
SimpleSensorConverter
-
HardwareSensor
Definition at line 40 of file sensor.h.