VitroIO SDK
Software development kit for Vitro Shard.
Loading...
Searching...
No Matches
vitroio::sdk::AbstractSensorInterface Class Referenceabstract

Virtual class providing interface for sensor interfaces classes. More...

#include <abstract_sensor_interface.h>

Public Member Functions

 AbstractSensorInterface (AbstractSensorDriver *driver)
 Constructor. More...
 
virtual ~AbstractSensorInterface ()
 Destructor. More...
 
virtual const uint32_t * getParameters () const =0
 Function allows to obtain parameters measured by the sensor. More...
 
virtual uint32_t getParametersCount () const =0
 Function allows to obtain count of parameters measured by the sensor. More...
 
virtual uint32_t getValues (SensorParameterValue *values)=0
 Function allows to obtain current values of parameters measured by the sensor. More...
 

Protected Member Functions

AbstractSensorDriverdriver ()
 Function allows to obtain pointer to sensor driver. More...
 

Detailed Description

Virtual class providing interface for sensor interfaces classes.

The aim of this interface is to allow for reading measurement parameters of all of the sensors in uniform way.

Constructor & Destructor Documentation

◆ AbstractSensorInterface()

vitroio::sdk::AbstractSensorInterface::AbstractSensorInterface ( AbstractSensorDriver driver)
inline

Constructor.

Parameters
driverPointer to sensors driver object inherited from AbstractSensorDriver.

◆ ~AbstractSensorInterface()

virtual vitroio::sdk::AbstractSensorInterface::~AbstractSensorInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ driver()

AbstractSensorDriver * vitroio::sdk::AbstractSensorInterface::driver ( )
inlineprotected

Function allows to obtain pointer to sensor driver.

Returns
Function returns pointer to sensor driver passed to the constructor.

◆ getParameters()

virtual const uint32_t * vitroio::sdk::AbstractSensorInterface::getParameters ( ) const
pure virtual

Function allows to obtain parameters measured by the sensor.

Returns
Function returns pointer to array of sensor parameters codes.

◆ getParametersCount()

virtual uint32_t vitroio::sdk::AbstractSensorInterface::getParametersCount ( ) const
pure virtual

Function allows to obtain count of parameters measured by the sensor.

Returns
Function returns number of sensor parameters - it is size of array returned by getParameters function.

◆ getValues()

virtual uint32_t vitroio::sdk::AbstractSensorInterface::getValues ( SensorParameterValue values)
pure virtual

Function allows to obtain current values of parameters measured by the sensor.

Parameters
valuesBuffer for parameters values, its size have to be at least count of sensor parameters.
Returns
Function returns number of read values.