diff options
Diffstat (limited to 'api/direct_bt')
-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; } /** |