Eclipse SUMO - Simulation of Urban MObility
GUITrafficLightLogicWrapper.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
17 // A wrapper for tl-logics to allow their visualisation and interaction
18 /****************************************************************************/
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <cassert>
27 #include <utils/geom/GeomHelper.h>
32 #include <utils/gui/div/GLHelper.h>
36 #include <microsim/MSLane.h>
44 #include <gui/GUIGlobals.h>
46 #include "GUINet.h"
48 
49 
50 // ===========================================================================
51 // FOX callback mapping
52 // ===========================================================================
60 };
61 
62 // Object implementation
64 
65 
66 // ===========================================================================
67 // method definitions
68 // ===========================================================================
69 /* -------------------------------------------------------------------------
70  * GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu - methods
71  * ----------------------------------------------------------------------- */
73  GUIMainWindow& app, GUISUMOAbstractView& parent,
74  GUIGlObject& o)
75  : GUIGLObjectPopupMenu(app, parent, o) {}
76 
77 
79 
80 
81 
82 long
84  FXObject*, FXSelector, void*) {
85  assert(myObject->getType() == GLO_TLLOGIC);
86  static_cast<GUITrafficLightLogicWrapper*>(myObject)->begin2TrackPhases();
87  return 1;
88 }
89 
90 
91 long
93  FXObject*, FXSelector, void*) {
94  assert(myObject->getType() == GLO_TLLOGIC);
95  static_cast<GUITrafficLightLogicWrapper*>(myObject)->showPhases();
96  return 1;
97 }
98 
99 long
101  FXObject*, FXSelector, void*) {
102  assert(myObject->getType() == GLO_TLLOGIC);
103  GUITrafficLightLogicWrapper* w = static_cast<GUITrafficLightLogicWrapper*>(myObject);
104  MSActuatedTrafficLightLogic* act = dynamic_cast<MSActuatedTrafficLightLogic*>(&w->getTLLogic());
105  assert(act != 0);
106  act->setShowDetectors(!act->showDetectors());
107  return 1;
108 }
109 
110 long
112  FXObject*, FXSelector /*sel*/, void*) {
113  assert(myObject->getType() == GLO_TLLOGIC);
114  static_cast<GUITrafficLightLogicWrapper*>(myObject)->switchTLSLogic(-1);
115  return 1;
116 }
117 
118 
119 long
121  FXObject*, FXSelector sel, void*) {
122  assert(myObject->getType() == GLO_TLLOGIC);
123  static_cast<GUITrafficLightLogicWrapper*>(myObject)->switchTLSLogic(FXSELID(sel) - MID_SWITCH);
124  return 1;
125 }
126 
127 
128 
129 /* -------------------------------------------------------------------------
130  * GUITrafficLightLogicWrapper - methods
131  * ----------------------------------------------------------------------- */
133  MSTLLogicControl& control, MSTrafficLightLogic& tll) :
134  GUIGlObject(GLO_TLLOGIC, tll.getID()),
135  myTLLogicControl(control), myTLLogic(tll) {}
136 
137 
139 
140 
143  GUISUMOAbstractView& parent) {
144  myApp = &app;
145  GUIGLObjectPopupMenu* ret = new GUITrafficLightLogicWrapperPopupMenu(app, parent, *this);
146  buildPopupHeader(ret, app);
148  //
150  std::vector<MSTrafficLightLogic*> logics = vars.getAllLogics();
151  if (logics.size() > 1) {
152  std::vector<MSTrafficLightLogic*>::const_iterator i;
153  int index = 0;
154  for (i = logics.begin(); i != logics.end(); ++i, ++index) {
155  if (!vars.isActive(*i)) {
156  new FXMenuCommand(ret, ("Switch to '" + (*i)->getProgramID() + "'").c_str(),
157  GUIIconSubSys::getIcon(ICON_FLAG_MINUS), ret, (FXSelector)(MID_SWITCH + index));
158  }
159  }
160  new FXMenuSeparator(ret);
161  }
162  new FXMenuCommand(ret, "Switch off", GUIIconSubSys::getIcon(ICON_FLAG_MINUS), ret, MID_SWITCH_OFF);
163  new FXMenuCommand(ret, "Track Phases", nullptr, ret, MID_TRACKPHASES);
164  new FXMenuCommand(ret, "Show Phases", nullptr, ret, MID_SHOWPHASES);
165  MSActuatedTrafficLightLogic* act = dynamic_cast<MSActuatedTrafficLightLogic*>(&myTLLogic);
166  if (act != nullptr) {
167  new FXMenuCommand(ret, act->showDetectors() ? "Hide Detectors" : "Show Detectors", nullptr, ret, MID_SHOW_DETECTORS);
168  }
169  new FXMenuSeparator(ret);
173  new FXMenuCommand(ret, ("phase: " + toString(tll->getCurrentPhaseIndex())).c_str(), nullptr, nullptr, 0);
174  const std::string& name = tll->getCurrentPhaseDef().getName();
175  if (name != "") {
176  new FXMenuCommand(ret, ("phase name: " + name).c_str(), nullptr, nullptr, 0);
177  }
178  new FXMenuSeparator(ret);
179  buildShowParamsPopupEntry(ret, false);
180  buildPositionCopyEntry(ret, false);
181  return ret;
182 }
183 
184 
185 void
189  new FuncBinding_StringParam<MSTLLogicControl, std::pair<SUMOTime, MSPhaseDefinition> >
191  window->create();
192  window->show();
193 }
194 
195 
196 void
200  static_cast<MSSimpleTrafficLightLogic&>(myTLLogic).getPhases());
201  window->setBeginTime(0);
202  window->create();
203  window->show();
204 }
205 
206 
211  new GUIParameterTableWindow(app, *this, 9 + (int)myTLLogic.getParametersMap().size());
212  ret->mkItem("tlLogic [id]", false, myTLLogic.getID());
213  ret->mkItem("program", false, myTLLogic.getProgramID());
220  // close building
221  ret->closeBuilding(&myTLLogic);
222  return ret;
223 }
224 
225 
226 Boundary
228  Boundary ret;
230  for (MSTrafficLightLogic::LaneVectorVector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
231  const MSTrafficLightLogic::LaneVector& lanes2 = (*i);
232  for (MSTrafficLightLogic::LaneVector::const_iterator j = lanes2.begin(); j != lanes2.end(); ++j) {
233  ret.add((*j)->getShape()[-1]);
234  }
235  }
236  ret.grow(20);
237  return ret;
238 }
239 
240 
241 void
243  if (to == -1) {
246  } else {
248  std::vector<MSTrafficLightLogic*> logics = vars.getAllLogics();
249  myTLLogicControl.switchTo(myTLLogic.getID(), logics[to]->getProgramID());
250  }
251 }
252 
253 
254 int
256  return myTLLogic.getLinkIndex(link);
257 }
258 
259 
260 void
262  if (s.gaming) {
263  if (!MSNet::getInstance()->getTLSControl().isActive(&myTLLogic)) {
264  return;
265  };
266  const std::string& curState = myTLLogic.getCurrentPhaseDef().getState();
267  if (curState.find_first_of("gG") == std::string::npos) {
268  // no link is 'green' at the moment. find those that turn green next
270  int curPhaseIdx = myTLLogic.getCurrentPhaseIndex();
271  int phaseIdx = (curPhaseIdx + 1) % phases.size();
272  std::vector<int> nextGreen;
273  while (phaseIdx != curPhaseIdx) {
274  const std::string& state = phases[phaseIdx]->getState();
275  for (int linkIdx = 0; linkIdx < (int)state.size(); linkIdx++) {
276  if ((LinkState)state[linkIdx] == LINKSTATE_TL_GREEN_MINOR ||
277  (LinkState)state[linkIdx] == LINKSTATE_TL_GREEN_MAJOR) {
278  nextGreen.push_back(linkIdx);
279  }
280  }
281  if (nextGreen.size() > 0) {
282  break;
283  }
284  phaseIdx = (phaseIdx + 1) % phases.size();
285  }
286  // highlight nextGreen links
287  for (std::vector<int>::iterator it_idx = nextGreen.begin(); it_idx != nextGreen.end(); it_idx++) {
288  const MSTrafficLightLogic::LaneVector& lanes = myTLLogic.getLanesAt(*it_idx);
289  for (MSTrafficLightLogic::LaneVector::const_iterator it_lane = lanes.begin(); it_lane != lanes.end(); it_lane++) {
290  glPushMatrix();
291  // split circle in red and yellow
292  Position pos = (*it_lane)->getShape().back();
293  glTranslated(pos.x(), pos.y(), GLO_MAX);
294  double rot = RAD2DEG((*it_lane)->getShape().angleAt2D((int)(*it_lane)->getShape().size() - 2)) - 90;
295  glRotated(rot, 0, 0, 1);
297  GLHelper::drawFilledCircle((*it_lane)->getWidth() / 2., 8, -90, 90);
299  GLHelper::drawFilledCircle((*it_lane)->getWidth() / 2., 8, 90, 270);
300  glPopMatrix();
301  }
302  }
303  }
304  }
305 }
306 
310 }
311 
312 int
315 }
316 
317 std::string
320 }
321 
322 int
324  return (int)STEPS2TIME(getActiveTLLogic()->getCurrentPhaseDef().duration);
325 }
326 
327 int
329  return (int)STEPS2TIME(getActiveTLLogic()->getCurrentPhaseDef().minDuration);
330 }
331 
332 int
334  return (int)STEPS2TIME(getActiveTLLogic()->getCurrentPhaseDef().maxDuration);
335 }
336 
337 int
339  return (int)(SIMTIME - STEPS2TIME(getActiveTLLogic()->getCurrentPhaseDef().myLastSwitch));
340 }
341 
342 
343 /****************************************************************************/
344 
MSTLLogicControl::getPhaseDef
std::pair< SUMOTime, MSPhaseDefinition > getPhaseDef(const std::string &tlid) const
return the complete phase definition for a named traffic lights logic
Definition: MSTLLogicControl.cpp:839
GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLSLogic
long onCmdSwitchTLSLogic(FXObject *, FXSelector, void *)
Definition: GUITrafficLightLogicWrapper.cpp:120
MID_SHOWPHASES
Definition: GUIAppEnum.h:402
GLO_MAX
empty max
Definition: GUIGlObjectTypes.h:165
GUIGlObject.h
MSTrafficLightLogic::getPhases
virtual const Phases & getPhases() const =0
Returns the phases of this tls program.
GUITrafficLightLogicWrapper::begin2TrackPhases
void begin2TrackPhases()
Builds a GUITLLogicPhasesTrackerWindow which will receive new phases.
Definition: GUITrafficLightLogicWrapper.cpp:186
GUIParameterTableWindow
A window containing a gl-object's parameter.
Definition: GUIParameterTableWindow.h:62
MID_SWITCH
Definition: GUIAppEnum.h:401
GUISUMOAbstractView
Definition: GUISUMOAbstractView.h:72
MSTLLogicControl.h
GUIParameterTableWindow.h
GUITrafficLightLogicWrapper::getCurrentDuration
int getCurrentDuration() const
Definition: GUITrafficLightLogicWrapper.cpp:323
GUITrafficLightLogicWrapper::getCurrentPhaseName
std::string getCurrentPhaseName() const
Definition: GUITrafficLightLogicWrapper.cpp:318
GUITrafficLightLogicWrapper::myApp
GUIMainWindow * myApp
The main application.
Definition: GUITrafficLightLogicWrapper.h:163
MSTrafficLightLogic::getProgramID
const std::string & getProgramID() const
Returns this tl-logic's id.
Definition: MSTrafficLightLogic.h:174
FuncBinding_StringParam.h
GUINet::getGUIInstance
static GUINet * getGUIInstance()
Returns the pointer to the unique instance of GUINet (singleton).
Definition: GUINet.cpp:515
GUIGlObject::buildSelectionPopupEntry
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
Definition: GUIGlObject.cpp:235
GUITLLogicPhasesTrackerWindow
This window displays a phase diagram for a chosen tl-logic.
Definition: GUITLLogicPhasesTrackerWindow.h:63
MSTrafficLightLogic::Phases
std::vector< MSPhaseDefinition * > Phases
Definition of a list of phases, being the junction logic.
Definition: MSTrafficLightLogic.h:61
GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapper
GUITrafficLightLogicWrapper(MSTLLogicControl &control, MSTrafficLightLogic &tll)
Constructor.
Definition: GUITrafficLightLogicWrapper.cpp:132
GUIGLObjectPopupMenu.h
GUIGlobalSelection.h
MSActuatedTrafficLightLogic.h
GUITrafficLightLogicWrapper::getCenteringBoundary
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GUITrafficLightLogicWrapper.cpp:227
GUITLLogicPhasesTrackerWindow::create
void create()
Creates the window (FOX-Toolkit)
Definition: GUITLLogicPhasesTrackerWindow.cpp:223
MSTrafficLightLogic::getCurrentPhaseIndex
virtual int getCurrentPhaseIndex() const =0
Returns the current index within the program.
LINKSTATE_TL_GREEN_MINOR
The link has green light, has to brake.
Definition: SUMOXMLDefinitions.h:1141
RAD2DEG
#define RAD2DEG(x)
Definition: GeomHelper.h:38
GLHelper.h
LINKSTATE_TL_GREEN_MAJOR
The link has green light, may pass.
Definition: SUMOXMLDefinitions.h:1139
GUITrafficLightLogicWrapper::getLinkIndex
int getLinkIndex(const MSLink *const link) const
Returns the index of the given link within the according tls.
Definition: GUITrafficLightLogicWrapper.cpp:255
GUINet.h
GUIGLObjectPopupMenu
The popup menu of a globject.
Definition: GUIGLObjectPopupMenu.h:47
GUIIconSubSys::getIcon
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Definition: GUIIconSubSys.cpp:609
GLHelper::setColor
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition: GLHelper.cpp:621
FunctionBindingString
Definition: FunctionBinding.h:82
GUIParameterTableWindow::closeBuilding
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
Definition: GUIParameterTableWindow.cpp:219
MSTLLogicControl::getActive
MSTrafficLightLogic * getActive(const std::string &id) const
Returns the active program of a named tls.
Definition: MSTLLogicControl.cpp:663
GUITrafficLightLogicWrapper::getRunningDuration
int getRunningDuration() const
Definition: GUITrafficLightLogicWrapper.cpp:338
GUIAppEnum.h
MID_SWITCH_OFF
Show TLS phases - popup entry.
Definition: GUIAppEnum.h:400
MSTrafficLightLogic.h
GLO_TLLOGIC
a tl-logic
Definition: GUIGlObjectTypes.h:56
GLHelper::drawFilledCircle
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
Definition: GLHelper.cpp:348
GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu
Definition: GUITrafficLightLogicWrapper.h:129
LinkState
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic,...
Definition: SUMOXMLDefinitions.h:1137
MSTrafficLightLogic::LaneVector
std::vector< MSLane * > LaneVector
Definition of the list of arrival lanes subjected to this tls.
Definition: MSTrafficLightLogic.h:70
MSTLLogicControl::TLSLogicVariants::getAllLogics
std::vector< MSTrafficLightLogic * > getAllLogics() const
Definition: MSTLLogicControl.cpp:183
Parameterised::getParametersMap
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
Definition: Parameterised.cpp:106
SIMTIME
#define SIMTIME
Definition: SUMOTime.h:63
GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdShowDetectors
long onCmdShowDetectors(FXObject *, FXSelector, void *)
Definition: GUITrafficLightLogicWrapper.cpp:100
MSTLLogicControl::get
TLSLogicVariants & get(const std::string &id) const
Returns the variants of a named tls.
Definition: MSTLLogicControl.cpp:589
GUITrafficLightLogicWrapper::getPopUpMenu
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
Definition: GUITrafficLightLogicWrapper.cpp:142
GUIGlObject::buildNameCopyPopupEntry
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
Definition: GUIGlObject.cpp:225
MSPhaseDefinition::getState
const std::string & getState() const
Returns the state within this phase.
Definition: MSPhaseDefinition.h:199
GUITLLogicPhasesTrackerWindow.h
GUIParameterTableWindow::mkItem
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
Definition: GUIParameterTableWindow.h:108
GUIGlobals.h
STEPS2TIME
#define STEPS2TIME(x)
Definition: SUMOTime.h:56
MID_SHOW_DETECTORS
show/hide actuation detectors
Definition: GUIAppEnum.h:406
Boundary
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:41
GUITrafficLightLogicWrapper.h
GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLS2Off
long onCmdSwitchTLS2Off(FXObject *, FXSelector, void *)
Definition: GUITrafficLightLogicWrapper.cpp:111
GUIApplicationWindow.h
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
Position::x
double x() const
Returns the x-position.
Definition: Position.h:56
Boundary::add
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Definition: Boundary.cpp:78
MSActuatedTrafficLightLogic
An actuated (adaptive) traffic light logic.
Definition: MSActuatedTrafficLightLogic.h:50
MSTrafficLightLogic::getLinkIndex
int getLinkIndex(const MSLink *const link) const
Returns the index of the given link.
Definition: MSTrafficLightLogic.cpp:264
MSTrafficLightLogic
The parent class for traffic light logics.
Definition: MSTrafficLightLogic.h:55
MSTLLogicControl::TLSLogicVariants::isActive
bool isActive(const MSTrafficLightLogic *tl) const
Definition: MSTLLogicControl.cpp:194
GUIGlObject
Definition: GUIGlObject.h:65
MSActuatedTrafficLightLogic::showDetectors
bool showDetectors() const
Definition: MSActuatedTrafficLightLogic.h:95
GUIGlObject::buildPopupHeader
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
Definition: GUIGlObject.cpp:207
MSTrafficLightLogic::getLaneVectors
const LaneVectorVector & getLaneVectors() const
Returns the list of lists of all lanes controlled by this tls.
Definition: MSTrafficLightLogic.h:182
GUIVisualizationSettings::getLinkColor
static const RGBColor & getLinkColor(const LinkState &ls)
map from LinkState to color constants
Definition: GUIVisualizationSettings.cpp:1608
GUIIconSubSys.h
GLIncludes.h
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
MSActuatedTrafficLightLogic::setShowDetectors
void setShowDetectors(bool show)
Definition: MSActuatedTrafficLightLogic.cpp:627
MSTLLogicControl::switchTo
void switchTo(const std::string &id, const std::string &programID)
Switches the named (id) tls to the named (programID) program.
Definition: MSTLLogicControl.cpp:673
GLObjectValuePassConnector.h
FunctionBinding.h
MSNet::getInstance
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:167
GUIMainWindow
Definition: GUIMainWindow.h:46
Position::y
double y() const
Returns the y-position.
Definition: Position.h:61
GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdShowPhases
long onCmdShowPhases(FXObject *, FXSelector, void *)
Called if the phases shall be shown.
Definition: GUITrafficLightLogicWrapper.cpp:92
LINKSTATE_TL_YELLOW_MAJOR
The link has yellow light, may pass.
Definition: SUMOXMLDefinitions.h:1147
GUITrafficLightLogicWrapper::getCurrentMaxDur
int getCurrentMaxDur() const
Definition: GUITrafficLightLogicWrapper.cpp:333
GUITrafficLightLogicWrapper::drawGL
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUITrafficLightLogicWrapper.cpp:261
GUITrafficLightLogicWrapper
Definition: GUITrafficLightLogicWrapper.h:47
GUIGlObject::buildShowParamsPopupEntry
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
Definition: GUIGlObject.cpp:248
MID_TRACKPHASES
Begin to track phases - menu entry.
Definition: GUIAppEnum.h:404
GUIGlObject::buildCenterPopupEntry
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
Definition: GUIGlObject.cpp:216
GUIGlObject::buildPositionCopyEntry
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used,...
Definition: GUIGlObject.cpp:266
GUITrafficLightLogicWrapper::~GUITrafficLightLogicWrapper
~GUITrafficLightLogicWrapper()
Destructor.
Definition: GUITrafficLightLogicWrapper.cpp:138
GUITrafficLightLogicWrapper::myTLLogic
MSTrafficLightLogic & myTLLogic
The wrapped tl-logic.
Definition: GUITrafficLightLogicWrapper.h:160
MSTLLogicControl::TLSLogicVariants
Storage for all programs of a single tls.
Definition: MSTLLogicControl.h:85
MSTrafficLightLogic::LaneVectorVector
std::vector< LaneVector > LaneVectorVector
Definition of a list that holds lists of lanes that do have the same attribute.
Definition: MSTrafficLightLogic.h:73
GUITrafficLightLogicWrapper::getParameterWindow
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GUITrafficLightLogicWrapper.cpp:208
config.h
GUITrafficLightLogicWrapper::getCurrentPhase
int getCurrentPhase() const
Definition: GUITrafficLightLogicWrapper.cpp:313
GeomHelper.h
Boundary::grow
Boundary & grow(double by)
extends the boundary by the given amount
Definition: Boundary.cpp:300
MSTLLogicControl
A class that stores and controls tls and switching of their programs.
Definition: MSTLLogicControl.h:59
LINKSTATE_TL_RED
The link has red light (must brake)
Definition: SUMOXMLDefinitions.h:1143
GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow
GUITLLogicPhasesTrackerWindow()
protected constructor for FOX
Definition: GUITLLogicPhasesTrackerWindow.h:242
MSLane.h
ICON_FLAG_MINUS
Definition: GUIIcons.h:127
GUITLLogicPhasesTrackerWindow::setBeginTime
void setBeginTime(SUMOTime time)
Sets the time the display shall be shown as beginning at.
Definition: GUITLLogicPhasesTrackerWindow.cpp:492
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:345
FunctionBinding
Definition: FunctionBinding.h:40
GUINet::createTLWrapper
void createTLWrapper(MSTrafficLightLogic *tll) override
creates a wrapper for the given logic
Definition: GUINet.cpp:148
GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdBegin2TrackPhases
long onCmdBegin2TrackPhases(FXObject *, FXSelector, void *)
Called if the phases shall be begun to track.
Definition: GUITrafficLightLogicWrapper.cpp:83
FXDEFMAP
FXDEFMAP(GUIDialog_AppSettings) GUIDialog_AppSettingsMap[]
GUITrafficLightLogicWrapperPopupMenuMap
GUITrafficLightLogicWrapperPopupMenuMap[]
Definition: GUITrafficLightLogicWrapper.cpp:54
GUIVisualizationSettings::gaming
bool gaming
whether the application is in gaming mode or not
Definition: GUIVisualizationSettings.h:635
Named::getID
const std::string & getID() const
Returns the id.
Definition: Named.h:76
GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::~GUITrafficLightLogicWrapperPopupMenu
~GUITrafficLightLogicWrapperPopupMenu()
Destructor.
Definition: GUITrafficLightLogicWrapper.cpp:78
GUITrafficLightLogicWrapper::getActiveTLLogic
MSTrafficLightLogic * getActiveTLLogic() const
Definition: GUITrafficLightLogicWrapper.cpp:308
FuncBinding_StringParam
Definition: FuncBinding_StringParam.h:36
MSTrafficLightLogic::getCurrentPhaseDef
virtual const MSPhaseDefinition & getCurrentPhaseDef() const =0
Returns the definition of the current phase.
GUITrafficLightLogicWrapper::showPhases
void showPhases()
Builds a GUITLLogicPhasesTrackerWindow which displays the phase diagram.
Definition: GUITrafficLightLogicWrapper.cpp:197
GUITrafficLightLogicWrapper::switchTLSLogic
void switchTLSLogic(int to)
Builds a GUITLLogicPhasesTrackerWindow which displays the phase diagram.
Definition: GUITrafficLightLogicWrapper.cpp:242
GUITrafficLightLogicWrapper::myTLLogicControl
MSTLLogicControl & myTLLogicControl
Reference to the according tls.
Definition: GUITrafficLightLogicWrapper.h:157
GUITrafficLightLogicWrapper::getCurrentMinDur
int getCurrentMinDur() const
Definition: GUITrafficLightLogicWrapper.cpp:328
MSTrafficLightLogic::getLanesAt
const LaneVector & getLanesAt(int i) const
Returns the list of lanes that are controlled by the signals at the given position.
Definition: MSTrafficLightLogic.h:191
MSPhaseDefinition::getName
const std::string & getName() const
Definition: MSPhaseDefinition.h:215