Expand description
Device communication library for MEI/CPI BNR devices.
This library is for communicating with BNR cash devices using the BNR/XFS communication protocol over a USB connection.
Users can either use the stand-alone functions exposed by the module APIs, or create a local instance of a DeviceHandle.
Creating a local instance of a DeviceHandle allows the user to interact using the method calls directly.
The module APIs more closely mirror the C library provided by MEI/CPI, and utilize a global instance of a DeviceHandle. These APIs are more useful for backwards compatibility with applications already using the MEI/CPI libraries.
Re-exports§
Modules§
- Work-around for const-generic arrays in serde from MikailBag:
- Functions for cash-related operations.
- Functions for denomination operations.
- Types and functionality for performing maintenance on BNR devices.
- Types and functions for handling system status events.
- System configuration types and functionality.
- XFS message types for BNR communication.
Macros§
- Creates a new XFS boolean type.
- Creates a new XFS
i4type. - Implements the
Defaulttrait for types that have anewfunction. - Common functionality for XFS
structtypes. - Common functionality for XFS
booleantypes. - Implements traits common to XFS enum types.
- Common functionality for XFS
i4types. - Common functionality for XFS
inttypes. - Common functionality for XFS
stringtypes. - Common functionality for XFS
structtypes. - Provides convenience functions to destructure an enum with new-type variants.
Structs§
- Allows to use USB Front interface to communicate with the BNR. Default value is TRUE.
- Represents a denomination amount.
- This specifies whether cash will be automatically presented to the user on execution of a dispense (autoPresent set to TRUE), or whether the cash will only be transported to the Bundler.
- Specifies whether bill will be automatically retracted to positioner when jam occurred during bill presenting at inlet or outlet. Default value is FALSE.
- The device has a bills taken sensor. Always TRUE in the BNR.
- Represents a response to a callback call made by the device.
- Represents a response to a callback call made by the device.
- Represents the result for a particular callback operation.
- Represents the identification ID for a particular callback operation.
- Represents a response to a callback call made by the device.
- Describes the BNR capabilities.
- The service can handle a cash box. Always TRUE in the BNR.
- Represents a cash order event initiated by the device.
- Represents a cash type ISO currency code, value, and variant.
- CashType list used for LCU’s secondary cash_type.
- Represents a cash unit in a BNR device.
- Represents a denomination cashbox amount.
- Euro Article 6, Category 2 support
- Euro Article 6, Category 3 support
- Characteristics of an input/output position.
- List of position capabilties.
- List of CDR stacker status by position.
- Represents the CDR status returned by the
get_statuscall. - Specifies whether there is a sensor to detect if the position is empty.
- Represents the note count of a CU module.
- Represents a currency set used in the CDR.
- Represents an ISO 4217 currency code.
- This structure handles a list of DenominationItems.
- Denomination information for enabling and configuring BNR denominations.
- This structure describes the number of bills stored to or dispensed from a Logical Cash Unit.
- Represents a list of DenominationInfo.
- The device can deposit cash. Always TRUE in the BNR.
- Represents the DepositCounters deposit count.
- Represents counters for deposits.
- The device supports a detector to verify accepted cash. Always TRUE in the BNR.
- BNR XFS device handle for communication over USB.
- Represents the DepositCounters disappeared count.
- The device can dispense cash. Equals to FALSE in BNA6 configuration, otherwise equals to TRUE.
- Represents the DispenseCounters reject count.
- Represents counters for dispensed notes.
- Structure that defines the parameters of
bnr_Dispense()orbnr_Denominate(), to specify either an amount or a list of banknotes to dispense. - Represents the DepositCounters emptied count.
- Represents whether to enable a denomination specified by a DenominationInfo.
- The device supports an escrow. Always TRUE in the BNR.
- Specifies the maximum number of bills on the escrow. Equals to 20 in BNA6 configuration, otherwise equals to 15.
- Capabilities for Euro Article 6.
- Represents the exponent field of a [Currency].
- Represents extended counters for a cash unit.
- Represents the DepositCounters forgery count.
- Represents the initial note count of a CU module.
- Specifies whether this position can be used as source for an accept command.
- Represents the specific call instance for a particular callback operation.
- The device has a temporary storage before presenting bills. Always TRUE in the BNR.
- Representation of the
lockfield of a PhysicalCashUnit. - Represents a logical cash unit, and its parameters.
- Represents a list of LogicalCashUnits.
- Maximum number of bills to be accepted by one command. Allways 1 for the BNR.
- Maximum number of items which this position can hold.
- Maximum number of bills to be dispensed by one command. Equals to 20 in BNA6 configuration, otherwise equals to 15.
- Represents the maximum size of a list.
- Represents a CU ID number.
- Represents the specific call instance for a particular callback operation.
- Specifies whether this position can be used as target for a dispense command.
- Represents the name of a PCU.
- Represents a XFS physical cash unit and its parameters.
- Represents a list of PhysicalCashUnits.
- Status of a CDR stacker.
- Recognition sensor type identification. Always ‘B’ in the BNR.
- Can the BNR be refilled by placing bills of the same size on the stack of the Loader. Always TRUE in the BNR.
- Specifies whether refused notes can be moved to this position during cash_in command.
- Represents the DispenseCounters reject count.
- Specifies whether measured but unknown or inhibited notes are rejected via the BNR’s Outlet instead of the Inlet. Default value is FALSE.
- Specifies whether real max USB line consumption is reported on usb configuration descriptor instead of 0mA. Default value is FALSE.
- The cash dispenser can retract presented bills. Always TRUE in the BNR since FW v1.3.0, FALSE with previous versions.
- Represents the DepositCounters retracted count.
- Specifies whether this position can be used as target forcash_in_rollback command.
- This device supports a safe door command. Always FALSE in the BNR.
- Represents the security level for acceptance of a denomination specified by a [DenominationInfo].
- The shutter be accessed by commands. Allways FALSE in the BNR.
- Specifies whether shutter status reporting is supported.
- Represents the size of a list.
- Represents the status of a CU module.
- Represents the study version of a denomination specified by a DenominationInfo.
- Structure that defines the levels determining a physical cash unit ThresholdStatus.
- The PCU ThresholdStatus becomes Empty when the bill count is lower or equal to this value.
- The PCU ThresholdStatus becomes Full when the bill count is greater or equal to this value.
- The PCU ThresholdStatus becomes High when the bill count is greater than this value.
- The PCU ThresholdStatus becomes Low when the bill count is lower to this value.
- Represents the transport count of a CU module.
- Reserved for future use.
- Euro Article 6, Unfit classification
- Represents a denomination unit.
- Represents the ID of an LCU and/or PCU.
- Represents the value of a CashType.
- Represents the value of a CashType.
Enums§
- Defines the sensitivity level of string detection at Inlet.
- Represents BNR error codes.
- Represents a CDR position
- Types of CDR units.
- Represents content status values.
- Specifies, if cash unit can dispense, deposit cash or both.
- Type of cash unit.
- Represents a CDR position
- Represents CDR device status values.
- Represents CDR dispenser status values.
- An error type for the crate.
- Represents the overall status of the CDR hardware.
- Cash Module intermediate event.
- Represents intermediate stacker status values.
- Represents the logical cash unit in the CDR.
- Represents variants for mixing algorithms in different contexts of CDR operation.
- Defines the kind of error report to be generated when a failure is detected whith no bill being transported.
- Represents safe door status values.
- Values for indication of the security level in communication between Host and BNR.
- Defines how the BNR perform the self tests.
- Represents shutter status values.
- Threshold mode used to determine the [ThresholdStatus] of a PCU.
- Filling status of a cash unit.
- Represents transport status values.
- Represents USB error codes.
Constants§
- BNR USB endpoint for device-to-host asynchronous callback calls.
- BNR USB endpoint for host-to-device asynchronous callback responses.
- BNR USB endpoint for host-to-device XfsMethodCalls.
- BNR USB Product ID.
- BNR USB endpoint for device-to-host XfsMethodResponses.
- BNR USB Vendor ID.
- Maximum number of LogicalCashUnits that can be present on a device.
- Maximum number of PhysicalCashUnits that can be present on a device.
- Length of the URB (USB Request Block) header length on Linux.
Traits§
- Trait for arguments to state change callbacks used by the XFS API.
Functions§
- Locks the global DeviceHandle instance, and calls the provided callback.
Type Aliases§
- Function signature for the
Intermediate Occurredcallback used by the XFS API. - Function signature for the
Operation Completedcallback used by the XFS API. - Convenience alias for a
Resulttype for the crate. - Function signature for the
Status Occuredcallback used by the XFS API.