NVIDIA DRIVE OS Linux API Reference

5.1.0.2 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>
29 namespace nvsipl
30 {
31 
45 static const std::uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM = 4U;
46 
48 static const std::uint32_t MAX_CAMERAMODULES_PER_BLOCK = 4U;
49 
51 static const std::uint32_t MAX_SENSORS_PER_CAMERA_MODULE = 2U;
52 
55 
57 static const std::uint32_t MAX_VIRTUAL_CHANNELS_PER_SENSOR = 4U;
58 
61 
64 
66 struct SensorInfo
67 {
68 
70  struct Resolution
71  {
72  std::uint32_t width = 0U;
73  std::uint32_t height = 0U;
74  };
75 
78  {
80  std::uint32_t cfa = 0U;
82  std::uint32_t embeddedTopLines = -1U;
84  std::uint32_t embeddedBottomLines = -1U;
86  std::string inputFormat = "";
90  float fps = 0;
93  };
94 
96  std::uint32_t id = -1U;
98  std::string name = "";
100  std::string description = "";
102  uint32_t i2cAddress = -1U;
108  bool isTriggerModeEnabled = false;
111  bool isTPGEnabled = false;
113  uint32_t patternMode = 0;
114 };
115 
118 {
120  std::string name = "";
122  std::string description = "";
124  std::uint32_t i2cAddress = -1U;
125 };
126 
128 struct SerInfo
129 {
131  std::string name = "";
133  std::string description = "";
135  std::uint32_t i2cAddress = -1U;
136 };
137 
143 {
145  std::string name = "";
147  std::string description = "";
149  std::uint32_t linkIndex = -1U;
152 
155  uint32_t numEEPROMs = 0;
158 
161  uint32_t numSensors = 0;
164 };
165 
167 struct DeserInfo
168 {
170  std::string name = "";
172  std::string description = "";
174  std::uint32_t i2cAddress = -1U;
175 };
176 
182 {
189  bool isSlaveModeEnabled = false;
195  bool isGroupInitProg = false;
197  std::uint32_t i2cDevice = -1U;
201  bool isPwrCtrlDisabled = false;
202 
205  uint32_t numCameraModules = 0;
208 };
209 
215 {
216 public:
218  typedef struct
219  {
222  std::uint32_t numOfSensors;
223 
225  typedef struct
226  {
229  std::uint32_t numOfVCs;
230 
232  typedef struct
233  {
236  std::uint32_t virtualChannelIndex;
237 
241 
244 
246  std::uint32_t embeddedTop;
247 
249  std::uint32_t embeddedBot;
250 
252  std::uint32_t frameRate;
254 
256  std::uint32_t sensorIndex;
257 
260 
263 
266  } SensorProperty;
267 
270 
272 
274  typedef struct
275  {
278  std::uint32_t numOfModules;
279 
283 
284  static constexpr std::uint32_t MAJOR_VER = 0U;
285  static constexpr std::uint32_t MINOR_VER = 0U;
286  static constexpr std::uint32_t PATCH_VER = 0U;
289  struct Version
290  {
291  std::uint32_t uMajor = MAJOR_VER;
292  std::uint32_t uMinor = MINOR_VER;
293  std::uint32_t uPatch = PATCH_VER;
294  };
295 
299  static void GetVersion(Version& version);
300 
308  static std::unique_ptr <INvSIPLDeviceBlock> Create(void);
309 
316  virtual SIPLStatus SetConfig(const DeviceBlockInfo* deviceBlockInfo) = 0;
317 
323  virtual SIPLStatus Init(void) = 0;
324 
330  virtual SIPLStatus Start(void) = 0;
331 
335  virtual SIPLStatus Stop(void) = 0;
336 
340  virtual SIPLStatus Deinit(void) = 0;
341 
349  virtual SIPLStatus GetProperty(DeviceBlockProperty& property) const = 0;
350 
357  virtual SIPLStatus WaitForError(void) = 0;
366  virtual SIPLStatus DetectErrors(std::uint8_t& cameraModules) = 0;
367 
376  virtual SIPLStatus ReconfigureModule(std::uint8_t cameraModules) = 0;
377 
379  virtual ~INvSIPLDeviceBlock() = default;
380 };
381 
384 } // namespace nvsipl
385 
386 #endif //_NVSIPLDEVICEBLOCK_HPP_
virtual SIPLStatus Stop(void)=0
Stops the streaming from sensors.
EEPROMInfo eepromInfoList[MAX_EEPROMS_PER_CAMERA_MODULE]
Defines an array of EEPROMInfo.
bool isTriggerModeEnabled
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 specific ...
NvMediaICPInterfaceType
Determines the image capture interface type for CSI interface.
Definition: nvmedia_icp.h:87
Defines the deserializer information.
std::uint32_t width
Indicates the width in pixels.
Defines the information of a virtual channel/single exposure.
Holds image capture settings for the CSI format.
Definition: nvmedia_icp.h:184
SensorInfo sensorInfoList[MAX_SENSORS_PER_CAMERA_MODULE]
Holds an array of SensorInfo objects.
std::string description
Holds the description of the serializer.
static std::unique_ptr< INvSIPLDeviceBlock > Create(void)
Creates an instance of INvSIPLDeviceBlock implementation.
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 CameraModuleInfo objects.
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
Indicates the height in pixels.
std::uint32_t i2cAddress
Holds the native I2C address of the deserializer.
NvMediaICPCsiPhyMode phyMode
Specifies 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
Specifies the NvMediaICPInterfaceType CSI port of Tegra on which the deserializer is connected...
Defines the EEPROM information.
std::string name
Holds the name of the Camera module.
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
Indicates whether the 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 Tegra.
std::uint32_t numOfVCs
Holds the number of virtual channels.
std::string name
Holds the name of the serializer.
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 on 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 the streaming from sensors.
SIPLStatus
Defines the status codes returned by functions in Sensor Input Processing Library (SIPL) modules...
virtual SIPLStatus DetectErrors(std::uint8_t &cameraModules)=0
Detect errors on the cameras device(s).
VirtualChannelInfo vcInfoList[MAX_VIRTUAL_CHANNELS_PER_SENSOR]
Defines an array of virtual channel information.
NvMediaISCDevice * EEPROMHandle
Holds the NvMediaISCDevice handle of the EEPROM.
std::string name
Holds the name of the deserializer.
Defines the image sensor information.
bool isTPGEnabled
Indicates whether the sensor requires configuration in Test Pattern Generator (TPG) mode...
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:146
std::string name
Holds the name of the EEPROM.
std::uint32_t sensorIndex
Holds the ID of the sensor specified in the PlatformCfg.
std::string inputFormat
Holds the input format.
static constexpr std::uint32_t PATCH_VER
Indicates a patch revision.
void NvMediaISCDevice
Holds an opaque handle representing a NvMediaISCDevice object.
Definition: nvmedia_isc.h:117
virtual SIPLStatus Deinit(void)=0
De-initializes 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.
static constexpr std::uint32_t MINOR_VER
Indicates a minor revision.
virtual SIPLStatus WaitForError(void)=0
Wait for an error to occur.
NvMediaICPCsiPhyMode
Specifies CSI phy mode.
Definition: nvmedia_icp.h:174
virtual SIPLStatus ReconfigureModule(std::uint8_t cameraModules)=0
Recover 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.
bool isSimulatorModeEnabled
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
Indicates whether power control is disabled on the platform.
std::uint32_t numOfSensors
Holds the number of image sensors in the module.
bool isSlaveModeEnabled
Indicates whether slave mode needs to 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 color filter array order.