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