SUMO - Simulation of Urban MObility
TraCIServerAPI_VehicleType Class Reference

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

#include <TraCIServerAPI_VehicleType.h>

Collaboration diagram for TraCIServerAPI_VehicleType:
Collaboration graph

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...
 

Detailed Description

APIs for getting/setting vehicle type values via TraCI.

Definition at line 48 of file TraCIServerAPI_VehicleType.h.

Constructor & Destructor Documentation

TraCIServerAPI_VehicleType::TraCIServerAPI_VehicleType ( const TraCIServerAPI_VehicleType &  s)
private

invalidated copy constructor

Member Function Documentation

bool TraCIServerAPI_VehicleType::getVariable ( const int  variable,
const std::string &  v,
tcpip::Storage &  tempMsg 
)
static

Processes a value request for the given type.

Parameters
[in]variableThe type variable asked for
[in]vThe vehicle type to get the value from
[out]tempMsgThe 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::getApparentDecel(), TraCI_VehicleType::getColor(), TraCI_VehicleType::getDecel(), TraCI_VehicleType::getEmergencyDecel(), 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_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().

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

invalidated assignment operator

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

Processes a set value command (Command 0xc5: Change Vehicle Type 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

Definition at line 228 of file TraCIServerAPI_VehicleType.cpp.

References CMD_SET_VEHICLETYPE_VARIABLE, COPY, tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), RTYPE_OK, setVariable(), toHex(), VAR_ACCEL, 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().

bool TraCIServerAPI_VehicleType::setVariable ( const int  cmd,
const int  variable,
const std::string &  id,
TraCIServer &  server,
tcpip::Storage &  inputStorage,
tcpip::Storage &  outputStorage 
)
static

Processes a set value for the given type.

Definition at line 273 of file TraCIServerAPI_VehicleType.cpp.

References TraCI_VehicleType::addParameter(), TraCI_VehicleType::copy(), COPY, SUMOXMLDefinitions::LateralAlignments, tcpip::Storage::readInt(), TraCIServer::readTypeCheckingColor(), TraCIServer::readTypeCheckingDouble(), TraCIServer::readTypeCheckingString(), tcpip::Storage::readUnsignedByte(), TraCI_VehicleType::setAccel(), TraCI_VehicleType::setApparentDecel(), TraCI_VehicleType::setColor(), TraCI_VehicleType::setDecel(), TraCI_VehicleType::setEmergencyDecel(), 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_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().


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