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 /****************************************************************************/
7 // An instantaneous induction loop
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
10 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef MSInstantInductLoop_h
21 #define MSInstantInductLoop_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <string>
34 #include <deque>
35 #include <map>
36 #include <functional>
39 
40 
41 // ===========================================================================
42 // class declarations
43 // ===========================================================================
44 class MSLane;
45 class MSVehicle;
46 class OutputDevice;
47 
48 
49 // ===========================================================================
50 // class definitions
51 // ===========================================================================
60  : public MSMoveReminder, public MSDetectorFileOutput {
61 public:
70  MSInstantInductLoop(const std::string& id, OutputDevice& od,
71  MSLane* const lane, SUMOReal positionInMeters);
72 
73 
76 
77 
78 
81 
98  bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed);
99 
100 
115  bool notifyLeave(SUMOVehicle& veh, SUMOReal lastPos, MSMoveReminder::Notification reason);
117 
118 
119 
130  SUMOTime startTime, SUMOTime stopTime) {
131  UNUSED_PARAMETER(dev);
132  UNUSED_PARAMETER(startTime);
133  UNUSED_PARAMETER(stopTime);
134  }
135 
136 
145  void writeXMLDetectorProlog(OutputDevice& dev) const;
146 
147 
148 protected:
157  void write(const char* state, SUMOReal t, SUMOVehicle& veh, SUMOReal speed, const char* add = 0, SUMOReal addValue = -1);
158 
159 
160 protected:
163 
166 
169 
171  std::map<SUMOVehicle*, SUMOReal> myEntryTimes;
172 
173 private:
176 
179 
180 
181 };
182 
183 
184 #endif
185 
186 /****************************************************************************/
187