|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jarol.JarolCore
public abstract class JarolCore
Abstract class for controlling a vehicle that is connected to a vehicle and a control terminal (terminal unit + navigation
unit).
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.
Field Summary | |
---|---|
protected boolean |
condition
The condition that indicates if the controlLoop() should be looping. |
protected Port |
portControllerActuator
The port is used to transfer the sensor data from the controller interface (Jarol Core) to the acutator interface. |
protected Port |
portControllerTerminal
The port is used to transfer the sensor data from the controller interface (Jarol Core) to the terminal interface. |
protected Port |
portNavigatorController
The port is used to transfer the navigation data from the navigation interface to the controller interface (Jarol Core). |
protected Port |
portSensorController
The port is used to transfer the sensor data from the sensor interface to the controller interface (Jarol Core). |
protected Signal |
signalControllerActuator
The signal that signals the actuator interface. |
protected Signal |
signalControllerTerminal
The signal that signals the terminal interface. |
protected Signal |
signalSensorController
The signal that awaits on the sensor interface. |
Constructor Summary | |
---|---|
JarolCore()
|
Method Summary | |
---|---|
abstract void |
awaitNavigation()
Waits for a signal from the navigation interface that indicates that the control flow can continue. |
void |
awaitSensor()
Awaits a signal on the signalSensorController to continue in the controlLoop() . |
abstract MessageInterface[] |
computeActuationData(MessageInterface[] sensorData,
MessageInterface[] navigationData)
Calculates the information (e.g., motor signals, thruster, fin positions, ...) and returns an array of messages containing this information. |
void |
controlLoop()
Loops while the condition is true and calls all methods needed for the control in a appropriate order. |
abstract void |
forwardToActuator(MessageInterface[] actuatorData)
Fordwards the actuation data to the actuator interface. |
abstract void |
forwardToNavigation(MessageInterface[] sensorData)
Forwards sensorData to the navigation interface. |
abstract void |
forwardToTerminal(MessageInterface[] dataBundle)
Forwarding a dataBundle to the terminal, e.g. |
abstract MessageInterface[] |
readFromNavigation()
Reads navigation data from the navigation interface. |
abstract MessageInterface[] |
readFromSensor()
Reads data from the sensor interface. |
void |
signalActuator()
Sends a signal to the signalControllerActuator to initiate the continuation of the actuator interface. |
abstract void |
signalNavigation()
Signals the navigation interface. |
void |
signalTerminal()
Sends a signal to the signalControllerTerminal to initiate the continuation of the terminal interface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Signal signalSensorController
protected Signal signalControllerActuator
protected Signal signalControllerTerminal
protected Port portSensorController
protected Port portControllerTerminal
protected Port portNavigatorController
protected Port portControllerActuator
protected boolean condition
controlLoop()
should be looping.
Constructor Detail |
---|
public JarolCore()
Method Detail |
---|
public void controlLoop()
controlLoop
in interface JarolCoreInterface
public abstract void awaitNavigation()
JarolCoreInterface
awaitNavigation
in interface JarolCoreInterface
public abstract MessageInterface[] computeActuationData(MessageInterface[] sensorData, MessageInterface[] navigationData)
JarolCoreInterface
computeActuationData
in interface JarolCoreInterface
sensorData
- data provided by the sensor interfacenavigationData
- data provided by the navigation interface
public abstract void forwardToActuator(MessageInterface[] actuatorData)
JarolCoreInterface
forwardToActuator
in interface JarolCoreInterface
actuatorData
- actuation datapublic abstract void forwardToNavigation(MessageInterface[] sensorData)
JarolCoreInterface
forwardToNavigation
in interface JarolCoreInterface
public abstract void forwardToTerminal(MessageInterface[] dataBundle)
JarolCoreInterface
forwardToTerminal
in interface JarolCoreInterface
public abstract MessageInterface[] readFromNavigation()
JarolCoreInterface
readFromNavigation
in interface JarolCoreInterface
public abstract MessageInterface[] readFromSensor()
JarolCoreInterface
readFromSensor
in interface JarolCoreInterface
public abstract void signalNavigation()
JarolCoreInterface
signalNavigation
in interface JarolCoreInterface
public void awaitSensor()
controlLoop()
.
awaitSensor
in interface JarolCoreInterface
public void signalActuator()
signalActuator
in interface JarolCoreInterface
public void signalTerminal()
signalTerminal
in interface JarolCoreInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |