pub struct ExceptionStatus(pub u8);Expand description
ExceptionStatus contains additional information on exceptional statuses as well as the reporting of the note value. (Non-extended mode only.)
ExceptionStatus is a bitfield, representing the following:
- [PowerUp]: bit 0
- InvalidCommand: bit 1
- Failure: bit 2
- NoteValue: bit 3..5
- [TranportOpen]: bit 6
Tuple Fields§
§0: u8Implementations§
Source§impl ExceptionStatus
impl ExceptionStatus
Sourcepub fn power_up(&self) -> bool
pub fn power_up(&self) -> bool
Unset (0): The device is operating normally (Power up process is complete) Set (1): The device has been powered up. It is performing its initialization routine, and not yet ready to accept documents.
Sourcepub fn invalid_command(&self) -> bool
pub fn invalid_command(&self) -> bool
The device received an invalid command.
Sourcepub fn failure(&self) -> bool
pub fn failure(&self) -> bool
The device has encountered a problem and is out of service. Intervention is required.
Sourcepub fn note_value(&self) -> u8
pub fn note_value(&self) -> u8
The non-extended note value field. This field is valid when the device is in non- extended mode and either the escrow or stacked bits are set. (See Omnibus Reply – Data Byte 0 for details of those events)
000 - Unknown/No credit 001 - Denom1 010 - Denom2 011 - Denom3 100 - Denom4 101 - Denom5 110 - Denom6 111 - Denom7
Sourcepub fn transport_open(&self) -> bool
pub fn transport_open(&self) -> bool
Unset (0) - Note path access is closed Set (1) - Note path access is opened (vault, door, or both).
WARNING: This bit will also be reported one time upon power up if the note path was opened while the unit was powered down.
Sourcepub fn set_power_up(&mut self, value: bool)
pub fn set_power_up(&mut self, value: bool)
Unset (0): The device is operating normally (Power up process is complete) Set (1): The device has been powered up. It is performing its initialization routine, and not yet ready to accept documents.
Sourcepub fn set_invalid_command(&mut self, value: bool)
pub fn set_invalid_command(&mut self, value: bool)
The device received an invalid command.
Sourcepub fn set_failure(&mut self, value: bool)
pub fn set_failure(&mut self, value: bool)
The device has encountered a problem and is out of service. Intervention is required.
Sourcepub fn set_note_value(&mut self, value: u8)
pub fn set_note_value(&mut self, value: u8)
The non-extended note value field. This field is valid when the device is in non- extended mode and either the escrow or stacked bits are set. (See Omnibus Reply – Data Byte 0 for details of those events)
000 - Unknown/No credit 001 - Denom1 010 - Denom2 011 - Denom3 100 - Denom4 101 - Denom5 110 - Denom6 111 - Denom7
Sourcepub fn set_transport_open(&mut self, value: bool)
pub fn set_transport_open(&mut self, value: bool)
Unset (0) - Note path access is closed Set (1) - Note path access is opened (vault, door, or both).
WARNING: This bit will also be reported one time upon power up if the note path was opened while the unit was powered down.
Source§impl ExceptionStatus
impl ExceptionStatus
Sourcepub const fn none() -> Self
pub const fn none() -> Self
Create an ExceptionStatus with no bits set.
Trait Implementations§
Source§impl<T> BitRange<T> for ExceptionStatus
impl<T> BitRange<T> for ExceptionStatus
Source§impl<T> BitRangeMut<T> for ExceptionStatuswhere
u8: BitRangeMut<T>,
impl<T> BitRangeMut<T> for ExceptionStatuswhere
u8: BitRangeMut<T>,
Source§fn set_bit_range(&mut self, msb: usize, lsb: usize, value: T)
fn set_bit_range(&mut self, msb: usize, lsb: usize, value: T)
Source§impl Clone for ExceptionStatus
impl Clone for ExceptionStatus
Source§fn clone(&self) -> ExceptionStatus
fn clone(&self) -> ExceptionStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ExceptionStatus
Source§impl Debug for ExceptionStatus
impl Debug for ExceptionStatus
Source§impl Display for ExceptionStatus
impl Display for ExceptionStatus
Source§impl From<&ExceptionStatus> for u8
impl From<&ExceptionStatus> for u8
Source§fn from(e: &ExceptionStatus) -> Self
fn from(e: &ExceptionStatus) -> Self
Source§impl From<ExceptionStatus> for u8
impl From<ExceptionStatus> for u8
Source§fn from(e: ExceptionStatus) -> Self
fn from(e: ExceptionStatus) -> Self
Source§impl From<u8> for ExceptionStatus
impl From<u8> for ExceptionStatus
Source§impl PartialEq for ExceptionStatus
impl PartialEq for ExceptionStatus
Source§fn eq(&self, other: &ExceptionStatus) -> bool
fn eq(&self, other: &ExceptionStatus) -> bool
self and other values to be equal, and is used by ==.