/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2017-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file OverheadWire.cpp14/// @author Angelo Banse15/// @date 11.11.202016///17// C++ TraCI client API implementation18/****************************************************************************/19#include <config.h>2021#define LIBTRACI 122#include <libsumo/TraCIConstants.h>23#include <libsumo/OverheadWire.h>24#include "Domain.h"252627namespace libtraci {2829typedef Domain<libsumo::CMD_GET_OVERHEADWIRE_VARIABLE, libsumo::CMD_SET_OVERHEADWIRE_VARIABLE> Dom;303132// ===========================================================================33// static member definitions34// ===========================================================================35std::vector<std::string>36OverheadWire::getIDList() {37return Dom::getStringVector(libsumo::TRACI_ID_LIST, "");38}3940int41OverheadWire::getIDCount() {42return Dom::getInt(libsumo::ID_COUNT, "");43}444546std::string47OverheadWire::getLaneID(const std::string& stopID) {48return Dom::getString(libsumo::VAR_LANE_ID, stopID);49}505152double53OverheadWire::getStartPos(const std::string& stopID) {54return Dom::getDouble(libsumo::VAR_POSITION, stopID);55}5657double58OverheadWire::getEndPos(const std::string& stopID) {59return Dom::getDouble(libsumo::VAR_LANEPOSITION, stopID);60}6162std::string63OverheadWire::getName(const std::string& stopID) {64return Dom::getString(libsumo::VAR_NAME, stopID);65}6667int68OverheadWire::getVehicleCount(const std::string& stopID) {69return Dom::getInt(libsumo::VAR_STOP_STARTING_VEHICLES_NUMBER, stopID);70}7172std::vector<std::string>73OverheadWire::getVehicleIDs(const std::string& stopID) {74return Dom::getStringVector(libsumo::VAR_STOP_STARTING_VEHICLES_IDS, stopID);75}767778LIBTRACI_SUBSCRIPTION_IMPLEMENTATION(OverheadWire, OVERHEADWIRE)79LIBTRACI_PARAMETER_IMPLEMENTATION(OverheadWire, OVERHEADWIRE)808182}838485/****************************************************************************/868788