Struct uem_reader::commands::reader::UemCommandsReader
source · pub struct UemCommandsReader<'a> { /* private fields */ }Expand description
Structure for commands controlling a reader itself
Implementations§
source§impl<'a> UemCommandsReader<'a>
impl<'a> UemCommandsReader<'a>
sourcepub fn led(
&mut self,
count: u8,
color: UemColor,
post_color: UemColor
) -> UemResult
pub fn led(
&mut self,
count: u8,
color: UemColor,
post_color: UemColor
) -> UemResult
Blink count times with led of specific color
and remain with other color switched on
Arguments
Returns
Ok(()) on success, otherwise returns an error.
Example
UemReaderInternal,
usb::find_usb_readers};
// Blink 3 times with green and remain yellow
if uem_reader.commands().reader()
.led(3, UemColor::Green, UemColor::Yellow)
.is_err() {
return;
}sourcepub fn power_radio(&mut self, on: bool) -> UemResult
pub fn power_radio(&mut self, on: bool) -> UemResult
sourcepub fn radio_off_on(&mut self, duration: u16) -> UemResult
pub fn radio_off_on(&mut self, duration: u16) -> UemResult
Switch radio field off for a specified duration
By switching off radio field, cards in the field are beind unpowered and thus reset.
Arguments
duration- Number of milliseconds to switch off radio field. If set to 0, the field will be switched off permanently. The field can be switched on again with the same command and non-zero duration.
Returns
Ok(()) on success, otherwise returns an error.
Example
// Switch off radio for 10 ms
if uem_reader.commands().reader()
.radio_off_on(10)
.is_err() {
return;
}