|
hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
|
NDEF message encoding/decoding utility. More...
#include <stddef.h>#include <stdint.h>#include "infineon/ifx-utils.h"#include "infineon/ifx-ndef-record.h"Go to the source code of this file.
Macros | |
| #define | IFX_NDEF_MESSAGE_ENCODE UINT8_C(0x01) |
| Identifier for NDEF message encode ID. | |
| #define | IFX_NDEF_MESSAGE_DECODE UINT8_C(0x02) |
| Identifier for NDEF message decode ID. | |
| #define | IFX_NDEF_MESSAGE_EMPTY UINT8_C(0xD0) |
| Empty ndef record data. | |
Functions | |
| ifx_status_t | ifx_ndef_message_encode (const ifx_record_handle_t *record_handles, uint32_t number_of_records, ifx_blob_t *ndef_message) |
| Encodes the array of the NDEF record handles into the NDEF message. | |
| ifx_status_t | ifx_ndef_message_decode (const ifx_blob_t *ndef_message, uint32_t *number_of_records, ifx_record_handle_t *record_handles) |
| Decodes the NDEF message buffer to the NDEF records array. | |
NDEF message encoding/decoding utility.
For more details refer to technical specification document NFC Data Exchange Format(NFCForum-TS-NDEF_1.0)
Definition in file ifx-ndef-message.h.
| #define IFX_NDEF_MESSAGE_DECODE UINT8_C(0x02) |
Identifier for NDEF message decode ID.
Definition at line 33 of file ifx-ndef-message.h.
| #define IFX_NDEF_MESSAGE_EMPTY UINT8_C(0xD0) |
Empty ndef record data.
Definition at line 38 of file ifx-ndef-message.h.
| #define IFX_NDEF_MESSAGE_ENCODE UINT8_C(0x01) |
Identifier for NDEF message encode ID.
Definition at line 28 of file ifx-ndef-message.h.
| ifx_status_t ifx_ndef_message_decode | ( | const ifx_blob_t * | ndef_message, |
| uint32_t * | number_of_records, | ||
| ifx_record_handle_t * | record_handles ) |
Decodes the NDEF message buffer to the NDEF records array.
| [in] | ndef_message | Pointer to the NDEF message |
| [out] | number_of_records | Pointer to the total number of records. |
| [out] | record_handles | Pointer to the array of decoded NDEF record handles. |
| IFX_SUCCESS | If decoding is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| ifx_status_t ifx_ndef_message_encode | ( | const ifx_record_handle_t * | record_handles, |
| uint32_t | number_of_records, | ||
| ifx_blob_t * | ndef_message ) |
Encodes the array of the NDEF record handles into the NDEF message.
| [in] | record_handles | Pointer to the array of NDEF record handles. |
| [in] | number_of_records | Number of NDEF records |
| [out] | ndef_message | Pointer to the object that stores the encoded NDEF message. |
| IFX_SUCCESS | If encoding is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | If memory allocation is invalid |