/* Function for calculating the payload length of the NFC NDEF Alternative Carrier record.  */
static uint32_t nfc_ac_rec_payload_size_get(nfc_ac_rec_payload_desc_t const *p_ac_rec_payload_desc)
/* Function for calculating the payload length of the NFC NDEF Alternative Carrier record.  */
static uint32_t nfc_ac_rec_payload_size_get(nfc_ac_rec_payload_desc_t const *p_ac_rec_payload_desc)
{
    int32_t i = 0;
    uint32_t payload_size = AC_REC_CPS_BYTE_SIZE;
    payload_size +=  p_ac_rec_payload_desc->carrier_data_ref.length + AC_REC_DATA_REF_LEN_SIZE;
    payload_size += AC_REC_AUX_DATA_REF_COUNT_SIZE;
    for (i = 0; i < p_ac_rec_payload_desc->aux_data_ref_count; i++)
    {
        payload_size += p_ac_rec_payload_desc->p_aux_data_ref[i].length + AC_REC_DATA_REF_LEN_SIZE;
    }
    return payload_size;
}