[][src]Struct funksteckdose::Funksteckdose

pub struct Funksteckdose<T: Pin, E: Encoding, P: Protocol> { /* fields omitted */ }

Handle to a Funksteckdose system

Methods

impl<T: Pin, E: Encoding, P: Protocol> Funksteckdose<T, E, P>[src]

pub fn new(pin: T) -> Funksteckdose<T, E, P>[src]

Create a new instance with a given pin and default protocol

type Funksteckdose = funksteckdose::Funksteckdose<WiringPiPin, EncodingA, Protocol1>;
let pin = WiringPiPin::new(0);
let d: Funksteckdose = Funksteckdose::new(pin);

pub fn with_repeat_transmit(
    pin: T,
    repeat_transmit: usize
) -> Funksteckdose<T, E, P>
[src]

Create a new instance with a given pin and transmit count

type Funksteckdose = funksteckdose::Funksteckdose<WiringPiPin, EncodingA, Protocol1>;
let pin = WiringPiPin::new(0);
let d: Funksteckdose = Funksteckdose::with_repeat_transmit(pin, 5);

pub fn send(
    &self,
    group: &str,
    device: &Device,
    state: &State
) -> Result<(), Error>
[src]

Send a control sequence to give group and device. The group is coded like the dip switches in the devices e.g "10010"

type Funksteckdose = funksteckdose::Funksteckdose<WiringPiPin, EncodingA, Protocol1>;
let pin = WiringPiPin::new(0);
let d: Funksteckdose = Funksteckdose::with_repeat_transmit(pin, 5);
d.send("10001", &Device::A, &State::On).expect("Failed to send");

Trait Implementations

impl<T: Debug + Pin, E: Debug + Encoding, P: Debug + Protocol> Debug for Funksteckdose<T, E, P>[src]

Auto Trait Implementations

impl<T, E, P> Send for Funksteckdose<T, E, P> where
    E: Send,
    P: Send,
    T: Send

impl<T, E, P> Sync for Funksteckdose<T, E, P> where
    E: Sync,
    P: Sync,
    T: Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]