45 const std::string
id = inputStorage.
readString();
52 int nextStageIndex = 0;
61 int nextStageIndex = 0;
70 std::string paramName =
"";
94 std::string warning =
"";
120 const bool shouldExist = variable !=
ADD;
122 if (p ==
nullptr && shouldExist) {
151 libsumo::Person::setColor(
id, col);
158 if (inputStorage.
readInt() != 4) {
184 int numParameters = inputStorage.
readInt();
191 if (numParameters != 4) {
209 if (numParameters != 4) {
216 std::string description;
227 if (numParameters != 6) {
230 std::vector<std::string> edgeIDs;
257 int nextStageIndex = 0;
268 if (inputStorage.
readInt() != 0) {
278 const int numArgs = inputStorage.
readInt();
302 int keepRouteFlag = 1;
static void rerouteTraveltime(const std::string &personID)
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)
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="")
static std::string getParameter(const std::string &routeID, const std::string ¶m)
static void setType(const std::string &personID, const std::string &typeID)
#define CMD_GET_PERSON_VARIABLE
bool readTypeCheckingInt(tcpip::Storage &inputStorage, int &into)
Reads the value type and an int, verifying the type.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
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 int getStage(const std::string &personID, int nextStageIndex=0)
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.
virtual void writeInt(int)
static void setSpeed(const std::string &personID, double speed)
virtual int readUnsignedByte()
MSVehicleType & getSingularType()
Replaces the current vehicle type with a new one used by this vehicle only.
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")
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xce: Change Person State)
static std::string getTypeID(const std::string &personID)
static void appendDrivingStage(const std::string &personID, const std::string &toEdge, const std::string &lines, const std::string &stopID="")
virtual MSTransportableControl & getPersonControl()
Returns the person control.
bool readTypeCheckingStringList(tcpip::Storage &inputStorage, std::vector< std::string > &into)
Reads the value type and a string list, verifying the type.
virtual void writeStringList(const std::vector< std::string > &s)
#define CMD_SET_VEHICLE_VARIABLE
tcpip::Storage & getWrapperStorage()
virtual std::string readString()
TraCI server used to control sumo by a remote TraCI client.
static void removeStage(const std::string &personID, int nextStageIndex)
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)
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)
std::string toHex(const T i, std::streamsize numDigits=0)
#define CMD_REROUTE_TRAVELTIME
#define RESPONSE_GET_PERSON_VARIABLE
const std::string & getID() const
Returns the name of the vehicle type.
static void appendWaitingStage(const std::string &personID, double duration, const std::string &description="waiting", const std::string &stopID="")
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
MSTransportable * get(const std::string &id) const
Returns the named transportable, if existing.
static void moveToXY(const std::string &personID, const std::string &edgeID, const double x, const double y, double angle, const int keepRouteFlag)
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
void initWrapper(const int domainID, const int variable, const std::string &objID)
#define CMD_SET_PERSON_VARIABLE
bool readTypeCheckingByte(tcpip::Storage &inputStorage, int &into)
Reads the value type and a byte, verifying the type.