|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectioio.lib.util.BaseIOIOLooper
public class BaseIOIOLooper
A convenience implementation of IOIOLooper
.
This base class provides no-op implementations for all methods and provides
the ioio_
field for subclasses.
Constructor Summary | |
---|---|
BaseIOIOLooper()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseIOIOLooper()
Method Detail |
---|
public final void setup(IOIO ioio) throws ConnectionLostException, java.lang.InterruptedException
IOIOLooper
setup
in interface IOIOLooper
ConnectionLostException
java.lang.InterruptedException
public void loop() throws ConnectionLostException, java.lang.InterruptedException
IOIOLooper
loop
in interface IOIOLooper
ConnectionLostException
java.lang.InterruptedException
public void disconnected()
IOIOLooper
IOIOLooper.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 IOIOLooper
public void incompatible()
IOIOLooper
IOIOLooper.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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |