53static void append_bitstr(std::string& out, T mask, T bit,
const std::string& bitstr,
bool& comma) {
54 if( bit == ( mask & bit ) ) {
55 if( comma ) { out.append(
", "); }
56 out.append(bitstr); comma =
true;
59#define APPEND_BITSTR(U,V,M) append_bitstr(out, M, U::V, #V, comma);
61#define SETTING_ENUM(X,M) \
62 X(AdapterSetting,POWERED,M) \
63 X(AdapterSetting,CONNECTABLE,M) \
64 X(AdapterSetting,FAST_CONNECTABLE,M) \
65 X(AdapterSetting,DISCOVERABLE,M) \
66 X(AdapterSetting,BONDABLE,M) \
67 X(AdapterSetting,LINK_SECURITY,M) \
68 X(AdapterSetting,SSP,M) \
69 X(AdapterSetting,BREDR,M) \
70 X(AdapterSetting,HS,M) \
71 X(AdapterSetting,LE,M) \
72 X(AdapterSetting,ADVERTISING,M) \
73 X(AdapterSetting,SECURE_CONN,M) \
74 X(AdapterSetting,DEBUG_KEYS,M) \
75 X(AdapterSetting,PRIVACY,M) \
76 X(AdapterSetting,CONFIGURATION,M) \
77 X(AdapterSetting,STATIC_ADDRESS,M) \
78 X(AdapterSetting,PHY_CONFIGURATION,M)
91 if( isBREDR && isLE ) {
93 }
else if( isBREDR ) {
static void append_bitstr(std::string &out, T mask, T bit, const std::string &bitstr, bool &comma)
#define SETTING_ENUM(X, M)
#define APPEND_BITSTR(U, V, M)
BTMode getAdapterSettingsBTMode(const AdapterSetting settingMask) noexcept
Maps the given AdapterSetting to BTMode.
BTMode
Bluetooth adapter operating mode.
std::string to_string(const DiscoveryPolicy v) noexcept
AdapterSetting
Adapter Setting Bits.
constexpr bool isAdapterSettingBitSet(const AdapterSetting mask, const AdapterSetting bit) noexcept