Eclipse SUMO - Simulation of Urban MObility
LaneArea.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 /****************************************************************************/
15 // C++ TraCI client API implementation
16 /****************************************************************************/
17 #ifndef LaneArea_h
18 #define LaneArea_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <vector>
27 
28 
29 // ===========================================================================
30 // class declarations
31 // ===========================================================================
33 
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
42 namespace libsumo {
43 class LaneArea {
44 public:
45  static std::vector<std::string> getIDList();
46  static int getIDCount();
47  static int getJamLengthVehicle(const std::string& detID);
48  static double getJamLengthMeters(const std::string& detID);
49  static double getLastStepMeanSpeed(const std::string& detID);
50  static std::vector<std::string> getLastStepVehicleIDs(const std::string& detID);
51  static double getLastStepOccupancy(const std::string& detID);
52  static double getPosition(const std::string& detID);
53  static std::string getLaneID(const std::string& detID);
54  static double getLength(const std::string& detID);
55  static int getLastStepVehicleNumber(const std::string& detID);
56  static int getLastStepHaltingNumber(const std::string& detID);
57 
59 
60  static std::shared_ptr<VariableWrapper> makeWrapper();
61 
62  static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper);
63 
64 private:
65  static MSE2Collector* getDetector(const std::string& detID);
66 
67 private:
70 
72  LaneArea() = delete;
73 
74 };
75 }
76 
77 
78 #endif
79 
80 /****************************************************************************/
std::map< std::string, TraCIResults > SubscriptionResults
{object->{variable->value}}
Definition: TraCIDefs.h:204
#define LIBSUMO_SUBSCRIPTION_API
Definition: TraCIDefs.h:42
static std::string getLaneID(const std::string &detID)
Definition: LaneArea.cpp:97
static double getPosition(const std::string &detID)
Definition: LaneArea.cpp:91
An areal detector corresponding to a sequence of consecutive lanes.
Definition: MSE2Collector.h:81
LaneArea()=delete
invalidated standard constructor
std::map< std::string, SubscriptionResults > ContextSubscriptionResults
Definition: TraCIDefs.h:205
static int getLastStepVehicleNumber(const std::string &detID)
Definition: LaneArea.cpp:110
static double getJamLengthMeters(const std::string &detID)
Definition: LaneArea.cpp:67
static double getLength(const std::string &detID)
Definition: LaneArea.cpp:103
static int getIDCount()
Definition: LaneArea.cpp:54
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
Definition: LaneArea.cpp:141
static double getLastStepMeanSpeed(const std::string &detID)
Definition: LaneArea.cpp:73
static int getJamLengthVehicle(const std::string &detID)
Definition: LaneArea.cpp:61
Definition: Edge.cpp:30
static LIBSUMO_SUBSCRIPTION_API std::shared_ptr< VariableWrapper > makeWrapper()
Definition: LaneArea.cpp:135
static std::vector< std::string > getIDList()
Definition: LaneArea.cpp:46
static ContextSubscriptionResults myContextSubscriptionResults
Definition: LaneArea.h:69
static SubscriptionResults mySubscriptionResults
Definition: LaneArea.h:68
static int getLastStepHaltingNumber(const std::string &detID)
Definition: LaneArea.cpp:116
static double getLastStepOccupancy(const std::string &detID)
Definition: LaneArea.cpp:85
static std::vector< std::string > getLastStepVehicleIDs(const std::string &detID)
Definition: LaneArea.cpp:79
static MSE2Collector * getDetector(const std::string &detID)
Definition: LaneArea.cpp:125