|
hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
|
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. | |
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.
| #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.
| #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.
| #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.
| #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.
| enum 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.
| 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.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | auxiliary_data_ref | Pointer to the list of auxiliary data references. |
| [out] | auxiliary_data_ref_count | Pointer to the count of auxiliary data references. |
| IFX_SUCCESS | If the get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | If memory allocation fails |
| IFX_RECORD_INVALID | If record type is invalid |
| 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.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | carrier_data_ref | Pointer to the carrier data reference. |
| IFX_SUCCESS | If the get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | If memory allocation fails |
| IFX_RECORD_INVALID | If record type is invalid |
| 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.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | cps | Pointer to the carrier power state of alternative carrier record. |
| IFX_SUCCESS | If the get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_INVALID,if | record type is invalid |
| 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.
| [out] | handle | Handle of the created alternative carrier record. |
| IFX_SUCCESS | If record creation operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | If memory allocation fails |
| 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.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | auxiliary_data_ref | Pointer to the list of auxiliary data references. |
| [in] | auxiliary_data_ref_count | Count of auxiliary data references. |
| IFX_SUCCESS | If the set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | If memory allocation fails |
| IFX_RECORD_INVALID | If record type is invalid |
| 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.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | carrier_data_ref | Pointer to the carrier data reference. |
| IFX_SUCCESS | If the set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | If memory allocation fails |
| IFX_RECORD_INVALID | If record type is invalid |
| 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.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | cps | Carrier power state of the alternative carrier record. |
| IFX_SUCCESS | If the set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_INVALID | If record type is invalid |