Mbed OS Reference
Loading...
Searching...
No Matches
NFCNDEFCapable Class Reference

The base class for all endpoints that can support NDEF content. More...

#include <NFCNDEFCapable.h>

Inheritance diagram for NFCNDEFCapable:
NFCRemoteInitiator NFCTarget Type4RemoteInitiator NFCEEPROM

Data Structures

struct  Delegate
 

Public Member Functions

 NFCNDEFCapable (const Span< uint8_t > &buffer)
 Construct a NFCNDEFCapable instance. More...
 
virtual bool is_ndef_supported () const
 Check if this instance actually supports NDEF content. More...
 

Protected Member Functions

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

The base class for all endpoints that can support NDEF content.

Definition at line 43 of file NFCNDEFCapable.h.

Constructor & Destructor Documentation

◆ NFCNDEFCapable()

NFCNDEFCapable ( const Span< uint8_t > &  buffer)

Construct a NFCNDEFCapable instance.

Parameters
[in]buffera bytes array used to store NDEF messages

Member Function Documentation

◆ is_ndef_supported()

virtual bool is_ndef_supported ( ) const
virtual

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.

◆ parse_ndef_message()

void parse_ndef_message ( const ac_buffer_t buffer)
protected

Parse a NDEF message.

Parameters
[in]buffera buffer containing a NDEF message

◆ build_ndef_message()

void build_ndef_message ( ac_buffer_builder_t buffer_builder)
protected

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.

◆ ndef_message()

ndef_msg_t * ndef_message ( )
protected

Retrieve underlying NDEF message instance.

Returns
pointer to NDEF message instance