Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Macros | Functions | Variables
BTTypes0.cpp File Reference
#include <cstring>
#include <string>
#include <memory>
#include <cstdint>
#include <cstdio>
#include <algorithm>
#include <jau/debug.hpp>
#include <jau/darray.hpp>
#include "BTTypes0.hpp"
Include dependency graph for BTTypes0.cpp:

Go to the source code of this file.

Macros

#define CASE_TO_STRING(V)   case V: return #V;
 
#define CASE2_TO_STRING(U, V)   case U::V: return #V;
 
#define CHAR_DECL_HCILEPeerAddressType_ENUM(X)
 
#define CHAR_DECL_HCILEOwnAddressType_ENUM(X)
 
#define CHAR_DECL_BDADDRESSTYPE_ENUM(X)
 
#define CHAR_DECL_LERANDOMADDRESSTYPE_ENUM(X)
 
#define LEFEATURES_ENUM(X)
 
#define LE_PHYs_ENUM(X)
 
#define SCANTYPE_ENUM(X)
 
#define SCANTYPE_CASE_TO_STRING(V)   case ScanType::V: return #V;
 
#define AD_PDU_Type_ENUM(X)
 
#define AD_PDU_Type_CASE_TO_STRING(V)   case AD_PDU_Type::V: return #V;
 
#define EAD_Event_Type_ENUM(X)
 
#define L2CAP_CID_ENUM(X)
 
#define L2CAP_CID_CASE_TO_STRING(V)   case L2CAP_CID::V: return #V;
 
#define L2CAP_PSM_ENUM(X)
 
#define L2CAP_PSM_CASE_TO_STRING(V)   case L2CAP_PSM::V: return #V;
 
#define APPEARANCECAT_ENUM(X)
 
#define APPEARANCE_CASE_TO_STRING(V)   case AppearanceCat::V: return #V;
 
#define GAPFLAGS_ENUM(X)
 
#define EIRDATATYPE_ENUM(X)
 

Functions

static const int8_t * const_uint8_to_const_int8_ptr (const uint8_t *p) noexcept
 
static std::string _getLEFeaturesBitStr (const LE_Features bit) noexcept
 
static std::string _getLE_PHYsBitStr (const LE_PHYs bit) noexcept
 
static std::string _getEAD_Event_TypeBitStr (const EAD_Event_Type bit) noexcept
 
static std::string bt_compidtostr (const uint16_t companyid) noexcept
 
static std::string _getGAPFlagBitStr (const GAPFlags bit) noexcept
 
static std::string _getEIRDataBitStr (const EIRDataType bit) noexcept
 

Variables

static uint8_t _EUI48_ALL_DEVICE [] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
 
static uint8_t _EUI48_LOCAL_DEVICE [] = {0x00, 0x00, 0x00, 0xff, 0xff, 0xff}
 

Macro Definition Documentation

◆ AD_PDU_Type_CASE_TO_STRING

#define AD_PDU_Type_CASE_TO_STRING (   V)    case AD_PDU_Type::V: return #V;

Definition at line 548 of file BTTypes0.cpp.

◆ AD_PDU_Type_ENUM

#define AD_PDU_Type_ENUM (   X)
Value:
X(ADV_IND) \
X(ADV_DIRECT_IND) \
X(ADV_SCAN_IND) \
X(ADV_NONCONN_IND) \
X(SCAN_RSP) \
X(ADV_IND2) \
X(DIRECT_IND2) \
X(SCAN_IND2) \
X(NONCONN_IND2) \
X(SCAN_RSP_to_ADV_IND) \
X(SCAN_RSP_to_ADV_SCAN_IND) \
X(UNDEFINED)

Definition at line 534 of file BTTypes0.cpp.

◆ APPEARANCE_CASE_TO_STRING

#define APPEARANCE_CASE_TO_STRING (   V)    case AppearanceCat::V: return #V;

Definition at line 714 of file BTTypes0.cpp.

◆ APPEARANCECAT_ENUM

#define APPEARANCECAT_ENUM (   X)

Definition at line 654 of file BTTypes0.cpp.

◆ CASE2_TO_STRING

#define CASE2_TO_STRING (   U,
 
)    case U::V: return #V;

Definition at line 43 of file BTTypes0.cpp.

◆ CASE_TO_STRING

#define CASE_TO_STRING (   V)    case V: return #V;

Definition at line 42 of file BTTypes0.cpp.

◆ CHAR_DECL_BDADDRESSTYPE_ENUM

#define CHAR_DECL_BDADDRESSTYPE_ENUM (   X)
Value:
X(BDAddressType,BDADDR_BREDR) \
X(BDAddressType,BDADDR_LE_PUBLIC) \
X(BDAddressType,BDADDR_LE_RANDOM) \
X(BDAddressType,BDADDR_UNDEFINED)

