Eclipse SUMO - Simulation of Urban MObility
libtraci/LaneArea.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2012-2020 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 /****************************************************************************/
21 // C++ TraCI client API implementation
22 /****************************************************************************/
23 #include <config.h>
24 
25 #define LIBTRACI 1
26 #include <libsumo/LaneArea.h>
27 #include "Connection.h"
28 #include "Domain.h"
29 
30 
31 namespace libtraci {
32 
33 typedef Domain<libsumo::CMD_GET_LANEAREA_VARIABLE, libsumo::CMD_SET_LANEAREA_VARIABLE> Dom;
34 
35 
36 // ===========================================================================
37 // static member definitions
38 // ===========================================================================
39 std::vector<std::string>
40 LaneArea::getIDList() {
42 }
43 
44 
45 int
46 LaneArea::getIDCount() {
47  return Dom::getInt(libsumo::ID_COUNT, "");
48 }
49 
50 
51 int
52 LaneArea::getJamLengthVehicle(const std::string& detID) {
54 }
55 
56 
57 double
58 LaneArea::getJamLengthMeters(const std::string& detID) {
60 }
61 
62 
63 double
64 LaneArea::getLastStepMeanSpeed(const std::string& detID) {
66 }
67 
68 
69 std::vector<std::string>
70 LaneArea::getLastStepVehicleIDs(const std::string& detID) {
72 }
73 
74 
75 double
76 LaneArea::getLastStepOccupancy(const std::string& detID) {
78 }
79 
80 
81 double
82 LaneArea::getPosition(const std::string& detID) {
84 }
85 
86 
87 std::string
88 LaneArea::getLaneID(const std::string& detID) {
89  return Dom::getString(libsumo::VAR_LANE_ID, detID);
90 }
91 
92 
93 double
94 LaneArea::getLength(const std::string& detID) {
95  return Dom::getDouble(libsumo::VAR_LENGTH, detID);
96 }
97 
98 
99 int
100 LaneArea::getLastStepVehicleNumber(const std::string& detID) {
102 }
103 
104 
105 int
106 LaneArea::getLastStepHaltingNumber(const std::string& detID) {
108 }
109 
110 
113 
114 
115 } // namespace libtraci
116 
117 /****************************************************************************/
#define LIBTRACI_SUBSCRIPTION_IMPLEMENTATION(CLASS, DOMAIN)
Definition: Domain.h:36
#define LIBTRACI_PARAMETER_IMPLEMENTATION(CLASS, DOMAIN)
Definition: Domain.h:74
C++ TraCI client API implementation.
Definition: LaneArea.h:32
static std::vector< std::string > getStringVector(int var, const std::string &id, tcpip::Storage *add=nullptr)
Definition: Domain.h:140
static std::string getString(int var, const std::string &id, tcpip::Storage *add=nullptr)
Definition: Domain.h:136
static int getInt(int var, const std::string &id, tcpip::Storage *add=nullptr)
Definition: Domain.h:116
static double getDouble(int var, const std::string &id, tcpip::Storage *add=nullptr)
Definition: Domain.h:120
TRACI_CONST int LAST_STEP_VEHICLE_ID_LIST
TRACI_CONST int LAST_STEP_VEHICLE_NUMBER
TRACI_CONST int TRACI_ID_LIST
TRACI_CONST int VAR_POSITION
TRACI_CONST int LAST_STEP_MEAN_SPEED
TRACI_CONST int JAM_LENGTH_METERS
TRACI_CONST int LAST_STEP_VEHICLE_HALTING_NUMBER
TRACI_CONST int VAR_LENGTH
TRACI_CONST int ID_COUNT
TRACI_CONST int VAR_LANE_ID
TRACI_CONST int LAST_STEP_OCCUPANCY
TRACI_CONST int JAM_LENGTH_VEHICLE
Domain< libsumo::CMD_GET_BUSSTOP_VARIABLE, libsumo::CMD_SET_BUSSTOP_VARIABLE > Dom