DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

SensorCommonPlugin.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed
3 // under the Mutual Non-Disclosure Agreement.
4 //
5 // Notice
6 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
8 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10 //
11 // NVIDIA Corporation assumes no responsibility for the consequences of use of such
12 // information or for any infringement of patents or other rights of third parties that may
13 // result from its use. No license is granted by implication or otherwise under any patent
14 // or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15 // expressly authorized by NVIDIA. Details are subject to change without notice.
16 // This code supersedes and replaces all information previously supplied.
17 // NVIDIA Corporation products are not authorized for use as critical
18 // components in life support devices or systems without express written approval of
19 // NVIDIA Corporation.
20 //
21 // Copyright (c) 2019-2020 NVIDIA Corporation. All rights reserved.
22 //
23 // NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24 // rights in and to this software and related documentation and any modifications thereto.
25 // Any use, reproduction, disclosure or distribution of this software and related
26 // documentation without an express license agreement from NVIDIA Corporation is
27 // strictly prohibited.
28 //
30 
38 #ifndef DW_SENSORS_COMMON_PLUGIN_H
39 #define DW_SENSORS_COMMON_PLUGIN_H
40 
41 #include <dw/core/Types.h>
42 #include <dw/core/Context.h>
43 
44 #include <dw/sensors/Sensors.h>
45 
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74 
76 
78 typedef struct
79 {
81  size_t packetSize;
83 
96 typedef dwStatus (*dwSensorPlugin_createHandle)(dwSensorPluginSensorHandle_t* handle,
97  dwSensorPluginProperties* properties,
98  const char* params, dwContextHandle_t ctx);
99 
111 typedef dwStatus (*dwSensorPlugin_release)(dwSensorPluginSensorHandle_t handle);
112 
126 typedef dwStatus (*dwSensorPlugin_createSensor)(const char* params, dwSALHandle_t sal, dwSensorPluginSensorHandle_t handle);
127 
140 typedef dwStatus (*dwSensorPlugin_start)(dwSensorPluginSensorHandle_t handle);
141 
151 typedef dwStatus (*dwSensorPlugin_stop)(dwSensorPluginSensorHandle_t handle);
152 
164 typedef dwStatus (*dwSensorPlugin_reset)(dwSensorPluginSensorHandle_t handle);
165 
212 typedef dwStatus (*dwSensorPlugin_readRawData)(const uint8_t** data, size_t* size, dwTime_t* timestamp,
213  dwTime_t timeout_us, dwSensorPluginSensorHandle_t handle);
214 
228 typedef dwStatus (*dwSensorPlugin_returnRawData)(const uint8_t* data, dwSensorPluginSensorHandle_t handle);
229 
250 typedef dwStatus (*dwSensorPlugin_pushData)(size_t* lenPushed, const uint8_t* data, const size_t size, dwSensorPluginSensorHandle_t handle);
251 
253 typedef struct
254 {
265 
268 #ifdef __cplusplus
269 }
270 #endif
271 
272 #endif
dwStatus(* dwSensorPlugin_start)(dwSensorPluginSensorHandle_t handle)
Starts the sensor previously successfully created with &#39;dwSensorPlugin_createSensor&#39; interface...
dwStatus(* dwSensorPlugin_reset)(dwSensorPluginSensorHandle_t handle)
Resets the sensor.
dwSensorPlugin_createSensor createSensor
NVIDIA DriveWorks API: Core Types
void * dwSensorPluginSensorHandle_t
dwStatus(* dwSensorPlugin_release)(dwSensorPluginSensorHandle_t handle)
Releases a sensor managed by the plugin module.
dwStatus(* dwSensorPlugin_pushData)(size_t *lenPushed, const uint8_t *data, const size_t size, dwSensorPluginSensorHandle_t handle)
Pushes raw data obtained from a previous &#39;dwSensorPlugin_readRawData&#39; call for decoding.
NVIDIA DriveWorks API: Core Methods
dwStatus(* dwSensorPlugin_stop)(dwSensorPluginSensorHandle_t handle)
Stops the sensor.
dwSensorPlugin_createHandle createHandle
dwSensorPlugin_release release
dwStatus(* dwSensorPlugin_createHandle)(dwSensorPluginSensorHandle_t *handle, dwSensorPluginProperties *properties, const char *params, dwContextHandle_t ctx)
Creates a new handle to the sensor managed by the plugin module.
dwStatus
Status definition.
Definition: Status.h:178
NVIDIA DriveWorks API: Sensors
dwSensorPlugin_readRawData readRawData
dwStatus(* dwSensorPlugin_returnRawData)(const uint8_t *data, dwSensorPluginSensorHandle_t handle)
Returns RAW data to sensor as a byte array.
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
dwStatus(* dwSensorPlugin_createSensor)(const char *params, dwSALHandle_t sal, dwSensorPluginSensorHandle_t handle)
Creates and initializes a new sensor managed by the plugin.
dwSensorPlugin_pushData pushData
Function Table exposing common plugin functions.
dwSensorPlugin_returnRawData returnRawData
struct dwSALObject * dwSALHandle_t
Handle representing the Sensor Abstraction Layer interface.
Definition: Sensors.h:85
Structure for generic constants returned by the plugin.
dwStatus(* dwSensorPlugin_readRawData)(const uint8_t **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.
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
size_t packetSize
Packet size for each raw data message.