Class desfire::storage_size

Class Documentation

class storage_size

Structure representing an approximate (sic) storage size in a Desfire card. It seems that on Desfire cards we do not get an exact storage size, but just the exponent and a bit representing whether the number is exact or “within the range”. This structure abstracts this behavior. Used in manufacturing_info only.

See also

tag::get_info

Public Functions

explicit storage_size(std::size_t nbytes = 0)

Initializes a new structure from a (potentially approximate) number of bytes. This constructor is meant for internal use only.

Parameters:

nbytes – Number read from the card. This might have an “approximate bit” set, so it should not be taken as an exact number.

inline std::size_t bytes_lower_bound() const

Lower bound to the storage size. Might coincide with bytes_upper_bound.

Returns:

A number of bytes.

inline std::size_t bytes_upper_bound() const

Upper bound to the storage size. Might coincide with bytes_lower_bound.

Returns:

A number of bytes.

mlab::bin_stream &operator>>(mlab::bin_stream &s)
mlab::bin_data &operator<<(mlab::bin_data &s) const