HAL Device API

class Metavision::Device

Device abstraction.

Public Functions

template<typename FacilityType>
FacilityType *get_facility()

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.

Return

A device moved from dev

Parameters
  • dev: Device from which a new instance will be moved from

~Device()

Destructor.

enum Metavision::ConnectionType

Types of links.

Values:

enumerator MIPI_LINK = 1
enumerator USB_LINK = 2
enumerator NETWORK_LINK = 3
enumerator PROPRIETARY_LINK = 4
struct Metavision::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.

long system_id_

System Identification number.

struct Metavision::CameraDescription : public Metavision::PluginCameraDescription

Struct to store camera information.

Public Functions

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.

SerialList Metavision::DeviceDiscovery::list()

Lists serial numbers of available sources, including remote cameras.

SerialList Metavision::DeviceDiscovery::list_local()

Lists serial numbers of local available sources.

SerialList Metavision::DeviceDiscovery::list_remote()

Lists serial numbers of remote available sources.

SystemList Metavision::DeviceDiscovery::list_available_sources()

Lists available sources, including remote cameras.

SystemList Metavision::DeviceDiscovery::list_available_sources_local()

Lists only local available sources.

SystemList Metavision::DeviceDiscovery::list_available_sources_remote()

Lists only remote available sources.

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

Builds a new Device.

Return

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

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

Builds a new Device.

Return

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

std::unique_ptr<Device> Metavision::DeviceDiscovery::open_raw_file(const std::string &raw_file)

Builds a new Device from file.

Return

A new Device

Parameters
  • raw_file: Path to the file to open

std::unique_ptr<Device> Metavision::DeviceDiscovery::open_raw_file(const std::string &raw_file, RawFileConfig &file_config)

Builds a new Device from file.

Return

A new Device

Parameters
  • raw_file: Path to the file to open

  • file_config: Configuration describing how to read the file (see RawFileConfig)