Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
libtraci/Junction.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2017-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/****************************************************************************/
22// C++ TraCI client API implementation
23/****************************************************************************/
24#include <config.h>
25
26#define LIBTRACI 1
28#include <libsumo/Junction.h>
29#include "Domain.h"
30#include <libsumo/TraCIDefs.h>
31
32namespace libtraci {
33
34typedef Domain<libsumo::CMD_GET_JUNCTION_VARIABLE, libsumo::CMD_SET_JUNCTION_VARIABLE> Dom;
35
36
37// ===========================================================================
38// member definitions
39// ===========================================================================
40std::vector<std::string>
41Junction::getIDList() {
43}
44
45
46int
47Junction::getIDCount() {
49}
50
51
53Junction::getPosition(const std::string& junctionID, bool includeZ) {
54 return includeZ ? Dom::getPos3D(libsumo::VAR_POSITION3D, junctionID) : Dom::getPos(libsumo::VAR_POSITION, junctionID);
55}
56
57
59Junction::getShape(const std::string& junctionID) {
60 return Dom::getPolygon(libsumo::VAR_SHAPE, junctionID);
61}
62
63
64const std::vector<std::string>
65Junction::getIncomingEdges(const std::string& junctionID) {
67}
68
69
70const std::vector<std::string>
71Junction::getOutgoingEdges(const std::string& junctionID) {
73}
74
75
78
79}
80
81
82/****************************************************************************/
#define LIBTRACI_SUBSCRIPTION_IMPLEMENTATION(CLASS, DOMAIN)
Definition Domain.h:38
#define LIBTRACI_PARAMETER_IMPLEMENTATION(CLASS, DOMAIN)
Definition Domain.h:77
C++ TraCI client API implementation.
static libsumo::TraCIPosition getPos(int var, const std::string &id, tcpip::Storage *add=nullptr, const bool isGeo=false)
Definition Domain.h:153
static std::vector< std::string > getStringVector(int var, const std::string &id, tcpip::Storage *add=nullptr)
Definition Domain.h:177
static int getInt(int var, const std::string &id, tcpip::Storage *add=nullptr)
Definition Domain.h:125
static libsumo::TraCIPositionVector getPolygon(int var, const std::string &id, tcpip::Storage *add=nullptr)
Definition Domain.h:135
static libsumo::TraCIPosition getPos3D(int var, const std::string &id, tcpip::Storage *add=nullptr, const bool isGeo=false)
Definition Domain.h:162
TRACI_CONST int TRACI_ID_LIST
TRACI_CONST int VAR_POSITION
TRACI_CONST int OUTGOING_EDGES
TRACI_CONST int VAR_SHAPE
TRACI_CONST int ID_COUNT
TRACI_CONST int VAR_POSITION3D
TRACI_CONST int INCOMING_EDGES
Domain< libsumo::CMD_GET_BUSSTOP_VARIABLE, libsumo::CMD_SET_BUSSTOP_VARIABLE > Dom
A 2D or 3D-position, for 2D positions z == INVALID_DOUBLE_VALUE.
Definition TraCIDefs.h:178
A list of positions.
Definition TraCIDefs.h:234