Utility library to read and write Ndef messages from/to a Type4 NFC tag
Dependents: NFC M2M_2016_STM32 MyongjiElec_capstone1 IDW01M1_Cloud_IBM ... more
Fork of NDefLib by
NDEF NFC library
This library provides an abstract API to create NDEF formatted messages and records and to read/write them from/to a Type4 NFC Tag.
Implementations
At the moment, the NDEF API is implemented by X_NUCLEO_NFC01A1 and X_NUCLEO_NFC02A1 Dynamic NFC Tag libraries respectively driving the X-NUCLEO-NFC01A1 and X-NUCLEO-NFC02A1 boards.
RecordType/RecordAAR.h@1:a0eeb478a45a, 2015-11-24 (annotated)
- Committer:
- giovannivisentini
- Date:
- Tue Nov 24 14:33:06 2015 +0000
- Revision:
- 1:a0eeb478a45a
- Parent:
- 0:04b82ae7aa43
- Child:
- 4:eaf6c49a86e4
implement tag reading
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
giovannivisentini | 0:04b82ae7aa43 | 1 | /* |
giovannivisentini | 0:04b82ae7aa43 | 2 | * RecordAAR.h |
giovannivisentini | 0:04b82ae7aa43 | 3 | * |
giovannivisentini | 0:04b82ae7aa43 | 4 | * Created on: Nov 6, 2015 |
giovannivisentini | 0:04b82ae7aa43 | 5 | * Author: giovanni visentini |
giovannivisentini | 0:04b82ae7aa43 | 6 | */ |
giovannivisentini | 0:04b82ae7aa43 | 7 | |
giovannivisentini | 0:04b82ae7aa43 | 8 | #ifndef NDEFLIB_RECORDTYPE_RECORDAAR_H_ |
giovannivisentini | 0:04b82ae7aa43 | 9 | #define NDEFLIB_RECORDTYPE_RECORDAAR_H_ |
giovannivisentini | 0:04b82ae7aa43 | 10 | |
giovannivisentini | 0:04b82ae7aa43 | 11 | #include <string> |
giovannivisentini | 0:04b82ae7aa43 | 12 | |
giovannivisentini | 0:04b82ae7aa43 | 13 | #include "NDefLib/Record.h" |
giovannivisentini | 0:04b82ae7aa43 | 14 | namespace NDefLib { |
giovannivisentini | 0:04b82ae7aa43 | 15 | |
giovannivisentini | 0:04b82ae7aa43 | 16 | class RecordAAR: public Record { |
giovannivisentini | 0:04b82ae7aa43 | 17 | public: |
giovannivisentini | 1:a0eeb478a45a | 18 | static RecordAAR* parse(const Record::RecordHeader &header, |
giovannivisentini | 1:a0eeb478a45a | 19 | const uint8_t *const buffer); |
giovannivisentini | 1:a0eeb478a45a | 20 | |
giovannivisentini | 1:a0eeb478a45a | 21 | |
giovannivisentini | 0:04b82ae7aa43 | 22 | RecordAAR(const std::string &packageName); |
giovannivisentini | 0:04b82ae7aa43 | 23 | |
giovannivisentini | 0:04b82ae7aa43 | 24 | virtual uint16_t write(uint8_t *buffer); |
giovannivisentini | 1:a0eeb478a45a | 25 | |
giovannivisentini | 1:a0eeb478a45a | 26 | virtual RecordType_t getType()const{ |
giovannivisentini | 1:a0eeb478a45a | 27 | return TYPE_AAR; |
giovannivisentini | 1:a0eeb478a45a | 28 | }//getType |
giovannivisentini | 1:a0eeb478a45a | 29 | |
giovannivisentini | 1:a0eeb478a45a | 30 | const std::string& getPackage()const{ |
giovannivisentini | 1:a0eeb478a45a | 31 | return mPackageName; |
giovannivisentini | 1:a0eeb478a45a | 32 | } |
giovannivisentini | 1:a0eeb478a45a | 33 | |
giovannivisentini | 0:04b82ae7aa43 | 34 | virtual ~RecordAAR(){}; |
giovannivisentini | 0:04b82ae7aa43 | 35 | |
giovannivisentini | 0:04b82ae7aa43 | 36 | private: |
giovannivisentini | 0:04b82ae7aa43 | 37 | const std::string mPackageName; |
giovannivisentini | 0:04b82ae7aa43 | 38 | |
giovannivisentini | 1:a0eeb478a45a | 39 | static const char sRecordType[]; |
giovannivisentini | 0:04b82ae7aa43 | 40 | }; |
giovannivisentini | 0:04b82ae7aa43 | 41 | |
giovannivisentini | 0:04b82ae7aa43 | 42 | } /* namespace NDefLib */ |
giovannivisentini | 0:04b82ae7aa43 | 43 | |
giovannivisentini | 0:04b82ae7aa43 | 44 | #endif /* NDEFLIB_RECORDTYPE_RECORDAAR_H_ */ |