NVIDIA DRIVE OS Linux SDK API Reference

5.1.6.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NvSIPLDeviceBlock.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019, 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 
11 #ifndef _NVSIPLDEVICEBLOCK_HPP_
12 #define _NVSIPLDEVICEBLOCK_HPP_
13 
14 #include "NvSIPLCommon.hpp"
15 
16 #include "nvmedia_isc.h"
17 
18 #include <string>
19 #include <cstdint>
20 #include <memory>
21 #include <vector>
30 namespace nvsipl
31 {
32 
46 static const std::uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM = 4U;
47 
49 static const std::uint32_t MAX_CAMERAMODULES_PER_BLOCK = 4U;
50 
52 static const std::uint32_t MAX_SENSORS_PER_CAMERA_MODULE = 2U;
53 
56 
58 static const std::uint32_t MAX_VIRTUAL_CHANNELS_PER_SENSOR = 4U;
59 
62 
65 
67 struct SensorInfo
68 {
69 
71  struct Resolution
72  {
73  std::uint32_t width = 0U;
74  std::uint32_t height = 0U;
75  };
76 
79  {
86  std::uint32_t cfa = 0U;
88  std::uint32_t embeddedTopLines = -1U;
90  std::uint32_t embeddedBottomLines = -1U;
92  std::string inputFormat = "";
96  float fps = 0;
99  };
100 
102  std::uint32_t id = -1U;
104  std::string name = "";
106  std::string description = "";
108  uint32_t i2cAddress = -1U;
116  bool isTriggerModeEnabled = false;
120  bool isTPGEnabled = false;
122  uint32_t patternMode = 0;
123 };
124 
127 {
129  std::string name = "";
131  std::string description = "";
133  std::uint32_t i2cAddress = -1U;
134 };
135 
137 struct SerInfo
138 {
140  std::string name = "";
142  std::string description = "";
144  std::uint32_t i2cAddress = -1U;
145 };
146 
152 {
154  std::string name = "";
156  std::string description = "";
159  std::uint32_t linkIndex = -1U;
164  uint32_t numEEPROMs = 0;
170  uint32_t numSensors = 0;
173 };
174 
176 struct DeserInfo
177 {
179  std::string name = "";
181  std::string description = "";
183  std::uint32_t i2cAddress = -1U;
184 };
185 
193 {
201  bool isSlaveModeEnabled = false;
208  bool isGroupInitProg = false;
211  std::uint32_t i2cDevice = -1U;
216  bool isPwrCtrlDisabled = false;
217 
221  uint32_t numCameraModules = 0;
225 };
226 
233 {
234 public:
236  typedef struct
237  {
240  std::uint32_t numOfSensors;
241 
243  typedef struct
244  {
247  std::uint32_t numOfVCs;
248 
250  typedef struct
251  {
254  std::uint32_t virtualChannelIndex;
255 
259 
262 
264  std::uint32_t embeddedTop;
265 
267  std::uint32_t embeddedBot;
268 
270  std::uint32_t frameRate;
272 
275  std::uint32_t sensorIndex;
276 
279 
282 
285  } SensorProperty;
286 
289 
291 
293  typedef struct
294  {
297  std::uint32_t numOfModules;
298 
302 
303  static constexpr std::uint32_t MAJOR_VER = 0U;
305  static constexpr std::uint32_t MINOR_VER = 0U;
307  static constexpr std::uint32_t PATCH_VER = 0U;
311  struct Version
312  {
313  std::uint32_t uMajor = MAJOR_VER;
314  std::uint32_t uMinor = MINOR_VER;
315  std::uint32_t uPatch = PATCH_VER;
316  };
317 
323  static void GetVersion(Version& version);
324 
335  static std::unique_ptr <INvSIPLDeviceBlock> Create(void);
336 
344  virtual SIPLStatus SetConfig(const DeviceBlockInfo* deviceBlockInfo) = 0;
345 
352  virtual SIPLStatus Init(void) = 0;
353 
360  virtual SIPLStatus Start(void) = 0;
361 
366  virtual SIPLStatus Stop(void) = 0;
367 
372  virtual SIPLStatus Deinit(void) = 0;
373 
384  virtual SIPLStatus GetProperty(DeviceBlockProperty& property) const = 0;
385 
393  virtual SIPLStatus WaitForError(void) = 0;
394 
402  virtual SIPLStatus DetectErrors(std::uint8_t& cameraModules) = 0;
403 
411  virtual SIPLStatus ReconfigureModule(std::uint8_t cameraModules) = 0;
412 
414  virtual ~INvSIPLDeviceBlock() = default;
415 };
416 
419 } // namespace nvsipl
420 
421 #endif //_NVSIPLDEVICEBLOCK_HPP_
virtual SIPLStatus Stop(void)=0
Stops streaming from the sensors.
EEPROMInfo eepromInfoList[MAX_EEPROMS_PER_CAMERA_MODULE]
Holds an array of information about each EEPROM device in a camera module.
bool isTriggerModeEnabled
Holds a flag which indicates whether trigger mode is enabled.
virtual SIPLStatus GetProperty(DeviceBlockProperty &property) const =0
Gets the properties of the NvSIPL DeviceBlock (libnvsipl_devblk.so) after initializing with a specifi...
NvMediaICPInterfaceType
Specifies the image capture interface type for the CSI interface.
Definition: nvmedia_icp.h:94
Defines the deserializer information.
std::uint32_t width
Holds the width in pixels.
Holds the handle for an NvMediaISCDevice object.
Definition: nvmedia_isc.h:155
Defines the information of a virtual channel/single exposure.
Holds image capture settings for the CSI format.
Definition: nvmedia_icp.h:209
SensorInfo sensorInfoList[MAX_SENSORS_PER_CAMERA_MODULE]
Holds an array of information about each sensor in a camera module.
std::string description
Holds the description of the serializer.
static std::unique_ptr< INvSIPLDeviceBlock > Create(void)
Creates an instance of INvSIPLDeviceBlock implementation and returns a handle.
static const std::uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM
Indicates the maximum number of device blocks per platform.
uint32_t numSensors
Holds the number of image sensors in the module.
std::string description
Holds the description of the camera module.
CameraModuleInfo cameraModuleInfoList[MAX_CAMERAMODULES_PER_BLOCK]
Holds an array of information about each camera module in the device block.
std::uint32_t uPatch
Holds a patch revision.
uint32_t numCameraModules
Holds the number of camera modules connected to the deserializer.
virtual SIPLStatus Init(void)=0
Initializes NvSIPL DeviceBlock (libnvsipl_devblk.so) for the selected configuration.
std::uint32_t height
Holds the height in pixels.
std::uint32_t i2cAddress
Holds the native I2C address of the deserializer.
NvMediaICPCsiPhyMode phyMode
Holds the NvMediaICPCsiPhyMode Phy mode.
static const std::uint32_t MAX_VIRTUAL_CHANNELS_PER_SENSOR
Indicates the maximum number of virtual channels per image sensor.
NvMediaICPInterfaceType csiPort
Holds the NvMediaICPInterfaceType that specifies the CSI port of the SoC to which the deserializer is...
Defines the EEPROM information.
std::string name
Holds the name of the camera module, for example, "SF3324".
static const std::uint32_t MAX_EEPROMS_PER_CAMERA_MODULE
Indicates the maximum number of EEPROMs per camera module.
NVIDIA Sensor Input Processing Library: Common Data Structures - Sensor Input Processing Library (SI...
bool isGroupInitProg
Holds a flag which indicates whether group initialization is enabled.
std::uint32_t embeddedTopLines
Holds the number of top embedded lines.
Defines the DeviceBlock information.
std::uint32_t i2cDevice
Holds the I2C device bus number used to connect the deserializer with the SoC.
std::uint32_t numOfVCs
Holds the number of virtual channels.
std::string name
Holds the name of the serializer, for example, "MAX96705".
Resolution resolution
Holds the Resolution of the captured frame.
static constexpr std::uint32_t MAJOR_VER
Indicates a major revision.
std::uint32_t linkIndex
Holds the index of the deserializer link to which this module is connected.
uint32_t numVirtualChannels
Holds the number of virtual channels used.
uint32_t patternMode
Holds the Test Pattern Generator (TPG) pattern mode.
std::uint32_t uMinor
Holds a minor revision.
Defines information for the camera module.
virtual SIPLStatus SetConfig(const DeviceBlockInfo *deviceBlockInfo)=0
Sets the configuration for DeviceBlockInfo.
uint32_t numEEPROMs
Holds the number of EEPROMs in the module.
bool isEmbeddedDataTypeEnabled
Indicates whether embedded data type is enabled.
Defines the image resolution.
virtual SIPLStatus Start(void)=0
Starts streaming from the sensors.
SIPLStatus
Defines the status codes returned by functions in Sensor Input Processing Library (SIPL) modules...
virtual SIPLStatus DetectErrors(std::uint8_t &cameraModules)=0
Detects errors on the cameras device(s).
VirtualChannelInfo vcInfoList[MAX_VIRTUAL_CHANNELS_PER_SENSOR]
Holds virtual channel information.
NvMediaISCDevice * EEPROMHandle
Holds the NvMediaISCDevice handle of the EEPROM.
std::string name
Holds the name of the deserializer, for example, "MAX96712".
Defines the image sensor information.
bool isTPGEnabled
Holds a flag which indicates whether the sensor requires configuration in Test Pattern Generator (TPG...
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:133
std::string name
Holds the name of the EEPROM, for example, "N24C64".
std::uint32_t sensorIndex
Holds the ID of the sensor specified in the platform configuration file.
std::string inputFormat
Holds the input format, for example, "raw12".
static constexpr std::uint32_t PATCH_VER
Indicates a patch revision.
virtual SIPLStatus Deinit(void)=0
Deinitializes NvSIPL DeviceBlock (libnvsipl_devblk.so).
std::uint32_t i2cAddress
Holds the native I2C address.
NvMediaICPSettings icpSettings
Holds the NvMediaICPSettings to configure NvMediaICP to capture the virtual channel.
std::string description
Holds the description of the image sensor.
static const std::uint32_t MAX_CAMERAMODULES_PER_PLATFORM
Indicates the maximum number of camera modules per platform.
std::string description
Holds the description of the deserializer.
std::uint32_t i2cAddress
Holds the native I2C address.
std::uint32_t uMajor
Holds a major revision.
virtual ~INvSIPLDeviceBlock()=default
Default destructor.
static const std::uint32_t MAX_SENSORS_PER_CAMERA_MODULE
Indicates the maximum number of image sensors per camera module.
NVIDIA Media Interface: Image Sensor Control (ISC)
std::string description
Holds the description of the EEPROM.
Defines the public data structures and interfaces for NvSIPL DeviceBlock.
Defines NvSIPL DeviceBlock (libnvsipl_devblk.so) version information.
std::uint32_t frameRate
Holds the channel frame rate in frames per second.
static constexpr std::uint32_t MINOR_VER
Indicates a minor revision.
virtual SIPLStatus WaitForError(void)=0
Waits for an error to occur.
NvMediaICPCsiPhyMode
Specifies the CSI phy mode.
Definition: nvmedia_icp.h:199
virtual SIPLStatus ReconfigureModule(std::uint8_t cameraModules)=0
Recovers from a camera module error.
DeserInfo deserInfo
Holds the DeserInfo deserializer information.
NvMediaISCDevice * sensorHandle
Holds the NvMediaISCDevice handle of the image sensor.
float fps
Holds the average number of frames per second.
std::string name
Holds the name of the image sensor, for example, "AR0231".
bool isSimulatorModeEnabled
Holds a flag which indicates whether simulator mode has been enabled.
static const std::uint32_t MAX_SENSORS_PER_PLATFORM
Indicates the maximum number of sensors per platform.
SerInfo serInfo
Holds the SerInfo of the serializer.
bool isPwrCtrlDisabled
Holds a flag which indicates whether power control is disabled on the platform.
std::uint32_t numOfSensors
Holds the number of image sensors in the module.
bool isSlaveModeEnabled
Holds a flag which indicates whether slave mode must be enabled.
static const std::uint32_t MAX_CAMERAMODULES_PER_BLOCK
Indicates the maximum number of camera modules per device block.
static void GetVersion(Version &version)
Gets the version of the library.
uint32_t i2cAddress
Holds the native I2C address of the image sensor.
std::uint32_t embeddedBottomLines
Holds the number of bottom embedded lines.
std::uint32_t numOfModules
Holds the number of camera modules connected to the deserializer.
Defines the serializer information.
std::uint32_t cfa
Holds the Bayer color filter array order of the sensor.