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 MSVehicleType &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, MSVehicleType &v, 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 109 of file TraCIServerAPI_VehicleType.cpp.
References RGBColor::alpha(), RGBColor::blue(), MSVehicleType::getCarFollowModel(), MSVehicleType::getColor(), MSVehicleType::getEmissionClass(), MSVehicleType::getGuiShape(), MSCFModel::getHeadwayTime(), MSVehicleType::getHeight(), MSCFModel::getImperfection(), MSVehicleType::getLength(), MSCFModel::getMaxAccel(), MSCFModel::getMaxDecel(), MSVehicleType::getMaxSpeed(), MSVehicleType::getMinGap(), PollutantsInterface::getName(), MSVehicleType::getSpeedDeviation(), MSVehicleType::getSpeedFactor(), MSVehicleType::getVehicleClass(), getVehicleShapeName(), MSVehicleType::getWidth(), RGBColor::green(), RGBColor::red(), toString(), TYPE_COLOR, TYPE_DOUBLE, TYPE_STRING, VAR_ACCEL, VAR_COLOR, VAR_DECEL, VAR_EMISSIONCLASS, VAR_HEIGHT, VAR_IMPERFECTION, VAR_LENGTH, VAR_MAXSPEED, VAR_MINGAP, 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, MSNet::getInstance(), Parameterised::getParameter(), MSVehicleType::getParameter(), getVariable(), MSNet::getVehicleControl(), MSVehicleControl::getVType(), ID_COUNT, ID_LIST, MSVehicleControl::insertVTypeIDs(), 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_LENGTH, VAR_MAXSPEED, VAR_MINGAP, 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 181 of file TraCIServerAPI_VehicleType.cpp.
References CMD_SET_VEHICLETYPE_VARIABLE, MSNet::getInstance(), MSNet::getVehicleControl(), MSVehicleControl::getVType(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), RTYPE_OK, setVariable(), toHex(), VAR_ACCEL, VAR_COLOR, VAR_DECEL, VAR_EMISSIONCLASS, VAR_HEIGHT, VAR_IMPERFECTION, VAR_LENGTH, VAR_MAXSPEED, VAR_MINGAP, 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 216 of file TraCIServerAPI_VehicleType.cpp.
References MSVehicleType::getCarFollowModel(), PollutantsInterface::getClassByName(), MSVehicleType::getParameter(), getVehicleClassID(), getVehicleShapeID(), tcpip::Storage::readInt(), TraCIServer::readTypeCheckingColor(), TraCIServer::readTypeCheckingDouble(), TraCIServer::readTypeCheckingString(), tcpip::Storage::readUnsignedByte(), MSVehicleType::setColor(), MSVehicleType::setEmissionClass(), MSCFModel::setHeadwayTime(), MSVehicleType::setHeight(), MSCFModel::setImperfection(), MSVehicleType::setLength(), MSCFModel::setMaxAccel(), MSCFModel::setMaxDecel(), MSVehicleType::setMaxSpeed(), MSVehicleType::setMinGap(), MSVehicleType::setShape(), MSVehicleType::setSpeedDeviation(), MSVehicleType::setSpeedFactor(), MSVehicleType::setVClass(), MSVehicleType::setWidth(), TYPE_COMPOUND, VAR_ACCEL, VAR_COLOR, VAR_DECEL, VAR_EMISSIONCLASS, VAR_HEIGHT, VAR_IMPERFECTION, VAR_LENGTH, VAR_MAXSPEED, VAR_MINGAP, VAR_PARAMETER, VAR_SHAPECLASS, VAR_SPEED_DEVIATION, VAR_SPEED_FACTOR, VAR_TAU, VAR_VEHICLECLASS, VAR_WIDTH, and TraCIServer::writeErrorStatusCmd().
Referenced by TraCIServerAPI_Vehicle::processSet(), and processSet().