|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--interfaces.Controller
Interface class for all controllers. All Controllers must extend this abstract class, and should obey the commands specified or system behaviour is undefined. e.g. a call to halt() *must* stop this controller's thread as quickly as possible and allow run() to return.
Field Summary | |
static int |
SENSOR_TYPE_LIGHT
Sensor type constants (see getSensors() for explanation) |
static int |
SENSOR_TYPE_TOUCH
|
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
Controller()
|
Method Summary | |
abstract AbstractRobot |
getRobot()
Returns the AbstractRobot associated with this controller |
abstract int[] |
getSensors()
Returns an array of the sensors used by this controller, and the type of sensor required. |
abstract void |
halt()
Stops this controller's thread running, i.e. |
abstract void |
initController(AbstractRobot r)
Initialises controller. |
abstract void |
run()
Starts this controller's thread running. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static int SENSOR_TYPE_LIGHT
public static int SENSOR_TYPE_TOUCH
Constructor Detail |
public Controller()
Method Detail |
public abstract void initController(AbstractRobot r)
r
- the AbstractRobot associated with this controllerpublic abstract int[] getSensors()
public abstract void run()
run
in class java.lang.Thread
public abstract void halt()
public abstract AbstractRobot getRobot()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |