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 ST Expansion SW Team

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:
1:a0eeb478a45a
Parent:
0:04b82ae7aa43
Child:
4:eaf6c49a86e4
--- a/RecordType/RecordSMS.h	Thu Nov 19 08:49:47 2015 +0000
+++ b/RecordType/RecordSMS.h	Tue Nov 24 14:33:06 2015 +0000
@@ -10,14 +10,29 @@
 
 #include <string>
 
-#include "RecordUri.h"
+#include "RecordURI.h"
 
 namespace NDefLib {
 
-class RecordSMS: public RecordUri {
+class RecordSMS: public RecordURI {
 public:
+	static RecordSMS* parse(const Record::RecordHeader &header,const uint8_t *buffer);
+
 	RecordSMS(const std::string &number,const std::string &message, const std::string info="");
 
+	virtual RecordType_t getType()const{
+		return TYPE_SMS;
+	}//getType
+
+	const std::string& getNumber()const{
+		return mNumber;
+	}
+
+	const std::string& getMessagge()const{
+		return mMsg;
+	}
+
+
 	virtual ~RecordSMS(){};
 
 private:
@@ -25,11 +40,10 @@
 	const std::string mMsg;
 	const std::string mInfo;
 
-	static const std::string smsTag;
-	static const std::string bodyTag;
+	static const std::string sSmsTag;
+	static const std::string sBodyTag;
 };
 
 } /* namespace NDefLib */
 
 #endif /* NDEFLIB_RECORDTYPE_RECORDSMS_H_ */
-