Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Public Types | Public Member Functions
MessageParser Class Reference

Event driven NDEF Message parser. More...

#include <MessageParser.h>

Data Structures

struct  Delegate
 Report parsing event to the application. More...

Public Types

Public Member Functions

 MessageParser ()
 Construct a message parser. More...
void set_delegate (Delegate *delegate)
 Set the handler that processes parsing events. More...
void parse (const Span< const uint8_t > &data_buffer)
 Parse an NDEF Message. More...

Detailed Description

Event driven NDEF Message parser.

Definition at line 38 of file MessageParser.h.

Member Enumeration Documentation

enum error_t

Error that can be reported by the parsing operation.


The message doesn't start with a message start tag.


There is not enough data left to pursue parsing of the message.


The type name of a record is invalid.


An empty record is malformed.


Record of unknown type embed a type length different than 0.


Record of unchanged type contains a type.


Chunk record encountered.


Message is not properly closed.


Type is missing in a record expecting a type (well known type, media type, absolute uri or external type).

Definition at line 43 of file MessageParser.h.

Constructor & Destructor Documentation

Construct a message parser.

Member Function Documentation

void parse ( const Span< const uint8_t > &  data_buffer)

Parse an NDEF Message.

Records and errors are reported to the handler registered with set_event_handler.

data_bufferThe data buffer that contains the NDEF message.
void set_delegate ( Delegate delegate)

Set the handler that processes parsing events.

delegateThe parsing event handler.
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.