|
| static String | decodeUTF8String (final byte[] buffer, final int offset, final int size) |
| | Decodes the given consecutive UTF-8 characters within buffer to String. More...
|
| |
| static short | getHCIConnSupervisorTimeout (final int conn_latency, final int conn_interval_max_ms) |
| | Defining the supervising timeout for LE connections to be a multiple of the maximum connection interval as follows: More...
|
| |
| static short | getHCIConnSupervisorTimeout (final int conn_latency, final int conn_interval_max_ms, final int min_result_ms, final int multiplier) |
| | Defining the supervising timeout for LE connections to be a multiple of the maximum connection interval as follows: More...
|
| |
| static final String | toUUID128 (final String uuid16) |
| | Converts the given 4 digits uuid16 value to UUID128 representation. More...
|
| |
|
| static final String | UUID128_BASE = "00000000-0000-1000-8000-00805f9b34fb" |
| | Base UUID128 used to express a UUID16, etc. More...
|
| |
Definition at line 29 of file BTUtils.java.
◆ toUUID128()
| static final String org.direct_bt.BTUtils.toUUID128 |
( |
final String |
uuid16 | ) |
|
|
static |
Converts the given 4 digits uuid16 value to UUID128 representation.
- Parameters
-
| uuid16 | the 4 characters long uuid16 value to convert |
- Returns
- UUID128 representation if uuid16 is 4 characters long, otherwise
UUID128_BASE.
Definition at line 40 of file BTUtils.java.
◆ getHCIConnSupervisorTimeout() [1/2]
| static short org.direct_bt.BTUtils.getHCIConnSupervisorTimeout |
( |
final int |
conn_latency, |
|
|
final int |
conn_interval_max_ms, |
|
|
final int |
min_result_ms, |
|
|
final int |
multiplier |
|
) |
| |
|
static |
Defining the supervising timeout for LE connections to be a multiple of the maximum connection interval as follows:
( 1 + conn_latency ) * conn_interval_max_ms * max(2, multiplier) [ms]
If above result is smaller than the given min_result_ms, min_result_ms/10 will be returned.
- Parameters
-
| conn_latency | the connection latency |
| conn_interval_max_ms | the maximum connection interval in [ms] |
| min_result_ms | the minimum resulting supervisor timeout, defaults to 500ms. If above formula results in a smaller value, min_result_ms/10 will be returned. |
| multiplier | recommendation is 6, we use 10 as default for safety. |
- Returns
- the resulting supervising timeout in 1/10 [ms], suitable for the
BTDevice#connectLE(short, short, short, short, short, short).
- See also
- BTDevice::connectLE(short, short, short, short, short, short)
Definition at line 62 of file BTUtils.java.
◆ getHCIConnSupervisorTimeout() [2/2]
| static short org.direct_bt.BTUtils.getHCIConnSupervisorTimeout |
( |
final int |
conn_latency, |
|
|
final int |
conn_interval_max_ms |
|
) |
| |
|
static |
Defining the supervising timeout for LE connections to be a multiple of the maximum connection interval as follows:
( 1 + conn_latency ) * conn_interval_max_ms * max(2, multiplier) [ms]
If above result is smaller than the given min_result_ms, min_result_ms/10 will be returned.
- Using minimum resulting supervisor timeout of 500ms.
- Using multiplier of 10 as default for safety.
- Parameters
-
| conn_latency | the connection latency |
| conn_interval_max_ms | the maximum connection interval in [ms] |
- Returns
- the resulting supervising timeout in 1/10 [ms], suitable for the
BTDevice#connectLE(short, short, short, short, short, short).
- See also
- BTDevice::connectLE(short, short, short, short, short, short)
Definition at line 84 of file BTUtils.java.
◆ decodeUTF8String()
| static String org.direct_bt.BTUtils.decodeUTF8String |
( |
final byte[] |
buffer, |
|
|
final int |
offset, |
|
|
final int |
size |
|
) |
| |
|
static |
Decodes the given consecutive UTF-8 characters within buffer to String.
Definition at line 91 of file BTUtils.java.
◆ UUID128_BASE
| final String org.direct_bt.BTUtils.UUID128_BASE = "00000000-0000-1000-8000-00805f9b34fb" |
|
static |
Base UUID128 used to express a UUID16, etc.
Definition at line 33 of file BTUtils.java.
The documentation for this class was generated from the following file: