NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
Sensor Plugin API

Detailed Description

Defines Sensor Plugin API for interact with live sensor.

Data Structures

struct  dwCameraSensorPluginFunction
 Function Table exposing camera sensor plugin functions. More...
 
struct  dwDataSensorPluginFunction
 Function Table exposing data sensor plugin functions. More...
 
struct  dwLidarSensorPluginFunction
 Function Table exposing lidar sensor plugin functions. More...
 
struct  dwSensorPluginFunctions
 Function Table exposing sensor plugin functions. More...
 

Macros

#define dwGPSSensorPluginFunction   dwSensorPluginFunctions
 Function Table exposing gps sensor plugin functions. More...
 
#define dwIMUSensorPluginFunction   dwSensorPluginFunctions
 Function Table exposing imu sensor plugin functions. More...
 
#define dwRadarSensorPluginFunction   dwSensorPluginFunctions
 Function Table exposing radar sensor plugin functions. More...
 
#define SENSOR_PLUGIN_COMMON_FUNCTIONS
 
#define dwUltrasonicSensorPluginFunction   dwSensorPluginFunctions
 Function Table exposing ultrasonic sensor plugin functions. More...
 

Typedefs

typedef dwStatus(* dwSensorCameraPlugin_readFrame) (void **rawBuffers, uint32_t numBuffers, dwTime_t const timeoutUs, dwSensorPluginSensorHandle_t sensor)
 Handle to captured frame. More...
 
typedef dwStatus(* dwSensorCameraPlugin_returnFrame) (void **outBuffer, uint32_t const numBuffers, dwSensorPluginSensorHandle_t sensorHandle)
 Return a frame buffer to the camera sensor. More...
 
typedef dwStatus(* dwSensorCameraPlugin_initializePipeline) (dwSensorPluginSensorHandle_t sensorHandle)
 Initialize a pipeline for the camera sensor. More...
 
typedef dwStatus(* dwSensorCameraPlugin_setEventCallback) (dwCameraCallback blkCallback, dwCameraCallback lineCallback, dwSensorPluginSensorHandle_t sensorHandle)
 Set the event callback for the camera sensor. More...
 
typedef dwStatus(* dwSensorCameraPlugin_setSensorErrorCallback) (dwCameraPluginCallback callback, dwSensorPluginSensorHandle_t sensorHandle)
 Set the sensor error callback for the camera sensor. More...
 
typedef dwStatus(* dwSensorCameraPlugin_initializeHandleEx) (dwSensorPluginSensorHandle_t *handle, char const *params, dwCodecHeaderPluginHandle_t codecHeader, dwContextHandle_t ctx)
 Initialize the handle for the camera sensor. More...
 
typedef dwErrorSignal(* dwSensorCameraPlugin_getErrorSignal) (dwSensorPluginSensorHandle_t sensorHandle)
 Get the error signal for the camera sensor. More...
 
typedef dwStatus(* dwSensorCameraPlugin_clearErrorSignal) (dwSensorPluginSensorHandle_t sensorHandle)
 Clear the error signal for the camera sensor. More...
 
typedef dwImageProperties(* dwSensorCameraPlugin_getImageProperties) (uint32_t type, dwSensorPluginSensorHandle_t sensorHandle)
 Get the image properties for the camera sensor. More...
 
typedef dwStatus(* dwCameraSensorPlugin_setImagePool) (NvSciBufObj **ispImages, uint32_t *ispCounts, NvSciBufObj *imageGroup, uint32_t imageGroupCount, dwCameraImageType siplClientType, dwSensorPluginSensorHandle_t handle)
 Sets the image pool for the camera. More...
 
typedef dwStatus(* dwCameraSensorPlugin_getCameraInfo) (void const **cameraInfo, dwSensorPluginSensorHandle_t handle)
 Gets the camera information for the specified camera output type. More...
 
typedef dwStatus(* dwCameraSensorPlugin_getNvSciImageAttr) (uint8_t outputType, NvSciBufAttrList *nvSciImageAttr, dwSensorPluginSensorHandle_t handle)
 Gets the NvSci attributes for the camera sensor. More...
 
typedef dwStatus(* dwCameraSensorPlugin_bootstrap) (dwSensorPluginSensorHandle_t handle)
 Bootstraps the camera sensor. More...
 
