NFC
Record (NFC)
The NFC Record class specifies the custom data to be sent via NFC. This section describes the methods you may need to use BLE.setCustomData().
setTnf();
// PROTOTYPE
void setTnf(Tnf tnf)
The valid values for Record::Tnf are:
TNF_EMPTY(0x00)TNF_WELL_KNOWN(0x01)TNF_MIME_MEDIA(0x02)TNF_ABSOLUTE_URI(0x03)TNF_EXTERNAL_TYPE(0x04)TNF_UNKNOWN(0x05)TNF_UNCHANGED(0x06)TNF_RESERVED(0x07)
setType()
Set the type field in the NFC record.
// PROTOTYPE
size_t setType(const void* type, uint8_t numBytes);
setId()
The ID field is optional in NFC. If you are using the ID, call this method to set the value. It will automatically set the IL field in the header.
// PROTOTYPE
size_t setId(const void* id, uint8_t numBytes);
setPayload()
Appends to the NFC record payload.
// PROTOTYPE
size_t setPayload(const void* payload, size_t numBytes);
Returns the number of bytes added (numBytes).