78 if (p.getName() !=
"") {
@ SUMO_TAG_PHASE
a single phase description
@ SUMO_TAG_TLLOGIC
a traffic light logic
@ SUMO_ATTR_STATE
The state of a link.
SUMOTime execute(SUMOTime currentTime)
Writes the state of the tls if a change occurred.
std::vector< MSPhaseDefinition > myPreviousStates
Storage for prior state.
Command_SaveTLSProgram(const MSTLLogicControl::TLSLogicVariants &logics, OutputDevice &od)
Constructor.
const MSTLLogicControl::TLSLogicVariants & myLogics
The traffic light logic to use.
void writeCurrent()
Write the current program.
std::string myTLSID
Storage for the tls ID (needed in destructor)
~Command_SaveTLSProgram()
Destructor.
std::string myPreviousProgramID
Storage for prior sub-id.
OutputDevice & myOutputDevice
The device to write to.
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.
The definition of a single phase of a tls logic.
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.
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 & writePadding(const std::string &val)
writes padding (ignored for binary output)
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.