public class BaseIOIOLooper extends java.lang.Object implements IOIOLooper
IOIOLooper.
This base class provides no-op implementations for all methods and provides
the ioio_ field for subclasses.| Constructor and Description |
|---|
BaseIOIOLooper() |
| Modifier and Type | Method and Description |
|---|---|
void |
disconnected()
Subclasses should override this method for performing operations to be
done once as soon as IOIO communication is lost or closed.
|
void |
incompatible()
Subclasses should override this method for performing operations to be
done if an incompatible IOIO firmware is detected.
|
void |
loop()
Subclasses should override this method for performing operations to be
done repetitively as long as IOIO communication persists.
|
void |
setup(IOIO ioio)
Subclasses should override this method for performing operations to be
done once as soon as IOIO communication is established.
|
public final void setup(IOIO ioio) throws ConnectionLostException, java.lang.InterruptedException
IOIOLoopersetup in interface IOIOLooperConnectionLostExceptionjava.lang.InterruptedExceptionpublic void loop()
throws ConnectionLostException,
java.lang.InterruptedException
IOIOLooperloop in interface IOIOLooperConnectionLostExceptionjava.lang.InterruptedExceptionpublic void disconnected()
IOIOLooperIOIOLooper.setup(IOIO) must not be used from within this method - it is
invalid. This method should not block for long, since it may cause an
ANR.disconnected in interface IOIOLooperpublic void incompatible()
IOIOLooperIOIOLooper.setup(IOIO) must not be used from within this method -
it is invalid. This method will only be called once, until a compatible
IOIO is connected (i.e. IOIOLooper.setup(IOIO) gets called).incompatible in interface IOIOLooper