hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
ifx-record-alt-carrier.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2024-2026 Infineon Technologies AG
2// SPDX-License-Identifier: MIT
3
11#ifndef IFX_RECORD_ALT_CARRIER_H
12#define IFX_RECORD_ALT_CARRIER_H
13
14#include <stddef.h>
15#include <stdint.h>
16#include "infineon/ifx-error.h"
18#include "infineon/ifx-utils.h"
19
20#ifdef __cplusplus
21extern "C" {
22#endif /* __cplusplus */
23
24/* Macro definitions */
25/* Definitions of function identifiers */
26
30#define IFX_RECORD_AC_SET UINT8_C(0x01)
31
35#define IFX_RECORD_AC_GET UINT8_C(0x02)
36
40#define IFX_RECORD_AC_RELEASE_MEMORY UINT8_C(0x03)
41
45#define IFX_RECORD_AC_TYPE {0x61, 0x63}
46
47/* enum definitions */
48
53typedef enum
54{
55 IFX_CPS_INACTIVE = 0x00,
56 IFX_CPS_ACTIVE,
57 IFX_CPS_ACTIVATING,
58 IFX_CPS_UNKNOWN
60
61/* struct definition */
62
66typedef struct
67{
69 uint8_t data_length;
70
72 uint8_t *data;
74
93
94/* public functions */
95
107
122
136 ifx_record_handle_t *handle, const ifx_record_data_ref_t *carrier_data_ref);
137
153 ifx_record_handle_t *handle,
154 const ifx_record_data_ref_t *auxiliary_data_ref,
155 uint8_t auxiliary_data_ref_count);
156
170 ifx_record_ac_cps *cps);
171
185 const ifx_record_handle_t *handle, ifx_record_data_ref_t *carrier_data_ref);
186
203 const ifx_record_handle_t *handle,
204 ifx_record_data_ref_t *auxiliary_data_ref,
205 uint8_t *auxiliary_data_ref_count);
206
207#ifdef __cplusplus
208}
209
210#endif /* __cplusplus */
211#endif /* IFX_RECORD_ALT_CARRIER_H */
Infineon specific error code creation and parsing.
uint32_t ifx_status_t
Custom return code type used by all Infineon host software libraries.
Definition ifx-error.h:91
Model interface to create record types and set/get record fields.
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 handl...
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...
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_record_ac_cps
Enumeration defines the different carrier power states of alternative carrier record.
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_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_new(ifx_record_handle_t *handle)
Creates an alternative carrier record and handle of the created record. This handle holds the values ...
Provides utility functions and macros.
Defines record details respective to alternative carrier record.
ifx_record_data_ref_t * carrier_data_ref
ifx_record_data_ref_t ** auxiliary_data_ref
ifx_record_ac_cps cps
Structure holds byte array of data and its length.
uint8_t data_length
Array length in bytes.
uint8_t * data
Array of data.
Defines the handle for specific record type.