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

Model interface to create alternative carrier 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_data_ref_t
 Structure holds byte array of data and its length. More...
 
struct  ifx_record_ac_t
 Defines record details respective to alternative carrier record. More...
 

Macros

#define IFX_RECORD_AC_SET   UINT8_C(0x01)
 Identifier for model set alternate carrier record ID.
 
#define IFX_RECORD_AC_GET   UINT8_C(0x02)
 Identifier for model get alternate carrier record ID.
 
#define IFX_RECORD_AC_RELEASE_MEMORY   UINT8_C(0x03)
 Identifier for model alternative carrier record release memory.
 
#define IFX_RECORD_AC_TYPE   {0x61, 0x63}
 Type information for alternative carrier record 'ac'.
 

Enumerations

enum  ifx_record_ac_cps { IFX_CPS_INACTIVE = 0x00 , IFX_CPS_ACTIVE , IFX_CPS_ACTIVATING , IFX_CPS_UNKNOWN }
 Enumeration defines the different carrier power states of alternative carrier record. More...
 

Functions

ifx_status_t ifx_record_ac_new (ifx_record_handle_t *handle)
 Creates an alternative carrier 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_ac_set_cps (ifx_record_handle_t *handle, ifx_record_ac_cps cps)
 Sets a carrier power state (CPS) in the alternative carrier record details for the given record handle.
 
ifx_status_t ifx_record_ac_set_carrier_ref (ifx_record_handle_t *handle, const ifx_record_data_ref_t *carrier_data_ref)
 Sets a carrier data reference in alternative carrier record details for the given record handle.
 
ifx_status_t ifx_record_ac_set_aux_ref (ifx_record_handle_t *handle, const ifx_record_data_ref_t *auxiliary_data_ref, uint8_t auxiliary_data_ref_count)
 Sets the list of auxiliary data references to alternative carrier record for the given record handle.
 
ifx_status_t ifx_record_ac_get_cps (const ifx_record_handle_t *handle, ifx_record_ac_cps *cps)
 Gets a carrier power state (CPS) of alternative carrier record details from the given record handle.
 
ifx_status_t ifx_record_ac_get_carrier_ref (const ifx_record_handle_t *handle, ifx_record_data_ref_t *carrier_data_ref)
 Gets a carrier data reference of alternative carrier record details from the given record handle.
 
ifx_status_t ifx_record_ac_get_aux_ref (const ifx_record_handle_t *handle, ifx_record_data_ref_t *auxiliary_data_ref, uint8_t *auxiliary_data_ref_count)
 Gets the list of auxiliary data references of alternative carrier record from the given record handle.
 

Detailed Description

Model interface to create alternative carrier record types and get/set record fields.

Alternative Carrier Record is used within global handover NDEF records to describe a single alternative carrier.

Definition in file ifx-record-alt-carrier.h.

Macro Definition Documentation

◆ IFX_RECORD_AC_GET

#define IFX_RECORD_AC_GET   UINT8_C(0x02)

Identifier for model get alternate carrier record ID.

Definition at line 35 of file ifx-record-alt-carrier.h.

◆ IFX_RECORD_AC_RELEASE_MEMORY

#define IFX_RECORD_AC_RELEASE_MEMORY   UINT8_C(0x03)

Identifier for model alternative carrier record release memory.

Definition at line 40 of file ifx-record-alt-carrier.h.

◆ IFX_RECORD_AC_SET

#define IFX_RECORD_AC_SET   UINT8_C(0x01)

Identifier for model set alternate carrier record ID.

Definition at line 30 of file ifx-record-alt-carrier.h.

◆ IFX_RECORD_AC_TYPE

#define IFX_RECORD_AC_TYPE   {0x61, 0x63}

Type information for alternative carrier record 'ac'.

Definition at line 45 of file ifx-record-alt-carrier.h.

Enumeration Type Documentation

◆ ifx_record_ac_cps

Enumeration defines the different carrier power states of alternative carrier record.

Definition at line 53 of file ifx-record-alt-carrier.h.

