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

PICC information for NFC-F. More...

#include <nfcf.hpp>

Public Member Functions

bool valid () const
 Valid for detection?
 
bool validEmulation () const
 Valid for emulation?
 
uint16_t userAreaSize () const
 Total user area size.
 
uint16_t firstUserBlock () const
 Gets the first user block.
 
uint16_t lastUserBlock () const
 Gets the last user block.
 
bool isUserBlock (const block_t block) const
 Is user block?
 
uint8_t maximumReadBlocks () const
 Maximum number of blocks that can be read simultaneously.
 
uint8_t maximumWriteBlocks () const
 Maximum number of blocks that can be write simultaneously.
 
bool checkFormat (const Format f) const
 Check format.
 
bool supportsNDEF () const
 Supports NDEF?
 
NFCForumTag nfcForumTagType () const
 NFC ForumTag.
 
bool emulate (const Type t, const uint8_t idm[FELICA_ID_LENGTH], const uint8_t pmm[FELICA_ID_LENGTH], const uint16_t sc=0)
 Emulation settings.
 
std::string idmAsString () const
 Gets the IDm string.
 
std::string pmmAsString () const
 Gets the PMm string.
 
std::string typeAsString () const
 Gets the type string.
 

Public Attributes

union { 
 
   uint8_t   m [16] {} 
 
   struct { 
 
      uint8_t   idm [FELICA_ID_LENGTH] 
 Manufacture ID.
 
      uint8_t   pmm [FELICA_ID_LENGTH] 
 Manufacture Parameter.
 
   }  
 
};  
 
uint16_t request_data {}
 Any request data if exists.
 
RequestCode request_code {}
 Type of the request_data.
 
Type type {}
 PICC Type.
 
Format format {}
 Format type group bits.
 
uint8_t _pad {}
 
uint16_t dfc_format {}
 DFC format ID:0x82[8,9] BE if format include DFC.
 
uint16_t emulation_sc {}
 System code for emulation.
 

Detailed Description

PICC information for NFC-F.

Member Function Documentation

◆ checkFormat()

bool m5::nfc::f::PICC::checkFormat ( const Format f) const
inline

Check format.

Parameters
fFormat bits to test
Returns
True if all specified format bits are set

◆ emulate()

bool m5::nfc::f::PICC::emulate ( const Type t,
const uint8_t idm[FELICA_ID_LENGTH],
const uint8_t pmm[FELICA_ID_LENGTH],
const uint16_t sc = 0 )

Emulation settings.

Parameters
tType
idmIDm
pmmPMm
scSystem code
Returns
True if successful

◆ firstUserBlock()

uint16_t m5::nfc::f::PICC::firstUserBlock ( ) const
inline

Gets the first user block.

Returns
First user block number, or 0xFFFF if invalid

◆ isUserBlock()

bool m5::nfc::f::PICC::isUserBlock ( const block_t block) const
inline

Is user block?

Parameters
blockBlock list element
Returns
True if the block is in the user area

◆ lastUserBlock()

uint16_t m5::nfc::f::PICC::lastUserBlock ( ) const
inline

Gets the last user block.

Returns
Last user block number, or 0xFFFF if invalid

◆ maximumReadBlocks()

uint8_t m5::nfc::f::PICC::maximumReadBlocks ( ) const
inline

Maximum number of blocks that can be read simultaneously.

Returns
Maximum readable block count

◆ maximumWriteBlocks()

uint8_t m5::nfc::f::PICC::maximumWriteBlocks ( ) const
inline

Maximum number of blocks that can be write simultaneously.

Returns
Maximum writable block count

◆ nfcForumTagType()

NFCForumTag m5::nfc::f::PICC::nfcForumTagType ( ) const
inline

NFC ForumTag.

Returns
NFC Forum Tag Type

◆ supportsNDEF()

bool m5::nfc::f::PICC::supportsNDEF ( ) const
inline

Supports NDEF?

Returns
True if the PICC format supports NDEF

◆ userAreaSize()

uint16_t m5::nfc::f::PICC::userAreaSize ( ) const
inline

Total user area size.

Returns
User area size in bytes, or 0 if invalid