|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.tudelft.simulation.event.EventProducer
nl.tudelft.simulation.traffic.controlpoint.real.AbstractVisibleControlPoint
nl.tudelft.simulation.traffic.controlpoint.blocks.SingleTrackBlockTrafficLight
(c) copyright 2003-2004 Delft
University of Technology , the Netherlands.
See for project information
www.simulation.tudelft.nl
License of use: General Public
License (GPL) , no warranty
| Field Summary | |
static int |
SENSOR_GREEN
GREEN sensor |
static int |
SENSOR_RED
RED sensor |
static int |
SENSOR_YELLOW
YELLOW sensor |
static java.lang.String[] |
sensorNames
sensor names |
static java.lang.String |
STATE_BLACK
BLACK state |
static java.lang.String |
STATE_GREEN
GREEN state |
static java.lang.String |
STATE_RED
RED state |
static java.lang.String |
STATE_YELLOW
YELLOW state |
| Fields inherited from class nl.tudelft.simulation.traffic.controlpoint.real.AbstractVisibleControlPoint |
progression, track |
| Fields inherited from class nl.tudelft.simulation.event.EventProducer |
listeners |
| Fields inherited from interface nl.tudelft.simulation.traffic.controlpoint.real.StopSignInterface |
CONTINUE, STOP |
| Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface |
FIRST_POSITION, LAST_POSITION |
| Fields inherited from interface nl.tudelft.simulation.traffic.controlpoint.ControlPointInterface |
BACK, FRONT |
| Fields inherited from interface nl.tudelft.simulation.traffic.controlpoint.real.Changeable |
CHANGE_STATUS_EVENT |
| Constructor Summary | |
SingleTrackBlockTrafficLight(java.lang.String name,
double progression,
double visibleDistance,
TrackInterface track,
double distanceRed,
double distanceYellow,
double distanceGreen,
nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator,
double dx,
double dy)
|
|
| Method Summary | |
javax.media.j3d.Bounds |
getBounds()
|
java.lang.String |
getCurrentState()
|
nl.tudelft.simulation.language.d3.DirectedPoint |
getLocation()
|
java.lang.String |
getStatus()
|
void |
pass(VehiclePhysicalInterface vehicle)
This method handles actions of the controlPoint when the controlPoint is passed by a vehicle. |
java.lang.String |
toString()
|
void |
triggerSensor(int sensor,
VehiclePhysicalInterface vehicle)
The stateful handling of a sensor trigger. |
| Methods inherited from class nl.tudelft.simulation.traffic.controlpoint.real.AbstractVisibleControlPoint |
getProgression, getTrack, getVisibleDistance |
| Methods inherited from class nl.tudelft.simulation.event.EventProducer |
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface nl.tudelft.simulation.event.EventProducerInterface |
addListener, addListener, addListener, addListener, getEventTypes, removeListener |
| Methods inherited from interface nl.tudelft.simulation.traffic.controlpoint.real.VisibleControlPointInterface |
getVisibleDistance |
| Methods inherited from interface nl.tudelft.simulation.traffic.controlpoint.ControlPointInterface |
getProgression, getTrack |
| Field Detail |
public static final java.lang.String STATE_GREEN
public static final java.lang.String STATE_YELLOW
public static final java.lang.String STATE_RED
public static final java.lang.String STATE_BLACK
public static final int SENSOR_GREEN
public static final int SENSOR_YELLOW
public static final int SENSOR_RED
public static final java.lang.String[] sensorNames
| Constructor Detail |
public SingleTrackBlockTrafficLight(java.lang.String name,
double progression,
double visibleDistance,
TrackInterface track,
double distanceRed,
double distanceYellow,
double distanceGreen,
nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator,
double dx,
double dy)
throws java.lang.Exception
name - progression - visibleDistance - track - distanceRed - distanceYellow - distanceGreen - simulator - dx - dy -
java.lang.Exception| Method Detail |
public void triggerSensor(int sensor,
VehiclePhysicalInterface vehicle)
-------------------------------
| OLD___ | SENSOR___ | NEW___ |
| STATE_ | R | Y | G | STATE_ |
-------------------------------
| BLACK_ | X | X | X | BLACK_ | (error)
-------------------------------
| RED___ | X | . | . | BLACK_ | (error)
| RED___ | . | X | . | YELLOW |
| RED___ | . | . | X | RED___ |
-------------------------------
| YELLOW | X | . | . | RED___ |
| YELLOW | . | X | . | BLACK_ | (error)
| YELLOW | . | . | X | GREEN_ |
-------------------------------
| GREEN_ | X | . | . | RED___ |
| GREEN_ | . | X | . | BLACK_ | (error)
| GREEN_ | . | . | X | BLACK_ | (error)
-------------------------------
sensor - vehicle - public void pass(VehiclePhysicalInterface vehicle)
ControlPointInterface
pass in interface ControlPointInterfacevehicle - that triggers the controlPointControlPointInterface.pass(nl.tudelft.simulation.traffic.vehicle.VehiclePhysicalInterface)
public nl.tudelft.simulation.language.d3.DirectedPoint getLocation()
throws java.rmi.RemoteException
getLocation in interface nl.tudelft.simulation.dsol.animation.LocatableInterfacegetLocation in class AbstractVisibleControlPointjava.rmi.RemoteExceptionLocatableInterface.getLocation()
public javax.media.j3d.Bounds getBounds()
throws java.rmi.RemoteException
getBounds in interface nl.tudelft.simulation.dsol.animation.LocatableInterfacegetBounds in class AbstractVisibleControlPointjava.rmi.RemoteExceptionLocatableInterface.getBounds()public java.lang.String getCurrentState()
public java.lang.String getStatus()
getStatus in interface ChangeableChangeable.getStatus()public java.lang.String toString()
Object.toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||