SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSDevice_Tripinfo.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // A device which collects info on the vehicle trip
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
11 // Copyright (C) 2001-2012 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 MSDevice_Tripinfo_h
22 #define MSDevice_Tripinfo_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 "MSDevice.h"
35 #include <utils/common/SUMOTime.h>
36 
37 // ===========================================================================
38 // class declarations
39 // ===========================================================================
40 class SUMOVehicle;
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
53 class MSDevice_Tripinfo : public MSDevice {
54 public:
65  static void buildVehicleDevices(SUMOVehicle& v, std::vector<MSDevice*> &into) ;
66 
67 
68 public:
71 
81  bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos,
82  SUMOReal newPos, SUMOReal newSpeed) ;
83 
84 
94 
95 
104  bool notifyLeave(SUMOVehicle& veh, SUMOReal lastPos,
107 
108 
115  void generateOutput() const;
116 
117 
120 
121 
122 private:
128  MSDevice_Tripinfo(SUMOVehicle& holder, const std::string& id) ;
129 
130 
131 private:
132 
133  std::string myDepartLane;
136  unsigned int myWaitingSteps;
138  std::string myArrivalLane;
141 
142 private:
145 
148 
149 
150 };
151 
152 
153 #endif
154 
155 /****************************************************************************/
156