Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
RouteProbe.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2012-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/****************************************************************************/
18// C++ TraCI client API implementation
19/****************************************************************************/
20#pragma once
21#include <vector>
22#include <libsumo/TraCIDefs.h>
23
24
25// ===========================================================================
26// class declarations
27// ===========================================================================
28#ifndef LIBTRACI
29class MSRouteProbe;
30#endif
31
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
40namespace LIBSUMO_NAMESPACE {
42public:
43 static std::string getEdgeID(const std::string& probeID);
44 //static double getFrequency(const std::string& meanDataID);
45
46 static std::string sampleLastRouteID(const std::string& probeID);
47 static std::string sampleCurrentRouteID(const std::string& probeID);
48 //static std::vector<std::pair<std::string, doube> > getLastRoutes(const std::string& probeID);
49 //static std::vector<std::pair<std::string, doube> > getCurrentRoutes(const std::string& probeID);
50
53#ifndef LIBTRACI
54#ifndef SWIG
55 static std::shared_ptr<VariableWrapper> makeWrapper();
56
57 static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper, tcpip::Storage* paramData);
58
59private:
60 static MSRouteProbe* getRouteProbe(const std::string& id);
61
62private:
63 static SubscriptionResults mySubscriptionResults;
64 static ContextSubscriptionResults myContextSubscriptionResults;
65#endif
66#endif
68 RouteProbe() = delete;
69};
70
71
72}
#define LIBSUMO_ID_PARAMETER_API
Definition TraCIDefs.h:116
#define LIBSUMO_SUBSCRIPTION_API
Definition TraCIDefs.h:62
static std::string getEdgeID(const std::string &probeID)
static MSRouteProbe * getRouteProbe(const std::string &id)
static std::string sampleLastRouteID(const std::string &probeID)
static std::string sampleCurrentRouteID(const std::string &probeID)
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData)
static SubscriptionResults mySubscriptionResults
Definition RouteProbe.h:63
RouteProbe()=delete
invalidated standard constructor
static ContextSubscriptionResults myContextSubscriptionResults
Definition RouteProbe.h:64
LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API std::shared_ptr< VariableWrapper > makeWrapper()
Writes routes of vehicles passing a certain edge.