Class pn532::desfire_pcd
Defined in File desfire_pcd.hpp
Inheritance Relationships
Base Type
public desfire::pcd
(Class desfire::pcd)
Class Documentation
-
class desfire_pcd : public desfire::pcd
Interfaces a PN532 controller as a PCD for operating on Desfire cards.
This class is essentially a wrapper around controller::initiator_data_exchange. At this point, much of the PN532 error codes are not echoed through any of desfire::tag result types, since an error at the PN532 level is just desfire::error::controller_error. To debug the behavior, inspect this instance’s last_result property.
Public Functions
Initializes the PCD around
controller
.- Parameters:
controller – The PN532 controller instance which is going to communicate with the Desfire card. The reference must be valid throughout the whole lifetime of this object.
target_logical_index – The logical index of the Desfire NFC target; can be obtained with controller::initiator_list_passive_kbps106_typea.
-
inline std::uint8_t target_logical_index() const
The original logical index with which this class was constructed.
-
inline controller &tag_reader()
The original controller reference with which this class was constructed.
-
inline controller const &tag_reader() const
The original controller reference with which this class was constructed.
-
inline pn532::result<rf_status> last_result() const
The last rf_status result that was obtained through a call to communicate.
-
std::optional<bin_data> communicate(bin_data const &data) override
Wrapper around controller::initiator_data_exchange. A call to this method will update last_result.