javax.realtime.test.traffic
Class Intersection

java.lang.Object
  extended byjavax.realtime.test.traffic.Intersection

public class Intersection
extends java.lang.Object

Author:
gary

Field Summary
static RelativeTime nominalSectorTransitTime
           
 
Constructor Summary
Intersection(int priorityCeiling, int cycles, boolean signalPriorityInversion)
           
Intersection(java.lang.String resourceType, int cycles, boolean signalPriorityInversion)
          Note PriorityCeiling option is handled by a separate constructor
 
Method Summary
 void enter(java.lang.String directionHeaded, java.lang.String turn)
           
 RelativeTime timeInSector(Car car)
          Time it taks this car to transit an entire sector, at current speed -- as determined by priority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nominalSectorTransitTime

public static RelativeTime nominalSectorTransitTime
Constructor Detail

Intersection

public Intersection(java.lang.String resourceType,
                    int cycles,
                    boolean signalPriorityInversion)
Note PriorityCeiling option is handled by a separate constructor

Parameters:
resourceType -

Intersection

public Intersection(int priorityCeiling,
                    int cycles,
                    boolean signalPriorityInversion)
Method Detail

enter

public void enter(java.lang.String directionHeaded,
                  java.lang.String turn)
           throws java.lang.InterruptedException,
                  ThreadTerminatedException
Throws:
java.lang.InterruptedException
ThreadTerminatedException

timeInSector

public RelativeTime timeInSector(Car car)
Time it taks this car to transit an entire sector, at current speed -- as determined by priority

Parameters:
car - The Car crossing the sector
Returns:
the transit time for this car through a sector