diff options
author | Sven Gothel <[email protected]> | 2021-10-05 04:35:41 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-10-05 04:35:41 +0200 |
commit | e097e56ad4d6db949d8db7ee6d0d1257b5ab0af8 (patch) | |
tree | 81c93ef610c1bf70eeaddc0010a973be2190b349 /examples | |
parent | 4aedaa17b32b76fb6b0ef7b8cc9e703f94f2eb22 (diff) |
Adopt to jaulib v0.4.9; Fixes BTSecurityRegistry::getStartOf(..)
Diffstat (limited to 'examples')
-rw-r--r-- | examples/dbt_scanner00.cpp | 4 | ||||
-rw-r--r-- | examples/dbt_scanner01.cpp | 2 | ||||
-rw-r--r-- | examples/dbt_scanner10.cpp | 4 | ||||
-rw-r--r-- | examples/dbt_test_gattcharlifecycle01.cpp | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/examples/dbt_scanner00.cpp b/examples/dbt_scanner00.cpp index dec49ac1..2074ac0c 100644 --- a/examples/dbt_scanner00.cpp +++ b/examples/dbt_scanner00.cpp @@ -297,9 +297,9 @@ int main(int argc, char *argv[]) BTGattChar & serviceChar = *serviceCharacteristics.at(j); fprintf(stderr, " [%2.2d.%2.2d] Decla: %s\n", (int)i, (int)j, serviceChar.toString().c_str()); if( serviceChar.hasProperties(BTGattChar::PropertyBitVal::Read) ) { - POctets value(BTGattHandler::number(BTGattHandler::Defaults::MAX_ATT_MTU), 0); + POctets value(BTGattHandler::number(BTGattHandler::Defaults::MAX_ATT_MTU), 0, jau::endian::little); if( serviceChar.readValue(value) ) { - std::string sval = dfa_utf8_decode(value.get_ptr(), value.getSize()); + std::string sval = dfa_utf8_decode(value.get_ptr(), value.size()); fprintf(stderr, " [%2.2d.%2.2d] Value: %s ('%s')\n", (int)i, (int)j, value.toString().c_str(), sval.c_str()); } } diff --git a/examples/dbt_scanner01.cpp b/examples/dbt_scanner01.cpp index a7fe49f5..8fc796ff 100644 --- a/examples/dbt_scanner01.cpp +++ b/examples/dbt_scanner01.cpp @@ -309,7 +309,7 @@ int main(int argc, char *argv[]) BTGattChar & serviceChar = *serviceCharacteristics.at(j); fprintf(stderr, " [%2.2d.%2.2d] Decla: %s\n", (int)i, (int)j, serviceChar.toString().c_str()); if( serviceChar.hasProperties(BTGattChar::PropertyBitVal::Read) ) { - POctets value(BTGattHandler::number(BTGattHandler::Defaults::MAX_ATT_MTU), 0); + POctets value(BTGattHandler::number(BTGattHandler::Defaults::MAX_ATT_MTU), 0, jau::endian::little); if( gatt->readCharacteristicValue(serviceChar, value) ) { fprintf(stderr, " [%2.2d.%2.2d] Value: %s\n", (int)i, (int)j, value.toString().c_str()); } diff --git a/examples/dbt_scanner10.cpp b/examples/dbt_scanner10.cpp index 9368a4c4..3782a8b0 100644 --- a/examples/dbt_scanner10.cpp +++ b/examples/dbt_scanner10.cpp @@ -488,9 +488,9 @@ static void processReadyDevice(std::shared_ptr<BTDevice> device) { fprintf_td(stderr, " [%2.2d.%2.2d] %s\n", i, j, serviceChar->toString().c_str()); } if( serviceChar->hasProperties(BTGattChar::PropertyBitVal::Read) ) { - POctets value(BTGattHandler::number(BTGattHandler::Defaults::MAX_ATT_MTU), 0); + POctets value(BTGattHandler::number(BTGattHandler::Defaults::MAX_ATT_MTU), 0, jau::endian::little); if( serviceChar->readValue(value) ) { - std::string sval = dfa_utf8_decode(value.get_ptr(), value.getSize()); + std::string sval = dfa_utf8_decode(value.get_ptr(), value.size()); if( !QUIET ) { fprintf_td(stderr, " [%2.2d.%2.2d] value: %s ('%s')\n", (int)i, (int)j, value.toString().c_str(), sval.c_str()); } diff --git a/examples/dbt_test_gattcharlifecycle01.cpp b/examples/dbt_test_gattcharlifecycle01.cpp index 1efdf78a..97b579b0 100644 --- a/examples/dbt_test_gattcharlifecycle01.cpp +++ b/examples/dbt_test_gattcharlifecycle01.cpp @@ -252,7 +252,7 @@ class MyGATTEventListener : public BTGattChar::Listener { i, j, charDecl->value_type->toUUID128String().c_str(), (tR-timestamp)); fprintf_td(stderr, "**[%2.2d.%2.2d] Characteristic: %s ******\n", i, j, charDecl->toString().c_str()); fprintf_td(stderr, "**[%2.2d.%2.2d] Value R: %s ******\n", i, j, char_value.toString().c_str()); - sink_ref->insert(sink_ref->end(), char_value.get_ptr(), char_value.get_ptr()+char_value.getSize()); + sink_ref->insert(sink_ref->end(), char_value.get_ptr(), char_value.get_ptr()+char_value.size()); } void indicationReceived(BTGattCharRef charDecl, @@ -264,7 +264,7 @@ class MyGATTEventListener : public BTGattChar::Listener { i, j, charDecl->value_type->toUUID128String().c_str(), (tR-timestamp), confirmationSent); fprintf_td(stderr, "**[%2.2d.%2.2d] Characteristic: %s ******\n", i, j, charDecl->toString().c_str()); fprintf_td(stderr, "**[%2.2d.%2.2d] Value R: %s ******\n", i, j, char_value.toString().c_str()); - sink_ref->insert(sink_ref->end(), char_value.get_ptr(), char_value.get_ptr()+char_value.getSize()); + sink_ref->insert(sink_ref->end(), char_value.get_ptr(), char_value.get_ptr()+char_value.size()); } }; |