de.jaetzold.art.examples
Class AWTRobotInterface
java.lang.Object
|
+--de.jaetzold.art.platform.RobotInterfaceAdapter
|
+--de.jaetzold.art.examples.AWTRobotInterface
- All Implemented Interfaces:
- RobotInterface
- public class AWTRobotInterface
- extends RobotInterfaceAdapter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
in0
protected TextField in0
in1
protected TextField in1
out0
protected TextField out0
out1
protected TextField out1
getInterfaceDefinition
public RobotInterfaceDefinition getInterfaceDefinition()
- Description copied from interface:
RobotInterface
- Returns a RobotInterfaceDefinition describing this instance of a RobotInterface.
It describes the RobotInterface in the sense that a call to
conformsTo(RobotInterfaceDefinition)
with it as a parameter will yield true as a result. There should be no other instances of RobotInterface at a time which conform to this definition. However there may other definitions possible to which more than one RobotInterface conforms to, but they shouldn't be returned by this method. The current implementations use a RobotInterfaceStringDefinition.- Following copied from interface:
de.jaetzold.art.RobotInterface
- See Also:
RobotInterfaceStringDefinition
,
RobotInterface.conformsTo(RobotInterfaceDefinition)
,
RobotInterfaceFactory.getInterface(RobotInterfaceDefinition)
conformsTo
public boolean conformsTo(RobotInterfaceDefinition definition)
- Description copied from interface:
RobotInterface
- Tells whether the given RobotInterfaceDefinition identifies this RobotInterface.
The provided implementations for Fischertechnik and Mindstorms use Strings.
- Following copied from interface:
de.jaetzold.art.RobotInterface
- See Also:
RobotInterfaceStringDefinition
,
RobotInterface.getInterfaceDefinition()
,
RobotInterfaceFactory.getInterface(RobotInterfaceDefinition)
getInterfaces
public static RobotInterface[] getInterfaces(RobotInterfaceDefinition[] ports)
- Creates or just returns already existing instances of AWTRobotInterface for any matching Ports.
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()
getSensorPorts
public SensorPort[] getSensorPorts()
- Description copied from interface:
RobotInterface
- Returns a description of all SensorPorts this Interface provides.
The Ports in the returned Array can then be used to connect some Sensor-Objects with a Peer that represents some specific type of hardware connected to the hardware-interface.
- Following copied from interface:
de.jaetzold.art.RobotInterface
- See Also:
RobotInterface.getActuatorPorts()
,
SensorPort.connectWith(Sensor)
getActuatorPorts
public ActuatorPort[] getActuatorPorts()
- Description copied from interface:
RobotInterface
- Returns a description of all ActuatorPorts this Interface provides.
The Ports in the returned Array can then be used to connect some Actuator- or Sensor-Objects with a Peer that represents some specific type of hardware connected to the hardware-interface.
- Following copied from interface:
de.jaetzold.art.RobotInterface
- See Also:
RobotInterface.getSensorPorts()
,
ActuatorPort.connectWith(Actuator)