diff options
Diffstat (limited to 'api/direct_bt/GATTHandler.hpp')
-rw-r--r-- | api/direct_bt/GATTHandler.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/api/direct_bt/GATTHandler.hpp b/api/direct_bt/GATTHandler.hpp index 253077d0..92a79c38 100644 --- a/api/direct_bt/GATTHandler.hpp +++ b/api/direct_bt/GATTHandler.hpp @@ -374,6 +374,19 @@ namespace direct_bt { std::shared_ptr<DeviceInformation> getDeviceInformation(std::vector<GATTServiceRef> & primServices); std::shared_ptr<DeviceInformation> getDeviceInformation(std::vector<GATTCharacteristicRef> & deviceInfoCharDeclList); + + /** + * Issues a ping to the device, validating whether it is still reachable. + * <p> + * This method could be periodically utilized to shorten the underlying OS disconnect period + * after turning the device off, which lies within 7-13s. + * </p> + * <p> + * In case the device is no more reachable, disconnect will be initiated due to the occurring IO error. + * </p> + * @return {@code true} if successful, otherwise false in case no GATT services exists etc. + */ + bool ping(); }; } // namespace direct_bt |