74 "Get Edge Variable: unsupported variable " +
toHex(variable, 2)
75 +
" specified", outputStorage);
100 "The message must contain the time definition.", outputStorage);
111 "The message must contain the time definition.", outputStorage);
203 std::string paramName;
206 "Retrieval of a parameter requires its name.",
235 "Change Edge State: unsupported variable " +
toHex(variable, 2)
236 +
" specified", outputStorage);
246 std::vector<std::string> classes;
249 "Allowed vehicle classes must be given as a list of strings.",
257 std::vector<std::string> classes;
260 "Not allowed vehicle classes must be given as a list of strings.",
270 "Setting travel time requires a compound object.", outputStorage);
272 int parameterCount = inputStorage.
readInt();
273 if (parameterCount == 3) {
275 int begTime = 0, endTime = 0;
279 "The first variable must be the begin time given as int.",
284 "The second variable must be the end time given as int.",
289 "The third variable must be the value given as double",
293 }
else if (parameterCount == 1) {
298 "The variable must be the value given as double", outputStorage);
303 "Setting travel time requires either begin time, end time, and value, or only value as parameter.",
312 "Setting effort requires a compound object.",
315 int parameterCount = inputStorage.
readInt();
316 if (parameterCount == 3) {
318 int begTime = 0, endTime = 0;
322 "The first variable must be the begin time given as int.",
327 "The second variable must be the end time given as int.",
332 "The third variable must be the value given as double",
336 }
else if (parameterCount == 1) {
341 "The variable must be the value given as double", outputStorage);
346 "Setting effort requires either begin time, end time, and value, or only value as parameter.",
364 "A compound object is needed for setting a parameter.",
372 "The name of the parameter must be given as a string.",
378 "The value of the parameter must be given as a string.",
#define LAST_STEP_MEAN_SPEED
static void setAllowedVehicleClasses(const std::string &id, std::vector< std::string > vector)
static std::vector< std::string > getIDList()
#define VAR_CURRENT_TRAVELTIME
static double retrieveExistingEffort(const std::string &id, double time)
static double getOccupancy(const std::string &id)
static double getVehicleAverageLength(const std::string &id)
static void addTravelTime(const std::string &id, double begTime, double endTime, double value)
static double getFuelConsumption(const std::string &id)
static void addEffort(const std::string &id, double begTime, double endTime, double value)
bool readTypeCheckingInt(tcpip::Storage &inputStorage, int &into)
Reads the value type and an int, verifying the type.
bool readTypeCheckingString(tcpip::Storage &inputStorage, std::string &into)
Reads the value type and a string, verifying the type.
bool readTypeCheckingDouble(tcpip::Storage &inputStorage, double &into)
Reads the value type and a double, verifying the type.
static double getWaitingSeconds(const std::string &id)
static double getCurrentTravelTime(const std::string &id)
static double retrieveExistingTravelTime(const std::string &id, double time)
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xca: Change Edge State)
static double getNOxEmissions(const std::string &id)
virtual void writeUnsignedByte(int)
#define CMD_SET_EDGE_VARIABLE
bool writeErrorStatusCmd(int commandId, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage with status = RTYPE_ERR.
#define VAR_NOISEEMISSION
#define VAR_FUELCONSUMPTION
virtual void writeInt(int)
#define WRITE_WARNING(msg)
virtual int readUnsignedByte()
static const std::vector< std::string > getPersonIDs(const std::string &id)
static int getVehicleNumber(const std::string &id)
static double getNoiseEmissions(const std::string &id)
bool readTypeCheckingStringList(tcpip::Storage &inputStorage, std::vector< std::string > &into)
Reads the value type and a string list, verifying the type.
static double getCOEmissions(const std::string &id)
virtual void writeStringList(const std::vector< std::string > &s)
static double getPMxEmissions(const std::string &id)
static void setMaxSpeed(const std::string &id, double value)
#define CMD_SET_VEHICLE_VARIABLE
virtual std::string readString()
#define CMD_GET_EDGE_VARIABLE
static double getElectricityConsumption(const std::string &id)
TraCI server used to control sumo by a remote TraCI client.
static void setParameter(const std::string &id, const std::string &name, const std::string &value)
static std::string getParameter(const std::string &id, const std::string ¶mName)
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
static void getShape(const std::string &id, PositionVector &shape)
#define LAST_STEP_VEHICLE_NUMBER
static double getHCEmissions(const std::string &id)
#define VAR_EDGE_TRAVELTIME
static bool getShape(const std::string &id, PositionVector &shape)
Returns the named edge's shape.
virtual void writeString(const std::string &s)
#define LAST_STEP_VEHICLE_ID_LIST
std::string toHex(const T i, std::streamsize numDigits=0)
#define VAR_ELECTRICITYCONSUMPTION
static int getVehicleHaltingNumber(const std::string &id)
virtual void writeDouble(double)
#define LAST_STEP_PERSON_ID_LIST
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
static double getCO2Emissions(const std::string &id)
#define LAST_STEP_OCCUPANCY
static void setDisallowedVehicleClasses(const std::string &id, std::vector< std::string > classes)
static double getMeanSpeed(const std::string &id)
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xaa: Get Edge Variable)
static const std::vector< std::string > getVehicleIDs(const std::string &id)
#define LAST_STEP_VEHICLE_HALTING_NUMBER
#define RESPONSE_GET_EDGE_VARIABLE