pub trait Framer {
    type Output;

    // Required methods
    fn new(builder: FramerBuilder) -> Self;
    fn ingest_event(
        &mut self,
        event: &mut Event,
        last_event: Option<Event>
    ) -> bool;
    fn ingest_events_events(&mut self, events: Vec<Vec<Event>>) -> bool;
    fn flush_frame_buffer(&mut self) -> bool;
}
Expand description

A trait for accumulating ADΔER events into frames.

Required Associated Types§

source

type Output

The type of the output frame.

Required Methods§

source

fn new(builder: FramerBuilder) -> Self

Create a new Framer with the given FramerBuilder.

source

fn ingest_event(&mut self, event: &mut Event, last_event: Option<Event>) -> bool

Ingest an ADΔER event. Will process differently depending on choice of FramerMode.

If INSTANTANEOUS, this function will set the corresponding output frame’s pixel value to the value derived from this Event, only if this is the first value ingested for that pixel and frame. Otherwise, the operation will silently be ignored.

If INTEGRATION, this function will integrate this Event value for the corresponding output frame(s)

source

fn ingest_events_events(&mut self, events: Vec<Vec<Event>>) -> bool

Ingest a vector of a vector of ADΔER events.

source

fn flush_frame_buffer(&mut self) -> bool

For all frames left that we haven’t written out yet, for any None pixels, set them to the last recorded intensity for that pixel.

Returns true if there are frames now ready to write out

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Clone + Default + FrameValue<Output = T> + Copy + Serialize + Send + Sync + Zero + Into<f64>> Framer for FrameSequence<T>

§

type Output = T