NVIDIA DRIVE OS Linux SDK API Reference

5.2.6 Release
For Test and Development only
nvsipl::INvSIPLCamera Class Referenceabstract

Detailed Description

Defines public data structures and describes the interfaces for NvSIPLCamera.

Definition at line 98 of file NvSIPLCamera.hpp.

Public Member Functions

virtual SIPLStatus SetPlatformCfg (const PlatformCfg *const platformCfg)=0
 Sets a platform configuration. More...
 
virtual SIPLStatus SetPlatformCfg (const PlatformCfg *const platformCfg, NvSIPLDeviceBlockQueues &queues)=0
 Sets a platform configuration and returns the device block notification queues. More...
 
virtual SIPLStatus SetPipelineCfg (uint32_t index, const NvSIPLPipelineConfiguration &pipelineCfg, NvSIPLPipelineQueues &queues)=0
 Sets a pipeline configuration. More...
 
virtual SIPLStatus RegisterAutoControlPlugin (uint32_t index, PluginType type, ISiplControlAuto *const autoControl, const std::vector< uint8_t > &blob)=0
 Register Auto Control plugin to be used for specific pipeline. More...
 
virtual SIPLStatus Init (void)=0
 Initializes NvSIPL Camera for the selected platform configuration. More...
 
virtual SIPLStatus GetImageAttributes (uint32_t index, INvSIPLClient::ConsumerDesc::OutputType const outType, NvSIPLImageAttr &imageAttr)=0
 Gets image attributes. More...
 
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. More...
 
virtual SIPLStatus RegisterImageGroups (uint32_t const index, const std::vector< NvMediaImageGroup * > &imageGroups)=0
 Registers image groups. More...
 
virtual SIPLStatus RegisterImages (uint32_t const index, INvSIPLClient::ConsumerDesc::OutputType const outType, const std::vector< NvMediaImage * > &images)=0
 Registers images. More...
 
virtual SIPLStatus Start (void)=0
 Starts NvSIPL Camera for the selected platform configuration. More...
 
virtual SIPLStatus Stop (void)=0
 Stops NvSIPL Camera for the selected platform configuration. More...
 
virtual SIPLStatus Deinit (void)=0
 Deinitializes NvSIPL Camera for the selected platform configuration. More...
 
virtual SIPLStatus GetMaxErrorSize (const uint32_t devBlkIndex, size_t &maxErrorSize)=0
 Gets maximum size of error information. More...
 
virtual SIPLStatus GetErrorGPIOEventInfo (const uint32_t devBlkIndex, const uint32_t gpioIndex, SIPLGpioEvent &event)=0
 Gets the error interrupt event information for a GPIO activation. More...
 
virtual SIPLStatus GetDeserializerErrorInfo (const uint32_t devBlkIndex, SIPLErrorDetails *const deserializerErrorInfo, bool &isRemoteError, uint8_t &linkErrorMask)=0
 Gets generic deserializer error information. More...
 
virtual SIPLStatus GetModuleErrorInfo (const uint32_t index, SIPLErrorDetails *const serializerErrorInfo, SIPLErrorDetails *const sensorErrorInfo, const SIPLModuleErrorReadFlag errorsToRead=NVSIPL_MODULE_ERROR_READ_ALL)=0
 Gets generic module error information. More...
 
virtual SIPLStatus DisableLink (uint32_t index)=0
 Disables a given link. More...
 
virtual SIPLStatus EnableLink (uint32_t index, bool const resetModule)=0
 Enables a given link. More...
 
virtual SIPLStatus ToggleLED (uint32_t index, bool enable)=0
 Control the LED on the associated camera module. More...
 
virtual ~INvSIPLCamera (void)=default
 Default destructor. More...
 
virtual SIPLStatus FillNvSciSyncAttrList (uint32_t index, INvSIPLClient::ConsumerDesc::OutputType const outType, NvSciSyncAttrList const attrList, NvMediaNvSciSyncClientType const clientType)=0
 Fills an NvSciSyncAttrList. More...
 
virtual SIPLStatus RegisterNvSciSyncObj (uint32_t index, INvSIPLClient::ConsumerDesc::OutputType const outType, NvMediaNvSciSyncObjType const syncobjtype, NvSciSyncObj const syncobj)=0
 Register an NvSciSyncObj. More...
 
virtual SIPLStatus GetDeserializerInterfaceProvider (uint32_t const devBlkIndex, IInterfaceProvider *&interfaceProvider)=0
 Retrieve custom interface provider for deserializer. More...
 