Definition at line 124 of file BTTypes0.cpp.

◆ CHAR_DECL_HCILEOwnAddressType_ENUM

#define CHAR_DECL_HCILEOwnAddressType_ENUM (   X)
Value:
X(HCILEOwnAddressType,PUBLIC) \
X(HCILEOwnAddressType,RANDOM) \
X(HCILEOwnAddressType,RESOLVABLE_OR_PUBLIC) \
X(HCILEOwnAddressType,RESOLVABLE_OR_RANDOM) \
X(HCILEOwnAddressType,UNDEFINED)

Definition at line 108 of file BTTypes0.cpp.

◆ CHAR_DECL_HCILEPeerAddressType_ENUM

#define CHAR_DECL_HCILEPeerAddressType_ENUM (   X)
Value:
X(HCILEPeerAddressType,PUBLIC_IDENTITY) \
X(HCILEPeerAddressType,RANDOM_STATIC_IDENTITY) \
X(HCILEPeerAddressType,UNDEFINED)

Definition at line 60 of file BTTypes0.cpp.

◆ CHAR_DECL_LERANDOMADDRESSTYPE_ENUM

#define CHAR_DECL_LERANDOMADDRESSTYPE_ENUM (   X)
Value:
X(BLERandomAddressType,UNRESOLVABLE_PRIVAT) \
X(BLERandomAddressType,RESOLVABLE_PRIVAT) \
X(BLERandomAddressType,RESERVED) \
X(BLERandomAddressType,STATIC_PUBLIC) \
X(BLERandomAddressType,UNDEFINED)

Definition at line 138 of file BTTypes0.cpp.

◆ EAD_Event_Type_ENUM

#define EAD_Event_Type_ENUM (   X)
Value:
X(EAD_Event_Type,NONE) \
X(EAD_Event_Type,CONN_ADV) \
X(EAD_Event_Type,SCAN_ADV) \
X(EAD_Event_Type,DIR_ADV) \
X(EAD_Event_Type,SCAN_RSP) \
X(EAD_Event_Type,LEGACY_PDU) \
X(EAD_Event_Type,DATA_B0) \
X(EAD_Event_Type,DATA_B1)

Definition at line 562 of file BTTypes0.cpp.

◆ EIRDATATYPE_ENUM

#define EIRDATATYPE_ENUM (   X)
Value:
X(EIRDataType,NONE) \
X(EIRDataType,EVT_TYPE) \
X(EIRDataType,EXT_EVT_TYPE) \
X(EIRDataType,BDADDR_TYPE) \
X(EIRDataType,BDADDR) \
X(EIRDataType,FLAGS) \
X(EIRDataType,NAME) \
X(EIRDataType,NAME_SHORT) \
X(EIRDataType,RSSI) \
X(EIRDataType,TX_POWER) \
X(EIRDataType,MANUF_DATA) \
X(EIRDataType,DEVICE_CLASS) \
X(EIRDataType,HASH) \
X(EIRDataType,RANDOMIZER) \
X(EIRDataType,DEVICE_ID) \
X(EIRDataType,SERVICE_UUID)

Definition at line 790 of file BTTypes0.cpp.

◆ GAPFLAGS_ENUM

#define GAPFLAGS_ENUM (   X)
Value:
X(GAPFlags,NONE) \
X(GAPFlags,LE_Ltd_Discoverable) \
X(GAPFlags,LE_Gen_Discoverable) \
X(GAPFlags,BREDR_UNSUPPORTED) \
X(GAPFlags,DUAL_LE_BREDR_SameCtrl) \
X(GAPFlags,DUAL_LE_BREDR_SameHost) \
X(GAPFlags,RESERVED1) \
X(GAPFlags,RESERVED2) \
X(GAPFlags,RESERVED3)

Definition at line 751 of file BTTypes0.cpp.

◆ L2CAP_CID_CASE_TO_STRING

#define L2CAP_CID_CASE_TO_STRING (   V)    case L2CAP_CID::V: return #V;

Definition at line 613 of file BTTypes0.cpp.

◆ L2CAP_CID_ENUM

#define L2CAP_CID_ENUM (   X)
Value:
X(UNDEFINED) \
X(SIGNALING) \
X(CONN_LESS) \
X(A2MP) \
X(ATT) \
X(LE_SIGNALING) \
X(SMP) \
X(SMP_BREDR) \
X(DYN_START) \
X(DYN_END) \
X(LE_DYN_END)

Definition at line 600 of file BTTypes0.cpp.

◆ L2CAP_PSM_CASE_TO_STRING

#define L2CAP_PSM_CASE_TO_STRING (   V)    case L2CAP_PSM::V: return #V;

Definition at line 644 of file BTTypes0.cpp.

◆ L2CAP_PSM_ENUM

