com.azalient.api.sim.detection
Interface IDetectorEvent


public interface IDetectorEvent

A detector event is created when a vehicle occupies or unoccupies a loop detector. It records the time of the event, to the nearest millisecond, and the direction of the event, up or down.


Field Summary
static IDetectorEvent[] ZERO
          A static zero-length array, created for convenience, and to save memory
 
Method Summary
 ILoopOccupier loopOccupier()
          The loop-occupier, normally a vehicle that caused the detector event.
 int ms()
          The (integer) milliseconds of the event.
 double t()
          The time in seconds of the event, where 0.0 = 00:00:00.
 boolean up()
          Returns true if this was a loop-occupy event, or false if it was a loop-unoccupy event.
 

Field Detail

ZERO

static final IDetectorEvent[] ZERO
A static zero-length array, created for convenience, and to save memory

Method Detail

loopOccupier

ILoopOccupier loopOccupier()
The loop-occupier, normally a vehicle that caused the detector event.


up

boolean up()
Returns true if this was a loop-occupy event, or false if it was a loop-unoccupy event.

That is, specifies the direction of the event where:


ms

int ms()
The (integer) milliseconds of the event. If the event was fired at 2345.678, then this method will return 678


t

double t()
The time in seconds of the event, where 0.0 = 00:00:00.

For example, an event at 08:05:32.345 would return

             t = (8 * 3600) + (5 * 60)  +(32.345)  =  29132.345