hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
Data Structures | Macros | Functions
ifx-record-external.h File Reference

Model interface to create the external record types and get/set record fields. 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.

Data Structures

struct  ifx_record_generic_t
 Structure defines generic record details such as payload data and its length. More...
 

Macros

#define IFX_RECORD_EXT_NEW   UINT8_C(0x01)
 Identifier for model new external record.
 
#define IFX_RECORD_EXT_SET   UINT8_C(0x02)
 Identifier for model set external record ID.
 
#define IFX_RECORD_EXT_GET   UINT8_C(0x03)
 Identifier for model get external record.
 

Functions

ifx_status_t ifx_record_ext_new (ifx_record_handle_t *handle, const ifx_blob_t *type)
 Creates a new external record and handle of the created record. This handle holds the values of the record needed for encode and decode operations.
 
ifx_status_t ifx_record_ext_set_payload (ifx_record_handle_t *handle, const ifx_blob_t *payload)
 Sets the payload in the external record for the given record handle.
 
ifx_status_t ifx_record_ext_get_payload (const ifx_record_handle_t *handle, ifx_blob_t *payload)
 Gets the payload from the external record for the given record handle.
 

Detailed Description

Model interface to create the external record types and get/set record fields.

For more details refer to technical specification document for NFC Record Type Definition(NFCForum-TS-RTD_1.0)

Definition in file ifx-record-external.h.

Macro Definition Documentation

◆ IFX_RECORD_EXT_GET

#define IFX_RECORD_EXT_GET   UINT8_C(0x03)

Identifier for model get external record.

Definition at line 40 of file ifx-record-external.h.

◆ IFX_RECORD_EXT_NEW

#define IFX_RECORD_EXT_NEW   UINT8_C(0x01)

Identifier for model new external record.

Definition at line 30 of file ifx-record-external.h.

◆ IFX_RECORD_EXT_SET

#define IFX_RECORD_EXT_SET   UINT8_C(0x02)

Identifier for model set external record ID.

Definition at line 35 of file ifx-record-external.h.

Function Documentation

◆ ifx_record_ext_get_payload()

ifx_status_t ifx_record_ext_get_payload ( const ifx_record_handle_t * handle,
ifx_blob_t * payload )

Gets the payload from the external record for the given record handle.

Parameters
[out]handlePointer to the record handle.
[in]payloadPointer to the payload.
Returns
ifx_status_t
Return values
IFX_SUCCESSIf the get operation is successful
IFX_ILLEGAL_ARGUMENTIf invalid/NULL parameter is passed to function
IFX_OUT_OF_MEMORYIf memory allocation is invalid

◆ ifx_record_ext_new()

ifx_status_t ifx_record_ext_new ( ifx_record_handle_t * handle,
const ifx_blob_t * type )

Creates a new external record and handle of the created record. This handle holds the values of the record needed for encode and decode operations.

Parameters
[out]handleHandle of the created external record.
[in]typePointer to the type.
Returns
ifx_status_t
Return values
IFX_SUCCESSIf the record creation operation is successful
IFX_ILLEGAL_ARGUMENTIf invalid/NULL parameter is passed to function
IFX_OUT_OF_MEMORYIf memory allocation is invalid

◆ ifx_record_ext_set_payload()

ifx_status_t ifx_record_ext_set_payload ( ifx_record_handle_t * handle,
const ifx_blob_t * payload )

Sets the payload in the external record for the given record handle.

Parameters
[out]handlePointer to the record handle.
[in]payloadPointer to the payload.
Returns
ifx_status_t
Return values
IFX_SUCCESSIf the set operation is successful
IFX_ILLEGAL_ARGUMENTIf invalid/NULL parameter is passed to function
IFX_OUT_OF_MEMORYIf memory allocation is invalid