SUMO - Simulation of Urban MObility
MSDevice_FCD.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2013-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // A device which records floating car data
17 /****************************************************************************/
18 #ifndef MSDevice_FCD_h
19 #define MSDevice_FCD_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include "MSVehicleDevice.h"
28 #include <utils/common/SUMOTime.h>
29 
30 
31 // ===========================================================================
32 // class declarations
33 // ===========================================================================
34 class SUMOVehicle;
35 
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
48 class MSDevice_FCD : public MSVehicleDevice {
49 public:
53  static void insertOptions(OptionsCont& oc);
54 
55 
66  static void buildVehicleDevices(SUMOVehicle& v, std::vector<MSVehicleDevice*>& into);
67 
68 public:
70  ~MSDevice_FCD();
71 
72  bool notifyEnter(SUMOVehicle& /*veh*/, MSMoveReminder::Notification /*reason*/, const MSLane* /*enteredLane*/) {
73  return false;
74  }
75 
76  void saveState(OutputDevice& /* out */) const {
77  }
78 
80  const std::string deviceName() const {
81  return "fcd";
82  }
83 
84  static const std::set<const MSEdge*>& getEdgeFilter() {
85  return myEdgeFilter;
86  }
87 
89  static void cleanup();
90 
91 private:
97  MSDevice_FCD(SUMOVehicle& holder, const std::string& id);
98 
99 
101  static std::set<const MSEdge*> myEdgeFilter;
103 
105  static void initEdgeFilter();
106 
107 private:
109  MSDevice_FCD(const MSDevice_FCD&);
110 
113 
114 
115 };
116 
117 
118 #endif
119 
120 /****************************************************************************/
121 
static const std::set< const MSEdge * > & getEdgeFilter()
Definition: MSDevice_FCD.h:84
MSDevice_FCD & operator=(const MSDevice_FCD &)
Invalidated assignment operator.
static void cleanup()
resets the edge filter
const std::string deviceName() const
return the name for this type of device
Definition: MSDevice_FCD.h:80
Notification
Definition of a vehicle state.
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_FCD-options.
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice *> &into)
Build devices for the given vehicle, if needed.
static std::set< const MSEdge * > myEdgeFilter
spatial filter for FCD output
Definition: MSDevice_FCD.h:101
Representation of a vehicle.
Definition: SUMOVehicle.h:60
~MSDevice_FCD()
Destructor.
void saveState(OutputDevice &) const
Saves the state of the device.
Definition: MSDevice_FCD.h:76
static bool myEdgeFilterInitialized
Definition: MSDevice_FCD.h:102
bool notifyEnter(SUMOVehicle &, MSMoveReminder::Notification, const MSLane *)
Checks whether the reminder is activated by a vehicle entering the lane.
Definition: MSDevice_FCD.h:72
MSDevice_FCD(SUMOVehicle &holder, const std::string &id)
Constructor.
A device which collects info on the vehicle trip (mainly on departure and arrival) ...
Definition: MSDevice_FCD.h:48
A storage for options typed value containers)
Definition: OptionsCont.h:92
Abstract in-vehicle device.
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64
Representation of a lane in the micro simulation.
Definition: MSLane.h:78
static void initEdgeFilter()
initialize edge filter (once)