jarol
Class JarolCoreWithLink
java.lang.Object
jarol.JarolCore
jarol.JarolCoreWithLink
- All Implemented Interfaces:
- JarolCoreInterface
public abstract class JarolCoreWithLink
- extends JarolCore
Abstract class for controlling a vehicle that is connected to a vehicle and a control terminal (terminal unit + navigation
unit) via UDPLinks.
It provides three synchronization points in form of signals. One to activate the controller, when the sensor has finished
its execution. One to activate the terminal interface, when the controller has finished passing the display data to the
terminal. The last one to activate the actuator interface, when the controller has finished computing the actuation data
forwarded it to the actuator interface.
It should be noted that the controller doesn't wait for navigation data from
the terminal. An additional Signal is needed for this kind of behavior, whereas the method awaitNavigation()
is provided in the interface and called in the controlLoop()
. Hence an additional Signal and the implementation
of awaitNavigation()
would make the controller wait for the navigation data.
- Version:
- 0.1
- Author:
- Bernhard Kast
Field Summary |
protected Link |
terminalLink
The Link that provides an input and output port to the terminal. |
protected Link |
vehicleLink
The Link that provides an input and output port to the vehicle. |
Method Summary |
protected UDPLink |
setupUDPLink(MessageFactory messageFactory,
java.lang.String host,
int localPort,
int remotePort,
int receiveBufferSize,
int sendBufferSize)
Creates an UDPLink on the localPort to a given host on its remotePort. |
Methods inherited from class jarol.JarolCore |
awaitNavigation, awaitSensor, computeActuationData, controlLoop, forwardToActuator, forwardToNavigation, forwardToTerminal, readFromNavigation, readFromSensor, signalActuator, signalNavigation, signalTerminal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
vehicleLink
protected Link vehicleLink
- The Link that provides an input and output port to the vehicle. Used for transfering the sensor and actuation data
into and out of Jarol.
terminalLink
protected Link terminalLink
- The Link that provides an input and output port to the terminal. NOTE: This assumes that the terminal also
provides navigation data.
JarolCoreWithLink
public JarolCoreWithLink()
setupUDPLink
protected UDPLink setupUDPLink(MessageFactory messageFactory,
java.lang.String host,
int localPort,
int remotePort,
int receiveBufferSize,
int sendBufferSize)
- Creates an UDPLink on the localPort to a given host on its remotePort.
- Parameters:
messageFactory
- a concrete MessageFactoryhost
- the hostnamelocalPort
- the local portremotePort
- the remote portreceiveBufferSize
- the size for the receiving buffersendBufferSize
- the size for the sending buffer
- Returns:
- link the connected link, null if an error occured.