SUMO - Simulation of Urban MObility
Command_SaveTLCoupledDet Class Reference

Writes e2 state on each tls switch. More...

#include <Command_SaveTLCoupledDet.h>

Inheritance diagram for Command_SaveTLCoupledDet:
MSTLLogicControl::OnSwitchAction Command_SaveTLCoupledLaneDet

Public Member Functions

 Command_SaveTLCoupledDet (MSTLLogicControl::TLSLogicVariants &tlls, MSDetectorFileOutput *dtf, unsigned int begin, OutputDevice &device)
 Constructor.
virtual void execute ()
 Executes the command.
virtual ~Command_SaveTLCoupledDet ()
 Destructor.

Protected Attributes

MSDetectorFileOutputmyDetector
 The detector to use.
OutputDevicemyDevice
 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_SaveTLCoupledDetoperator= (const Command_SaveTLCoupledDet &)
 Invalidated assignment operator.

Detailed Description

Writes e2 state on each tls switch.

Todo:
Problem: The detector may not save the last state (on simulation end)

Definition at line 57 of file Command_SaveTLCoupledDet.h.


Constructor & Destructor Documentation

Constructor.

Parameters:
[in]tllsThe logic to observe
[in]dtfThe detector used to generate the values
[in]beginThe begin simulation time
[in]deviceThe output device to write the detector values into

Definition at line 49 of file Command_SaveTLCoupledDet.cpp.

References MSTLLogicControl::TLSLogicVariants::addSwitchCommand(), and MSDetectorFileOutput::writeXMLDetectorProlog().

Destructor.

Definition at line 58 of file Command_SaveTLCoupledDet.cpp.

Invalidated copy constructor.


Member Function Documentation

Executes the command.

Called when an active tls program switches, this method calls "writeXMLOutput" of its detector (e2; the values are resetted there).

See also:
MSDetectorFileOutput::writeXMLOutput
MSE2Collector::writeXMLOutput

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().

Command_SaveTLCoupledDet& Command_SaveTLCoupledDet::operator= ( const Command_SaveTLCoupledDet ) [private]

Invalidated assignment operator.


Field Documentation

The detector to use.

Definition at line 93 of file Command_SaveTLCoupledDet.h.

Referenced by Command_SaveTLCoupledLaneDet::execute(), and execute().

The file to write the output to.

Definition at line 87 of file Command_SaveTLCoupledDet.h.

Referenced by Command_SaveTLCoupledLaneDet::execute(), and execute().

The logic to use.

Definition at line 90 of file Command_SaveTLCoupledDet.h.

The last time the values were written.

Definition at line 96 of file Command_SaveTLCoupledDet.h.

Referenced by Command_SaveTLCoupledLaneDet::execute(), and execute().


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines