|
hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
|
Model interface to create error record types and get/set record fields. More...
#include <stddef.h>#include <stdint.h>#include "infineon/ifx-error.h"#include "infineon/ifx-utils.h"Go to the source code of this file.
Data Structures | |
| struct | ifx_record_error_t |
| Structure defines error record details such as error reason and data. More... | |
Macros | |
| #define | IFX_RECORD_ERROR_SET UINT8_C(0x01) |
| Identifier for model set error record ID. | |
| #define | IFX_RECORD_ERROR_GET UINT8_C(0x02) |
| Identifier for model get error record ID. | |
| #define | IFX_RECORD_ERROR_RELEASE_MEMORY UINT8_C(0x03) |
| Identifier for model error record release memory. | |
| #define | IFX_RECORD_ERROR_TYPE {0x65, 0x72, 0x72} |
| Type information for error record 'err'. | |
Functions | |
| 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 needed for encode and decode operations. | |
| 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_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_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_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. | |
Model interface to create error record types and get/set record fields.
This record is used only by the handover select and not intended to use for any other records.
Definition in file ifx-record-error.h.
| #define IFX_RECORD_ERROR_GET UINT8_C(0x02) |
Identifier for model get error record ID.
Definition at line 33 of file ifx-record-error.h.
| #define IFX_RECORD_ERROR_RELEASE_MEMORY UINT8_C(0x03) |
Identifier for model error record release memory.
Definition at line 38 of file ifx-record-error.h.
| #define IFX_RECORD_ERROR_SET UINT8_C(0x01) |
Identifier for model set error record ID.
Definition at line 28 of file ifx-record-error.h.
| #define IFX_RECORD_ERROR_TYPE {0x65, 0x72, 0x72} |
Type information for error record 'err'.
Definition at line 43 of file ifx-record-error.h.
| 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.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | error | Pointer to error data. |
| 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_OUT_OF_MEMORY | If memory allocation is invalid |
| 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.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | error_reason | Pointer to the error reason that defines failure cause of the handover selector. |
| 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_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 needed for encode and decode operations.
| [out] | handle | Handle of the created error record. |
| IFX_SUCCESS | If the 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_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.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | error | Pointer to error data. |
| IFX_SUCCESS | If the set operation is successful |
| IFX_OUT_OF_MEMORY | If memory allocation is invalid |
| IFX_RECORD_INVALID | If record type is invalid |
| 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.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | error_reason | Error reason that defines the failure cause of the handover selector. |
| 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 |