Class module::status::DeviceStatus
ClassList > module > status > DeviceStatus
#include <device_status.hpp>
Public Functions
| Type | Name |
|---|---|
| void | AddDeviceManager (DeviceProperties * device_properties) Add the device properties classes, as this provides easier access to the properties like sample rate, sensortype's etc. It will add this to an internal array. |
| void | AttachFlashLogger (hal::log::Logger * log_module) Attach a logger object to this class. So the DeviceID functions can read and write the id to/from flash. |
| uint8_t | GetDeviceID () Get the unique device id (read from flash) |
| void | GetDeviceStatus (char * write_buffer, const uint32_t write_buffer_size) Get the device status, collected from other functions of this class and the DeviceProperties class. |
| void | SetDeviceID (const uint8_t ID) Set the unique device id (will write it to flash memory) |
| void | SetDeviceType (DeviceTypes device_type) Set the device type (SensorHub, ActuatorHub, etc.) |
Public Functions Documentation
function AddDeviceManager
Add the device properties classes, as this provides easier access to the properties like sample rate, sensortype's etc. It will add this to an internal array.
inline void module::status::DeviceStatus::AddDeviceManager (
DeviceProperties * device_properties
)
Parameters:
device_propertiesA pointer to a device_properties instance.
function AttachFlashLogger
Attach a logger object to this class. So the DeviceID functions can read and write the id to/from flash.
inline void module::status::DeviceStatus::AttachFlashLogger (
hal::log::Logger * log_module
)
Parameters:
log_moduleA pointer to a logger instance
function GetDeviceID
Get the unique device id (read from flash)
inline uint8_t module::status::DeviceStatus::GetDeviceID ()
Returns:
The ID read from flash
function GetDeviceStatus
Get the device status, collected from other functions of this class and the DeviceProperties class.
inline void module::status::DeviceStatus::GetDeviceStatus (
char * write_buffer,
const uint32_t write_buffer_size
)
Parameters:
write_bufferThe write_buffer to write the parsed status string in to!write_buffer_sizeThe size of the write_buffer array passed in to the arguments
function SetDeviceID
Set the unique device id (will write it to flash memory)
inline void module::status::DeviceStatus::SetDeviceID (
const uint8_t ID
)
Parameters:
IDThe ID to write to flash/set
function SetDeviceType
Set the device type (SensorHub, ActuatorHub, etc.)
inline void module::status::DeviceStatus::SetDeviceType (
DeviceTypes device_type
)
Parameters:
device_typeThe device type to set (see the above listed DeviceTypes enum)
The documentation for this class was generated from the following file SensorHub_FW/src/device_status.hpp