#include <Command_SaveTLCoupledDet.h>

Definition at line 55 of file Command_SaveTLCoupledDet.h.
Public Member Functions | |
| Command_SaveTLCoupledDet (MSTLLogicControl::TLSLogicVariants &tlls, MSDetectorFileOutput *dtf, unsigned int begin, OutputDevice &device) throw () | |
| Constructor. | |
| virtual void | execute () throw () |
| Executes the command. | |
| virtual | ~Command_SaveTLCoupledDet () throw () |
| Destructor. | |
Protected Attributes | |
| MSDetectorFileOutput * | myDetector |
| The detector to use. | |
| OutputDevice & | myDevice |
| The file to write the output to. | |
| const MSTLLogicControl::TLSLogicVariants & | myLogics |
| The logic to use. | |
| SUMOTime | myStartTime |
| The last time the values were written. | |
Private Member Functions | |
| Command_SaveTLCoupledDet (const Command_SaveTLCoupledDet &) | |
| Invalidated copy constructor. | |
| Command_SaveTLCoupledDet & | operator= (const Command_SaveTLCoupledDet &) |
| Invalidated assignment operator. | |
| Command_SaveTLCoupledDet::Command_SaveTLCoupledDet | ( | MSTLLogicControl::TLSLogicVariants & | tlls, | |
| MSDetectorFileOutput * | dtf, | |||
| unsigned int | begin, | |||
| OutputDevice & | device | |||
| ) | throw () |
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 |
Definition at line 47 of file Command_SaveTLCoupledDet.cpp.
00051 : myDevice(device), myLogics(tlls), myDetector(dtf), 00052 myStartTime(begin) { 00053 tlls.addSwitchCommand(this); 00054 dtf->writeXMLDetectorProlog(device); 00055 }
| Command_SaveTLCoupledDet::~Command_SaveTLCoupledDet | ( | ) | throw () [virtual] |
| Command_SaveTLCoupledDet::Command_SaveTLCoupledDet | ( | const Command_SaveTLCoupledDet & | ) | [private] |
Invalidated copy constructor.
| void Command_SaveTLCoupledDet::execute | ( | ) | throw () [virtual] |
Executes the command.
Called when an active tls program switches, this method calls "writeXMLOutput" of its detector (e2; the values are resetted there).
Implements MSTLLogicControl::OnSwitchAction.
Reimplemented in Command_SaveTLCoupledLaneDet.
Definition at line 63 of file Command_SaveTLCoupledDet.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), myDetector, myDevice, myStartTime, and MSDetectorFileOutput::writeXMLOutput().
00063 { 00064 SUMOTime end = MSNet::getInstance()->getCurrentTimeStep(); 00065 if (myStartTime!=end) { 00066 myDetector->writeXMLOutput(myDevice, myStartTime, end); 00067 myStartTime = end; 00068 } 00069 }
| Command_SaveTLCoupledDet& Command_SaveTLCoupledDet::operator= | ( | const Command_SaveTLCoupledDet & | ) | [private] |
Invalidated assignment operator.
MSDetectorFileOutput* Command_SaveTLCoupledDet::myDetector [protected] |
The detector to use.
Definition at line 91 of file Command_SaveTLCoupledDet.h.
Referenced by Command_SaveTLCoupledLaneDet::execute(), and execute().
OutputDevice& Command_SaveTLCoupledDet::myDevice [protected] |
The file to write the output to.
Definition at line 85 of file Command_SaveTLCoupledDet.h.
Referenced by Command_SaveTLCoupledLaneDet::execute(), and execute().
const MSTLLogicControl::TLSLogicVariants& Command_SaveTLCoupledDet::myLogics [protected] |
SUMOTime Command_SaveTLCoupledDet::myStartTime [protected] |
The last time the values were written.
Definition at line 94 of file Command_SaveTLCoupledDet.h.
Referenced by Command_SaveTLCoupledLaneDet::execute(), and execute().
1.5.6