virtual SIPLStatus GetModuleInterfaceProvider (uint32_t const index, IInterfaceProvider *&interfaceProvider)=0
 Retrieve custom interface provider for module. More...
 

Static Public Member Functions

static std::unique_ptr< INvSIPLCameraGetInstance (void)
 Gets a handle to an INvSIPLCamera instance. More...
 

Constructor & Destructor Documentation

◆ ~INvSIPLCamera()

virtual nvsipl::INvSIPLCamera::~INvSIPLCamera ( void  )
virtualdefault

Default destructor.

Member Function Documentation

◆ Deinit()

virtual SIPLStatus nvsipl::INvSIPLCamera::Deinit ( void  )
pure virtual

Deinitializes NvSIPL Camera for the selected platform configuration.

The method internally deinitializes the camera module(s) and deserializer for each device block in the selected platform configuration and deinitializes and destroys the image processing pipelines.

Any registered images are automatically deregistered and can be safely destroyed.

This method must be called after Stop().

Returns
SIPLStatus the completion status of the operation.

◆ DisableLink()

virtual SIPLStatus nvsipl::INvSIPLCamera::DisableLink ( uint32_t  index)
pure virtual

Disables a given link.

The method disables a given link.

This method should only be called after Start() and before Stop().

Parameters
[in]indexThe ID of the sensor.
Returns
SIPLStatus the completion status of the operation.

◆ EnableLink()

virtual SIPLStatus nvsipl::INvSIPLCamera::EnableLink ( uint32_t  index,
bool const  resetModule 
)
pure virtual

Enables a given link.

The method enables a given link and if reset is asserted it reconfigures the camera module to reestablish the link.

This method should only be called after Start() and before Stop().

Parameters
[in]indexThe ID of the sensor.
[in]resetModuleIf true, reconfigure the camera module before enabling the link.
Returns
SIPLStatus the completion status of the operation.

◆ FillNvSciSyncAttrList()

virtual SIPLStatus nvsipl::INvSIPLCamera::FillNvSciSyncAttrList ( uint32_t  index,
INvSIPLClient::ConsumerDesc::OutputType const  outType,
NvSciSyncAttrList const  attrList,
NvMediaNvSciSyncClientType const  clientType 
)
pure virtual

Fills an NvSciSyncAttrList.

The method can be used to fetch the NvSciSync attributes required for compatiblility with the underlying image processing pipelines.

If using NvSci, this method must be called after Init() and before RegisterNvSciSyncObj().

Parameters
[in]indexThe ID of the sensor.
[in]outTypenvsipl::INvSIPLClient::ConsumerDesc::OutputType.
[out]attrListNvSciSyncAttrList to be filled.
[in]clientTypeWaiter, signaler, or both.
Returns
SIPLStatus the completion status of the operation.

◆ GetDeserializerErrorInfo()

virtual SIPLStatus nvsipl::INvSIPLCamera::GetDeserializerErrorInfo ( const uint32_t  devBlkIndex,
SIPLErrorDetails *const  deserializerErrorInfo,
bool &  isRemoteError,
uint8_t &  linkErrorMask 
)
pure virtual

Gets generic deserializer error information.

Queries the driver for detailed error information and populates a provided buffer for deserializer associated with the device block index. The contents, size written, and order are determined by the driver.

If no error info is expected (max error size is 0), this may be called with null error info to retrieve only the remote and link error information.

It is expected that the provided buffer is the correct size for the driver-provided errors.

This method must be called after Init() and before Stop().

Parameters
[in]devBlkIndexIndex of the device block associated with the deserializer to retrieve information from.
[out]deserializerErrorInfoSIPLErrorDetails buffer to populate with error information and the size of data written. Zero size means that no valid data was written.
[out]isRemoteErrorbool set to true if remote (serializer) error detected.
[out]linkErrorMaskuint8_t to store link mask for link error state (1 in index position indicates error; all 0 means no link error detected).
Returns
SIPLStatus the completion status of the operation.

◆ GetDeserializerInterfaceProvider()

virtual SIPLStatus nvsipl::INvSIPLCamera::GetDeserializerInterfaceProvider ( uint32_t const  devBlkIndex,
IInterfaceProvider *&  interfaceProvider 
)
pure virtual

Retrieve custom interface provider for deserializer.

Retrieve the custom interface provider for the deserializer associated with the provided device block index. This will allow for direct access to custom deserializer functionality.

