HAL Device API

class Device

Device abstraction.

Public Functions

template<typename FacilityType>
inline FacilityType *get_facility()

Returns facility.

template<typename FacilityType>
inline const FacilityType *get_facility() const

Returns facility.

Device(Device &&dev) = default

Move constructor.

Parameters

dev – Device from which this instance will be moved from

Device &operator=(Device &&dev) = default

Move operator.

Parameters

dev – Device from which a new instance will be moved from

Returns

A device moved from dev

enum Metavision::ConnectionType

Types of links.

Values:

enumerator MIPI_LINK
enumerator USB_LINK
enumerator NETWORK_LINK
enumerator PROPRIETARY_LINK
struct PluginCameraDescription

Struct returned by the plugin with the camera information.

Subclassed by Metavision::CameraDescription

Public Members

std::string serial_

Serial number of the camera.

ConnectionType connection_

Type of connection used to communicate with the camera.

struct CameraDescription : public Metavision::PluginCameraDescription

Struct to store camera information.

Public Functions

inline CameraDescription(const PluginCameraDescription &desc)

Copy constructor from base class.

std::string get_full_serial() const

Returns a string identifying uniquely each camera in the form “integrator:plugin:serial”.

Public Members

std::string integrator_name_

Integrator’s name.

std::string plugin_name_

Plugin’s name.

using Metavision::DeviceDiscovery::SerialList = std::list<std::string>

Alias to list cameras’ serial numbers.

using Metavision::DeviceDiscovery::SystemList = std::list<CameraDescription>

Alias to list CameraDescription.

static SerialList Metavision::DeviceDiscovery::list()

Lists serial numbers of available sources, including remote cameras.

static SerialList Metavision::DeviceDiscovery::list_local()

Lists serial numbers of local available sources.

Note

A camera is considered local if we communicate directly with it.

static SerialList Metavision::DeviceDiscovery::list_remote()

Lists serial numbers of remote available sources.

Note

A camera is considered remote if it is part of another SoC and hence communication is indirect.

static SystemList Metavision::DeviceDiscovery::list_available_sources()

Lists available sources, including remote cameras.

static SystemList Metavision::DeviceDiscovery::list_available_sources_local()

Lists only local available sources.

Note

A source is considered local if we communicate directly with it.

static SystemList Metavision::DeviceDiscovery::list_available_sources_remote()

Lists only remote available sources.

Note

A source is considered remote if it is part of another SoC and hence communication is indirect.

static std::unique_ptr<Device> Metavision::DeviceDiscovery::open(const std::string &serial)

Builds a new Device.

Parameters

serial – Serial number of the camera to open. If it is an empty string, the first available camera will be opened

Returns

A new Device

static std::unique_ptr<Device> Metavision::DeviceDiscovery::open(const std::string &serial, const DeviceConfig &config)

Builds a new Device.

Parameters
  • serial – Serial number of the camera to open. If it is an empty string, the first available camera will be opened

  • config – Configuration used to build the camera

Returns

A new Device

Warning

doxygenfunction: Unable to resolve function “Metavision::DeviceDiscovery::open_raw_file” with arguments (const std::string&) in doxygen xml output for project “HAL” from directory: /home/jenkins/agent/workspace/_validation_ubuntu_hotfix_v5.0.0/workdir_ubuntu-22.04/_build/generated/doc_build/hal/doxygen/xml. Potential matches:

- std::unique_ptr<Device> open_raw_file(const std::filesystem::path &raw_file)
- std::unique_ptr<Device> open_raw_file(const std::filesystem::path &raw_file, const RawFileConfig &file_config)

Warning

doxygenfunction: Unable to resolve function “Metavision::DeviceDiscovery::open_raw_file” with arguments (const std::string&, const RawFileConfig&) in doxygen xml output for project “HAL” from directory: /home/jenkins/agent/workspace/_validation_ubuntu_hotfix_v5.0.0/workdir_ubuntu-22.04/_build/generated/doc_build/hal/doxygen/xml. Potential matches:

- std::unique_ptr<Device> open_raw_file(const std::filesystem::path &raw_file)
- std::unique_ptr<Device> open_raw_file(const std::filesystem::path &raw_file, const RawFileConfig &file_config)