public enum BleTask extends java.lang.Enum<BleTask>
BleDeviceConfig
and BleManagerConfig
, for example BleNodeConfig.taskTimeoutRequestFilter
.Modifier and Type | Method and Description |
---|---|
boolean |
isDeviceSpecific()
Returns whether
this is associated with a BleDevice . |
boolean |
isManagerSpecific()
Returns whether
this is associated with BleManager . |
boolean |
isServerSpecific()
Returns whether
this is associated with a BleServer . |
boolean |
usesCharUuid()
Returns
true if the task can have a characteristic UUID associated with it - for now READ , WRITE , TOGGLE_NOTIFY , READ_DESCRIPTOR and WRITE_DESCRIPTOR . |
static BleTask |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static BleTask[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BleTask TURN_BLE_OFF
BleManager.turnOff()
public static final BleTask TURN_BLE_ON
BleManager.turnOn()
public static final BleTask NUKE_BLE_STACK
BleManager.nukeBle()
public static final BleTask RESOLVE_CRASHES
BleManagerConfig.enableCrashResolver
.public static final BleTask CONNECT
BleDevice.connect()
and its several overloads.public static final BleTask DISCONNECT
BleDevice.disconnect()
.public static final BleTask BOND
BleDevice.bond()
and BleDeviceState.BONDING
.public static final BleTask UNBOND
BleDevice.unbond()
.public static final BleTask READ
public static final BleTask WRITE
public static final BleTask TOGGLE_NOTIFY
public static final BleTask READ_RSSI
BleDevice.readRssi()
and BleDevice.startRssiPoll(com.idevicesinc.sweetblue.utils.Interval)
(and overloads thereof).public static final BleTask DISCOVER_SERVICES
BleDevice
becomes BleDeviceState.BLE_CONNECTED
.public static final BleTask SEND_NOTIFICATION
BleServer.sendNotification(String, UUID, UUID, FutureData, OutgoingListener)
or BleServer.sendIndication(String, UUID, UUID, FutureData, OutgoingListener)
overloads.public static final BleTask CONNECT_SERVER
BleServer.connect(String)
or overloads.public static final BleTask DISCONNECT_SERVER
BleServer.disconnect(String)
.public static final BleTask SEND_READ_WRITE_RESPONSE
IncomingListener.Please.respondWithSuccess()
, IncomingListener.Please.respondWithError(int)
,
or various other static methods of IncomingListener.Please
.public static final BleTask ADD_SERVICE
BleServer.addService(BleService, AddServiceListener)
or overloads.public static final BleTask SET_MTU
BleDevice.negotiateMtu(int)
or overloads.public static final BleTask SET_CONNECTION_PRIORITY
BleDevice.setConnectionPriority(BleConnectionPriority, ReadWriteListener)
or overloads.public static final BleTask SET_PHYSICAL_LAYER
BleDevice.setPhyOptions(Phy)
, which sets Bluetooth 5 specific features.public static final BleTask READ_PHYSICAL_LAYER
BleDevice.setPhyOptions(Phy, ReadWriteListener)
, which dictates Bluetooth 5 specific features.public static final BleTask READ_DESCRIPTOR
BleDevice.readDescriptor(UUID, UUID, ReadWriteListener)
or overloads.public static final BleTask WRITE_DESCRIPTOR
BleDevice.writeDescriptor(UUID, UUID, byte[], ReadWriteListener)
or overloads.public static final BleTask RELIABLE_WRITE
BleDevice.reliableWrite_execute()
.public static final BleTask START_ADVERTISING
public static final BleTask DELAY
public static final BleTask SHUTDOWN
BleManager.shutdown()
. This task ensures that all devices have actually been disconnected.public static BleTask[] values()
for (BleTask c : BleTask.values()) System.out.println(c);
public static BleTask valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isDeviceSpecific()
this
is associated with a BleDevice
.public boolean isManagerSpecific()
this
is associated with BleManager
.public boolean isServerSpecific()
this
is associated with a BleServer
.public boolean usesCharUuid()
true
if the task can have a characteristic UUID associated with it - for now READ
, WRITE
, TOGGLE_NOTIFY
, READ_DESCRIPTOR
and WRITE_DESCRIPTOR
.