Mbed OS Reference
|
This class represents a remote NFC initiator (the local controller being in target mode). More...
#include <NFCRemoteInitiator.h>
Data Structures | |
struct | Delegate |
The NFCRemoteInitiator delegate. More... | |
Public Member Functions | |
NFCRemoteInitiator (NFCController *controller, const Span< uint8_t > &buffer) | |
Create a NFCRemoteInitiator. More... | |
void | set_delegate (Delegate *delegate) |
Set the delegate that will receive events generated by the initiator. More... | |
virtual nfc_tag_type_t | nfc_tag_type () const =0 |
Retrieve the NFC tag type exposed by the controller to communicate with the initiator. More... | |
virtual bool | is_iso7816_supported () const =0 |
Retrieve whether ISO7816 applications are supported by the underlying technology. More... | |
virtual void | add_iso7816_application (nfc_tech_iso7816_app_t *application)=0 |
Register an ISO7816 application to be used by the initiator. More... | |
virtual nfc_err_t | connect ()=0 |
Connect the remote endpoint. More... | |
virtual nfc_err_t | disconnect ()=0 |
Disconnect the remote endpoint. More... | |
virtual bool | is_connected () const =0 |
Check if the endpoint is connected. More... | |
virtual bool | is_disconnected () const =0 |
Check if the endpoint is disconnected/lost. More... | |
virtual nfc_rf_protocols_bitmask_t | rf_protocols ()=0 |
Get the list of RF protocols supported and activated over the air interface. More... | |
virtual bool | is_ndef_supported () const |
Check if this instance actually supports NDEF content. More... | |
Protected Member Functions | |
virtual void | connected () |
Mark endpoint as connected. More... | |
virtual void | disconnected () |
Mark endpoint as disconnected. More... | |
NFCController * | nfc_controller () |
Retrieve NFCController instance. More... | |
const NFCController * | nfc_controller () const |
Retrieve NFCController instance. More... | |
void | parse_ndef_message (const ac_buffer_t &buffer) |
Parse a NDEF message. More... | |
void | build_ndef_message (ac_buffer_builder_t &buffer_builder) |
Build NDEF message. More... | |
ndef_msg_t * | ndef_message () |
Retrieve underlying NDEF message instance. More... | |
This class represents a remote NFC initiator (the local controller being in target mode).
An initiator can be a NFC reader, a NFC-enabled phone or other NFC device capable of generating a RF field.
Definition at line 45 of file NFCRemoteInitiator.h.
NFCRemoteInitiator | ( | NFCController * | controller, |
const Span< uint8_t > & | buffer | ||
) |
Create a NFCRemoteInitiator.
[in] | controller | the NFCController instance that detected this endpoint |
[in] | buffer | a bytes array used to store NDEF messages |
void set_delegate | ( | Delegate * | delegate | ) |
Set the delegate that will receive events generated by the initiator.
[in] | delegate | the delegate instance to use |
|
pure virtual |
Retrieve the NFC tag type exposed by the controller to communicate with the initiator.
Implemented in Type4RemoteInitiator.
|
pure virtual |
Retrieve whether ISO7816 applications are supported by the underlying technology.
Implemented in Type4RemoteInitiator.
|
pure virtual |
Register an ISO7816 application to be used by the initiator.
[in] | application | a pointer to an nfc_tech_iso7816_app_t instance as defined by the MuNFC stack |
Implemented in Type4RemoteInitiator.
|
protectedvirtual |
Mark endpoint as connected.
Implements NFCRemoteEndpoint.
|
protectedvirtual |
Mark endpoint as disconnected.
Implements NFCRemoteEndpoint.
|
pure virtualinherited |
|
pure virtualinherited |
|
pure virtualinherited |
Check if the endpoint is connected.
Implemented in Type4RemoteInitiator.
|
pure virtualinherited |
Check if the endpoint is disconnected/lost.
Implemented in Type4RemoteInitiator.
|
pure virtualinherited |
Get the list of RF protocols supported and activated over the air interface.
Implemented in Type4RemoteInitiator.
|
protectedinherited |
Retrieve NFCController instance.
|
protectedinherited |
Retrieve NFCController instance.
|
virtualinherited |
Check if this instance actually supports NDEF content.
Reimplemented in Type4RemoteInitiator.
Definition at line 56 of file NFCNDEFCapable.h.
|
protectedinherited |
Parse a NDEF message.
[in] | buffer | a buffer containing a NDEF message |
|
protectedinherited |
Build NDEF message.
[in,out] | buffer_builder | a buffer builder in which to create the NDEF message. The backing buffer is guaranteed to be continuous. |
|
protectedinherited |
Retrieve underlying NDEF message instance.