Package ipfs.gomobile.android.bledriver
Class BleQueue
- java.lang.Object
-
- ipfs.gomobile.android.bledriver.BleQueue
-
public class BleQueue extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBleQueue.Callback
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(java.lang.Runnable r, BleQueue.Callback callback, long delay, java.lang.Runnable cancel)voidclear()voidcompletedCommand(int status)The current command has been completed, move to the next command in the queue (if any)voidnextCommand()Execute the next command in the subscribe queue.voidretryCommand()Retry the current command.voidsetId(java.lang.String id)
-
-
-
Constructor Detail
-
BleQueue
public BleQueue(Logger logger, android.os.Handler handler)
-
-
Method Detail
-
setId
public void setId(java.lang.String id)
-
add
public boolean add(java.lang.Runnable r, BleQueue.Callback callback, long delay, java.lang.Runnable cancel)
-
completedCommand
public void completedCommand(int status)
The current command has been completed, move to the next command in the queue (if any)
-
retryCommand
public void retryCommand()
Retry the current command. Typically used when a read/write fails and triggers a bonding procedure
-
nextCommand
public void nextCommand()
Execute the next command in the subscribe queue. A queue is used because the calls have to be executed sequentially. If the read or write fails, the next command in the queue is executed.
-
clear
public void clear()
-
-