![]() |
SUMO - Simulation of Urban MObility
|
Class realising the switch between the traffic light phases. More...
#include <MSTrafficLightLogic.h>


Public Member Functions | |
| void | deschedule (MSTrafficLightLogic *tlLogic) |
| Marks this swicth as invalid (if the phase duration has changed, f.e.) More... | |
| SUMOTime | execute (SUMOTime currentTime) |
| Executes the regarded junction's "trySwitch"- method. More... | |
| SUMOTime | getNextSwitchTime () const |
| Returns the assumed next switch time. More... | |
| SwitchCommand (MSTLLogicControl &tlcontrol, MSTrafficLightLogic *tlLogic, SUMOTime nextSwitch) | |
| Constructor. More... | |
| ~SwitchCommand () | |
| Destructor. More... | |
Private Member Functions | |
| SwitchCommand & | operator= (const SwitchCommand &) |
| Invalidated assignment operator. More... | |
| SwitchCommand (const SwitchCommand &) | |
| Invalidated copy constructor. More... | |
Private Attributes | |
| bool | myAmValid |
| Information whether this switch command is still valid. More... | |
| SUMOTime | myAssumedNextSwitch |
| Assumed switch time (may change in case of adaptive traffic lights) More... | |
| MSTLLogicControl & | myTLControl |
| The responsible traffic lights control. More... | |
| MSTrafficLightLogic * | myTLLogic |
| The logic to be executed on a switch. More... | |
Class realising the switch between the traffic light phases.
Definition at line 345 of file MSTrafficLightLogic.h.
| MSTrafficLightLogic::SwitchCommand::SwitchCommand | ( | MSTLLogicControl & | tlcontrol, |
| MSTrafficLightLogic * | tlLogic, | ||
| SUMOTime | nextSwitch | ||
| ) |
Constructor.
| [in] | tlcontrol | The responsible traffic lights control |
| [in] | tlLogic | The controlled tls logic |
| [in] | duration | Duration till next switch |
Definition at line 59 of file MSTrafficLightLogic.cpp.
| MSTrafficLightLogic::SwitchCommand::~SwitchCommand | ( | ) |
Destructor.
Definition at line 65 of file MSTrafficLightLogic.cpp.
|
private |
Invalidated copy constructor.
| void MSTrafficLightLogic::SwitchCommand::deschedule | ( | MSTrafficLightLogic * | tlLogic | ) |
Marks this swicth as invalid (if the phase duration has changed, f.e.)
| [in] | tlLogic | The controlled tls logic |
Definition at line 96 of file MSTrafficLightLogic.cpp.
References myAmValid, myAssumedNextSwitch, and myTLLogic.
Referenced by MSPhasedTrafficLightLogic::changeStepAndDuration(), and MSSimpleTrafficLightLogic::changeStepAndDuration().
Executes the regarded junction's "trySwitch"- method.
| [in] | currentTime | The current simulation time |
Implements Command.
Definition at line 70 of file MSTrafficLightLogic.cpp.
References MSTLLogicControl::TLSLogicVariants::executeOnSwitchActions(), MSTLLogicControl::get(), MSTrafficLightLogic::getCurrentPhaseIndex(), Named::getID(), MSTLLogicControl::isActive(), myAmValid, myAssumedNextSwitch, myTLControl, myTLLogic, MSTrafficLightLogic::setTrafficLightSignals(), and MSTrafficLightLogic::trySwitch().
|
inline |
Returns the assumed next switch time.
Definition at line 375 of file MSTrafficLightLogic.h.
References myAssumedNextSwitch.
Referenced by MSTrafficLightLogic::getNextSwitchTime().
|
private |
Invalidated assignment operator.
|
private |
Information whether this switch command is still valid.
Definition at line 391 of file MSTrafficLightLogic.h.
Referenced by deschedule(), and execute().
|
private |
Assumed switch time (may change in case of adaptive traffic lights)
Definition at line 388 of file MSTrafficLightLogic.h.
Referenced by deschedule(), execute(), and getNextSwitchTime().
|
private |
The responsible traffic lights control.
Definition at line 382 of file MSTrafficLightLogic.h.
Referenced by execute().
|
private |
The logic to be executed on a switch.
Definition at line 385 of file MSTrafficLightLogic.h.
Referenced by deschedule(), and execute().