SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSDevice_Example.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // A device which stands as an implementation example and which outputs movereminder calls
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 MSDevice_Example_h
21 #define MSDevice_Example_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 "MSDevice.h"
34 #include <utils/common/SUMOTime.h>
35 
36 
37 // ===========================================================================
38 // class declarations
39 // ===========================================================================
40 class SUMOVehicle;
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
54 class MSDevice_Example : public MSDevice {
55 public:
59  static void insertOptions(OptionsCont& oc);
60 
61 
72  static void buildVehicleDevices(SUMOVehicle& v, std::vector<MSDevice*>& into);
73 
74 
75 public:
78 
79 
82 
92  bool notifyMove(SUMOVehicle& veh, SUMOReal oldPos,
93  SUMOReal newPos, SUMOReal newSpeed);
94 
95 
105 
106 
115  bool notifyLeave(SUMOVehicle& veh, SUMOReal lastPos,
118 
119 
126  void generateOutput() const;
127 
128 
129 private:
135  MSDevice_Example(SUMOVehicle& holder, const std::string& id, SUMOReal customValue1,
136  SUMOReal customValue2, SUMOReal customValue3);
137 
138 
139 private:
140  // private state members of the Example device
141 
148 
149 
150 private:
153 
156 
157 
158 };
159 
160 
161 #endif
162 
163 /****************************************************************************/
164