SUMO - Simulation of Urban MObility
|
#include <NLDiscreteEventBuilder.h>
Public Types | |
enum | ActionType { EV_SAVETLSTATE, EV_SAVETLSWITCHES, EV_SAVETLSWITCHSTATES } |
Known action types. More... | |
Public Member Functions | |
void | addAction (const SUMOSAXAttributes &attrs, const std::string &basePath) |
Builds an action and saves it for further use. More... | |
NLDiscreteEventBuilder (MSNet &net) | |
Constructor. More... | |
~NLDiscreteEventBuilder () | |
Destructor. More... | |
Protected Types | |
typedef std::map< std::string, ActionType > | KnownActions |
Definitions of a storage for build actions. More... | |
Protected Attributes | |
KnownActions | myActions |
Build actions that shall be executed during the simulation. More... | |
MSNet & | myNet |
Private Member Functions | |
void | buildSaveTLStateCommand (const SUMOSAXAttributes &attrs, const std::string &basePath) |
Builds an action which saves the state of a certain tls into a file. More... | |
void | buildSaveTLSwitchesCommand (const SUMOSAXAttributes &attrs, const std::string &basePath) |
Builds an action which saves the switch times of links into a file. More... | |
void | buildSaveTLSwitchStatesCommand (const SUMOSAXAttributes &attrs, const std::string &basePath) |
Builds an action which saves the switch times and states of tls into a file. More... | |
NLDiscreteEventBuilder & | operator= (const NLDiscreteEventBuilder &) |
This class is responsible for building event-handling actions which the simulation shall execute.
Definition at line 54 of file NLDiscreteEventBuilder.h.
|
protected |
Definitions of a storage for build actions.
Definition at line 90 of file NLDiscreteEventBuilder.h.
Known action types.
Enumerator | |
---|---|
EV_SAVETLSTATE |
"SaveTLSStates" |
EV_SAVETLSWITCHES |
"SaveTLSSwitchTimes" |
EV_SAVETLSWITCHSTATES |
"SaveTLSSwitchStates" |
Definition at line 57 of file NLDiscreteEventBuilder.h.
NLDiscreteEventBuilder::NLDiscreteEventBuilder | ( | MSNet & | net | ) |
Constructor.
Definition at line 55 of file NLDiscreteEventBuilder.cpp.
References EV_SAVETLSTATE, EV_SAVETLSWITCHES, EV_SAVETLSWITCHSTATES, and myActions.
NLDiscreteEventBuilder::~NLDiscreteEventBuilder | ( | ) |
Destructor.
Definition at line 63 of file NLDiscreteEventBuilder.cpp.
void NLDiscreteEventBuilder::addAction | ( | const SUMOSAXAttributes & | attrs, |
const std::string & | basePath | ||
) |
Builds an action and saves it for further use.
Definition at line 67 of file NLDiscreteEventBuilder.cpp.
References buildSaveTLStateCommand(), buildSaveTLSwitchesCommand(), buildSaveTLSwitchStatesCommand(), EV_SAVETLSTATE, EV_SAVETLSWITCHES, EV_SAVETLSWITCHSTATES, SUMOSAXAttributes::getOptStringReporting(), myActions, and SUMO_ATTR_TYPE.
Referenced by NLHandler::myStartElement().
|
private |
Builds an action which saves the state of a certain tls into a file.
Definition at line 96 of file NLDiscreteEventBuilder.cpp.
References MSTLLogicControl::get(), MSTLLogicControl::getAllTLIds(), OutputDevice::getDevice(), SUMOSAXAttributes::getOptStringReporting(), MSNet::getTLSControl(), MSTLLogicControl::knows(), myNet, SUMO_ATTR_DEST, and SUMO_ATTR_SOURCE.
Referenced by addAction().
|
private |
Builds an action which saves the switch times of links into a file.
Definition at line 124 of file NLDiscreteEventBuilder.cpp.
References MSTLLogicControl::get(), MSTLLogicControl::getAllTLIds(), OutputDevice::getDevice(), SUMOSAXAttributes::getOptStringReporting(), MSNet::getTLSControl(), MSTLLogicControl::knows(), myNet, SUMO_ATTR_DEST, and SUMO_ATTR_SOURCE.
Referenced by addAction().
|
private |
Builds an action which saves the switch times and states of tls into a file.
Definition at line 152 of file NLDiscreteEventBuilder.cpp.
References MSTLLogicControl::get(), MSTLLogicControl::getAllTLIds(), OutputDevice::getDevice(), SUMOSAXAttributes::getOptStringReporting(), MSNet::getTLSControl(), MSTLLogicControl::knows(), myNet, SUMO_ATTR_DEST, and SUMO_ATTR_SOURCE.
Referenced by addAction().
|
private |
|
protected |
Build actions that shall be executed during the simulation.
Definition at line 93 of file NLDiscreteEventBuilder.h.
Referenced by addAction(), and NLDiscreteEventBuilder().
|
protected |
Definition at line 95 of file NLDiscreteEventBuilder.h.
Referenced by buildSaveTLStateCommand(), buildSaveTLSwitchesCommand(), and buildSaveTLSwitchStatesCommand().