Class pn532::p2p::pn532_initiator

Inheritance Relationships

Base Type

Class Documentation

class pn532_initiator : public pn532::p2p::initiator

Specialization of initiator which uses a controller as initiator. This is a move-only object.

Public Functions

pn532_initiator() = default

Default-constructs the initiator class. The communicate method will always return channel_error::app_error.

pn532_initiator(controller &controller, std::uint8_t logical_index)

Wraps a controller and a target associated to the given logical_index to work as a initiator.

Parameters:
  • controller – The PN532 controller. This reference must stay valid throughout the whole lifetime of this object.

  • logical_index – Logical index of the P2P target, which can be obtained by e.g. controller::initiator_auto_poll.

pn532_initiator(pn532_initiator const&) = delete
pn532_initiator &operator=(pn532_initiator const&) = delete
pn532_initiator(pn532_initiator&&) noexcept = default
pn532_initiator &operator=(pn532_initiator&&) noexcept = default
virtual result<mlab::bin_data> communicate(mlab::bin_data const &data, ms timeout) override

Implements communication over controller::initiator_data_exchange.