|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavax.safetycritical.AbstractAsyncEventHandler
javax.safetycritical.AsyncEventHandler
javax.safetycritical.BoundAsyncEventHandler
javax.safetycritical.ManagedEventHandler
javax.safetycritical.AperiodicEventHandler
cdx.DetectorHandler
public class DetectorHandler
DetectorHandler instances carry out the actual collisions detection. Each DetectorHandler takes in a list of lists of motions, each set contains the motions that span cross a same voxel. The collisions detection carried out here considers the Z axis, and also updates the collisions number recorded in the CDxMission. If this DetectorHanndler has finished, it updates its state in DetectorControl.
| Field Summary | |
|---|---|
DetectorControl |
control
To get the control of DetectorControl. |
int |
id
The Identity of this DetectorHandler. |
CDxMission |
mission
To get the control of the current mission. |
| Constructor Summary | |
|---|---|
DetectorHandler(CDxMission mission,
DetectorControl control,
int id,
javax.safetycritical.AperiodicEvent event_bound)
Constructor |
|
| Method Summary | |
|---|---|
int |
CalcPartCollisions()
Method to get the allocated list of lists of motions by its ID, and detect collisions |
int |
determineCollisions(List motions)
Compute the number of collisions for a List of Motion objects. |
void |
handleEvent()
Major actions happen within handlerEvent() including calculation, updation of the number of collisions, and notification to DetectorControl. |
| 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 |
|---|
public final CDxMission mission
public final DetectorControl control
public final int id
| Constructor Detail |
|---|
public DetectorHandler(CDxMission mission,
DetectorControl control,
int id,
javax.safetycritical.AperiodicEvent event_bound)
mission - the current missioncontrol - the control of DectectoControlid - the assigned IDevent_bound - the event to release this DetectorHandler| Method Detail |
|---|
public void handleEvent()
public int CalcPartCollisions()
public int determineCollisions(List motions)
motions - the list of motions to be checked
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||