typedef dwStatus(* dwCameraSensorPlugin_getAvailableOutputFormats) (uint32_t *availableOutputFormats, dwSensorPluginSensorHandle_t handle)
 Gets the available output formats for the camera sensor. More...
 
typedef bool(* dwCameraSensorPlugin_isEOFSyncSet) (dwCameraImageType clientType, dwSensorPluginSensorHandle_t handle)
 Checks if the EOF sync is set for the camera sensor. More...
 
typedef dwStatus(* dwCameraSensorPlugin_getCodecHeader) (dwCodecHeaderHandle_t *codecHeader, dwSensorPluginSensorHandle_t handle)
 Gets the codec header for the camera sensor. More...
 
typedef dwStatus(* dwCameraSensorPlugin_getIsReplayInfo) (bool *isReplay, dwSensorPluginSensorHandle_t handle)
 Gets the is replay info for the camera sensor. More...
 
typedef dwStatus(* dwCameraSensorPlugin_manageImageLock) (NvSciBufObj imageSciBufObj, bool lock, dwSensorPluginSensorHandle_t handle)
 Manages the image lock for the camera sensor. More...
 
typedef dwStatus(* dwCameraSensorPlugin_getSensorIndex) (uint32_t *sensorIndex, dwSensorPluginSensorHandle_t handle)
 Gets the sensor index for the camera sensor. More...
 
typedef dwStatus(* dwCameraSensorPlugin_init) (bool asyncInit, dwSensorPluginSensorHandle_t handle)
 Initialize the camera sensor. More...
 
typedef struct dwCameraSensorPluginFunction dwCameraSensorPluginFunction
 Function Table exposing camera sensor plugin functions. More...
 
typedef dwStatus(* dwSensorDataPlugin_sendPacket) (dwDataPacket *packet, dwSensorPluginSensorHandle_t sensor)
 Send a packet via data sensor plugin. More...
 
typedef struct dwDataSensorPluginFunction dwDataSensorPluginFunction
 Function Table exposing data sensor plugin functions. More...
 
typedef dwStatus(* dwSensorLidarPlugin_sendMessage) (uint32_t const cmd, uint8_t const *const data, size_t const size, dwSensorPluginSensorHandle_t sensor)
 Send message to lidar sensor. More...
 
typedef dwStatus(* dwSensorPlugin_initializeHandleEx) (dwSensorPluginSensorHandle_t *handle, char const *params, dwCodecHeaderPluginHandle_t codecHeader, dwContextHandle_t ctx)
 Initialize a new handle to the sensor managed by the plugin module, EX version which can receive codecheader as param. More...
 
typedef struct dwLidarSensorPluginFunction dwLidarSensorPluginFunction
 Function Table exposing lidar sensor plugin functions. More...
 
typedef void * dwSensorPluginSensorHandle_t
 Plugin handle. Used in plugin public interfaces. More...
 
typedef dwStatus(* dwSensorPlugin_initializeHandle) (dwSensorPluginSensorHandle_t *handle, char const *params, dwContextHandle_t ctx)
 Initialize a new handle to the sensor managed by the plugin module. More...
 
typedef dwStatus(* dwSensorPlugin_release) (dwSensorPluginSensorHandle_t handle)
 Releases a sensor managed by the plugin module. More...
 
typedef dwStatus(* dwSensorPlugin_start) (dwSensorPluginSensorHandle_t handle)
 Starts the sensor previously successfully created with 'dwSensorPlugin_createSensor' interface. More...
 
typedef dwStatus(* dwSensorPlugin_stop) (dwSensorPluginSensorHandle_t handle)
 Stops the sensor. More...
 
typedef dwStatus(* dwSensorPlugin_reset) (dwSensorPluginSensorHandle_t handle)
 Resets the sensor. More...
 
typedef dwStatus(* dwSensorPlugin_readRawData) (uint8_t const **data, size_t *size, dwTime_t *timestamp, dwTime_t timeout_us, dwSensorPluginSensorHandle_t handle)
 Reads RAW data for one single message from the sensor as byte array. More...
 
