![]() |
SUMO - Simulation of Urban MObility
|
Scope for interaction with vehicles. More...
#include <TraCIAPI.h>
Public Member Functions | |
VehicleScope (TraCIAPI &parent) | |
virtual | ~VehicleScope () |
vehicle value retrieval | |
std::vector< std::string > | getIDList () const |
int | getIDCount () const |
double | getSpeed (const std::string &vehicleID) const |
libsumo::TraCIPosition | getPosition (const std::string &vehicleID) const |
libsumo::TraCIPosition | getPosition3D (const std::string &vehicleID) const |
double | getAngle (const std::string &vehicleID) const |
std::string | getRoadID (const std::string &vehicleID) const |
std::string | getLaneID (const std::string &vehicleID) const |
int | getLaneIndex (const std::string &vehicleID) const |
std::string | getTypeID (const std::string &vehicleID) const |
std::string | getRouteID (const std::string &vehicleID) const |
int | getRouteIndex (const std::string &vehicleID) const |
std::vector< std::string > | getEdges (const std::string &vehicleID) const |
std::vector< std::string > | getRoute (const std::string &vehicleID) const |
libsumo::TraCIColor | getColor (const std::string &vehicleID) const |
double | getLanePosition (const std::string &vehicleID) const |
double | getDistance (const std::string &vehicleID) const |
int | getSignalStates (const std::string &vehicleID) const |
double | getCO2Emission (const std::string &vehicleID) const |
double | getCOEmission (const std::string &vehicleID) const |
double | getHCEmission (const std::string &vehicleID) const |
double | getPMxEmission (const std::string &vehicleID) const |
double | getNOxEmission (const std::string &vehicleID) const |
double | getFuelConsumption (const std::string &vehicleID) const |
double | getNoiseEmission (const std::string &vehicleID) const |
double | getElectricityConsumption (const std::string &vehicleID) const |
int | getSpeedMode (const std::string &vehicleID) const |
int | getStopState (const std::string &vehicleID) const |
double | getWaitingTime (const std::string &vehicleID) const |
double | getAccumulatedWaitingTime (const std::string &vehicleID) const |
double | getSlope (const std::string &vehicleID) const |
double | getAllowedSpeed (const std::string &vehicleID) const |
int | getPersonNumber (const std::string &vehicleID) const |
double | getSpeedWithoutTraCI (const std::string &vehicleID) const |
bool | isRouteValid (const std::string &vehicleID) const |
double | getLateralLanePosition (const std::string &vehicleID) const |
double | getSpeedFactor (const std::string &vehicleID) const |
std::string | getLine (const std::string &vehicleID) const |
std::vector< std::string > | getVia (const std::string &vehicleID) const |
std::vector< libsumo::TraCINextTLSData > | getNextTLS (const std::string &vehID) const |
std::vector< libsumo::TraCIBestLanesData > | getBestLanes (const std::string &vehicleID) const |
std::pair< std::string, double > | getLeader (const std::string &vehicleID, double dist) const |
vehicle type value retrieval shortcuts | |
double | getLength (const std::string &vehicleID) const |
double | getMaxSpeed (const std::string &vehicleID) const |
double | getAccel (const std::string &vehicleID) const |
double | getDecel (const std::string &vehicleID) const |
double | getEmergencyDecel (const std::string &vehicleID) const |
double | getApparentDecel (const std::string &vehicleID) const |
double | getTau (const std::string &vehicleID) const |
double | getImperfection (const std::string &vehicleID) const |
double | getSpeedDeviation (const std::string &vehicleID) const |
double | getMinGap (const std::string &vehicleID) const |
double | getWidth (const std::string &vehicleID) const |
double | getHeight (const std::string &veihcleID) const |
double | getMaxSpeedLat (const std::string &vehicleID) const |
double | getMinGapLat (const std::string &vehicleID) const |
std::string | getVehicleClass (const std::string &vehicleID) const |
std::string | getEmissionClass (const std::string &vehicleID) const |
std::string | getShapeClass (const std::string &vehicleID) const |
std::string | getLateralAlignment (const std::string &vehicleID) const |
vehicle state changing | |
void | add (const std::string &vehicleID, const std::string &routeID, const std::string &typeID="DEFAULT_VEHTYPE", std::string depart="-1", const std::string &departLane="first", const std::string &departPos="base", const std::string &departSpeed="0", const std::string &arrivalLane="current", const std::string &arrivalPos="max", const std::string &arrivalSpeed="current", const std::string &fromTaz="", const std::string &toTaz="", const std::string &line="", int personCapacity=0, int personNumber=0) const |
void | changeTarget (const std::string &vehicleID, const std::string &edgeID) const |
void | setRouteID (const std::string &vehicleID, const std::string &routeID) const |
void | setRoute (const std::string &vehicleID, const std::vector< std::string > &edge) const |
void | rerouteTraveltime (const std::string &vehicleID, bool currentTravelTimes=true) const |
void | moveTo (const std::string &vehicleID, const std::string &laneID, double position) const |
void | moveToXY (const std::string &vehicleID, const std::string &edgeID, const int lane, const double x, const double y, const double angle, const int keepRoute) const |
void | slowDown (const std::string &vehicleID, double speed, SUMOTime duration) const |
void | setSpeed (const std::string &vehicleID, double speed) const |
void | setType (const std::string &vehicleID, const std::string &typeID) const |
void | remove (const std::string &vehicleID, char reason=REMOVE_VAPORIZED) const |
void | setColor (const std::string &vehicleID, const libsumo::TraCIColor &c) const |
void | setLine (const std::string &vehicleID, const std::string &line) const |
void | setVia (const std::string &vehicleID, const std::vector< std::string > &via) const |
vehicle type attribute changing shortcuts | |
void | setShapeClass (const std::string &vehicleID, const std::string &clazz) const |
void | setEmissionClass (const std::string &vehicleID, const std::string &clazz) const |
void | setMaxSpeed (const std::string &vehicleID, double speed) const |
Protected Attributes | |
TraCIAPI & | myParent |
The parent TraCI client which offers the connection. More... | |
Private Member Functions | |
VehicleScope & | operator= (const VehicleScope &src) |
invalidated assignment operator More... | |
VehicleScope (const VehicleScope &src) | |
invalidated copy constructor More... | |
Private Attributes | |
SUMOTime | LAST_TRAVEL_TIME_UPDATE |
Scope for interaction with vehicles.
Definition at line 621 of file TraCIAPI.h.
|
inline |
Definition at line 623 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 624 of file TraCIAPI.h.
References TraCIAPI::edge, TraCIAPI::getColor(), TraCIAPI::getPosition(), TraCIAPI::getPosition3D(), TraCIAPI::lane, and REMOVE_VAPORIZED.
|
private |
invalidated copy constructor
void TraCIAPI::VehicleScope::add | ( | const std::string & | vehicleID, |
const std::string & | routeID, | ||
const std::string & | typeID = "DEFAULT_VEHTYPE" , |
||
std::string | depart = "-1" , |
||
const std::string & | departLane = "first" , |
||
const std::string & | departPos = "base" , |
||
const std::string & | departSpeed = "0" , |
||
const std::string & | arrivalLane = "current" , |
||
const std::string & | arrivalPos = "max" , |
||
const std::string & | arrivalSpeed = "current" , |
||
const std::string & | fromTaz = "" , |
||
const std::string & | toTaz = "" , |
||
const std::string & | line = "" , |
||
int | personCapacity = 0 , |
||
int | personNumber = 0 |
||
) | const |
Definition at line 2476 of file TraCIAPI.cpp.
References ADD_FULL, CMD_SET_VEHICLE_VARIABLE, TraCIAPI::toString(), TYPE_COMPOUND, TYPE_INTEGER, TYPE_STRING, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleScope::changeTarget | ( | const std::string & | vehicleID, |
const std::string & | edgeID | ||
) | const |
Definition at line 2548 of file TraCIAPI.cpp.
References CMD_CHANGETARGET, CMD_SET_VEHICLE_VARIABLE, TYPE_STRING, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleScope::getAccel | ( | const std::string & | vehicleID | ) | const |
Definition at line 2381 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_ACCEL.
double TraCIAPI::VehicleScope::getAccumulatedWaitingTime | ( | const std::string & | vehicleID | ) | const |
Definition at line 2436 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_ACCUMULATED_WAITING_TIME.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleScope::getAllowedSpeed | ( | const std::string & | vehicleID | ) | const |
Definition at line 2441 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_ALLOWED_SPEED.
double TraCIAPI::VehicleScope::getAngle | ( | const std::string & | vehicleID | ) | const |
Definition at line 2149 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_ANGLE.
double TraCIAPI::VehicleScope::getApparentDecel | ( | const std::string & | vehicleID | ) | const |
std::vector< TraCIBestLanesData > TraCIAPI::VehicleScope::getBestLanes | ( | const std::string & | vehicleID | ) | const |
Definition at line 2320 of file TraCIAPI.cpp.
References libsumo::TraCIBestLanesData::allowsContinuation, libsumo::TraCIBestLanesData::bestLaneOffset, CMD_GET_VEHICLE_VARIABLE, libsumo::TraCIBestLanesData::continuationLanes, libsumo::TraCIBestLanesData::laneID, libsumo::TraCIBestLanesData::length, libsumo::TraCIBestLanesData::occupation, tcpip::Storage::readByte(), tcpip::Storage::readDouble(), tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), TYPE_COMPOUND, and VAR_BEST_LANES.
double TraCIAPI::VehicleScope::getCO2Emission | ( | const std::string & | vehicleID | ) | const |
Definition at line 2214 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_CO2EMISSION.
double TraCIAPI::VehicleScope::getCOEmission | ( | const std::string & | vehicleID | ) | const |
Definition at line 2219 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_COEMISSION.
TraCIColor TraCIAPI::VehicleScope::getColor | ( | const std::string & | vehicleID | ) | const |
Definition at line 2194 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_COLOR.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleScope::getDecel | ( | const std::string & | vehicleID | ) | const |
Definition at line 2386 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_DECEL.
double TraCIAPI::VehicleScope::getDistance | ( | const std::string & | vehicleID | ) | const |
Definition at line 2204 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_DISTANCE.
std::vector< std::string > TraCIAPI::VehicleScope::getEdges | ( | const std::string & | vehicleID | ) | const |
Definition at line 2184 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleScope::getElectricityConsumption | ( | const std::string & | vehicleID | ) | const |
Definition at line 2249 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_ELECTRICITYCONSUMPTION.
double TraCIAPI::VehicleScope::getEmergencyDecel | ( | const std::string & | vehicleID | ) | const |
std::string TraCIAPI::VehicleScope::getEmissionClass | ( | const std::string & | vehicleID | ) | const |
Definition at line 2281 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_EMISSIONCLASS.
double TraCIAPI::VehicleScope::getFuelConsumption | ( | const std::string & | vehicleID | ) | const |
Definition at line 2239 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_FUELCONSUMPTION.
double TraCIAPI::VehicleScope::getHCEmission | ( | const std::string & | vehicleID | ) | const |
Definition at line 2224 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_HCEMISSION.
double TraCIAPI::VehicleScope::getHeight | ( | const std::string & | veihcleID | ) | const |
Definition at line 2431 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_HEIGHT.
int TraCIAPI::VehicleScope::getIDCount | ( | ) | const |
Definition at line 2124 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and ID_COUNT.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::VehicleScope::getIDList | ( | ) | const |
Definition at line 2119 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and ID_LIST.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleScope::getImperfection | ( | const std::string & | vehicleID | ) | const |
Definition at line 2396 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_IMPERFECTION.
std::string TraCIAPI::VehicleScope::getLaneID | ( | const std::string & | vehicleID | ) | const |
Definition at line 2159 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_LANE_ID.
Referenced by TraCITestClient::testAPI().
int TraCIAPI::VehicleScope::getLaneIndex | ( | const std::string & | vehicleID | ) | const |
Definition at line 2164 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_LANE_INDEX.
double TraCIAPI::VehicleScope::getLanePosition | ( | const std::string & | vehicleID | ) | const |
Definition at line 2199 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_LANEPOSITION.
Referenced by TraCITestClient::testAPI().
std::string TraCIAPI::VehicleScope::getLateralAlignment | ( | const std::string & | vehicleID | ) | const |
Definition at line 2471 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_LATALIGNMENT.
double TraCIAPI::VehicleScope::getLateralLanePosition | ( | const std::string & | vehicleID | ) | const |
Definition at line 2209 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_LANEPOSITION_LAT.
Referenced by TraCITestClient::testAPI().
std::pair< std::string, double > TraCIAPI::VehicleScope::getLeader | ( | const std::string & | vehicleID, |
double | dist | ||
) | const |
Definition at line 2359 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, tcpip::Storage::readDouble(), tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), TYPE_COMPOUND, TYPE_DOUBLE, VAR_LEADER, tcpip::Storage::writeByte(), and tcpip::Storage::writeDouble().
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleScope::getLength | ( | const std::string & | vehicleID | ) | const |
Definition at line 2426 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_LENGTH.
std::string TraCIAPI::VehicleScope::getLine | ( | const std::string & | vehicleID | ) | const |
Definition at line 2271 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_LINE.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleScope::getMaxSpeed | ( | const std::string & | vehicleID | ) | const |
Definition at line 2134 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_MAXSPEED.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleScope::getMaxSpeedLat | ( | const std::string & | vehicleID | ) | const |
Definition at line 2461 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_MAXSPEED_LAT.
double TraCIAPI::VehicleScope::getMinGap | ( | const std::string & | vehicleID | ) | const |
Definition at line 2416 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_MINGAP.
double TraCIAPI::VehicleScope::getMinGapLat | ( | const std::string & | vehicleID | ) | const |
Definition at line 2466 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_MINGAP_LAT.
std::vector< TraCINextTLSData > TraCIAPI::VehicleScope::getNextTLS | ( | const std::string & | vehID | ) | const |
Definition at line 2291 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, libsumo::TraCINextTLSData::dist, libsumo::TraCINextTLSData::id, tcpip::Storage::readByte(), tcpip::Storage::readDouble(), tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), libsumo::TraCINextTLSData::state, libsumo::TraCINextTLSData::tlIndex, TYPE_COMPOUND, and VAR_NEXT_TLS.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleScope::getNoiseEmission | ( | const std::string & | vehicleID | ) | const |
Definition at line 2244 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_NOISEEMISSION.
double TraCIAPI::VehicleScope::getNOxEmission | ( | const std::string & | vehicleID | ) | const |
Definition at line 2234 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_NOXEMISSION.
int TraCIAPI::VehicleScope::getPersonNumber | ( | const std::string & | vehicleID | ) | const |
Definition at line 2446 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_PERSON_NUMBER.
double TraCIAPI::VehicleScope::getPMxEmission | ( | const std::string & | vehicleID | ) | const |
Definition at line 2229 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_PMXEMISSION.
TraCIPosition TraCIAPI::VehicleScope::getPosition | ( | const std::string & | vehicleID | ) | const |
Definition at line 2139 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_POSITION.
TraCIPosition TraCIAPI::VehicleScope::getPosition3D | ( | const std::string & | vehicleID | ) | const |
Definition at line 2144 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_POSITION3D.
std::string TraCIAPI::VehicleScope::getRoadID | ( | const std::string & | vehicleID | ) | const |
Definition at line 2154 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_ROAD_ID.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::VehicleScope::getRoute | ( | const std::string & | vehicleID | ) | const |
Definition at line 2189 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_EDGES.
std::string TraCIAPI::VehicleScope::getRouteID | ( | const std::string & | vehicleID | ) | const |
Definition at line 2174 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_ROUTE_ID.
Referenced by TraCITestClient::testAPI().
int TraCIAPI::VehicleScope::getRouteIndex | ( | const std::string & | vehicleID | ) | const |
Definition at line 2179 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_ROUTE_INDEX.
std::string TraCIAPI::VehicleScope::getShapeClass | ( | const std::string & | vehicleID | ) | const |
Definition at line 2286 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_SHAPECLASS.
Referenced by TraCITestClient::testAPI().
int TraCIAPI::VehicleScope::getSignalStates | ( | const std::string & | vehicleID | ) | const |
double TraCIAPI::VehicleScope::getSlope | ( | const std::string & | vehicleID | ) | const |
Definition at line 2265 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_SLOPE.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleScope::getSpeed | ( | const std::string & | vehicleID | ) | const |
Definition at line 2129 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_SPEED.
double TraCIAPI::VehicleScope::getSpeedDeviation | ( | const std::string & | vehicleID | ) | const |
Definition at line 2406 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_SPEED_DEVIATION.
double TraCIAPI::VehicleScope::getSpeedFactor | ( | const std::string & | vehicleID | ) | const |
Definition at line 2401 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_SPEED_FACTOR.
int TraCIAPI::VehicleScope::getSpeedMode | ( | const std::string & | vehicleID | ) | const |
Definition at line 2259 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_SPEEDSETMODE.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleScope::getSpeedWithoutTraCI | ( | const std::string & | vehicleID | ) | const |
Definition at line 2451 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_SPEED_WITHOUT_TRACI.
int TraCIAPI::VehicleScope::getStopState | ( | const std::string & | vehicleID | ) | const |
Definition at line 2376 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_STOPSTATE.
double TraCIAPI::VehicleScope::getTau | ( | const std::string & | vehicleID | ) | const |
Definition at line 2391 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_TAU.
std::string TraCIAPI::VehicleScope::getTypeID | ( | const std::string & | vehicleID | ) | const |
Definition at line 2169 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_TYPE.
Referenced by TraCITestClient::testAPI().
std::string TraCIAPI::VehicleScope::getVehicleClass | ( | const std::string & | vehicleID | ) | const |
Definition at line 2411 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_VEHICLECLASS.
std::vector< std::string > TraCIAPI::VehicleScope::getVia | ( | const std::string & | vehicleID | ) | const |
Definition at line 2276 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_VIA.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleScope::getWaitingTime | ( | const std::string & | vehicleID | ) | const |
Definition at line 2254 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_WAITING_TIME.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::VehicleScope::getWidth | ( | const std::string & | vehicleID | ) | const |
Definition at line 2421 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_WIDTH.
bool TraCIAPI::VehicleScope::isRouteValid | ( | const std::string & | vehicleID | ) | const |
Definition at line 2456 of file TraCIAPI.cpp.
References CMD_GET_VEHICLE_VARIABLE, and VAR_ROUTE_VALID.
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleScope::moveTo | ( | const std::string & | vehicleID, |
const std::string & | laneID, | ||
double | position | ||
) | const |
Definition at line 2605 of file TraCIAPI.cpp.
References CMD_SET_VEHICLE_VARIABLE, TYPE_COMPOUND, TYPE_DOUBLE, TYPE_STRING, VAR_MOVE_TO, tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleScope::moveToXY | ( | const std::string & | vehicleID, |
const std::string & | edgeID, | ||
const int | lane, | ||
const double | x, | ||
const double | y, | ||
const double | angle, | ||
const int | keepRoute | ||
) | const |
Definition at line 2619 of file TraCIAPI.cpp.
References CMD_SET_VEHICLE_VARIABLE.
Referenced by TraCITestClient::testAPI().
|
private |
invalidated assignment operator
void TraCIAPI::VehicleScope::remove | ( | const std::string & | vehicleID, |
char | reason = REMOVE_VAPORIZED |
||
) | const |
Definition at line 2537 of file TraCIAPI.cpp.
References CMD_SET_VEHICLE_VARIABLE, REMOVE, TYPE_BYTE, and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleScope::rerouteTraveltime | ( | const std::string & | vehicleID, |
bool | currentTravelTimes = true |
||
) | const |
Definition at line 2583 of file TraCIAPI.cpp.
References CMD_REROUTE_TRAVELTIME, CMD_SET_VEHICLE_VARIABLE, TYPE_COMPOUND, tcpip::Storage::writeInt(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleScope::setColor | ( | const std::string & | vehicleID, |
const libsumo::TraCIColor & | c | ||
) | const |
Definition at line 2671 of file TraCIAPI.cpp.
References libsumo::TraCIColor::a, libsumo::TraCIColor::b, CMD_SET_VEHICLE_VARIABLE, libsumo::TraCIColor::g, libsumo::TraCIColor::r, TYPE_COLOR, VAR_COLOR, and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleScope::setEmissionClass | ( | const std::string & | vehicleID, |
const std::string & | clazz | ||
) | const |
Definition at line 2719 of file TraCIAPI.cpp.
References CMD_SET_VEHICLE_VARIABLE, TYPE_STRING, VAR_EMISSIONCLASS, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleScope::setLine | ( | const std::string & | vehicleID, |
const std::string & | line | ||
) | const |
Definition at line 2684 of file TraCIAPI.cpp.
References CMD_SET_VEHICLE_VARIABLE, TYPE_STRING, VAR_LINE, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleScope::setMaxSpeed | ( | const std::string & | vehicleID, |
double | speed | ||
) | const |
Definition at line 2661 of file TraCIAPI.cpp.
References CMD_SET_VEHICLE_VARIABLE, TYPE_DOUBLE, VAR_MAXSPEED, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleScope::setRoute | ( | const std::string & | vehicleID, |
const std::vector< std::string > & | edge | ||
) | const |
Definition at line 2569 of file TraCIAPI.cpp.
References CMD_SET_VEHICLE_VARIABLE, TYPE_STRINGLIST, VAR_ROUTE, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleScope::setRouteID | ( | const std::string & | vehicleID, |
const std::string & | routeID | ||
) | const |
Definition at line 2558 of file TraCIAPI.cpp.
References CMD_SET_VEHICLE_VARIABLE, TYPE_STRING, VAR_ROUTE_ID, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleScope::setShapeClass | ( | const std::string & | vehicleID, |
const std::string & | clazz | ||
) | const |
Definition at line 2708 of file TraCIAPI.cpp.
References CMD_SET_VEHICLE_VARIABLE, TYPE_STRING, VAR_SHAPECLASS, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleScope::setSpeed | ( | const std::string & | vehicleID, |
double | speed | ||
) | const |
Definition at line 2641 of file TraCIAPI.cpp.
References CMD_SET_VEHICLE_VARIABLE, TYPE_DOUBLE, VAR_SPEED, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::VehicleScope::setType | ( | const std::string & | vehicleID, |
const std::string & | typeID | ||
) | const |
Definition at line 2651 of file TraCIAPI.cpp.
References CMD_SET_VEHICLE_VARIABLE, TYPE_STRING, VAR_TYPE, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleScope::setVia | ( | const std::string & | vehicleID, |
const std::vector< std::string > & | via | ||
) | const |
Definition at line 2694 of file TraCIAPI.cpp.
References CMD_SET_VEHICLE_VARIABLE, TYPE_STRINGLIST, VAR_VIA, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::VehicleScope::slowDown | ( | const std::string & | vehicleID, |
double | speed, | ||
SUMOTime | duration | ||
) | const |
Definition at line 2627 of file TraCIAPI.cpp.
References CMD_SET_VEHICLE_VARIABLE, CMD_SLOWDOWN, TYPE_COMPOUND, TYPE_DOUBLE, TYPE_INTEGER, tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), and tcpip::Storage::writeUnsignedByte().
|
mutableprivate |
Definition at line 735 of file TraCIAPI.h.
|
protectedinherited |
The parent TraCI client which offers the connection.
Definition at line 129 of file TraCIAPI.h.