cdx
Class OutputCollisionsHandler

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.AperiodicEventHandler
                      extended by cdx.OutputCollisionsHandler
All Implemented Interfaces:
java.lang.Runnable, javax.safetycritical.ManagedSchedulable, javax.safetycritical.Schedulable

public class OutputCollisionsHandler
extends javax.safetycritical.AperiodicEventHandler

OutputCollisionsHandler outputs the number of detected collisions to an external device. For the purpose of the simulation, we merely print it on the screen.


Field Summary
 CDxMission mission
          The current mission
 
Constructor Summary
OutputCollisionsHandler(CDxMission mission, javax.safetycritical.AperiodicEvent event_bound)
          Constructor
 
Method Summary
 void handleEvent()
          Update the number of collisions in the mission.
 
Methods inherited from class javax.safetycritical.AperiodicEventHandler
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

Constructor Detail

OutputCollisionsHandler

public OutputCollisionsHandler(CDxMission mission,
                               javax.safetycritical.AperiodicEvent event_bound)
Constructor

Parameters:
mission - the current mission
event_bound - the event to release this handler
Method Detail

handleEvent

public void handleEvent()
Update the number of collisions in the mission.