[][src]Trait infrared::ReceiverSM

pub trait ReceiverSM {
    type Cmd: Command;
    type InternalState: Into<State>;
    pub fn create() -> Self;
pub fn event(&mut self, edge: bool, dt: u32) -> Self::InternalState;
pub fn command(&self) -> Option<Self::Cmd>;
pub fn reset(&mut self); }

Receiver state machine

Associated Types

type Cmd: Command[src]

The Resulting Command Type

type InternalState: Into<State>[src]

Internal State

Loading content...

Required methods

pub fn create() -> Self[src]

Create a new ReceiverSM

pub fn event(&mut self, edge: bool, dt: u32) -> Self::InternalState[src]

Add event to the state machine

  • edge: true = positive edge, false = negative edge
  • dt : Time in micro seconds since last transition

pub fn command(&self) -> Option<Self::Cmd>[src]

Get the command Returns the data if State == Done, otherwise None

pub fn reset(&mut self)[src]

Reset the state machine

Loading content...

Implementors

impl ReceiverSM for Rc5[src]

type Cmd = Rc5Command

type InternalState = Rc5State

impl ReceiverSM for Rc6[src]

type Cmd = Rc6Command

type InternalState = Rc6State

impl ReceiverSM for Sbp[src]

type Cmd = SbpCommand

type InternalState = SbpState

impl<N: NecVariant> ReceiverSM for Nec<N>[src]

type Cmd = NecCommand<N>

type InternalState = InternalState

Loading content...