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.
|
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...
|
|
◆ _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. |
◆ _dwRadarDecoder_decodePacket()
Decodes a packet from the radar, given a raw byte array and a specified decoding format.
- Parameters
-
[out] | output | A pointer to a recoded packet output. |
[in] | buffer | Byte array containing raw. |
[in] | length | Length of the byte array. |
[in] | scanType | Type of scan for this packet. |
- Returns
- DW_FAILURE, DW_SUCCESS
◆ _dwRadarDecoder_encodeMountPosition()
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] | buffer | A 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] | maxOutputSize | Length of the output buffer in bytes. |
[in] | packet | A pointer to the mounting packet to be encoded. |
- Returns
- DW_FAILURE, DW_SUCCESS
◆ _dwRadarDecoder_encodeVehicleState()
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] | buffer | A 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] | maxOutputSize | Length of the output buffer, in bytes. |
[in] | packet | A pointer to the dynamics packet to be encoded. |
- Returns
- DW_FAILURE, DW_SUCCESS
◆ _dwRadarDecoder_getConstants()
Gets constants associated with this radar sensor.
- Parameters
-
[out] | constants | Constant parameters for this sensor are written here. |
- Returns
- DW_FAILURE, DW_SUCCESS
◆ _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] | scanType | The type of scan for this data. |
[in] | buffer | A pointer to an array of byte arrays containing packet data that potentially belongs to a single scan. |
[in] | length | A pointer to the array of lengths of the packets. |
[out] | numPackets | Number of packets in each array. |
- Returns
True
if the scan is completed, or False
otherwise.
◆ _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] | buffer | A pointer to the byte array containing packet data. |
[in] | length | Length of the buffer in bytes. |
[out] | remaining | Number 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] | buffer | A pointer to the byte array containing packet data. |
[in] | length | Length of the buffer in bytes. |
[out] | scanType | Returns the radar scan type for this packet. |
- Returns
- DW_SUCCESS if the data is valid, or DW_FAILURE otherwise.