NVIDIA DRIVE OS Linux SDK API Reference Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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  */
14 #include "NvSIPLCommon.hpp"
16 #include "nvmedia_core.h"
17 #include "nvmedia_icp.h"
18 #include "nvmedia_isc.h"
20 #include <string>
21 #include <cstdint>
22 #include <memory>
32 namespace nvsipl
33 {
48 static const std::uint32_t MAX_DEVICEBLOCKS_PER_PLATFORM = 4U;
51 static const std::uint32_t MAX_CAMERAMODULES_PER_BLOCK = 4U;
54 static const std::uint32_t MAX_SENSORS_PER_CAMERA_MODULE = 2U;
60 static const std::uint32_t MAX_VIRTUAL_CHANNELS_PER_SENSOR = 4U;
69 struct SensorInfo
70 {
73  struct Resolution
74  {
75  std::uint32_t width = 0U;
76  std::uint32_t height = 0U;
77  };
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  };
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 };
129 {
131  std::string name = "";
133  std::string description = "";
135  std::uint32_t i2cAddress = -1U;
136 };
139 struct SerInfo
140 {
142  std::string name = "";
144  std::string description = "";
146  std::uint32_t i2cAddress = -1U;
147 };
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 };
178 struct DeserInfo
179 {
181  std::string name = "";
183  std::string description = "";
185  std::uint32_t i2cAddress = -1U;
186 };
195 {
203  bool isSlaveModeEnabled = false;
210  bool isGroupInitProg = false;
213  std::uint32_t i2cDevice = -1U;
218  bool isPwrCtrlDisabled = false;
223  uint32_t numCameraModules = 0;
227 };
235 {
236 public:
238  typedef struct
239  {
242  std::uint32_t numOfSensors;
245  typedef struct
246  {
249  std::uint32_t numOfVCs;
252  typedef struct
253  {
256  std::uint32_t virtualChannelIndex;
266  std::uint32_t embeddedTop;
269  std::uint32_t embeddedBot;
272  std::uint32_t frameRate;
277  std::uint32_t sensorIndex;
287  } SensorProperty;
295  typedef struct
296  {
299  std::uint32_t numOfModules;
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  };
330  static void GetVersion(Version& version);
342  static std::unique_ptr <INvSIPLDeviceBlock> Create(void);
351  virtual SIPLStatus SetConfig(const DeviceBlockInfo* deviceBlockInfo) = 0;
359  virtual SIPLStatus Init(void) = 0;
367  virtual SIPLStatus Start(void) = 0;
373  virtual SIPLStatus Stop(void) = 0;
379  virtual SIPLStatus Deinit(void) = 0;
391  virtual SIPLStatus GetProperty(DeviceBlockProperty& property) const = 0;
400  virtual SIPLStatus WaitForError(void) = 0;
409  virtual SIPLStatus DetectErrors(std::uint8_t& cameraModules) = 0;
418  virtual SIPLStatus ReconfigureModule(std::uint8_t cameraModules) = 0;
421  virtual ~INvSIPLDeviceBlock() = default;
422 };
426 } // namespace nvsipl
virtual SIPLStatus Stop(void)=0
Stops streaming from the sensors.
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...
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
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
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).
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.
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.