Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
Discovery policy defines the BTAdapter
discovery mode after connecting a remote BTDevice
:
More...
Public Member Functions | |
DiscoveryPolicy (final byte v) | |
Static Public Member Functions | |
static DiscoveryPolicy | get (final byte value) |
Maps the specified integer value to a constant of DiscoveryPolicy . More... | |
Public Attributes | |
ALWAYS_ON =((byte) 4) | |
Always keep discovery enabled, i.e. More... | |
AUTO_OFF =((byte) 0) | |
Turn off discovery when a BTDevice gets connected and leave discovery disabled, if turned off by host system. More... | |
PAUSE_CONNECTED_UNTIL_DISCONNECTED =((byte) 1) | |
Pause discovery until all connected BTDevice become disconnected, effectively until AdapterStatusListener#deviceDisconnected(BTDevice, HCIStatusCode, short, long) . More... | |
PAUSE_CONNECTED_UNTIL_PAIRED =((byte) 3) | |
Pause discovery until all connected BTDevice are optionally SMP paired (~120ms) without GATT service discovery (~700ms). More... | |
PAUSE_CONNECTED_UNTIL_READY =((byte) 2) | |
Pause discovery until all connected BTDevice reach readiness inclusive optional SMP pairing (~120ms) without GATT service discovery (~700ms), effectively until AdapterStatusListener#deviceReady(BTDevice, long) . More... | |
final byte | value |
Discovery policy defines the BTAdapter
discovery mode after connecting a remote BTDevice
:
DiscoveryPolicy#AUTO_OFF
)AdapterStatusListener#deviceDisconnected(BTDevice, HCIStatusCode, short, long)
(DiscoveryPolicy#PAUSE_CONNECTED_UNTIL_DISCONNECTED
).AdapterStatusListener#deviceReady(BTDevice, long)
. (DiscoveryPolicy#PAUSE_CONNECTED_UNTIL_READY
, default)DiscoveryPolicy#PAUSE_CONNECTED_UNTIL_PAIRED
)DiscoveryPolicy#ALWAYS_ON
)Policy is set via BTAdapter#startDiscovery(DiscoveryPolicy, boolean, short, short, byte, boolean)
.
Default is DiscoveryPolicy#PAUSE_CONNECTED_UNTIL_READY
, as it has been shown that continuous advertising reduces the bandwidth for the initial bring-up time including GATT service discovery considerably. Continuous advertising would increase the readiness lag of the remote device until AdapterStatusListener#deviceReady(BTDevice, long)
.
In case users favors faster parallel discovery of new remote devices and hence a slower readiness, DiscoveryPolicy#PAUSE_CONNECTED_UNTIL_PAIRED
or even DiscoveryPolicy#ALWAYS_ON
can be used.
Definition at line 46 of file DiscoveryPolicy.java.
org.direct_bt.DiscoveryPolicy.DiscoveryPolicy | ( | final byte | v | ) |
Definition at line 81 of file DiscoveryPolicy.java.
|
static |
Maps the specified integer value to a constant of DiscoveryPolicy
.
value | the integer value to be mapped to a constant of this enum type. |
AUTO_OFF
if not supported. Definition at line 71 of file DiscoveryPolicy.java.
org.direct_bt.DiscoveryPolicy.AUTO_OFF =((byte) 0) |
Turn off discovery when a BTDevice gets connected and leave discovery disabled, if turned off by host system.
Definition at line 48 of file DiscoveryPolicy.java.
org.direct_bt.DiscoveryPolicy.PAUSE_CONNECTED_UNTIL_DISCONNECTED =((byte) 1) |
Pause discovery until all connected BTDevice
become disconnected, effectively until AdapterStatusListener#deviceDisconnected(BTDevice, HCIStatusCode, short, long)
.
Definition at line 53 of file DiscoveryPolicy.java.
org.direct_bt.DiscoveryPolicy.PAUSE_CONNECTED_UNTIL_READY =((byte) 2) |
Pause discovery until all connected BTDevice
reach readiness inclusive optional SMP pairing (~120ms) without GATT service discovery (~700ms), effectively until AdapterStatusListener#deviceReady(BTDevice, long)
.
This is the default!
Definition at line 58 of file DiscoveryPolicy.java.
org.direct_bt.DiscoveryPolicy.PAUSE_CONNECTED_UNTIL_PAIRED =((byte) 3) |
Pause discovery until all connected BTDevice
are optionally SMP paired (~120ms) without GATT service discovery (~700ms).
Definition at line 60 of file DiscoveryPolicy.java.
org.direct_bt.DiscoveryPolicy.ALWAYS_ON =((byte) 4) |
Always keep discovery enabled, i.e.
re-enabled if automatically turned-off by HCI host OS as soon as possible.
Definition at line 62 of file DiscoveryPolicy.java.
final byte org.direct_bt.DiscoveryPolicy.value |
Definition at line 64 of file DiscoveryPolicy.java.