Struct pn532::helper::scanned_target

Inheritance Relationships

Derived Type

Struct Documentation

struct scanned_target

Lightweight wrapper for a generic target detected by controller.

Subclassed by pn532::helper::autorelease_target

Sorting and comparison

bool operator==(scanned_target const &other) const
bool operator!=(scanned_target const &other) const
bool operator<(scanned_target const &other) const
bool operator>(scanned_target const &other) const
bool operator<=(scanned_target const &other) const
bool operator>=(scanned_target const &other) const

Public Functions

scanned_target() = default

Default-constructs an invalid scanned target.

template<target_type Type>
scanned_target(std::uint8_t index_, poll_target<Type> const &entry)

Constructs a scanned target from the

Template Parameters:

Type – Any target_type

Parameters:
scanned_target(std::uint8_t index_, any_poll_target const &entry)

Constructs a scanned target from the

Parameters:
inline explicit operator bool() const noexcept

Returns true if and only if this scanned target is a valid target (i.e. scanned_target::index is not std::numeric_limits<std::uint8_t>::max().

Public Members

std::uint8_t index = std::numeric_limits<std::uint8_t>::max()

Logical index to use e.g. in controller::initiator_data_exchange.

Note

This is irrelevant w.r.t. sorting and comparing.

target_type type = target_type::generic_passive_106kbps

Type of detected tareget.

std::vector<std::uint8_t> nfcid = {}

Some sort of unique NFC identifier.

Note

This is not always available for all types of targets. When possible, a NFCID3t will be used, otherwise it falls back to NFCID2t, NFCID1t, Jewel ID (for jewel tags), PUPI (Pseudo-Unique PICC Identifier, part of the ATQB response) and eventually, the ATQB response itself.