typedef dwStatus(* dwSensorPlugin_returnRawData) (uint8_t const *data, dwSensorPluginSensorHandle_t handle)
 Returns RAW data to sensor as a byte array. More...
 
typedef struct dwSensorPluginFunctions dwSensorPluginFunctions
 Function Table exposing sensor plugin functions. More...
 

Functions

DW_API_PUBLIC dwStatus dwSAL_registerSensorPlugin (dwSensorType sensorType, char const *codecMimeType, void const *funcTable, dwSALHandle_t const sal)
 Register sensor plugin which works with live sensors. More...
 

Variables

const typedef dwImageMemoryType *(* dwCameraSensorPlugin_getIspOutputMemoryFormat )(dwSensorPluginSensorHandle_t handle)
 Gets the ISP output memory format for the camera sensor. More...
 
const typedef dwImageFormat *(* dwCameraSensorPlugin_getIspOutputImageFormat )(dwSensorPluginSensorHandle_t handle)
 Gets the ISP output image format for the camera sensor. More...
 

Macro Definition Documentation

◆ dwGPSSensorPluginFunction

#define dwGPSSensorPluginFunction   dwSensorPluginFunctions

Function Table exposing gps sensor plugin functions.

Definition at line 35 of file GPSSensorPlugin.h.

◆ dwIMUSensorPluginFunction

#define dwIMUSensorPluginFunction   dwSensorPluginFunctions

Function Table exposing imu sensor plugin functions.

Definition at line 35 of file IMUSensorPlugin.h.

◆ dwRadarSensorPluginFunction

#define dwRadarSensorPluginFunction   dwSensorPluginFunctions

Function Table exposing radar sensor plugin functions.

Definition at line 35 of file RadarSensorPlugin.h.

◆ dwUltrasonicSensorPluginFunction

#define dwUltrasonicSensorPluginFunction   dwSensorPluginFunctions

Function Table exposing ultrasonic sensor plugin functions.

Definition at line 35 of file UltrasonicSensorPlugin.h.

◆ SENSOR_PLUGIN_COMMON_FUNCTIONS

#define SENSOR_PLUGIN_COMMON_FUNCTIONS
Value:
dwSensorPlugin_initializeHandle initializeHandle; \
dwSensorPlugin_release release; \
dwSensorPlugin_start start; \
dwSensorPlugin_stop stop; \
dwSensorPlugin_reset reset; \
dwSensorPlugin_readRawData readRawData; \
dwSensorPlugin_returnRawData returnRawData

Definition at line 171 of file SensorPlugin.h.

Typedef Documentation

◆ dwCameraSensorPlugin_bootstrap

typedef dwStatus(* dwCameraSensorPlugin_bootstrap) (dwSensorPluginSensorHandle_t handle)

Bootstraps the camera sensor.

Parameters
[in]handlePlugin sensor handle
Returns
dwStatus Status of the operation

Definition at line 255 of file CameraSensorPlugin.h.

◆ dwCameraSensorPlugin_getAvailableOutputFormats

typedef dwStatus(* dwCameraSensorPlugin_getAvailableOutputFormats) (uint32_t *availableOutputFormats, dwSensorPluginSensorHandle_t handle)

Gets the available output formats for the camera sensor.

Parameters
[out]availableOutputFormatsPointer to array of available output formats
[in]handlePlugin sensor handle
Returns
dwStatus Status of the operation

Definition at line 265 of file CameraSensorPlugin.h.

◆ dwCameraSensorPlugin_getCameraInfo

typedef dwStatus(* dwCameraSensorPlugin_getCameraInfo) (void const **cameraInfo, dwSensorPluginSensorHandle_t handle)

Gets the camera information for the specified camera output type.

This function retrieves the camera information for the specified camera output type. It returns a pointer to the camera information structure.

Parameters
[out]cameraInfoA pointer to the camera information structure.
Returns
Status indicating the success or failure of the operation.

Definition at line 218 of file CameraSensorPlugin.h.

◆ dwCameraSensorPlugin_getCodecHeader

typedef dwStatus(* dwCameraSensorPlugin_getCodecHeader) (dwCodecHeaderHandle_t *codecHeader, dwSensorPluginSensorHandle_t handle)

Gets the codec header for the camera sensor.

