DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

SensorSerializer.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) 2016-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 
49 #ifndef DW_SENSORS_SENSORSERIALIZER_H_
50 #define DW_SENSORS_SENSORSERIALIZER_H_
51 
52 #include <dw/core/Config.h>
53 #include <dw/core/Exports.h>
54 #include <dw/core/Types.h>
55 #include <dw/core/Context.h>
56 
57 #include <dw/sensors/Sensors.h>
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
69 typedef void (*dwSensorSerializerOnDataFunc_t)(const uint8_t* data, size_t size, void* userData);
70 
72 typedef struct dwSensorSerializerObject* dwSensorSerializerHandle_t;
73 
76 typedef struct dwSerializerParams
77 {
102 
105 
107  void* userData;
109 
127 dwStatus dwSensorSerializer_initialize(dwSensorSerializerHandle_t* const serializer,
128  dwSerializerParams const* const params,
129  dwSensorHandle_t const sensor);
130 
148 dwStatus dwSensorSerializer_release(dwSensorSerializerHandle_t const serializer);
149 
168 dwStatus dwSensorSerializer_attachTo(dwSensorSerializerHandle_t const serializer,
169  dwSensorSerializerHandle_t const masterSerializer);
170 
183 dwStatus dwSensorSerializer_isAttached(bool* const isAttached, dwSensorSerializerHandle_t const serializer);
184 
206 dwStatus dwSensorSerializer_detachFrom(dwSensorSerializerHandle_t const serializer,
207  dwSensorSerializerHandle_t const masterSerializer);
208 
224 dwStatus dwSensorSerializer_start(dwSensorSerializerHandle_t const serializer);
225 
238 dwStatus dwSensorSerializer_stop(dwSensorSerializerHandle_t const serializer);
239 
254 dwStatus dwSensorSerializer_serializeData(uint8_t const* const data, size_t const size,
255  dwSensorSerializerHandle_t const serializer);
256 
274 dwStatus dwSensorSerializer_serializeDataAsync(uint8_t const* const data, size_t const size,
275  dwSensorSerializerHandle_t const serializer);
276 
290 dwStatus
292  dwSensorSerializerHandle_t const serializer);
293 
307  dwSensorSerializerHandle_t const serializer);
308 
309 #ifdef __cplusplus
310 }
311 #endif
312 
314 #endif // DW_SENSORS_SENSORSERIALIZER_H_
NVIDIA DriveWorks API: Core Types
DW_API_PUBLIC dwStatus dwSensorSerializer_stop(dwSensorSerializerHandle_t const serializer)
Starts serialization of sensor.
NVIDIA DriveWorks API: Cameras
struct dwSensorSerializerObject * dwSensorSerializerHandle_t
Handle representing a sensor serializer.
DW_API_PUBLIC dwStatus dwSensorSerializer_start(dwSensorSerializerHandle_t const serializer)
Starts serialization of sensor.
dwSensorSerializerOnDataFunc_t onData
Callback executed by the serializer on new data available.
const char8_t * parameters
Array for additional parameters provided to sensor serializer creation.
NVIDIA DriveWorks API: Core Methods
Holds the parameters for sensor serializer creation.
void(* dwSensorSerializerOnDataFunc_t)(const uint8_t *data, size_t size, void *userData)
Callback type for getting data from sensor serializer.
DW_API_PUBLIC dwStatus dwSensorSerializer_isAttached(bool *const isAttached, dwSensorSerializerHandle_t const serializer)
Query method to check whether the serializer is attached to another.
DW_API_PUBLIC dwStatus dwSensorSerializer_release(dwSensorSerializerHandle_t const serializer)
Releases a sensor serializer.
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:88
dwStatus
Status definition.
Definition: Status.h:178
NVIDIA DriveWorks API: Sensors
void * userData
User data to be passed to the callback.
DW_API_PUBLIC dwStatus dwSensorSerializer_serializeCameraFrameAsync(dwCameraFrameHandle_t const frame, dwSensorSerializerHandle_t const serializer)
Pushes a camera frame to the serializer.
DW_API_PUBLIC dwStatus dwSensorSerializer_detachFrom(dwSensorSerializerHandle_t const serializer, dwSensorSerializerHandle_t const masterSerializer)
This method detaches the serializer previously attached with dwSensorSerializer_attachTo().
struct dwCameraFrame * dwCameraFrameHandle_t
Handle to captured frame.
Definition: Camera.h:75
char char8_t
Definition: Types.h:72
NVIDIA DriveWorks API: Core Exports
DW_API_PUBLIC dwStatus dwSensorSerializer_serializeCameraFrame(dwCameraFrameHandle_t const frame, dwSensorSerializerHandle_t const serializer)
Pushes a camera frame to the serializer.This method must only be used if &#39;dwSensorSerializer_start&#39; i...
DW_API_PUBLIC dwStatus dwSensorSerializer_serializeDataAsync(uint8_t const *const data, size_t const size, dwSensorSerializerHandle_t const serializer)
Pushes data to the serializer.
DW_API_PUBLIC dwStatus dwSensorSerializer_serializeData(uint8_t const *const data, size_t const size, dwSensorSerializerHandle_t const serializer)
Pushes data to the serializer.
#define DW_API_PUBLIC
Definition: Exports.h:56
DW_API_PUBLIC dwStatus dwSensorSerializer_attachTo(dwSensorSerializerHandle_t const serializer, dwSensorSerializerHandle_t const masterSerializer)
Starts and stops serialization of a sensor with a master serializer.
DW_API_PUBLIC dwStatus dwSensorSerializer_initialize(dwSensorSerializerHandle_t *const serializer, dwSerializerParams const *const params, dwSensorHandle_t const sensor)
Initializes a sensor serializer with the parameters provided.