diff options
Diffstat (limited to 'apps/ble-inspect-device.h')
-rw-r--r-- | apps/ble-inspect-device.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/apps/ble-inspect-device.h b/apps/ble-inspect-device.h index 346f9be..ff19ba1 100644 --- a/apps/ble-inspect-device.h +++ b/apps/ble-inspect-device.h @@ -13,7 +13,6 @@ using namespace trygvis::bluetooth; using namespace trygvis::apps; class ble_inspect_device : public app { - public: ble_inspect_device() : app("ble-inspect-device") { } @@ -21,8 +20,7 @@ public: ~ble_inspect_device() = default; void add_options(po::options_description_easy_init &options) override { - options - ("device", po::value<string>()->required(), "The MAC of the device to inspect"); + options("device", po::value<string>()->required(), "The MAC of the device to inspect"); } void scan_callback(BluetoothDevice &device) { @@ -32,18 +30,18 @@ public: gatt->discoverServices(); - vector < BluetoothGattService * > services = gatt->getServices(); + vector<BluetoothGattService *> services = gatt->getServices(); cout << "Device has " << services.size() << " services" << endl; - for (auto &s: services) { + for (auto &s : services) { const vector<BluetoothGattCharacteristic *> characteristics = s->getCharacteristics(); - cout << "Service: UUID: " << s->getUuid() << - ", has " << characteristics.size() << " characteristics" << endl; + cout << "Service: UUID: " << s->getUuid() << ", has " << characteristics.size() << " characteristics" + << endl; - for (auto &c: characteristics) { - cout << "Characteristic: UUID: " << c->getUuid() << - ", properties: " << (int) c->getProperties() << endl; + for (auto &c : characteristics) { + cout << "Characteristic: UUID: " << c->getUuid() << ", properties: " << (int) c->getProperties() + << endl; } } } @@ -72,6 +70,5 @@ public: } } }; - } } |