SUMO - Simulation of Urban MObility
TraCIServerAPI_Vehicle Class Reference

APIs for getting/setting vehicle values via TraCI. More...

#include <TraCIServerAPI_Vehicle.h>

Collaboration diagram for TraCIServerAPI_Vehicle:
Collaboration graph

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) More...
 
static bool processSet (TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
 Processes a set value command (Command 0xc4: Change Vehicle State) More...
 

Private Member Functions

TraCIServerAPI_Vehicleoperator= (const TraCIServerAPI_Vehicle &s)
 invalidated assignment operator More...
 
 TraCIServerAPI_Vehicle (const TraCIServerAPI_Vehicle &s)
 invalidated copy constructor More...
 

Detailed Description

APIs for getting/setting vehicle values via TraCI.

Definition at line 39 of file TraCIServerAPI_Vehicle.h.

Constructor & Destructor Documentation

◆ TraCIServerAPI_Vehicle()

TraCIServerAPI_Vehicle::TraCIServerAPI_Vehicle ( const TraCIServerAPI_Vehicle s)
private

invalidated copy constructor

Member Function Documentation

◆ operator=()

TraCIServerAPI_Vehicle& TraCIServerAPI_Vehicle::operator= ( const TraCIServerAPI_Vehicle s)
private

invalidated assignment operator

◆ processGet()

bool TraCIServerAPI_Vehicle::processGet ( TraCIServer server,
tcpip::Storage inputStorage,
tcpip::Storage outputStorage 
)
static

Processes a get value command (Command 0xa4: Get Vehicle Variable)

Parameters
[in]serverThe TraCI-server-instance which schedules this request
[in]inputStorageThe storage to read the command from
[out]outputStorageThe storage to write the result to

Definition at line 58 of file TraCIServerAPI_Vehicle.cpp.

References libsumo::TraCIBestLanesData::allowsContinuation, libsumo::TraCIBestLanesData::bestLaneOffset, CMD_CHANGELANE, CMD_GET_VEHICLE_VARIABLE, libsumo::TraCIBestLanesData::continuationLanes, DISTANCE_REQUEST, libsumo::Vehicle::getAdaptedTraveltime(), libsumo::Vehicle::getBestLanes(), libsumo::Vehicle::getDrivingDistance(), libsumo::Vehicle::getDrivingDistance2D(), libsumo::Vehicle::getEffort(), libsumo::Vehicle::getLaneChangeState(), libsumo::Vehicle::getLeader(), libsumo::Vehicle::getNextStops(), libsumo::Vehicle::getNextTLS(), libsumo::Vehicle::getParameter(), libsumo::Vehicle::getTypeID(), TraCIServer::getWrapperStorage(), libsumo::VehicleType::handleVariable(), libsumo::Vehicle::handleVariable(), TraCIServer::initWrapper(), libsumo::TraCIBestLanesData::laneID, libsumo::TraCIBestLanesData::length, libsumo::TraCIBestLanesData::occupation, POSITION_2D, POSITION_3D, POSITION_ROADMAP, tcpip::Storage::readDouble(), tcpip::Storage::readInt(), tcpip::Storage::readString(), TraCIServer::readTypeCheckingDouble(), TraCIServer::readTypeCheckingInt(), TraCIServer::readTypeCheckingString(), tcpip::Storage::readUnsignedByte(), REQUEST_DRIVINGDIST, RESPONSE_GET_VEHICLE_VARIABLE, RTYPE_OK, toHex(), TYPE_BYTE, TYPE_COMPOUND, TYPE_DOUBLE, TYPE_INTEGER, TYPE_STRING, TYPE_STRINGLIST, TYPE_UBYTE, VAR_BEST_LANES, VAR_EDGE_EFFORT, VAR_EDGE_TRAVELTIME, VAR_LEADER, VAR_NEXT_STOPS, VAR_NEXT_TLS, VAR_PARAMETER, tcpip::Storage::writeByte(), tcpip::Storage::writeDouble(), TraCIServer::writeErrorStatusCmd(), tcpip::Storage::writeInt(), TraCIServer::writeResponseWithLength(), TraCIServer::writeStatusCmd(), tcpip::Storage::writeStorage(), tcpip::Storage::writeString(), tcpip::Storage::writeStringList(), and tcpip::Storage::writeUnsignedByte().

Referenced by TraCIServer::TraCIServer().

◆ processSet()

bool TraCIServerAPI_Vehicle::processSet ( TraCIServer server,
tcpip::Storage inputStorage,
tcpip::Storage outputStorage 
)
static

Processes a set value command (Command 0xc4: Change Vehicle State)

Parameters
[in]serverThe TraCI-server-instance which schedules this request
[in]inputStorageThe storage to read the command from
[out]outputStorageThe storage to write the result to

XXX but a big try/catch around all retrieval cases

Definition at line 280 of file TraCIServerAPI_Vehicle.cpp.

References libsumo::Vehicle::add(), ADD, ADD_FULL, libsumo::Vehicle::changeLane(), libsumo::Vehicle::changeLaneRelative(), libsumo::Vehicle::changeSublane(), libsumo::Vehicle::changeTarget(), CMD_CHANGELANE, CMD_CHANGESUBLANE, CMD_CHANGETARGET, CMD_GET_VEHICLE_VARIABLE, CMD_OPENGAP, CMD_REROUTE_EFFORT, CMD_REROUTE_TO_PARKING, CMD_REROUTE_TRAVELTIME, CMD_RESUME, CMD_SET_VEHICLE_VARIABLE, CMD_SLOWDOWN, CMD_STOP, libsumo::Vehicle::deactivateGapControl(), DELTA_T, DEPART_CONTAINER_TRIGGERED, DEPART_LANE_ALLOWED_FREE, DEPART_LANE_BEST_FREE, DEPART_LANE_FIRST_ALLOWED, DEPART_LANE_FREE, DEPART_LANE_RANDOM, DEPART_NOW, DEPART_POS_BASE, DEPART_POS_FREE, DEPART_POS_GIVEN, DEPART_POS_LAST, DEPART_POS_RANDOM, DEPART_POS_RANDOM_FREE, DEPART_SPEED_MAX, DEPART_SPEED_RANDOM, DEPART_TRIGGERED, MSBaseVehicle::getEdge(), Named::getID(), MSVehicleType::getID(), MSNet::getInstance(), MSEdge::getLanes(), MSBaseVehicle::getSingularType(), MSVehicleControl::getVehicle(), MSNet::getVehicleControl(), INVALID_DOUBLE_VALUE, MOVE_TO_XY, libsumo::Vehicle::moveTo(), libsumo::Vehicle::moveToXY(), libsumo::Vehicle::openGap(), tcpip::Storage::readInt(), tcpip::Storage::readString(), TraCIServer::readTypeCheckingByte(), TraCIServer::readTypeCheckingColor(), TraCIServer::readTypeCheckingDouble(), TraCIServer::readTypeCheckingInt(), TraCIServer::readTypeCheckingString(), TraCIServer::readTypeCheckingStringList(), tcpip::Storage::readUnsignedByte(), libsumo::Vehicle::remove(), REMOVE, libsumo::Vehicle::rerouteEffort(), libsumo::Vehicle::rerouteParkingArea(), libsumo::Vehicle::rerouteTraveltime(), libsumo::Vehicle::resume(), RTYPE_ERR, RTYPE_OK, libsumo::Vehicle::setAdaptedTraveltime(), libsumo::Vehicle::setEffort(), libsumo::Vehicle::setLaneChangeMode(), libsumo::Vehicle::setLine(), libsumo::Vehicle::setParameter(), libsumo::Vehicle::setRoute(), libsumo::Vehicle::setRouteID(), libsumo::Vehicle::setRoutingMode(), libsumo::Vehicle::setSignals(), libsumo::Vehicle::setSpeed(), libsumo::Vehicle::setSpeedMode(), libsumo::Vehicle::setStop(), libsumo::Vehicle::setType(), TraCIServerAPI_VehicleType::setVariable(), libsumo::Vehicle::setVia(), SIMTIME, libsumo::Vehicle::slowDown(), STEPS2TIME, SUMOTime_MAX, toHex(), toString(), TYPE_COMPOUND, libsumo::Vehicle::updateBestLanes(), VAR_ACCEL, VAR_ACTIONSTEPLENGTH, VAR_APPARENT_DECEL, VAR_COLOR, VAR_DECEL, VAR_EDGE_EFFORT, VAR_EDGE_TRAVELTIME, VAR_EMERGENCY_DECEL, VAR_EMISSIONCLASS, VAR_HEIGHT, VAR_IMPERFECTION, VAR_LANECHANGE_MODE, VAR_LATALIGNMENT, VAR_LENGTH, VAR_LINE, VAR_MAXSPEED, VAR_MAXSPEED_LAT, VAR_MINGAP, VAR_MINGAP_LAT, VAR_MOVE_TO, VAR_PARAMETER, VAR_ROUTE, VAR_ROUTE_ID, VAR_ROUTING_MODE, VAR_SHAPECLASS, VAR_SIGNALS, VAR_SPEED, VAR_SPEED_FACTOR, VAR_SPEEDSETMODE, VAR_TAU, VAR_TYPE, VAR_UPDATE_BESTLANES, VAR_VEHICLECLASS, VAR_VIA, VAR_WIDTH, TraCIServer::writeErrorStatusCmd(), and TraCIServer::writeStatusCmd().

Referenced by TraCIServer::TraCIServer().


The documentation for this class was generated from the following files: