PN532 NFC shield of Adafruit based on PN532 of Seeed.
Fork of PN532 by
NfcTag.h
00001 #ifndef NfcTag_h 00002 #define NfcTag_h 00003 00004 #include <stdint.h> 00005 #include <NdefMessage.h> 00006 00007 class NfcTag 00008 { 00009 public: 00010 NfcTag(); 00011 NfcTag(uint8_t *uid, unsigned int uidLength); 00012 NfcTag(uint8_t *uid, unsigned int uidLength, string tagType); 00013 NfcTag(uint8_t *uid, unsigned int uidLength, string tagType, NdefMessage& ndefMessage); 00014 NfcTag(uint8_t *uid, unsigned int uidLength, string tagType, const uint8_t *ndefData, const int ndefDataLength); 00015 ~NfcTag(void); 00016 NfcTag& operator=(const NfcTag& rhs); 00017 uint8_t getUidLength(); 00018 void getUid(uint8_t *uid, unsigned int uidLength); 00019 string getUidString(); 00020 string getTagType(); 00021 bool hasNdefMessage(); 00022 NdefMessage getNdefMessage(); 00023 void print(); 00024 private: 00025 uint8_t *_uid; 00026 unsigned int _uidLength; 00027 string _tagType; // Mifare Classic, NFC Forum Type {1,2,3,4}, Unknown 00028 NdefMessage* _ndefMessage; 00029 // TODO capacity 00030 // TODO isFormatted 00031 }; 00032 00033 #endif
Generated on Thu Jul 14 2022 10:42:53 by 1.7.2