![]() |
SUMO - Simulation of Urban MObility
|
APIs for getting/setting vehicle type values via TraCI. More...
#include <TraCIServerAPI_VehicleType.h>
Static Public Member Functions | |
static bool | getVariable (const int variable, const std::string &v, tcpip::Storage &tempMsg) |
Processes a value request for the given type. More... | |
static bool | processGet (TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage) |
Processes a get value command (Command 0xa5: Get Vehicle Type Variable) More... | |
static bool | processSet (TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage) |
Processes a set value command (Command 0xc5: Change Vehicle Type State) More... | |
static bool | setVariable (const int cmd, const int variable, const std::string &id, TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage) |
Processes a set value for the given type. More... | |
Private Member Functions | |
TraCIServerAPI_VehicleType & | operator= (const TraCIServerAPI_VehicleType &s) |
invalidated assignment operator More... | |
TraCIServerAPI_VehicleType (const TraCIServerAPI_VehicleType &s) | |
invalidated copy constructor More... | |
APIs for getting/setting vehicle type values via TraCI.
Definition at line 46 of file TraCIServerAPI_VehicleType.h.
|
private |
invalidated copy constructor
|
static |
Processes a value request for the given type.
[in] | variable | The type variable asked for |
[in] | v | The vehicle type to get the value from |
[out] | tempMsg | The storage to write the result to |
Definition at line 113 of file TraCIServerAPI_VehicleType.cpp.
References libsumo::TraCIColor::a, libsumo::TraCIColor::b, libsumo::TraCIColor::g, libsumo::VehicleType::getAccel(), libsumo::VehicleType::getActionStepLength(), libsumo::VehicleType::getApparentDecel(), libsumo::VehicleType::getColor(), libsumo::VehicleType::getDecel(), libsumo::VehicleType::getEmergencyDecel(), libsumo::VehicleType::getEmissionClass(), libsumo::VehicleType::getHeight(), libsumo::VehicleType::getImperfection(), libsumo::VehicleType::getLateralAlignment(), libsumo::VehicleType::getLength(), libsumo::VehicleType::getMaxSpeed(), libsumo::VehicleType::getMaxSpeedLat(), libsumo::VehicleType::getMinGap(), libsumo::VehicleType::getMinGapLat(), libsumo::VehicleType::getShapeClass(), libsumo::VehicleType::getSpeedDeviation(), libsumo::VehicleType::getSpeedFactor(), libsumo::VehicleType::getTau(), libsumo::VehicleType::getVehicleClass(), libsumo::VehicleType::getWidth(), libsumo::TraCIColor::r, TYPE_COLOR, TYPE_DOUBLE, TYPE_STRING, VAR_ACCEL, VAR_ACTIONSTEPLENGTH, VAR_APPARENT_DECEL, VAR_COLOR, VAR_DECEL, VAR_EMERGENCY_DECEL, VAR_EMISSIONCLASS, VAR_HEIGHT, VAR_IMPERFECTION, VAR_LATALIGNMENT, VAR_LENGTH, VAR_MAXSPEED, VAR_MAXSPEED_LAT, VAR_MINGAP, VAR_MINGAP_LAT, VAR_SHAPECLASS, VAR_SPEED_DEVIATION, VAR_SPEED_FACTOR, VAR_TAU, VAR_VEHICLECLASS, VAR_WIDTH, tcpip::Storage::writeDouble(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by processGet(), TraCIServerAPI_Vehicle::processGet(), and TraCIServerAPI_Person::processGet().
|
private |
invalidated assignment operator
|
static |
Processes a get value command (Command 0xa5: Get Vehicle Type 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 50 of file TraCIServerAPI_VehicleType.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, libsumo::VehicleType::getIDList(), libsumo::VehicleType::getParameter(), getVariable(), ID_COUNT, ID_LIST, tcpip::Storage::readString(), TraCIServer::readTypeCheckingString(), tcpip::Storage::readUnsignedByte(), RESPONSE_GET_VEHICLETYPE_VARIABLE, RTYPE_OK, toHex(), TYPE_INTEGER, TYPE_STRING, TYPE_STRINGLIST, VAR_ACCEL, VAR_ACTIONSTEPLENGTH, VAR_APPARENT_DECEL, VAR_COLOR, VAR_DECEL, VAR_EMERGENCY_DECEL, VAR_EMISSIONCLASS, VAR_HEIGHT, VAR_IMPERFECTION, VAR_LATALIGNMENT, VAR_LENGTH, VAR_MAXSPEED, VAR_MAXSPEED_LAT, VAR_MINGAP, VAR_MINGAP_LAT, VAR_PARAMETER, VAR_SHAPECLASS, VAR_SPEED_DEVIATION, VAR_SPEED_FACTOR, VAR_TAU, VAR_VEHICLECLASS, VAR_WIDTH, TraCIServer::writeErrorStatusCmd(), tcpip::Storage::writeInt(), TraCIServer::writeResponseWithLength(), TraCIServer::writeStatusCmd(), tcpip::Storage::writeString(), tcpip::Storage::writeStringList(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCIServer::TraCIServer().
|
static |
Processes a set value command (Command 0xc5: Change Vehicle Type 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 231 of file TraCIServerAPI_VehicleType.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, COPY, tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), RTYPE_OK, setVariable(), toHex(), VAR_ACCEL, VAR_ACTIONSTEPLENGTH, VAR_APPARENT_DECEL, VAR_COLOR, VAR_DECEL, VAR_EMERGENCY_DECEL, VAR_EMISSIONCLASS, VAR_HEIGHT, VAR_IMPERFECTION, VAR_LATALIGNMENT, VAR_LENGTH, VAR_MAXSPEED, VAR_MAXSPEED_LAT, VAR_MINGAP, VAR_MINGAP_LAT, VAR_PARAMETER, VAR_SHAPECLASS, VAR_SPEED_DEVIATION, VAR_SPEED_FACTOR, VAR_TAU, VAR_VEHICLECLASS, VAR_WIDTH, TraCIServer::writeErrorStatusCmd(), and TraCIServer::writeStatusCmd().
Referenced by TraCIServer::TraCIServer().
|
static |
Processes a set value for the given type.
Definition at line 276 of file TraCIServerAPI_VehicleType.cpp.
References CMD_SET_VEHICLE_VARIABLE, libsumo::VehicleType::copy(), COPY, SUMOXMLDefinitions::LateralAlignments, tcpip::Storage::readInt(), TraCIServer::readTypeCheckingColor(), TraCIServer::readTypeCheckingDouble(), TraCIServer::readTypeCheckingString(), tcpip::Storage::readUnsignedByte(), libsumo::VehicleType::setAccel(), libsumo::VehicleType::setActionStepLength(), libsumo::VehicleType::setApparentDecel(), libsumo::VehicleType::setColor(), libsumo::VehicleType::setDecel(), libsumo::VehicleType::setEmergencyDecel(), libsumo::VehicleType::setEmissionClass(), libsumo::VehicleType::setHeight(), libsumo::VehicleType::setImperfection(), libsumo::VehicleType::setLateralAlignment(), libsumo::VehicleType::setLength(), libsumo::VehicleType::setMaxSpeed(), libsumo::VehicleType::setMaxSpeedLat(), libsumo::VehicleType::setMinGap(), libsumo::VehicleType::setMinGapLat(), libsumo::VehicleType::setParameter(), libsumo::VehicleType::setShapeClass(), libsumo::VehicleType::setSpeedDeviation(), libsumo::VehicleType::setSpeedFactor(), libsumo::VehicleType::setTau(), libsumo::VehicleType::setVehicleClass(), libsumo::VehicleType::setWidth(), TYPE_COMPOUND, VAR_ACCEL, VAR_ACTIONSTEPLENGTH, VAR_APPARENT_DECEL, VAR_COLOR, VAR_DECEL, VAR_EMERGENCY_DECEL, VAR_EMISSIONCLASS, VAR_HEIGHT, VAR_IMPERFECTION, VAR_LATALIGNMENT, VAR_LENGTH, VAR_MAXSPEED, VAR_MAXSPEED_LAT, VAR_MINGAP, VAR_MINGAP_LAT, VAR_PARAMETER, VAR_SHAPECLASS, VAR_SPEED_DEVIATION, VAR_SPEED_FACTOR, VAR_TAU, VAR_VEHICLECLASS, VAR_WIDTH, and TraCIServer::writeErrorStatusCmd().
Referenced by TraCIServerAPI_Vehicle::processSet(), TraCIServerAPI_Person::processSet(), and processSet().