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: RecordType/RecordAAR.h
- Revision:
- 9:689c1f56f359
- Parent:
- 8:473f6e0b03df
- Child:
- 10:9f34b0cfefe4
--- a/RecordType/RecordAAR.h Tue Dec 22 15:34:06 2015 +0000 +++ b/RecordType/RecordAAR.h Fri Jan 08 15:26:21 2016 +0000 @@ -4,7 +4,7 @@ * @author ST / Central Labs * @version V1.0.0 * @date 6 Nov 2015 - * @brief Create a record that can start an application in an Android mobile + * @brief Create a Record that can start an application in an Android mobile ****************************************************************************** * @attention * @@ -45,12 +45,14 @@ namespace NDefLib { /** - * create a record that can start an application in an Android mobile + * create a Record that can start an application in an Android mobile, + * The package data are copied inside the class */ class RecordAAR: public Record { public: + /** - * create an RecordAAR reading the data from the buffer + * Create an RecordAAR reading the data from the buffer * @param header record header already read * @param buffer buffer where read the data * @return an object of type recordAAR or NULL @@ -66,6 +68,9 @@ explicit RecordAAR(const std::string &packageName); + /** + * @see Recor#write(uint8_t*) + */ virtual uint16_t write(uint8_t *buffer); virtual RecordType_t getType() const { @@ -88,13 +93,20 @@ mRecordHeader.setPayloadLength(mPackageName.size()); } - virtual ~RecordAAR() { }; + virtual ~RecordAAR() { }; + /** + * compare two object, + * @return true if the records have the same package name + */ bool operator==(const RecordAAR &other) const{ return (mPackageName==other.mPackageName); } private: + /** + * application to start + */ std::string mPackageName; /**