Parameters
[out]codecHeaderPointer to the codec header
[in]handlePlugin sensor handle
Returns
dwStatus Status of the operation

Definition at line 285 of file CameraSensorPlugin.h.

◆ dwCameraSensorPlugin_getIsReplayInfo

typedef dwStatus(* dwCameraSensorPlugin_getIsReplayInfo) (bool *isReplay, dwSensorPluginSensorHandle_t handle)

Gets the is replay info for the camera sensor.

Parameters
[out]isReplayPointer to the is replay info
[in]handlePlugin sensor handle
Returns
dwStatus Status of the operation

Definition at line 295 of file CameraSensorPlugin.h.

◆ dwCameraSensorPlugin_getNvSciImageAttr

typedef dwStatus(* dwCameraSensorPlugin_getNvSciImageAttr) (uint8_t outputType, NvSciBufAttrList *nvSciImageAttr, dwSensorPluginSensorHandle_t handle)

Gets the NvSci attributes for the camera sensor.

Parameters
[out]nvSciImageAttrPointer to NvSciBufAttrList to receive the attributes.
[in]handlePlugin sensor handle
Returns
dwStatus Status of the operation

Definition at line 228 of file CameraSensorPlugin.h.

◆ dwCameraSensorPlugin_getSensorIndex

typedef dwStatus(* dwCameraSensorPlugin_getSensorIndex) (uint32_t *sensorIndex, dwSensorPluginSensorHandle_t handle)

Gets the sensor index for the camera sensor.

This returns the platform-wide sensor index (0-15) that uniquely identifies this camera across all interfaces and links.

Parameters
[out]sensorIndexPointer to store the sensor index
[in]handlePlugin sensor handle
Returns
dwStatus Status of the operation

Definition at line 319 of file CameraSensorPlugin.h.

◆ dwCameraSensorPlugin_init

typedef dwStatus(* dwCameraSensorPlugin_init) (bool asyncInit, dwSensorPluginSensorHandle_t handle)

Initialize the camera sensor.

Parameters
[in]asyncInitIf true, initialization is performed asynchronously.
[in]handlePlugin sensor handle.
Returns
DW_INVALID_ARGUMENT - if the handle is invalid
DW_NOT_READY - if the sensor is not ready
DW_SUCCESS - if initialization started/completed successfully

Definition at line 331 of file CameraSensorPlugin.h.

◆ dwCameraSensorPlugin_isEOFSyncSet

typedef bool(* dwCameraSensorPlugin_isEOFSyncSet) (dwCameraImageType clientType, dwSensorPluginSensorHandle_t handle)

Checks if the EOF sync is set for the camera sensor.

Parameters
[in]clientTypeClient type
[in]handlePlugin sensor handle
Returns
bool True if the EOF sync is set, false otherwise

Definition at line 275 of file CameraSensorPlugin.h.

◆ dwCameraSensorPlugin_manageImageLock

typedef dwStatus(* dwCameraSensorPlugin_manageImageLock) (NvSciBufObj imageSciBufObj, bool lock, dwSensorPluginSensorHandle_t handle)

Manages the image lock for the camera sensor.

Parameters
[in]imageHandleImage handle
[in]lockTrue to lock, false to unlock
[in]handlePlugin sensor handle
Returns
dwStatus Status of the operation

Definition at line 306 of file CameraSensorPlugin.h.

◆ dwCameraSensorPlugin_setImagePool

typedef dwStatus(* dwCameraSensorPlugin_setImagePool) (NvSciBufObj **ispImages, uint32_t *ispCounts, NvSciBufObj *imageGroup, uint32_t imageGroupCount, dwCameraImageType siplClientType, dwSensorPluginSensorHandle_t handle)

Sets the image pool for the camera.

Parameters
isp_imagesArray of pointers to ISP image arrays [DW_CAMERA_MAX_ISP_COUNT]
isp_countsArray of counts for each ISP image array [DW_CAMERA_MAX_ISP_COUNT]
image_groupPointer to image group buffer objects
image_group_countNumber of elements in image group array
output_typeCamera output type
handlePlugin sensor handle
Returns
dwStatus Status of the operation

Definition at line 201 of file CameraSensorPlugin.h.

◆ dwCameraSensorPluginFunction

Function Table exposing camera sensor plugin functions.

◆ dwDataSensorPluginFunction

Function Table exposing data sensor plugin functions.

◆ dwLidarSensorPluginFunction

Function Table exposing lidar sensor plugin functions.

◆ dwSensorCameraPlugin_clearErrorSignal

typedef dwStatus(* dwSensorCameraPlugin_clearErrorSignal) (dwSensorPluginSensorHandle_t sensorHandle)

Clear the error signal for the camera sensor.

Parameters
[in]sensorHandleHandle to the sensor.

Definition at line 179 of file CameraSensorPlugin.h.

◆ dwSensorCameraPlugin_getErrorSignal

typedef dwErrorSignal(* dwSensorCameraPlugin_getErrorSignal) (dwSensorPluginSensorHandle_t sensorHandle)

Get the error signal for the camera sensor.

Parameters
[in]sensorHandleHandle to the sensor.
Returns
DW_INVALID_ARGUMENT - if the parameters are invalid
DW_NOT_SUPPORTED - if the sensor handle is NULL or invalid

Definition at line 172 of file CameraSensorPlugin.h.

◆ dwSensorCameraPlugin_getImageProperties

typedef dwImageProperties(* dwSensorCameraPlugin_getImageProperties) (uint32_t type, dwSensorPluginSensorHandle_t sensorHandle)

Get the image properties for the camera sensor.

Parameters
[in]typeType of the image.
[in]sensorHandleHandle to the sensor.

Definition at line 187 of file CameraSensorPlugin.h.

◆ dwSensorCameraPlugin_initializeHandleEx

typedef dwStatus(* dwSensorCameraPlugin_initializeHandleEx) (dwSensorPluginSensorHandle_t *handle, char const *params, dwCodecHeaderPluginHandle_t codecHeader, dwContextHandle_t ctx)

Initialize the handle for the camera sensor.

Parameters
[out]handleHandle to the sensor.
[in]paramsParameters for the sensor.
[in]codecHeaderCodec header for the sensor.
[in]ctxContext for the sensor.
Returns
DW_INVALID_ARGUMENT - if the parameters are invalid
DW_NOT_SUPPORTED - if the sensor handle is NULL or invalid
DW_FAILURE - if not able to initialize the handle
DW_SUCCESS - if the handle is initialized successfully

Definition at line 161 of file CameraSensorPlugin.h.

◆ dwSensorCameraPlugin_initializePipeline

typedef dwStatus(* dwSensorCameraPlugin_initializePipeline) (dwSensorPluginSensorHandle_t sensorHandle)

Initialize a pipeline for the camera sensor.

Parameters
[in]sensorHandleHandle to the sensor.
Returns
DW_INVALID_ARGUMENT - if the sensor handle is invalid
DW_NOT_SUPPORTED - if the sensor does not support pipeline initialization
DW_FAILURE - if not able to initialize the pipeline
DW_SUCCESS - if the pipeline is initialized successfully

Definition at line 124 of file CameraSensorPlugin.h.

◆ dwSensorCameraPlugin_readFrame

typedef dwStatus(* dwSensorCameraPlugin_readFrame) (void **rawBuffers, uint32_t numBuffers, dwTime_t const timeoutUs, dwSensorPluginSensorHandle_t sensor)

Handle to captured frame.

Read a frame from the camera sensor.

Parameters
[out]rawBuffersArray of pointers to receive up to 4 raw SIPL buffers.
[in,out]numBuffersNumber of buffers to read. On input, specifies the maximum number of buffers to read (up to 4). On output, contains the actual number read.
[in]timeoutUsTimeout in microseconds.
[in]sensorSpecifies the sensor to read the frame from.
Returns
DW_INVALID_ARGUMENT - if the parameters are invalid
DW_NOT_SUPPORTED - if the sensor handle is NULL or invalid
DW_TIME_OUT - if timeout occurs while waiting for a frame
DW_FAILURE - if not able to read frame successfully
DW_SUCCESS - if read frame successfully

Definition at line 98 of file CameraSensorPlugin.h.

◆ dwSensorCameraPlugin_returnFrame

typedef dwStatus(* dwSensorCameraPlugin_returnFrame) (void **outBuffer, uint32_t const numBuffers, dwSensorPluginSensorHandle_t sensorHandle)

