Mbed OS Reference
Loading...
Searching...
No Matches
NFCRemoteEndpoint Class Referenceabstract

This is the base class for all remote endpoints (initiators and targets) addressable over the air interface. More...

#include <NFCRemoteEndpoint.h>

Inheritance diagram for NFCRemoteEndpoint:
NFCRemoteInitiator Type4RemoteInitiator

Data Structures

struct  Delegate
 The NFCRemoteEndpoint base delegate. More...
 

Public Member Functions

 NFCRemoteEndpoint (NFCController *controller)
 Create a NFCRemoteEndpointinstance. More...
 
virtual ~NFCRemoteEndpoint ()
 Destructor. 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...
 

Protected Member Functions

virtual void connected ()=0
 Mark endpoint as connected. More...
 
virtual void disconnected ()=0
 Mark endpoint as disconnected. More...
 
NFCControllernfc_controller ()
 Retrieve NFCController instance. More...
 
const NFCControllernfc_controller () const
 Retrieve NFCController instance. More...
 

Detailed Description

This is the base class for all remote endpoints (initiators and targets) addressable over the air interface.

Definition at line 39 of file NFCRemoteEndpoint.h.

Constructor & Destructor Documentation

◆ NFCRemoteEndpoint()

NFCRemoteEndpoint ( NFCController controller)

Create a NFCRemoteEndpointinstance.

Parameters
[in]controllerthe NFCController instance that detected this endpoint

◆ ~NFCRemoteEndpoint()

virtual ~NFCRemoteEndpoint ( )
virtual

Destructor.

Member Function Documentation

◆ connect()

virtual nfc_err_t connect ( )
pure virtual

Connect the remote endpoint.

Returns
NFC_OK or an error code

Implemented in Type4RemoteInitiator.

◆ disconnect()

virtual nfc_err_t disconnect ( )
pure virtual

Disconnect the remote endpoint.

Returns
NFC_OK or an error code

Implemented in Type4RemoteInitiator.

◆ is_connected()

virtual bool is_connected ( ) const
pure virtual

Check if the endpoint is connected.

Returns
whether the endpoint is connected

Implemented in Type4RemoteInitiator.

◆ is_disconnected()

virtual bool is_disconnected ( ) const
pure virtual

Check if the endpoint is disconnected/lost.

Returns
whether the endpoint has been disconnected

Implemented in Type4RemoteInitiator.

◆ rf_protocols()

virtual nfc_rf_protocols_bitmask_t rf_protocols ( )
pure virtual

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

Returns
a bitmask of activated protocols

Implemented in Type4RemoteInitiator.

◆ connected()

virtual void connected ( )
protectedpure virtual

Mark endpoint as connected.

Implemented in NFCRemoteInitiator.

◆ disconnected()

virtual void disconnected ( )
protectedpure virtual

Mark endpoint as disconnected.

Implemented in NFCRemoteInitiator.

◆ nfc_controller() [1/2]

NFCController * nfc_controller ( )
protected

Retrieve NFCController instance.

Returns
a pointer to the NFController instance that created this endpoint.

◆ nfc_controller() [2/2]

const NFCController * nfc_controller ( ) const
protected

Retrieve NFCController instance.

Returns
a pointer to the NFController instance that created this endpoint.