SUMO - Simulation of Urban MObility
Command_SaveTLSSwitchStates.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // Writes the switch times of a tls into a file when the tls switches
19 /****************************************************************************/
20 #ifndef Command_SaveTLSSwitchStates_h
21 #define Command_SaveTLSSwitchStates_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <string>
34 #include <map>
35 #include <utils/common/Command.h>
37 
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
43 class OutputDevice;
44 
45 
46 // ===========================================================================
47 // class definitions
48 // ===========================================================================
56 public:
63  OutputDevice& od);
64 
65 
68 
69 
72 
83  SUMOTime execute(SUMOTime currentTime);
85 
86 
87 private:
90 
93 
95  std::string myPreviousState;
96 
98  std::string myPreviousProgramID;
99 
100 
101 private:
104 
107 
108 };
109 
110 
111 #endif
112 
113 /****************************************************************************/
114 
std::string myPreviousState
Storage for prior state.
Storage for all programs of a single tls.
const MSTLLogicControl::TLSLogicVariants & myLogics
The traffic light logic to use.
Writes the switch times of a tls into a file when the tls switches.
Base (microsim) event class.
Definition: Command.h:60
SUMOTime execute(SUMOTime currentTime)
Writes the state of the tls if a change occured.
Command_SaveTLSSwitchStates(const MSTLLogicControl::TLSLogicVariants &logics, OutputDevice &od)
Constructor.
The parent class for traffic light logics.
std::string myPreviousProgramID
Storage for prior sub-id.
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
long long int SUMOTime
Definition: TraCIDefs.h:51
OutputDevice & myOutputDevice
The device to write to.
Command_SaveTLSSwitchStates & operator=(const Command_SaveTLSSwitchStates &)
Invalidated assignment operator.