Return a frame buffer to the camera sensor.

Parameters
[in]frameHandleHandle to the frame to be returned.
Returns
DW_INVALID_ARGUMENT - if the parameters are invalid
DW_NOT_SUPPORTED - if the sensor handle is NULL or invalid
DW_FAILURE - if not able to return buffer successfully
DW_SUCCESS - if returned buffer successfully

Definition at line 112 of file CameraSensorPlugin.h.

◆ dwSensorCameraPlugin_setEventCallback

typedef dwStatus(* dwSensorCameraPlugin_setEventCallback) (dwCameraCallback blkCallback, dwCameraCallback lineCallback, dwSensorPluginSensorHandle_t sensorHandle)

Set the event callback for the camera sensor.

Parameters
[in]blkCallbackCallback function for device block events.
[in]lineCallbackCallback function for line events.
[in]sensorHandleHandle to the sensor.
Returns
DW_INVALID_ARGUMENT - if the parameters are invalid
DW_NOT_SUPPORTED - if the sensor handle is NULL or invalid
DW_FAILURE - if not able to set event callback successfully
DW_SUCCESS - if event callback is set successfully

Definition at line 138 of file CameraSensorPlugin.h.

◆ dwSensorCameraPlugin_setSensorErrorCallback

typedef dwStatus(* dwSensorCameraPlugin_setSensorErrorCallback) (dwCameraPluginCallback callback, dwSensorPluginSensorHandle_t sensorHandle)

Set the sensor error callback for the camera sensor.

Parameters
[in]callbackCallback function for sensor error events.
[in]sensorHandleHandle to the sensor.

Definition at line 146 of file CameraSensorPlugin.h.

◆ dwSensorDataPlugin_sendPacket

typedef dwStatus(* dwSensorDataPlugin_sendPacket) (dwDataPacket *packet, dwSensorPluginSensorHandle_t sensor)

Send a packet via data sensor plugin.

Parameters
[in]packetA pointer to the packet to be sent.
[in]sensorSpecifies the data sensor to send the message over.
Returns
DW_NOT_SUPPORTED - if the underlying sensor does not support send operation.
DW_INVALID_HANDLE - if given sensor handle is invalid.
DW_INVALID_ARGUMENT - if given arguments are invalid.
DW_NOT_AVAILABLE - if sensor has not been started.
DW_SUCCESS

Definition at line 52 of file DataSensorPlugin.h.

◆ dwSensorLidarPlugin_sendMessage

typedef dwStatus(* dwSensorLidarPlugin_sendMessage) (uint32_t const cmd, uint8_t const *const data, size_t const size, dwSensorPluginSensorHandle_t sensor)

Send message to lidar sensor.

@req{GID-AV_REQ-6823070}

Parameters
[in]cmdIdentification of the message.
[in]dataRaw payload of the message.
[in]sizeRaw payload size of the message.
[in]sensorSpecifies the sensor to send the message data.
Returns
DW_INVALID_ARGUMENT - if the data is invalid
DW_NOT_SUPPORTED - if the sensor handle is NULL or invalid, or specified sensor doesn't support cmd or the output connection is not set
DW_FAILURE - if not able to send data out successfully
DW_SUCCESS - if send the message out to the sensor successfully

Definition at line 54 of file LidarSensorPlugin.h.

◆ dwSensorPlugin_initializeHandle

typedef dwStatus(* dwSensorPlugin_initializeHandle) (dwSensorPluginSensorHandle_t *handle, char const *params, dwContextHandle_t ctx)

Initialize a new handle to the sensor managed by the plugin module.

@req{GID-AV_REQ-6826217}

Parameters
[out]handleA pointer to sensor handle.
[in]paramsSpecifies the parameters for the sensor.
[in]ctxcontext handle.
Returns
DW_INVALID_ARGUMENT - if pointer to the sensor handle is NULL.
DW_SUCCESS

Definition at line 56 of file SensorPlugin.h.

◆ dwSensorPlugin_initializeHandleEx

typedef dwStatus(* dwSensorPlugin_initializeHandleEx) (dwSensorPluginSensorHandle_t *handle, char const *params, dwCodecHeaderPluginHandle_t codecHeader, dwContextHandle_t ctx)

