jarol
Interface JarolCoreInterface

All Known Implementing Classes:
JarolCore, JarolCoreWithLink

public interface JarolCoreInterface

The JarolCoreInterface should be implemented by the class that performs the control operations.
Depending on the architecture some methods need not to be implemented, e.g., signalNavigation() is only needed if your design requires that the navigation unit is activated at a deterministic point.

NOTE: The internal Jarol components are called interfaces, e.g., sensor interface, whereas the outside components are called units, e.g., navigation unit.

Version:
0.1
Author:
Bernhard Kast

Method Summary
 void awaitNavigation()
          Waits for a signal from the navigation interface that indicates that the control flow can continue.
 void awaitSensor()
          Waits for a signal from the sensor interface that indicates that the control flow can continue.
 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()
          Should be called in the run() method and contain a loop that calls all the necessary methods of JarolCoreInterface.
 void forwardToActuator(MessageInterface[] actuatorData)
          Fordwards the actuation data to the actuator interface.
 void forwardToNavigation(MessageInterface[] sensorData)
          Forwards sensorData to the navigation interface.
 void forwardToTerminal(MessageInterface[] dataBundle)
          Forwarding a dataBundle to the terminal, e.g.
 MessageInterface[] readFromNavigation()
          Reads navigation data from the navigation interface.
 MessageInterface[] readFromSensor()
          Reads data from the sensor interface.
 void signalActuator()
          Signals the actuator interface to continue.
 void signalNavigation()
          Signals the navigation interface.
 void signalTerminal()
          Signals the terminal interface to continue.
 

Method Detail

computeActuationData

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.

Parameters:
sensorData - data provided by the sensor interface
navigationData - data provided by the navigation interface
Returns:
computed actuation data - acutationData

controlLoop

void controlLoop()
Should be called in the run() method and contain a loop that calls all the necessary methods of JarolCoreInterface.


awaitSensor

void awaitSensor()
Waits for a signal from the sensor interface that indicates that the control flow can continue.


readFromSensor

MessageInterface[] readFromSensor()
Reads data from the sensor interface.

Returns:
sensor data

signalActuator

void signalActuator()
Signals the actuator interface to continue.


forwardToActuator

void forwardToActuator(MessageInterface[] actuatorData)
Fordwards the actuation data to the actuator interface.

Parameters:
actuatorData - actuation data

signalTerminal

void signalTerminal()
Signals the terminal interface to continue.


forwardToTerminal

void forwardToTerminal(MessageInterface[] dataBundle)
Forwarding a dataBundle to the terminal, e.g. sensorData, actuatorData, etc. depending on the architecture and the information that should be displayed/used at the terminal.


forwardToNavigation

void forwardToNavigation(MessageInterface[] sensorData)
Forwards sensorData to the navigation interface. NOTE: The sensorData may be null if the navigation unit is non-autonomous, e.g., steering with a joystick.

Parameters:
sensorData -

awaitNavigation

void awaitNavigation()
Waits for a signal from the navigation interface that indicates that the control flow can continue.


readFromNavigation

MessageInterface[] readFromNavigation()
Reads navigation data from the navigation interface.

Returns:
navigationData

signalNavigation

void signalNavigation()
Signals the navigation interface.