Struct pn532::frame_id
Defined in File channel.hpp
Struct Documentation
-
struct frame_id
Helper data structure used to progressively identify frame size.
Frame length is dynamically determined by the presence of preamble/postamble and by the frame type. However, only some channels support reading one byte at a time in order to determine the full frame length; for those channels which do not support stream reading, we request instead the frame over and over again by sending frame_type::nack. This data structure helps in tracking what is known about a frame while it is being received.
See also
Public Members
-
frame_type type = frame_type::error
The frame type, if known. If unknown, the frame type is frame_type::error;
-
bool has_preamble = false
True if and only if a preamble has been detected (and thus a postamble is expected at the end).
-
std::size_t frame_total_length = min_frame_length
Determined total frame length (so far).
-
std::size_t info_frame_data_size = 0
Determined data length for an info frame.
This includes also transport info and command, not only the internal data of frame<frame_type::info>.
Public Static Attributes
-
static constexpr std::size_t min_frame_length = bits::start_of_packet_code.size() + std::max(std::max(bits::ack_packet_code.size(), bits::nack_packet_code.size()), bits::fixed_extended_packet_length.size())
Absolute minimum frame length, that is, just the start of packet code and the frame code.
-
static constexpr std::size_t max_min_info_frame_header_length = min_frame_length + 1 + 3
Minimum transmission length that is guaranteed to contain the frame length.
-
frame_type type = frame_type::error