summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-07-26 07:40:06 +0200
committerSven Gothel <[email protected]>2020-07-26 07:40:06 +0200
commitc89c485b430a0e2eaeb6ba4acaeefbcc29e396c8 (patch)
tree641d3ee427ca31b7d3b4e2d54cc88cc3905ff920
parent2846a8de0e3c0fb8fd861c2a58da40b4bf4db78c (diff)
dbt_scanner0[01]: Fix conversion from getDevice() -> getDeviceChecked()
-rw-r--r--examples/direct_bt_scanner00/dbt_scanner00.cpp4
-rw-r--r--examples/direct_bt_scanner01/dbt_scanner01.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/direct_bt_scanner00/dbt_scanner00.cpp b/examples/direct_bt_scanner00/dbt_scanner00.cpp
index e08998c9..5408eac2 100644
--- a/examples/direct_bt_scanner00/dbt_scanner00.cpp
+++ b/examples/direct_bt_scanner00/dbt_scanner00.cpp
@@ -102,7 +102,7 @@ class MyGATTEventListener : public AssociatedGATTCharacteristicListener {
: AssociatedGATTCharacteristicListener(characteristicMatch) {}
void notificationReceived(GATTCharacteristicRef charDecl, std::shared_ptr<TROOctets> charValue, const uint64_t timestamp) override {
- const std::shared_ptr<DBTDevice> dev = charDecl->getDevice();
+ const std::shared_ptr<DBTDevice> dev = charDecl->getDeviceChecked();
const int64_t tR = getCurrentMilliseconds();
fprintf(stderr, "****** GATT Notify (td %" PRIu64 " ms, dev-discovered %" PRIu64 " ms): From %s\n",
(tR-timestamp), (tR-dev->ts_creation), dev->toString().c_str());
@@ -116,7 +116,7 @@ class MyGATTEventListener : public AssociatedGATTCharacteristicListener {
std::shared_ptr<TROOctets> charValue, const uint64_t timestamp,
const bool confirmationSent) override
{
- const std::shared_ptr<DBTDevice> dev = charDecl->getDevice();
+ const std::shared_ptr<DBTDevice> dev = charDecl->getDeviceChecked();
const int64_t tR = getCurrentMilliseconds();
fprintf(stderr, "****** GATT Indication (confirmed %d, td(msg %" PRIu64 " ms, dev-discovered %" PRIu64 " ms): From %s\n",
confirmationSent, (tR-timestamp), (tR-dev->ts_creation), dev->toString().c_str());
diff --git a/examples/direct_bt_scanner01/dbt_scanner01.cpp b/examples/direct_bt_scanner01/dbt_scanner01.cpp
index 2fead468..720f68e0 100644
--- a/examples/direct_bt_scanner01/dbt_scanner01.cpp
+++ b/examples/direct_bt_scanner01/dbt_scanner01.cpp
@@ -96,7 +96,7 @@ class MyGATTEventListener : public GATTCharacteristicListener {
void notificationReceived(GATTCharacteristicRef charDecl,
std::shared_ptr<TROOctets> charValue, const uint64_t timestamp) override {
- const std::shared_ptr<DBTDevice> dev = charDecl->getDevice();
+ const std::shared_ptr<DBTDevice> dev = charDecl->getDeviceChecked();
const int64_t tR = getCurrentMilliseconds();
fprintf(stderr, "****** GATT Notify (td %" PRIu64 " ms, dev-discovered %" PRIu64 " ms): From %s\n",
(tR-timestamp), (tR-dev->ts_creation), dev->toString().c_str());
@@ -110,7 +110,7 @@ class MyGATTEventListener : public GATTCharacteristicListener {
std::shared_ptr<TROOctets> charValue, const uint64_t timestamp,
const bool confirmationSent) override
{
- const std::shared_ptr<DBTDevice> dev = charDecl->getDevice();
+ const std::shared_ptr<DBTDevice> dev = charDecl->getDeviceChecked();
const int64_t tR = getCurrentMilliseconds();
fprintf(stderr, "****** GATT Indication (confirmed %d, td(msg %" PRIu64 " ms, dev-discovered %" PRIu64 " ms): From %s\n",
confirmationSent, (tR-timestamp), (tR-dev->ts_creation), dev->toString().c_str());