Defines base types common to all sensors.
Defines methods common to all sensors.
Data Structures | |
| struct | dwSensorTsAndID |
| Hold the timestamp, ID, publishedTimestamp, seqNum and isDropped info of a frame. More... | |
| struct | dwSensorStats |
| Hold the sensor ID and it's statistics. More... | |
| struct | dwSensorParams |
| Holds sets of parameters for sensor creation. More... | |
| struct | dwSensorSeekTableEntry |
| A seek structure is made of memory offset, eventcount and timestamp. More... | |
| struct | dwSensorVehicleState |
| Vehicle State inputs. More... | |
| struct | dwSensorEgomotionState |
| Egomotion State inputs. More... | |
Macros | |
| #define | DW_SENSOR_TS_AND_ID_SOURCE_COUNT 6 |
| This amounts to max(SensorTsAndIDSource) + 1, i.e. More... | |
| #define | DW_SENSOR_STATE_SENSOR_STAT_COUNT 7 |
| This amounts to max(SensorStatTimeDifference) + 1, i.e. More... | |
| #define | DW_SENSOR_MAX_PROTOCOL_NAME_LENGTH 32 |
| Maximal length of the protocol name of a sensor. More... | |
| #define | DW_SENSOR_MAX_PARAMETER_STRING_LENGTH 512 |
| Maximal length of the parameter string of a sensor. More... | |
| #define | DW_SENSOR_ERROR_ID_OFFSET_BIT 24U |
| bit-shift of dwSensorErrorID when reported via module health service More... | |
| #define | DW_SENSOR_ERROR_ID_OFFSET (1U << DW_SENSOR_ERROR_ID_OFFSET_BIT) |
| offset of dwSensorErrorID when reported via module health service More... | |
Typedefs | |
| typedef enum dwSensorTsAndIDSource | dwSensorTsAndIDSource |
| Source of the message. More... | |
| typedef struct dwSensorTsAndID | dwSensorTsAndID |
| Hold the timestamp, ID, publishedTimestamp, seqNum and isDropped info of a frame. More... | |
| typedef enum dwSensorStatTimeDifference | dwSensorStatTimeDifference |
| Enum used for time delta statistics. More... | |
| typedef struct dwSensorStats | dwSensorStats |
| Hold the sensor ID and it's statistics. More... | |
| typedef struct dwSALObject * | dwSALHandle_t |
| Handle representing the Sensor Abstraction Layer interface. More... | |
| typedef struct dwSensorObject * | dwSensorHandle_t |
| Handle representing a sensor. More... | |
| typedef struct dwSensorParams | dwSensorParams |
| Holds sets of parameters for sensor creation. More... | |
| typedef enum dwSensorType | dwSensorType |
| Defines the type of sensors that are available in DriveWorks. More... | |
| typedef struct dwSensorSeekTableEntry | dwSensorSeekTableEntry |
| A seek structure is made of memory offset, eventcount and timestamp. More... | |
| typedef enum dwSensorErrorID | dwSensorErrorID |
| Sensor Error ID to be used in, e.g., dwErrorSignal.errorID[31:24] when DW_SENSOR_ERROR_CODE_OFFSET_BIT equals 24. More... | |
| typedef enum dwSensorDrivingDirection | dwSensorDrivingDirection |
| Driving Direction options. More... | |
| typedef enum dwSensorDrivePositionStatus | dwSensorDrivePositionStatus |
| Current vehicle drive position: Parking, Rear, Neutral, Driving (PRND). More... | |
| typedef enum dwSensorDoorLockState | dwSensorDoorLockState |
| Door lock (latch) state. More... | |
| typedef enum dwSensorTrailerHitchStatus | dwSensorTrailerHitchStatus |
| Whether a trailer hitch is extended, installed but not extended, or not present. More... | |
| typedef enum dwSensorTrailerConnected | dwSensorTrailerConnected |
| Whether a trailer is connected to the vehicle or not. More... | |
| typedef enum dwSensorTemperatureQuality | dwSensorTemperatureQuality |
| Ambient temperature Signal Quality identifier. More... | |
| typedef struct dwSensorVehicleState | dwSensorVehicleState |
| Vehicle State inputs. More... | |
| typedef enum dwSensorMotionState | dwSensorMotionState |
| Motion state derived from wheeltick, to assess whether ego is stationary or moving. More... | |
| typedef struct dwSensorEgomotionState | dwSensorEgomotionState |
| Egomotion State inputs. More... | |
Functions | |
| DW_API_PUBLIC dwStatus | dwSAL_initialize (dwSALHandle_t *const sal, dwContextHandle_t const context) |
| Creates and initializes a SAL (sensor abstraction layer) module. More... | |
| DW_API_PUBLIC dwStatus | dwSAL_getContext (dwContextHandle_t *const context, dwSALHandle_t const sal) |
| Obtains the handle, used for creation of SAL module. More... | |
| DW_API_PUBLIC dwStatus | dwSAL_reset (dwSALHandle_t const sal) |
| Resets the SAL (sensor abstraction layer) module. More... | |
| DW_API_PUBLIC dwStatus | dwSAL_release (dwSALHandle_t const sal) |
| Releases the SAL (sensor abstraction layer) module. More... | |
| DW_API_PUBLIC dwStatus | dwSAL_createSensor (dwSensorHandle_t *const sensor, dwSensorParams const params, dwSALHandle_t const sal) |
| Creates a new sensor managed by the SAL module with the given parameters. More... | |
| DW_API_PUBLIC dwStatus | dwSAL_releaseSensor (dwSensorHandle_t const sensor) |
| Releases a sensor managed by the SAL module. More... | |
| DW_API_PUBLIC dwStatus | dwSAL_start (dwSALHandle_t const sal) |
| Bootstraps all sensors managed by the SAL module. More... | |
| DW_API_PUBLIC dwStatus | dwSAL_getNumSensors (uint32_t *const num, dwSALHandle_t const sal) |
| Gets number of available sensors for current platform. More... | |
| DW_API_PUBLIC dwStatus | dwSAL_getSensorProtocol (const char **const name, uint32_t const idx, dwSALHandle_t const sal) |
| Gets protocol name of a sensor for a given index, e.g., 'camera.gmsl' or 'can.file'. More... | |
| DW_API_PUBLIC dwStatus | dwSAL_getSensorParameterString (const char **const parameters, uint32_t const idx, dwSALHandle_t const sal) |
| Gets the parameter string acceptable by a sensor whose type is determined by the index. More... | |
| DW_API_PUBLIC dwStatus | dwSAL_setVehicleState (dwSensorVehicleState *const vehicleState, dwSALHandle_t const sal) |
| Pass vehicle state to all sensors. More... | |
| DW_API_PUBLIC dwStatus | dwSAL_setEgomotionState (dwSensorEgomotionState *const egomotionState, dwSALHandle_t const sal) |
| Pass egomotion state to all sensors. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_start (dwSensorHandle_t const sensor) |
| Starts the sensor previously successfully created with 'dwSAL_createSensor()'. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_stop (dwSensorHandle_t const sensor) |
| Stops the sensor. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_resume (dwSensorHandle_t const sensor) |
| Resume and init the sensor. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_reset (dwSensorHandle_t const sensor) |
| Resets the sensor. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_readRawData (const uint8_t **const data, size_t *const size, dwTime_t const timeoutUs, dwSensorHandle_t const sensor) |
| Reads RAW data from sensor as byte array at a given time (TimeoutUs). More... | |
| DW_API_PUBLIC dwStatus | dwSensor_returnRawData (const uint8_t *const data, dwSensorHandle_t const sensor) |
| Returns RAW data to sensor as a byte array. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_getSeekRange (size_t *const eventCount, dwTime_t *const startTimestampUs, dwTime_t *const endTimestampUs, dwSensorHandle_t const sensor) |
| Retrieves the valid range of seek parameters, for sensors that support seeking. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_getCurrentSeekPosition (size_t *const event, dwSensorHandle_t const sensor) |
| Gets the current seek position of the sensor. More... | |
| dwStatus | dwSensor_getHeader (uint8_t const **const buffer, size_t *bufferSize, dwSensorHandle_t const sensor) |
| Returns a pointer to the shared buffer with the contents of the sensor header and bufferSize will contain the number of valid bytes in the buffer. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_seekToTime (dwTime_t const timestampUs, dwSensorHandle_t const sensor) |
| Seeks the sensor to a specific timestamp, for sensors that support seeking. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_seekToEvent (size_t const event, dwSensorHandle_t const sensor) |
| Seeks the sensor to an event, for sensors that support seeking. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_createSeekTable (dwSensorHandle_t const sensor) |
| Forces recreation of the seek table, for sensors that support seeking. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_getNumSeekTableEntries (size_t *const size, dwSensorHandle_t const hsensor) |
| Get the number of entries in the seek Table. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_getSeekTableEntries (dwSensorSeekTableEntry *const entries, size_t const numEntries, dwSensorHandle_t const sensor) |
| Fill in the pre-allocated dwSensorSeekTableEntry array. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_saveSeekTable (const char *const fileName, dwSensorHandle_t const sensor) |
| Saves the seek table for the sensor to a file, for sensors that support seek tables. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_setThreadPriority (int32_t const priority, dwSensorHandle_t const sensor) |
| Sets the priority of the internal thread, for sensors that use an internal thread to communicate to the OS drivers. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_setThreadAffinity (uint32_t const affinityMask, dwSensorHandle_t const sensor) |
| Sets the affinity of the internal thread, for sensors that use an internal thread to communicate to the OS drivers. More... | |
| DW_API_PUBLIC dwStatus | dwSensor_getStats (dwSensorStats *const stats, dwSensorHandle_t const sensor) |
| Gets sensor statistics (if available). More... | |
| #define DW_SENSOR_ERROR_ID_OFFSET (1U << DW_SENSOR_ERROR_ID_OFFSET_BIT) |
offset of dwSensorErrorID when reported via module health service
Definition at line 133 of file SensorTypes.h.
| #define DW_SENSOR_ERROR_ID_OFFSET_BIT 24U |
bit-shift of dwSensorErrorID when reported via module health service
Definition at line 130 of file SensorTypes.h.
| #define DW_SENSOR_MAX_PARAMETER_STRING_LENGTH 512 |
Maximal length of the parameter string of a sensor.
Definition at line 51 of file SensorTypes.h.
| #define DW_SENSOR_MAX_PROTOCOL_NAME_LENGTH 32 |
Maximal length of the protocol name of a sensor.
Definition at line 48 of file SensorTypes.h.
| #define DW_SENSOR_STATE_SENSOR_STAT_COUNT 7 |
This amounts to max(SensorStatTimeDifference) + 1, i.e.
the required size of an array if these enum values are interpreted as array offsets.
Definition at line 55 of file SensorStats.h.
| #define DW_SENSOR_TS_AND_ID_SOURCE_COUNT 6 |
This amounts to max(SensorTsAndIDSource) + 1, i.e.
the required size of an array if these enum values are interpreted as array offsets.
Definition at line 55 of file SensorExtras.h.
| typedef struct dwSALObject* dwSALHandle_t |
Handle representing the Sensor Abstraction Layer interface.
Definition at line 40 of file SensorTypes.h.
| typedef enum dwSensorDoorLockState dwSensorDoorLockState |
Door lock (latch) state.
| typedef enum dwSensorDrivePositionStatus dwSensorDrivePositionStatus |
Current vehicle drive position: Parking, Rear, Neutral, Driving (PRND).
| typedef enum dwSensorDrivingDirection dwSensorDrivingDirection |
Driving Direction options.
| typedef struct dwSensorEgomotionState dwSensorEgomotionState |
Egomotion State inputs.
| typedef enum dwSensorErrorID dwSensorErrorID |
Sensor Error ID to be used in, e.g., dwErrorSignal.errorID[31:24] when DW_SENSOR_ERROR_CODE_OFFSET_BIT equals 24.
| typedef struct dwSensorObject* dwSensorHandle_t |
Handle representing a sensor.
Definition at line 44 of file SensorTypes.h.
| typedef enum dwSensorMotionState dwSensorMotionState |
Motion state derived from wheeltick, to assess whether ego is stationary or moving.
| typedef struct dwSensorParams dwSensorParams |
Holds sets of parameters for sensor creation.
| typedef struct dwSensorSeekTableEntry dwSensorSeekTableEntry |
A seek structure is made of memory offset, eventcount and timestamp.
| typedef struct dwSensorStats dwSensorStats |
Hold the sensor ID and it's statistics.
| typedef enum dwSensorStatTimeDifference dwSensorStatTimeDifference |
Enum used for time delta statistics.
| typedef enum dwSensorTemperatureQuality dwSensorTemperatureQuality |
Ambient temperature Signal Quality identifier.
| typedef enum dwSensorTrailerConnected dwSensorTrailerConnected |
Whether a trailer is connected to the vehicle or not.
| typedef enum dwSensorTrailerHitchStatus dwSensorTrailerHitchStatus |
Whether a trailer hitch is extended, installed but not extended, or not present.
| typedef struct dwSensorTsAndID dwSensorTsAndID |
Hold the timestamp, ID, publishedTimestamp, seqNum and isDropped info of a frame.
| typedef enum dwSensorTsAndIDSource dwSensorTsAndIDSource |
Source of the message.
| typedef enum dwSensorType dwSensorType |
Defines the type of sensors that are available in DriveWorks.
| typedef struct dwSensorVehicleState dwSensorVehicleState |
Vehicle State inputs.
Door lock (latch) state.
Definition at line 73 of file SensorsVehicleStateTypes.h.
Current vehicle drive position: Parking, Rear, Neutral, Driving (PRND).
Definition at line 47 of file SensorsVehicleStateTypes.h.
Driving Direction options.
Definition at line 29 of file SensorsVehicleStateTypes.h.
| enum dwSensorErrorID |
Sensor Error ID to be used in, e.g., dwErrorSignal.errorID[31:24] when DW_SENSOR_ERROR_CODE_OFFSET_BIT equals 24.
Definition at line 141 of file SensorTypes.h.
| enum dwSensorMotionState |
Motion state derived from wheeltick, to assess whether ego is stationary or moving.
Definition at line 250 of file SensorsVehicleStateTypes.h.
Enum used for time delta statistics.
Definition at line 31 of file SensorStats.h.
Ambient temperature Signal Quality identifier.
Definition at line 151 of file SensorsVehicleStateTypes.h.
Whether a trailer is connected to the vehicle or not.
Definition at line 130 of file SensorsVehicleStateTypes.h.
Whether a trailer hitch is extended, installed but not extended, or not present.
Definition at line 99 of file SensorsVehicleStateTypes.h.
Source of the message.
Definition at line 31 of file SensorExtras.h.
| enum dwSensorType |
Defines the type of sensors that are available in DriveWorks.
Definition at line 83 of file SensorTypes.h.
| DW_API_PUBLIC dwStatus dwSAL_createSensor | ( | dwSensorHandle_t *const | sensor, |
| dwSensorParams const | params, | ||
| dwSALHandle_t const | sal | ||
| ) |
Creates a new sensor managed by the SAL module with the given parameters.
@req{GID-AV_REQ-6775279}
| [out] | sensor | A pointer to sensor handle that became valid after creation. |
| [in] | params | Specifies the parameters for sensor creation. |
| [in] | sal | Specifies the handle to the SAL module that will manage the sensor. |
| DW_API_PUBLIC dwStatus dwSAL_getContext | ( | dwContextHandle_t *const | context, |
| dwSALHandle_t const | sal | ||
| ) |
Obtains the handle, used for creation of SAL module.
| [out] | context | The handle to the context under which the SAL module is created. |
| [in] | sal | Specifies the SAL handle created with 'dwSAL_initialize()'. |
| DW_API_PUBLIC dwStatus dwSAL_getNumSensors | ( | uint32_t *const | num, |
| dwSALHandle_t const | sal | ||
| ) |
Gets number of available sensors for current platform.
req{GID-AV_REQ-6775284}
| [out] | num | A pointer to return number of sensor in the SAL. |
| [in] | sal | Specifies the SAL handle created with 'dwSAL_initialize()'. |
| DW_API_PUBLIC dwStatus dwSAL_getSensorParameterString | ( | const char **const | parameters, |
| uint32_t const | idx, | ||
| dwSALHandle_t const | sal | ||
| ) |
Gets the parameter string acceptable by a sensor whose type is determined by the index.
A sensor generates a human readable string with parameters it accepts.
req{GID-AV_REQ-6775286}
| [out] | parameters | A pointer to the pointer to the null terminated string will be returned here. |
| [in] | idx | Specifies the index of a sensor; index must be between 0 and 'dwSAL_getNumSensors()-1'. |
| [in] | sal | Specifies the SAL handle created with 'dwSAL_initialize()'. |
| DW_API_PUBLIC dwStatus dwSAL_getSensorProtocol | ( | const char **const | name, |
| uint32_t const | idx, | ||
| dwSALHandle_t const | sal | ||
| ) |
Gets protocol name of a sensor for a given index, e.g., 'camera.gmsl' or 'can.file'.
req{GID-AV_REQ-6775285}
| [out] | name | A pointer to the pointer of the null terminated string will be returned here. |
| [in] | idx | Specifies the index of a sensor; index must be between 0 and 'dwSAL_getNumSensors()-1'. |
| [in] | sal | Specifies the SAL handle created with 'dwSAL_initialize()'. |
| DW_API_PUBLIC dwStatus dwSAL_initialize | ( | dwSALHandle_t *const | sal, |
| dwContextHandle_t const | context | ||
| ) |
Creates and initializes a SAL (sensor abstraction layer) module.
@req{GID-AV_REQ-6775276}
| [out] | sal | A pointer to the SAL handle will be returned here. |
| [in] | context | Specifies the handle to the context under which the SAL module is created. |
| DW_API_PUBLIC dwStatus dwSAL_release | ( | dwSALHandle_t const | sal | ) |
Releases the SAL (sensor abstraction layer) module.
This method releases all created sensors and unloads all drivers.
@req{GID-AV_REQ-6775278}
| [in] | sal | The SAL handle to be released. |
| DW_API_PUBLIC dwStatus dwSAL_releaseSensor | ( | dwSensorHandle_t const | sensor | ) |
Releases a sensor managed by the SAL module.
@req{GID-AV_REQ-6775280}
| [in] | sensor | The handle to a sensor created previously with 'dwSAL_createSensor()'. |
| DW_API_PUBLIC dwStatus dwSAL_reset | ( | dwSALHandle_t const | sal | ) |
Resets the SAL (sensor abstraction layer) module.
This method resets all sensors managed by this module.
@req{GID-AV_REQ-6775277}
| [in] | sal | Specifies the SAL handle to reset. |
| DW_API_PUBLIC dwStatus dwSAL_setEgomotionState | ( | dwSensorEgomotionState *const | egomotionState, |
| dwSALHandle_t const | sal | ||
| ) |
Pass egomotion state to all sensors.
| [in] | egomotionState | Egomotion state that needs to be passed in the structure of dwEgomotionVehicleState . |
| [in] | sal | Specifies the SAL handle created with 'dwSAL_initialize()' |
| DW_API_PUBLIC dwStatus dwSAL_setVehicleState | ( | dwSensorVehicleState *const | vehicleState, |
| dwSALHandle_t const | sal | ||
| ) |
Pass vehicle state to all sensors.
req{GID-AV_REQ-6775287}
| [in] | vehicleState | Vehicle state that needs to be passed in the structure of dwSensorVehicleState . |
| [in] | sal | Specifies the SAL handle created with 'dwSAL_initialize()' |
| DW_API_PUBLIC dwStatus dwSAL_start | ( | dwSALHandle_t const | sal | ) |
Bootstraps all sensors managed by the SAL module.
@req{GID-AV_REQ-6775281}
| [in] | sal | Specifies the SAL handle created with 'dwSAL_initialize()'. |
| DW_API_PUBLIC dwStatus dwSensor_createSeekTable | ( | dwSensorHandle_t const | sensor | ) |
Forces recreation of the seek table, for sensors that support seeking.
@req{GID-AV_REQ-6997915}
| [in] | sensor | Handle to the sensor which seek table to write out |
| DW_API_PUBLIC dwStatus dwSensor_getCurrentSeekPosition | ( | size_t *const | event, |
| dwSensorHandle_t const | sensor | ||
| ) |
Gets the current seek position of the sensor.
The event index corresponding to the next sensor event which will be read with sensor's read methods.
req{GID-AV_REQ-6997880}
| [out] | event | Event number which in the range [0;eventCount) of the next event. |
| [in] | sensor | Handle to the sensor which seek table to write out |
| dwStatus dwSensor_getHeader | ( | uint8_t const **const | buffer, |
| size_t * | bufferSize, | ||
| dwSensorHandle_t const | sensor | ||
| ) |
Returns a pointer to the shared buffer with the contents of the sensor header and bufferSize will contain the number of valid bytes in the buffer.
req{GID-AV_REQ-6775295}
| [out] | buffer | A pointer to the buffer owned by sensor which holds the header information. |
| [out] | bufferSize | A pointer to variable indicating number of valid bytes in the buffer |
| [in] | sensor | Handle to the sensor to which the header info is requested |
| DW_API_PUBLIC dwStatus dwSensor_getNumSeekTableEntries | ( | size_t *const | size, |
| dwSensorHandle_t const | hsensor | ||
| ) |
Get the number of entries in the seek Table.
req{GID-AV_REQ-6997928}
| [out] | size | A pointer to the size of the seek table |
| [in] | hsensor | Handle to the sensor to get size of seek table entry |
| DW_API_PUBLIC dwStatus dwSensor_getSeekRange | ( | size_t *const | eventCount, |
| dwTime_t *const | startTimestampUs, | ||
| dwTime_t *const | endTimestampUs, | ||
| dwSensorHandle_t const | sensor | ||
| ) |
Retrieves the valid range of seek parameters, for sensors that support seeking.
@req{GID-AV_REQ-6997877}
| [out] | eventCount | Number of events available to be sought to. Each event represents one data unit returned by the sensor from its read() method, e.g. one camera frame for camera, one CAN message, for a CAN sensor, etc. |
| [out] | startTimestampUs | Timestamp of the very first event in usec |
| [out] | endTimestampUs | Timestamp of the very last event in usec |
| [in] | sensor | Handle to the sensor which seek table to write out |
| DW_API_PUBLIC dwStatus dwSensor_getSeekTableEntries | ( | dwSensorSeekTableEntry *const | entries, |
| size_t const | numEntries, | ||
| dwSensorHandle_t const | sensor | ||
| ) |
Fill in the pre-allocated dwSensorSeekTableEntry array.
@req{GID-AV_REQ-6997881}
| [out] | entries | Filled in array with seekTable entries |
| [in] | numEntries | The number of entries allocated in the entries array |
| [in] | sensor | Handle to the sensor which seek table to write out |
| DW_API_PUBLIC dwStatus dwSensor_getStats | ( | dwSensorStats *const | stats, |
| dwSensorHandle_t const | sensor | ||
| ) |
Gets sensor statistics (if available).
req{GID-AV_REQ-6775304}
| [out] | stats | A pointer to a structure containing the statistics. |
| [in] | sensor | Handle to the sensor |
| DW_API_PUBLIC dwStatus dwSensor_readRawData | ( | const uint8_t **const | data, |
| size_t *const | size, | ||
| dwTime_t const | timeoutUs, | ||
| dwSensorHandle_t const | sensor | ||
| ) |
Reads RAW data from sensor as byte array at a given time (TimeoutUs).
@req{GID-AV_REQ-6775291}
| [out] | data | 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] | timeoutUs | Specifies the timeout in US to wait before unblocking. |
| [in] | sensor | Specifies the sensor to read from. |
| DW_API_PUBLIC dwStatus dwSensor_reset | ( | dwSensorHandle_t const | sensor | ) |
Resets the sensor.
The method blocks while the sensor is reset.
@req{GID-AV_REQ-6775290}
| [in] | sensor | Specifies the sensor handle of a sensor previously created with 'dwSAL_createSensor()'. |
| DW_API_PUBLIC dwStatus dwSensor_resume | ( | dwSensorHandle_t const | sensor | ) |
Resume and init the sensor.
@req{GID-AV_REQ-7028419}
| [in] | sensor | Specifies the sensor handle of a sensor previously created with 'dwSAL_createSensor()'. |
| DW_API_PUBLIC dwStatus dwSensor_returnRawData | ( | const uint8_t *const | data, |
| dwSensorHandle_t const | sensor | ||
| ) |
Returns RAW data to sensor as a byte array.
This call must be preceded by 'dwSensor_readRawData'.
req{GID-AV_REQ-6775292}
| [in] | data | A pointer to data that was populated with the RAW data. |
| [in] | sensor | Specifies the sensor the data came from. |
| DW_API_PUBLIC dwStatus dwSensor_saveSeekTable | ( | const char *const | fileName, |
| dwSensorHandle_t const | sensor | ||
| ) |
Saves the seek table for the sensor to a file, for sensors that support seek tables.
A seek table is available if a virtual sensor has been requested to create/load one during creation. Refer to each individual sensor to see what parameters need to be passed to instantiate or load seek table.
@req{GID-AV_REQ-6997929}
It is guaranteed that any seek table written out by this method can be parsed by the corresponding virtual sensor.
| [in] | fileName | Name of the file under a reachable path to write seek table to. |
| [in] | sensor | Handle to the sensor which seek table to write out |
| DW_API_PUBLIC dwStatus dwSensor_seekToEvent | ( | size_t const | event, |
| dwSensorHandle_t const | sensor | ||
| ) |
Seeks the sensor to an event, for sensors that support seeking.
Next readFrame(), readMessage(), etc. method would start to read from this event.
@req{GID-AV_REQ-6996493}
| [in] | event | Number of the event to seek to. Must be in the range [0; eventCount) |
| [in] | sensor | Handle to the sensor which seek table to write out |
| DW_API_PUBLIC dwStatus dwSensor_seekToTime | ( | dwTime_t const | timestampUs, |
| dwSensorHandle_t const | sensor | ||
| ) |
Seeks the sensor to a specific timestamp, for sensors that support seeking.
Next readFrame(), readMessage(), etc. method would start to read from an event which timestamp is greater or equal to the seek timestamp.
@req{GID-AV_REQ-6997824}
| [in] | timestampUs | Timestamp in usec to seek sensor to. Must be in the range [startTimestamp_us; endTimestamp_us] |
| [in] | sensor | Handle to the sensor which seek table to write out |
| DW_API_PUBLIC dwStatus dwSensor_setThreadAffinity | ( | uint32_t const | affinityMask, |
| dwSensorHandle_t const | sensor | ||
| ) |
Sets the affinity of the internal thread, for sensors that use an internal thread to communicate to the OS drivers.
@req{GID-AV_REQ-6775303}
| [in] | affinityMask | Bit mask setting 1 to CPU which shall execute sensor thread |
| [in] | sensor | Handle to the sensor to set thread priority |
| DW_API_PUBLIC dwStatus dwSensor_setThreadPriority | ( | int32_t const | priority, |
| dwSensorHandle_t const | sensor | ||
| ) |
Sets the priority of the internal thread, for sensors that use an internal thread to communicate to the OS drivers.
This method sets the priority of the internal thread, if the sensor implementation supports it.
req{GID-AV_REQ-6775302}
| [in] | priority | Priority of the thread to set. In general the priority is in range [1;99] |
| [in] | sensor | Handle to the sensor to set thread priority |
| DW_API_PUBLIC dwStatus dwSensor_start | ( | dwSensorHandle_t const | sensor | ) |
Starts the sensor previously successfully created with 'dwSAL_createSensor()'.
After a sensor is successfully started, new sensor data can be acquired using corresponding sensor methods.
@req{GID-AV_REQ-6775288}
| [in] | sensor | Specifies the sensor handle of the sensor previously created with 'dwSAL_createSensor()'. |
| DW_API_PUBLIC dwStatus dwSensor_stop | ( | dwSensorHandle_t const | sensor | ) |
Stops the sensor.
The method blocks while the sensor is stopped.
@req{GID-AV_REQ-6775289}
| [in] | sensor | Specifies the sensor handle of a sensor previously created with 'dwSAL_createSensor()'. |