[−][src]Struct invelion::Reader
Invelion reader
Methods
impl Reader
[src]
pub fn new(port: &str, address: u8, antenna_count: u8) -> Result<Reader>
[src]
Create the object and connect to the serial port
port
should be the name of a serial port device.
address
is the address of the reader, which is usually 1.
antenna_count
is the number of antenna ports the reader has.
pub fn reset(&mut self) -> Result<()>
[src]
Reset the reader
pub fn get_version(&mut self) -> Result<(u8, u8)>
[src]
Get the firmware version of the reader
Returns a tuple of (major, minor).
pub fn set_work_antenna(&mut self, antenna_id: u8) -> Result<()>
[src]
Set the working antenna ID
antenna_id
is from 0 to the number of available antennas.
pub fn get_work_antenna(&mut self) -> Result<u8>
[src]
Get the working antenna ID
Returns an ID from 0 to the number of available antennas.
pub fn get_antenna_connection_detector(&mut self) -> Result<i8>
[src]
Get the state of the antenna connection detector for the working antenna
The value is the detector threshold in dB, or 0 if disabled.
pub fn set_output_power(&mut self, power: &[u8]) -> Result<()>
[src]
Set the output power per antenna and save to flash
The length of power
should be the number of antennas, and the value of power
is in dBm (acceptable range is reader-dependent).
pub fn get_output_power(&mut self) -> Result<Vec<u8>>
[src]
Get the output power per antenna
Returns a vector of power for each antenna (in dBm)
pub fn get_temperature(&mut self) -> Result<i8>
[src]
Fetch the temperature of the reader in celsius
pub fn measure_return_loss(&mut self, frequency: f32) -> Result<i8>
[src]
Measure the return loss in dB of the selected antenna
pub fn real_time_inventory(&mut self, repeat: u8) -> Result<InventoryResult>
[src]
Start an inventory operation on the selected antenna and return inventory data in real time.
The repeat
parameter appears to indicate the number of attempts the reader will make
(although this is unclear - the datasheet calls this "repeat time"). It can be set to 255
which means the reader will optimise this for speed to allow fast multi-antenna operation.
pub fn read(
&mut self,
bank: MemoryBank,
password: &[u8],
start: u8,
length: u8
) -> Result<Vec<ReadResult>>
[src]
&mut self,
bank: MemoryBank,
password: &[u8],
start: u8,
length: u8
) -> Result<Vec<ReadResult>>
Read data from tags
By default this will issue a read command to all tags within range. It will return a ReadResult for each tag it successfully read - this may include duplicate EPCs if those tags have different data.
Arguments
bank
- the memory bank to read from.password
- the 4-byte password, or[0, 0, 0, 0]
if not set/required.start
- the starting offset of the read, in 2-byte words.length
- the number of 2-byte words to read.
pub fn set_epc_match(&mut self, epc: &[u8]) -> Result<()>
[src]
(NOT working) set EPC access match mask
I assume this function restricts commands to act on certain EPC tags but I can't get it to work.
Auto Trait Implementations
impl Send for Reader
impl Sync for Reader
impl Unpin for Reader
impl UnwindSafe for Reader
impl RefUnwindSafe for Reader
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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,