![]() |
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... | |
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 575 of file TraCIAPI.h.
|
inline |
Definition at line 577 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 578 of file TraCIAPI.h.
References TraCIAPI::getColor(), and TraCIAPI::TraCIScopeWrapper::operator=().
|
private |
invalidated copy constructor
|
inherited |
Definition at line 3313 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
void TraCIAPI::VehicleTypeScope::copy | ( | const std::string & | origTypeID, |
const std::string & | newTypeID | ||
) | const |
Definition at line 2078 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, COPY, 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 1874 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_ACCEL.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3297 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3281 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
double TraCIAPI::VehicleTypeScope::getApparentDecel | ( | const std::string & | typeID | ) | const |
Definition at line 1889 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_APPARENT_DECEL.
Referenced by TraCITestClient::testAPI().
libsumo::TraCIColor TraCIAPI::VehicleTypeScope::getColor | ( | const std::string & | typeID | ) | const |
Definition at line 1949 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_COLOR.
|
inherited |
Definition at line 3303 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
double TraCIAPI::VehicleTypeScope::getDecel | ( | const std::string & | typeID | ) | const |
Definition at line 1879 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_DECEL.
double TraCIAPI::VehicleTypeScope::getEmergencyDecel | ( | const std::string & | typeID | ) | const |
Definition at line 1884 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_EMERGENCY_DECEL.
Referenced by TraCITestClient::testAPI().
std::string TraCIAPI::VehicleTypeScope::getEmissionClass | ( | const std::string & | typeID | ) | const |
Definition at line 1909 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_EMISSIONCLASS.
double TraCIAPI::VehicleTypeScope::getHeight | ( | const std::string & | typeID | ) | const |
Definition at line 1944 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_HEIGHT.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::VehicleTypeScope::getIDList | ( | ) | const |
Definition at line 1849 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and TRACI_ID_LIST.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleTypeScope::getImperfection | ( | const std::string & | typeID | ) | const |
Definition at line 1894 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_IMPERFECTION.
std::string TraCIAPI::VehicleTypeScope::getLateralAlignment | ( | const std::string & | typeID | ) | const |
Definition at line 1934 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_LATALIGNMENT.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleTypeScope::getLength | ( | const std::string & | typeID | ) | const |
Definition at line 1854 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_LENGTH.
double TraCIAPI::VehicleTypeScope::getMaxSpeed | ( | const std::string & | typeID | ) | const |
Definition at line 1859 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_MAXSPEED.
double TraCIAPI::VehicleTypeScope::getMaxSpeedLat | ( | const std::string & | typeID | ) | const |
Definition at line 1929 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_MAXSPEED_LAT.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleTypeScope::getMinGap | ( | const std::string & | typeID | ) | const |
Definition at line 1919 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_MINGAP.
double TraCIAPI::VehicleTypeScope::getMinGapLat | ( | const std::string & | typeID | ) | const |
Definition at line 1924 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_MINGAP_LAT.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3326 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3320 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
retrieve generic paramter
Definition at line 3235 of file TraCIAPI.cpp.
References TYPE_STRING, VAR_PARAMETER, tcpip::Storage::writeByte(), and tcpip::Storage::writeString().
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
std::string TraCIAPI::VehicleTypeScope::getShapeClass | ( | const std::string & | typeID | ) | const |
Definition at line 1914 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_SHAPECLASS.
double TraCIAPI::VehicleTypeScope::getSpeedDeviation | ( | const std::string & | typeID | ) | const |
Definition at line 1869 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_SPEED_DEVIATION.
double TraCIAPI::VehicleTypeScope::getSpeedFactor | ( | const std::string & | typeID | ) | const |
Definition at line 1864 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_SPEED_FACTOR.
|
inherited |
Definition at line 3287 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
double TraCIAPI::VehicleTypeScope::getTau | ( | const std::string & | typeID | ) | const |
Definition at line 1899 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_TAU.
std::string TraCIAPI::VehicleTypeScope::getVehicleClass | ( | const std::string & | typeID | ) | const |
Definition at line 1904 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_VEHICLECLASS.
double TraCIAPI::VehicleTypeScope::getWidth | ( | const std::string & | typeID | ) | const |
Definition at line 1939 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_WIDTH.
Referenced by TraCITestClient::testAPI().
|
private |
invalidated assignment operator
void TraCIAPI::VehicleTypeScope::setAccel | ( | const std::string & | typeID, |
double | accel | ||
) | const |
Definition at line 2098 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, 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 2128 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, 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 2158 of file TraCIAPI.cpp.
References libsumo::TraCIColor::a, libsumo::TraCIColor::b, CMD_SET_VEHICLETYPE_VARIABLE, libsumo::TraCIColor::g, libsumo::TraCIColor::r, TYPE_COLOR, VAR_COLOR, and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setDecel | ( | const std::string & | typeID, |
double | decel | ||
) | const |
Definition at line 2108 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, VAR_DECEL, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setEmergencyDecel | ( | const std::string & | typeID, |
double | decel | ||
) | const |
Definition at line 2118 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, 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 2007 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_STRING, VAR_EMISSIONCLASS, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setHeight | ( | const std::string & | typeID, |
double | height | ||
) | const |
Definition at line 2027 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, 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 2138 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, 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 2068 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_STRING, 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 1956 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, VAR_LENGTH, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setMaxSpeed | ( | const std::string & | typeID, |
double | speed | ||
) | const |
Definition at line 1966 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, VAR_MAXSPEED, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setMaxSpeedLat | ( | const std::string & | typeID, |
double | speed | ||
) | const |
Definition at line 2058 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, 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 2037 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, VAR_MINGAP, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setMinGapLat | ( | const std::string & | typeID, |
double | minGapLat | ||
) | const |
Definition at line 2048 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, VAR_MINGAP_LAT, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
|
inherited |
set generic paramter
Definition at line 3244 of file TraCIAPI.cpp.
References TYPE_COMPOUND, TYPE_STRING, VAR_PARAMETER, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
void TraCIAPI::VehicleTypeScope::setShapeClass | ( | const std::string & | typeID, |
const std::string & | shapeClass | ||
) | const |
Definition at line 2088 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_STRING, VAR_SHAPECLASS, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setSpeedDeviation | ( | const std::string & | typeID, |
double | deviation | ||
) | const |
Definition at line 1996 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, VAR_SPEED_DEVIATION, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setSpeedFactor | ( | const std::string & | typeID, |
double | factor | ||
) | const |
Definition at line 1986 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, VAR_SPEED_FACTOR, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setTau | ( | const std::string & | typeID, |
double | tau | ||
) | const |
Definition at line 2148 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, 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 1976 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_STRING, VAR_VEHICLECLASS, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleTypeScope::setWidth | ( | const std::string & | typeID, |
double | width | ||
) | const |
Definition at line 2017 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, VAR_WIDTH, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3259 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3271 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
protectedinherited |
Definition at line 146 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 147 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 149 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 151 of file TraCIAPI.h.
|
protectedinherited |
The parent TraCI client which offers the connection.
Definition at line 145 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 148 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 150 of file TraCIAPI.h.