Trait infrared::receiver::DecoderStateMachine [−][src]
pub trait DecoderStateMachine: Protocol {
type State: DecoderState;
type RangeData: Debug;
type InternalStatus: Into<Status>;
fn state() -> Self::State;
fn ranges(resolution: u32) -> Self::RangeData;
fn event_full(
res: &mut Self::State,
rd: &Self::RangeData,
edge: bool,
delta_t: u32
) -> Self::InternalStatus;
fn command(state: &Self::State) -> Option<Self::Cmd>;
}
Expand description
Protocol decode state machine
Associated Types
type State: DecoderState
type State: DecoderState
Decoder state
type InternalStatus: Into<Status>
type InternalStatus: Into<Status>
Internal State
Required methods
Create the timer dependent ranges
resolution
: Timer resolution
fn event_full(
res: &mut Self::State,
rd: &Self::RangeData,
edge: bool,
delta_t: u32
) -> Self::InternalStatus
fn event_full(
res: &mut Self::State,
rd: &Self::RangeData,
edge: bool,
delta_t: u32
) -> Self::InternalStatus
Notify the state machine of a new event
edge
: true = positive edge, false = negative edgedt
: Time in micro seconds since last transition