9 #include <spdlog/spdlog.h>
33 virtual std::string
json(
const std::string
name = {})
const;
35 virtual void update(
unsigned int timeout)
final;
std::shared_ptr< spdlog::logger > _logger
Pointer to spd logger.
std::vector< ObSensor * > & sensors()
Return list of sensors.
SensorType _type
Sensor type.
ObSensor(std::string name={"sensor"})
virtual void update(unsigned int timeout) final
std::string name() const
Returns name of sensor.
std::vector< ObSensor * > _sensors
List of subsensors.
ObSensor * _first
Pointer to first sensor.
SensorType
Enums for sensor type.
ObSensor * _change
Pointer to change sensor.
virtual std::string json(const std::string name={}) const
ObSensor * _second
Pointer to second sensor.
virtual void speed(ObSensor *, ObSensor *, unsigned int)
Calculate time change (speed)
void enabled(bool e)
Sets flag if sensor is enabled.
bool enabled() const
Returns flag if sensor is enabled.
virtual void process()
Process function.
SensorType type() const
Returns sensor type.
std::string _name
Sensor name.
void type(SensorType t)
Sets sensor type.