NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
SensorPlugin.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
20 #ifndef DW_SENSORS_SENSORLIVE_SENSORPLUGIN_H
21 #define DW_SENSORS_SENSORLIVE_SENSORPLUGIN_H
22 
23 #include <dw/core/base/Types.h>
24 #include <dw/core/context/Context.h>
25 
26 #include <dw/sensors/common/SensorTypes.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
34 
47  char const* params, dwContextHandle_t ctx);
48 
61 
75 
86 
99 
138 typedef dwStatus (*dwSensorPlugin_readRawData)(uint8_t const** data, size_t* size, dwTime_t* timestamp,
140 
155 
156 #define SENSOR_PLUGIN_COMMON_FUNCTIONS \
157  dwSensorPlugin_initializeHandle initializeHandle; \
158  dwSensorPlugin_release release; \
159  dwSensorPlugin_start start; \
160  dwSensorPlugin_stop stop; \
161  dwSensorPlugin_reset reset; \
162  dwSensorPlugin_readRawData readRawData; \
163  dwSensorPlugin_returnRawData returnRawData
164 
167 {
170 
188 dwStatus dwSAL_registerSensorPlugin(dwSensorType sensorType, char const* codecMimeType,
189  void const* funcTable, dwSALHandle_t const sal);
190 
191 #ifdef __cplusplus
192 }
193 #endif
194 
195 #endif // DW_SENSORS_SENSORLIVE_SENSORPLUGIN_H
dwSensorPlugin_stop
dwStatus(* dwSensorPlugin_stop)(dwSensorPluginSensorHandle_t handle)
Stops the sensor.
Definition: SensorPlugin.h:85
dwSensorPlugin_returnRawData
dwStatus(* dwSensorPlugin_returnRawData)(uint8_t const *data, dwSensorPluginSensorHandle_t handle)
Returns RAW data to sensor as a byte array.
Definition: SensorPlugin.h:154
ctx
DW_API_PUBLIC dwPointCloudRangeImageCreatorParams const *const const dwContextHandle_t ctx
Definition: PointCloudRangeImageCreator.h:293
timestamp
const WFDPipeline const WFDSource const WFDTransition const WFDRect *const const WFDuint64 timestamp
Definition: wfdext.h:61
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:46
handle
const WFDCommitType const WFDHandle handle
Definition: wfdext.h:124
dwTime_t
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: BasicTypes.h:54
dwSensorPluginFunctions
struct dwSensorPluginFunctions dwSensorPluginFunctions
Function Table exposing sensor plugin functions.
dwSensorPlugin_readRawData
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.
Definition: SensorPlugin.h:138
dwSensorPlugin_reset
dwStatus(* dwSensorPlugin_reset)(dwSensorPluginSensorHandle_t handle)
Resets the sensor.
Definition: SensorPlugin.h:98
dwSensorPluginSensorHandle_t
void * dwSensorPluginSensorHandle_t
Plugin handle. Used in plugin public interfaces.
Definition: SensorPlugin.h:33
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.
dwSensorType
dwSensorType
Defines the type of sensors that are available in DriveWorks.
Definition: SensorTypes.h:74
dwSensorPluginFunctions::SENSOR_PLUGIN_COMMON_FUNCTIONS
SENSOR_PLUGIN_COMMON_FUNCTIONS
Definition: SensorPlugin.h:168
dwContextHandle_t
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:74
dwSensorPlugin_start
dwStatus(* dwSensorPlugin_start)(dwSensorPluginSensorHandle_t handle)
Starts the sensor previously successfully created with 'dwSensorPlugin_createSensor' interface.
Definition: SensorPlugin.h:74
dwSALHandle_t
struct dwSALObject * dwSALHandle_t
Handle representing the Sensor Abstraction Layer interface.
Definition: SensorTypes.h:39
dwSensorPluginFunctions
Function Table exposing sensor plugin functions.
Definition: SensorPlugin.h:166
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:27
dwSensorPlugin_release
dwStatus(* dwSensorPlugin_release)(dwSensorPluginSensorHandle_t handle)
Releases a sensor managed by the plugin module.
Definition: SensorPlugin.h:60
params
DW_API_PUBLIC dwPointCloudRangeImageCreatorParams const *const params
Definition: PointCloudRangeImageCreator.h:292
DW_API_PUBLIC
#define DW_API_PUBLIC
Definition: Exports.h:38