base
Class JarolCoreWithLink
java.lang.Object
base.JarolCore
base.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 messages.Link |
terminalLink
The Link that provides an input and output port to the terminal. |
protected messages.Link |
vehicleLink
The Link that provides an input and output port to the vehicle. |
Method Summary |
protected messages.UDPLink |
setupUDPLink(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 base.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 messages.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 messages.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 messages.UDPLink setupUDPLink(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:
host
- 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.