nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ nfc_ndef_ch_msg_hr_create()

int nfc_ndef_ch_msg_hr_create ( struct nfc_ndef_msg_desc msg,
struct nfc_ndef_record_desc hr_rec,
const struct nfc_ndef_record_desc cr_rec,
const struct nfc_ndef_ch_msg_records records 
)

#include <include/nfc/ndef/ch_msg.h>

Encode an NFC NDEF Handover Request message.

This function create an NFC NDEF message. It create a nested NDEF message with the Alternative Carrier Records. Next the Records with the Carrier data are added into the main Connection Hanover Request message. Number of the Alternative Carrier Records must be equal to the number of the Carrier Records.

Parameters
[in,out]msgPointer to NDEF message. This message is initialized with Connection Handover Record. The message must be able to keep at least count of the Alternative Carrier Records + 1 records.
[out]hr_recPointer to the Handover Request Record.
[in]cr_recPointer to the Collision Resolution Record.
[in]recordsPointer to structure which contains the Alternative Carrier Records and the Carrier Records
Return values
0If the operation was successful. Otherwise, a (negative) error code is returned.