NVIDIA DRIVE OS Linux SDK API Reference

5.2.3 Release
For Test and Development only
NvSIPLCamera.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2020, 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 "nvmedia_image.h"
21 
22 #include "devblk_cdi.h"
23 
24 #include "nvscisync.h"
25 #include "nvscistream.h"
26 
27 #include <cstdint>
28 #include <memory>
29 #include <vector>
30 
45 namespace nvsipl
46 {
47 
52 #if !NV_IS_SAFETY
53 const size_t TUNA_PARAMETER_SET_ID_SIZE = 16U; //< Based on Tuna::UUID::UUID_SERIALIZED_BYTE_SIZE
54 const size_t TUNA_SCHEMA_HASH_SIZE = 32U; //< Based on definition of Tuna::utils::Hash256
55 const size_t TUNA_DATA_HASH_SIZE = 32U; //< Based on definition of Tuna::utils::Hash256
56 
62 {
63  uint8_t parameterSetID[TUNA_PARAMETER_SET_ID_SIZE]; //< Identifier of the parameter set
64  uint8_t schemaHash[TUNA_SCHEMA_HASH_SIZE]; //< Hash value of the parameter set schema
65  uint8_t dataHash[TUNA_DATA_HASH_SIZE]; //< Hash value of parameter values
66 };
67 
94 SIPLStatus GetNitoMetadataFromMemory(uint8_t const *const nitoMem,
95  size_t const nitoMemLength,
96  NvSIPLNitoMetadata *const metadataArray,
97  size_t const metadataArrayLength,
98  size_t *const metadataCount);
99 
100 #endif // NV_IS_SAFETY
101 
107 {
108  public:
117  static std::unique_ptr<INvSIPLCamera> GetInstance(void);
118 
131  virtual SIPLStatus SetPlatformCfg(const PlatformCfg* platformCfg) = 0;
132 
148  virtual SIPLStatus SetPlatformCfg(const PlatformCfg* platformCfg, NvSIPLDeviceBlockQueues &queues) = 0;
149 
162  virtual SIPLStatus SetPipelineCfg(uint32_t index,
163  const NvSIPLPipelineConfiguration &pipelineCfg,
164  NvSIPLPipelineQueues& queues) = 0;
165 
180  virtual SIPLStatus RegisterAutoControlPlugin(uint32_t index,
182  ISiplControlAuto* autoControl,
183  const std::vector<uint8_t>& blob) = 0;
184 
195  virtual SIPLStatus Init(void) = 0;
196 
221  virtual SIPLStatus GetImageAttributes(uint32_t index,
223  NvSIPLImageAttr &imageAttr) = 0;
224 
238  virtual SIPLStatus ReadEEPROMData(const uint32_t index,
239  const uint16_t address,
240  const uint32_t length,
241  uint8_t * const buffer) = 0;
242 
256  virtual SIPLStatus RegisterImageGroups(uint32_t index,
257  const std::vector<NvMediaImageGroup*> &imageGroups) = 0;
258 
273  virtual SIPLStatus RegisterImages(uint32_t index,
275  const std::vector<NvMediaImage*> &images) = 0;
276 
287  virtual SIPLStatus Start(void) = 0;
288 
298  virtual SIPLStatus Stop(void) = 0;
299 
312  virtual SIPLStatus Deinit(void) = 0;
313 
328  virtual SIPLStatus GetMaxErrorSize(const uint32_t devBlkIndex,
329  size_t & maxErrorSize) = 0;
330 
347  virtual SIPLStatus GetErrorGPIOEventInfo(const uint32_t devBlkIndex,
348  const uint32_t gpioIndex,
349  SIPLGpioEvent &event) = 0;
350 
377  virtual SIPLStatus GetDeserializerErrorInfo(const uint32_t devBlkIndex,
378  SIPLErrorDetails * const deserializerErrorInfo,
379  bool & isRemoteError,
380  uint8_t& linkErrorMask) = 0;
381 
405  virtual SIPLStatus GetModuleErrorInfo(const uint32_t index,
406  SIPLErrorDetails * const serializerErrorInfo,
407  SIPLErrorDetails * const sensorErrorInfo) = 0;
408 
419  virtual SIPLStatus DisableLink(uint32_t index) = 0;
420 
433  virtual SIPLStatus EnableLink(uint32_t index, bool resetModule) = 0;
434 
435 #if !NV_IS_SAFETY
436 
449  virtual SIPLStatus ToggleLED(uint32_t index, bool enable) = 0;
450 #endif // !NV_IS_SAFETY
451 
453  virtual ~INvSIPLCamera(void) = default;
454 
470  virtual SIPLStatus FillNvSciSyncAttrList(uint32_t index,
472  NvSciSyncAttrList attrList,
473  NvMediaNvSciSyncClientType clientType) = 0;
474 
487  virtual SIPLStatus RegisterNvSciSyncObj(uint32_t index,
489  NvMediaNvSciSyncObjType syncobjtype,
490  NvSciSyncObj syncobj) = 0;
491 
504  virtual SIPLStatus GetDeserializerInterfaceProvider(uint32_t devBlkIndex,
505  IInterfaceProvider *&interfaceProvider) = 0;
506 
520  virtual SIPLStatus GetModuleInterfaceProvider(uint32_t index,
521  IInterfaceProvider *&interfaceProvider) = 0;
522 
523 }; // INvSIPLCamera
524 
526 } // namespace nvsipl
527 
528 
529 
530 #endif // NVSIPLCAMERA_HPP
NvSIPLClient.hpp
NVIDIA SIPL: Client Interface - NvSIPL Client
nvsipl::INvSIPLCamera::RegisterImages
virtual SIPLStatus RegisterImages(uint32_t index, INvSIPLClient::ConsumerDesc::OutputType outType, const std::vector< NvMediaImage * > &images)=0
Registers images.
nvsipl::INvSIPLCamera::GetErrorGPIOEventInfo
virtual SIPLStatus GetErrorGPIOEventInfo(const uint32_t devBlkIndex, const uint32_t gpioIndex, SIPLGpioEvent &event)=0
Gets the error interrupt event information for a GPIO activation.
INvSiplControlAuto.hpp
NVIDIA SIPL: Auto Control Interface - SIPL Auto Control
nvsipl::INvSIPLCamera::GetDeserializerErrorInfo
virtual SIPLStatus GetDeserializerErrorInfo(const uint32_t devBlkIndex, SIPLErrorDetails *const deserializerErrorInfo, bool &isRemoteError, uint8_t &linkErrorMask)=0
Gets generic deserializer error information.
nvsipl::INvSIPLCamera::ToggleLED
virtual SIPLStatus ToggleLED(uint32_t index, bool enable)=0
Control the LED on the associated camera module.
nvsipl::INvSIPLCamera::GetImageAttributes
virtual SIPLStatus GetImageAttributes(uint32_t index, INvSIPLClient::ConsumerDesc::OutputType outType, NvSIPLImageAttr &imageAttr)=0
Gets image attributes.
NvMediaNvSciSyncObjType
NvMediaNvSciSyncObjType
Defines NvMedia NvSciSyncObj types.
Definition: nvmedia_core.h:271
nvsipl::TUNA_DATA_HASH_SIZE
const size_t TUNA_DATA_HASH_SIZE
Definition: NvSIPLCamera.hpp:55
nvsipl::INvSIPLCamera::Init
virtual SIPLStatus Init(void)=0
Initializes NvSIPL Camera for the selected platform configuration.
nvsipl::SIPLGpioEvent
SIPLGpioEvent
CDAC GPIO event codes.
Definition: NvSIPLCommon.hpp:73
NvSIPLCommon.hpp
NVIDIA SIPL: Common Data Structures - SIPL
nvsipl::NvSIPLNitoMetadata::parameterSetID
uint8_t parameterSetID[TUNA_PARAMETER_SET_ID_SIZE]
Definition: NvSIPLCamera.hpp:63
nvsipl::INvSIPLCamera::GetModuleInterfaceProvider
virtual SIPLStatus GetModuleInterfaceProvider(uint32_t index, IInterfaceProvider *&interfaceProvider)=0
Retrieve custom interface provider for module.
NvSciSyncAttrList
struct NvSciSyncAttrListRec * NvSciSyncAttrList
A container constituting an NvSciSyncAttrList which contains:
Definition: nvscisync.h:308
nvsipl::SIPLErrorDetails
Error details for a particular device.
Definition: NvSIPLCommon.hpp:104
NvSIPLPlatformCfg.hpp
NVIDIA SIPL: Camera Platform Configuration
nvsipl::NvSIPLNitoMetadata::schemaHash
uint8_t schemaHash[TUNA_SCHEMA_HASH_SIZE]
Definition: NvSIPLCamera.hpp:64
nvscisync.h
NVIDIA Software Communications Interface (SCI) : NvSciSync
nvsipl::NvSIPLNitoMetadata::dataHash
uint8_t dataHash[TUNA_DATA_HASH_SIZE]
Definition: NvSIPLCamera.hpp:65
nvsipl::INvSIPLCamera::Deinit
virtual SIPLStatus Deinit(void)=0
Deinitializes NvSIPL Camera for the selected platform configuration.
nvsipl::INvSIPLCamera::RegisterNvSciSyncObj
virtual SIPLStatus RegisterNvSciSyncObj(uint32_t index, INvSIPLClient::ConsumerDesc::OutputType outType, NvMediaNvSciSyncObjType syncobjtype, NvSciSyncObj syncobj)=0
Register an NvSciSyncObj.
nvsipl::TUNA_PARAMETER_SET_ID_SIZE
const size_t TUNA_PARAMETER_SET_ID_SIZE
Definition: NvSIPLCamera.hpp:53
nvsipl::INvSIPLClient::ConsumerDesc::OutputType
OutputType
Defines the types of the SIPL pipeline output.
Definition: NvSIPLClient.hpp:170
type
int const char int type
Definition: drm-nvdc-docs.h:1479
nvsipl::PlatformCfg
Defines the camera platform configuration.
Definition: NvSIPLPlatformCfg.hpp:52
nvsipl::INvSIPLCamera::GetModuleErrorInfo
virtual SIPLStatus GetModuleErrorInfo(const uint32_t index, SIPLErrorDetails *const serializerErrorInfo, SIPLErrorDetails *const sensorErrorInfo)=0
Gets generic module error information.
nvsipl::NvSIPLPipelineQueues
This is the output structure for SetPipelineCfg().
Definition: NvSIPLPipelineMgr.hpp:413
nvsipl::INvSIPLCamera::RegisterImageGroups
virtual SIPLStatus RegisterImageGroups(uint32_t index, const std::vector< NvMediaImageGroup * > &imageGroups)=0
Registers image groups.
nvsipl::INvSIPLCamera::ReadEEPROMData
virtual SIPLStatus ReadEEPROMData(const uint32_t index, const uint16_t address, const uint32_t length, uint8_t *const buffer)=0
Read from an EEPROM in a camera module.
nvsipl::INvSIPLCamera::SetPlatformCfg
virtual SIPLStatus SetPlatformCfg(const PlatformCfg *platformCfg)=0
Sets a platform configuration.
nvsipl::NvSIPLPipelineConfiguration
Defines the camera pipeline configuration.
Definition: NvSIPLPipelineMgr.hpp:299
nvsipl::TUNA_SCHEMA_HASH_SIZE
const size_t TUNA_SCHEMA_HASH_SIZE
Definition: NvSIPLCamera.hpp:54
nvsipl::NvSIPLImageAttr
Describes attributes of images used in image processing pipeline.
Definition: NvSIPLPipelineMgr.hpp:254
nvsipl::INvSIPLCamera::RegisterAutoControlPlugin
virtual SIPLStatus RegisterAutoControlPlugin(uint32_t index, PluginType type, ISiplControlAuto *autoControl, const std::vector< uint8_t > &blob)=0
Register Auto Control plugin to be used for specific pipeline.
nvsipl::SIPLStatus
SIPLStatus
Defines the status codes returned by functions in SIPL modules.
Definition: NvSIPLCommon.hpp:40
NvSIPLPipelineMgr.hpp
NVIDIA SIPL: Pipeline Manager - NvSIPL Pipeline Manager
nvsipl::INvSIPLCamera::FillNvSciSyncAttrList
virtual SIPLStatus FillNvSciSyncAttrList(uint32_t index, INvSIPLClient::ConsumerDesc::OutputType outType, NvSciSyncAttrList attrList, NvMediaNvSciSyncClientType clientType)=0
Fills an NvSciSyncAttrList.
nvsipl::INvSIPLCamera::Start
virtual SIPLStatus Start(void)=0
Starts NvSIPL Camera for the selected platform configuration.
nvsipl::INvSIPLCamera::DisableLink
virtual SIPLStatus DisableLink(uint32_t index)=0
Disables a given link.
nvsipl::INvSIPLCamera::~INvSIPLCamera
virtual ~INvSIPLCamera(void)=default
Default destructor.
nvsipl::INvSIPLCamera
Defines public data structures and describes the interfaces for NvSIPLCamera.
Definition: NvSIPLCamera.hpp:106
nvsipl::INvSIPLCamera::Stop
virtual SIPLStatus Stop(void)=0
Stops NvSIPL Camera for the selected platform configuration.
nvscistream.h
NVIDIA Software Communications Interface (SCI) : NvSciStream
nvsipl::INvSIPLCamera::SetPipelineCfg
virtual SIPLStatus SetPipelineCfg(uint32_t index, const NvSIPLPipelineConfiguration &pipelineCfg, NvSIPLPipelineQueues &queues)=0
Sets a pipeline configuration.
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::INvSIPLCamera::GetDeserializerInterfaceProvider
virtual SIPLStatus GetDeserializerInterfaceProvider(uint32_t devBlkIndex, IInterfaceProvider *&interfaceProvider)=0
Retrieve custom interface provider for deserializer.
nvsipl::INvSIPLCamera::GetMaxErrorSize
virtual SIPLStatus GetMaxErrorSize(const uint32_t devBlkIndex, size_t &maxErrorSize)=0
Gets maximum size of error information.
nvsipl::PluginType
PluginType
Defines types of SIPL Control Auto plug-ins.
Definition: NvSIPLPipelineMgr.hpp:49
nvsipl
Contains the classes and variables for implementation of SIPL.
Definition: INvSiplControlAuto.hpp:33
nvsipl::NvSIPLNitoMetadata
NvSIPLNitoMetadata defines the 3-tuple returned by a successful call to GetNitoMetadataFromMemory().
Definition: NvSIPLCamera.hpp:61
NvSciSyncObj
struct NvSciSyncObjRec * NvSciSyncObj
A Synchronization Object is a container holding the reconciled NvSciSyncAttrList defining constraints...
Definition: nvscisync.h:289
nvsipl::ISiplControlAuto
Defines SIPL Control Auto Interface Class.
Definition: INvSiplControlAuto.hpp:44
nvmedia_image.h
NVIDIA Media Interface: Image Processing
nvsipl::NvSIPLDeviceBlockQueues
Holds the queues used by the client to receive device block event notifications.
Definition: NvSIPLPipelineMgr.hpp:440
nvsipl::INvSIPLCamera::EnableLink
virtual SIPLStatus EnableLink(uint32_t index, bool resetModule)=0
Enables a given link.
nvsipl::INvSIPLCamera::GetInstance
static std::unique_ptr< INvSIPLCamera > GetInstance(void)
Gets a handle to an INvSIPLCamera instance.
NvMediaNvSciSyncClientType
NvMediaNvSciSyncClientType
NvMedia NvSciSync Client Type.
Definition: nvmedia_core.h:258