DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Radar Plugin

Detailed Description

Provides an interface for supporting non-standard Radar sensors.

Note
SW Release Applicability: These APIs are available in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.

Data Structures

struct  _dwRadarDecoder_constants
 Holds constants for a given radar. More...
 

Functions

dwStatus _dwRadarDecoder_decodePacket (dwRadarScan *output, const uint8_t *buffer, const size_t length, const dwRadarScanType scanType)
 Decodes a packet from the radar, given a raw byte array and a specified decoding format. More...
 
dwStatus _dwRadarDecoder_encodeMountPosition (uint8_t *buffer, const size_t maxOutputSize, const dwRadarMountPosition *packet)
 Encodes data from a /ref dwRadarMountPosition into a raw byte array. More...
 
dwStatus _dwRadarDecoder_encodeVehicleState (uint8_t *buffer, const size_t maxOutputSize, const dwRadarVehicleState *packet)
 Encodes data from a /ref dwRadarVehicleState into a raw byte array. More...
 
dwStatus _dwRadarDecoder_getConstants (_dwRadarDecoder_constants *constants)
 Gets constants associated with this radar sensor. More...
 
dwStatus _dwRadarDecoder_initialize ()
 Initializes the radar decoder. More...
 
bool _dwRadarDecoder_isScanComplete (dwRadarScanType scanType, const uint8_t **buffer, size_t *length, size_t numPackets)
 Returns the status of the scan. More...
 
dwStatus _dwRadarDecoder_release ()
 Releases the radar decoder. More...
 
dwStatus _dwRadarDecoder_synchronize (const uint8_t *buffer, const size_t length, size_t *remaining)
 Determines whether a byte array of packet data has a valid radar signature. More...
 
dwStatus _dwRadarDecoder_validatePacket (const uint8_t *buffer, const size_t length, dwRadarScanType *scanType)
 Determines whether a byte array of packet data is valid. More...
 

Data Structure Documentation

◆ _dwRadarDecoder_constants

struct _dwRadarDecoder_constants
Data Fields
size_t headerSize Packet header size (in bytes).
size_t maxPayloadSize Packet max payload size (in bytes).
size_t mountSize Size of the mount poisition message to be sent to the radar.
dwRadarProperties properties Radar properties.
size_t vehicleStateSize Size of the vehicle state message to be sent to the radar.

Function Documentation

◆ _dwRadarDecoder_decodePacket()

dwStatus _dwRadarDecoder_decodePacket ( dwRadarScan output,
const uint8_t *  buffer,
const size_t  length,
const dwRadarScanType  scanType 
)

Decodes a packet from the radar, given a raw byte array and a specified decoding format.

Parameters
[out]outputA pointer to a recoded packet output.
[in]bufferByte array containing raw.
[in]lengthLength of the byte array.
[in]scanTypeType of scan for this packet.
Returns
DW_FAILURE, DW_SUCCESS

◆ _dwRadarDecoder_encodeMountPosition()

dwStatus _dwRadarDecoder_encodeMountPosition ( uint8_t *  buffer,
const size_t  maxOutputSize,
const dwRadarMountPosition packet 
)

Encodes data from a /ref dwRadarMountPosition into a raw byte array.

The raw data is in a format expected by the radar.

Parameters
[in,out]bufferA pointer to the byte array into which the function places encoded data. The caller must deallocate the buffer when it is no longer needed.
[in]maxOutputSizeLength of the output buffer in bytes.
[in]packetA pointer to the mounting packet to be encoded.
Returns
DW_FAILURE, DW_SUCCESS

◆ _dwRadarDecoder_encodeVehicleState()

dwStatus _dwRadarDecoder_encodeVehicleState ( uint8_t *  buffer,
const size_t  maxOutputSize,
const dwRadarVehicleState packet 
)

Encodes data from a /ref dwRadarVehicleState into a raw byte array.

The raw data is in a format expected by the radar.

Parameters
[in,out]bufferA pointer to the byte array into which the function places encoded data. The caller must deallocate the buffer when it is no longer needed.
[in]maxOutputSizeLength of the output buffer, in bytes.
[in]packetA pointer to the dynamics packet to be encoded.
Returns
DW_FAILURE, DW_SUCCESS

◆ _dwRadarDecoder_getConstants()

dwStatus _dwRadarDecoder_getConstants ( _dwRadarDecoder_constants constants)

Gets constants associated with this radar sensor.

Parameters
[out]constantsConstant parameters for this sensor are written here.
Returns
DW_FAILURE, DW_SUCCESS

◆ _dwRadarDecoder_initialize()

dwStatus _dwRadarDecoder_initialize ( )

Initializes the radar decoder.

Returns
DW_FAILURE, DW_SUCCESS

◆ _dwRadarDecoder_isScanComplete()

bool _dwRadarDecoder_isScanComplete ( dwRadarScanType  scanType,
const uint8_t **  buffer,
size_t *  length,
size_t  numPackets 
)

Returns the status of the scan.

If this function returns true, the complete scan is passed to the user.

Parameters
[in]scanTypeThe type of scan for this data.
[in]bufferA pointer to an array of byte arrays containing packet data that potentially belongs to a single scan.
[in]lengthA pointer to the array of lengths of the packets.
[out]numPacketsNumber of packets in each array.
Returns
True if the scan is completed, or False otherwise.

◆ _dwRadarDecoder_release()

dwStatus _dwRadarDecoder_release ( )

Releases the radar decoder.

Returns
DW_FAILURE, DW_SUCCESS

◆ _dwRadarDecoder_synchronize()

dwStatus _dwRadarDecoder_synchronize ( const uint8_t *  buffer,
const size_t  length,
size_t *  remaining 
)

Determines whether a byte array of packet data has a valid radar signature.

Parameters
[in]bufferA pointer to the byte array containing packet data.
[in]lengthLength of the buffer in bytes.
[out]remainingNumber of bytes remaining for packet completion.
Returns
DW_SUCCESS if the signature is valid, or DW_FAILURE otherwise.

◆ _dwRadarDecoder_validatePacket()

dwStatus _dwRadarDecoder_validatePacket ( const uint8_t *  buffer,
const size_t  length,
dwRadarScanType scanType 
)

Determines whether a byte array of packet data is valid.

The definition of "valid" here is implementation-specific.

Parameters
[in]bufferA pointer to the byte array containing packet data.
[in]lengthLength of the buffer in bytes.
[out]scanTypeReturns the radar scan type for this packet.
Returns
DW_SUCCESS if the data is valid, or DW_FAILURE otherwise.