SUMO - Simulation of Urban MObility
Command_SaveTLSSwitchStates.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Writes the switch times of a tls into a file when the tls switches
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef Command_SaveTLSSwitchStates_h
22 #define Command_SaveTLSSwitchStates_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
35 #include <map>
36 #include <utils/common/Command.h>
38 
39 
40 // ===========================================================================
41 // class declarations
42 // ===========================================================================
44 class OutputDevice;
45 
46 
47 // ===========================================================================
48 // class definitions
49 // ===========================================================================
57 public:
64  OutputDevice& od);
65 
66 
69 
70 
73 
84  SUMOTime execute(SUMOTime currentTime);
86 
87 
88 private:
91 
94 
96  std::string myPreviousState;
97 
99  std::string myPreviousProgramID;
100 
101 
102 private:
105 
108 
109 };
110 
111 
112 #endif
113 
114 /****************************************************************************/
115 
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:61
SUMOTime execute(SUMOTime currentTime)
Writes the state of the tls if a change occured.
Command_SaveTLSSwitchStates(const MSTLLogicControl::TLSLogicVariants &logics, OutputDevice &od)
Constructor.
int SUMOTime
Definition: SUMOTime.h:43
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:71
OutputDevice & myOutputDevice
The device to write to.
Command_SaveTLSSwitchStates & operator=(const Command_SaveTLSSwitchStates &)
Invalidated assignment operator.