![]() |
Eclipse SUMO - Simulation of Urban MObility
|
This event-class is used to initialise a WAUT switch at a certain time. More...
#include <MSTLLogicControl.h>
Public Member Functions | |
| int & | getIndex () |
| Returns a reference to the index. | |
| const std::string & | getWAUTID () const |
| Returns the WAUT-id. | |
| virtual SUMOTime | shiftTime (SUMOTime, SUMOTime, SUMOTime) |
| Reschedule or deschedule the command when quick-loading state. | |
| SwitchInitCommand (MSTLLogicControl &p, const std::string &wautid, int index) | |
| Constructor. | |
| ~SwitchInitCommand () | |
| Destructor. | |
Derived from Command | |
| SUMOTime | execute (SUMOTime) |
| Begins a WAUT switch by executing the command. | |
Data Fields | |
| int | priority = 0 |
Protected Attributes | |
| int | myIndex |
| The current index within the WAUT switch table. | |
| MSTLLogicControl & | myParent |
| The control to call. | |
| std::string | myWAUTID |
| The id of the WAUT that shall switch. | |
Private Member Functions | |
| SwitchInitCommand & | operator= (const SwitchInitCommand &) |
| Invalidated assignment operator. | |
| SwitchInitCommand (const SwitchInitCommand &) | |
| Invalidated copy constructor. | |
This event-class is used to initialise a WAUT switch at a certain time.
This command is reused. The index of the WAUT-switch is incremented at each call to the control.
Definition at line 376 of file MSTLLogicControl.h.
|
inline |
Constructor.
| [in] | p | The logic control |
| [in] | wautid | The id of the WAUT |
| [in] | index | The first position within the WAUT table |
Definition at line 383 of file MSTLLogicControl.h.
References MSTLLogicControl::MSTLLogicControl(), myIndex, myParent, and myWAUTID.
Referenced by operator=(), and SwitchInitCommand().
|
inline |
Destructor.
Definition at line 388 of file MSTLLogicControl.h.
|
private |
Invalidated copy constructor.
References SwitchInitCommand().
Begins a WAUT switch by executing the command.
The parent's "initWautSwitch" method is called supporting this command as an argument. The result of "initWautSwitch" is returned.
"initWautSwitch" may throw an ProcessError if the program to switch to is not known.
| [in] | currentTime | The current simulation time (unused) |
| ProcessError | If the program to switch to does not exist |
Implements Command.
Definition at line 409 of file MSTLLogicControl.h.
References myParent.
|
inline |
Returns a reference to the index.
Definition at line 427 of file MSTLLogicControl.h.
References myIndex.
Referenced by MSTLLogicControl::initWautSwitch().
|
inline |
Returns the WAUT-id.
Definition at line 419 of file MSTLLogicControl.h.
References myWAUTID.
Referenced by MSTLLogicControl::initWautSwitch().
|
private |
Invalidated assignment operator.
References SwitchInitCommand().
Reschedule or deschedule the command when quick-loading state.
The implementations should return -1 if the command shall not be re-scheduled, or a value >= 0 that describe the new time at which the command shall be executed again.
| [in] | currentTime | The current simulation time |
| [in] | execTime | The time at which the command would have been executed |
| [in] | newTime | The simulation time at which the simulation is restarted |
Reimplemented in MSCalibrator::CalibratorCommand, and MSTrafficLightLogic::SwitchCommand.
|
protected |
The current index within the WAUT switch table.
Definition at line 440 of file MSTLLogicControl.h.
Referenced by getIndex(), and SwitchInitCommand().
|
protected |
The control to call.
Definition at line 434 of file MSTLLogicControl.h.
Referenced by execute(), and SwitchInitCommand().
|
protected |
The id of the WAUT that shall switch.
Definition at line 437 of file MSTLLogicControl.h.
Referenced by getWAUTID(), and SwitchInitCommand().
|
inherited |
Definition at line 87 of file Command.h.
Referenced by MSTransportableDevice_FCDReplay::MovePedestrians::MovePedestrians(), and MSTrafficLightLogic::SwitchCommand::SwitchCommand().