Initialize a new handle to the sensor managed by the plugin module, EX version which can receive codecheader as param.

Parameters
[out]handleA pointer to sensor handle.
[in]paramsSpecifies the parameters for the sensor.
[in]codecHeaderA codecHeader which need to be updated in sensor init stage.
[in]ctxcontext handle.
Returns
DW_INVALID_ARGUMENT - if pointer to the sensor handle is NULL.
DW_SUCCESS

Definition at line 70 of file LidarSensorPlugin.h.

◆ dwSensorPlugin_readRawData

typedef dwStatus(* dwSensorPlugin_readRawData) (uint8_t const **data, size_t *size, dwTime_t *timestamp, dwTime_t timeout_us, dwSensorPluginSensorHandle_t handle)

Reads RAW data for one single message from the sensor as byte array.

This should be the raw unprocessed data received from the sensor. Generally this is the entrypoint to perform a read operation on the sensor.

For each raw "message" from the sensor, data must be packed in the following memory layout:

Payload Size (uint32_t) | Timestamp (dwTime_t) | Payload

It is the responsiblility of the plugin author to do perform the memory allocation for the memory buffer that will be given out via this API.

Please note the following considerations on the behavior of this API:

1. This API may be called several times before a call to 'dwSensorPlugin_returnRawData',
   which means your plugin implementation must support multiple "raw data" buffers in flight.
2. The buffer given out by this API will be returned by a call to '_dwSensorPlugin_returnRawData()'
3. The size reported as the output of this API shall include the header shown above
Note
To support the multiple buffers in flight behavior described again, a reference BufferPool data structure implementation is released with the plugin samples.

@req{GID-AV_REQ-6826222}

Parameters
[out]dataA pointer to the pointer to data that is populated with the RAW data.
[out]sizeA pointer to the size of the data array.
[out]timestampSpecifies the host timestamp of raw data message.
[in]timeout_usSpecifies the timeout in us to wait before unblocking.
[in]handleSpecifies the sensor handle to read from.
Returns
DW_INVALID_HANDLE - if the sensor handle is NULL or invalid
DW_NOT_SUPPORTED - if sensor does not implement this functionality.
DW_CALL_NOT_ALLOWED - if sensor cannot execute the call, for example, due to decoding data.
DW_INVALID_ARGUMENT - if one of the given arguments is invalid.
DW_TIME_OUT - if the requested timed out.
DW_SAL_SENSOR_ERROR - if there was an unrecoverable i/o error.
DW_SUCCESS

Definition at line 152 of file SensorPlugin.h.

◆ dwSensorPlugin_release

typedef dwStatus(* dwSensorPlugin_release) (dwSensorPluginSensorHandle_t handle)

Releases a sensor managed by the plugin module.

Note
This method renders the sensor handle unusable.

@req{GID-AV_REQ-6826218}

Parameters
[in]handleThe handle to a sensor created previously with the 'dwSensorPlugin_createHandle' interface.
Returns
DW_INVALID_HANDLE - if the sensor handle is NULL or invalid
DW_SUCCESS

Definition at line 71 of file SensorPlugin.h.

◆ dwSensorPlugin_reset

typedef dwStatus(* dwSensorPlugin_reset) (dwSensorPluginSensorHandle_t handle)

Resets the sensor.

The method shall block while the sensor is reset.

Note
It is guarunteed that all outstanding references to sensor data will be returned prior to this call.

@req{GID-AV_REQ-6826221}

Parameters
[in]handleA sensor handle previously created w/ the 'dwSensorPlugin_createHandle' interface.
Returns
DW_INVALID_HANDLE - if the sensor handle is NULL or invalid
DW_SAL_SENSOR_ERROR - if a non recoverable error happens during sensor reset.
DW_SUCCESS

Definition at line 112 of file SensorPlugin.h.

◆ dwSensorPlugin_returnRawData

typedef dwStatus(* dwSensorPlugin_returnRawData) (uint8_t const *data, dwSensorPluginSensorHandle_t handle)

Returns RAW data to sensor as a byte array.

The returned pointer must have been previously obtained by a call to the 'dwSensorPlugin_readRawData' interface.

