Eclipse SUMO - Simulation of Urban MObility
MultiEntryExit.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2017-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 /****************************************************************************/
14 // C++ TraCI client API implementation
15 /****************************************************************************/
16 #ifndef MultiEntryExit_h
17 #define MultiEntryExit_h
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include <vector>
26 #include <libsumo/TraCIDefs.h>
27 
28 
29 // ===========================================================================
30 // class declarations
31 // ===========================================================================
32 class MSE3Collector;
33 namespace libsumo {
34 class VariableWrapper;
35 }
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
45 namespace libsumo {
47 public:
48  static std::vector<std::string> getIDList();
49  static int getIDCount();
50  static int getLastStepVehicleNumber(const std::string& detID);
51  static double getLastStepMeanSpeed(const std::string& detID);
52  static std::vector<std::string> getLastStepVehicleIDs(const std::string& detID);
53  static int getLastStepHaltingNumber(const std::string& detID);
54 
56 
57  static std::shared_ptr<VariableWrapper> makeWrapper();
58 
59  static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper);
60 
61 private:
62  static MSE3Collector* getDetector(const std::string& detID);
63 
64 private:
67 
69  MultiEntryExit() = delete;
70 
71 };
72 
73 
74 }
75 
76 
77 #endif
78 
79 /****************************************************************************/
libsumo::MultiEntryExit::getIDList
static std::vector< std::string > getIDList()
Definition: MultiEntryExit.cpp:45
libsumo::MultiEntryExit::myContextSubscriptionResults
static ContextSubscriptionResults myContextSubscriptionResults
Definition: MultiEntryExit.h:66
LIBSUMO_SUBSCRIPTION_API
#define LIBSUMO_SUBSCRIPTION_API
Definition: TraCIDefs.h:41
MSE3Collector
A detector of vehicles passing an area between entry/exit points.
Definition: MSE3Collector.h:60
libsumo::VariableWrapper
Definition: Subscription.h:132
libsumo::MultiEntryExit::getLastStepVehicleIDs
static std::vector< std::string > getLastStepVehicleIDs(const std::string &detID)
Definition: MultiEntryExit.cpp:72
libsumo::ContextSubscriptionResults
std::map< std::string, SubscriptionResults > ContextSubscriptionResults
Definition: TraCIDefs.h:204
libsumo::MultiEntryExit::handleVariable
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
Definition: MultiEntryExit.cpp:103
libsumo::MultiEntryExit::mySubscriptionResults
static SubscriptionResults mySubscriptionResults
Definition: MultiEntryExit.h:65
libsumo
Definition: Edge.cpp:29
libsumo::MultiEntryExit::getDetector
static MSE3Collector * getDetector(const std::string &detID)
Definition: MultiEntryExit.cpp:87
libsumo::MultiEntryExit::MultiEntryExit
MultiEntryExit()=delete
invalidated standard constructor
libsumo::MultiEntryExit::makeWrapper
static LIBSUMO_SUBSCRIPTION_API std::shared_ptr< VariableWrapper > makeWrapper()
Definition: MultiEntryExit.cpp:97
libsumo::MultiEntryExit::getLastStepHaltingNumber
static int getLastStepHaltingNumber(const std::string &detID)
Definition: MultiEntryExit.cpp:78
libsumo::MultiEntryExit::getLastStepMeanSpeed
static double getLastStepMeanSpeed(const std::string &detID)
Definition: MultiEntryExit.cpp:66
libsumo::MultiEntryExit
Definition: MultiEntryExit.h:46
config.h
libsumo::MultiEntryExit::getLastStepVehicleNumber
static int getLastStepVehicleNumber(const std::string &detID)
Definition: MultiEntryExit.cpp:60
TraCIDefs.h
libsumo::SubscriptionResults
std::map< std::string, TraCIResults > SubscriptionResults
{object->{variable->value}}
Definition: TraCIDefs.h:203
libsumo::MultiEntryExit::getIDCount
static int getIDCount()
Definition: MultiEntryExit.cpp:53