|
|||||||||||
| 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.SwitchBlockTrafficLight
This class implements the BlockTrafficLights that guards the switch
(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_RED
RED sensor |
static int |
SENSOR_RELEASE
RELEASE sensor |
static int |
SENSOR_REQUEST
REQUEST 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 |
| 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 | |
SwitchBlockTrafficLight(java.lang.String name,
TrackInterface track,
double progression,
VirtualBlock virtualBlock,
double visibleDistance,
double distanceRequest,
double distanceRed,
nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator,
double dx,
double dy)
|
|
| Method Summary | |
void |
addSensors(TrackInterface track,
double progression,
int sensor,
java.lang.String line,
nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator)
Add sensors according to the line. |
protected void |
changeState(java.lang.String newState)
|
javax.media.j3d.Bounds |
getBounds()
|
java.lang.String |
getCurrentState()
|
double |
getDistanceRed()
|
double |
getDistanceRelease()
|
double |
getDistanceRequest()
|
nl.tudelft.simulation.language.d3.DirectedPoint |
getLocation()
|
java.lang.String |
getName()
|
VehiclePhysicalInterface |
getRequestingVehicle()
|
java.lang.String |
getStatus()
|
VirtualBlock |
getVirtualBlock()
|
void |
pass(VehiclePhysicalInterface vehicle)
This method handles actions of the controlPoint when the controlPoint is passed by a vehicle. |
void |
setCurrentState(java.lang.String state)
|
void |
setDistanceRelease(double distanceRelease)
sets the distanceRelease. |
void |
setRequestingVehicle(VehiclePhysicalInterface requestingVehicle)
|
java.lang.String |
toString()
|
void |
triggerSensor(int sensor,
VehiclePhysicalInterface vehicle)
|
| 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_RED
public static final java.lang.String STATE_BLACK
public static final int SENSOR_REQUEST
public static final int SENSOR_RED
public static final int SENSOR_RELEASE
public static final java.lang.String[] sensorNames
| Constructor Detail |
public SwitchBlockTrafficLight(java.lang.String name,
TrackInterface track,
double progression,
VirtualBlock virtualBlock,
double visibleDistance,
double distanceRequest,
double distanceRed,
nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator,
double dx,
double dy)
name - track - progression - virtualBlock - visibleDistance - distanceRequest - distanceRed - simulator - dx - dy - | Method Detail |
public void addSensors(TrackInterface track,
double progression,
int sensor,
java.lang.String line,
nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator)
track - progression - sensor - line - simulator -
public void triggerSensor(int sensor,
VehiclePhysicalInterface vehicle)
sensor - vehicle - protected void changeState(java.lang.String newState)
newState - 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 void setCurrentState(java.lang.String state)
state - public java.lang.String getStatus()
getStatus in interface ChangeableChangeable.getStatus()public java.lang.String toString()
Object.toString()public VirtualBlock getVirtualBlock()
public double getDistanceRed()
public double getDistanceRelease()
public void setDistanceRelease(double distanceRelease)
distanceRelease - distance after the SwitchBlockTrafficLight that
the block will be releasedpublic double getDistanceRequest()
public java.lang.String getName()
public VehiclePhysicalInterface getRequestingVehicle()
public void setRequestingVehicle(VehiclePhysicalInterface requestingVehicle)
requestingVehicle - The requestingVehicle to set.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||