[−][src]Struct funksteckdose::Funksteckdose
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]
pin: T,
repeat_transmit: usize
) -> Funksteckdose<T, E, P>
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]
&self,
group: &str,
device: &Device,
state: &State
) -> Result<(), Error>
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,
E: Send,
P: Send,
T: Send,
impl<T, E, P> Sync for Funksteckdose<T, E, P> where
E: Sync,
P: Sync,
T: Sync,
E: Sync,
P: Sync,
T: Sync,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,