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
Record Class Reference
Base class for a NDefRecord. More...
#include <Record.h>
Inherited by EmptyRecord, RecordAAR, RecordMimeType, RecordText, and RecordURI.
Public Types | |
| enum | RecordType_t { TYPE_UNKNOWN, TYPE_TEXT, TYPE_AAR, TYPE_MIME, TYPE_URI, TYPE_URI_MAIL, TYPE_URI_SMS, TYPE_URI_GEOLOCATION, TYPE_MIME_VCARD, TYPE_WIFI_CONF } |
Enum used to identify the record type. More... | |
Public Member Functions | |
| void | set_as_first_record () |
| Set the record as the first record in the message. | |
| void | set_as_last_record () |
| Set the record as the last record in the message. | |
| bool | is_last_record () const |
| Check if it is the last record in the message. | |
| bool | is_first_record () const |
| Check if it is the first record in the message. | |
| void | set_as_middle_record () |
| Set the record as generic (not the first one and not the last one) | |
| bool | is_middle_record () const |
| Check if the record is in the middle of a chain. | |
| virtual RecordType_t | get_type () const |
| Get tag type. | |
| const RecordHeader & | get_header () const |
| Get the record header. | |
| virtual uint16_t | get_byte_length () |
| Number of bytes needed to store this record. | |
| virtual uint16_t | write (uint8_t *buffer)=0 |
| Write the record content into a buffer. | |
Detailed Description
Base class for a NDefRecord.
- See also:
- NFC Data Exchange Format (NDEF) Technical Specification NDEF 1.0
Definition at line 50 of file Record.h.
Member Enumeration Documentation
| enum RecordType_t |
Enum used to identify the record type.
- Enumerator:
Member Function Documentation
| virtual uint16_t get_byte_length | ( | ) | [virtual] |
Number of bytes needed to store this record.
- Returns:
- size of the header + size of the record content
Reimplemented in RecordURI, RecordVCard, and RecordWifiConf.
| const RecordHeader& get_header | ( | ) | const |
| virtual RecordType_t get_type | ( | ) | const [virtual] |
Get tag type.
- This method should be overridden to return a valid type.
- Returns:
- tag type
Reimplemented in RecordAAR, RecordGeo, RecordMail, RecordMimeType, RecordSMS, RecordText, RecordURI, RecordVCard, and RecordWifiConf.
| bool is_first_record | ( | ) | const |
| bool is_last_record | ( | ) | const |
| bool is_middle_record | ( | ) | const |
| void set_as_first_record | ( | ) |
| void set_as_last_record | ( | ) |
| void set_as_middle_record | ( | ) |
| virtual uint16_t write | ( | uint8_t * | buffer ) | [pure virtual] |
Write the record content into a buffer.
- Parameters:
-
[out] buffer buffer to write the record content into, the buffer size must be almost Record#getByteLength bytes.
- Returns:
- number of written bytes
Implemented in EmptyRecord, RecordAAR, RecordMimeType, RecordText, RecordVCard, and RecordWifiConf.
Generated on Tue Jul 12 2022 14:14:49 by
1.7.2
