diff options
author | Sven Gothel <[email protected]> | 2023-11-24 09:21:12 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-11-24 09:21:12 +0100 |
commit | 8b3d6dd4e72f8d5a98055756eac6f2a3212ad453 (patch) | |
tree | 1390af8dcb076edd05773477972d01d2f9a6761b /api | |
parent | 7a906ba8bbea95a3b2895951e65573701457dc34 (diff) |
BTDevice: API Doc: Detail RSSI and Tx Power Level
Diffstat (limited to 'api')
-rw-r--r-- | api/direct_bt/BTDevice.hpp | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/api/direct_bt/BTDevice.hpp b/api/direct_bt/BTDevice.hpp index c42a8b88..0d8c52c1 100644 --- a/api/direct_bt/BTDevice.hpp +++ b/api/direct_bt/BTDevice.hpp @@ -398,10 +398,41 @@ namespace direct_bt { */ BDAddressAndType const & getVisibleAddressAndType() const noexcept { return visibleAddressAndType; } - /** Return RSSI of device as recognized at discovery and connect. */ + /** + * Returns Received Signal Strength Indicator (RSSI) + * in dBm with ±6 dB accuracy of device as recognized at discovery and connect. + * <p> + * BT Core Spec v5.2: Vol 4, Part E HCI: 7.5.4 Read RSSI command + * </p> + * <p> + * Any positive RSSI value indicates how many dB the RSSI is above the upper limit, + * any negative value indicates how many dB the RSSI is below the lower limit. + * The value zero indicates that the RSSI is inside the Golden Receive Power Range. + * </p> + * <p> + * LE range [-127..20] with 0 inside the Golden Receive Power Range + * and 127 as "not available" value (core spec). + * </p> + * <pre> + * pathloss = Tx Power Level – RSSI + * </pre> + * @see #getTxPower() + */ int8_t getRSSI() const noexcept { return rssi; } - /** Return Tx Power of device as recognized at discovery and connect. */ + /** + * Return Tx Power Level in dBm with ±6 dB accuracy of device as recognized at discovery and connect. + * <p> + * Core Specification Supplement, Part A, Section 1.5. + * </p> + * <p> + * Range [-127..20] with 127 as "not available" value (core spec). + * </p> + * <pre> + * pathloss = Tx Power Level – RSSI + * </pre> + * @see #getRSSI() + */ int8_t getTxPower() const noexcept { return tx_power; } /** |