 |
Eclipse SUMO - Simulation of Urban MObility
|
Command_SaveTLSProgram(const MSTLLogicControl::TLSLogicVariants &logics, OutputDevice &od)
Constructor.
virtual void addEvent(Command *operation, SUMOTime execTimeStep=-1)
Adds an Event.
Static storage of an output device and its base (abstract) implementation.
const std::string & getProgramID() const
Returns this tl-logic's id.
SUMOTime execute(SUMOTime currentTime)
Writes the state of the tls if a change occurred.
std::string myTLSID
Storage for the tls ID (needed in destructor)
const MSTLLogicControl::TLSLogicVariants & myLogics
The traffic light logic to use.
a single phase description
std::string myPreviousProgramID
Storage for prior sub-id.
MSTrafficLightLogic * getActive() const
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
MSEventControl * getEndOfTimestepEvents()
Returns the event control for events executed at the end of a time step.
const std::string & getState() const
Returns the state within this phase.
~Command_SaveTLSProgram()
Destructor.
void writeCurrent()
Write the current program.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
std::vector< MSPhaseDefinition > myPreviousStates
Storage for prior state.
Storage for all programs of a single tls.
OutputDevice & myOutputDevice
The device to write to.
bool writeXMLHeader(const std::string &rootElement, const std::string &schemaFile, std::map< SumoXMLAttr, std::string > attrs=std::map< SumoXMLAttr, std::string >())
Writes an XML header with optional configuration.
The definition of a single phase of a tls logic.
const std::string & getID() const
Returns the id.
virtual const MSPhaseDefinition & getCurrentPhaseDef() const =0
Returns the definition of the current phase.
OutputDevice & writePadding(const std::string &val)
writes padding (ignored for binary output)