44 const std::string
id = inputStorage.
readString();
47 if (!libsumo::Person::handleVariable(
id, variable, &server)) {
50 int nextStageIndex = 0;
59 int nextStageIndex = 0;
67 std::string paramName =
"";
76 std::string paramName =
"";
93 const std::vector<libsumo::TraCIReservation> result = libsumo::Person::getTaxiReservations(onlyNew);
136 std::string warning =
"";
165 if (p ==
nullptr && shouldExist) {
176 libsumo::Person::setSpeed(
id, speed);
186 libsumo::Person::setType(
id, vTypeID);
194 libsumo::Person::setColor(
id, col);
201 if (inputStorage.
readInt() != 4) {
220 libsumo::Person::add(
id, edgeID, pos, depart, vTypeID);
227 int numParameters = inputStorage.
readInt();
228 if (numParameters == 13) {
237 if (numParameters != 4) {
252 libsumo::Person::appendDrivingStage(
id, edgeID, lines, stopID);
255 if (numParameters != 4) {
262 std::string description;
270 libsumo::Person::appendWaitingStage(
id, duration, description, stopID);
273 if (numParameters != 6) {
276 std::vector<std::string> edgeIDs;
296 libsumo::Person::appendWalkingStage(
id, edgeIDs, arrivalPos, duration, speed, stopID);
309 if (inputStorage.
readInt() != 2) {
312 int nextStageIndex = 0;
319 if (inputStorage.
readInt() != 13) {
327 int nextStageIndex = 0;
331 libsumo::Person::removeStage(
id, nextStageIndex);
338 if (inputStorage.
readInt() != 0) {
341 libsumo::Person::rerouteTraveltime(
id);
348 const int numArgs = inputStorage.
readInt();
372 int keepRouteFlag = 1;
376 libsumo::Person::moveToXY(
id, edgeID, x, y, angle, keepRouteFlag);
393 libsumo::Person::setParameter(
id, name, value);
std::string toHex(const T i, std::streamsize numDigits=0)
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
virtual MSTransportableControl & getPersonControl()
Returns the person control.
MSTransportable * get(const std::string &id) const
Returns the named transportable, if existing.
MSVehicleType & getSingularType()
Replaces the current vehicle type with a new one used by this vehicle only.
const std::string & getID() const
Returns the name of the vehicle type.
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xae: Get Person Variable)
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xce: Change Person State)
static libsumo::TraCIStage * readStage(TraCIServer &server, tcpip::Storage &inputStorage)
static void writeStage(tcpip::Storage &outputStorage, const libsumo::TraCIStage &stage)
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.
TraCI server used to control sumo by a remote TraCI client.
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
bool readTypeCheckingString(tcpip::Storage &inputStorage, std::string &into)
Reads the value type and a string, verifying the type.
bool readTypeCheckingByte(tcpip::Storage &inputStorage, int &into)
Reads the value type and a byte, verifying the type.
tcpip::Storage & getWrapperStorage()
void initWrapper(const int domainID, const int variable, const std::string &objID)
bool writeErrorStatusCmd(int commandId, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage with status = RTYPE_ERR.
bool readTypeCheckingInt(tcpip::Storage &inputStorage, int &into)
Reads the value type and an int, verifying the type.
bool readTypeCheckingStringList(tcpip::Storage &inputStorage, std::vector< std::string > &into)
Reads the value type and a string list, verifying the type.
bool readTypeCheckingDouble(tcpip::Storage &inputStorage, double &into)
Reads the value type and a double, verifying the type.
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
bool readTypeCheckingColor(tcpip::Storage &inputStorage, libsumo::TraCIColor &into)
Reads the value type and a color, verifying the type.
virtual std::string readString()
virtual void writeString(const std::string &s)
virtual void writeInt(int)
virtual void writeDouble(double)
virtual int readUnsignedByte()
virtual void writeStringList(const std::vector< std::string > &s)
virtual void writeUnsignedByte(int)
TRACI_CONST int VAR_EDGES
TRACI_CONST int VAR_MINGAP
TRACI_CONST int REPLACE_STAGE
TRACI_CONST int VAR_TAXI_RESERVATIONS
TRACI_CONST int MOVE_TO_XY
TRACI_CONST int TYPE_COMPOUND
TRACI_CONST int CMD_GET_PERSON_VARIABLE
TRACI_CONST int VAR_STAGE
TRACI_CONST int VAR_COLOR
TRACI_CONST int VAR_WIDTH
TRACI_CONST int STAGE_WAITING
TRACI_CONST int CMD_REROUTE_TRAVELTIME
TRACI_CONST int TYPE_STRINGLIST
TRACI_CONST int APPEND_STAGE
TRACI_CONST int CMD_SET_VEHICLE_VARIABLE
TRACI_CONST int VAR_LENGTH
TRACI_CONST int VAR_PARAMETER
TRACI_CONST int CMD_SET_PERSON_VARIABLE
TRACI_CONST int VAR_HEIGHT
TRACI_CONST int RESPONSE_GET_PERSON_VARIABLE
TRACI_CONST int STAGE_WALKING
TRACI_CONST int REMOVE_STAGE
TRACI_CONST int VAR_SPEED
TRACI_CONST int VAR_PARAMETER_WITH_KEY
TRACI_CONST int TYPE_DOUBLE
TRACI_CONST int STAGE_DRIVING
TRACI_CONST int TYPE_STRING