Parameters
[in]devBlkIndexIndex of the device block associated with the deserializer.
[out]interfaceProviderIInterfaceProvider* to populate with object. May be nullptr if custom interface not implemented.
Returns
SIPLStatus the completion status of the operation.

◆ GetErrorGPIOEventInfo()

virtual SIPLStatus nvsipl::INvSIPLCamera::GetErrorGPIOEventInfo ( const uint32_t  devBlkIndex,
const uint32_t  gpioIndex,
SIPLGpioEvent event 
)
pure virtual

Gets the error interrupt event information for a GPIO activation.

Queries CDAC for the latest event code of a GPIO pin, called in response to Deserializer, Serializer and/or Sensor error notification(s).

This API is only supported on QNX with the Version 2 CDI API. NVSIPL_STATUS_NOT_SUPPORTED is returned on all other platforms.

Parameters
[in]devBlkIndexIndex of the device block associated with the error notification.
[in]gpioIndexIndex of the CDAC Error GPIO that issued an interrupt event notification.
[out]eventThe latest-updated CDAC GPIO event code.
Returns
SIPLStatus the completion status of the operation.

◆ GetImageAttributes()

virtual SIPLStatus nvsipl::INvSIPLCamera::GetImageAttributes ( uint32_t  index,
INvSIPLClient::ConsumerDesc::OutputType const  outType,
NvSIPLImageAttr imageAttr 
)
pure virtual

Gets image attributes.

The method can be used to get the attributes of the images to be used with the image processing pipeline. The user must reconcile the attributes returned by this function with the attributes required by the downstream consumers of the output of the pipeline and allocate the images.

The surface type for ICP output is determined by the properties of the image sensor and must not be overridden by the user.

The surface type for ISP0 output is set to YUV 420 SEMI-PLANAR UINT8 Block Linear by default and can be overridden to be one of the supported surfaces types of ISP0 output.

The surface type for ISP1 output is set to RGBA PACKED FLOAT16 Pitch Linear by default and can be overridden to be one of the supported surfaces types of ISP1 output.

This method must be called after Init() but before Start().

Parameters
[in]indexThe ID of the sensor.
[in]outTypenvsipl::INvSIPLClient::ConsumerDesc::OutputType.
[out]imageAttrReference to the image attributes structure.
Returns
SIPLStatus the completion status of the operation.

◆ GetInstance()

static std::unique_ptr<INvSIPLCamera> nvsipl::INvSIPLCamera::GetInstance ( void  )
static

Gets a handle to an INvSIPLCamera instance.

Static function to create an instance of the implementation class and return the handle. The object is automatically destroyed when the variable holding the return value goes out of scope.

Returns
a pointer to an INvSIPLCamera instance.

◆ GetMaxErrorSize()

virtual SIPLStatus nvsipl::INvSIPLCamera::GetMaxErrorSize ( const uint32_t  devBlkIndex,
size_t &  maxErrorSize 
)
pure virtual

Gets maximum size of error information.

Queries the drivers for size of error information and returns the largest. Used to allocate buffers for requesting detailed errors.

This method must be called after Init() and before Stop().

Parameters
[in]devBlkIndexIndex of the device block associated with the deserializer to retrieve error size from.
[out]maxErrorSizesize_t maximum size of device error information (0 if no valid size found).
Returns
SIPLStatus the completion status of the operation.

◆ GetModuleErrorInfo()

virtual SIPLStatus nvsipl::INvSIPLCamera::GetModuleErrorInfo ( const uint32_t  index,
SIPLErrorDetails *const  serializerErrorInfo,
SIPLErrorDetails *const  sensorErrorInfo,
const SIPLModuleErrorReadFlag  errorsToRead = NVSIPL_MODULE_ERROR_READ_ALL 
)
pure virtual

Gets generic module error information.

Queries the drivers for detailed error information and populates a provided buffer for module devices (sensor, serializer) associated with the index. The contents, size written, and order are determined by each driver.

It is expected that the provided buffers are the correct size for the driver-provided errors.

A flag is provided indicating whether sensor, serializer, or both errors should be read. If not read, the errorInfo may be null for that device.

This method must be called after Init() and before Stop().

Parameters
[in]indexID of the sensor associated with the devices to retrieve error information from.
[out]serializerErrorInfoSIPLErrorDetails buffer to populate with serializer error information and the size of data written. Zero size means that no valid data was written.
[out]sensorErrorInfoSIPLErrorDetails buffer to populate with sensor error information and the size of data written. Zero size means that no valid data was written.
[in]errorsToReadFlag indicating which errors to read - sensor, serializer, or both. If this flag indicates that errors should be read, the corresponding SIPLErrorDetails must be valid. Default behavior is to read both.
Returns
SIPLStatus the completion status of the operation.

◆ GetModuleInterfaceProvider()

virtual SIPLStatus nvsipl::INvSIPLCamera::GetModuleInterfaceProvider ( uint32_t const  index,
IInterfaceProvider *&  interfaceProvider 
)
pure virtual

Retrieve custom interface provider for module.

Retrieve the custom interface provider for the module associated with the provided sensor index. This will allow for direct access to custom module functionality.

Parameters
[in]indexID of the sensor associated with the module to retrieve interface from.
[out]interfaceProviderIInterfaceProvider* to populate with object. May be nullptr if custom interface not implemented.
Returns
SIPLStatus the completion status of the operation.

◆ Init()

virtual SIPLStatus nvsipl::INvSIPLCamera::Init ( void  )
pure virtual

Initializes NvSIPL Camera for the selected platform configuration.

The method internally initializes the camera module(s) and deserializer for each device block in the selected platform configuration and creates and initializes the image processing pipelines based on the number and type of the consumers set via SetPipelineCfg.

This method must be called after SetPipelineCfg() but before RegisterImageGroups().

Returns
SIPLStatus the completion status of the operation.

◆ ReadEEPROMData()

virtual SIPLStatus nvsipl::INvSIPLCamera::ReadEEPROMData ( const uint32_t  index,
const uint16_t  address,
const uint32_t  length,
uint8_t *const  buffer 
)
pure virtual

Read from an EEPROM in a camera module.

This method can be used to perform data reads from an EEPROM in a camera module. This method can only be called after Init() but before Start().

Parameters
[in]indexThe ID of the sensor to which the EEPROM is associated.
[in]addressThe start address to read from in the EEPROM.
[in]lengthContiguous size of data to be read. [byte]
[out]bufferBuffer that EEPROM data is to be written into, must be at least size length.
Returns
SIPLStatus. The completion status of the operation.

◆ RegisterAutoControlPlugin()

virtual SIPLStatus nvsipl::INvSIPLCamera::RegisterAutoControlPlugin ( uint32_t  index,
PluginType  type,
ISiplControlAuto *const  autoControl,
const std::vector< uint8_t > &  blob 
)
pure virtual

Register Auto Control plugin to be used for specific pipeline.

This method must be called for every pipeline with ISP output enabled. This function must be called after RegisterImages() but before Start().

Parameters
[in]indexThe ID of the sensor.
[in]typePlugin type.
[in]autoControlISiplControlAuto Handle to plugin implementation.
[in]blobReference to binary blob containing the ISP configuration.
Note
Support for registering more than one auto control plugin is deprecated and will be removed in the future release.
Returns
SIPLStatus the completion status of the operation.

◆ RegisterImageGroups()

virtual SIPLStatus nvsipl::INvSIPLCamera::RegisterImageGroups ( uint32_t const  index,
const std::vector< NvMediaImageGroup * > &  imageGroups 
)
pure virtual

Registers image groups.

The method can be used to register the NvMedia image groups to be used within the image processing pipelines. NvMediaImageGroup serve as the output of ICP and input to ISP.

This method must be called after Init() but before Start() and if ISP output is enabled also before RegisterImages().

Parameters
[in]indexThe ID of the sensor.
[in]imageGroupsVector of NvMediaImageGroup pointers to be registered.
Returns
SIPLStatus the completion status of the operation.

◆ RegisterImages()

virtual SIPLStatus nvsipl::INvSIPLCamera::RegisterImages ( uint32_t const  index,
INvSIPLClient::ConsumerDesc::OutputType const  outType,
const std::vector< NvMediaImage * > &  images 
)
pure virtual

Registers images.

The method can be used to register the images to be used within the image processing pipelines. NvMediaImage serve as the output of ISP.

If ISP output is enabled, this method must be called after RegisterImageGroups() but before RegisterAutoControlPlugin().

Parameters
[in]indexThe ID of the sensor.
[in]outTypenvsipl::INvSIPLClient::ConsumerDesc::OutputType, can be ISP0 or ISP1.
[in]imagesVector of NvMediaImage pointers to be registered.
Returns
SIPLStatus the completion status of the operation.

