1#ifndef SENSESP_SENSORS_SENSOR_H_
2#define SENSESP_SENSORS_SENSOR_H_
66 RepeatSensor<T>(
unsigned int repeat_interval_ms, std::function<T()> callback)
A base class which allow observers to attach callbacks to themselves. The callbacks will be called wh...
unsigned int repeat_interval_ms_
std::function< void(RepeatSensor< T > *)> emitting_callback_
RepeatSensor(unsigned int repeat_interval_ms, std::function< T()> callback)
Construct a new RepeatSensor object.
std::function< T()> returning_callback_
The base class for all sensors. Used only as a base class - never instantiated directly in a project.
SensorConfig(const String &config_path)
Sensor template class for any sensor producing actual values.
Sensor(String config_path)
A base class for any sensor or piece of code that outputs a value for consumption elsewhere.
void emit(const T &new_value)
std::shared_ptr< reactesp::EventLoop > event_loop()
Sensor< float > FloatSensor
Sensor< bool > BoolSensor
Sensor< String > StringSensor