NVIDIA DRIVE OS Linux SDK API Reference

5.1.9.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_core.h"
17 #include "nvmedia_icp.h"
18 #include "nvmedia_isc.h"
19 
20 #include <string>
21 #include <cstdint>
22 #include <memory>
23 
32 namespace nvsipl
33 {
34 
48 static const std::uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM = 4U;
49 
51 static const std::uint32_t MAX_CAMERAMODULES_PER_BLOCK = 4U;
52 
54 static const std::uint32_t MAX_SENSORS_PER_CAMERA_MODULE = 2U;
55 
58 
60 static const std::uint32_t MAX_VIRTUAL_CHANNELS_PER_SENSOR = 4U;
61 
64 
67 
69 struct SensorInfo
70 {
71 
73  struct Resolution
74  {
75  std::uint32_t width = 0U;
76  std::uint32_t height = 0U;
77  };
78 
81  {
88  std::uint32_t cfa = 0U;
90  std::uint32_t embeddedTopLines = -1U;
92  std::uint32_t embeddedBottomLines = -1U;
94  std::string inputFormat = "";
98  float fps = 0;
101  };
102 
104  std::uint32_t id = -1U;
106  std::string name = "";
108  std::string description = "";
110  uint32_t i2cAddress = -1U;
118  bool isTriggerModeEnabled = false;
122  bool isTPGEnabled = false;
124  uint32_t patternMode = 0;
125 };
126 
129 {
131  std::string name = "";
133  std::string description = "";
135  std::uint32_t i2cAddress = -1U;
136 };
137 
139 struct SerInfo
140 {
142  std::string name = "";
144  std::string description = "";
146  std::uint32_t i2cAddress = -1U;
147 };
148 
154 {
156  std::string name = "";
158  std::string description = "";
161  std::uint32_t linkIndex = -1U;
166  uint32_t numEEPROMs = 0;
172  uint32_t numSensors = 0;
175 };
176 
178 struct DeserInfo
179 {
181  std::string name = "";
183  std::string description = "";
185  std::uint32_t i2cAddress = -1U;
186 };
187 
195 {
203  bool isSlaveModeEnabled = false;
210  bool isGroupInitProg = false;
213  std::uint32_t i2cDevice = -1U;
218  bool isPwrCtrlDisabled = false;
219 
223  uint32_t numCameraModules = 0;
227 };
228 
235 {
236 public:
238  typedef struct
239  {
242  std::uint32_t numOfSensors;
243 
245  typedef struct
246  {
249  std::uint32_t numOfVCs;
250 
252  typedef struct
253  {
256  std::uint32_t virtualChannelIndex;
257 
261 
264 
266  std::uint32_t embeddedTop;
267 
269  std::uint32_t embeddedBot;
270 
272  std::uint32_t frameRate;
274 
277  std::uint32_t sensorIndex;
278 
281 
284 
287  } SensorProperty;
288 
291 
293 
295  typedef struct
296  {
299  std::uint32_t numOfModules;
300 
304 
305  static constexpr std::uint32_t MAJOR_VER = 1U;
307  static constexpr std::uint32_t MINOR_VER = 0U;
309  static constexpr std::uint32_t PATCH_VER = 0U;
318  struct Version
319  {
320  std::uint32_t uMajor = MAJOR_VER;
321  std::uint32_t uMinor = MINOR_VER;
322  std::uint32_t uPatch = PATCH_VER;
323  };
324 
330  static void GetVersion(Version& version);
331 
342  static std::unique_ptr <INvSIPLDeviceBlock> Create(void);
343 
351  virtual SIPLStatus SetConfig(const DeviceBlockInfo* deviceBlockInfo) = 0;
352 
359  virtual SIPLStatus Init(void) = 0;
360 
367  virtual SIPLStatus Start(void) = 0;
368 
373  virtual SIPLStatus Stop(void) = 0;
374 
379  virtual SIPLStatus Deinit(void) = 0;
380 
391  virtual SIPLStatus GetProperty(DeviceBlockProperty& property) const = 0;
392 
400  virtual SIPLStatus WaitForError(void) = 0;
401 
409  virtual SIPLStatus DetectErrors(std::uint8_t& cameraModules) = 0;
410 
418  virtual SIPLStatus ReconfigureModule(std::uint8_t cameraModules) = 0;
419 
421  virtual ~INvSIPLDeviceBlock() = default;
422 };
423 
426 } // namespace nvsipl
427 
428 #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:180
Defines the information of a virtual channel/single exposure.
Holds image capture settings for the CSI format.
Definition: nvmedia_icp.h:210
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.
NVIDIA Media Interface: Core
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.
NVIDIA Media Interface: Image Capture Processing
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.
Specifies that CSI is in DPHY mode.
Definition: nvmedia_icp.h:202
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:200
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.