◆ RegisterNvSciSyncObj()

virtual SIPLStatus nvsipl::INvSIPLCamera::RegisterNvSciSyncObj ( uint32_t  index,
INvSIPLClient::ConsumerDesc::OutputType const  outType,
NvMediaNvSciSyncObjType const  syncobjtype,
NvSciSyncObj const  syncobj 
)
pure virtual

Register an NvSciSyncObj.

If using NvSci, this method must be called after FillNvSciSyncAttrList() and before Start().

Parameters
[in]indexThe ID of the sensor.
[in]outTypenvsipl::INvSIPLClient::ConsumerDesc::OutputType.
[in]syncobjtypePresync, EOF sync, or presync and EOF.
[in]syncobjNvSciSyncObj to be registered.
Returns
SIPLStatus the completion status of the operation.

◆ SetPipelineCfg()

virtual SIPLStatus nvsipl::INvSIPLCamera::SetPipelineCfg ( uint32_t  index,
const NvSIPLPipelineConfiguration pipelineCfg,
NvSIPLPipelineQueues queues 
)
pure virtual

Sets a pipeline configuration.

The method sets a camera pipeline configuration. NvSIPLCamera uses the information in the pipeline configuration to initialize the Pipeline Manager. This function must be called after SetPlatformCfg() but before Init().

Parameters
[in]indexThe ID of the sensor.
[in]pipelineCfgAn NvSIPLPipelineConfiguration to set.
[out]queuesThe queues that will deliver completed frames and events to the client.
Returns
SIPLStatus the completion status of the operation.

◆ SetPlatformCfg() [1/2]

virtual SIPLStatus nvsipl::INvSIPLCamera::SetPlatformCfg ( const PlatformCfg *const  platformCfg)
pure virtual

Sets a platform configuration.

The method sets a PlatformCfg camera platform configuration. NvSIPLCamera uses the information in the platform configuration to create the necessary DeviceBlock(s) and Pipeline Manager(s). This function must be called before SetPipelineCfg().

Parameters
[in]platformCfgPlatformCfg The external devices referenced in the platform configuration must be supported by the SIPL Device Block drivers.
Returns
SIPLStatus the completion status of the operation.

◆ SetPlatformCfg() [2/2]

virtual SIPLStatus nvsipl::INvSIPLCamera::SetPlatformCfg ( const PlatformCfg *const  platformCfg,
NvSIPLDeviceBlockQueues queues 
)
pure virtual

Sets a platform configuration and returns the device block notification queues.

The method sets a PlatformCfg camera platform configuration and returns the device block notification queues. NvSIPLCamera uses the information in the platform configuration to create the necessary DeviceBlock(s) and Pipeline Manager(s). This function must be called before SetPipelineCfg().

Parameters
[in]platformCfgPlatformCfg
[out]queuesThe queues that will deliver device block notificatons.

The external devices referenced in the platform configuration must be supported by the SIPL Device Block drivers.

Returns
SIPLStatus the completion status of the operation.

◆ Start()

virtual SIPLStatus nvsipl::INvSIPLCamera::Start ( void  )
pure virtual

Starts NvSIPL Camera for the selected platform configuration.

The method internally starts the streaming from sensors belonging to each device block in the selected platform configuration and starts the associated image processing pipelines.

This method must be called after RegisterImageGroups(), (if ISP output is enabled) RegisterImages(), and (if using NvSci) RegisterNvSciSyncObj().

Returns
SIPLStatus the completion status of the operation.

◆ Stop()

virtual SIPLStatus nvsipl::INvSIPLCamera::Stop ( void  )
pure virtual

Stops NvSIPL Camera for the selected platform configuration.

The method internally stops the streaming from sensors belonging to each device block in the selected platform configuration and stops the associated image processing pipelines.

This method must be called after Start().

Returns
SIPLStatus the completion status of the operation.

◆ ToggleLED()

virtual SIPLStatus nvsipl::INvSIPLCamera::ToggleLED ( uint32_t  index,
bool  enable 
)
pure virtual

Control the LED on the associated camera module.

The method tries to enable or disable the LED on the specific module.

This method is valid only if there is an LED on the camera module and it is controlled by the sensor.

This method should only be called after Start() and before Stop().

Parameters
[in]indexThe ID of the sensor.
[in]enableEnable or disable LED.
Returns
SIPLStatus the completion status of the operation.

The documentation for this class was generated from the following file: