24package trial.org.direct_bt;
26import org.direct_bt.BTAdapter;
27import org.direct_bt.BTRole;
28import org.direct_bt.DiscoveryPolicy;
29import org.direct_bt.HCIStatusCode;
30import org.junit.Assert;
65 Assert.assertEquals(current_exp_discovering_state, adapter.
isDiscovering());
69 try { Thread.sleep(100); }
catch (
final InterruptedException e) { e.printStackTrace(); }
79 Assert.assertEquals(current_exp_discovering_state, adapter.
isDiscovering());
84 try { Thread.sleep(100); }
catch (
final InterruptedException e) { e.printStackTrace(); }
Bluetooth roles from the perspective of the link layer (connection initiator).
Master
Master or central role, discovering remote devices and initiating connection.
Discovery policy defines the BTAdapter discovery mode after connecting a remote BTDevice:
BT Core Spec v5.2: Vol 1, Part F Controller Error Codes: 1.3 List of Error Codes.
BTAdapter represents one local Bluetooth Controller.
boolean isAdvertising()
Returns the adapter's current advertising state.
boolean isDiscovering()
Returns true if the meta discovering state is not ScanType#NONE.
BTRole getRole()
Return the current BTRole of this adapter.
void setDisconnectDeviceed(final boolean v)
Set disconnect after processing.
HCIStatusCode startDiscovery(String msg)
static void stopDiscovery(final DBTClientTest client, final boolean current_exp_discovering_state, final String msg)
static void startDiscovery(final DBTClientTest client, final boolean current_exp_discovering_state, final String msg)
void setRemoveDevice(final boolean v)
Set remove device when disconnecting.
HCIStatusCode stopDiscovery(String msg)
void setDiscoveryPolicy(final DiscoveryPolicy v)
Set DiscoveryPolicy.
BTAdapter getAdapter()
Return the adapter for this endpoint.