![]() |
SUMO - Simulation of Urban MObility
|
Scope for interaction with vehicle types. More...
#include <TraCIAPI.h>
Public Member Functions | |
void | copy (const std::string &origTypeID, const std::string &newTypeID) const |
double | getAccel (const std::string &typeID) const |
double | getApparentDecel (const std::string &typeID) const |
libsumo::TraCIColor | getColor (const std::string &typeID) 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 |
std::string | getShapeClass (const std::string &typeID) const |
double | getSpeedDeviation (const std::string &typeID) const |
double | getSpeedFactor (const std::string &typeID) 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 | 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 |
VehicleTypeScope (TraCIAPI &parent) | |
virtual | ~VehicleTypeScope () |
Protected Attributes | |
TraCIAPI & | myParent |
The parent TraCI client which offers the connection. More... | |
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 556 of file TraCIAPI.h.
|
inline |
Definition at line 558 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 559 of file TraCIAPI.h.
References TraCIAPI::getColor(), and TraCIAPI::TraCIScopeWrapper::operator=().
|
private |
invalidated copy constructor
void TraCIAPI::VehicleTypeScope::copy | ( | const std::string & | origTypeID, |
const std::string & | newTypeID | ||
) | const |
Definition at line 2019 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 1815 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_ACCEL.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleTypeScope::getApparentDecel | ( | const std::string & | typeID | ) | const |
Definition at line 1830 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_APPARENT_DECEL.
Referenced by TraCITestClient::testAPI().
TraCIColor TraCIAPI::VehicleTypeScope::getColor | ( | const std::string & | typeID | ) | const |
Definition at line 1890 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_COLOR.
double TraCIAPI::VehicleTypeScope::getDecel | ( | const std::string & | typeID | ) | const |
Definition at line 1820 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_DECEL.
double TraCIAPI::VehicleTypeScope::getEmergencyDecel | ( | const std::string & | typeID | ) | const |
Definition at line 1825 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 1850 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_EMISSIONCLASS.
double TraCIAPI::VehicleTypeScope::getHeight | ( | const std::string & | typeID | ) | const |
Definition at line 1885 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 1790 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and ID_LIST.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleTypeScope::getImperfection | ( | const std::string & | typeID | ) | const |
Definition at line 1835 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 1875 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 1795 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_LENGTH.
double TraCIAPI::VehicleTypeScope::getMaxSpeed | ( | const std::string & | typeID | ) | const |
Definition at line 1800 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_MAXSPEED.
double TraCIAPI::VehicleTypeScope::getMaxSpeedLat | ( | const std::string & | typeID | ) | const |
Definition at line 1870 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 1860 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_MINGAP.
double TraCIAPI::VehicleTypeScope::getMinGapLat | ( | const std::string & | typeID | ) | const |
Definition at line 1865 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_MINGAP_LAT.
Referenced by TraCITestClient::testAPI().
std::string TraCIAPI::VehicleTypeScope::getShapeClass | ( | const std::string & | typeID | ) | const |
Definition at line 1855 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_SHAPECLASS.
double TraCIAPI::VehicleTypeScope::getSpeedDeviation | ( | const std::string & | typeID | ) | const |
Definition at line 1810 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 1805 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_SPEED_FACTOR.
double TraCIAPI::VehicleTypeScope::getTau | ( | const std::string & | typeID | ) | const |
Definition at line 1840 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 1845 of file TraCIAPI.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, and VAR_VEHICLECLASS.
double TraCIAPI::VehicleTypeScope::getWidth | ( | const std::string & | typeID | ) | const |
Definition at line 1880 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 2039 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 2069 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 2099 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 2049 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 2059 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 1948 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 1968 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 2079 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 2009 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 1897 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 1907 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 1999 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 1978 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 1989 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().
void TraCIAPI::VehicleTypeScope::setShapeClass | ( | const std::string & | typeID, |
const std::string & | shapeClass | ||
) | const |
Definition at line 2029 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 1937 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 1927 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 2089 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 1917 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 1958 of file TraCIAPI.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, TYPE_DOUBLE, VAR_WIDTH, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
The parent TraCI client which offers the connection.
Definition at line 129 of file TraCIAPI.h.