[][src]Trait infrared::RemoteControl

pub trait RemoteControl {
    type Cmd: Command;

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

A trait describing a Remote Control

Associated Types

type Cmd: Command[src]

The type of command

Loading content...

Associated Constants

pub const MODEL: &'static str[src]

Remote control model

pub const DEVTYPE: DeviceType[src]

Type of device that this remote controls

pub const PROTOCOL: Protocol[src]

Protocol

pub const ADDRESS: u32[src]

Device address

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

command byte to standardbutton mapping

Loading content...

Provided methods

pub fn decode(cmd: Self::Cmd) -> Option<Button>[src]

Try to map a command into an Button for this remote

pub fn encode(button: Button) -> Option<Self::Cmd>[src]

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...