42std::vector<std::string>
43OverheadWire::getIDList() {
44 std::vector<std::string> ids;
46 ids.push_back(item.first);
48 std::sort(ids.begin(), ids.end());
53OverheadWire::getIDCount() {
54 return (
int)getIDList().size();
85std::vector<std::string>
88 std::vector<std::string> result;
90 result.push_back(veh->getID());
98OverheadWire::getParameter(
const std::string& stopID,
const std::string& param) {
106OverheadWire::setParameter(
const std::string& stopID,
const std::string& key,
const std::string&
value) {
119 throw TraCIException(
"OverheadWire '" +
id +
"' is not known");
125std::shared_ptr<VariableWrapper>
135 return wrapper->wrapStringList(objID, variable, getIDList());
137 return wrapper->wrapInt(objID, variable, getIDCount());
139 return wrapper->wrapString(objID, variable,
getLaneID(objID));
141 return wrapper->wrapDouble(objID, variable,
getStartPos(objID));
143 return wrapper->wrapDouble(objID, variable,
getEndPos(objID));
145 return wrapper->wrapString(objID, variable,
getName(objID));
149 return wrapper->wrapStringList(objID, variable,
getVehicleIDs(objID));
152 return wrapper->wrapString(objID, variable, getParameter(objID, paramData->
readString()));
155 return wrapper->wrapStringPair(objID, variable, getParameterWithKey(objID, paramData->
readString()));
const std::string invalid_return< std::string >::value
@ SUMO_TAG_OVERHEAD_WIRE_SEGMENT
An overhead wire segment.
#define LIBSUMO_SUBSCRIPTION_IMPLEMENTATION(CLASS, DOM)
#define LIBSUMO_GET_PARAMETER_WITH_KEY_IMPLEMENTATION(CLASS)
static std::string getLaneID(const std::string &stopID)
LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API std::shared_ptr< VariableWrapper > makeWrapper()
static MSStoppingPlace * getOverheadWire(const std::string &id)
static ContextSubscriptionResults myContextSubscriptionResults
static std::string getName(const std::string &stopID)
static double getEndPos(const std::string &stopID)
static std::vector< std::string > getVehicleIDs(const std::string &stopID)
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData)
static int getVehicleCount(const std::string &stopID)
static double getStartPos(const std::string &stopID)
static SubscriptionResults mySubscriptionResults
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSStoppingPlace * getStoppingPlace(const std::string &id, const SumoXMLTag category) const
Returns the named stopping place of the given category.
Definition of overhead wire segment.
const std::vector< SUMOVehicle * > & getChargingVehicles() const
A lane area vehicles can halt at.
C++ TraCI client API implementation.
virtual const std::string getParameter(const std::string &key, const std::string defaultValue="") const
Returns the value for a given key.
virtual void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
Representation of a vehicle.
virtual std::string readString()
virtual int readUnsignedByte()
TRACI_CONST int VAR_STOP_STARTING_VEHICLES_NUMBER
TRACI_CONST int TRACI_ID_LIST
std::map< std::string, libsumo::SubscriptionResults > ContextSubscriptionResults
TRACI_CONST int VAR_POSITION
std::map< std::string, libsumo::TraCIResults > SubscriptionResults
{object->{variable->value}}
TRACI_CONST int VAR_PARAMETER
TRACI_CONST int VAR_LANEPOSITION
TRACI_CONST int VAR_LANE_ID
TRACI_CONST int VAR_PARAMETER_WITH_KEY
TRACI_CONST int VAR_STOP_STARTING_VEHICLES_IDS