public interface IOIOLooper
setup(IOIO)
will be called. Then, the loop() method will be called repeatedly as
long as the connection is alive. Last, the disconnected() method
will be called upon losing the connection (as result of physical
disconnection, closing the application, etc). In case a IOIO with an
incompatible firmware is encountered, incompatible() will be called
instead of setup(IOIO), and the IOIO instance is entirely useless,
until eventually disconnected() gets called.| 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.
|
void setup(IOIO ioio) throws ConnectionLostException, java.lang.InterruptedException
ConnectionLostExceptionjava.lang.InterruptedExceptionvoid loop()
throws ConnectionLostException,
java.lang.InterruptedException
ConnectionLostExceptionjava.lang.InterruptedExceptionvoid disconnected()
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.void incompatible()
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. setup(IOIO) gets called).