Eclipse SUMO - Simulation of Urban MObility
|
#include <NLDiscreteEventBuilder.h>
Public Types | |
enum | ActionType { EV_SAVETLSTATE , EV_SAVETLSWITCHES , EV_SAVETLSWITCHSTATES , EV_SAVETLSPROGRAM } |
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. | |
NLDiscreteEventBuilder (MSNet &net) | |
Constructor. | |
~NLDiscreteEventBuilder () | |
Destructor. | |
Protected Types | |
typedef std::map< std::string, ActionType > | KnownActions |
Definitions of a storage for build actions. | |
Protected Attributes | |
KnownActions | myActions |
Build actions that shall be executed during the simulation. | |
MSNet & | myNet |
Private Member Functions | |
void | buildSaveTLSProgramCommand (const SUMOSAXAttributes &attrs, const std::string &basePath) |
Builds an action which saves the tls states as a loadable program into a file. | |
void | buildSaveTLStateCommand (const SUMOSAXAttributes &attrs, const std::string &basePath) |
Builds an action which saves the state of a certain tls into a file. | |
void | buildSaveTLSwitchesCommand (const SUMOSAXAttributes &attrs, const std::string &basePath) |
Builds an action which saves the switch times of links into a file. | |
void | buildSaveTLSwitchStatesCommand (const SUMOSAXAttributes &attrs, const std::string &basePath) |
Builds an action which saves the switch times and states of tls into a file. | |
NLDiscreteEventBuilder & | operator= (const NLDiscreteEventBuilder &) |
This class is responsible for building event-handling actions which the simulation shall execute.
Definition at line 43 of file NLDiscreteEventBuilder.h.
|
protected |
Definitions of a storage for build actions.
Definition at line 84 of file NLDiscreteEventBuilder.h.
Known action types.
Enumerator | |
---|---|
EV_SAVETLSTATE | "SaveTLSStates" |
EV_SAVETLSWITCHES | "SaveTLSSwitchTimes" |
EV_SAVETLSWITCHSTATES | "SaveTLSSwitchStates" |
EV_SAVETLSPROGRAM | "SaveTLSProgram" |
Definition at line 46 of file NLDiscreteEventBuilder.h.
NLDiscreteEventBuilder::NLDiscreteEventBuilder | ( | MSNet & | net | ) |
Constructor.
Definition at line 43 of file NLDiscreteEventBuilder.cpp.
References EV_SAVETLSPROGRAM, EV_SAVETLSTATE, EV_SAVETLSWITCHES, EV_SAVETLSWITCHSTATES, and myActions.
NLDiscreteEventBuilder::~NLDiscreteEventBuilder | ( | ) |
Destructor.
Definition at line 52 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 56 of file NLDiscreteEventBuilder.cpp.
References buildSaveTLSProgramCommand(), buildSaveTLStateCommand(), buildSaveTLSwitchesCommand(), buildSaveTLSwitchStatesCommand(), EV_SAVETLSPROGRAM, EV_SAVETLSTATE, EV_SAVETLSWITCHES, EV_SAVETLSWITCHSTATES, SUMOSAXAttributes::getOpt(), myActions, and SUMO_ATTR_TYPE.
Referenced by NLHandler::myStartElement().
|
private |
Builds an action which saves the tls states as a loadable program into a file.
Definition at line 176 of file NLDiscreteEventBuilder.cpp.
References FileHelpers::checkForRelativity(), MSTLLogicControl::get(), MSTLLogicControl::getAllTLIds(), OutputDevice::getDevice(), SUMOSAXAttributes::getOpt(), MSNet::getTLSControl(), MSTLLogicControl::knows(), myNet, SUMO_ATTR_DEST, and SUMO_ATTR_SOURCE.
Referenced by addAction().
|
private |
Builds an action which saves the state of a certain tls into a file.
Definition at line 88 of file NLDiscreteEventBuilder.cpp.
References FileHelpers::checkForRelativity(), MSTLLogicControl::get(), MSTLLogicControl::getAllTLIds(), OutputDevice::getDevice(), SUMOSAXAttributes::getOpt(), MSNet::getTLSControl(), MSTLLogicControl::knows(), myNet, SUMO_ATTR_DEST, SUMO_ATTR_SAVE_CONDITIONS, SUMO_ATTR_SAVE_DETECTORS, and SUMO_ATTR_SOURCE.
Referenced by addAction().
|
private |
Builds an action which saves the switch times of links into a file.
Definition at line 120 of file NLDiscreteEventBuilder.cpp.
References FileHelpers::checkForRelativity(), MSTLLogicControl::get(), MSTLLogicControl::getAllTLIds(), OutputDevice::getDevice(), SUMOSAXAttributes::getOpt(), 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 148 of file NLDiscreteEventBuilder.cpp.
References FileHelpers::checkForRelativity(), MSTLLogicControl::get(), MSTLLogicControl::getAllTLIds(), OutputDevice::getDevice(), SUMOSAXAttributes::getOpt(), 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 87 of file NLDiscreteEventBuilder.h.
Referenced by addAction(), and NLDiscreteEventBuilder().
|
protected |
Definition at line 89 of file NLDiscreteEventBuilder.h.
Referenced by buildSaveTLSProgramCommand(), buildSaveTLStateCommand(), buildSaveTLSwitchesCommand(), and buildSaveTLSwitchStatesCommand().