public class Flags extends ADStructure
The format of the AD data is described in "1.3 FLAGS" in "Core Specification Supplement v5".
This class was renamed from ADFlags
to Flags
when the version was upgraded to 1.4.
Constructor and Description |
---|
Flags()
Constructor to create an instance with length=2, type=0x01,
and data={0x00}.
|
Flags(int length,
int type,
byte[] data)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isControllerSimultaneitySupported()
Get the value of "Simultaneous LE and BR/EDR to Same Device
Capable (Controller)".
|
boolean |
isGeneralDiscoverable()
Get the value of "LE General Discoverable Mode".
|
boolean |
isHostSimultaneitySupported()
Get the value of "Simultaneous LE and BR/EDR to Same Device
Capable (Host)".
|
boolean |
isLegacySupported()
Get the inverted value of "BR/EDR Not Supported".
|
boolean |
isLimitedDiscoverable()
Get the value of "LE Limited Discoverable Mode".
|
void |
setControllerSimultaneitySupported(boolean supported)
Set the value of "Simultaneous LE and BR/EDR to Same Device
Capable (Controller)".
|
void |
setGeneralDiscoverable(boolean discoverable)
Set the value of "LE General Discoverable Mode".
|
void |
setHostSimultaneitySupported(boolean supported)
Set the value of "Simultaneous LE and BR/EDR to Same Device
Capable (Host)".
|
void |
setLegacySupported(boolean supported)
Set the inverted value of "BR/EDR Not Supported".
|
void |
setLimitedDiscoverable(boolean discoverable)
Set the value of "LE Limited Discoverable Mode".
|
String |
toString() |
public Flags()
public Flags(int length, int type, byte[] data)
length
- The length of the AD structure. The value should be
data.length + 1
.type
- The AD type. The value should always be 0x01 (Flags).data
- The AD data.public boolean isLimitedDiscoverable()
public void setLimitedDiscoverable(boolean discoverable)
public boolean isGeneralDiscoverable()
public void setGeneralDiscoverable(boolean discoverable)
public boolean isLegacySupported()
true
when the bit of "BR/EDR Not Supported" is 0.public void setLegacySupported(boolean supported)
public boolean isControllerSimultaneitySupported()
public void setControllerSimultaneitySupported(boolean supported)
public boolean isHostSimultaneitySupported()
public void setHostSimultaneitySupported(boolean supported)
public String toString()
toString
in class ADStructure
Copyright © 2016. All rights reserved.