javax.realtime.test.traffic
Class Intersection
java.lang.Object
javax.realtime.test.traffic.Intersection
- public class Intersection
- extends java.lang.Object
- Author:
- gary
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 |
nominalSectorTransitTime
public static RelativeTime nominalSectorTransitTime
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)
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