aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-10-19 06:12:02 +0200
committerSven Gothel <[email protected]>2021-10-19 06:12:02 +0200
commit9507aa383965d5ab05375169b25c119d9258858f (patch)
treee44fa0044eb03515843b176d276ccffa31bd4d8d /api
parent62594a9b9e2b7004f611d01ac98c34d2ed2c96e1 (diff)
BTDevice/BTGattHandler: Add send[Notification|Indication](..) commands
Diffstat (limited to 'api')
-rw-r--r--api/direct_bt/BTDevice.hpp14
-rw-r--r--api/direct_bt/BTGattHandler.hpp14
2 files changed, 28 insertions, 0 deletions
diff --git a/api/direct_bt/BTDevice.hpp b/api/direct_bt/BTDevice.hpp
index f201a31d..6fc0364f 100644
--- a/api/direct_bt/BTDevice.hpp
+++ b/api/direct_bt/BTDevice.hpp
@@ -1004,6 +1004,20 @@ namespace direct_bt {
std::shared_ptr<GattGenericAccessSvc> getGattGenericAccess();
/**
+ *
+ * @param value
+ * @return
+ */
+ bool sendNotification(const uint16_t handle, const jau::TROOctets & value);
+
+ /**
+ *
+ * @param value
+ * @return
+ */
+ bool sendIndication(const uint16_t handle, const jau::TROOctets & value);
+
+ /**
* Issues a GATT ping to the device, validating whether it is still reachable.
* <p>
* This method could be periodically utilized to shorten the underlying OS disconnect period
diff --git a/api/direct_bt/BTGattHandler.hpp b/api/direct_bt/BTGattHandler.hpp
index 4f3987c9..f86bc25a 100644
--- a/api/direct_bt/BTGattHandler.hpp
+++ b/api/direct_bt/BTGattHandler.hpp
@@ -489,6 +489,20 @@ namespace direct_bt {
bool configNotificationIndication(BTGattDesc & cd, const bool enableNotification, const bool enableIndication);
/**
+ *
+ * @param value
+ * @return
+ */
+ bool sendNotification(const uint16_t handle, const jau::TROOctets & value);
+
+ /**
+ *
+ * @param value
+ * @return
+ */
+ bool sendIndication(const uint16_t handle, const jau::TROOctets & value);
+
+ /**
* Add the given listener to the list if not already present.
* <p>
* Returns true if the given listener is not element of the list and has been newly added,