Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • NVIDIA DRIVE OS Linux SDK API Reference

    6.0.10.0 Release
    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    NvSIPLCommon.hpp
    Go to the documentation of this file.
    1 /*
    2  * SPDX-FileCopyrightText: Copyright (c) 2018-2024 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 <memory>
    17 #include <cmath>
    18 
    28 #define SIPL_TRUE (0 == 0)
    29 
    31 #define SIPL_FALSE (0 == 1)
    32 
    39 #define NVSIPL_GPIO_DEVICE_DESERIALIZER (static_cast<uint32_t>(1U) << 0U)
    40 
    41 #define NVSIPL_GPIO_DEVICE_SERIALIZER_0 (static_cast<uint32_t>(1U) << 8U)
    42 
    43 #define NVSIPL_GPIO_DEVICE_SERIALIZER_1 (static_cast<uint32_t>(1U) << 9U)
    44 
    45 #define NVSIPL_GPIO_DEVICE_SERIALIZER_2 (static_cast<uint32_t>(1U) << 10U)
    46 
    47 #define NVSIPL_GPIO_DEVICE_SERIALIZER_3 (static_cast<uint32_t>(1U) << 11U)
    48 
    49 #define NVSIPL_GPIO_DEVICE_SENSOR_0 (static_cast<uint32_t>(1U) << 16U)
    50 
    51 #define NVSIPL_GPIO_DEVICE_SENSOR_1 (static_cast<uint32_t>(1U) << 17U)
    52 
    53 #define NVSIPL_GPIO_DEVICE_SENSOR_2 (static_cast<uint32_t>(1U) << 18U)
    54 
    55 #define NVSIPL_GPIO_DEVICE_SENSOR_3 (static_cast<uint32_t>(1U) << 19U)
    56 
    57 #define NVSIPL_GPIO_DEVICE_INTR_ERR (static_cast<uint32_t>(1U) << 24U)
    58 
    59 #define NVSIPL_GPIO_DEVICE_INTR_ERR_GETSTATUS (static_cast<uint32_t>(1U) << 25U)
    60 
    64 #define NVSIPL_GPIO_DEVICE_SERIALIZER_SHIFT (8U)
    65 
    66 #define NVSIPL_GPIO_DEVICE_SENSOR_SHIFT (16U)
    67 
    71 namespace nvsipl
    72 {
    94 struct NvSiplRect {
    96  uint16_t x0;
    98  uint16_t y0;
    100  uint16_t x1;
    102  uint16_t y1;
    103 };
    104 
    108 using NvSiplGlobalTime = uint64_t;
    109 
    113 struct NvSiplPoint {
    115  int32_t x;
    117  int32_t y;
    118 };
    119 
    126  float_t x;
    128  float_t y;
    129 };
    130 
    135 using NvSiplBool = uint32_t;
    136 
    139 enum NvSiplTimeBase : std::uint8_t {
    149 };
    150 
    152 enum SIPLStatus : std::uint8_t
    153 {
    154  // New status code must be added after NVSIPL_STATUS_OK and before NVSIPL_STATUS_ERROR.
    155 
    158 
    159  // Error codes.
    180 };
    181 
    183 enum SIPLGpioEvent : std::uint8_t
    184 {
    206 };
    207 
    216  std::unique_ptr<uint8_t []> upErrorBuffer;
    217 
    221  size_t bufferSize;
    222 
    226  size_t sizeWritten;
    227 };
    228 
    230 enum SIPLModuleErrorReadFlag : std::uint8_t
    231 {
    246 };
    247 
    250 } // namespace nvsipl
    251 
    252 #endif // NVSIPLCOMMON_HPP
    nvsipl::NvSiplPointFloat::y
    float_t y
    Holds the vertical location of the point.
    Definition: NvSIPLCommon.hpp:128
    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:148
    nvsipl::NvSiplRect::x1
    uint16_t x1
    Right X co-ordinate.
    Definition: NvSIPLCommon.hpp:100
    nvsipl::NVSIPL_MODULE_ERROR_READ_SERIALIZER
    @ NVSIPL_MODULE_ERROR_READ_SERIALIZER
    Read only serializer error information when getting error details.
    Definition: NvSIPLCommon.hpp:241
    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:245
    nvsipl::SIPLModuleErrorReadFlag
    SIPLModuleErrorReadFlag
    Flag indicating which module errors to read.
    Definition: NvSIPLCommon.hpp:230
    nvsipl::NVSIPL_STATUS_NOT_SUPPORTED
    @ NVSIPL_STATUS_NOT_SUPPORTED
    Indicates an unsupported operation or argument was encountered.
    Definition: NvSIPLCommon.hpp:163
    nvsipl::NVSIPL_STATUS_INVALID_STATE
    @ NVSIPL_STATUS_INVALID_STATE
    Indicates a module is in an invalid state.
    Definition: NvSIPLCommon.hpp:171
    nvsipl::NvSiplRect::y1
    uint16_t y1
    Bottom Y co-ordinate.
    Definition: NvSIPLCommon.hpp:102
    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:195
    nvsipl::SIPLErrorDetails::sizeWritten
    size_t sizeWritten
    Holds size of error written to the buffer, filled by driver.
    Definition: NvSIPLCommon.hpp:226
    nvsipl::NVSIPL_STATUS_OK
    @ NVSIPL_STATUS_OK
    Indicates the operation completed successfully without errors.
    Definition: NvSIPLCommon.hpp:157
    nvsipl::SIPLErrorDetails
    Error details for a particular device.
    Definition: NvSIPLCommon.hpp:211
    nvsipl::NvSiplRect::x0
    uint16_t x0
    Left X co-ordinate.
    Definition: NvSIPLCommon.hpp:96
    nvsipl::NVSIPL_STATUS_RESOURCE_ERROR
    @ NVSIPL_STATUS_RESOURCE_ERROR
    Indicates a resource error was encountered.
    Definition: NvSIPLCommon.hpp:167
    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:165
    nvsipl::NvSiplPoint::x
    int32_t x
    Holds the horizontal location of the point.
    Definition: NvSIPLCommon.hpp:115
    nvsipl::SIPLStatus
    SIPLStatus
    Defines the status codes returned by functions in SIPL modules.
    Definition: NvSIPLCommon.hpp:152
    nvsipl::NvSiplPoint
    Defines the location of a point on a two-dimensional object.
    Definition: NvSIPLCommon.hpp:113
    nvsipl::NVSIPL_STATUS_ERROR
    @ NVSIPL_STATUS_ERROR
    Indicates an unspecified error that is used when no other error code applies.
    Definition: NvSIPLCommon.hpp:179
    nvsipl::NvSiplGlobalTime
    uint64_t NvSiplGlobalTime
    Media global time, measured in microseconds.
    Definition: NvSIPLCommon.hpp:108
    nvsipl::NVSIPL_GPIO_EVENT_NOTHING
    @ NVSIPL_GPIO_EVENT_NOTHING
    There is no pending event.
    Definition: NvSIPLCommon.hpp:186
    nvsipl::NVSIPL_STATUS_EOF
    @ NVSIPL_STATUS_EOF
    Indicates that end of file has been reached.
    Definition: NvSIPLCommon.hpp:173
    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:205
    nvsipl::NVSIPL_STATUS_NOT_INITIALIZED
    @ NVSIPL_STATUS_NOT_INITIALIZED
    Indicates a module was not initialized.
    Definition: NvSIPLCommon.hpp:175
    nvsipl::NVSIPL_STATUS_TIMED_OUT
    @ NVSIPL_STATUS_TIMED_OUT
    Indicates an operation timed out.
    Definition: NvSIPLCommon.hpp:169
    nvsipl::NvSiplRect
    Holds a rectangular region of a surface.
    Definition: NvSIPLCommon.hpp:94
    nvsipl::SIPLErrorDetails::bufferSize
    size_t bufferSize
    Holds the maximum size of error data which can be contained in the buffer.
    Definition: NvSIPLCommon.hpp:221
    nvsipl::NVSIPL_GPIO_EVENT_INTR
    @ NVSIPL_GPIO_EVENT_INTR
    An interrupt has occured.
    Definition: NvSIPLCommon.hpp:188
    nvsipl::SIPLErrorDetails::upErrorBuffer
    std::unique_ptr< uint8_t[]> upErrorBuffer
    Buffer which will be filled by driver with error information.
    Definition: NvSIPLCommon.hpp:216
    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:145
    nvsipl::NVSIPL_TIME_BASE_CLOCK_PTP
    @ NVSIPL_TIME_BASE_CLOCK_PTP
    Specifies that PTP clock is used for base time calculation.
    Definition: NvSIPLCommon.hpp:142
    nvsipl::SIPLGpioEvent
    SIPLGpioEvent
    CDAC GPIO event codes.
    Definition: NvSIPLCommon.hpp:183
    nvsipl::NvSiplRect::y0
    uint16_t y0
    Top Y co-ordinate.
    Definition: NvSIPLCommon.hpp:98
    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:200
    nvsipl::NvSiplPointFloat
    Defines the float-precision location of a point on a two-dimensional object.
    Definition: NvSIPLCommon.hpp:124
    nvsipl::NvSiplPointFloat::x
    float_t x
    Holds the horizontal location of the point.
    Definition: NvSIPLCommon.hpp:126
    nvsipl::NvSiplBool
    uint32_t NvSiplBool
    A boolean value, holding SIPL_TRUE or SIPL_FALSE.
    Definition: NvSIPLCommon.hpp:135
    nvsipl::NvSiplPoint::y
    int32_t y
    Holds the vertical location of the point.
    Definition: NvSIPLCommon.hpp:117
    nvsipl::NvSiplTimeBase
    NvSiplTimeBase
    Defines clock base for NvSiplTime.
    Definition: NvSIPLCommon.hpp:139
    nvsipl
    Contains the classes and variables for implementation of SIPL.
    Definition: INvSiplControlAuto.hpp:35
    nvsipl::NVSIPL_GPIO_EVENT_INTR_TIMEOUT
    @ NVSIPL_GPIO_EVENT_INTR_TIMEOUT
    An interrupt timeout period has elapsed.
    Definition: NvSIPLCommon.hpp:190
    nvsipl::NVSIPL_STATUS_FAULT_STATE
    @ NVSIPL_STATUS_FAULT_STATE
    Indicates module is in non-recoverable fault state.
    Definition: NvSIPLCommon.hpp:177
    nvsipl::NVSIPL_STATUS_BAD_ARGUMENT
    @ NVSIPL_STATUS_BAD_ARGUMENT
    Indicates one or more invalid arguments was encountered.
    Definition: NvSIPLCommon.hpp:161
    nvsipl::NVSIPL_MODULE_ERROR_READ_SENSOR
    @ NVSIPL_MODULE_ERROR_READ_SENSOR
    Read only sensor error information when getting module error details.
    Definition: NvSIPLCommon.hpp:236
    人人超碰97caoporen国产