HAL Device API¶
-
class
Metavision
::
Device
¶ Device abstraction.
Public Functions
-
Device
()¶ Default constructor.
Creates an unitialized Device instance.
-
~Device
()¶ Destructor.
-
void
add_facility
(std::unique_ptr<IV_InterfaceFacility>&)¶ Adds facility to device.
-
void
add_facility
(std::unique_ptr<IV_InterfaceFacility>&&)¶ Adds facility to device.
-
void
reference_facility
(IV_InterfaceFacility &facility)¶ Adds facility to device.
-
void
set_iboardcommand
(IV_BoardCommand*)¶ Sets the board command.
-
IV_BoardCommand *
get_board_command
()¶ Returns pointer to the board command.
-
size_t
add_call_on_delete
(std::function<void()> destruction_callback)¶ Adds callback that will be called when the Device is destroyed.
- Return
Id of the callback added. That’s the value to use when removing it with method remove_call_on_delete
- Parameters
destruction_callback
: Function to call on deletion
-
void
remove_call_on_delete
(size_t call_id)¶ Removes callback that will be called when the Device is destroyed.
- Parameters
call_id
: Id of the callback to remove. See add_call_on_delete
-
void
interface_built
()¶ Calls interface_built on every register IV_InterfaceFacility to finalise the facilities construction.
-
-
enum
Metavision
::
ConnectionType
¶ Types of links.
Values:
-
enumerator
MIPI_LINK
= 1¶
-
enumerator
USB_LINK
= 2¶
-
enumerator
NETWORK_LINK
= 3¶
-
enumerator
PROPRIETARY_LINK
= 4¶
-
enumerator
-
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.
-
std::string
-
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)
-
-
typedef std::list<std::string>
Metavision::DeviceDiscovery
::
type_ListSerial
¶ Alias to list cameras’ serial numbers.
-
typedef std::list<CameraDescription>
Metavision::DeviceDiscovery
::
type_ListSystems
¶ Alias to list CameraDescription.
-
type_ListSerial
Metavision::DeviceDiscovery
::
list
()¶ Lists serial numbers of available sources, including remote cameras.
-
type_ListSerial
Metavision::DeviceDiscovery
::
list_local
()¶ Lists serial numbers of local available sources.
-
type_ListSerial
Metavision::DeviceDiscovery
::
list_remote
()¶ Lists serial numbers of remote available sources.
-
type_ListSystems
Metavision::DeviceDiscovery
::
list_available_sources
()¶ Lists available sources, including remote cameras.
-
type_ListSystems
Metavision::DeviceDiscovery
::
list_available_sources_local
()¶ Lists only local available sources.
-
type_ListSystems
Metavision::DeviceDiscovery
::
list_available_sources_remote
()¶ Lists only remote available sources.
-
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
-
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 openedconfig
: Configuration used to build the camera
-
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
-
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 openfile_config
: configuration describing how to read the file (see RawFileConfig) If false and the system id of the camera is not known, builds a default camera (currently gen1)
-
class
Metavision
::
DeviceRoi
¶ Defines a simple rectangular region.