DriveWorks SDK Reference
5.12.103 Release
For Test and Development only

Radar Workflow

The following code snippet shows the general structure of a program that uses a Radar sensor.

dwRadarScanType scanType;
for (size_t i = 0; i < static_cast<size_t>(DW_RADAR_RETURN_TYPE_COUNT); ++i) {
for (size_t j = 0; j < static_cast<size_t>(DW_RADAR_RANGE_COUNT); ++j) {
scanType.returnType = static_cast<dwRadarReturnType>(i);
scanType.range = static_cast<dwRadarRange>(j);
status = dwSensorRadar_readScan(..., scanType, ..., ...);
}
}
dwRadarRange range
Scan range.
Definition: RadarTypes.h:106
dwRadarReturnType returnType
Type of radar return.
Definition: RadarTypes.h:103
dwRadarRange
Defines the range of radar return.
Definition: RadarTypes.h:46
@ DW_RADAR_RANGE_COUNT
Count.
Definition: RadarTypes.h:60
dwRadarReturnType
Defines the type of radar return.
Definition: RadarTypes.h:64
@ DW_RADAR_RETURN_TYPE_COUNT
Count.
Definition: RadarTypes.h:75
Defines the type of scan (combination of return type & range)
Definition: RadarTypes.h:101
DW_API_PUBLIC dwStatus dwSensorRadar_readScan(const dwRadarScan **const data, const dwTime_t timeoutUs, dwSensorHandle_t const sensor)
Reads a one scan chunk.
DW_API_PUBLIC dwStatus dwSensorRadar_returnScan(const dwRadarScan *const scan, dwSensorHandle_t const sensor)
Returns the data covering an entire scan read to the internal pool.
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.
DW_API_PUBLIC dwStatus dwSAL_start(dwSALHandle_t const sal)
Bootstraps all sensors managed by the SAL module.
DW_API_PUBLIC dwStatus dwSensor_stop(dwSensorHandle_t const sensor)
Stops the sensor.
DW_API_PUBLIC dwStatus dwSAL_initialize(dwSALHandle_t *const sal, dwContextHandle_t const context)
Creates and initializes a SAL (sensor abstraction layer) module.
DW_API_PUBLIC dwStatus dwSAL_releaseSensor(dwSensorHandle_t const sensor)
Releases a sensor managed by the SAL module.

For more details, refer to Radar Replay Sample.