Provides an interface for non-standard sensors.
Data Structures | |
struct | dwSensorPluginProperties |
Structure for generic constants returned by the plugin. More... | |
struct | dwSensorPlugin_firmwareVersion |
struct | dwSensorPlugin_information |
struct | dwSensorCommonPluginFunctions |
Function Table exposing common plugin functions. More... | |
Typedefs | |
typedef dwStatus(* | dwSensorPlugin_createHandle) (dwSensorPluginSensorHandle_t *handle, dwSensorPluginProperties *properties, char const *params, dwContextHandle_t ctx) |
Creates a new handle to the sensor managed by the plugin module. More... | |
typedef dwStatus(* | dwSensorPlugin_createSensor) (char const *params, dwSALHandle_t sal, dwSensorPluginSensorHandle_t handle) |
Creates and initializes a new sensor managed by the plugin. More... | |
typedef dwStatus(* | dwSensorPlugin_pushData) (size_t *lenPushed, uint8_t const *data, size_t const size, dwSensorPluginSensorHandle_t handle) |
Pushes raw data obtained from a previous 'dwSensorPlugin_readRawData' call for decoding. More... | |
typedef dwStatus(* | dwSensorPlugin_getSensorInformation) (dwSensorPlugin_information *information, dwSensorPluginSensorHandle_t sensor) |
Gets information of this sensor. More... | |
typedef dwStatus(* | dwSensorPlugin_getRawPackets) (uint8_t const *const rawData, size_t *const size, dwSensorPlugin_rawDataLevel level, int32_t groupNum, uint8_t const **const data, dwSensorPluginSensorHandle_t handle) |
Reads RAW data from different level. More... | |
typedef dwStatus(* | dwSensorPlugin_getRawPacketsNew) (uint8_t const *const rawData, size_t *const size, dwSensorPlugin_rawDataLevel level, int32_t groupNum, uint8_t const **const data, int32_t *extra1, int32_t *extra2, dwSensorPluginSensorHandle_t handle) |
Reads RAW data from different level. More... | |
typedef dwStatus(* | dwSensorPlugin_rawDataReadyForDecode) (size_t *offset, size_t *size, uint8_t const *const data, dwSensorPluginSensorHandle_t ctx) |
API for sensor that raw data and decoded packet are many to one relationship. More... | |
typedef dwStatus(* dwSensorPlugin_createHandle) (dwSensorPluginSensorHandle_t *handle, dwSensorPluginProperties *properties, char const *params, dwContextHandle_t ctx) |
Creates a new handle to the sensor managed by the plugin module.
[out] | handle | A pointer to sensor handle. |
[out] | properties | Sensor-specific properties & constants returned by the plugin. |
[in] | params | Specifies the parameters for the sensor. |
[in] | ctx | context handle. |
Definition at line 120 of file SensorCommonPlugin.h.
typedef dwStatus(* dwSensorPlugin_createSensor) (char const *params, dwSALHandle_t sal, dwSensorPluginSensorHandle_t handle) |
Creates and initializes a new sensor managed by the plugin.
The created sensor will be released using the 'dwSensorPlugin_releaseSensor' interface.
[in] | params | Specifies the parameters for sensor creation. |
[in] | sal | SAL handle. |
[in] | handle | A sensor handle previously created w/ the 'dwSensorPlugin_createHandle' interface. |
Definition at line 137 of file SensorCommonPlugin.h.
typedef dwStatus(* dwSensorPlugin_getRawPackets) (uint8_t const *const rawData, size_t *const size, dwSensorPlugin_rawDataLevel level, int32_t groupNum, uint8_t const **const data, dwSensorPluginSensorHandle_t handle) |
Reads RAW data from different level.
[in] | rawData | A pointer to the pointer to data that is populated with the RAW data. |
[out] | size | A pointer to the size of the data array. |
[in] | level | Specify which raw data level to be read from. |
[in] | groupNum | Additonal param to specify the group to read from since there may be different groups of data per level, for example, we can pass service ID(soda/ssi) to specify the service group to read from for a LEVEL_TWO raw data, if -1 passed, the data from all the group will be returned |
[out] | data | A pointer to the size of the data array. |
[in] | handle | Specifies the sensor handle to read from. |
Definition at line 196 of file SensorCommonPlugin.h.
typedef dwStatus(* dwSensorPlugin_getRawPacketsNew) (uint8_t const *const rawData, size_t *const size, dwSensorPlugin_rawDataLevel level, int32_t groupNum, uint8_t const **const data, int32_t *extra1, int32_t *extra2, dwSensorPluginSensorHandle_t handle) |
Reads RAW data from different level.
[in] | rawData | A pointer to the pointer to data that is populated with the RAW data. |
[out] | size | A pointer to the size of the data array. |
[in] | level | Specify which raw data level to be read from. |
[in] | groupNum | Additonal param to specify the group to read from since there may be different groups of data per level, for example, we can pass service ID(soda/ssi) to specify the service group to read from for a LEVEL_TWO raw data, if -1 passed, the data from all the group will be returned |
[out] | data | A pointer to the size of the data array. |
[out] | extra1 | used to return extra info to client, for example soda/ssi ID. |
[out] | extra2 | used to return extra info to client, for example someip intance ID which used to sort the split PDU. |
[in] | handle | Specifies the sensor handle to read from. |
Definition at line 225 of file SensorCommonPlugin.h.
typedef dwStatus(* dwSensorPlugin_getSensorInformation) (dwSensorPlugin_information *information, dwSensorPluginSensorHandle_t sensor) |
Gets information of this sensor.
[out] | information | Information struct for this sensor. |
[in] | sensor | Specifies the sensor to which the constants are related. |
Definition at line 170 of file SensorCommonPlugin.h.
typedef dwStatus(* dwSensorPlugin_pushData) (size_t *lenPushed, uint8_t const *data, size_t const size, dwSensorPluginSensorHandle_t handle) |
Pushes raw data obtained from a previous 'dwSensorPlugin_readRawData' call for decoding.
Depending on the sensor implementation, actual decoding may happen synchronously on this call, or on a subsequently 'dwSensorPlugin_pushData' call when enough raw data has been received.
[out] | lenPushed | A pointer to the amount of data that was successfully pushed to the plugin |
[in] | data | A pointer to data that was populated with the RAW data. |
[in] | size | Size of the data to be pushed |
[in] | handle | Specifies the sensor the data came from. |
Definition at line 159 of file SensorCommonPlugin.h.
typedef dwStatus(* dwSensorPlugin_rawDataReadyForDecode) (size_t *offset, size_t *size, uint8_t const *const data, dwSensorPluginSensorHandle_t ctx) |
API for sensor that raw data and decoded packet are many to one relationship.
Push raw data segments to sensor plugin and check if the raw data is ready for decode.
[out] | offset | for a packet |
[out] | size | for a complete packet |
[in] | data | raw TP segment data. |
[in] | ctx | context handle. |
Definition at line 241 of file SensorCommonPlugin.h.
Enumerator | |
---|---|
DW_SENSORS_RAW_DATA_LEVEL_ZERO | |
DW_SENSORS_RAW_DATA_LEVEL_ONE | |
DW_SENSORS_RAW_DATA_LEVEL_TWO | |
DW_SENSORS_RAW_DATA_LEVEL_COUNT |
Definition at line 101 of file SensorCommonPlugin.h.
Definition at line 55 of file SensorCommonPlugin.h.
Definition at line 65 of file SensorCommonPlugin.h.