Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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.
Revision 10:9f34b0cfefe4, committed 2016-01-08
- Comitter:
- giovannivisentini
- Date:
- Fri Jan 08 15:52:39 2016 +0000
- Parent:
- 9:689c1f56f359
- Child:
- 11:eaf42739791e
- Commit message:
- update comment
Changed in this revision
--- a/Message.h Fri Jan 08 15:26:21 2016 +0000 +++ b/Message.h Fri Jan 08 15:52:39 2016 +0000 @@ -67,7 +67,7 @@ } /** - * get the specific record contained by this message, or NULL if itn't a valid index + * get the specific record contained by this message, or NULL if isn't a valid index * @param index record index * @return if present a record otherwise NULL */
--- a/Record.h Fri Jan 08 15:26:21 2016 +0000
+++ b/Record.h Fri Jan 08 15:52:39 2016 +0000
@@ -83,6 +83,7 @@
}
/**
+ * tell if it is the last record
* @return true if it is the last record in the message
*/
bool isLastRecord() const {
@@ -90,6 +91,7 @@
}
/**
+ * tell if it is the first record
* @return true if it is the fist record in the message
*/
bool isFirstRecord() const {
@@ -97,13 +99,17 @@
}
/**
- * set the record as generic
+ * set the record as generic (not the first one and not the last one)
*/
void setAsMiddleRecord() {
mRecordHeader.setMB(false);
mRecordHeader.setME(false);
}
+ /**
+ * Tell if the record is in the middle of a chain
+ * @return true if is not the fist or the last one
+ */
bool isMiddleRecord() const{
return ! (mRecordHeader.getMB() || mRecordHeader.getME());
}
--- a/RecordType/RecordAAR.h Fri Jan 08 15:26:21 2016 +0000
+++ b/RecordType/RecordAAR.h Fri Jan 08 15:52:39 2016 +0000
@@ -69,10 +69,14 @@
/**
- * @see Recor#write(uint8_t*)
+ * @see Record#write(uint8_t*)
*/
virtual uint16_t write(uint8_t *buffer);
+ /**
+ * get the record type
+ * @return TYPE_AAR
+ */
virtual RecordType_t getType() const {
return TYPE_AAR;
} //getType
--- a/RecordType/RecordGeo.h Fri Jan 08 15:26:21 2016 +0000
+++ b/RecordType/RecordGeo.h Fri Jan 08 15:52:39 2016 +0000
@@ -4,7 +4,7 @@
* @author ST / Central Labs
* @version V1.0.0
* @date 13 Nov 2015
- * @brief Specialize the @{link RecordUri} for handle a location position, the location
+ * @brief Specialize the @{link RecordURI} for handle a location position, the location
* is store with latitude and longitude
******************************************************************************
* @attention
@@ -46,7 +46,7 @@
/**
* Specialize the @{link RecordUri} for handle a location position, the location is store with latitude and longitude
* @par
- * The coordinate are stored keeping 4 decimal positionß
+ * The coordinate are stored keeping 4 decimal position
*/
class RecordGeo: public RecordURI {
public:
--- a/RecordType/RecordText.h Fri Jan 08 15:26:21 2016 +0000
+++ b/RecordType/RecordText.h Fri Jan 08 15:52:39 2016 +0000
@@ -97,6 +97,7 @@
} //getType
/**
+ * get the text inside this record
* @return the text content
*/
const std::string& getText() const {
@@ -113,6 +114,7 @@
}
/**
+ * get the language use in the text
* @return language use in the text
*/
const std::string& getLanguage()const{
@@ -120,6 +122,7 @@
}
/**
+ * get the encoding used for store the text
* @return get the encoding used for store the text
*/
TextEncoding getEncoding()const{
