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/RecordWifiConf.h
- Revision:
- 19:13d84b136a62
- Parent:
- 18:cf1dd5c931c2
- Child:
- 20:31f727872290
--- a/RecordType/RecordWifiConf.h Thu Oct 27 07:39:26 2016 +0000 +++ b/RecordType/RecordWifiConf.h Fri Apr 28 12:13:51 2017 +0000 @@ -2,8 +2,8 @@ ****************************************************************************** * @file RecordWifiConf.h * @author ST / Central Labs - * @version V1.0.0 - * @date Nov 2016 + * @version V2.0.0 + * @date 28 Apr 2017 * @brief {@link RecordMimeType} that contains a Wifi configuration data ****************************************************************************** * @attention @@ -94,7 +94,7 @@ * Get the record type. * @return TYPE_WIFI_CONF */ - virtual RecordType_t getType() const { + virtual RecordType_t get_type() const { return TYPE_WIFI_CONF; } //getType @@ -102,9 +102,9 @@ * @return update the record content and return the number of * bytes needed to store this record */ - virtual uint16_t getByteLength() { - updateMimeData(); - return RecordMimeType::getByteLength(); + virtual uint16_t get_byte_length() { + update_mime_data(); + return RecordMimeType::get_byte_length(); } /** @@ -114,7 +114,7 @@ * @see Record#write */ virtual uint16_t write(uint8_t *buffer){ - updateMimeData(); + update_mime_data(); return RecordMimeType::write(buffer); } @@ -130,38 +130,38 @@ } - const std::string& getNetworkKey() const{ + const std::string& get_network_key() const{ return mPasskey; } - void setNetworkKey(const std::string &newKey){ + void set_network_key(const std::string &newKey){ mPasskey=newKey; mContentIsChange=true; } - const std::string& getNetworkSsid() const{ + const std::string& get_network_ssid() const{ return mSsid; } - void setNetworkSsid(const std::string &newSsid){ + void set_network_ssid(const std::string &newSsid){ mSsid=newSsid; mContentIsChange=true; } - authType_t getAuthType() const{ + authType_t get_auth_type() const{ return mAuthType; } - void setAuthType(const authType_t &newAuth){ + void set_auth_type(const authType_t &newAuth){ mAuthType = newAuth; mContentIsChange=true; } - encryptionType_t getEncryption() const{ + encryptionType_t get_encryption() const{ return mEncType; } - void setEncryptionType(const encryptionType_t &newEncript){ + void set_encryption_type(const encryptionType_t &newEncript){ mEncType = newEncript; mContentIsChange=true; } @@ -176,10 +176,10 @@ /** * function that update the ndef data format */ - void updateMimeData(); + void update_mime_data(); typedef uint16_t fieldType_t; //< type to use for store a field type - typedef uint16_t fieldLenght_t; //<type to use for store a filed lenght + typedef uint16_t fieldLenght_t; //<type to use for store a filed length /** * write a data field into the output buffer @@ -189,7 +189,7 @@ * @return number of write bytes */ template<typename T> - uint32_t writeDataField(const fieldType_t& dataType, + uint32_t write_data_field(const fieldType_t& dataType, const T& data, uint8_t *buffer); /** @@ -200,7 +200,7 @@ * @param out output buffer * @return number of write bytes */ - uint32_t writeDataField(const fieldType_t& dataType, + uint32_t write_data_field(const fieldType_t& dataType, const char *data,const fieldLenght_t& size, uint8_t *buffer); std::string mSsid;