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.
Diff: Record.h
- Revision:
- 7:1ebd6049fa57
- Parent:
- 6:739e3211749d
- Child:
- 8:473f6e0b03df
--- a/Record.h Thu Dec 03 14:56:01 2015 +0000 +++ b/Record.h Thu Dec 10 14:58:43 2015 +0000 @@ -90,6 +90,13 @@ } /** + * @return true if it is the fist record in the message + */ + bool isFirstRecord() const { + return mRecordHeader.getMB(); + } + + /** * set the record as generic */ void setAsMiddleRecord() { @@ -97,6 +104,10 @@ mRecordHeader.setME(false); } + bool isMiddleRecord() const{ + return ! (mRecordHeader.getMB() || mRecordHeader.getME()); + } + /** * get tag type * @return tag type if not overwrite it return TYPE_UNKNOWN @@ -105,6 +116,15 @@ return TYPE_UNKNOWN; } //getType + + /** + * get the record header for this record + * @return record header used for this record + */ + const RecordHeader& getHeader() const{ + return mRecordHeader; + } + /** * number of byte needed for store this record * @return size header + size record content