|
hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
|
NDEF record encoding/decoding utility. More...
#include <stddef.h>#include <stdint.h>#include "infineon/ifx-error.h"#include "infineon/ifx-ndef-record.h"#include "infineon/ifx-utils.h"Go to the source code of this file.
Macros | |
| #define | IFX_RECORD_HANDLER_ENCODE UINT8_C(0x01) |
| Identifier for NDEF record encode ID. | |
| #define | IFX_RECORD_HANDLER_DECODE UINT8_C(0x02) |
| Identifier for NDEF record decode ID. | |
| #define | IFX_NDEF_HEADER_FIELD_LEN UINT32_C(0x01) |
| Length of header field in bytes. | |
| #define | IFX_NDEF_TYPE_FIELD_LEN UINT32_C(0x01) |
| Length of type length field in bytes. | |
| #define | IFX_NDEF_ID_FIELD_LEN UINT32_C(0x01) |
| Length of id length field in bytes. | |
| #define | IFX_NDEF_SR_PAYLOAD_LEN_FIELD_LEN UINT32_C(0x01) |
| Length of short record payload length field in bytes. | |
| #define | IFX_NDEF_PAYLOAD_LEN_FIELD_LEN UINT32_C(0x04) |
| Length of payload length field in bytes. | |
| #define | IFX_NDEF_SR_PAYLOAD_LEN_FIELD_MAX_LEN UINT32_C(0xFF) |
| Maximum payload length value of short record. | |
| #define | IFX_NDEF_ID_LEN_FIELD_NONE UINT32_C(0x00) |
| Invalid id length. | |
| #define | IFX_NDEF_EMPTY_MESSAGE_LEN UINT32_C(0x03) |
| Length of empty ndef message. | |
Functions | |
| ifx_status_t | record_handler_encode (const ifx_record_handle_t *handle, ifx_blob_t *record_bytes) |
| Encodes the record bytes for the specific record type handle given as input. | |
| ifx_status_t | record_handler_decode (ifx_blob_t *record_bytes, ifx_record_handle_t *handle) |
| Decodes the record handles information from the given record bytes as input. | |
NDEF record encoding/decoding utility.
Definition in file ifx-record-handler.h.
| #define IFX_NDEF_EMPTY_MESSAGE_LEN UINT32_C(0x03) |
Length of empty ndef message.
Definition at line 72 of file ifx-record-handler.h.
| #define IFX_NDEF_HEADER_FIELD_LEN UINT32_C(0x01) |
Length of header field in bytes.
Definition at line 37 of file ifx-record-handler.h.
| #define IFX_NDEF_ID_FIELD_LEN UINT32_C(0x01) |
Length of id length field in bytes.
Definition at line 47 of file ifx-record-handler.h.
| #define IFX_NDEF_ID_LEN_FIELD_NONE UINT32_C(0x00) |
Invalid id length.
Definition at line 67 of file ifx-record-handler.h.
| #define IFX_NDEF_PAYLOAD_LEN_FIELD_LEN UINT32_C(0x04) |
Length of payload length field in bytes.
Definition at line 57 of file ifx-record-handler.h.
| #define IFX_NDEF_SR_PAYLOAD_LEN_FIELD_LEN UINT32_C(0x01) |
Length of short record payload length field in bytes.
Definition at line 52 of file ifx-record-handler.h.
| #define IFX_NDEF_SR_PAYLOAD_LEN_FIELD_MAX_LEN UINT32_C(0xFF) |
Maximum payload length value of short record.
Definition at line 62 of file ifx-record-handler.h.
| #define IFX_NDEF_TYPE_FIELD_LEN UINT32_C(0x01) |
Length of type length field in bytes.
Definition at line 42 of file ifx-record-handler.h.
| #define IFX_RECORD_HANDLER_DECODE UINT8_C(0x02) |
Identifier for NDEF record decode ID.
Definition at line 32 of file ifx-record-handler.h.
| #define IFX_RECORD_HANDLER_ENCODE UINT8_C(0x01) |
Identifier for NDEF record encode ID.
Definition at line 27 of file ifx-record-handler.h.
| ifx_status_t record_handler_decode | ( | ifx_blob_t * | record_bytes, |
| ifx_record_handle_t * | handle ) |
Decodes the record handles information from the given record bytes as input.
| [in] | record_bytes | Pointer to the record bytes whose details to be decoded to the record handle. |
| [out] | handle | Pointer to the record handle where record details are updated. |
| IFX_SUCCESS | If decoding is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| ifx_status_t record_handler_encode | ( | const ifx_record_handle_t * | handle, |
| ifx_blob_t * | record_bytes ) |
Encodes the record bytes for the specific record type handle given as input.
| [in] | handle | Pointer to the handle of specific record type. |
| [out] | record_bytes | Pointer to the encoded record bytes. |
| IFX_SUCCESS | If encoding is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |