![]() |
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 48 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 115 of file TraCIServerAPI_VehicleType.cpp.
References TraCIColor::a, TraCIColor::b, TraCIColor::g, TraCI_VehicleType::getAccel(), TraCI_VehicleType::getColor(), TraCI_VehicleType::getDecel(), TraCI_VehicleType::getEmissionClass(), TraCI_VehicleType::getHeight(), TraCI_VehicleType::getImperfection(), TraCI_VehicleType::getLateralAlignment(), TraCI_VehicleType::getLength(), TraCI_VehicleType::getMaxSpeed(), TraCI_VehicleType::getMaxSpeedLat(), TraCI_VehicleType::getMinGap(), TraCI_VehicleType::getMinGapLat(), TraCI_VehicleType::getShapeClass(), TraCI_VehicleType::getSpeedDeviation(), TraCI_VehicleType::getSpeedFactor(), TraCI_VehicleType::getTau(), TraCI_VehicleType::getVehicleClass(), TraCI_VehicleType::getWidth(), TraCIColor::r, TYPE_COLOR, TYPE_DOUBLE, TYPE_STRING, VAR_ACCEL, VAR_COLOR, VAR_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 52 of file TraCIServerAPI_VehicleType.cpp.
References CMD_GET_VEHICLETYPE_VARIABLE, TraCI_VehicleType::getIDList(), TraCI_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_COLOR, VAR_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 218 of file TraCIServerAPI_VehicleType.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), RTYPE_OK, setVariable(), toHex(), VAR_ACCEL, VAR_COLOR, VAR_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 261 of file TraCIServerAPI_VehicleType.cpp.
References TraCI_VehicleType::addParameter(), SUMOXMLDefinitions::LateralAlignments, tcpip::Storage::readInt(), TraCIServer::readTypeCheckingColor(), TraCIServer::readTypeCheckingDouble(), TraCIServer::readTypeCheckingString(), tcpip::Storage::readUnsignedByte(), TraCI_VehicleType::setAccel(), TraCI_VehicleType::setColor(), TraCI_VehicleType::setDecel(), TraCI_VehicleType::setEmissionClass(), TraCI_VehicleType::setHeight(), TraCI_VehicleType::setImperfection(), TraCI_VehicleType::setLateralAlignment(), TraCI_VehicleType::setLength(), TraCI_VehicleType::setMaxSpeed(), TraCI_VehicleType::setMaxSpeedLat(), TraCI_VehicleType::setMinGap(), TraCI_VehicleType::setMinGapLat(), TraCI_VehicleType::setShapeClass(), TraCI_VehicleType::setSpeedDeviation(), TraCI_VehicleType::setSpeedFactor(), TraCI_VehicleType::setTau(), TraCI_VehicleType::setVehicleClass(), TraCI_VehicleType::setWidth(), TYPE_COMPOUND, VAR_ACCEL, VAR_COLOR, VAR_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().