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.dev/sumo
3 // Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
20 // Writes positions of vehicles that have a certain (named) type
21 /****************************************************************************/
22 #pragma once
23 #include <config.h>
24 
25 #include <string>
26 #include <utils/common/Command.h>
28 #include <utils/common/Named.h>
29 #include <utils/common/SUMOTime.h>
30 
31 
32 // ===========================================================================
33 // class definitions
34 // ===========================================================================
50 class MSVTypeProbe : public Named, public Command {
51 public:
59  MSVTypeProbe(const std::string& id, const std::string& vType,
60  OutputDevice& od, SUMOTime frequency);
61 
62 
64  virtual ~MSVTypeProbe();
65 
66 
67 
70 
81  SUMOTime execute(SUMOTime currentTime);
83 
84 
85 private:
87  std::string myVType;
88 
91 
94 
95 
96 private:
99 
102 
103 
104 };
long long int SUMOTime
Definition: GUI.h:35
Base (microsim) event class.
Definition: Command.h:50
Writes positions of vehicles that have a certain (named) type.
Definition: MSVTypeProbe.h:50
MSVTypeProbe & operator=(const MSVTypeProbe &)
Invalidated assignment operator.
virtual ~MSVTypeProbe()
Destructor.
MSVTypeProbe(const MSVTypeProbe &)
Invalidated copy constructor.
SUMOTime execute(SUMOTime currentTime)
Writes values into the given stream.
std::string myVType
The id of the vehicle type vehicles must have to be reported.
Definition: MSVTypeProbe.h:87
OutputDevice & myOutputDevice
The device to write into.
Definition: MSVTypeProbe.h:90
SUMOTime myFrequency
The frequency of reporting.
Definition: MSVTypeProbe.h:93
MSVTypeProbe(const std::string &id, const std::string &vType, OutputDevice &od, SUMOTime frequency)
Constructor.
Base class for objects which have an id.
Definition: Named.h:54
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:61