-
Notifications
You must be signed in to change notification settings - Fork 24
/
NFCRecord.h
56 lines (45 loc) · 1.02 KB
/
NFCRecord.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
/*
Project: 1Sheeld Library
File: NFCRecord.h
Version: 1.5
Compiler: Arduino avr-gcc 4.3.2
Author: Integreight
Date: 2015.3
*/
#ifndef NFCRecord_h
#define NFCRecord_h
//Output Function ID
#define NFC_RECORD_QUERY_DATA 0x01
#define NFC_RECORD_QUERY_TYPE 0x02
#define NFC_RECORD_QUERY_PARSED_DATA 0x03
//Literals
#define TNF_UNKNOWN 0x00
#define TNF_EMPTY 0x01
#define TNF_EXTERNAL_TYPE 0x02
#define TNF_MIME_MEDIA 0x03
#define TNF_UNCHANGED 0x04
#define TNF_ABSOLUTE_URI 0x05
#define RTD_TEXT 0x06
#define RTD_URI 0x07
#define RTD_UNSUPPORTED 0x08
class NFCRecord
{
public:
NFCRecord(byte );
NFCRecord();
byte getTypeCategory();
int getTypeLength();
int getDataLength();
void queryData(int=0 ,byte=64);
void queryType(int=0 ,byte=64);
void queryParsedData();
bool isNull();
private:
bool isRecordNull;
byte recordType;
int recordTypeLength;
int recordDataLength;
byte recordNumber;
friend class NFCShield;
};
#endif