Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
This dbt_scanner10 C++ scanner ::BTRole::Master GATT client example uses an event driven workflow and multithreading, i.e. More...
#include <cstring>
#include <string>
#include <memory>
#include <cstdint>
#include <fstream>
#include <iostream>
#include <cinttypes>
#include <pthread.h>
#include <csignal>
#include <jau/cpp_lang_util.hpp>
#include <jau/dfa_utf8_decode.hpp>
#include <jau/basic_algos.hpp>
#include <jau/darray.hpp>
#include <direct_bt/DirectBT.hpp>
#include <unistd.h>
#include "dbt_constants.hpp"
#include <cstdio>
Go to the source code of this file.
Classes | |
class | MyAdapterStatusListener |
class | MyGATTEventListener |
Functions | |
static void | connectDiscoveredDevice (BTDeviceRef device) |
static bool | initAdapter (std::shared_ptr< BTAdapter > &adapter) |
int | main (int argc, char *argv[]) |
static void | myChangedAdapterSetFunc (const bool added, std::shared_ptr< BTAdapter > &adapter) |
static void | processReadyDevice (const BTDeviceRef &device) |
static void | removeDevice (BTDeviceRef device) |
static void | resetAdapter (BTAdapter *a, int mode) |
static bool | startDiscovery (BTAdapter *a, const std::string &msg) |
void | test () |
Variables | |
static const uuid16_t | _TEMPERATURE_MEASUREMENT (GattCharacteristicType::TEMPERATURE_MEASUREMENT) |
static BTMode | btMode = BTMode::DUAL |
static std::shared_ptr< BTAdapter > | chosenAdapter = nullptr |
static uint8_t | cmd_arg = 0x44 |
static std::unique_ptr< uuid_t > | cmd_rsp_uuid = jau::uuid_t::create(std::string("d0ca6bf3-3d53-4760-98e5-fc5883e93712")) |
static std::unique_ptr< uuid_t > | cmd_uuid = jau::uuid_t::create(std::string("d0ca6bf3-3d52-4760-98e5-fc5883e93712")) |
static std::atomic< int > | deviceReadyCount = 0 |
static DiscoveryPolicy | discoveryPolicy = DiscoveryPolicy::PAUSE_CONNECTED_UNTIL_READY |
static const bool | filter_dup = true |
static const uint8_t | filter_policy = 0 |
static bool | GATT_PING_ENABLED = false |
static bool | KEEP_CONNECTED = true |
static bool | le_scan_active = true |
static const uint16_t | le_scan_interval = 24 |
static const uint16_t | le_scan_window = 24 |
static std::atomic< int > | MULTI_MEASUREMENTS = 8 |
static bool | QUIET = false |
static bool | REMOVE_DEVICE = true |
static int | RESET_ADAPTER_EACH_CONN = 0 |
static bool | SHOW_UPDATE_EVENTS = false |
static uint64_t | timestamp_t0 |
static bool | use_privacy = false |
static EUI48 | useAdapter = EUI48::ALL_DEVICE |
This dbt_scanner10 C++ scanner ::BTRole::Master GATT client example uses an event driven workflow and multithreading, i.e.
one thread processes each found device when notified.
dbt_scanner10 represents the recommended utilization of Direct-BT.
Using scripts/run-dbt_scanner10.sh
from dist
directory:
TAIDOC
(enforcing no security) Definition in file dbt_scanner10.cpp.
|
static |
Definition at line 358 of file dbt_scanner10.cpp.
|
static |
Definition at line 403 of file dbt_scanner10.cpp.
|
static |
Definition at line 606 of file dbt_scanner10.cpp.
|
static |
Definition at line 612 of file dbt_scanner10.cpp.
|
static |
Definition at line 618 of file dbt_scanner10.cpp.
|
static |
Definition at line 628 of file dbt_scanner10.cpp.
|
static |
Definition at line 669 of file dbt_scanner10.cpp.
void test | ( | ) |
Definition at line 691 of file dbt_scanner10.cpp.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 738 of file dbt_scanner10.cpp.
|
static |
Definition at line 112 of file dbt_scanner10.cpp.
|
static |
Definition at line 114 of file dbt_scanner10.cpp.
|
static |
Definition at line 115 of file dbt_scanner10.cpp.
|
static |
Definition at line 116 of file dbt_scanner10.cpp.
|
static |
Definition at line 118 of file dbt_scanner10.cpp.
|
static |
Definition at line 119 of file dbt_scanner10.cpp.
|
static |
Definition at line 120 of file dbt_scanner10.cpp.
|
static |
Definition at line 121 of file dbt_scanner10.cpp.
|
static |
Definition at line 122 of file dbt_scanner10.cpp.
|
static |
Definition at line 123 of file dbt_scanner10.cpp.
|
static |
Definition at line 125 of file dbt_scanner10.cpp.
|
static |
Definition at line 127 of file dbt_scanner10.cpp.
|
static |
Definition at line 128 of file dbt_scanner10.cpp.
|
static |
Definition at line 130 of file dbt_scanner10.cpp.
|
static |
Definition at line 132 of file dbt_scanner10.cpp.
|
static |
Definition at line 133 of file dbt_scanner10.cpp.
|
static |
Definition at line 134 of file dbt_scanner10.cpp.
|
static |
Definition at line 137 of file dbt_scanner10.cpp.
|
static |
Definition at line 138 of file dbt_scanner10.cpp.
|
static |
Definition at line 139 of file dbt_scanner10.cpp.
|
static |
Definition at line 141 of file dbt_scanner10.cpp.
|
static |
Definition at line 142 of file dbt_scanner10.cpp.
|
static |