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 (traci::TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage) |
Processes a get value command (Command 0xa4: Get Vehicle Variable) | |
static bool | processSet (traci::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 | commandDistanceRequest (traci::TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage, const MSVehicle *v) |
static MSVehicleType & | getSingularType (SUMOVehicle *const veh) |
APIs for getting/setting vehicle values via TraCI.
Definition at line 49 of file TraCIServerAPI_Vehicle.h.
TraCIServerAPI_Vehicle::TraCIServerAPI_Vehicle | ( | const TraCIServerAPI_Vehicle & | s | ) | [private] |
invalidated copy constructor
bool TraCIServerAPI_Vehicle::commandDistanceRequest | ( | traci::TraCIServer & | server, |
tcpip::Storage & | inputStorage, | ||
tcpip::Storage & | outputStorage, | ||
const MSVehicle * | v | ||
) | [static, private] |
Definition at line 1013 of file TraCIServerAPI_Vehicle.cpp.
References CMD_GET_VEHICLE_VARIABLE, TraCIServerAPI_Simulation::convertCartesianToRoadMap(), Position::distanceTo(), MSRoute::getDistanceBetween(), MSBaseVehicle::getEdge(), TraCIServerAPI_Simulation::getLaneChecking(), MSVehicle::getPosition(), MSVehicle::getPositionOnLane(), MSBaseVehicle::getRoute(), INVALID_DOUBLE_VALUE, MSVehicle::isOnRoad(), max, POSITION_2D, POSITION_3D, POSITION_ROADMAP, tcpip::Storage::readDouble(), tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), REQUEST_DRIVINGDIST, RTYPE_ERR, Position::set(), SUMOReal, TYPE_COMPOUND, TYPE_DOUBLE, tcpip::Storage::writeDouble(), traci::TraCIServer::writeStatusCmd(), and tcpip::Storage::writeUnsignedByte().
MSVehicleType & TraCIServerAPI_Vehicle::getSingularType | ( | SUMOVehicle *const | veh | ) | [static, private] |
Definition at line 1081 of file TraCIServerAPI_Vehicle.cpp.
References MSVehicleType::build(), SUMOVehicle::getID(), MSVehicleType::getID(), and SUMOVehicle::getVehicleType().
TraCIServerAPI_Vehicle& TraCIServerAPI_Vehicle::operator= | ( | const TraCIServerAPI_Vehicle & | s | ) | [private] |
invalidated assignment operator
bool TraCIServerAPI_Vehicle::processGet | ( | traci::TraCIServer & | server, |
tcpip::Storage & | inputStorage, | ||
tcpip::Storage & | outputStorage | ||
) | [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 70 of file TraCIServerAPI_Vehicle.cpp.
References MSVehicle::LaneQ::allowsContinuation, MSRoute::begin(), MSVehicle::LaneQ::bestContinuations, MSVehicle::LaneQ::bestLaneOffset, RGBColor::blue(), CMD_GET_VEHICLE_VARIABLE, CMD_SET_VEHICLE_VARIABLE, SUMOVehicleParameter::color, HelpersHBEFA::computeCO(), HelpersHBEFA::computeCO2(), HelpersHBEFA::computeFuel(), HelpersHBEFA::computeHC(), HelpersHarmonoise::computeNoise(), HelpersHBEFA::computeNOx(), HelpersHBEFA::computePMx(), MSEdge::dictionary(), DISTANCE_REQUEST, MSRoute::end(), MSVehicle::getAngle(), MSVehicle::getBestLanes(), MSLane::getEdge(), MSVehicleType::getEmissionClass(), Named::getID(), MSVehicleType::getID(), MSEdge::getID(), MSNet::getInstance(), MSVehicle::getLane(), MSEdge::getLanes(), MSBaseVehicle::getParameter(), MSVehicle::getPosition(), MSVehicle::getPositionOnLane(), MSVehicle::getPreDawdleAcceleration(), MSBaseVehicle::getRoute(), MSVehicle::getSignals(), MSVehicle::getSpeed(), MSVehicle::getSpeedWithoutTraciInfluence(), TraCIServerAPI_VehicleType::getVariable(), MSVehicleControl::getVehicle(), MSNet::getVehicleControl(), MSBaseVehicle::getVehicleType(), MSVehicle::getWeightsStorage(), RGBColor::green(), MSBaseVehicle::hasValidRoute(), ID_COUNT, ID_LIST, INVALID_DOUBLE_VALUE, INVALID_INT_VALUE, MSVehicle::isOnRoad(), MSVehicle::LaneQ::lane, MSVehicle::LaneQ::length, MSVehicleControl::loadedVehBegin(), MSVehicleControl::loadedVehEnd(), MSVehicle::LaneQ::nextOccupation, POSITION_2D, tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), RGBColor::red(), RESPONSE_GET_VEHICLE_VARIABLE, MSEdgeWeightsStorage::retrieveExistingEffort(), MSEdgeWeightsStorage::retrieveExistingTravelTime(), RTYPE_ERR, RTYPE_OK, MSRoute::size(), SUMOReal, TYPE_BYTE, TYPE_COLOR, TYPE_COMPOUND, TYPE_DOUBLE, TYPE_INTEGER, TYPE_STRING, TYPE_STRINGLIST, TYPE_UBYTE, VAR_ACCEL, VAR_ANGLE, VAR_BEST_LANES, VAR_CO2EMISSION, VAR_COEMISSION, VAR_COLOR, VAR_DECEL, VAR_EDGE_EFFORT, VAR_EDGE_TRAVELTIME, VAR_EDGES, VAR_EMISSIONCLASS, VAR_FUELCONSUMPTION, VAR_HCEMISSION, VAR_IMPERFECTION, VAR_LANE_ID, VAR_LANE_INDEX, VAR_LANEPOSITION, VAR_LENGTH, VAR_MAXSPEED, VAR_MINGAP, VAR_NOISEEMISSION, VAR_NOXEMISSION, VAR_PMXEMISSION, VAR_POSITION, VAR_ROAD_ID, VAR_ROUTE_ID, VAR_ROUTE_VALID, VAR_SHAPECLASS, VAR_SIGNALS, VAR_SPEED, VAR_SPEED_DEVIATION, VAR_SPEED_FACTOR, VAR_SPEED_WITHOUT_TRACI, VAR_TAU, VAR_TYPE, VAR_VEHICLECLASS, VAR_WIDTH, tcpip::Storage::writeByte(), tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), traci::TraCIServer::writeResponseWithLength(), traci::TraCIServer::writeStatusCmd(), tcpip::Storage::writeStorage(), tcpip::Storage::writeString(), tcpip::Storage::writeStringList(), tcpip::Storage::writeUnsignedByte(), Position::x(), and Position::y().
Referenced by traci::TraCIServer::TraCIServer().
bool TraCIServerAPI_Vehicle::processSet | ( | traci::TraCIServer & | server, |
tcpip::Storage & | inputStorage, | ||
tcpip::Storage & | outputStorage | ||
) | [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 |
Definition at line 354 of file TraCIServerAPI_Vehicle.cpp.
References MSInsertionControl::add(), ADD, MSVehicleControl::addVehicle(), MSVehicleControl::buildVehicle(), CMD_CHANGELANE, CMD_CHANGETARGET, CMD_REROUTE_EFFORT, CMD_REROUTE_TRAVELTIME, CMD_SET_VEHICLE_VARIABLE, CMD_SLOWDOWN, CMD_STOP, SUMOVehicleParameter::color, DijkstraRouterTTBase< E, V, PF >::compute(), SUMOVehicleParameter::depart, DEPART_DEF_MAX, DEPART_LANE_DEF_MAX, DEPART_LANE_GIVEN, DEPART_POS_DEF_MAX, DEPART_POS_GIVEN, DEPART_SPEED_DEF_MAX, DEPART_SPEED_GIVEN, SUMOVehicleParameter::departLane, SUMOVehicleParameter::departLaneProcedure, SUMOVehicleParameter::departPos, SUMOVehicleParameter::departPosProcedure, SUMOVehicleParameter::departProcedure, SUMOVehicleParameter::departSpeed, SUMOVehicleParameter::departSpeedProcedure, MSRoute::dictionary(), MSEdge::dictionary(), MSLane::dictionary(), MSEdge::dictSize(), MSLane::forceVehicleInsertion(), SUMOVehicle::getEdge(), MSLane::getEdge(), MSNet::EdgeWeightsProxi::getEffort(), MSBaseVehicle::getID(), SUMOVehicle::getID(), MSNet::getInsertionControl(), MSNet::getInstance(), MSEdge::getLanes(), SUMOVehicle::getParameter(), SUMOVehicle::getSpeed(), MSNet::EdgeWeightsProxi::getTravelTime(), MSVehicleControl::getVehicle(), MSNet::getVehicleControl(), MSVehicleControl::getVType(), SUMOVehicleParameter::id, MAX2(), MSMoveReminder::NOTIFICATION_ARRIVED, MSMoveReminder::NOTIFICATION_PARKING, MSMoveReminder::NOTIFICATION_TELEPORT, MSMoveReminder::NOTIFICATION_TELEPORT_ARRIVED, MSMoveReminder::NOTIFICATION_VAPORIZED, MSEdge::parseEdgesList(), tcpip::Storage::readByte(), tcpip::Storage::readDouble(), tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readStringList(), tcpip::Storage::readUnsignedByte(), REMOVE, SUMOVehicle::replaceRoute(), SUMOVehicle::replaceRouteEdges(), MSBaseVehicle::replaceRouteEdges(), SUMOVehicle::reroute(), RTYPE_ERR, RTYPE_OK, MSVehicleControl::scheduleVehicleRemoval(), RGBColor::set(), TraCIServerAPI_VehicleType::setVariable(), SUMOVehicle::succEdge(), SUMOReal, SUMOTime_MAX, TYPE_BYTE, TYPE_COLOR, TYPE_COMPOUND, TYPE_DOUBLE, TYPE_INTEGER, TYPE_STRING, TYPE_STRINGLIST, VAR_ACCEL, VAR_COLOR, VAR_DECEL, VAR_EDGE_EFFORT, VAR_EDGE_TRAVELTIME, VAR_EMISSIONCLASS, VAR_IMPERFECTION, VAR_LENGTH, VAR_MAXSPEED, VAR_MINGAP, VAR_MOVE_TO, VAR_ROUTE, VAR_ROUTE_ID, VAR_SHAPECLASS, VAR_SIGNALS, VAR_SPEED, VAR_SPEED_DEVIATION, VAR_SPEED_FACTOR, VAR_SPEEDSETMODE, VAR_TAU, VAR_VEHICLECLASS, VAR_WIDTH, and traci::TraCIServer::writeStatusCmd().
Referenced by traci::TraCIServer::TraCIServer().