[][src]Trait infrared::RemoteControl

pub trait RemoteControl {
    type Cmd: Command;

    const MODEL: &'static str;
    const DEVTYPE: DeviceType;
    const ADDRESS: u32;
    const BUTTONS: &'static [(u8, Button)];
    fn decode(cmd: Self::Cmd) -> Option<Button> { ... }
fn encode(button: Button) -> Option<Self::Cmd> { ... } }

A trait describing a Remote Control

Associated Types

type Cmd: Command

The type of command

Loading content...

Associated Constants

const MODEL: &'static str

Remote control model

const DEVTYPE: DeviceType

Type of device that this remote controls

const ADDRESS: u32

Device address

const BUTTONS: &'static [(u8, Button)]

command byte to standardbutton mapping

Loading content...

Provided methods

fn decode(cmd: Self::Cmd) -> Option<Button>

Try to map a command into an Button for this remote

fn encode(button: Button) -> Option<Self::Cmd>

Encode a button into a command

Loading content...

Implementors

impl RemoteControl for SamsungTv[src]

type Cmd = NecCommand

impl RemoteControl for SpecialForMp3[src]

type Cmd = NecCommand

impl RemoteControl for Rc5CdPlayer[src]

type Cmd = Rc5Command

impl RemoteControl for SamsungBluRayPlayer[src]

type Cmd = SbpCommand

Loading content...