NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
NvSIPLCommon.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-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 
13 #ifndef NVSIPLCOMMON_HPP
14 #define NVSIPLCOMMON_HPP
15 
16 #include <cstdint>
17 #include <memory>
18 #include <cmath>
19 
30 #define SIPL_TRUE (0 == 0)
31 
33 #define SIPL_FALSE (0 == 1)
34 
44 #define NVSIPL_GPIO_DEVICE_DESERIALIZER (static_cast<uint32_t>(1U) << 0U)
45 
46 #define NVSIPL_GPIO_DEVICE_SERIALIZER_0 (static_cast<uint32_t>(1U) << 8U)
47 
48 #define NVSIPL_GPIO_DEVICE_SERIALIZER_1 (static_cast<uint32_t>(1U) << 9U)
49 
50 #define NVSIPL_GPIO_DEVICE_SERIALIZER_2 (static_cast<uint32_t>(1U) << 10U)
51 
52 #define NVSIPL_GPIO_DEVICE_SERIALIZER_3 (static_cast<uint32_t>(1U) << 11U)
53 
54 #define NVSIPL_GPIO_DEVICE_SENSOR_0 (static_cast<uint32_t>(1U) << 16U)
55 
56 #define NVSIPL_GPIO_DEVICE_SENSOR_1 (static_cast<uint32_t>(1U) << 17U)
57 
58 #define NVSIPL_GPIO_DEVICE_SENSOR_2 (static_cast<uint32_t>(1U) << 18U)
59 
60 #define NVSIPL_GPIO_DEVICE_SENSOR_3 (static_cast<uint32_t>(1U) << 19U)
61 
62 #define NVSIPL_GPIO_DEVICE_INTR_ERR (static_cast<uint32_t>(1U) << 24U)
63 
64 #define NVSIPL_GPIO_DEVICE_INTR_ERR_GETSTATUS (static_cast<uint32_t>(1U) << 25U)
65 
69 #define NVSIPL_GPIO_DEVICE_SERIALIZER_SHIFT (8U)
70 
71 #define NVSIPL_GPIO_DEVICE_SENSOR_SHIFT (16U)
72 
76 namespace nvsipl
77 {
97 struct NvSiplRect {
99  uint16_t x0;
101  uint16_t y0;
103  uint16_t x1;
105  uint16_t y1;
106 };
107 
111 using NvSiplGlobalTime = uint64_t;
112 
119 struct NvSiplPoint {
121  int32_t x;
123  int32_t y;
124 };
125 
135  float_t x;
137  float_t y;
138 };
139 
144 using NvSiplBool = uint32_t;
145 
151 enum NvSiplTimeBase : std::uint8_t {
161 };
162 
168 enum SIPLStatus : std::uint8_t
169 {
170  // New status code must be added after NVSIPL_STATUS_OK and before NVSIPL_STATUS_ERROR.
171 
174 
175  // Error codes.
196 };
197 
203 enum SIPLGpioEvent : std::uint8_t
204 {
228 };
229 
241  std::unique_ptr<uint8_t []> upErrorBuffer;
242 
246  size_t bufferSize;
247 
251  size_t sizeWritten;
252 };
253 
259 enum SIPLModuleErrorReadFlag : std::uint8_t
260 {
275 };
276 
279 } // namespace nvsipl
280 
281 #endif // NVSIPLCOMMON_HPP
nvsipl::NVSIPL_STATUS_FAULT_STATE
@ NVSIPL_STATUS_FAULT_STATE
Indicates module is in non-recoverable fault state.
Definition: NvSIPLCommon.hpp:193
nvsipl::NvSiplPointFloat::y
float_t y
Holds the vertical location of the point.
Definition: NvSIPLCommon.hpp:137
nvsipl::SIPLStatus
SIPLStatus
Defines the status codes returned by functions in NvSIPL modules.
Definition: NvSIPLCommon.hpp:168
nvsipl::NVSIPL_GPIO_EVENT_INTR
@ NVSIPL_GPIO_EVENT_INTR
An interrupt has occured.
Definition: NvSIPLCommon.hpp:208
nvsipl::NvSiplRect::x1
uint16_t x1
Right X co-ordinate.
Definition: NvSIPLCommon.hpp:103
nvsipl::NVSIPL_STATUS_INVALID_STATE
@ NVSIPL_STATUS_INVALID_STATE
Indicates a module is in an invalid state.
Definition: NvSIPLCommon.hpp:187
nvsipl::NVSIPL_STATUS_NOT_SUPPORTED
@ NVSIPL_STATUS_NOT_SUPPORTED
Indicates an unsupported operation or argument was encountered.
Definition: NvSIPLCommon.hpp:179
nvsipl::NvSiplRect::y1
uint16_t y1
Bottom Y co-ordinate.
Definition: NvSIPLCommon.hpp:105
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:160
nvsipl::NVSIPL_STATUS_OK
@ NVSIPL_STATUS_OK
Indicates the operation completed successfully without errors.
Definition: NvSIPLCommon.hpp:173
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:181
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:157
nvsipl::SIPLErrorDetails::sizeWritten
size_t sizeWritten
Holds size of error written to the buffer, filled by driver.
Definition: NvSIPLCommon.hpp:251
nvsipl::SIPLModuleErrorReadFlag
SIPLModuleErrorReadFlag
Flag indicating which module errors to read.
Definition: NvSIPLCommon.hpp:259
nvsipl::SIPLErrorDetails
Error details for a particular device.
Definition: NvSIPLCommon.hpp:236
nvsipl::NvSiplRect::x0
uint16_t x0
Left X co-ordinate.
Definition: NvSIPLCommon.hpp:99
nvsipl::NVSIPL_GPIO_EVENT_INTR_INJECTED
@ NVSIPL_GPIO_EVENT_INTR_INJECTED
A synthetic interrupt event is injected to continue fault handling when GPIO is stuck in fault state.
Definition: NvSIPLCommon.hpp:222
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:227
nvsipl::NvSiplPoint::x
int32_t x
Holds the horizontal location of the point.
Definition: NvSIPLCommon.hpp:121
nvsipl::NVSIPL_STATUS_TIMED_OUT
@ NVSIPL_STATUS_TIMED_OUT
Indicates an operation timed out.
Definition: NvSIPLCommon.hpp:185
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:220
nvsipl::SIPLGpioEvent
SIPLGpioEvent
CDAC GPIO event codes.
Definition: NvSIPLCommon.hpp:203
nvsipl::NvSiplPoint
Defines the location of a point on a two-dimensional object.
Definition: NvSIPLCommon.hpp:119
nvsipl::NVSIPL_STATUS_BAD_ARGUMENT
@ NVSIPL_STATUS_BAD_ARGUMENT
Indicates one or more invalid arguments was encountered.
Definition: NvSIPLCommon.hpp:177
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:215
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:274
nvsipl::NVSIPL_TIME_BASE_CLOCK_PTP
@ NVSIPL_TIME_BASE_CLOCK_PTP
Specifies that PTP clock is used for base time calculation.
Definition: NvSIPLCommon.hpp:154
nvsipl::NvSiplGlobalTime
uint64_t NvSiplGlobalTime
Media global time, measured in microseconds.
Definition: NvSIPLCommon.hpp:111
nvsipl::NvSiplRect
SIPL provides abstract and simple API to capture the output of image sensors with optional image proc...
Definition: NvSIPLCommon.hpp:97
nvsipl::SIPLErrorDetails::bufferSize
size_t bufferSize
Holds the maximum size of error data which can be contained in the buffer.
Definition: NvSIPLCommon.hpp:246
nvsipl::SIPLErrorDetails::upErrorBuffer
std::unique_ptr< uint8_t[]> upErrorBuffer
Buffer which will be filled by driver with error information.
Definition: NvSIPLCommon.hpp:241
nvsipl::NVSIPL_STATUS_EOF
@ NVSIPL_STATUS_EOF
Indicates that end of file has been reached.
Definition: NvSIPLCommon.hpp:189
nvsipl::NVSIPL_MODULE_ERROR_READ_SENSOR
@ NVSIPL_MODULE_ERROR_READ_SENSOR
Read only sensor error information when getting module error details.
Definition: NvSIPLCommon.hpp:265
nvsipl::NVSIPL_GPIO_EVENT_INTR_TIMEOUT
@ NVSIPL_GPIO_EVENT_INTR_TIMEOUT
An interrupt timeout period has elapsed.
Definition: NvSIPLCommon.hpp:210
nvsipl::NvSiplRect::y0
uint16_t y0
Top Y co-ordinate.
Definition: NvSIPLCommon.hpp:101
nvsipl::NvSiplBool
uint32_t NvSiplBool
A boolean value, holding SIPL_TRUE or SIPL_FALSE.
Definition: NvSIPLCommon.hpp:144
nvsipl::NvSiplPointFloat
Defines the float-precision location of a point on a two-dimensional object.
Definition: NvSIPLCommon.hpp:133
nvsipl::NVSIPL_STATUS_ERROR
@ NVSIPL_STATUS_ERROR
Indicates an unspecified error that is used when no other error code applies.
Definition: NvSIPLCommon.hpp:195
nvsipl::NvSiplPointFloat::x
float_t x
Holds the horizontal location of the point.
Definition: NvSIPLCommon.hpp:135
nvsipl::NVSIPL_MODULE_ERROR_READ_SERIALIZER
@ NVSIPL_MODULE_ERROR_READ_SERIALIZER
Read only serializer error information when getting error details.
Definition: NvSIPLCommon.hpp:270
nvsipl::NvSiplPoint::y
int32_t y
Holds the vertical location of the point.
Definition: NvSIPLCommon.hpp:123
nvsipl
Describes the custom interface for IMX623.
Definition: AR0820_CUST1_CustomInterface.hpp:21
nvsipl::NVSIPL_GPIO_EVENT_NOTHING
@ NVSIPL_GPIO_EVENT_NOTHING
There is no pending event.
Definition: NvSIPLCommon.hpp:206
nvsipl::NVSIPL_STATUS_NOT_INITIALIZED
@ NVSIPL_STATUS_NOT_INITIALIZED
Indicates a module was not initialized.
Definition: NvSIPLCommon.hpp:191
nvsipl::NVSIPL_STATUS_RESOURCE_ERROR
@ NVSIPL_STATUS_RESOURCE_ERROR
Indicates a resource error was encountered.
Definition: NvSIPLCommon.hpp:183
nvsipl::NvSiplTimeBase
NvSiplTimeBase
Defines clock base for NvSiplTime.
Definition: NvSIPLCommon.hpp:151