DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

Detailed Description

Defines the Data sensor structure.

Data Structures

struct  dwDataPacket
 Holds a data packet. More...
 

Functions

DW_API_PUBLIC dwStatus dwSensorData_readPacket (const dwDataPacket **packet, dwTime_t timeout, dwSensorHandle_t hsensor)
 Reads the next packet. More...
 
DW_API_PUBLIC dwStatus dwSensorData_returnPacket (const dwDataPacket *packet, dwSensorHandle_t hsensor)
 Returns the data read to the internal pool. More...
 

Data Structure Documentation

◆ dwDataPacket

struct dwDataPacket
Data Fields
dwTime_t hostTimestamp Timestamp of the message in microseconds (using clock of the context).
uint8_t * raw Payload.
size_t size Number of bytes of the payload.

Function Documentation

◆ dwSensorData_readPacket()

DW_API_PUBLIC dwStatus dwSensorData_readPacket ( const dwDataPacket **  packet,
dwTime_t  timeout,
dwSensorHandle_t  hsensor 
)

Reads the next packet.

The pointer returned is to the internal data pool. The data must be explicitly returned by the application. The method blocks until either a new valid frame is received from the sensor or the given timeout exceeds.

Parameters
[out]dataA pointer to a pointer to a data packet read from the sensor.
[in]timeout_usSpecifies the timeout in microseconds. Special values: DW_TIMEOUT_INFINITE - to wait infinitly. Zero - means polling of internal queue.
[in]sensorSpecifies the sensor handle of the sensor previously created with 'dwSAL_createSensor()'.
Returns
DW_INVALID_HANDLE, DW_INVALID_ARGUMENT, DW_NOT_AVAILABLE, DW_TIME_OUT, DW_SUCCESS

◆ dwSensorData_returnPacket()

DW_API_PUBLIC dwStatus dwSensorData_returnPacket ( const dwDataPacket packet,
dwSensorHandle_t  hsensor 
)

Returns the data read to the internal pool.

Parameters
[in]scanA pointer to the data previously read from the data sensor to be returned to the pool.
[in]sensorSpecifies the sensor handle of the sensor previously created with 'dwSAL_createSensor()'.
Returns
DW_INVALID_HANDLE, DW_INVALID_ARGUMENT, DW_NOT_AVAILABLE, DW_TIME_OUT, DW_SUCCESS