Eclipse SUMO - Simulation of Urban MObility
TraCIServerAPI_Person.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // APIs for getting/setting person values via TraCI
16 /****************************************************************************/
17 
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 #include <config.h>
23 
28 #include <microsim/MSNet.h>
29 #include <microsim/MSEdge.h>
30 #include <libsumo/Person.h>
31 #include <libsumo/TraCIConstants.h>
32 #include <libsumo/VehicleType.h>
33 #include "TraCIServer.h"
35 #include "TraCIServerAPI_Person.h"
37 
38 
39 // ===========================================================================
40 // method definitions
41 // ===========================================================================
42 bool
44  tcpip::Storage& outputStorage) {
45  const int variable = inputStorage.readUnsignedByte();
46  const std::string id = inputStorage.readString();
48  try {
49  if (!libsumo::Person::handleVariable(id, variable, &server) &&
51  switch (variable) {
52  case libsumo::VAR_EDGES: {
53  int nextStageIndex = 0;
54  if (!server.readTypeCheckingInt(inputStorage, nextStageIndex)) {
55  return server.writeErrorStatusCmd(libsumo::CMD_GET_PERSON_VARIABLE, "The message must contain the stage index.", outputStorage);
56  }
58  server.getWrapperStorage().writeStringList(libsumo::Person::getEdges(id, nextStageIndex));
59  break;
60  }
61  case libsumo::VAR_STAGE: {
62  int nextStageIndex = 0;
63  if (!server.readTypeCheckingInt(inputStorage, nextStageIndex)) {
64  return server.writeErrorStatusCmd(libsumo::CMD_GET_PERSON_VARIABLE, "The message must contain the stage index.", outputStorage);
65  }
67  break;
68  }
70  std::string paramName = "";
71  if (!server.readTypeCheckingString(inputStorage, paramName)) {
72  return server.writeErrorStatusCmd(libsumo::CMD_GET_PERSON_VARIABLE, "Retrieval of a parameter requires its name.", outputStorage);
73  }
76  break;
77  }
78  default:
79  return server.writeErrorStatusCmd(libsumo::CMD_GET_PERSON_VARIABLE, "Get Person Variable: unsupported variable " + toHex(variable, 2) + " specified", outputStorage);
80  }
81  }
82  } catch (libsumo::TraCIException& e) {
83  return server.writeErrorStatusCmd(libsumo::CMD_GET_PERSON_VARIABLE, e.what(), outputStorage);
84  }
86  server.writeResponseWithLength(outputStorage, server.getWrapperStorage());
87  return true;
88 }
89 
90 
91 bool
93  tcpip::Storage& outputStorage) {
94  std::string warning = ""; // additional description for response
95  // variable
96  int variable = inputStorage.readUnsignedByte();
97  if (variable != libsumo::VAR_PARAMETER
98  && variable != libsumo::ADD
99  && variable != libsumo::APPEND_STAGE
100  && variable != libsumo::REPLACE_STAGE
101  && variable != libsumo::REMOVE_STAGE
102  && variable != libsumo::CMD_REROUTE_TRAVELTIME
103  && variable != libsumo::MOVE_TO_XY
104  && variable != libsumo::VAR_SPEED
105  && variable != libsumo::VAR_TYPE
106  && variable != libsumo::VAR_LENGTH
107  && variable != libsumo::VAR_WIDTH
108  && variable != libsumo::VAR_HEIGHT
109  && variable != libsumo::VAR_MINGAP
110  && variable != libsumo::VAR_COLOR
111  ) {
112  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Change Person State: unsupported variable " + toHex(variable, 2) + " specified", outputStorage);
113  }
114 
115  try {
116  // TODO: remove declaration of c after completion
118  // id
119  std::string id = inputStorage.readString();
120  // TODO: remove declaration of p after completion
121  const bool shouldExist = variable != libsumo::ADD;
122  MSTransportable* p = c.get(id);
123  if (p == nullptr && shouldExist) {
124  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Person '" + id + "' is not known", outputStorage);
125  }
126  // process
127  switch (variable) {
128  case libsumo::VAR_SPEED: {
129  double speed = 0;
130  if (!server.readTypeCheckingDouble(inputStorage, speed)) {
131  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Setting speed requires a double.", outputStorage);
132  }
133  // set the speed for all (walking) stages
134  libsumo::Person::setSpeed(id, speed);
135  // modify the vType so that stages added later are also affected
136  TraCIServerAPI_VehicleType::setVariable(libsumo::CMD_SET_VEHICLE_VARIABLE, variable, p->getSingularType().getID(), server, inputStorage, outputStorage);
137  }
138  break;
139  case libsumo::VAR_TYPE: {
140  std::string vTypeID;
141  if (!server.readTypeCheckingString(inputStorage, vTypeID)) {
142  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The vehicle type id must be given as a string.", outputStorage);
143  }
144  libsumo::Person::setType(id, vTypeID);
145  break;
146  }
147  case libsumo::VAR_COLOR: {
149  if (!server.readTypeCheckingColor(inputStorage, col)) {
150  return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The color must be given using the according type.", outputStorage);
151  }
152  libsumo::Person::setColor(id, col);
153  break;
154  }
155  case libsumo::ADD: {
156  if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) {
157  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Adding a person requires a compound object.", outputStorage);
158  }
159  if (inputStorage.readInt() != 4) {
160  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Adding a person needs four parameters.", outputStorage);
161  }
162  std::string vTypeID;
163  if (!server.readTypeCheckingString(inputStorage, vTypeID)) {
164  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "First parameter (type) requires a string.", outputStorage);
165  }
166  std::string edgeID;
167  if (!server.readTypeCheckingString(inputStorage, edgeID)) {
168  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Second parameter (edge) requires a string.", outputStorage);
169  }
170  double depart;
171  if (!server.readTypeCheckingDouble(inputStorage, depart)) {
172  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Third parameter (depart) requires a double.", outputStorage);
173  }
174  double pos;
175  if (!server.readTypeCheckingDouble(inputStorage, pos)) {
176  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Fourth parameter (position) requires a double.", outputStorage);
177  }
178  libsumo::Person::add(id, edgeID, pos, depart, vTypeID);
179  }
180  break;
181  case libsumo::APPEND_STAGE: {
182  if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) {
183  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Adding a person stage requires a compound object.", outputStorage);
184  }
185  int numParameters = inputStorage.readInt();
186  if (numParameters == 13) {
188  } else {
189  int stageType;
190  if (!server.readTypeCheckingInt(inputStorage, stageType)) {
191  return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "The first parameter for adding a stage must be the stage type given as int.", outputStorage);
192  }
193  if (stageType == MSTransportable::DRIVING) {
194  // append driving stage
195  if (numParameters != 4) {
196  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Adding a driving stage needs four parameters.", outputStorage);
197  }
198  std::string edgeID;
199  if (!server.readTypeCheckingString(inputStorage, edgeID)) {
200  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Second parameter (edge) requires a string.", outputStorage);
201  }
202  std::string lines;
203  if (!server.readTypeCheckingString(inputStorage, lines)) {
204  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Third parameter (lines) requires a string.", outputStorage);
205  }
206  std::string stopID;
207  if (!server.readTypeCheckingString(inputStorage, stopID)) {
208  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Fourth parameter (stopID) requires a string.", outputStorage);
209  }
210  libsumo::Person::appendDrivingStage(id, edgeID, lines, stopID);
211  } else if (stageType == MSTransportable::WAITING) {
212  // append waiting stage
213  if (numParameters != 4) {
214  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Adding a waiting stage needs four parameters.", outputStorage);
215  }
216  double duration;
217  if (!server.readTypeCheckingDouble(inputStorage, duration)) {
218  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Second parameter (duration) requires a double.", outputStorage);
219  }
220  std::string description;
221  if (!server.readTypeCheckingString(inputStorage, description)) {
222  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Third parameter (description) requires a string.", outputStorage);
223  }
224  std::string stopID;
225  if (!server.readTypeCheckingString(inputStorage, stopID)) {
226  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Fourth parameter (stopID) requires a string.", outputStorage);
227  }
228  libsumo::Person::appendWaitingStage(id, duration, description, stopID);
229  } else if (stageType == MSTransportable::MOVING_WITHOUT_VEHICLE) {
230  // append walking stage
231  if (numParameters != 6) {
232  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Adding a walking stage needs six parameters.", outputStorage);
233  }
234  std::vector<std::string> edgeIDs;
235  if (!server.readTypeCheckingStringList(inputStorage, edgeIDs)) {
236  return server.writeErrorStatusCmd(libsumo::CMD_SET_VEHICLE_VARIABLE, "Second parameter (edges) route must be defined as a list of edge ids.", outputStorage);
237  }
238  double arrivalPos;
239  if (!server.readTypeCheckingDouble(inputStorage, arrivalPos)) {
240  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Third parameter (arrivalPos) requires a double.", outputStorage);
241  }
242  double duration;
243  if (!server.readTypeCheckingDouble(inputStorage, duration)) {
244  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Fourth parameter (duration) requires a double.", outputStorage);
245  }
246  double speed;
247  if (!server.readTypeCheckingDouble(inputStorage, speed)) {
248  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Fifth parameter (speed) requires a double.", outputStorage);
249  }
250  std::string stopID;
251  if (!server.readTypeCheckingString(inputStorage, stopID)) {
252  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Fourth parameter (stopID) requires a string.", outputStorage);
253  }
254  libsumo::Person::appendWalkingStage(id, edgeIDs, arrivalPos, duration, speed, stopID);
255  } else {
256  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Invalid stage type for person '" + id + "'", outputStorage);
257  }
258  }
259 
260  }
261  break;
262 
263  case libsumo::REPLACE_STAGE : {
264  if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) {
265  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Replacing a person stage requires a compound object.", outputStorage);
266  }
267  if (inputStorage.readInt() != 2) {
268  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Replacing a person stage requires a compound object of size 2.", outputStorage);
269  }
270  int nextStageIndex = 0;
271  if (!server.readTypeCheckingInt(inputStorage, nextStageIndex)) {
272  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "First parameter of replace stage should be an integer", outputStorage);
273  }
274  if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) {
275  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Second parameter of replace stage should be a compound object", outputStorage);
276  }
277  if (inputStorage.readInt() != 13) {
278  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Second parameter of replace stage should be a compound object of size 13", outputStorage);
279  }
280  libsumo::Person::replaceStage(id, nextStageIndex, *TraCIServerAPI_Simulation::readStage(server, inputStorage));
281  }
282  break;
283 
284  case libsumo::REMOVE_STAGE: {
285  int nextStageIndex = 0;
286  if (!server.readTypeCheckingInt(inputStorage, nextStageIndex)) {
287  return server.writeErrorStatusCmd(libsumo::CMD_GET_PERSON_VARIABLE, "The message must contain the stage index.", outputStorage);
288  }
289  libsumo::Person::removeStage(id, nextStageIndex);
290  }
291  break;
293  if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) {
294  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Rerouting requires a compound object.", outputStorage);
295  }
296  if (inputStorage.readInt() != 0) {
297  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "Rerouting should obtain an empty compound object.", outputStorage);
298  }
300  }
301  break;
302  case libsumo::MOVE_TO_XY: {
303  if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) {
304  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "MoveToXY person requires a compound object.", outputStorage);
305  }
306  const int numArgs = inputStorage.readInt();
307  if (numArgs != 5) {
308  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "MoveToXY person should obtain: edgeID, x, y, angle and keepRouteFlag.", outputStorage);
309  }
310  // edge ID
311  std::string edgeID;
312  if (!server.readTypeCheckingString(inputStorage, edgeID)) {
313  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The first parameter for moveToXY must be the edge ID given as a string.", outputStorage);
314  }
315  // x
316  double x = 0;
317  if (!server.readTypeCheckingDouble(inputStorage, x)) {
318  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The second parameter for moveToXY must be the x-position given as a double.", outputStorage);
319  }
320  // y
321  double y = 0;
322  if (!server.readTypeCheckingDouble(inputStorage, y)) {
323  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The third parameter for moveToXY must be the y-position given as a double.", outputStorage);
324  }
325  // angle
326  double angle = 0;
327  if (!server.readTypeCheckingDouble(inputStorage, angle)) {
328  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The fourth parameter for moveToXY must be the angle given as a double.", outputStorage);
329  }
330  int keepRouteFlag = 1;
331  if (!server.readTypeCheckingByte(inputStorage, keepRouteFlag)) {
332  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The fifth parameter for moveToXY must be the keepRouteFlag given as a byte.", outputStorage);
333  }
334  libsumo::Person::moveToXY(id, edgeID, x, y, angle, keepRouteFlag);
335  }
336  break;
337  case libsumo::VAR_PARAMETER: {
338  if (inputStorage.readUnsignedByte() != libsumo::TYPE_COMPOUND) {
339  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "A compound object is needed for setting a parameter.", outputStorage);
340  }
341  //read itemNo
342  inputStorage.readInt();
343  std::string name;
344  if (!server.readTypeCheckingString(inputStorage, name)) {
345  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The name of the parameter must be given as a string.", outputStorage);
346  }
347  std::string value;
348  if (!server.readTypeCheckingString(inputStorage, value)) {
349  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, "The value of the parameter must be given as a string.", outputStorage);
350  }
351  libsumo::Person::setParameter(id, name, value);
352  }
353  break;
354  default:
355  try {
356  if (!TraCIServerAPI_VehicleType::setVariable(libsumo::CMD_SET_PERSON_VARIABLE, variable, p->getSingularType().getID(), server, inputStorage, outputStorage)) {
357  return false;
358  }
359  } catch (ProcessError& e) {
360  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, e.what(), outputStorage);
361  }
362  break;
363  }
364  } catch (libsumo::TraCIException& e) {
365  return server.writeErrorStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, e.what(), outputStorage);
366  }
367  server.writeStatusCmd(libsumo::CMD_SET_PERSON_VARIABLE, libsumo::RTYPE_OK, warning, outputStorage);
368  return true;
369 }
370 
371 
372 /****************************************************************************/
static void rerouteTraveltime(const std::string &personID)
Definition: Person.cpp:637
TRACI_CONST int VAR_MINGAP
bool readTypeCheckingColor(tcpip::Storage &inputStorage, libsumo::TraCIColor &into)
Reads the value type and a color, verifying the type.
static std::vector< std::string > getEdges(const std::string &personID, int nextStageIndex=0)
Definition: Person.cpp:154
static void appendWalkingStage(const std::string &personID, const std::vector< std::string > &edgeIDs, double arrivalPos, double duration=-1, double speed=-1, const std::string &stopID="")
Definition: Person.cpp:592
TRACI_CONST int VAR_COLOR
TRACI_CONST int VAR_STAGE
TRACI_CONST int VAR_WIDTH
static std::string getParameter(const std::string &routeID, const std::string &param)
Definition: Person.cpp:249
static void setType(const std::string &personID, const std::string &typeID)
Definition: Person.cpp:384
TRACI_CONST int RTYPE_OK
static void writeStage(tcpip::Storage &outputStorage, const libsumo::TraCIStage &stage)
TRACI_CONST int CMD_SET_VEHICLE_VARIABLE
static void appendStage(const TraCIStage &stage, const std::string &personID)
Definition: Person.cpp:533
TRACI_CONST int CMD_GET_PERSON_VARIABLE
TRACI_CONST int VAR_PARAMETER
bool readTypeCheckingInt(tcpip::Storage &inputStorage, int &into)
Reads the value type and an int, verifying the type.
static void replaceStage(const std::string &personID, const int stageIndex, const TraCIStage &stage)
Definition: Person.cpp:540
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:168
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.
TRACI_CONST int REPLACE_STAGE
static libsumo::TraCIStage * readStage(TraCIServer &server, tcpip::Storage &inputStorage)
virtual void writeUnsignedByte(int)
bool writeErrorStatusCmd(int commandId, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage with status = RTYPE_ERR.
TRACI_CONST int APPEND_STAGE
static void setSpeed(const std::string &personID, double speed)
Definition: Person.cpp:378
virtual int readUnsignedByte()
static void moveToXY(const std::string &personID, const std::string &edgeID, const double x, const double y, double angle=INVALID_DOUBLE_VALUE, const int keepRoute=1)
Definition: Person.cpp:714
MSVehicleType & getSingularType()
Replaces the current vehicle type with a new one used by this vehicle only.
TRACI_CONST int CMD_SET_PERSON_VARIABLE
static LIBSUMO_VEHICLE_TYPE_GETTER void add(const std::string &personID, const std::string &edgeID, double pos, double depart=DEPARTFLAG_NOW, const std::string typeID="DEFAULT_PEDTYPE")
Definition: Person.cpp:394
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xce: Change Person State)
virtual int readInt()
static std::string getTypeID(const std::string &personID)
Definition: Person.cpp:136
static void appendDrivingStage(const std::string &personID, const std::string &toEdge, const std::string &lines, const std::string &stopID="")
Definition: Person.cpp:554
virtual MSTransportableControl & getPersonControl()
Returns the person control.
Definition: MSNet.cpp:798
TRACI_CONST int ADD
TRACI_CONST int VAR_EDGES
static TraCIStage getStage(const std::string &personID, int nextStageIndex=0)
Definition: Person.cpp:173
bool readTypeCheckingStringList(tcpip::Storage &inputStorage, std::vector< std::string > &into)
Reads the value type and a string list, verifying the type.
TRACI_CONST int VAR_LENGTH
virtual void writeStringList(const std::vector< std::string > &s)
tcpip::Storage & getWrapperStorage()
TRACI_CONST int TYPE_STRINGLIST
virtual std::string readString()
TRACI_CONST int TYPE_STRING
TraCI server used to control sumo by a remote TraCI client.
Definition: TraCIServer.h:62
static void removeStage(const std::string &personID, int nextStageIndex)
Definition: Person.cpp:624
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xae: Get Person Variable)
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
static void setParameter(const std::string &personID, const std::string &key, const std::string &value)
Definition: Person.cpp:834
TRACI_CONST int VAR_SPEED
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.
virtual void writeString(const std::string &s)
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
TRACI_CONST int VAR_TYPE
std::string toHex(const T i, std::streamsize numDigits=0)
Definition: ToString.h:58
TRACI_CONST int MOVE_TO_XY
TRACI_CONST int REMOVE_STAGE
const std::string & getID() const
Returns the name of the vehicle type.
Definition: MSVehicleType.h:94
static void appendWaitingStage(const std::string &personID, double duration, const std::string &description="waiting", const std::string &stopID="")
Definition: Person.cpp:575
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
Definition: Person.cpp:988
MSTransportable * get(const std::string &id) const
Returns the named transportable, if existing.
TRACI_CONST int CMD_REROUTE_TRAVELTIME
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
TRACI_CONST int VAR_HEIGHT
TRACI_CONST int RESPONSE_GET_PERSON_VARIABLE
void initWrapper(const int domainID, const int variable, const std::string &objID)
TRACI_CONST int TYPE_COMPOUND
bool readTypeCheckingByte(tcpip::Storage &inputStorage, int &into)
Reads the value type and a byte, verifying the type.