37 : myOutputDevice(od), myLogics(logics) {
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
@ SUMO_ATTR_STATE
The state of a link.
@ SUMO_ATTR_TIME
trigger: the time of the step
std::string myPreviousState
Storage for prior state.
OutputDevice & myOutputDevice
The device to write to.
Command_SaveTLSSwitchStates(const MSTLLogicControl::TLSLogicVariants &logics, OutputDevice &od)
Constructor.
std::string myPreviousProgramID
Storage for prior sub-id.
~Command_SaveTLSSwitchStates()
Destructor.
const MSTLLogicControl::TLSLogicVariants & myLogics
The traffic light logic to use.
SUMOTime execute(SUMOTime currentTime)
Writes the state of the tls if a change occurred.
virtual void addEvent(Command *operation, SUMOTime execTimeStep=-1)
Adds an Event.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSEventControl * getEndOfTimestepEvents()
Returns the event control for events executed at the end of a time step.
const std::string & getName() const
const std::string & getState() const
Returns the state within this phase.
Storage for all programs of a single tls.
MSTrafficLightLogic * getActive() const
virtual const MSPhaseDefinition & getCurrentPhaseDef() const =0
Returns the definition of the current phase.
virtual int getCurrentPhaseIndex() const =0
Returns the current index within the program.
const std::string & getProgramID() const
Returns this tl-logic's id.
const std::string & getID() const
Returns the id.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
bool writeXMLHeader(const std::string &rootElement, const std::string &schemaFile, std::map< SumoXMLAttr, std::string > attrs=std::map< SumoXMLAttr, std::string >(), bool includeConfig=true)
Writes an XML header with optional configuration.