Eclipse 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-2019 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 class SUMOTrafficObject;
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
49 class MSDevice_FCD : public MSVehicleDevice {
50 public:
54  static void insertOptions(OptionsCont& oc);
55 
56 
67  static void buildVehicleDevices(SUMOVehicle& v, std::vector<MSVehicleDevice*>& into);
68 
69 public:
71  ~MSDevice_FCD();
72 
73  bool notifyEnter(SUMOTrafficObject& /*veh*/, MSMoveReminder::Notification /*reason*/, const MSLane* /*enteredLane*/) {
74  return false;
75  }
76 
77  void saveState(OutputDevice& /* out */) const {
78  }
79 
81  const std::string deviceName() const {
82  return "fcd";
83  }
84 
85  static const std::set<const MSEdge*>& getEdgeFilter() {
86  return myEdgeFilter;
87  }
88 
90  static void cleanup();
91 
92 private:
98  MSDevice_FCD(SUMOVehicle& holder, const std::string& id);
99 
100 
102  static std::set<const MSEdge*> myEdgeFilter;
104 
106  static void initEdgeFilter();
107 
108 private:
110  MSDevice_FCD(const MSDevice_FCD&);
111 
114 
115 
116 };
117 
118 
119 #endif
120 
121 /****************************************************************************/
122 
static const std::set< const MSEdge * > & getEdgeFilter()
Definition: MSDevice_FCD.h:85
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:81
bool notifyEnter(SUMOTrafficObject &, MSMoveReminder::Notification, const MSLane *)
Checks whether the reminder is activated by a vehicle entering the lane.
Definition: MSDevice_FCD.h:73
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:102
Representation of a vehicle.
Definition: SUMOVehicle.h:61
~MSDevice_FCD()
Destructor.
void saveState(OutputDevice &) const
Saves the state of the device.
Definition: MSDevice_FCD.h:77
static bool myEdgeFilterInitialized
Definition: MSDevice_FCD.h:103
MSDevice_FCD(SUMOVehicle &holder, const std::string &id)
Constructor.
Representation of a vehicle or person.
A device which collects info on the vehicle trip (mainly on departure and arrival) ...
Definition: MSDevice_FCD.h:49
A storage for options typed value containers)
Definition: OptionsCont.h:90
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:83
static void initEdgeFilter()
initialize edge filter (once)