@req{GID-AV_REQ-6826223}

Parameters
[in]dataA pointer to data that was populated with the RAW data.
[in]handleSpecifies the sensor the data came from.
Returns
DW_INVALID_HANDLE - if the sensor handle is NULL or invalid
DW_CALL_NOT_ALLOWED - if sensor cannot execute the call, for example, due to decoding data.
DW_NOT_SUPPORTED - if sensor does not implement this functionality.
DW_INVALID_ARGUMENT - if given data pointer is invalid.
DW_SUCCESS

Definition at line 169 of file SensorPlugin.h.

◆ dwSensorPlugin_start

typedef dwStatus(* dwSensorPlugin_start) (dwSensorPluginSensorHandle_t handle)

Starts the sensor previously successfully created with 'dwSensorPlugin_createSensor' interface.

Sensor data should ready to be received using the '_dwSensorPlugin_readRawData()' API after the execution of this call.

@req{GID-AV_REQ-6826219}

Parameters
[in]handleA sensor handle previously created w/ the 'dwSensorPlugin_createHandle' interface.
Returns
DW_INVALID_HANDLE - if the sensor handle is NULL or invalid
DW_SAL_SENSOR_ERROR - if a non recoverable error happens during sensor start.
DW_SUCCESS

Definition at line 86 of file SensorPlugin.h.

◆ dwSensorPlugin_stop

typedef dwStatus(* dwSensorPlugin_stop) (dwSensorPluginSensorHandle_t handle)

Stops the sensor.

This method shall block while the sensor is stopped.

@req{GID-AV_REQ-6826220}

Parameters
[in]handleA sensor handle previously created w/ the 'dwSensorPlugin_createHandle' interface.
Returns
DW_INVALID_HANDLE - if the sensor handle is NULL or invalid
DW_SAL_SENSOR_ERROR - if a non recoverable error happens during sensor stop.
DW_SUCCESS

Definition at line 98 of file SensorPlugin.h.

◆ dwSensorPluginFunctions

Function Table exposing sensor plugin functions.

◆ dwSensorPluginSensorHandle_t

Plugin handle. Used in plugin public interfaces.

Definition at line 42 of file SensorPlugin.h.

Function Documentation

◆ dwSAL_registerSensorPlugin()

DW_API_PUBLIC dwStatus dwSAL_registerSensorPlugin ( dwSensorType  sensorType,
char const *  codecMimeType,
void const *  funcTable,
dwSALHandle_t const  sal 
)

Register sensor plugin which works with live sensors.

@req{GID-AV_REQ-6775147}

Parameters
[in]sensorTypethe sensor type of registered sensor plugin
[in]codecMimeTypethe codec type of registered CodecHeader plugin
[in]funcTablepointer to sensor plugin function pointer table
[in]salSpecifies the SAL handle to register sensor plugin.
Returns
DW_INVALID_ARGUMENT if codecMimeType, funcTable or sal is nullptr.
DW_BUFFER_FULL if no available entry in registration factory DW_SUCCESS
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No

Variable Documentation

◆ dwCameraSensorPlugin_getIspOutputImageFormat

const typedef dwImageFormat*(* dwCameraSensorPlugin_getIspOutputImageFormat) (dwSensorPluginSensorHandle_t handle)

Gets the ISP output image format for the camera sensor.

Parameters
[in]handlePlugin sensor handle
Returns
dwImageFormat Memory format of the ISP output

Definition at line 246 of file CameraSensorPlugin.h.

◆ dwCameraSensorPlugin_getIspOutputMemoryFormat

const typedef dwImageMemoryType*(* dwCameraSensorPlugin_getIspOutputMemoryFormat) (dwSensorPluginSensorHandle_t handle)

Gets the ISP output memory format for the camera sensor.

Parameters
[in]handlePlugin sensor handle
Returns
dwImgMemType Memory format of the ISP output

Definition at line 237 of file CameraSensorPlugin.h.

dwSensorPlugin_initializeHandle
dwStatus(* dwSensorPlugin_initializeHandle)(dwSensorPluginSensorHandle_t *handle, char const *params, dwContextHandle_t ctx)
Initialize a new handle to the sensor managed by the plugin module.
Definition: SensorPlugin.h:56