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.sourceforge.net/
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);
116 
117 
133 
134 
135 
146  SUMOTime startTime, SUMOTime stopTime) {
147  UNUSED_PARAMETER(dev);
148  UNUSED_PARAMETER(startTime);
149  UNUSED_PARAMETER(stopTime);
150  }
151 
152 
161  void writeXMLDetectorProlog(OutputDevice& dev) const;
162 
163 
164 protected:
173  void write(const char* state, SUMOReal t, SUMOVehicle& veh, SUMOReal speed, const char* add = 0, SUMOReal addValue = -1);
174 
175 
176 protected:
179 
182 
185 
187  std::map<SUMOVehicle*, SUMOReal> myEntryTimes;
188 
189 private:
192 
195 
196 
197 };
198 
199 
200 #endif
201 
202 /****************************************************************************/
203