cdx
Class CDxMission

java.lang.Object
  extended by javax.safetycritical.Mission
      extended by cdx.CDxMission

public class CDxMission
extends javax.safetycritical.Mission

The single mission of the parallel CDx. The seven handlers of the mission are InputFrameHandler, ReducerHandler, DetectorHandler (four instances), and OutputCollisionsHandler.


Field Summary
 int collisions
          Records the number of collisions calculated by the detector handlers.
 DetectorControl control
          Control object used to orchestrate execution of the handlers.
 RawFrame currentFrame
          Records the current radar frame.
 StateTable state
          Records previous aircraft positions.
 Partition work
          Records a partition of the computational work as it is distributed between the parallel detection handlers.
 
Constructor Summary
CDxMission()
          Constructor
 
Method Summary
 int getColls()
          This method returns the cumulative number of collisions recorded.
 RawFrame getFrame()
          Method to get the current frame object.
 StateTable getState()
          Method to get the shared partition variable.
 Partition getWork()
          Method to get the shared work variable.
 void initColls()
          This method initialises the number of collisions by setting it to 0.
 void initialize()
          Initialization of the mission.
 long missionMemorySize()
          Return the default memory size for a mission
 void recColls(int n)
          This method records a partial collisions result as it is generated by the detection handlers.
 void setFrame(RawFrame frame)
          Method to set the current frame object.
 void setState(StateTable state)
          Method to set the state of previous frame.
 void setWork(Partition work)
          Method to set the shared work variable.
 
Methods inherited from class javax.safetycritical.Mission
cleanup, getCurrentMission, requestSequenceTermination, requestTermination, sequenceTerminationPending, terminationPending
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentFrame

public RawFrame currentFrame
Records the current radar frame.


state

public StateTable state
Records previous aircraft positions.


work

public Partition work
Records a partition of the computational work as it is distributed between the parallel detection handlers.


collisions

public int collisions
Records the number of collisions calculated by the detector handlers.


control

public DetectorControl control
Control object used to orchestrate execution of the handlers.

Constructor Detail

CDxMission

public CDxMission()
Constructor

Method Detail

initialize

public void initialize()
Initialization of the mission. All handlers are registered here

Specified by:
initialize in class javax.safetycritical.Mission

missionMemorySize

public long missionMemorySize()
Return the default memory size for a mission


getFrame

public RawFrame getFrame()
Method to get the current frame object.

Returns:
the current frame

setFrame

public void setFrame(RawFrame frame)
Method to set the current frame object.

Parameters:
frame - the new frame

getState

public StateTable getState()
Method to get the shared partition variable.

Returns:
the state variable (the previous positions of aircraft)

setState

public void setState(StateTable state)
Method to set the state of previous frame.

Parameters:
state - the state of previous frame

getWork

public Partition getWork()
Method to get the shared work variable.


setWork

public void setWork(Partition work)
Method to set the shared work variable.


initColls

public void initColls()
This method initialises the number of collisions by setting it to 0.


recColls

public void recColls(int n)
This method records a partial collisions result as it is generated by the detection handlers.

Parameters:
n - Number of collisions to be recorded.

getColls

public int getColls()
This method returns the cumulative number of collisions recorded.