forked from Integreight/1Sheeld-Arduino-Library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NFCTag.h
62 lines (49 loc) · 1.27 KB
/
NFCTag.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
Project: 1Sheeld Library
File: NFCTag.h
Version: 1.5
Compiler: Arduino avr-gcc 4.3.2
Author: Integreight
Date: 2015.3
*/
#ifndef TagClass_h
#define TagClass_h
#include "NFCRecord.h"
//Input Function ID
#define NFC_TAG_ON_TYPE 0x03
#define NFC_TAG_ON_PARSED 0x04
#define NFC_TAG_ON_DATA 0x05
class NFCTag
{
public:
NFCTag(byte *,byte, int, int, byte);
bool isEmpty();
byte * getId();
byte getIdLength();
byte getNumberOfRecords();
NFCRecord & getRecord(int);
int getSize();
int getMaxSize();
void setOnRecordTypeResponse(void (*userFunction)(byte , byte [],byte ));
void setOnRecordParsedDataResponse(void (*userFunction)(byte , char[]));
void setOnRecordDataResponse(void (userFunction)(byte ,byte [],byte ));
bool isNull();
~NFCTag();
private:
NFCTag();
bool isTypeCallBackAssigned;
bool isDataCallBackAssigned;
bool isParsedDataCallBackAssigned;
byte * tagId;
int tagSize;
int tagMaxSize;
byte recordsNumber;
byte tagIdLength;
NFCRecord ** recordsArray;
static NFCRecord nullRecord;
void (*recordTypeCallBack)(byte , byte[],byte);
void (*recordParsedCallBack)(byte , char[]);
void (*recordDataCallBack)(byte , byte[],byte);
friend class NFCShield;
};
#endif