![]() |
Eclipse SUMO - Simulation of Urban MObility
|
Scope for interaction with vehicle types. More...
#include <TraCIAPI.h>
Public Member Functions | |
void | clearSubscriptionResults () |
void | copy (const std::string &origTypeID, const std::string &newTypeID) const |
double | getAccel (const std::string &typeID) const |
const libsumo::ContextSubscriptionResults | getAllContextSubscriptionResults () const |
const libsumo::SubscriptionResults | getAllSubscriptionResults () const |
double | getApparentDecel (const std::string &typeID) const |
libsumo::TraCIColor | getColor (const std::string &typeID) const |
const libsumo::SubscriptionResults | getContextSubscriptionResults (const std::string &objID) const |
double | getDecel (const std::string &typeID) const |
double | getEmergencyDecel (const std::string &typeID) const |
std::string | getEmissionClass (const std::string &typeID) const |
double | getHeight (const std::string &typeID) const |
std::vector< std::string > | getIDList () const |
double | getImperfection (const std::string &typeID) const |
std::string | getLateralAlignment (const std::string &typeID) const |
double | getLength (const std::string &typeID) const |
double | getMaxSpeed (const std::string &typeID) const |
double | getMaxSpeedLat (const std::string &typeID) const |
double | getMinGap (const std::string &typeID) const |
double | getMinGapLat (const std::string &typeID) const |
libsumo::SubscriptionResults & | getModifiableContextSubscriptionResults (const std::string &objID) |
libsumo::SubscriptionResults & | getModifiableSubscriptionResults () |
std::string | getParameter (const std::string &objectID, const std::string &key) const |
retrieve generic paramter More... | |
int | getPersonCapacity (const std::string &typeID) const |
std::string | getShapeClass (const std::string &typeID) const |
double | getSpeedDeviation (const std::string &typeID) const |
double | getSpeedFactor (const std::string &typeID) const |
const libsumo::TraCIResults | getSubscriptionResults (const std::string &objID) const |
double | getTau (const std::string &typeID) const |
std::string | getVehicleClass (const std::string &typeID) const |
double | getWidth (const std::string &typeID) const |
void | setAccel (const std::string &typeID, double accel) const |
void | setApparentDecel (const std::string &typeID, double decel) const |
void | setColor (const std::string &typeID, const libsumo::TraCIColor &c) const |
void | setDecel (const std::string &typeID, double decel) const |
void | setEmergencyDecel (const std::string &typeID, double decel) const |
void | setEmissionClass (const std::string &typeID, const std::string &clazz) const |
void | setHeight (const std::string &typeID, double height) const |
void | setImperfection (const std::string &typeID, double imperfection) const |
void | setLateralAlignment (const std::string &typeID, const std::string &latAlignment) const |
void | setLength (const std::string &typeID, double length) const |
void | setMaxSpeed (const std::string &typeID, double speed) const |
void | setMaxSpeedLat (const std::string &typeID, double speed) const |
void | setMinGap (const std::string &typeID, double minGap) const |
void | setMinGapLat (const std::string &typeID, double minGapLat) const |
void | setParameter (const std::string &objectID, const std::string &key, const std::string &value) const |
set generic paramter More... | |
void | setShapeClass (const std::string &typeID, const std::string &shapeClass) const |
void | setSpeedDeviation (const std::string &typeID, double deviation) const |
void | setSpeedFactor (const std::string &typeID, double factor) const |
void | setTau (const std::string &typeID, double tau) const |
void | setVehicleClass (const std::string &typeID, const std::string &clazz) const |
void | setWidth (const std::string &typeID, double width) const |
void | subscribe (const std::string &objID, const std::vector< int > &vars, double beginTime, double endTime) const |
void | subscribeContext (const std::string &objID, int domain, double range, const std::vector< int > &vars, double beginTime, double endTime) const |
VehicleTypeScope (TraCIAPI &parent) | |
virtual | ~VehicleTypeScope () |
Protected Attributes | |
int | myCmdGetID |
int | myCmdSetID |
int | myContextSubscribeID |
libsumo::ContextSubscriptionResults | myContextSubscriptionResults |
TraCIAPI & | myParent |
The parent TraCI client which offers the connection. More... | |
int | mySubscribeID |
libsumo::SubscriptionResults | mySubscriptionResults |
Private Member Functions | |
VehicleTypeScope & | operator= (const VehicleTypeScope &src) |
invalidated assignment operator More... | |
VehicleTypeScope (const VehicleTypeScope &src) | |
invalidated copy constructor More... | |
Scope for interaction with vehicle types.
Definition at line 597 of file TraCIAPI.h.
|
inline |
Definition at line 599 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 600 of file TraCIAPI.h.
|
private |
invalidated copy constructor
|
inherited |
Definition at line 3707 of file TraCIAPI.cpp.
void TraCIAPI::VehicleTypeScope::copy | ( | const std::string & | origTypeID, |
const std::string & | newTypeID | ||
) | const |
Definition at line 2326 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::COPY, libsumo::TYPE_STRING, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleTypeScope::getAccel | ( | const std::string & | typeID | ) | const |
Definition at line 2129 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_ACCEL.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3691 of file TraCIAPI.cpp.
|
inherited |
Definition at line 3675 of file TraCIAPI.cpp.
double TraCIAPI::VehicleTypeScope::getApparentDecel | ( | const std::string & | typeID | ) | const |
Definition at line 2144 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_APPARENT_DECEL.
Referenced by TraCITestClient::testAPI().
libsumo::TraCIColor TraCIAPI::VehicleTypeScope::getColor | ( | const std::string & | typeID | ) | const |
Definition at line 2209 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_COLOR.
|
inherited |
Definition at line 3697 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleTypeScope::getDecel | ( | const std::string & | typeID | ) | const |
Definition at line 2134 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_DECEL.
double TraCIAPI::VehicleTypeScope::getEmergencyDecel | ( | const std::string & | typeID | ) | const |
Definition at line 2139 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_EMERGENCY_DECEL.
Referenced by TraCITestClient::testAPI().
std::string TraCIAPI::VehicleTypeScope::getEmissionClass | ( | const std::string & | typeID | ) | const |
Definition at line 2164 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_EMISSIONCLASS.
double TraCIAPI::VehicleTypeScope::getHeight | ( | const std::string & | typeID | ) | const |
Definition at line 2204 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_HEIGHT.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::VehicleTypeScope::getIDList | ( | ) | const |
Definition at line 2104 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::TRACI_ID_LIST.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleTypeScope::getImperfection | ( | const std::string & | typeID | ) | const |
Definition at line 2149 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_IMPERFECTION.
std::string TraCIAPI::VehicleTypeScope::getLateralAlignment | ( | const std::string & | typeID | ) | const |
Definition at line 2189 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_LATALIGNMENT.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleTypeScope::getLength | ( | const std::string & | typeID | ) | const |
Definition at line 2109 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_LENGTH.
double TraCIAPI::VehicleTypeScope::getMaxSpeed | ( | const std::string & | typeID | ) | const |
Definition at line 2114 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_MAXSPEED.
double TraCIAPI::VehicleTypeScope::getMaxSpeedLat | ( | const std::string & | typeID | ) | const |
Definition at line 2184 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_MAXSPEED_LAT.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleTypeScope::getMinGap | ( | const std::string & | typeID | ) | const |
Definition at line 2174 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_MINGAP.
double TraCIAPI::VehicleTypeScope::getMinGapLat | ( | const std::string & | typeID | ) | const |
Definition at line 2179 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_MINGAP_LAT.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3720 of file TraCIAPI.cpp.
|
inherited |
Definition at line 3714 of file TraCIAPI.cpp.
|
inherited |
retrieve generic paramter
Definition at line 3630 of file TraCIAPI.cpp.
References libsumo::TYPE_STRING, libsumo::VAR_PARAMETER, tcpip::Storage::writeByte(), and tcpip::Storage::writeString().
Referenced by TraCITestClient::testAPI().
int TraCIAPI::VehicleTypeScope::getPersonCapacity | ( | const std::string & | typeID | ) | const |
Definition at line 2194 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_PERSON_CAPACITY.
Referenced by TraCITestClient::testAPI().
std::string TraCIAPI::VehicleTypeScope::getShapeClass | ( | const std::string & | typeID | ) | const |
Definition at line 2169 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_SHAPECLASS.
double TraCIAPI::VehicleTypeScope::getSpeedDeviation | ( | const std::string & | typeID | ) | const |
Definition at line 2124 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_SPEED_DEVIATION.
double TraCIAPI::VehicleTypeScope::getSpeedFactor | ( | const std::string & | typeID | ) | const |
Definition at line 2119 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_SPEED_FACTOR.
|
inherited |
Definition at line 3681 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleTypeScope::getTau | ( | const std::string & | typeID | ) | const |
Definition at line 2154 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_TAU.
std::string TraCIAPI::VehicleTypeScope::getVehicleClass | ( | const std::string & | typeID | ) | const |
Definition at line 2159 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_VEHICLECLASS.
double TraCIAPI::VehicleTypeScope::getWidth | ( | const std::string & | typeID | ) | const |
Definition at line 2199 of file TraCIAPI.cpp.
References libsumo::CMD_GET_VEHICLETYPE_VARIABLE, and libsumo::VAR_WIDTH.
Referenced by TraCITestClient::testAPI().
|
private |
invalidated assignment operator
void TraCIAPI::VehicleTypeScope::setAccel | ( | const std::string & | typeID, |
double | accel | ||
) | const |
Definition at line 2344 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_ACCEL, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleTypeScope::setApparentDecel | ( | const std::string & | typeID, |
double | decel | ||
) | const |
Definition at line 2371 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_APPARENT_DECEL, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleTypeScope::setColor | ( | const std::string & | typeID, |
const libsumo::TraCIColor & | c | ||
) | const |
Definition at line 2398 of file TraCIAPI.cpp.
References libsumo::TraCIColor::a, libsumo::TraCIColor::b, libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TraCIColor::g, libsumo::TraCIColor::r, libsumo::TYPE_COLOR, libsumo::VAR_COLOR, and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setDecel | ( | const std::string & | typeID, |
double | decel | ||
) | const |
Definition at line 2353 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_DECEL, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setEmergencyDecel | ( | const std::string & | typeID, |
double | decel | ||
) | const |
Definition at line 2362 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_EMERGENCY_DECEL, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleTypeScope::setEmissionClass | ( | const std::string & | typeID, |
const std::string & | clazz | ||
) | const |
Definition at line 2262 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_STRING, libsumo::VAR_EMISSIONCLASS, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setHeight | ( | const std::string & | typeID, |
double | height | ||
) | const |
Definition at line 2280 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_HEIGHT, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleTypeScope::setImperfection | ( | const std::string & | typeID, |
double | imperfection | ||
) | const |
Definition at line 2380 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_IMPERFECTION, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setLateralAlignment | ( | const std::string & | typeID, |
const std::string & | latAlignment | ||
) | const |
Definition at line 2317 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_STRING, libsumo::VAR_LATALIGNMENT, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleTypeScope::setLength | ( | const std::string & | typeID, |
double | length | ||
) | const |
Definition at line 2216 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_LENGTH, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setMaxSpeed | ( | const std::string & | typeID, |
double | speed | ||
) | const |
Definition at line 2225 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_MAXSPEED, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setMaxSpeedLat | ( | const std::string & | typeID, |
double | speed | ||
) | const |
Definition at line 2308 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_MAXSPEED_LAT, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleTypeScope::setMinGap | ( | const std::string & | typeID, |
double | minGap | ||
) | const |
Definition at line 2289 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_MINGAP, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setMinGapLat | ( | const std::string & | typeID, |
double | minGapLat | ||
) | const |
Definition at line 2299 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_MINGAP_LAT, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
|
inherited |
set generic paramter
Definition at line 3639 of file TraCIAPI.cpp.
References libsumo::TYPE_COMPOUND, libsumo::TYPE_STRING, libsumo::VAR_PARAMETER, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleTypeScope::setShapeClass | ( | const std::string & | typeID, |
const std::string & | shapeClass | ||
) | const |
Definition at line 2335 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_STRING, libsumo::VAR_SHAPECLASS, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setSpeedDeviation | ( | const std::string & | typeID, |
double | deviation | ||
) | const |
Definition at line 2252 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_SPEED_DEVIATION, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setSpeedFactor | ( | const std::string & | typeID, |
double | factor | ||
) | const |
Definition at line 2243 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_SPEED_FACTOR, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setTau | ( | const std::string & | typeID, |
double | tau | ||
) | const |
Definition at line 2389 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_TAU, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setVehicleClass | ( | const std::string & | typeID, |
const std::string & | clazz | ||
) | const |
Definition at line 2234 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_STRING, libsumo::VAR_VEHICLECLASS, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setWidth | ( | const std::string & | typeID, |
double | width | ||
) | const |
Definition at line 2271 of file TraCIAPI.cpp.
References libsumo::CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_WIDTH, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3653 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3665 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
Definition at line 145 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 146 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 148 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 150 of file TraCIAPI.h.
|
protectedinherited |
The parent TraCI client which offers the connection.
Definition at line 144 of file TraCIAPI.h.
Referenced by TraCIAPI::EdgeScope::getIDList().
|
protectedinherited |
Definition at line 147 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 149 of file TraCIAPI.h.