SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSInstantInductLoop.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // An instantaneous induction loop
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11 // Copyright (C) 2011-2014 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef MSInstantInductLoop_h
22 #define MSInstantInductLoop_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
35 #include <deque>
36 #include <map>
37 #include <functional>
40 
41 
42 // ===========================================================================
43 // class declarations
44 // ===========================================================================
45 class MSLane;
46 class MSVehicle;
47 class OutputDevice;
48 
49 
50 // ===========================================================================
51 // class definitions
52 // ===========================================================================
61  : public MSMoveReminder, public MSDetectorFileOutput {
62 public:
71  MSInstantInductLoop(const std::string& id, OutputDevice& od,
72  MSLane* const lane, SUMOReal positionInMeters);
73 
74 
77 
78 
79 
82 
99  bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed);
100 
101 
116  bool notifyLeave(SUMOVehicle& veh, SUMOReal lastPos, MSMoveReminder::Notification reason);
118 
119 
120 
131  SUMOTime startTime, SUMOTime stopTime) {
132  UNUSED_PARAMETER(dev);
133  UNUSED_PARAMETER(startTime);
134  UNUSED_PARAMETER(stopTime);
135  }
136 
137 
146  void writeXMLDetectorProlog(OutputDevice& dev) const;
147 
148 
149 protected:
158  void write(const char* state, SUMOReal t, SUMOVehicle& veh, SUMOReal speed, const char* add = 0, SUMOReal addValue = -1);
159 
160 
161 protected:
164 
167 
170 
172  std::map<SUMOVehicle*, SUMOReal> myEntryTimes;
173 
174 private:
177 
180 
181 
182 };
183 
184 
185 #endif
186 
187 /****************************************************************************/
188