hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
ifx-record-error.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2024-2026 Infineon Technologies AG
2// SPDX-License-Identifier: MIT
3
10#ifndef IFX_RECORD_ERROR_H
11#define IFX_RECORD_ERROR_H
12
13#include <stddef.h>
14#include <stdint.h>
15#include "infineon/ifx-error.h"
16#include "infineon/ifx-utils.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif /* __cplusplus */
21
22/* Macro definitions */
23/* Definitions of function identifiers */
24
28#define IFX_RECORD_ERROR_SET UINT8_C(0x01)
29
33#define IFX_RECORD_ERROR_GET UINT8_C(0x02)
34
38#define IFX_RECORD_ERROR_RELEASE_MEMORY UINT8_C(0x03)
39
43#define IFX_RECORD_ERROR_TYPE {0x65, 0x72, 0x72}
44
45/* Structure definitions */
49typedef struct
50{
51 uint8_t error_reason;
58
59/* public functions */
60
72
86 uint8_t error_reason);
87
100 const ifx_blob_t *error);
101
114 uint8_t *error_reason);
115
128 ifx_blob_t *error);
129
130#ifdef __cplusplus
131}
132
133#endif /* __cplusplus */
134#endif /* IFX_RECORD_ERROR_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
ifx_status_t ifx_record_error_get_error_data(const ifx_record_handle_t *handle, ifx_blob_t *error)
Gets an error data of an error record from the given record handle.
ifx_status_t ifx_record_error_set_error_data(ifx_record_handle_t *handle, const ifx_blob_t *error)
Sets the error data in the error record details for the given record handle.
ifx_status_t ifx_record_error_set_reason(ifx_record_handle_t *handle, uint8_t error_reason)
Sets the error reason in the error record details for the given record handle.
ifx_status_t ifx_record_error_get_reason(const ifx_record_handle_t *handle, uint8_t *error_reason)
Gets an error reason of an error record from the given record handle.
ifx_status_t ifx_record_error_new(ifx_record_handle_t *handle)
Creates an error record and handle of the created record. This handle holds the values of the record ...
Provides utility functions and macros.
Data storage for data and data length where both are required as parameters.
Definition ifx-utils.h:189
Structure defines error record details such as error reason and data.
Defines the handle for specific record type.