Eclipse SUMO - Simulation of Urban MObility
MSVTypeProbe.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-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 // Writes positions of vehicles that have a certain (named) type
17 /****************************************************************************/
18 #ifndef MSVTypeProbe_h
19 #define MSVTypeProbe_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <string>
28 #include <utils/common/Command.h>
30 #include <utils/common/Named.h>
31 #include <utils/common/SUMOTime.h>
32 
33 
34 // ===========================================================================
35 // class definitions
36 // ===========================================================================
52 class MSVTypeProbe : public Named, public Command {
53 public:
61  MSVTypeProbe(const std::string& id, const std::string& vType,
62  OutputDevice& od, SUMOTime frequency);
63 
64 
66  virtual ~MSVTypeProbe();
67 
68 
69 
72 
83  SUMOTime execute(SUMOTime currentTime);
85 
86 
87 private:
89  std::string myVType;
90 
93 
96 
97 
98 private:
101 
104 
105 
106 };
107 
108 #endif
109 
110 /****************************************************************************/
111 
SUMOTime.h
Named
Base class for objects which have an id.
Definition: Named.h:56
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:63
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
MSVTypeProbe::myFrequency
SUMOTime myFrequency
The frequency of reporting.
Definition: MSVTypeProbe.h:95
MSVTypeProbe::MSVTypeProbe
MSVTypeProbe(const MSVTypeProbe &)
Invalidated copy constructor.
MSVTypeProbe::execute
SUMOTime execute(SUMOTime currentTime)
Writes values into the given stream.
Definition: MSVTypeProbe.cpp:56
Named.h
OutputDevice.h
MSVTypeProbe::myVType
std::string myVType
The id of the vehicle type vehicles must have to be reported.
Definition: MSVTypeProbe.h:89
MSVTypeProbe::operator=
MSVTypeProbe & operator=(const MSVTypeProbe &)
Invalidated assignment operator.
MSVTypeProbe::~MSVTypeProbe
virtual ~MSVTypeProbe()
Destructor.
Definition: MSVTypeProbe.cpp:51
MSVTypeProbe::myOutputDevice
OutputDevice & myOutputDevice
The device to write into.
Definition: MSVTypeProbe.h:92
Command
Base (microsim) event class.
Definition: Command.h:52
config.h
Command.h
MSVTypeProbe::MSVTypeProbe
MSVTypeProbe(const std::string &id, const std::string &vType, OutputDevice &od, SUMOTime frequency)
Constructor.
Definition: MSVTypeProbe.cpp:42
MSVTypeProbe
Writes positions of vehicles that have a certain (named) type.
Definition: MSVTypeProbe.h:52