54{
55 IFX_CPS_INACTIVE = 0x00,
56 IFX_CPS_ACTIVE,
57 IFX_CPS_ACTIVATING,
58 IFX_CPS_UNKNOWN
ifx_record_ac_cps
Enumeration defines the different carrier power states of alternative carrier record.

Function Documentation

◆ ifx_record_ac_get_aux_ref()

ifx_status_t ifx_record_ac_get_aux_ref ( const ifx_record_handle_t * handle,
ifx_record_data_ref_t * auxiliary_data_ref,
uint8_t * auxiliary_data_ref_count )

Gets the list of auxiliary data references of alternative carrier record from the given record handle.

Parameters
[in]handlePointer to the record handle obtained while creating the record.
[out]auxiliary_data_refPointer to the list of auxiliary data references.
[out]auxiliary_data_ref_countPointer to the count of auxiliary data references.
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 fails
IFX_RECORD_INVALIDIf record type is invalid

◆ ifx_record_ac_get_carrier_ref()

ifx_status_t ifx_record_ac_get_carrier_ref ( const ifx_record_handle_t * handle,
ifx_record_data_ref_t * carrier_data_ref )

Gets a carrier data reference of alternative carrier record details from the given record handle.

Parameters
[in]handlePointer to the record handle obtained while creating the record.
[out]carrier_data_refPointer to the carrier data reference.
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 fails
IFX_RECORD_INVALIDIf record type is invalid

◆ ifx_record_ac_get_cps()

ifx_status_t ifx_record_ac_get_cps ( const ifx_record_handle_t * handle,
ifx_record_ac_cps * cps )

Gets a carrier power state (CPS) of alternative carrier record details from the given record handle.

Parameters
[in]handlePointer to the record handle obtained while creating the record.
[out]cpsPointer to the carrier power state of alternative carrier record.
Returns
ifx_status_t
Return values
IFX_SUCCESSIf the get operation is successful
IFX_ILLEGAL_ARGUMENTIf invalid/NULL parameter is passed to function
IFX_RECORD_INVALID,ifrecord type is invalid

◆ ifx_record_ac_new()

ifx_status_t ifx_record_ac_new ( ifx_record_handle_t * handle)

Creates an alternative carrier 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 alternative carrier record.
Returns
ifx_status_t
Return values
IFX_SUCCESSIf record creation operation is successful
IFX_ILLEGAL_ARGUMENTIf invalid/NULL parameter is passed to function
IFX_OUT_OF_MEMORYIf memory allocation fails

◆ ifx_record_ac_set_aux_ref()

ifx_status_t ifx_record_ac_set_aux_ref ( ifx_record_handle_t * handle,
const ifx_record_data_ref_t * auxiliary_data_ref,
uint8_t auxiliary_data_ref_count )

Sets the list of auxiliary data references to alternative carrier record for the given record handle.

Parameters
[out]handlePointer to the record handle obtained while creating the record.
[in]auxiliary_data_refPointer to the list of auxiliary data references.
[in]auxiliary_data_ref_countCount of auxiliary data references.
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 fails
IFX_RECORD_INVALIDIf record type is invalid

◆ ifx_record_ac_set_carrier_ref()

ifx_status_t ifx_record_ac_set_carrier_ref ( ifx_record_handle_t * handle,
const ifx_record_data_ref_t * carrier_data_ref )

Sets a carrier data reference in alternative carrier record details for the given record handle.

Parameters
[out]handlePointer to the record handle obtained while creating the record.
[in]carrier_data_refPointer to the carrier data reference.
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 fails
IFX_RECORD_INVALIDIf record type is invalid

◆ ifx_record_ac_set_cps()

ifx_status_t ifx_record_ac_set_cps ( ifx_record_handle_t * handle,
ifx_record_ac_cps cps )

Sets a carrier power state (CPS) in the alternative carrier record details for the given record handle.

Parameters
[out]handlePointer to the record handle obtained while creating the record.
[in]cpsCarrier power state of the alternative carrier record.
Returns
ifx_status_t
Return values
IFX_SUCCESSIf the set operation is successful
IFX_ILLEGAL_ARGUMENTIf invalid/NULL parameter is passed to function
IFX_RECORD_INVALIDIf record type is invalid