semf
sensor.h
Go to the documentation of this file.
1
10#ifndef SEMF_APP_INPUT_SENSOR_SENSOR_H_
11#define SEMF_APP_INPUT_SENSOR_SENSOR_H_
12
14
15namespace semf
16{
17namespace app
18{
19template <typename T_CONVERTED>
40class Sensor
41{
42public:
43 virtual ~Sensor() = default;
44
49 virtual T_CONVERTED currentValue() const = 0;
54 virtual T_CONVERTED averageValue() const = 0;
59 virtual void update() = 0;
60
63};
64} /* namespace app */
65} /* namespace semf */
66#endif /* SEMF_APP_INPUT_SENSOR_SENSOR_H_ */
Signal for lightweight signal/slot implementation. One signal can be connected to multiple slots and ...
Definition: signal.h:41
Application class for a sensor system.
Definition: sensor.h:41
virtual void update()=0
Triggers the sensor hardware to start a measurement cycle.
virtual ~Sensor()=default
virtual T_CONVERTED currentValue() const =0
Returns the last measured converted value.
virtual T_CONVERTED averageValue() const =0
Returns the converted value of the average measured raw values.
Signal dataAvailable
Definition: sensor.h:62