#[repr(C)]pub struct LogicalCashUnit { /* private fields */ }
Expand description
Represents a logical cash unit, and its parameters.
Implementations§
Source§impl LogicalCashUnit
impl LogicalCashUnit
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new LogicalCashUnit.
Sourcepub const fn cash_type(&self) -> CashType
pub const fn cash_type(&self) -> CashType
Gets the CashType.
Defines the main type of cash used by this cash unit.
Sourcepub fn set_cash_type(&mut self, cash_type: CashType)
pub fn set_cash_type(&mut self, cash_type: CashType)
Sets the CashType.
Sourcepub fn with_cash_type(self, cash_type: CashType) -> Self
pub fn with_cash_type(self, cash_type: CashType) -> Self
Builder function that sets the CashType.
Sourcepub const fn secondary_cash_types(&self) -> &CashTypeList
pub const fn secondary_cash_types(&self) -> &CashTypeList
Gets the secondary CashTypeList.
Defines the additional types of cash used by this cash unit.
Sourcepub fn set_secondary_cash_types(&mut self, secondary_cash_types: CashTypeList)
pub fn set_secondary_cash_types(&mut self, secondary_cash_types: CashTypeList)
Sets the secondary CashTypeList.
Sourcepub fn with_secondary_cash_types(
self,
secondary_cash_types: CashTypeList,
) -> Self
pub fn with_secondary_cash_types( self, secondary_cash_types: CashTypeList, ) -> Self
Builder function that sets the secondary CashType.
Sourcepub const fn number(&self) -> u32
pub const fn number(&self) -> u32
Gets the logical number of cash unit.
Unique number of the cash unit. This number is assigned (or reassigned) on bnr_Reset() and identifies the unit along the time; therefore, it can be used to track unit changes, or uniquely reference units in method calls (DenominationItem::unit property is an example).
Sourcepub fn set_number(&mut self, number: u32)
pub fn set_number(&mut self, number: u32)
Sets the number.
Sourcepub fn with_number(self, number: u32) -> Self
pub fn with_number(self, number: u32) -> Self
Builder function that sets the number.
Sourcepub const fn cu_kind(&self) -> CuKind
pub const fn cu_kind(&self) -> CuKind
Specifies, if cash unit can dispense, deposit cash or both.
Sourcepub fn set_cu_kind(&mut self, cu_kind: CuKind)
pub fn set_cu_kind(&mut self, cu_kind: CuKind)
Sets the cu_kind
field, see [LCU].
Sourcepub fn with_cu_kind(self, cu_kind: CuKind) -> Self
pub fn with_cu_kind(self, cu_kind: CuKind) -> Self
Builder function that sets the cu_kind.
Sourcepub fn set_cu_type(&mut self, cu_type: CuType)
pub fn set_cu_type(&mut self, cu_type: CuType)
Sets the cu_type
field, see [LCU].
Sourcepub fn with_cu_type(self, cu_type: CuType) -> Self
pub fn with_cu_type(self, cu_type: CuType) -> Self
Builder function that sets the cu_type.
Sourcepub fn set_unit_id(&mut self, unit_id: UnitId)
pub fn set_unit_id(&mut self, unit_id: UnitId)
Sets the UnitId.
Sourcepub fn with_unit_id(self, unit_id: UnitId) -> Self
pub fn with_unit_id(self, unit_id: UnitId) -> Self
Builder function that sets the UnitId.
Sourcepub const fn initial_count(&self) -> u32
pub const fn initial_count(&self) -> u32
For customer purpose only; this value is initialized by the configure_cash_unit and update_cash_unit methods and not changed by the BNR.
- Type: User data.
- Max: 65535.
- Access: Read-Write (write through configure_cash_unit and update_cash_unit methods).
Sourcepub fn set_initial_count(&mut self, initial_count: u32)
pub fn set_initial_count(&mut self, initial_count: u32)
Sets the initial count.
Sourcepub fn with_initial_count(self, initial_count: u32) -> Self
pub fn with_initial_count(self, initial_count: u32) -> Self
Builder function that sets the initial count.
Sourcepub const fn count(&self) -> u32
pub const fn count(&self) -> u32
Actual count of bills in the logical cash unit.
- Type: One Shot.
- Max: 65535.
- Access:
- Bundler and Recycler Physical Cash Units - Read-Only
- Cashbox and Loader Physical Cash Units - Read-Write (write through configure_cash_unit and update_cash_unit methods).
Sourcepub fn with_count(self, count: u32) -> Self
pub fn with_count(self, count: u32) -> Self
Builder function that sets the count.
Sourcepub fn set_status(&mut self, status: u32)
pub fn set_status(&mut self, status: u32)
Sets the status.
Sourcepub fn with_status(self, status: u32) -> Self
pub fn with_status(self, status: u32) -> Self
Builder function that sets the status.
Sourcepub const fn extended_counters(&self) -> &ExtendedCounters
pub const fn extended_counters(&self) -> &ExtendedCounters
Gets the ExtendedCounters for [LCU::Deposit] and [LCU::Dispense] cash unit types.
Sourcepub fn set_extended_counters(&mut self, extended_counters: ExtendedCounters)
pub fn set_extended_counters(&mut self, extended_counters: ExtendedCounters)
Sets the ExtendedCounters.
Sourcepub fn with_extended_counters(self, extended_counters: ExtendedCounters) -> Self
pub fn with_extended_counters(self, extended_counters: ExtendedCounters) -> Self
Builder function that sets the extended_counters.
Sourcepub const fn physical_cu_index(&self) -> UnitId
pub const fn physical_cu_index(&self) -> UnitId
Gets the UnitId of the [PhysicalCashUnit] backing this LogicalCashUnit.
The C library uses a pointer here, but that is wildly unsafe. Use the ID instead.
Sourcepub fn set_physical_cu_index(&mut self, pcu_index: UnitId)
pub fn set_physical_cu_index(&mut self, pcu_index: UnitId)
Sets the physical cash unit UnitId.
Sourcepub fn with_physical_cash_unit(self, pcu_index: UnitId) -> Self
pub fn with_physical_cash_unit(self, pcu_index: UnitId) -> Self
Builder function that sets the physical cash unit UnitId.
Trait Implementations§
Source§impl Clone for LogicalCashUnit
impl Clone for LogicalCashUnit
Source§fn clone(&self) -> LogicalCashUnit
fn clone(&self) -> LogicalCashUnit
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more