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.8 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  * 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 #ifndef NVSIPLCAMERA_HPP
    11 #define NVSIPLCAMERA_HPP
    12 
    13 #include "NvSIPLCommon.hpp"
    14 #include "NvSIPLPlatformCfg.hpp"
    15 #include "NvSIPLPipelineMgr.hpp"
    16 #include "INvSiplControlAuto.hpp"
    17 #include "NvSIPLClient.hpp"
    18 #include "INvSIPLDeviceInterfaceProvider.hpp"
    19 
    20 #include "nvscisync.h"
    21 #include "nvscistream.h"
    22 #include "nvscibuf.h"
    23 
    24 #include <cstdint>
    25 #include <memory>
    26 #include <vector>
    27 
    42 namespace nvsipl
    43 {
    44 
    49 #if !NV_IS_SAFETY
    50 static constexpr size_t NITO_PARAMETER_SET_ID_SIZE {16U};
    51 static constexpr size_t NITO_SCHEMA_HASH_SIZE {32U};
    52 static constexpr size_t NITO_DATA_HASH_SIZE {32U};
    53 
    59 {
    60  uint8_t parameterSetID[NITO_PARAMETER_SET_ID_SIZE]; //< Identifier of the parameter set
    61  uint8_t schemaHash[NITO_SCHEMA_HASH_SIZE]; //< Hash value of the parameter set schema
    62  uint8_t dataHash[NITO_DATA_HASH_SIZE]; //< Hash value of parameter values
    63 };
    64 
    103 SIPLStatus GetNitoMetadataFromMemory(uint8_t const *const nitoMem,
    104  size_t const nitoMemLength,
    105  NvSIPLNitoMetadata *const metadataArray,
    106  size_t const metadataArrayLength,
    107  size_t *const metadataCount);
    108 
    109 #endif // NV_IS_SAFETY
    110 
    111 typedef enum
    112 {
    116  /* For a given SyncObj SIPL acts as a waiter. This type corresponds to
    117  * prefences to SIPL */
    120 
    124 typedef enum {
    130 
    131 
    140 {
    141  public:
    169  static std::unique_ptr<INvSIPLCamera> GetInstance();
    170 
    202  virtual SIPLStatus SetPlatformCfg(PlatformCfg const* const platformConfig) = 0;
    203 
    238  virtual SIPLStatus SetPlatformCfg(PlatformCfg const* const platformConfig, NvSIPLDeviceBlockQueues &queues) = 0;
    239 
    269  virtual SIPLStatus SetPipelineCfg(uint32_t const index,
    270  NvSIPLPipelineConfiguration const &pipelineCfg,
    271  NvSIPLPipelineQueues& queues) = 0;
    272 
    304  virtual SIPLStatus RegisterAutoControlPlugin(uint32_t const index,
    305  PluginType type,
    306  ISiplControlAuto *const autoControl,
    307  std::vector<uint8_t> const &blob) = 0;
    308 
    336  virtual SIPLStatus Init() = 0;
    337 
    338 #if !NV_IS_SAFETY
    339 
    374  virtual SIPLStatus SetSensorCharMode(uint32_t const index, uint8_t expNo) = 0;
    375 #endif // !NV_IS_SAFETY
    376 
    469  virtual SIPLStatus GetImageAttributes(uint32_t const index,
    471  NvSciBufAttrList &imageAttr) = 0;
    472 
    505  virtual SIPLStatus ReadEEPROMData(uint32_t const index,
    506  uint16_t const address,
    507  uint32_t const length,
    508  uint8_t * const buffer) = 0;
    509 
    606  virtual SIPLStatus RegisterImages(uint32_t const index,
    608  std::vector<NvSciBufObj> const &images) = 0;
    609 
    637  virtual SIPLStatus Start() = 0;
    638 
    665  virtual SIPLStatus Stop() = 0;
    666 
    696  virtual SIPLStatus Deinit() = 0;
    697 
    731  virtual SIPLStatus GetMaxErrorSize(uint32_t const devBlkIndex,
    732  size_t & maxErrorSize) = 0;
    733 
    769  virtual SIPLStatus GetErrorGPIOEventInfo(uint32_t const devBlkIndex,
    770  uint32_t const gpioIndex,
    771  SIPLGpioEvent &event) = 0;
    772 
    816  virtual SIPLStatus GetDeserializerErrorInfo(uint32_t const devBlkIndex,
    817  SIPLErrorDetails * const deserializerErrorInfo,
    818  bool & isRemoteError,
    819  uint8_t& linkErrorMask) = 0;
    820 
    869  virtual SIPLStatus GetModuleErrorInfo(uint32_t const index,
    870  SIPLErrorDetails * const serializerErrorInfo,
    871  SIPLErrorDetails * const sensorErrorInfo,
    872  SIPLModuleErrorReadFlag const errorsToRead
    874 
    904  virtual SIPLStatus DisableLink(uint32_t const index) = 0;
    905 
    937  virtual SIPLStatus EnableLink(uint32_t const index, bool const resetModule) = 0;
    938 
    939 #if !NV_IS_SAFETY
    940 
    969  virtual SIPLStatus ToggleLED(uint32_t const index, bool enable) = 0;
    970 #endif // !NV_IS_SAFETY
    971 
    973  virtual ~INvSIPLCamera() = default;
    974 
    1024  virtual SIPLStatus FillNvSciSyncAttrList(uint32_t const index,
    1026  NvSciSyncAttrList const attrList,
    1027  NvSiplNvSciSyncClientType const clientType) = 0;
    1028 
    1057  virtual SIPLStatus RegisterNvSciSyncObj(uint32_t const index,
    1059  NvSiplNvSciSyncObjType const syncobjtype,
    1060  NvSciSyncObj const syncobj) = 0;
    1061 
    1062 
    1063 
    1095  virtual SIPLStatus GetDeserializerInterfaceProvider(uint32_t const devBlkIndex,
    1096  IInterfaceProvider *&interfaceProvider) = 0;
    1097 
    1130  virtual SIPLStatus GetModuleInterfaceProvider(uint32_t const index,
    1131  IInterfaceProvider *&interfaceProvider) = 0;
    1132 
    1133 }; // INvSIPLCamera
    1134 
    1136 } // namespace nvsipl
    1137 
    1138 
    1139 
    1140 #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:118
    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:182
    nvsipl::NITO_PARAMETER_SET_ID_SIZE
    static constexpr size_t NITO_PARAMETER_SET_ID_SIZE
    Definition: NvSIPLCamera.hpp:50
    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:115
    nvsipl::SIPLModuleErrorReadFlag
    SIPLModuleErrorReadFlag
    Flag indicating which module errors to read.
    Definition: NvSIPLCommon.hpp:229
    NvSciSyncAttrList
    struct NvSciSyncAttrListRec * NvSciSyncAttrList
    A container constituting an NvSciSyncAttrList which contains:
    Definition: nvscisync.h:323
    nvsipl::SIPLErrorDetails
    Error details for a particular device.
    Definition: NvSIPLCommon.hpp:210
    nvsipl::NvSIPLNitoMetadata::schemaHash
    uint8_t schemaHash[NITO_SCHEMA_HASH_SIZE]
    Definition: NvSIPLCamera.hpp:61
    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:244
    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:355
    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:501
    nvsipl::NVSIPL_PRESYNCOBJ
    @ NVSIPL_PRESYNCOBJ
    Specifies an NvSciSyncObj type for which SIPL acts as a waiter.
    Definition: NvSIPLCamera.hpp:126
    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:300
    nvsipl::SIPLStatus
    SIPLStatus
    Defines the status codes returned by functions in SIPL modules.
    Definition: NvSIPLCommon.hpp:115
    NvSIPLPipelineMgr.hpp
    NVIDIA SIPL: Pipeline Manager - NvSIPL Pipeline Manager
    nvsipl::NvSiplNvSciSyncObjType
    NvSiplNvSciSyncObjType
    Defines SIPL NvSciSyncObj types.
    Definition: NvSIPLCamera.hpp:124
    NvSciBufAttrList
    struct NvSciBufAttrListRec * NvSciBufAttrList
    A container constituting an attribute list which contains.
    Definition: nvscibuf.h:3120
    nvsipl::INvSIPLCamera
    The top-level API for SIPL.
    Definition: NvSIPLCamera.hpp:139
    nvsipl::NITO_DATA_HASH_SIZE
    static constexpr size_t NITO_DATA_HASH_SIZE
    Definition: NvSIPLCamera.hpp:52
    nvscistream.h
    NVIDIA Software Communications Interface (SCI) : NvSciStream
    nvscibuf.h
    NVIDIA Software Communications Interface (SCI) : NvSciBuf
    nvsipl::NvSiplNvSciSyncClientType
    NvSiplNvSciSyncClientType
    Definition: NvSIPLCamera.hpp:111
    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:128
    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:51
    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:62
    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:58
    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:304
    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:60
    nvsipl::NvSIPLDeviceBlockQueues
    Holds the queues used by the client to receive device block event notifications.
    Definition: NvSIPLPipelineMgr.hpp:534
    nvsipl::INvSIPLCamera::Start
    virtual SIPLStatus Start()=0
    Begin streaming from all sensors in the selected platform configuration.
    人人超碰97caoporen国产