Functions for parsing and decoding Alternative Carrier records. More...
Functions | |
ret_code_t | nfc_ac_rec_parse (nfc_ndef_record_desc_t const *const p_rec_desc, nfc_ac_rec_payload_desc_t *const p_ac_rec_payload_data) |
Function for parsing general record description as Alternative Carrier record. More... | |
Functions for parsing and decoding Alternative Carrier records.
ret_code_t nfc_ac_rec_parse | ( | nfc_ndef_record_desc_t const *const | p_rec_desc, |
nfc_ac_rec_payload_desc_t *const | p_ac_rec_payload_data | ||
) |
Function for parsing general record description as Alternative Carrier record.
This function checks if record description matches the Alternative Carrier record and extracts its payload structure. It is required for the record description to use binary payload descriptor.
[in] | p_rec_desc | Pointer to the record descriptor. |
[in,out] | p_ac_rec_payload_data | Pointer to the structure that will be used to hold parsed data. |
NRF_SUCCESS | If the function completed successfully. |
NRF_ERROR_INVALID_DATA | If the NDEF record type or TNF is incorrect. |
NRF_ERROR_NOT_SUPPORTED | If the payload descriptor is not binary. |
NRF_ERROR_NULL | If any provided arguments or any needed buffers stored in p_ac_rec_payload_data are nulls. |
NRF_ERROR_NO_MEM | If any from provided buffers does not have enough space to store its data. |
NRF_ERROR_INVALID_LENGTH | If any length field exceeds record payload. |
NRF_ERROR_INVALID_PARAM | If Carrier Power State field has incorrect value. |