1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! Functions for denomination operations.
use ;
use crate::;
/// Gets a list of denominations in the BNR.
///
/// Returns:
///
/// - Ok([DenominationList]): list of the denominations currently defined in the BNR.
/// - Error conditions: see [update_denominations] for a list of error code descriptions.
/// Updates the settings for a list of denominations.
///
/// For each [DenominationInfo](bnr_xfs::denominations::DenominationInfo) element of the [DenominationList](bnr_xfs::denominations::DenominationList),
/// the application can update its validation settings.
///
/// From the BNR API docs:
///
/// ```no_build,no_run
/// Those settings are persistent over power cycles; please refer to DenominationInfo for more details about settable properties, and their default values.
///
/// @param[in] DenominationList This list of denominations will be a modified version of the one obtained from query_denominations() call.
/// ```
///
/// Returns:
///
/// - Ok(()) on success
/// - Error conditions:
/// - `#XFS_E_ILLEGAL` - A dispense command is already active on the BNR.
/// - `#XFS_E_NOT_SUPPORTED` - operation not supported by the BNR firmware version.
/// - `#XFS_E_PARAMETER_INVALID` - Invalid array size. The array size is bigger than expected.
/// - `#XFS_E_CDR_CASHIN_ACTIVE` - A cashIn command has been issued and is already active.
/// - `#XFS_E_FAILURE` - a command is already running on the BNR or an internal error occured.
/// Queries the device for the configured [BillsetIdList].
///
/// **NOTE** Firmware Compatibility: This function requires a BNR FW v1.12.0 or newer. With older FW versions, the return will be #XFS_E_NOT_SUPPORTED.