VitroIO SDK
Software development kit for Vitro Shard.
|
Virtual class providing interface for sensor drivers. More...
#include <abstract_sensor_driver.h>
Public Member Functions | |
AbstractSensorDriver () | |
virtual | ~AbstractSensorDriver () |
virtual int | open ()=0 |
Function initializes the sensor. More... | |
virtual void | close ()=0 |
Function deinitializes the sensor. More... | |
virtual int | read (char *buffer, uint32_t address, uint32_t bytes)=0 |
Function allows to read specified amount of data from provided address. More... | |
virtual int | write (const char *buffer, uint32_t address, uint32_t bytes)=0 |
Function allows to write specified amount of data to provided address. More... | |
virtual int | ioctl (int request, void *value)=0 |
Function allows to perform sensor specific operation. More... | |
Virtual class providing interface for sensor drivers.
The aim of this class is to provide interface for basic communication with sensor i.e. initialization, deinitialization, reading, writing and optionally performing sensor specific operations.
|
inline |
|
inlinevirtual |
|
pure virtual |
Function deinitializes the sensor.
|
pure virtual |
Function allows to perform sensor specific operation.
request | Type of operation to perform. |
value | Operation parameters. |
|
pure virtual |
Function initializes the sensor.
|
pure virtual |
Function allows to read specified amount of data from provided address.
buffer | Buffer to which the data will be read. |
address | Address from which the data will be read. |
bytes | Number of bytes to read. |
|
pure virtual |
Function allows to write specified amount of data to provided address.
buffer | Buffer with data which will be wrote. |
address | Address to which the data will be wrote. |
bytes | Number of bytes to write. |