Template Class Decoder
Defined in File evt3_decoder.h
Inheritance Relationships
Base Type
public event_camera_codecs::Decoder< MsgT, EventProcT >(Template Class Decoder)
Class Documentation
-
template<class MsgT, class EventProcT>
class Decoder : public event_camera_codecs::Decoder<MsgT, EventProcT> Public Types
-
using timestamp_t = uint64_t
Public Functions
-
inline virtual void decode(const uint8_t *buf, size_t bufSize, EventProcT *processor) override
decode buffer without using message type. Use this method if the message is not available, e.g. when calling from python.
-
inline virtual size_t decodeUntil(const uint8_t *buf, size_t bufSize, EventProcT *processor, uint64_t timeLimit, uint64_t *nextTime) override
decode buffer until reaching time limit, without using message type. Use this method if the message is not available, e.g. when calling from python.
-
template<class TimeLimiterT>
inline void doDecode(const uint8_t *buf, size_t bufSize, EventProcT *processor, uint64_t timeLimit, size_t *numConsumed, uint64_t *nextTime)
-
inline virtual bool summarize(const uint8_t *buf, size_t bufSize, uint64_t *firstTS, uint64_t *lastTS, size_t *numEventsOnOff) override
See summarize()
-
inline virtual void setTimeBase(uint64_t) override
Sets time base, i.e the reference time to which the event times refer to. For some codecs (like evt3) this has no effect.
- Parameters:
timeBase – typically time in nanoseconds since epoch.
-
inline virtual bool findFirstSensorTime(const uint8_t *buf, size_t size, uint64_t *firstTS) override
Finds first sensor time in event packet. This can be much faster than decoding the entire packet.
- Parameters:
buf – buffer with event data
size – size of buffer with event data (bytes)
firstTS – first time stamp (only valid if “true” is returned!)
- Returns:
true if sensor time has been found
-
inline virtual bool findFirstSensorTime(const MsgT &msg, uint64_t *firstTS) override
Finds first sensor time in event packet. This can be much faster than decoding the entire packet.
- Parameters:
msg – event packet message
firstTS – first time stamp (only valid if “true” is returned!)
- Returns:
true if sensor time has been found
-
inline virtual void setTimeMultiplier(uint32_t mult) override
Sets the time multiplier.
- Parameters:
mult – Time multiplier. If the sensor time is natively in usec and
multis set to 1000, then the decoded time will be in nanoseconds.
-
inline virtual void setGeometry(uint16_t width, uint16_t height) override
Sets sensor geometry. Must be called before first call to “decode”. Necessary for sanity checks.
- Parameters:
width – sensor width in pixels
height – sensor height in pixels
-
inline virtual uint16_t getWidth() const override
Gets sensor width.
- Returns:
width of sensor
-
inline virtual uint16_t getHeight() const override
Gets sensor height.
- Returns:
height of sensor
-
inline virtual uint32_t getTimeMultiplier() const final
-
inline virtual bool hasSensorTimeSinceEpoch() const final
-
using timestamp_t = uint64_t