Generation of NFC NDEF Handover Select records for NDEF messages.
More...
Generation of NFC NDEF Handover Select records for NDEF messages.
#define NFC_NDEF_HS_RECORD_DESC_DEF |
( |
|
NAME, |
|
|
|
MAJOR_VERSION, |
|
|
|
MINOR_VERSION, |
|
|
|
MAX_RECORDS |
|
) |
| |
Value:
{ \
.minor_version = MINOR_VERSION, \
}; \
NFC_NDEF_GENERIC_RECORD_DESC_DEF(NAME, \
0, \
0, \
&(NAME##_nfc_hs_rec_payload_desc))
Macro for creating and initializing an NFC NDEF record descriptor for a Handover Select record.
This macro creates and initializes an instance of type nfc_ndef_record_desc_t and an instance of type nfc_hs_rec_payload_desc_t, which together constitute an instance of a Handover Select record.
Use the macro NFC_NDEF_HS_RECORD_DESC to access the NDEF Handover Select record descriptor instance.
- Note
- The record descriptor is declared as automatic variable, which implies that the NDEF message encoding (see nfc_ble_full_handover_select_msg_encode) must be done in the same variable scope.
- Parameters
-
[in] | NAME | Name of the created record descriptor instance. |
[in] | MAJOR_VERSION | Major version number of the supported Connection Handover specification. |
[in] | MINOR_VERSION | Minor version number of the supported Connection Handover specification. |
[in] | MAX_RECORDS | Maximum number of local records (ac records plus optional err record). |
Function for adding a local record to an NFC NDEF Handover Select record.
- Parameters
-
[in,out] | p_hs_rec | Pointer to a Handover Select record. |
[in] | p_local_rec | Pointer to a local record to add. |
- Return values
-
NRF_SUCCESS | If the local record was added successfully. |
NRF_ERROR_NO_MEM | If the Handover Select record already contains the maximum number of local records. |
Function for clearing local records in the NFC NDEF Handover Select record.
This function clears local records from the Handover Select record.
- Parameters
-
[in,out] | p_hs_rec | Pointer to the Handover Select record descriptor. |
Constructor for an NFC NDEF Handover Select record payload.
This function encodes the payload of a Handover Select record as specified in the Connection Handover standard. It implements an API compatible with p_payload_constructor_t.