M5Unit-NFC 0.1.0 git rev:93745b5
Loading...
Searching...
No Matches
m5::nfc::ndef::Attribute Struct Reference

NDEF Record attribute (1st byte) More...

#include <ndef_record.hpp>

Public Member Functions

Getter
bool messageBegin () const
 Message Begin flag.
 
bool messageEnd () const
 Message End flag.
 
bool chunk () const
 Chunked flag.
 
bool shortRecord () const
 Short Record flag.
 
bool idLength () const
 ID Length flag.
 
TNF tnf () const
 Type Name Format.
 
Setter
void messageBegin (const bool b)
 Set Message Begin flag.
 
void messageEnd (const bool b)
 Set Message End flag.
 
void chunk (const bool b)
 Set Chunked flag.
 
void shortRecord (const bool b)
 Set Short Record flag.
 
void idLength (const bool b)
 Set ID Length flag.
 
void tnf (const TNF t)
 Set Type Name Format.
 

Public Attributes

uint8_t value {}
 

Static Public Attributes

Bit field
static constexpr uint8_t MB {0x80}
 Message Begin.
 
static constexpr uint8_t ME {0x40}
 Message End.
 
static constexpr uint8_t CF {0x20}
 Chunked Flag.
 
static constexpr uint8_t SR {0x10}
 Short Flag.
 
static constexpr uint8_t IL {0x08}
 ID Length (If disabled (specified as 0), ID LENGTH and ID can be omitted)
 
static constexpr uint8_t TNF_MASK {0x07}
 Type Name Format.
 

Detailed Description

NDEF Record attribute (1st byte)

Member Function Documentation

◆ chunk() [1/2]

bool m5::nfc::ndef::Attribute::chunk ( ) const
inline

Chunked flag.

Returns
True if the record is chunked

◆ chunk() [2/2]

void m5::nfc::ndef::Attribute::chunk ( const bool b)
inline

Set Chunked flag.

Parameters
bFlag value

◆ idLength() [1/2]

bool m5::nfc::ndef::Attribute::idLength ( ) const
inline

ID Length flag.

Returns
True if the record contains ID length and ID fields

◆ idLength() [2/2]

void m5::nfc::ndef::Attribute::idLength ( const bool b)
inline

Set ID Length flag.

Parameters
bFlag value

◆ messageBegin() [1/2]

bool m5::nfc::ndef::Attribute::messageBegin ( ) const
inline

Message Begin flag.

Returns
True if the record is the first record in a message

◆ messageBegin() [2/2]

void m5::nfc::ndef::Attribute::messageBegin ( const bool b)
inline

Set Message Begin flag.

Parameters
bFlag value

◆ messageEnd() [1/2]

bool m5::nfc::ndef::Attribute::messageEnd ( ) const
inline

Message End flag.

Returns
True if the record is the last record in a message

◆ messageEnd() [2/2]

void m5::nfc::ndef::Attribute::messageEnd ( const bool b)
inline

Set Message End flag.

Parameters
bFlag value

◆ shortRecord() [1/2]

bool m5::nfc::ndef::Attribute::shortRecord ( ) const
inline

Short Record flag.

Returns
True if the record uses one-byte payload length

◆ shortRecord() [2/2]

void m5::nfc::ndef::Attribute::shortRecord ( const bool b)
inline

Set Short Record flag.

Parameters
bFlag value

◆ tnf() [1/2]

TNF m5::nfc::ndef::Attribute::tnf ( ) const
inline

Type Name Format.

Returns
TNF value encoded in the attribute byte

◆ tnf() [2/2]

void m5::nfc::ndef::Attribute::tnf ( const TNF t)
inline

Set Type Name Format.

Parameters
tTNF value