#define L2CAP_PSM_ENUM (   X)
Value:
X(UNDEFINED) \
X(SDP) \
X(RFCOMM) \
X(TCSBIN) \
X(TCSBIN_CORDLESS) \
X(BNEP) \
X(HID_CONTROL) \
X(HID_INTERRUPT) \
X(UPNP) \
X(AVCTP) \
X(AVDTP) \
X(AVCTP_BROWSING) \
X(UDI_C_PLANE) \
X(ATT) \
X(LE_DYN_START) \
X(LE_DYN_END) \
X(DYN_START) \
X(DYN_END) \
X(AUTO_END)

Definition at line 623 of file BTTypes0.cpp.

◆ LE_PHYs_ENUM

#define LE_PHYs_ENUM (   X)
Value:
X(LE_PHYs,NONE) \
X(LE_PHYs,LE_1M) \
X(LE_PHYs,LE_2M) \
X(LE_PHYs,LE_CODED)

Definition at line 445 of file BTTypes0.cpp.

◆ LEFEATURES_ENUM

#define LEFEATURES_ENUM (   X)

Definition at line 378 of file BTTypes0.cpp.

◆ SCANTYPE_CASE_TO_STRING

#define SCANTYPE_CASE_TO_STRING (   V)    case ScanType::V: return #V;

Definition at line 524 of file BTTypes0.cpp.

◆ SCANTYPE_ENUM

#define SCANTYPE_ENUM (   X)
Value:
X(NONE) \
X(BREDR) \
X(LE) \
X(DUAL)

Definition at line 518 of file BTTypes0.cpp.

Function Documentation

◆ _getEAD_Event_TypeBitStr()

static std::string _getEAD_Event_TypeBitStr ( const EAD_Event_Type  bit)
staticnoexcept

Definition at line 571 of file BTTypes0.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _getEIRDataBitStr()

static std::string _getEIRDataBitStr ( const EIRDataType  bit)
staticnoexcept

Definition at line 808 of file BTTypes0.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _getGAPFlagBitStr()

static std::string _getGAPFlagBitStr ( const GAPFlags  bit)
staticnoexcept

Definition at line 761 of file BTTypes0.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _getLE_PHYsBitStr()

static std::string _getLE_PHYsBitStr ( const LE_PHYs  bit)
staticnoexcept

Definition at line 450 of file BTTypes0.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _getLEFeaturesBitStr()

static std::string _getLEFeaturesBitStr ( const LE_Features  bit)
staticnoexcept

Definition at line 416 of file BTTypes0.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bt_compidtostr()

static std::string bt_compidtostr ( const uint16_t  companyid)
staticnoexcept

Definition at line 727 of file BTTypes0.cpp.

Here is the call graph for this function:

◆ const_uint8_to_const_int8_ptr()

static const int8_t* const_uint8_to_const_int8_ptr ( const uint8_t *  p)
inlinestaticnoexcept

Definition at line 346 of file BTTypes0.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ _EUI48_ALL_DEVICE

uint8_t _EUI48_ALL_DEVICE[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
static

Definition at line 319 of file BTTypes0.cpp.

◆ _EUI48_LOCAL_DEVICE

uint8_t _EUI48_LOCAL_DEVICE[] = {0x00, 0x00, 0x00, 0xff, 0xff, 0xff}
static

Definition at line 320 of file BTTypes0.cpp.

direct_bt::EIRDataType
EIRDataType
Bit mask of 'Extended Inquiry Response' (EIR) data fields, indicating a set of related data.
Definition: BTTypes0.hpp:752
direct_bt::BLERandomAddressType
BLERandomAddressType
BT Core Spec v5.2: Vol 6 LE, Part B Link Layer Specification: 1.3 Device Address.
Definition: BTAddress.hpp:89
direct_bt::EAD_Event_Type
EAD_Event_Type
LE Extended Advertising (EAD) Event Types.
Definition: BTTypes0.hpp:383
APPEARANCE
@ APPEARANCE
Definition: test_datatype02.hpp:67
direct_bt::GAPFlags
GAPFlags
GAP Flags values, see Bluetooth Core Specification Supplement V9, Part A: 1.3, p 12 pp.
Definition: BTTypes0.hpp:730
direct_bt::BDAddressType
BDAddressType
BT Core Spec v5.2: Vol 3, Part C Generic Access Profile (GAP): 15.1.1.1 Public Bluetooth address.
Definition: BTAddress.hpp:51
direct_bt::HCILEPeerAddressType
HCILEPeerAddressType
HCI LE Address-Type is PUBLIC: 0x00, RANDOM: 0x01.
Definition: BTAddress.hpp:120
direct_bt::LE_PHYs
LE_PHYs
LE Transport PHY bit values.
Definition: BTTypes0.hpp:175
direct_bt::HCILEOwnAddressType
HCILEOwnAddressType
Definition: BTAddress.hpp:135