Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Public Member Functions | Protected Member Functions
NFCRemoteInitiator Class Referenceabstract

This class represents a remote NFC initiator (the local controller being in target mode). More...

#include <NFCRemoteInitiator.h>

Inheritance diagram for NFCRemoteInitiator:
NFCRemoteEndpoint NFCNDEFCapable Type4RemoteInitiator

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...
 
NFCControllernfc_controller ()
 Retrieve NFCController instance. More...
 
const NFCControllernfc_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_tndef_message ()
 Retrieve underlying NDEF message instance. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

NFCRemoteInitiator ( NFCController controller,
const Span< uint8_t > &  buffer 
)

Create a NFCRemoteInitiator.

Parameters
[in]controllerthe NFCController instance that detected this endpoint
[in]buffera bytes array used to store NDEF messages

Member Function Documentation

virtual void add_iso7816_application ( nfc_tech_iso7816_app_t application)
pure virtual

Register an ISO7816 application to be used by the initiator.

Parameters
[in]applicationa pointer to an nfc_tech_iso7816_app_t instance as defined by the MuNFC stack

Implemented in Type4RemoteInitiator.

void build_ndef_message ( ac_buffer_builder_t buffer_builder)
protectedinherited

Build NDEF message.

Parameters
[in,out]buffer_buildera buffer builder in which to create the NDEF message. The backing buffer is guaranteed to be continuous.
virtual nfc_err_t connect ( )
pure virtualinherited

Connect the remote endpoint.

Returns
NFC_OK or an error code

Implemented in Type4RemoteInitiator.

virtual void connected ( )
protectedvirtual

Mark endpoint as connected.

Implements NFCRemoteEndpoint.

virtual nfc_err_t disconnect ( )
pure virtualinherited

Disconnect the remote endpoint.

Returns
NFC_OK or an error code

Implemented in Type4RemoteInitiator.

virtual void disconnected ( )
protectedvirtual

Mark endpoint as disconnected.

Implements NFCRemoteEndpoint.

virtual bool is_connected ( ) const
pure virtualinherited

Check if the endpoint is connected.

Returns
whether the endpoint is connected

Implemented in Type4RemoteInitiator.

virtual bool is_disconnected ( ) const
pure virtualinherited

Check if the endpoint is disconnected/lost.

Returns
whether the endpoint has been disconnected

Implemented in Type4RemoteInitiator.

virtual bool is_iso7816_supported ( ) const
pure virtual

Retrieve whether ISO7816 applications are supported by the underlying technology.

Returns
whether ISO7816 applications are supported

Implemented in Type4RemoteInitiator.

virtual bool is_ndef_supported ( ) const
virtualinherited

Check if this instance actually supports NDEF content.

Returns
whether NDEF content is supported

Reimplemented in Type4RemoteInitiator.

Definition at line 56 of file NFCNDEFCapable.h.

ndef_msg_t* ndef_message ( )
protectedinherited

Retrieve underlying NDEF message instance.

Returns
pointer to NDEF message instance
NFCController* nfc_controller ( )
protectedinherited

Retrieve NFCController instance.

Returns
a pointer to the NFController instance that created this endpoint.
const NFCController* nfc_controller ( ) const
protectedinherited

Retrieve NFCController instance.

Returns
a pointer to the NFController instance that created this endpoint.
virtual nfc_tag_type_t nfc_tag_type ( ) const
pure virtual

Retrieve the NFC tag type exposed by the controller to communicate with the initiator.

Returns
the relevant NFC tag type

Implemented in Type4RemoteInitiator.

void parse_ndef_message ( const ac_buffer_t buffer)
protectedinherited

Parse a NDEF message.

Parameters
[in]buffera buffer containing a NDEF message
virtual nfc_rf_protocols_bitmask_t rf_protocols ( )
pure virtualinherited

Get the list of RF protocols supported and activated over the air interface.

Returns
a bitmask of activated protocols

Implemented in Type4RemoteInitiator.

void set_delegate ( Delegate delegate)

Set the delegate that will receive events generated by the initiator.

Parameters
[in]delegatethe delegate instance to use
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.