45 const std::string
id = inputStorage.
readString();
52 int nextStageIndex = 0;
61 int nextStageIndex = 0;
73 const std::vector<libsumo::TraCIReservation> result = libsumo::Person::getTaxiReservations(onlyNew);
103 std::vector<std::string> persons;
107 std::string splitID = libsumo::Person::splitTaxiReservation(
id, persons);
128 std::string warning =
"";
160 if (p ==
nullptr && shouldExist) {
171 libsumo::Person::setSpeed(
id, speed);
179 libsumo::Person::setType(
id, vTypeID);
183 double speedfactor = 0;
187 libsumo::Person::setSpeedFactor(
id, speedfactor);
195 libsumo::Person::setColor(
id, col);
202 if (inputStorage.
readInt() != 4) {
221 libsumo::Person::add(
id, edgeID, pos, depart, vTypeID);
229 libsumo::Person::remove(
id, (
char)why);
236 int numParameters = inputStorage.
readInt();
237 if (numParameters == 13) {
240 libsumo::Person::appendStage(
id, stage);
248 if (numParameters != 4) {
263 libsumo::Person::appendDrivingStage(
id, edgeID, lines, stopID);
266 if (numParameters != 4) {
273 std::string description;
281 libsumo::Person::appendWaitingStage(
id, duration, description, stopID);
284 if (numParameters != 6) {
287 std::vector<std::string> edgeIDs;
307 libsumo::Person::appendWalkingStage(
id, edgeIDs, arrivalPos, duration, speed, stopID);
320 if (inputStorage.
readInt() != 2) {
323 int nextStageIndex = 0;
330 if (inputStorage.
readInt() != 13) {
335 libsumo::Person::replaceStage(
id, nextStageIndex, stage);
340 int nextStageIndex = 0;
344 libsumo::Person::removeStage(
id, nextStageIndex);
351 if (inputStorage.
readInt() != 0) {
354 libsumo::Person::rerouteTraveltime(
id);
361 const int numArgs = inputStorage.
readInt();
378 libsumo::Person::moveTo(
id, laneID, position, posLat);
385 const int numArgs = inputStorage.
readInt();
386 if (numArgs != 5 && numArgs != 6) {
409 int keepRouteFlag = 1;
413 double matchThreshold = 100;
419 libsumo::Person::moveToXY(
id, edgeID, x, y, angle, keepRouteFlag, matchThreshold);
436 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 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.
static void writeStage(tcpip::Storage &outputStorage, const libsumo::TraCIStage &stage)
static void readStage(tcpip::Storage &inputStorage, libsumo::TraCIStage &stage, const std::string &error="")
An error which allows to continue.
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 VAR_SPEED_FACTOR
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_MOVE_TO
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 TYPE_INTEGER
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 TYPE_DOUBLE
TRACI_CONST int STAGE_DRIVING
TRACI_CONST int SPLIT_TAXI_RESERVATIONS
TRACI_CONST int TYPE_STRING