SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Command_SaveTLSState Class Reference

Writes the state of the tls to a file (in each second) More...

#include <Command_SaveTLSState.h>

Inheritance diagram for Command_SaveTLSState:
Command

Public Member Functions

 Command_SaveTLSState (const MSTLLogicControl::TLSLogicVariants &logics, OutputDevice &od)
 Constructor.
 ~Command_SaveTLSState ()
 Destructor.
Derived from Command
SUMOTime execute (SUMOTime currentTime)
 Writes the current state of the tls.

Private Member Functions

 Command_SaveTLSState (const Command_SaveTLSState &)
 Invalidated copy constructor.
Command_SaveTLSStateoperator= (const Command_SaveTLSState &)
 Invalidated assignment operator.

Private Attributes

const
MSTLLogicControl::TLSLogicVariants
myLogics
 The traffic light logic to use.
OutputDevicemyOutputDevice
 The device to write to.

Detailed Description

Writes the state of the tls to a file (in each second)

Definition at line 54 of file Command_SaveTLSState.h.


Constructor & Destructor Documentation

Command_SaveTLSState::Command_SaveTLSState ( const MSTLLogicControl::TLSLogicVariants logics,
OutputDevice od 
)

Constructor.

Parameters:
[in]tllsThe logic to write state of
[in]odThe output device to write the state into

Definition at line 46 of file Command_SaveTLSState.cpp.

References MSEventControl::ADAPT_AFTER_EXECUTION, MSEventControl::addEvent(), MSNet::getEndOfTimestepEvents(), MSNet::getInstance(), myOutputDevice, and OutputDevice::writeXMLHeader().

Command_SaveTLSState::~Command_SaveTLSState ( )

Destructor.

Definition at line 54 of file Command_SaveTLSState.cpp.

Command_SaveTLSState::Command_SaveTLSState ( const Command_SaveTLSState )
private

Invalidated copy constructor.


Member Function Documentation

SUMOTime Command_SaveTLSState::execute ( SUMOTime  currentTime)
virtual

Writes the current state of the tls.

Returns always 1.

Parameters:
[in]currentTimeThe current simulation time (unused)
Returns:
Always DELTA_T (will be executed in next time step)
See also:
Command

Implements Command.

Definition at line 59 of file Command_SaveTLSState.cpp.

References DELTA_T, MSTLLogicControl::TLSLogicVariants::getActive(), MSTrafficLightLogic::getCurrentPhaseDef(), MSTrafficLightLogic::getCurrentPhaseIndex(), MSTrafficLightLogic::getID(), MSTrafficLightLogic::getProgramID(), MSPhaseDefinition::getState(), myLogics, myOutputDevice, and time2string().

Command_SaveTLSState& Command_SaveTLSState::operator= ( const Command_SaveTLSState )
private

Invalidated assignment operator.


Field Documentation

const MSTLLogicControl::TLSLogicVariants& Command_SaveTLSState::myLogics
private

The traffic light logic to use.

Definition at line 89 of file Command_SaveTLSState.h.

Referenced by execute().

OutputDevice& Command_SaveTLSState::myOutputDevice
private

The device to write to.

Definition at line 86 of file Command_SaveTLSState.h.

Referenced by Command_SaveTLSState(), and execute().


The documentation for this class was generated from the following files: