Eclipse SUMO - Simulation of Urban MObility
|
APIs for getting/setting vehicle values via TraCI. More...
#include <TraCIServerAPI_Vehicle.h>
Static Public Member Functions | |
static bool | processGet (TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage) |
Processes a get value command (Command 0xa4: Get Vehicle Variable) | |
static bool | processSet (TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage) |
Processes a set value command (Command 0xc4: Change Vehicle State) | |
Private Member Functions | |
TraCIServerAPI_Vehicle & | operator= (const TraCIServerAPI_Vehicle &s) |
invalidated assignment operator | |
TraCIServerAPI_Vehicle (const TraCIServerAPI_Vehicle &s) | |
invalidated copy constructor | |
Static Private Member Functions | |
static bool | insertReplaceStop (TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage, const std::string &id, bool replace) |
static void | writeNextStops (TraCIServer &server, const std::string &id, int limit, bool full) |
helper function to write the response for VAR_NEXT_STOPS and VAR_NEXT_STOPS2 | |
APIs for getting/setting vehicle values via TraCI.
Definition at line 36 of file TraCIServerAPI_Vehicle.h.
|
private |
invalidated copy constructor
|
staticprivate |
Definition at line 1483 of file TraCIServerAPI_Vehicle.cpp.
References libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::INVALID_DOUBLE_VALUE, tcpip::Storage::readInt(), TraCIServer::readTypeCheckingByte(), TraCIServer::readTypeCheckingDouble(), TraCIServer::readTypeCheckingInt(), TraCIServer::readTypeCheckingString(), tcpip::Storage::readUnsignedByte(), libsumo::TYPE_COMPOUND, and TraCIServer::writeErrorStatusCmd().
Referenced by processSet().
|
private |
invalidated assignment operator
|
static |
Processes a get value command (Command 0xa4: Get Vehicle Variable)
[in] | server | The TraCI-server-instance which schedules this request |
[in] | inputStorage | The storage to read the command from |
[out] | outputStorage | The storage to write the result to |
Definition at line 58 of file TraCIServerAPI_Vehicle.cpp.
References libsumo::TraCIBestLanesData::allowsContinuation, libsumo::TraCIBestLanesData::bestLaneOffset, libsumo::CMD_CHANGELANE, libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::TraCIBestLanesData::continuationLanes, libsumo::DISTANCE_REQUEST, TraCIServer::getWrapperStorage(), TraCIServer::initWrapper(), libsumo::TraCIBestLanesData::laneID, libsumo::TraCIBestLanesData::length, libsumo::TraCIBestLanesData::occupation, libsumo::POSITION_2D, libsumo::POSITION_3D, libsumo::POSITION_ROADMAP, tcpip::Storage::readDouble(), tcpip::Storage::readInt(), tcpip::Storage::readString(), TraCIServer::readTypeCheckingByte(), TraCIServer::readTypeCheckingDouble(), TraCIServer::readTypeCheckingInt(), TraCIServer::readTypeCheckingString(), TraCIServer::readTypeCheckingUnsignedByte(), tcpip::Storage::readUnsignedByte(), libsumo::REQUEST_DRIVINGDIST, libsumo::RESPONSE_GET_VEHICLE_VARIABLE, libsumo::RTYPE_OK, toHex(), libsumo::TYPE_BYTE, libsumo::TYPE_COMPOUND, libsumo::TYPE_DOUBLE, libsumo::TYPE_INTEGER, libsumo::TYPE_STRING, libsumo::TYPE_STRINGLIST, libsumo::TYPE_UBYTE, libsumo::VAR_BEST_LANES, libsumo::VAR_EDGE_EFFORT, libsumo::VAR_EDGE_TRAVELTIME, libsumo::VAR_FOES, libsumo::VAR_FOLLOW_SPEED, libsumo::VAR_NEIGHBORS, libsumo::VAR_NEXT_LINKS, libsumo::VAR_NEXT_STOPS, libsumo::VAR_NEXT_STOPS2, libsumo::VAR_NEXT_TLS, libsumo::VAR_SECURE_GAP, libsumo::VAR_STOP_PARAMETER, libsumo::VAR_STOP_SPEED, libsumo::VAR_TAXI_FLEET, tcpip::Storage::writeByte(), tcpip::Storage::writeChar(), tcpip::Storage::writeDouble(), TraCIServer::writeErrorStatusCmd(), tcpip::Storage::writeInt(), writeNextStops(), TraCIServer::writeResponseWithLength(), TraCIServer::writeStatusCmd(), tcpip::Storage::writeStorage(), tcpip::Storage::writeString(), tcpip::Storage::writeStringList(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCIServer::TraCIServer().
|
static |
Processes a set value command (Command 0xc4: Change Vehicle State)
[in] | server | The TraCI-server-instance which schedules this request |
[in] | inputStorage | The storage to read the command from |
[out] | outputStorage | The storage to write the result to |
XXX but a big try/catch around all retrieval cases
Definition at line 469 of file TraCIServerAPI_Vehicle.cpp.
References libsumo::ADD, libsumo::ADD_FULL, ALLOWED_FREE, AVG, BASE, BEGIN, BEST_FREE, libsumo::CMD_CHANGELANE, libsumo::CMD_CHANGESUBLANE, libsumo::CMD_CHANGETARGET, libsumo::CMD_GET_VEHICLE_VARIABLE, libsumo::CMD_INSERT_STOP, libsumo::CMD_OPENGAP, libsumo::CMD_REPLACE_STOP, libsumo::CMD_REROUTE_EFFORT, libsumo::CMD_REROUTE_TO_PARKING, libsumo::CMD_REROUTE_TRAVELTIME, libsumo::CMD_RESUME, libsumo::CMD_SET_POI_VARIABLE, libsumo::CMD_SET_VEHICLE_VARIABLE, libsumo::CMD_SLOWDOWN, libsumo::CMD_STOP, libsumo::CMD_TAXI_DISPATCH, CONTAINER_TRIGGERED, DELTA_T, DESIRED, FIRST_ALLOWED, FREE, MSBaseVehicle::getEdge(), MSVehicleType::getID(), Named::getID(), MSNet::getInstance(), MSEdge::getLanes(), MSBaseVehicle::getSingularType(), MSVehicleControl::getVehicle(), MSNet::getVehicleControl(), GIVEN, insertReplaceStop(), libsumo::INVALID_DOUBLE_VALUE, LAST, LIMIT, MAX, libsumo::MOVE_AUTOMATIC, libsumo::MOVE_TO_XY, NOW, RANDOM, RANDOM_FREE, tcpip::Storage::readDouble(), tcpip::Storage::readInt(), tcpip::Storage::readString(), TraCIServer::readTypeCheckingByte(), TraCIServer::readTypeCheckingColor(), TraCIServer::readTypeCheckingDouble(), TraCIServer::readTypeCheckingInt(), TraCIServer::readTypeCheckingString(), TraCIServer::readTypeCheckingStringList(), TraCIServer::readTypeCheckingUnsignedByte(), tcpip::Storage::readUnsignedByte(), libsumo::REMOVE, libsumo::RTYPE_ERR, libsumo::RTYPE_OK, TraCIServerAPI_VehicleType::setVariable(), SIMTIME, SPLIT, STEPS2TIME, SUMOTime_MAX, toHex(), toString(), TRIGGERED, libsumo::TYPE_COMPOUND, libsumo::TYPE_DOUBLE, libsumo::VAR_ACCEL, libsumo::VAR_ACCELERATION, libsumo::VAR_ACTIONSTEPLENGTH, libsumo::VAR_APPARENT_DECEL, libsumo::VAR_BOARDING_DURATION, libsumo::VAR_COLOR, libsumo::VAR_DECEL, libsumo::VAR_EDGE_EFFORT, libsumo::VAR_EDGE_TRAVELTIME, libsumo::VAR_EMERGENCY_DECEL, libsumo::VAR_EMISSIONCLASS, libsumo::VAR_HEIGHT, libsumo::VAR_HIGHLIGHT, libsumo::VAR_IMPATIENCE, libsumo::VAR_IMPERFECTION, libsumo::VAR_LANECHANGE_MODE, libsumo::VAR_LANEPOSITION_LAT, libsumo::VAR_LATALIGNMENT, libsumo::VAR_LENGTH, libsumo::VAR_LINE, libsumo::VAR_MASS, libsumo::VAR_MAXSPEED, libsumo::VAR_MAXSPEED_LAT, libsumo::VAR_MINGAP, libsumo::VAR_MINGAP_LAT, libsumo::VAR_MOVE_TO, libsumo::VAR_PARAMETER, libsumo::VAR_PREV_SPEED, libsumo::VAR_ROUTE, libsumo::VAR_ROUTE_ID, libsumo::VAR_ROUTING_MODE, libsumo::VAR_SHAPECLASS, libsumo::VAR_SIGNALS, libsumo::VAR_SPEED, libsumo::VAR_SPEED_FACTOR, libsumo::VAR_SPEEDSETMODE, libsumo::VAR_STOP_PARAMETER, libsumo::VAR_TAU, libsumo::VAR_TYPE, libsumo::VAR_UPDATE_BESTLANES, libsumo::VAR_VEHICLECLASS, libsumo::VAR_VIA, libsumo::VAR_WIDTH, TraCIServer::writeErrorStatusCmd(), and TraCIServer::writeStatusCmd().
Referenced by TraCIServer::TraCIServer().
|
staticprivate |
helper function to write the response for VAR_NEXT_STOPS and VAR_NEXT_STOPS2
Definition at line 1436 of file TraCIServerAPI_Vehicle.cpp.
References TraCIServer::getWrapperStorage(), libsumo::TYPE_COMPOUND, libsumo::TYPE_DOUBLE, libsumo::TYPE_INTEGER, libsumo::TYPE_STRING, tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by processGet().