DriveWorks SDK Reference

| 0.6.67 Release

Data.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) 2017 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 
45 #ifndef DW_SENSORS_DATA_DATA_H__
46 #define DW_SENSORS_DATA_DATA_H__
47 
48 #include <dw/core/Config.h>
49 #include <dw/core/Types.h>
50 
51 #include <dw/sensors/Sensors.h>
52 
53 #pragma pack(push,1) // Make sure we have consistent structure packings
54 
55 // maximum size of tranferred chunk in bytes
56 static const uint32_t DW_DATA_SENSOR_MAX_MEMORY_CHUNK_SIZE = 4096;
57 
58 typedef struct {
59  uint32_t size;
60  uint64_t timestamp;
61  const void *data;
62 } dwDataPacket;
63 
64 
65 #pragma pack(pop)
66 
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70 
91 dwStatus dwSensorData_readPacket(const dwDataPacket **packet, dwTime_t timeout_us,
92  dwSensorHandle_t sensor);
93 
108 
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
115 #endif // DW_SENSORS_DATA_DATA_H__
NVIDIA DriveWorks API: Core Types
const void * data
Definition: Data.h:61
DW_API_PUBLIC dwStatus dwSensorData_readPacket(const dwDataPacket **packet, dwTime_t timeout_us, dwSensorHandle_t sensor)
Reads one data chunk.
uint64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:89
DW_API_PUBLIC dwStatus dwSensorData_returnPacket(const dwDataPacket *packet, dwSensorHandle_t sensor)
Returns the data read to the internal pool.
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:80
dwStatus
Status definition.
Definition: Status.h:167
NVIDIA DriveWorks API: Sensors
uint32_t size
Definition: Data.h:59
static const uint32_t DW_DATA_SENSOR_MAX_MEMORY_CHUNK_SIZE
Definition: Data.h:56
uint64_t timestamp
Definition: Data.h:60
#define DW_API_PUBLIC
Definition: Exports.h:76