HAL Utils API¶
-
class
Metavision
::
DeviceConfig
¶ Device’s configuration’s options.
Subclassed by Metavision::RawFileConfig
Public Members
-
std::string
event_format_
¶ Switch the event format if supported.
-
std::string
-
using
Metavision
::
HalErrorCodeType
= int¶ Alias type used for HalErrorCode enums.
-
enum
Metavision
::
HalErrorCode
¶ Enum that holds error codes for HAL exceptions.
Values:
-
enumerator
CameraError
= 0x100000¶ Base Hal camera error.
-
enumerator
FailedInitialization
= CameraError | 0x01000¶ Camera failed initialization.
-
enumerator
CameraNotFound
= FailedInitialization | 0x1¶ Failed initialisation due to a camera not found.
-
enumerator
InternalInitializationError
= FailedInitialization | 0x100¶ Metavision Internal Initialization problem.
-
enumerator
InvalidArgument
= CameraError | 0x02000¶ Errors related to invalid arguments.
-
enumerator
InvalidAFKValue
= InvalidArgument | 0x1¶ Wrong AFK arguments given.
-
enumerator
-
class
Metavision
::
HalException
: public std::system_error¶ Class for all exceptions thrown by Metavision HAL.
Public Functions
-
HalException
(HalErrorCodeType e)¶ Creates an exception of type e with default error message.
- Parameters
e
: Camera error code
-
HalException
(HalErrorCodeType e, const std::string &additional_info)¶ Creates an exception of type e with an error description in additional_info.
- Parameters
e
: Camera error codeadditional_info
: Error description
-
-
Metavision::SoftwareInfo &
Metavision
::
get_hal_software_info
()¶ Returns various software information such as the version.
-
class
Metavision
::
RawFileConfig
: public Metavision::DeviceConfig¶ RAW files configuration’s options.
Public Members
-
uint32_t
n_events_to_read_
= 1000000¶ Number of events_byte_size blocks to read. At each read, n_events_to_read_*sizeof(event) bytes are read. No effect if emulating real time is used
-
size_t
max_events_per_buffer_
= 5 * n_events_to_read_¶ The memory capacity used to store data read from the file is at most max_events_per_buffer_*sizeof(event). When reached, we wait for this data to be polled before reading again.
-
bool
do_time_shifting_
= true¶ Take the first timer high of the file as origin of time.
-
uint32_t
-
std::string
Metavision::HeaderHelper
::
get_sub_system_id
(const HeaderHelper::HeaderType &header)¶ Returns the sub system id from the header if exists in the header or an empty string otherwise. Parses both SUB SYSTEM ID KEYs.
- Return
A string containing the value of the requested key
- Parameters
header
: Header containing the file info (Version, date, height etc.)
-
std::string
Metavision::HeaderHelper
::
get_firmware_version_as_string
(long firmware_version)¶ Returns firmware version in standard header format from a firmware version.
Gets firmware version.
- Parameters
firmware_version
: Firmware version