de.jaetzold.art.platform.lego
Class RCX
java.lang.Object
|
+--de.jaetzold.art.platform.RobotInterfaceAdapter
|
+--de.jaetzold.art.platform.lego.RCX
- All Implemented Interfaces:
- RobotInterface
- Direct Known Subclasses:
- Mindstorms
- public abstract class RCX
- extends RobotInterfaceAdapter
Constructor Summary |
RCX()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
connected
protected boolean connected
alive
protected boolean alive
inStream
protected RCXPacketInputStream inStream
outStream
protected RCXPacketOutputStream outStream
writerQueue
protected Queue writerQueue
- This Thread talks directly with the interface-hardware.
It tries to read (and write) values as fast as it can and puts any
change into a queue for further processing.
writer
protected TaskPerformer writer
writerResultQueue
protected Queue writerResultQueue
readerQueue
protected Queue readerQueue
reader
protected TaskPerformer reader
filterTable
protected RCXPacketFilterTable filterTable
eventQueue
protected Queue eventQueue
notifierQueue
protected Queue notifierQueue
notifier
protected TaskPerformer notifier
sensorValues
protected Hashtable sensorValues
polledSensorValues
protected Hashtable polledSensorValues
sensorValueListeners
protected Hashtable sensorValueListeners
packetToValueDefinitionSet
protected Hashtable packetToValueDefinitionSet
ALIVE
protected static final byte ALIVE
POLL
protected static final byte POLL
UNLOCK_FIRMWARE
protected static byte[] UNLOCK_FIRMWARE
RCX
public RCX()
isConnected
public boolean isConnected()
- Description copied from interface:
RobotInterface
- Tells the state of the physical connection to the hardware-interface. It may be the case that this state is not distinguishable from the one defined by
isAlive()
.- Following copied from interface:
de.jaetzold.art.RobotInterface
- See Also:
RobotInterface.isAlive()
,
SensorPeer.isConnected()
,
Sensor.isConnected()
isAlive
public boolean isAlive()
- Description copied from interface:
RobotInterface
- Tells the state of the logical connection to the hardware-interface. If it is true that means the hardware-interface still behaves as expected.
- Following copied from interface:
de.jaetzold.art.RobotInterface
- See Also:
RobotInterface.isConnected()
alive
protected boolean alive()
getSensorValue
public Object getSensorValue(RCX.SensorValueDefinition valueDefinition)
startPolling
public void startPolling(RCX.SensorValueDefinition valueDefinition,
SensorPeer recipient)
stopPolling
public void stopPolling(RCX.SensorValueDefinition valueDefinition,
SensorPeer recipient)
call
public byte[] call(byte[] packet)
throws Exception
call
public Object call(Task t)
throws Exception
unlockFirmware
public boolean unlockFirmware()
getSensorPeer
protected abstract SensorPeer getSensorPeer(SensorPort p,
Sensor s)
getActuatorPeer
protected abstract ActuatorPeer getActuatorPeer(ActuatorPort p,
Sensor s)