3 releases
0.1.2 | Mar 13, 2024 |
---|---|
0.1.1 | Feb 15, 2024 |
0.1.0 | Jan 24, 2024 |
#243 in Finance
565KB
12K
SLoC
BNR API
This library presents a high-level, safe, idiomatic Rust API for interacting with MEI/CPI BNR devices.
Library organization
The structure of the project's file tree roughly follows the organization of the MEI/CPI modules.
Related types are grouped together in modules. Larger modules are further split into their own set of modules, and glob-imported by the parent module.
Future goals
The ultimate goal is to cover a large portion of the API surface, and then begin to implement all functionality in Rust.
Enough functionality is implemented to perform device initialization, configuration, deposit, dispense, and reset.
There is still a reasonable amount left to implement.
lib.rs
:
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.
Dependencies
~6–19MB
~228K SLoC