Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
ChargingStation.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2012-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/****************************************************************************/
18// C++ TraCI client API implementation
19/****************************************************************************/
20#pragma once
21#include <vector>
22#include <libsumo/TraCIDefs.h>
23
24
25// ===========================================================================
26// class declarations
27// ===========================================================================
28#ifndef LIBTRACI
29class MSStoppingPlace;
30#endif
31
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
40namespace LIBSUMO_NAMESPACE {
42public:
43 static std::string getLaneID(const std::string& stopID);
44 static double getStartPos(const std::string& stopID);
45 static double getEndPos(const std::string& stopID);
46 static std::string getName(const std::string& stopID);
47 static int getVehicleCount(const std::string& stopID);
48 static std::vector<std::string> getVehicleIDs(const std::string& stopID);
49 static double getChargingPower(const std::string& stopID);
50 static double getEfficiency(const std::string& stopID);
51 static double getChargeDelay(const std::string& stopID);
52 static int getChargeInTransit(const std::string& stopID);
53
56
57 static void setChargingPower(const std::string& stopID, double chargingpower);
58 static void setEfficiency(const std::string& stopID, double efficiency);
59 static void setChargeDelay(const std::string& stopID, double delay);
60 static void setChargeInTransit(const std::string& stopID, bool value);
61
62#ifndef LIBTRACI
63#ifndef SWIG
64 static std::shared_ptr<VariableWrapper> makeWrapper();
65
66 static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper, tcpip::Storage* paramData);
67
68private:
69 static MSStoppingPlace* getChargingStation(const std::string& id);
70
71private:
72 static SubscriptionResults mySubscriptionResults;
73 static ContextSubscriptionResults myContextSubscriptionResults;
74#endif
75#endif
76
78 ChargingStation() = delete;
79};
80
81
82}
#define LIBSUMO_ID_PARAMETER_API
Definition TraCIDefs.h:116
#define LIBSUMO_SUBSCRIPTION_API
Definition TraCIDefs.h:62
static int getChargeInTransit(const std::string &stopID)
static double getEndPos(const std::string &stopID)
static MSStoppingPlace * getChargingStation(const std::string &id)
static std::string getLaneID(const std::string &stopID)
static std::vector< std::string > getVehicleIDs(const std::string &stopID)
static void setChargeDelay(const std::string &stopID, double delay)
static double getChargingPower(const std::string &stopID)
static std::shared_ptr< VariableWrapper > makeWrapper()
static double getChargeDelay(const std::string &stopID)
static std::string getName(const std::string &stopID)
static int getVehicleCount(const std::string &stopID)
static double getStartPos(const std::string &stopID)
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData)
static void setChargeInTransit(const std::string &stopID, bool value)
static double getEfficiency(const std::string &stopID)
static void setEfficiency(const std::string &stopID, double efficiency)
static ContextSubscriptionResults myContextSubscriptionResults
static SubscriptionResults mySubscriptionResults
LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API void setChargingPower(const std::string &stopID, double chargingpower)
ChargingStation()=delete
invalidated standard constructor
A lane area vehicles can halt at.