Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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-2023 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>
28#include <utils/common/Named.h>
30
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
50class MSVTypeProbe : public Named, public Command {
51public:
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
85private:
87 std::string myVType;
88
91
94
95
96private:
99
102
103
104};
long long int SUMOTime
Definition GUI.h:36
Base (microsim) event class.
Definition Command.h:50
Writes positions of vehicles that have a certain (named) type.
virtual ~MSVTypeProbe()
Destructor.
MSVTypeProbe(const MSVTypeProbe &)
Invalidated copy constructor.
SUMOTime execute(SUMOTime currentTime)
Writes values into the given stream.
MSVTypeProbe & operator=(const MSVTypeProbe &)
Invalidated assignment operator.
std::string myVType
The id of the vehicle type vehicles must have to be reported.
OutputDevice & myOutputDevice
The device to write into.
SUMOTime myFrequency
The frequency of reporting.
Base class for objects which have an id.
Definition Named.h:54
Static storage of an output device and its base (abstract) implementation.