cdx
Class InputFrameHandler

java.lang.Object
  extended by javax.safetycritical.AbstractAsyncEventHandler
      extended by javax.safetycritical.AsyncEventHandler
          extended by javax.safetycritical.BoundAsyncEventHandler
              extended by javax.safetycritical.ManagedEventHandler
                  extended by javax.safetycritical.PeriodicEventHandler
                      extended by cdx.InputFrameHandler
All Implemented Interfaces:
java.lang.Runnable, javax.safetycritical.ManagedSchedulable, javax.safetycritical.Schedulable

public class InputFrameHandler
extends javax.safetycritical.PeriodicEventHandler

InputFrameHandler is a periodic handler that reads and stores radar frames as they arrive. It also updates the shared variable "state" for previous aircraft positions.


Field Summary
 CDxMission mission
          The current mission
 javax.safetycritical.AperiodicEvent reduce
          The event to release ReducerHandler
 
Constructor Summary
InputFrameHandler(CDxMission mission, javax.safetycritical.AperiodicEvent event)
          Constructor
 
Method Summary
 void handleEvent()
          Major method of a handler: store the previous frame to `state' and get a new frame.
 void StoreFrame(RawFrame frame)
          This method correspond to the StoreFrame action in the S anchor.
 void updateState()
          This method records the current positions of all aircrafts in the shared state variable of type StateTable.
 
Methods inherited from class javax.safetycritical.PeriodicEventHandler
register
 
Methods inherited from class javax.safetycritical.ManagedEventHandler
cleanup, getName
 
Methods inherited from class javax.safetycritical.AsyncEventHandler
handleAsyncEvent
 
Methods inherited from class javax.safetycritical.AbstractAsyncEventHandler
run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Field Detail

mission

public final CDxMission mission
The current mission


reduce

public final javax.safetycritical.AperiodicEvent reduce
The event to release ReducerHandler

Constructor Detail

InputFrameHandler

public InputFrameHandler(CDxMission mission,
                         javax.safetycritical.AperiodicEvent event)
Constructor

Parameters:
mission - the current mission
event - the event to release ReducerHandler
Method Detail

handleEvent

public void handleEvent()
Major method of a handler: store the previous frame to `state' and get a new frame. Finally it releases the ReducerHandler.


StoreFrame

public void StoreFrame(RawFrame frame)
This method correspond to the StoreFrame action in the S anchor.

Parameters:
frame - the new frame

updateState

public void updateState()
This method records the current positions of all aircrafts in the shared state variable of type StateTable.