• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • NVIDIA DRIVE OS Linux SDK API Reference

    6.0.9 Release
    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    NvSIPLCamera.hpp
    Go to the documentation of this file.
    1 /*
    2  * SPDX-FileCopyrightText: Copyright (c) 2018-2023 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 #ifndef NVSIPLCAMERA_HPP
    13 #define NVSIPLCAMERA_HPP
    14 
    15 #include "NvSIPLCommon.hpp"
    16 #include "NvSIPLPlatformCfg.hpp"
    17 #include "NvSIPLPipelineMgr.hpp"
    18 #include "INvSiplControlAuto.hpp"
    19 #include "NvSIPLClient.hpp"
    20 #include "INvSIPLDeviceInterfaceProvider.hpp"
    21 
    22 #include "nvscisync.h"
    23 #include "nvscistream.h"
    24 #include "nvscibuf.h"
    25 
    26 #include <cstdint>
    27 #include <memory>
    28 #include <vector>
    29 
    44 namespace nvsipl
    45 {
    46 
    51 #if !NV_IS_SAFETY
    52 static constexpr size_t NITO_PARAMETER_SET_ID_SIZE {16U};
    53 static constexpr size_t NITO_SCHEMA_HASH_SIZE {32U};
    54 static constexpr size_t NITO_DATA_HASH_SIZE {32U};
    55 
    61 {
    62  uint8_t parameterSetID[NITO_PARAMETER_SET_ID_SIZE]; //< Identifier of the parameter set
    63  uint8_t schemaHash[NITO_SCHEMA_HASH_SIZE]; //< Hash value of the parameter set schema
    64  uint8_t dataHash[NITO_DATA_HASH_SIZE]; //< Hash value of parameter values
    65 };
    66 
    105 SIPLStatus GetNitoMetadataFromMemory(uint8_t const *const nitoMem,
    106  size_t const nitoMemLength,
    107  NvSIPLNitoMetadata *const metadataArray,
    108  size_t const metadataArrayLength,
    109  size_t *const metadataCount);
    110 
    111 #endif // NV_IS_SAFETY
    112 
    113 typedef enum
    114 {
    118  /* For a given SyncObj SIPL acts as a waiter. This type corresponds to
    119  * prefences to SIPL */
    122 
    126 typedef enum {
    132 
    133 
    142 {
    143  public:
    171  static std::unique_ptr<INvSIPLCamera> GetInstance();
    172 
    204  virtual SIPLStatus SetPlatformCfg(PlatformCfg const* const platformConfig) = 0;
    205 
    240  virtual SIPLStatus SetPlatformCfg(PlatformCfg const* const platformConfig, NvSIPLDeviceBlockQueues &queues) = 0;
    241 
    271  virtual SIPLStatus SetPipelineCfg(uint32_t const index,
    272  NvSIPLPipelineConfiguration const &pipelineCfg,
    273  NvSIPLPipelineQueues& queues) = 0;
    274 
    306  virtual SIPLStatus RegisterAutoControlPlugin(uint32_t const index,
    307  PluginType type,
    308  ISiplControlAuto *const autoControl,
    309  std::vector<uint8_t> const &blob) = 0;
    310 
    338  virtual SIPLStatus Init() = 0;
    339 
    340 #if !NV_IS_SAFETY
    341 
    376  virtual SIPLStatus SetSensorCharMode(uint32_t const index, uint8_t expNo) = 0;
    377 #endif // !NV_IS_SAFETY
    378 
    471  virtual SIPLStatus GetImageAttributes(uint32_t const index,
    473  NvSciBufAttrList &imageAttr) = 0;
    474 
    507  virtual SIPLStatus ReadEEPROMData(uint32_t const index,
    508  uint16_t const address,
    509  uint32_t const length,
    510  uint8_t * const buffer) = 0;
    511 
    608  virtual SIPLStatus RegisterImages(uint32_t const index,
    610  std::vector<NvSciBufObj> const &images) = 0;
    611 
    639  virtual SIPLStatus Start() = 0;
    640 
    667  virtual SIPLStatus Stop() = 0;
    668 
    698  virtual SIPLStatus Deinit() = 0;
    699 
    733  virtual SIPLStatus GetMaxErrorSize(uint32_t const devBlkIndex,
    734  size_t & maxErrorSize) = 0;
    735 
    771  virtual SIPLStatus GetErrorGPIOEventInfo(uint32_t const devBlkIndex,
    772  uint32_t const gpioIndex,
    773  SIPLGpioEvent &event) = 0;
    774 
    818  virtual SIPLStatus GetDeserializerErrorInfo(uint32_t const devBlkIndex,
    819  SIPLErrorDetails * const deserializerErrorInfo,
    820  bool & isRemoteError,
    821  uint8_t& linkErrorMask) = 0;
    822 
    871  virtual SIPLStatus GetModuleErrorInfo(uint32_t const index,
    872  SIPLErrorDetails * const serializerErrorInfo,
    873  SIPLErrorDetails * const sensorErrorInfo,
    874  SIPLModuleErrorReadFlag const errorsToRead
    876 
    906  virtual SIPLStatus DisableLink(uint32_t const index) = 0;
    907 
    939  virtual SIPLStatus EnableLink(uint32_t const index, bool const resetModule) = 0;
    940 
    941 #if !NV_IS_SAFETY
    942 
    971  virtual SIPLStatus ToggleLED(uint32_t const index, bool enable) = 0;
    972 #endif // !NV_IS_SAFETY
    973 
    975  virtual ~INvSIPLCamera() = default;
    976 
    977  // copy constructor
    978  INvSIPLCamera(INvSIPLCamera& other) = delete;
    979 
    980  // copy assignment operator.
    981  INvSIPLCamera& operator=(INvSIPLCamera& other) & = delete;
    982 
    983  // move constructor
    984  INvSIPLCamera(INvSIPLCamera&& other) = delete;
    985 
    986  // move assignment operator.
    987  INvSIPLCamera& operator=(INvSIPLCamera&& other) & = delete;
    988 
    1038  virtual SIPLStatus FillNvSciSyncAttrList(uint32_t const index,
    1040  NvSciSyncAttrList const attrList,
    1041  NvSiplNvSciSyncClientType const clientType) = 0;
    1042 
    1071  virtual SIPLStatus RegisterNvSciSyncObj(uint32_t const index,
    1073  NvSiplNvSciSyncObjType const syncobjtype,
    1074  NvSciSyncObj const syncobj) = 0;
    1075 
    1076 
    1077 
    1109  virtual SIPLStatus GetDeserializerInterfaceProvider(uint32_t const devBlkIndex,
    1110  IInterfaceProvider *&interfaceProvider) = 0;
    1111 
    1144  virtual SIPLStatus GetModuleInterfaceProvider(uint32_t const index,
    1145  IInterfaceProvider *&interfaceProvider) = 0;
    1146 
    1147 protected:
    1148  // Default constructor declared in order to allow construction of derived objects.
    1149  INvSIPLCamera() = default;
    1150 
    1151 }; // INvSIPLCamera
    1152 
    1154 } // namespace nvsipl
    1155 
    1156 
    1157 
    1158 #endif // NVSIPLCAMERA_HPP
    NvSIPLClient.hpp
    NVIDIA SIPL: Client Interface - NvSIPL Client
    nvsipl::INvSIPLCamera::GetDeserializerInterfaceProvider
    virtual SIPLStatus GetDeserializerInterfaceProvider(uint32_t const devBlkIndex, IInterfaceProvider *&interfaceProvider)=0
    Retrieve custom interface provider for deserializer.
    nvsipl::INvSIPLCamera::GetMaxErrorSize
    virtual SIPLStatus GetMaxErrorSize(uint32_t const devBlkIndex, size_t &maxErrorSize)=0
    Get maximum size of error information.
    INvSiplControlAuto.hpp
    NVIDIA SIPL: Auto Control Interface - SIPL Auto Control
    nvsipl::INvSIPLCamera::FillNvSciSyncAttrList
    virtual SIPLStatus FillNvSciSyncAttrList(uint32_t const index, INvSIPLClient::ConsumerDesc::OutputType const outType, NvSciSyncAttrList const attrList, NvSiplNvSciSyncClientType const clientType)=0
    Fill an NvSciSyncAttrList.
    nvsipl::INvSIPLCamera::GetImageAttributes
    virtual SIPLStatus GetImageAttributes(uint32_t const index, INvSIPLClient::ConsumerDesc::OutputType const outType, NvSciBufAttrList &imageAttr)=0
    Get image attributes.
    nvsipl::INvSIPLCamera::RegisterNvSciSyncObj
    virtual SIPLStatus RegisterNvSciSyncObj(uint32_t const index, INvSIPLClient::ConsumerDesc::OutputType const outType, NvSiplNvSciSyncObjType const syncobjtype, NvSciSyncObj const syncobj)=0
    Register an NvSciSyncObj.
    nvsipl::INvSIPLCamera::SetPipelineCfg
    virtual SIPLStatus SetPipelineCfg(uint32_t const index, NvSIPLPipelineConfiguration const &pipelineCfg, NvSIPLPipelineQueues &queues)=0
    Set a pipeline configuration.
    nvsipl::SIPL_WAITER
    @ SIPL_WAITER
    Definition: NvSIPLCamera.hpp:120
    nvsipl::INvSIPLCamera::Stop
    virtual SIPLStatus Stop()=0
    Stop streaming from all sensors in the selected platform configuration.
    nvsipl::INvSIPLCamera::GetInstance
    static std::unique_ptr< INvSIPLCamera > GetInstance()
    Get a handle to an INvSIPLCamera instance.
    nvsipl::INvSIPLCamera::RegisterAutoControlPlugin
    virtual SIPLStatus RegisterAutoControlPlugin(uint32_t const index, PluginType type, ISiplControlAuto *const autoControl, std::vector< uint8_t > const &blob)=0
    Register the Auto Control plugin to be used for a specific pipeline.
    nvsipl::SIPLGpioEvent
    SIPLGpioEvent
    CDAC GPIO event codes.
    Definition: NvSIPLCommon.hpp:181
    nvsipl::NITO_PARAMETER_SET_ID_SIZE
    static constexpr size_t NITO_PARAMETER_SET_ID_SIZE
    Definition: NvSIPLCamera.hpp:52
    NvSIPLCommon.hpp
    NVIDIA SIPL: Common Data Structures - SIPL
    nvsipl::SIPL_SIGNALER
    @ SIPL_SIGNALER
    For a given SyncObj SIPL acts as a signaler.
    Definition: NvSIPLCamera.hpp:117
    nvsipl::SIPLModuleErrorReadFlag
    SIPLModuleErrorReadFlag
    Flag indicating which module errors to read.
    Definition: NvSIPLCommon.hpp:228
    NvSciSyncAttrList
    struct NvSciSyncAttrListRec * NvSciSyncAttrList
    A container constituting an NvSciSyncAttrList which contains:
    Definition: nvscisync.h:330
    nvsipl::SIPLErrorDetails
    Error details for a particular device.
    Definition: NvSIPLCommon.hpp:209
    nvsipl::NvSIPLNitoMetadata::schemaHash
    uint8_t schemaHash[NITO_SCHEMA_HASH_SIZE]
    Definition: NvSIPLCamera.hpp:63
    NvSIPLPlatformCfg.hpp
    NVIDIA SIPL: Camera Platform Configuration
    nvscisync.h
    NVIDIA Software Communications Interface (SCI) : NvSciSync
    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::INvSIPLCamera::Init
    virtual SIPLStatus Init()=0
    Initialize the API for the selected platform configuration.
    nvsipl::INvSIPLCamera::Deinit
    virtual SIPLStatus Deinit()=0
    Deinitialize the API for the selected platform configuration.
    nvsipl::INvSIPLCamera::RegisterImages
    virtual SIPLStatus RegisterImages(uint32_t const index, INvSIPLClient::ConsumerDesc::OutputType const outType, std::vector< NvSciBufObj > const &images)=0
    Register images.
    nvsipl::INvSIPLClient::ConsumerDesc::OutputType
    OutputType
    Defines the types of the SIPL pipeline output.
    Definition: NvSIPLClient.hpp:394
    nvsipl::INvSIPLCamera::DisableLink
    virtual SIPLStatus DisableLink(uint32_t const index)=0
    Disable a given link.
    nvsipl::GetNitoMetadataFromMemory
    SIPLStatus GetNitoMetadataFromMemory(uint8_t const *const nitoMem, size_t const nitoMemLength, NvSIPLNitoMetadata *const metadataArray, size_t const metadataArrayLength, size_t *const metadataCount)
    Get NITO Metadata (knobset UUID, schema hash, data hash) from a NITO memory buffer.
    nvsipl::PlatformCfg
    Defines the camera platform configuration.
    Definition: NvSIPLPlatformCfg.hpp:36
    nvsipl::NvSIPLPipelineQueues
    This is the output structure for SetPipelineCfg().
    Definition: NvSIPLPipelineMgr.hpp:503
    nvsipl::NVSIPL_PRESYNCOBJ
    @ NVSIPL_PRESYNCOBJ
    Specifies an NvSciSyncObj type for which SIPL acts as a waiter.
    Definition: NvSIPLCamera.hpp:128
    nvsipl::INvSIPLCamera::GetModuleInterfaceProvider
    virtual SIPLStatus GetModuleInterfaceProvider(uint32_t const index, IInterfaceProvider *&interfaceProvider)=0
    Retrieve custom interface provider for module.
    nvsipl::INvSIPLCamera::SetPlatformCfg
    virtual SIPLStatus SetPlatformCfg(PlatformCfg const *const platformConfig)=0
    Set a platform configuration.
    nvsipl::NvSIPLPipelineConfiguration
    Defines the camera pipeline configuration.
    Definition: NvSIPLPipelineMgr.hpp:302
    nvsipl::SIPLStatus
    SIPLStatus
    Defines the status codes returned by functions in SIPL modules.
    Definition: NvSIPLCommon.hpp:150
    NvSIPLPipelineMgr.hpp
    NVIDIA SIPL: Pipeline Manager - NvSIPL Pipeline Manager
    nvsipl::NvSiplNvSciSyncObjType
    NvSiplNvSciSyncObjType
    Defines SIPL NvSciSyncObj types.
    Definition: NvSIPLCamera.hpp:126
    NvSciBufAttrList
    struct NvSciBufAttrListRec * NvSciBufAttrList
    A container constituting an attribute list which contains.
    Definition: nvscibuf.h:3126
    nvsipl::INvSIPLCamera
    The top-level API for SIPL.
    Definition: NvSIPLCamera.hpp:141
    nvsipl::NITO_DATA_HASH_SIZE
    static constexpr size_t NITO_DATA_HASH_SIZE
    Definition: NvSIPLCamera.hpp:54
    nvsipl::INvSIPLCamera::operator=
    INvSIPLCamera & operator=(INvSIPLCamera &other) &=delete
    nvscistream.h
    NVIDIA Software Communications Interface (SCI) : NvSciStream
    nvscibuf.h
    NVIDIA Software Communications Interface (SCI) : NvSciBuf
    nvsipl::NvSiplNvSciSyncClientType
    NvSiplNvSciSyncClientType
    Definition: NvSIPLCamera.hpp:113
    nvsipl::INvSIPLCamera::INvSIPLCamera
    INvSIPLCamera()=default
    nvsipl::INvSIPLCamera::SetSensorCharMode
    virtual SIPLStatus SetSensorCharMode(uint32_t const index, uint8_t expNo)=0
    Set sensor in characterization mode.
    nvsipl::NVSIPL_EOFSYNCOBJ
    @ NVSIPL_EOFSYNCOBJ
    Specifies an NvSciSyncObj type for which SIPL acts as a signaler, signaling EOFFence.
    Definition: NvSIPLCamera.hpp:130
    nvsipl::INvSIPLCamera::GetModuleErrorInfo
    virtual SIPLStatus GetModuleErrorInfo(uint32_t const index, SIPLErrorDetails *const serializerErrorInfo, SIPLErrorDetails *const sensorErrorInfo, SIPLModuleErrorReadFlag const errorsToRead=NVSIPL_MODULE_ERROR_READ_ALL)=0
    Gets generic module error information.
    nvsipl::INvSIPLCamera::GetDeserializerErrorInfo
    virtual SIPLStatus GetDeserializerErrorInfo(uint32_t const devBlkIndex, SIPLErrorDetails *const deserializerErrorInfo, bool &isRemoteError, uint8_t &linkErrorMask)=0
    Get generic deserializer error information.
    nvsipl
    Contains the classes and variables for implementation of SIPL.
    Definition: INvSiplControlAuto.hpp:33
    nvsipl::NITO_SCHEMA_HASH_SIZE
    static constexpr size_t NITO_SCHEMA_HASH_SIZE
    Definition: NvSIPLCamera.hpp:53
    nvsipl::INvSIPLCamera::GetErrorGPIOEventInfo
    virtual SIPLStatus GetErrorGPIOEventInfo(uint32_t const devBlkIndex, uint32_t const gpioIndex, SIPLGpioEvent &event)=0
    Get the error interrupt event information for a GPIO activation.
    nvsipl::NvSIPLNitoMetadata::dataHash
    uint8_t dataHash[NITO_DATA_HASH_SIZE]
    Definition: NvSIPLCamera.hpp:64
    nvsipl::INvSIPLCamera::EnableLink
    virtual SIPLStatus EnableLink(uint32_t const index, bool const resetModule)=0
    Enable a given link.
    nvsipl::INvSIPLCamera::ToggleLED
    virtual SIPLStatus ToggleLED(uint32_t const index, bool enable)=0
    Control the LED on the associated camera module.
    nvsipl::NvSIPLNitoMetadata
    NvSIPLNitoMetadata defines the 3-tuple returned by a successful call to GetNitoMetadataFromMemory().
    Definition: NvSIPLCamera.hpp:60
    nvsipl::PluginType
    PluginType
    Defines types of SIPL Control Auto plug-ins.
    Definition: NvSIPLControlAutoDef.hpp:32
    NvSciSyncObj
    struct NvSciSyncObjRec * NvSciSyncObj
    A Synchronization Object is a container holding the reconciled NvSciSyncAttrList defining constraints...
    Definition: nvscisync.h:311
    nvsipl::ISiplControlAuto
    Defines SIPL Control Auto Interface Class.
    Definition: INvSiplControlAuto.hpp:44
    nvsipl::INvSIPLCamera::~INvSIPLCamera
    virtual ~INvSIPLCamera()=default
    Default destructor.
    nvsipl::INvSIPLCamera::ReadEEPROMData
    virtual SIPLStatus ReadEEPROMData(uint32_t const index, uint16_t const address, uint32_t const length, uint8_t *const buffer)=0
    Read from an EEPROM in a camera module.
    nvsipl::NvSIPLNitoMetadata::parameterSetID
    uint8_t parameterSetID[NITO_PARAMETER_SET_ID_SIZE]
    Definition: NvSIPLCamera.hpp:62
    nvsipl::NvSIPLDeviceBlockQueues
    Holds the queues used by the client to receive device block event notifications.
    Definition: NvSIPLPipelineMgr.hpp:536
    nvsipl::INvSIPLCamera::Start
    virtual SIPLStatus Start()=0
    Begin streaming from all sensors in the selected platform configuration.
    人人超碰97caoporen国产