HAL Decoders API
-
template<bool HAS_4_BITS_INTERFACE>
class AERDecoder : public Metavision::I_EventsStreamDecoder Public Functions
-
inline virtual bool get_timestamp_shift(timestamp &ts_shift) const override
Finds the timestamp shift.
If the timestamp shift (timestamp of the first event in the stream) is already known, the function returns true and the parameter
timestamp_shift
will be set to its value. Otherwise, the function returns false and does nothing.- Returns
true if the timestamp shift is already known, false otherwise
-
inline virtual timestamp get_last_timestamp() const final override
Gets the timestamp of the last event.
- Returns
Timestamp of the last event
-
inline virtual uint8_t get_raw_event_size_bytes() const override
Gets size of a raw event element in bytes.
-
inline virtual bool get_timestamp_shift(timestamp &ts_shift) const override
-
template<class FrameType, typename T>
class EHCDecoder : public Metavision::I_EventFrameDecoder<FrameType> Public Functions
-
inline virtual void decode(const RawData *const raw_data_begin, const RawData *const raw_data_end) override
Decodes raw event frame data.
Warning
It is mandatory to pass strictly consecutive buffers from the same source to this method
- Parameters
raw_data_begin – Pointer to start of frame data
raw_data_end – Pointer after the last byte of frame data
-
inline virtual void decode(const RawData *const raw_data_begin, const RawData *const raw_data_end) override
-
class Histo3dDecoder : public Metavision::EHCDecoder<RawEventFrameHisto, uint8_t>
Public Functions
-
inline virtual uint8_t get_raw_event_size_bytes() const override
Gets size of a raw event element in bytes.
-
inline virtual uint8_t get_raw_event_size_bytes() const override
-
class Diff3dDecoder : public Metavision::EHCDecoder<RawEventFrameDiff, int8_t>
Public Functions
-
inline virtual uint8_t get_raw_event_size_bytes() const override
Gets size of a raw event element in bytes.
-
inline virtual uint8_t get_raw_event_size_bytes() const override
-
class EVT2Decoder : public Metavision::I_EventsStreamDecoder
Public Functions
-
inline virtual bool get_timestamp_shift(timestamp &ts_shift) const override
Finds the timestamp shift.
If the timestamp shift (timestamp of the first event in the stream) is already known, the function returns true and the parameter
timestamp_shift
will be set to its value. Otherwise, the function returns false and does nothing.- Returns
true if the timestamp shift is already known, false otherwise
-
inline virtual timestamp get_last_timestamp() const override
Gets the timestamp of the last event.
- Returns
Timestamp of the last event
-
inline virtual uint8_t get_raw_event_size_bytes() const override
Gets size of a raw event element in bytes.
-
inline virtual bool get_timestamp_shift(timestamp &ts_shift) const override
-
class Evt2Encoder
Class to encode events in EVT2 format.
Public Functions
-
Evt2Encoder() = default
Constructor.
-
void reset_state()
resets the internal timehigh state of the encoder
-
void encode_event_cd(std::ofstream &ofs, const EventCD &ev)
Encodes a CD event and writes it to the output stream.
- Parameters
ofs – Output stream to write the encoded event to
ev – CD event to encode
-
void encode_event_trigger(std::ofstream &ofs, const EventExtTrigger &ev)
Encodes a trigger event and writes it to the output stream.
- Parameters
ofs – Output stream to write the encoded event to
ev – Trigger event to encode
-
Evt2Encoder() = default
-
template<class Validator>
class EVT3Decoder : public Metavision::I_EventsStreamDecoder Public Functions
-
inline virtual bool get_timestamp_shift(timestamp &ts_shift) const override
Finds the timestamp shift.
If the timestamp shift (timestamp of the first event in the stream) is already known, the function returns true and the parameter
timestamp_shift
will be set to its value. Otherwise, the function returns false and does nothing.- Returns
true if the timestamp shift is already known, false otherwise
-
inline virtual timestamp get_last_timestamp() const final override
Gets the timestamp of the last event.
- Returns
Timestamp of the last event
-
inline virtual uint8_t get_raw_event_size_bytes() const override
Gets size of a raw event element in bytes.
-
inline virtual size_t add_protocol_violation_callback(const ProtocolViolationCallback_t &cb) override
Adds a function to be called when decoder protocol is breached.
Note
This method is not thread safe. You should add/remove the various callback before starting the streaming
Note
It’s not allowed to add/remove a callback from the callback itself
- Parameters
cb – Callback to add
- Returns
ID of the added callback
-
inline virtual bool remove_protocol_violation_callback(size_t callback_id) override
Removes a previously registered protocol violation callback.
Note
This method is not thread safe. You should add/remove the various callback before starting the streaming
- Parameters
callback_id – Callback ID
- Returns
true if the callback has been unregistered correctly, false otherwise.
-
inline virtual bool get_timestamp_shift(timestamp &ts_shift) const override
-
template<class Validator>
class EVT4Decoder : public Metavision::I_EventsStreamDecoder Public Functions
-
inline virtual bool get_timestamp_shift(timestamp &ts_shift) const override
Finds the timestamp shift.
If the timestamp shift (timestamp of the first event in the stream) is already known, the function returns true and the parameter
timestamp_shift
will be set to its value. Otherwise, the function returns false and does nothing.- Returns
true if the timestamp shift is already known, false otherwise
-
inline virtual timestamp get_last_timestamp() const override
Gets the timestamp of the last event.
- Returns
Timestamp of the last event
-
inline virtual std::uint8_t get_raw_event_size_bytes() const override
Gets size of a raw event element in bytes.
-
inline virtual bool get_timestamp_shift(timestamp &ts_shift) const override
-
template<typename RawEvent, typename Event_TIME_HIGH, typename Event_2D, typename Event_EXT_TRIGGER, typename Event_OTHERS, typename OutputCDType = EventCD>
class EVT21GenericDecoder : public Metavision::I_EventsStreamDecoder Public Functions
-
inline virtual timestamp get_last_timestamp() const final override
Gets the timestamp of the last event.
- Returns
Timestamp of the last event
-
inline virtual bool get_timestamp_shift(Metavision::timestamp ×tamp_shift) const override
Finds the timestamp shift.
If the timestamp shift (timestamp of the first event in the stream) is already known, the function returns true and the parameter
timestamp_shift
will be set to its value. Otherwise, the function returns false and does nothing.- Returns
true if the timestamp shift is already known, false otherwise
-
inline virtual uint8_t get_raw_event_size_bytes() const override
Gets size of a raw event element in bytes.
-
inline virtual timestamp get_last_timestamp() const final override
-
class MTRDecoder : public Metavision::I_EventFrameDecoder<PointCloud>
Public Functions
-
inline MTRDecoder(int sensor_width = 1280, int sensor_height = 720, MTRMode mode = MTRMode::MTR)
Constructor.
- Parameters
sensor_width – Width of the sensor
sensor_height – Height of the sensor
mode – MTR (Module for Triangulation) stream mode
-
inline virtual uint8_t get_raw_event_size_bytes() const override
Gets size of a raw event in bytes.
-
inline MTRDecoder(int sensor_width = 1280, int sensor_height = 720, MTRMode mode = MTRMode::MTR)