NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
SensorPlugin.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2023-2026 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>
25 
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
41 typedef void* dwSensorPluginSensorHandle_t;
43 
57  char const* params, dwContextHandle_t ctx);
58 
72 
87 
99 
113 
152 typedef dwStatus (*dwSensorPlugin_readRawData)(uint8_t const** data, size_t* size, dwTime_t* timestamp,
154 
170 
171 #define SENSOR_PLUGIN_COMMON_FUNCTIONS \
172  dwSensorPlugin_initializeHandle initializeHandle; \
173  dwSensorPlugin_release release; \
174  dwSensorPlugin_start start; \
175  dwSensorPlugin_stop stop; \
176  dwSensorPlugin_reset reset; \
177  dwSensorPlugin_readRawData readRawData; \
178  dwSensorPlugin_returnRawData returnRawData
179 
184 {
187 
206 dwStatus dwSAL_registerSensorPlugin(dwSensorType sensorType, char const* codecMimeType,
207  void const* funcTable, dwSALHandle_t const sal);
208 
211 #ifdef __cplusplus
212 }
213 #endif
214 #endif // DW_SENSORS_SENSORLIVE_SENSORPLUGIN_H
dwSensorPlugin_release
dwStatus(* dwSensorPlugin_release)(dwSensorPluginSensorHandle_t handle)
Releases a sensor managed by the plugin module.
Definition: SensorPlugin.h:71
Types.h
dwSensorPluginSensorHandle_t
void * dwSensorPluginSensorHandle_t
Plugin handle. Used in plugin public interfaces.
Definition: SensorPlugin.h:42
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:152
timestamp
const WFDPipeline const WFDSource const WFDTransition const WFDRect *const const WFDuint64 timestamp
Definition: wfdext.h:114
dwSensorPluginFunctions
struct dwSensorPluginFunctions dwSensorPluginFunctions
Function Table exposing sensor plugin functions.
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.
dwTime_t
int64_t dwTime_t
Definition: core/base/BasicTypes.h:65
dwSensorPlugin_reset
dwStatus(* dwSensorPlugin_reset)(dwSensorPluginSensorHandle_t handle)
Resets the sensor.
Definition: SensorPlugin.h:112
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:32
dwSensorType
dwSensorType
Defines the type of sensors that are available in DriveWorks.
Definition: SensorTypes.h:83
dwSensorPluginFunctions::SENSOR_PLUGIN_COMMON_FUNCTIONS
SENSOR_PLUGIN_COMMON_FUNCTIONS
Definition: SensorPlugin.h:185
dwContextHandle_t
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:81
dwSALHandle_t
struct dwSALObject * dwSALHandle_t
Handle representing the Sensor Abstraction Layer interface.
Definition: SensorTypes.h:40
dwSensorPluginFunctions
Function Table exposing sensor plugin functions.
Definition: SensorPlugin.h:183
SensorTypes.h
handle
const WFDCommitType const WFDHandle handle
Definition: wfdext.h:532
dwSensorPlugin_start
dwStatus(* dwSensorPlugin_start)(dwSensorPluginSensorHandle_t handle)
Starts the sensor previously successfully created with 'dwSensorPlugin_createSensor' interface.
Definition: SensorPlugin.h:86
dwSensorPlugin_returnRawData
dwStatus(* dwSensorPlugin_returnRawData)(uint8_t const *data, dwSensorPluginSensorHandle_t handle)
Returns RAW data to sensor as a byte array.
Definition: SensorPlugin.h:169
DW_API_PUBLIC
#define DW_API_PUBLIC
Definition: core/base/Exports.h:57
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
dwSensorPlugin_stop
dwStatus(* dwSensorPlugin_stop)(dwSensorPluginSensorHandle_t handle)
Stops the sensor.
Definition: SensorPlugin.h:98
Context.h