|
hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
|
Model interface to create the Bluetooth carrier configuration record types and set/get 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_bt_config_field_t |
| Defines the data structure of Bluetooth configuration field. More... | |
| struct | ifx_record_eir_data_t |
| Structure for extended inquiry response (EIR) data object. Each EIR structure consists of an EIR Length field of 1 octet, an EIR Type field and an EIR Data field. More... | |
Macros | |
| #define | IFX_RECORD_BT_SET UINT8_C(0x01) |
| Identifier for model set Bluetooth record. | |
| #define | IFX_RECORD_BT_GET UINT8_C(0x02) |
| Identifier for model get Bluetooth record ID. | |
| #define | IFX_RECORD_BT_RELEASE_MEMORY UINT8_C(0x03) |
| Identifier for model Bluetooth record ID release memory. | |
| #define | IFX_RECORD_BT_TYPE "application/vnd.bluetooth.ep.oob" |
| Type information for bluetooth record. | |
Functions | |
| ifx_status_t | ifx_record_bt_new (ifx_record_handle_t *handle) |
| Creates the Bluetooth record and handle of the created record. This handle holds values of the record needed for encode and decode operations. | |
| ifx_status_t | ifx_record_bt_set_device_addr (ifx_record_handle_t *handle, const uint8_t *device_addr) |
| Sets the device address in the Bluetooth carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_bt_set_device_class (ifx_record_handle_t *handle, const ifx_bt_config_field_t *device_class) |
| Sets the device class in the Bluetooth carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_bt_set_simple_pairing_hash_c (ifx_record_handle_t *handle, uint8_t config_type, const ifx_bt_config_field_t *simple_pairing_hash_c) |
| Sets the simple pairing hash in the Bluetooth carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_bt_set_simple_pairing_randomizer_r (ifx_record_handle_t *handle, uint8_t config_type, const ifx_bt_config_field_t *simple_pairing_randomizer_r) |
| Sets the simple pairing randomizer R in the Bluetooth carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_bt_set_service_class_uuid (ifx_record_handle_t *handle, uint8_t config_type, const ifx_bt_config_field_t *service_class_uuid) |
| Sets the service class universal unique identifier (UUID) in the Bluetooth carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_bt_set_local_name (ifx_record_handle_t *handle, uint8_t config_type, const ifx_bt_config_field_t *local_name) |
| Sets the local name in the Bluetooth carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_bt_set_additional_eir_data (ifx_record_handle_t *handle, const ifx_record_eir_data_t *additional_data, uint32_t count) |
| Sets the array of additional EIR data in Bluetooth carrier configuration record for the given record handle. | |
| ifx_status_t | ifx_record_bt_get_device_addr (const ifx_record_handle_t *handle, uint8_t *device_addr) |
| Gets the device address of the Bluetooth carrier configuration record from the given record handle. | |
| ifx_status_t | ifx_record_bt_get_device_class (const ifx_record_handle_t *handle, ifx_bt_config_field_t *device_class) |
| Gets the device class of Bluetooth carrier configuration record from the given record handle. | |
| ifx_status_t | ifx_record_bt_get_simple_pairing_hash_c (const ifx_record_handle_t *handle, uint8_t *config_type, ifx_bt_config_field_t *simple_pairing_hash_c) |
| Gets the simple pairing hash of the Bluetooth carrier configuration record from the given record handle. | |
| ifx_status_t | ifx_record_bt_get_simple_pairing_randomizer_r (const ifx_record_handle_t *handle, uint8_t *config_type, ifx_bt_config_field_t *simple_pairing_randomizer_r) |
| Gets the simple pairing randomizer R of the Bluetooth carrier configuration record from the given record handle. | |
| ifx_status_t | ifx_record_bt_get_service_class_uuid (const ifx_record_handle_t *handle, uint8_t *config_type, ifx_bt_config_field_t *service_class_uuid) |
| Gets the service class UUID of the Bluetooth carrier configuration record from the given record handle. | |
| ifx_status_t | ifx_record_bt_get_local_name (const ifx_record_handle_t *handle, uint8_t *config_type, ifx_bt_config_field_t *local_name) |
| Gets the local name in the Bluetooth carrier configuration record from the given record handle. | |
| ifx_status_t | ifx_record_bt_get_additional_eir_data (const ifx_record_handle_t *handle, ifx_record_eir_data_t *additional_data, uint32_t *count) |
| Gets an array of additional EIR data of the Bluetooth carrier configuration record from the given record handle. | |
Model interface to create the Bluetooth carrier configuration record types and set/get record fields.
Definition in file ifx-record-bluetooth.h.
| #define IFX_RECORD_BT_GET UINT8_C(0x02) |
Identifier for model get Bluetooth record ID.
Definition at line 32 of file ifx-record-bluetooth.h.
| #define IFX_RECORD_BT_RELEASE_MEMORY UINT8_C(0x03) |
Identifier for model Bluetooth record ID release memory.
Definition at line 37 of file ifx-record-bluetooth.h.
| #define IFX_RECORD_BT_SET UINT8_C(0x01) |
Identifier for model set Bluetooth record.
Definition at line 27 of file ifx-record-bluetooth.h.
| #define IFX_RECORD_BT_TYPE "application/vnd.bluetooth.ep.oob" |
Type information for bluetooth record.
Definition at line 42 of file ifx-record-bluetooth.h.
| ifx_status_t ifx_record_bt_get_additional_eir_data | ( | const ifx_record_handle_t * | handle, |
| ifx_record_eir_data_t * | additional_data, | ||
| uint32_t * | count ) |
Gets an array of additional EIR data of the Bluetooth carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | additional_data | Pointer to the array of additional data. |
| [out] | count | Count of additional 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_INVALID_STATE | If the object is in an invalid state |
| ifx_status_t ifx_record_bt_get_device_addr | ( | const ifx_record_handle_t * | handle, |
| uint8_t * | device_addr ) |
Gets the device address of the Bluetooth carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | device_addr | 6 octets of the Bluetooth device address are encoded in the Little Endian order. |
| IFX_SUCCESS | If 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_bt_get_device_class | ( | const ifx_record_handle_t * | handle, |
| ifx_bt_config_field_t * | device_class ) |
Gets the device class of Bluetooth carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | device_class | Pointer to the device class. |
| IFX_SUCCESS | If get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_INVALID | If record type is invalid |
| IFX_INVALID_STATE | If the object is in an invalid state |
| ifx_status_t ifx_record_bt_get_local_name | ( | const ifx_record_handle_t * | handle, |
| uint8_t * | config_type, | ||
| ifx_bt_config_field_t * | local_name ) |
Gets the local name in the Bluetooth carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | config_type | Type of the local name (SHORTENED_LOCAL_NAME or COMPLETE_LOCAL_NAME). |
| [out] | local_name | Pointer to the Bluetooth local name. |
| 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_INVALID_STATE | If the object is in an invalid state |
| ifx_status_t ifx_record_bt_get_service_class_uuid | ( | const ifx_record_handle_t * | handle, |
| uint8_t * | config_type, | ||
| ifx_bt_config_field_t * | service_class_uuid ) |
Gets the service class UUID of the Bluetooth carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | config_type | Type of the simple pairing hash. |
| [out] | service_class_uuid | Pointer to the service class UUID. |
| 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_INVALID_STATE | If the object is in an invalid state |
| ifx_status_t ifx_record_bt_get_simple_pairing_hash_c | ( | const ifx_record_handle_t * | handle, |
| uint8_t * | config_type, | ||
| ifx_bt_config_field_t * | simple_pairing_hash_c ) |
Gets the simple pairing hash of the Bluetooth carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | config_type | Type of the simple pairing hash. |
| [out] | simple_pairing_hash_c | Pointer to the simple pairing hash |
| 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_INVALID_STATE | If the object is in an invalid state |
| ifx_status_t ifx_record_bt_get_simple_pairing_randomizer_r | ( | const ifx_record_handle_t * | handle, |
| uint8_t * | config_type, | ||
| ifx_bt_config_field_t * | simple_pairing_randomizer_r ) |
Gets the simple pairing randomizer R of the Bluetooth carrier configuration record from the given record handle.
| [in] | handle | Pointer to the record handle obtained while creating the record. |
| [out] | config_type | Type of the simple pairing randomizer. |
| [out] | simple_pairing_randomizer_r | Pointer to the simple pairing randomizer R. |
| 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_INVALID_STATE | If the object is in an invalid state |
| ifx_status_t ifx_record_bt_new | ( | ifx_record_handle_t * | handle | ) |
Creates the Bluetooth record and handle of the created record. This handle holds values of the record needed for encode and decode operations.
| [out] | handle | Handle of the created Bluetooth carrier configuration 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_bt_set_additional_eir_data | ( | ifx_record_handle_t * | handle, |
| const ifx_record_eir_data_t * | additional_data, | ||
| uint32_t | count ) |
Sets the array of additional EIR data in Bluetooth carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | additional_data | Pointer to the array of additional EIR data. |
| [in] | count | Count of additional data. |
| 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 |
| IFX_OUT_OF_MEMORY | If memory allocation is invalid |
| ifx_status_t ifx_record_bt_set_device_addr | ( | ifx_record_handle_t * | handle, |
| const uint8_t * | device_addr ) |
Sets the device address in the Bluetooth carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | device_addr | 6 octets of the Bluetooth device address are encoded in the little endian order. |
| IFX_SUCCESS | If set 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_bt_set_device_class | ( | ifx_record_handle_t * | handle, |
| const ifx_bt_config_field_t * | device_class ) |
Sets the device class in the Bluetooth carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | device_class | Pointer to the device class. |
| IFX_SUCCESS | If set 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_bt_set_local_name | ( | ifx_record_handle_t * | handle, |
| uint8_t | config_type, | ||
| const ifx_bt_config_field_t * | local_name ) |
Sets the local name in the Bluetooth carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | config_type | Type of the local name (SHORTENED_LOCAL_NAME or COMPLETE_LOCAL_NAME). |
| [in] | local_name | Pointer to the Bluetooth local name. |
| IFX_SUCCESS | If set 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_bt_set_service_class_uuid | ( | ifx_record_handle_t * | handle, |
| uint8_t | config_type, | ||
| const ifx_bt_config_field_t * | service_class_uuid ) |
Sets the service class universal unique identifier (UUID) in the Bluetooth carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | config_type | Type of the service class UUID. |
| [in] | service_class_uuid | Pointer to the service class UUID. |
| IFX_SUCCESS | If set 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_bt_set_simple_pairing_hash_c | ( | ifx_record_handle_t * | handle, |
| uint8_t | config_type, | ||
| const ifx_bt_config_field_t * | simple_pairing_hash_c ) |
Sets the simple pairing hash in the Bluetooth carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | config_type | Type of the simple pairing hash. |
| [in] | simple_pairing_hash_c | Pointer to the simple pairing hash. |
| IFX_SUCCESS | If set 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_bt_set_simple_pairing_randomizer_r | ( | ifx_record_handle_t * | handle, |
| uint8_t | config_type, | ||
| const ifx_bt_config_field_t * | simple_pairing_randomizer_r ) |
Sets the simple pairing randomizer R in the Bluetooth carrier configuration record for the given record handle.
| [out] | handle | Pointer to the record handle obtained while creating the record. |
| [in] | config_type | Type of the simple pairing randomizer. |
| [in] | simple_pairing_randomizer_r | Pointer to the simple pairing randomizer R. |
| IFX_SUCCESS | If set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_INVALID | If record type is invalid |