![]() |
SUMO - Simulation of Urban MObility
|
Writes e2 state of a link for the time the link has yellow/red. More...
#include <Command_SaveTLCoupledLaneDet.h>
Public Member Functions | |
Command_SaveTLCoupledLaneDet (MSTLLogicControl::TLSLogicVariants &tlls, MSDetectorFileOutput *dtf, SUMOTime begin, OutputDevice &device, MSLink *link) | |
Constructor. More... | |
void | execute () |
Executes the command. More... | |
~Command_SaveTLCoupledLaneDet () | |
Destructor. More... | |
Protected Attributes | |
MSDetectorFileOutput * | myDetector |
The detector to use. More... | |
OutputDevice & | myDevice |
The file to write the output to. More... | |
const MSTLLogicControl::TLSLogicVariants & | myLogics |
The logic to use. More... | |
SUMOTime | myStartTime |
The last time the values were written. More... | |
Private Member Functions | |
Command_SaveTLCoupledLaneDet (const Command_SaveTLCoupledLaneDet &) | |
Invalidated copy constructor. More... | |
Command_SaveTLCoupledLaneDet & | operator= (const Command_SaveTLCoupledLaneDet &) |
Invalidated assignment operator. More... | |
Private Attributes | |
bool | myHadOne |
Whether the last link state was already saved. More... | |
LinkState | myLastState |
The state the link had the last time. More... | |
MSLink * | myLink |
The link to observe. More... | |
Writes e2 state of a link for the time the link has yellow/red.
Definition at line 47 of file Command_SaveTLCoupledLaneDet.h.
Command_SaveTLCoupledLaneDet::Command_SaveTLCoupledLaneDet | ( | MSTLLogicControl::TLSLogicVariants & | tlls, |
MSDetectorFileOutput * | dtf, | ||
SUMOTime | begin, | ||
OutputDevice & | device, | ||
MSLink * | link | ||
) |
Constructor.
[in] | tlls | The logic to observe |
[in] | dtf | The detector used to generate the values |
[in] | begin | The begin simulation time |
[in] | device | The output device to write the detector values into |
[in] | link | The link that shall be observed |
Definition at line 46 of file Command_SaveTLCoupledLaneDet.cpp.
References execute().
Command_SaveTLCoupledLaneDet::~Command_SaveTLCoupledLaneDet | ( | ) |
Destructor.
Definition at line 55 of file Command_SaveTLCoupledLaneDet.cpp.
|
private |
Invalidated copy constructor.
|
virtual |
Executes the command.
Called when an active tls program switches, this method checks whether the tls signal responsible for the link has switched to green. If so, the values collected so far are written using "writeXMLOutput". Otherwise, the values are reset.
Reimplemented from Command_SaveTLCoupledDet.
Definition at line 60 of file Command_SaveTLCoupledLaneDet.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), MSLink::getState(), LINKSTATE_TL_RED, Command_SaveTLCoupledDet::myDetector, Command_SaveTLCoupledDet::myDevice, myHadOne, myLastState, myLink, Command_SaveTLCoupledDet::myStartTime, MSDetectorFileOutput::reset(), and MSDetectorFileOutput::writeXMLOutput().
Referenced by Command_SaveTLCoupledLaneDet().
|
private |
Invalidated assignment operator.
|
protectedinherited |
The detector to use.
Definition at line 91 of file Command_SaveTLCoupledDet.h.
Referenced by execute(), and Command_SaveTLCoupledDet::execute().
|
protectedinherited |
The file to write the output to.
Definition at line 85 of file Command_SaveTLCoupledDet.h.
Referenced by execute(), and Command_SaveTLCoupledDet::execute().
|
private |
Whether the last link state was already saved.
Definition at line 87 of file Command_SaveTLCoupledLaneDet.h.
Referenced by execute().
|
private |
The state the link had the last time.
Definition at line 84 of file Command_SaveTLCoupledLaneDet.h.
Referenced by execute().
|
private |
The link to observe.
Definition at line 81 of file Command_SaveTLCoupledLaneDet.h.
Referenced by execute().
|
protectedinherited |
The logic to use.
Definition at line 88 of file Command_SaveTLCoupledDet.h.
|
protectedinherited |
The last time the values were written.
Definition at line 94 of file Command_SaveTLCoupledDet.h.
Referenced by execute(), and Command_SaveTLCoupledDet::execute().