hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
Macros | Enumerations
nbt-apdu-lib.h File Reference

Provides the library and module identifiers code of the library. More...

#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include "infineon/ifx-error.h"

Go to the source code of this file.

Macros

#define NBT_APDU_LOG(logger_object, source_information, logger_level, formatter, ...)
 APDU NBT library data log macro.
 
#define NBT_APDU_LOG_BYTES(logger_object, source_information, logger_level, delimeter_1, data, data_len, delimeter_2)
 APDU NBT library array of bytes data log macro.
 
#define LIB_NBT_APDU   UINT8_C(0x33)
 apdu-nbt library module ID
 

Enumerations

enum  nbt_module_id {
  NBT_APDU = IFX_MODULE(LIB_NBT_APDU, 0x01) , NBT_BUILD_APDU , NBT_BUILD_APDU_CONFIG , NBT_BUILD_APDU_PERSO ,
  NBT_PARSE_RESP , NBT_CMD_CONFIG , NBT_CMD , NBT_CMD_PERSO
}
 Enumeration defines the NBT library module IDs. More...
 

Detailed Description

Provides the library and module identifiers code of the library.

Definition in file nbt-apdu-lib.h.

Macro Definition Documentation

◆ LIB_NBT_APDU

#define LIB_NBT_APDU   UINT8_C(0x33)

apdu-nbt library module ID

Definition at line 73 of file nbt-apdu-lib.h.

◆ NBT_APDU_LOG

#define NBT_APDU_LOG ( logger_object,
source_information,
logger_level,
formatter,
... )

APDU NBT library data log macro.

Parameters
[in]logger_objectLogger object in which logging to be done.
[in]source_informationSource information from where logs are originated.
[in]logger_levelLog level
[in]formatterString with formatter for data passed as variable argument

It maps to the ifx_logger_log function if NBT_APDU_LOG_ENABLE macro is defined other wise it defines IFX_SUCCESS.

Definition at line 61 of file nbt-apdu-lib.h.

◆ NBT_APDU_LOG_BYTES

#define NBT_APDU_LOG_BYTES ( logger_object,
source_information,
logger_level,
delimeter_1,
data,
data_len,
delimeter_2 )

APDU NBT library array of bytes data log macro.

Parameters
[in]logger_objectLogger object in which logging to be done.
[in]source_informationSource information from where logs are originated.
[in]logger_levelLog level
[in]delimeter_1Delimeter to differentiate log information and data.
[in]dataData to be log.
[in]data_lenLength of the data
[in]delimeter_2Delimeter to differentiate each data byte

It maps to the ifx_logger_log_bytes function if NBT_APDU_LOG_ENABLE macro is defined other wise it defines IFX_SUCCESS.

Definition at line 64 of file nbt-apdu-lib.h.

Enumeration Type Documentation

◆ nbt_module_id

Enumeration defines the NBT library module IDs.

Enumerator
NBT_APDU 

NBT APDU module ID.

NBT_BUILD_APDU 

NBT APDU command builder module ID.

NBT_BUILD_APDU_CONFIG 

NBT APDU configuration command builder module ID.

NBT_BUILD_APDU_PERSO 

NBT APDU personalization command builder module ID.

NBT_PARSE_RESP 

NBT APDU response parser module ID.

NBT_CMD_CONFIG 

NBT configuration command set module ID.

NBT_CMD 

NBT operational command set module ID.

NBT_CMD_PERSO 

NBT personalization command set module ID.

Definition at line 78 of file nbt-apdu-lib.h.

79{
84
89
94
99
104
109
113 NBT_CMD,
114
#define IFX_MODULE(library_id, module_id)
Encoding of module id and library id into 2 bytes. Bit: 15 Set in macro IFX_ERROR to denote error ide...
Definition ifx-error.h:23
nbt_module_id
Enumeration defines the NBT library module IDs.
@ NBT_PARSE_RESP
NBT APDU response parser module ID.
@ NBT_BUILD_APDU_PERSO
NBT APDU personalization command builder module ID.
@ NBT_CMD_CONFIG
NBT configuration command set module ID.
@ NBT_BUILD_APDU_CONFIG
NBT APDU configuration command builder module ID.
@ NBT_BUILD_APDU
NBT APDU command builder module ID.
@ NBT_CMD
NBT operational command set module ID.
@ NBT_APDU
NBT APDU module ID.
@ NBT_CMD_PERSO
NBT personalization command set module ID.
#define LIB_NBT_APDU
apdu-nbt library module ID