VitroIO SDK
Software development kit for Vitro Shard.
Loading...
Searching...
No Matches
abstract_sensor_interface.h
Go to the documentation of this file.
1#ifndef VITROIO_SDK_ABSTRACT_SENSOR_INTERFACE_H
2#define VITROIO_SDK_ABSTRACT_SENSOR_INTERFACE_H
3
4#include <stdint.h>
5
7
8namespace vitroio
9{
10
11namespace sdk
12{
13
23{
27 typedef uint32_t ParameterT;
31 typedef uint32_t ValueT;
32
41};
42
50{
51public:
59 driver_(driver)
60 {}
61
66 {}
67
73 virtual const uint32_t* getParameters() const = 0;
74
82 virtual uint32_t getParametersCount() const = 0;
83
93 virtual uint32_t getValues(SensorParameterValue* values) = 0;
94
95protected:
103 {
104 return driver_;
105 }
106
107private:
108 AbstractSensorDriver* driver_;
109};
110
115} // namespace sdk
116
117} // namespace vitroio
118
119#endif // VITROIO_SDK_ABSTRACT_SENSOR_INTERFACE_H
Virtual class providing interface for sensor drivers.
Definition: abstract_sensor_driver.h:25
Virtual class providing interface for sensor interfaces classes.
Definition: abstract_sensor_interface.h:50
virtual const uint32_t * getParameters() const =0
Function allows to obtain parameters measured by the sensor.
virtual uint32_t getParametersCount() const =0
Function allows to obtain count of parameters measured by the sensor.
virtual ~AbstractSensorInterface()
Destructor.
Definition: abstract_sensor_interface.h:65
virtual uint32_t getValues(SensorParameterValue *values)=0
Function allows to obtain current values of parameters measured by the sensor.
AbstractSensorDriver * driver()
Function allows to obtain pointer to sensor driver.
Definition: abstract_sensor_interface.h:102
AbstractSensorInterface(AbstractSensorDriver *driver)
Constructor.
Definition: abstract_sensor_interface.h:58
The namespace contains all of components of vitro-shard-sdk and components based on the sdk....
Definition: can_layer.h:9
Structure representing sensor parameters values.
Definition: abstract_sensor_interface.h:23
ValueT value
Value of sensor parameter.
Definition: abstract_sensor_interface.h:40
ParameterT parameter
Identifier of sensor parameter.
Definition: abstract_sensor_interface.h:36
uint32_t ParameterT
Type of the sensor parameters ID.
Definition: abstract_sensor_interface.h:27
uint32_t ValueT
Type of the sensor parameters value.
Definition: abstract_sensor_interface.h:31