NVIDIA DRIVE OS Linux SDK API Reference

6.0.9 Release
NvSIPLCommon.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 
11 #ifndef NVSIPLCOMMON_HPP
12 #define NVSIPLCOMMON_HPP
13 
14 #include <memory>
15 #include <cmath>
16 
26 #define SIPL_TRUE (0 == 0)
27 
29 #define SIPL_FALSE (0 == 1)
30 
37 #define NVSIPL_GPIO_DEVICE_DESERIALIZER (static_cast<uint32_t>(1U) << 0U)
38 
39 #define NVSIPL_GPIO_DEVICE_SERIALIZER_0 (static_cast<uint32_t>(1U) << 8U)
40 
41 #define NVSIPL_GPIO_DEVICE_SERIALIZER_1 (static_cast<uint32_t>(1U) << 9U)
42 
43 #define NVSIPL_GPIO_DEVICE_SERIALIZER_2 (static_cast<uint32_t>(1U) << 10U)
44 
45 #define NVSIPL_GPIO_DEVICE_SERIALIZER_3 (static_cast<uint32_t>(1U) << 11U)
46 
47 #define NVSIPL_GPIO_DEVICE_SENSOR_0 (static_cast<uint32_t>(1U) << 16U)
48 
49 #define NVSIPL_GPIO_DEVICE_SENSOR_1 (static_cast<uint32_t>(1U) << 17U)
50 
51 #define NVSIPL_GPIO_DEVICE_SENSOR_2 (static_cast<uint32_t>(1U) << 18U)
52 
53 #define NVSIPL_GPIO_DEVICE_SENSOR_3 (static_cast<uint32_t>(1U) << 19U)
54 
55 #define NVSIPL_GPIO_DEVICE_INTR_ERR (static_cast<uint32_t>(1U) << 24U)
56 
57 #define NVSIPL_GPIO_DEVICE_INTR_ERR_GETSTATUS (static_cast<uint32_t>(1U) << 25U)
58 
62 #define NVSIPL_GPIO_DEVICE_SERIALIZER_SHIFT (8U)
63 
64 #define NVSIPL_GPIO_DEVICE_SENSOR_SHIFT (16U)
65 
69 namespace nvsipl
70 {
92 struct NvSiplRect {
94  uint16_t x0;
96  uint16_t y0;
98  uint16_t x1;
100  uint16_t y1;
101 };
102 
106 using NvSiplGlobalTime = uint64_t;
107 
111 struct NvSiplPoint {
113  int32_t x;
115  int32_t y;
116 };
117 
124  float_t x;
126  float_t y;
127 };
128 
133 using NvSiplBool = uint32_t;
134 
147 };
148 
151 {
152  // New status code must be added after NVSIPL_STATUS_OK and before NVSIPL_STATUS_ERROR.
153 
156 
157  // Error codes.
178 };
179 
182 {
204 };
205 
214  std::unique_ptr<uint8_t []> upErrorBuffer;
215 
219  size_t bufferSize;
220 
224  size_t sizeWritten;
225 };
226 
229 {
244 };
245 
248 } // namespace nvsipl
249 
250 #endif // NVSIPLCOMMON_HPP
nvsipl::NvSiplPointFloat::y
float_t y
Holds the vertical location of the point.
Definition: NvSIPLCommon.hpp:126
nvsipl::NVSIPL_STATUS_NOT_INITIALIZED
@ NVSIPL_STATUS_NOT_INITIALIZED
Indicates a module was not initialized.
Definition: NvSIPLCommon.hpp:173
nvsipl::NvSiplRect::x1
uint16_t x1
Right X co-ordinate.
Definition: NvSIPLCommon.hpp:98
nvsipl::NVSIPL_STATUS_ERROR
@ NVSIPL_STATUS_ERROR
Indicates an unspecified error that is used when no other error code applies.
Definition: NvSIPLCommon.hpp:177
nvsipl::NvSiplRect::y1
uint16_t y1
Bottom Y co-ordinate.
Definition: NvSIPLCommon.hpp:100
nvsipl::SIPLGpioEvent
SIPLGpioEvent
CDAC GPIO event codes.
Definition: NvSIPLCommon.hpp:181
nvsipl::SIPLModuleErrorReadFlag
SIPLModuleErrorReadFlag
Flag indicating which module errors to read.
Definition: NvSIPLCommon.hpp:228
nvsipl::SIPLErrorDetails::sizeWritten
size_t sizeWritten
Holds size of error written to the buffer, filled by driver.
Definition: NvSIPLCommon.hpp:224
nvsipl::NVSIPL_GPIO_EVENT_ERROR_BACKEND
@ NVSIPL_GPIO_EVENT_ERROR_BACKEND
An error occurred in backend code, potentially resulting in permanent loss of functionality.
Definition: NvSIPLCommon.hpp:198
nvsipl::SIPLErrorDetails
Error details for a particular device.
Definition: NvSIPLCommon.hpp:209
nvsipl::NVSIPL_STATUS_INVALID_STATE
@ NVSIPL_STATUS_INVALID_STATE
Indicates a module is in an invalid state.
Definition: NvSIPLCommon.hpp:169
nvsipl::NVSIPL_MODULE_ERROR_READ_ALL
@ NVSIPL_MODULE_ERROR_READ_ALL
Read both sensor and serializer error information when getting error details.
Definition: NvSIPLCommon.hpp:243
nvsipl::NVSIPL_GPIO_EVENT_ERROR_CAMGPIO
@ NVSIPL_GPIO_EVENT_ERROR_CAMGPIO
An error occurred in CAMGPIO code, potentially resulting in permanent loss of functionality.
Definition: NvSIPLCommon.hpp:193
nvsipl::NvSiplTimeBase
NvSiplTimeBase
Defines clock base for NvSiplTime.
Definition: NvSIPLCommon.hpp:137
nvsipl::NVSIPL_STATUS_OUT_OF_MEMORY
@ NVSIPL_STATUS_OUT_OF_MEMORY
Indicates an out of memory or other system resource error was encountered.
Definition: NvSIPLCommon.hpp:163
nvsipl::NVSIPL_STATUS_BAD_ARGUMENT
@ NVSIPL_STATUS_BAD_ARGUMENT
Indicates one or more invalid arguments was encountered.
Definition: NvSIPLCommon.hpp:159
nvsipl::NvSiplRect::x0
uint16_t x0
Left X co-ordinate.
Definition: NvSIPLCommon.hpp:94
nvsipl::NvSiplPoint::x
int32_t x
Holds the horizontal location of the point.
Definition: NvSIPLCommon.hpp:113
nvsipl::NvSiplPoint
Defines the location of a point on a two-dimensional object.
Definition: NvSIPLCommon.hpp:111
nvsipl::NVSIPL_GPIO_EVENT_INTR_TIMEOUT
@ NVSIPL_GPIO_EVENT_INTR_TIMEOUT
An interrupt timeout period has elapsed.
Definition: NvSIPLCommon.hpp:188
nvsipl::NvSiplGlobalTime
uint64_t NvSiplGlobalTime
Media global time, measured in microseconds.
Definition: NvSIPLCommon.hpp:106
nvsipl::NVSIPL_MODULE_ERROR_READ_SERIALIZER
@ NVSIPL_MODULE_ERROR_READ_SERIALIZER
Read only serializer error information when getting error details.
Definition: NvSIPLCommon.hpp:239
nvsipl::NVSIPL_STATUS_OK
@ NVSIPL_STATUS_OK
Indicates the operation completed successfully without errors.
Definition: NvSIPLCommon.hpp:155
nvsipl::SIPLStatus
SIPLStatus
Defines the status codes returned by functions in SIPL modules.
Definition: NvSIPLCommon.hpp:150
nvsipl::NVSIPL_GPIO_EVENT_NOTHING
@ NVSIPL_GPIO_EVENT_NOTHING
There is no pending event.
Definition: NvSIPLCommon.hpp:184
nvsipl::NVSIPL_GPIO_EVENT_INTR
@ NVSIPL_GPIO_EVENT_INTR
An interrupt has occured.
Definition: NvSIPLCommon.hpp:186
nvsipl::NvSiplRect
Holds a rectangular region of a surface.
Definition: NvSIPLCommon.hpp:92
nvsipl::SIPLErrorDetails::bufferSize
size_t bufferSize
Holds the maximum size of error data which can be contained in the buffer.
Definition: NvSIPLCommon.hpp:219
nvsipl::SIPLErrorDetails::upErrorBuffer
std::unique_ptr< uint8_t[]> upErrorBuffer
Buffer which will be filled by driver with error information.
Definition: NvSIPLCommon.hpp:214
nvsipl::NVSIPL_MODULE_ERROR_READ_SENSOR
@ NVSIPL_MODULE_ERROR_READ_SENSOR
Read only sensor error information when getting module error details.
Definition: NvSIPLCommon.hpp:234
nvsipl::NvSiplRect::y0
uint16_t y0
Top Y co-ordinate.
Definition: NvSIPLCommon.hpp:96
nvsipl::NVSIPL_TIME_BASE_CLOCK_MONOTONIC
@ NVSIPL_TIME_BASE_CLOCK_MONOTONIC
Specifies that kernel monotonic clock is used for base time calculation.
Definition: NvSIPLCommon.hpp:143
nvsipl::NvSiplPointFloat
Defines the float-precision location of a point on a two-dimensional object.
Definition: NvSIPLCommon.hpp:122
nvsipl::NVSIPL_STATUS_NOT_SUPPORTED
@ NVSIPL_STATUS_NOT_SUPPORTED
Indicates an unsupported operation or argument was encountered.
Definition: NvSIPLCommon.hpp:161
nvsipl::NVSIPL_STATUS_EOF
@ NVSIPL_STATUS_EOF
Indicates that end of file has been reached.
Definition: NvSIPLCommon.hpp:171
nvsipl::NvSiplPointFloat::x
float_t x
Holds the horizontal location of the point.
Definition: NvSIPLCommon.hpp:124
nvsipl::NvSiplBool
uint32_t NvSiplBool
A boolean value, holding SIPL_TRUE or SIPL_FALSE.
Definition: NvSIPLCommon.hpp:133
nvsipl::NvSiplPoint::y
int32_t y
Holds the vertical location of the point.
Definition: NvSIPLCommon.hpp:115
nvsipl::NVSIPL_TIME_BASE_CLOCK_PTP
@ NVSIPL_TIME_BASE_CLOCK_PTP
Specifies that PTP clock is used for base time calculation.
Definition: NvSIPLCommon.hpp:140
nvsipl
Contains the classes and variables for implementation of SIPL.
Definition: INvSiplControlAuto.hpp:33
nvsipl::NVSIPL_TIME_BASE_CLOCK_USER_DEFINED
@ NVSIPL_TIME_BASE_CLOCK_USER_DEFINED
Specifies that a user defined clock is used for base time calculation.
Definition: NvSIPLCommon.hpp:146
nvsipl::NVSIPL_STATUS_RESOURCE_ERROR
@ NVSIPL_STATUS_RESOURCE_ERROR
Indicates a resource error was encountered.
Definition: NvSIPLCommon.hpp:165
nvsipl::NVSIPL_GPIO_EVENT_ERROR_UNKNOWN
@ NVSIPL_GPIO_EVENT_ERROR_UNKNOWN
A generic error occurred, potentially resulting in permanent loss of functionality.
Definition: NvSIPLCommon.hpp:203
nvsipl::NVSIPL_STATUS_FAULT_STATE
@ NVSIPL_STATUS_FAULT_STATE
Indicates module is in non-recoverable fault state.
Definition: NvSIPLCommon.hpp:175
nvsipl::NVSIPL_STATUS_TIMED_OUT
@ NVSIPL_STATUS_TIMED_OUT
Indicates an operation timed out.
Definition: NvSIPLCommon.hpp:167