 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
45 const std::string
id = inputStorage.
readString();
52 int nextStageIndex = 0;
61 int nextStageIndex = 0;
69 std::string paramName =
"";
93 std::string warning =
"";
122 if (p ==
nullptr && shouldExist) {
151 libsumo::Person::setColor(
id, col);
158 if (inputStorage.
readInt() != 4) {
184 int numParameters = inputStorage.
readInt();
185 if (numParameters == 13) {
194 if (numParameters != 4) {
212 if (numParameters != 4) {
219 std::string description;
230 if (numParameters != 6) {
233 std::vector<std::string> edgeIDs;
266 if (inputStorage.
readInt() != 2) {
269 int nextStageIndex = 0;
276 if (inputStorage.
readInt() != 13) {
284 int nextStageIndex = 0;
295 if (inputStorage.
readInt() != 0) {
305 const int numArgs = inputStorage.
readInt();
329 int keepRouteFlag = 1;
TRACI_CONST int VAR_HEIGHT
const std::string & getID() const
Returns the name of the vehicle type.
static void setSpeed(const std::string &personID, double speed)
TRACI_CONST int VAR_MINGAP
TRACI_CONST int REPLACE_STAGE
virtual void writeUnsignedByte(int)
TRACI_CONST int VAR_COLOR
bool readTypeCheckingColor(tcpip::Storage &inputStorage, libsumo::TraCIColor &into)
Reads the value type and a color, verifying the type.
TRACI_CONST int CMD_GET_PERSON_VARIABLE
bool readTypeCheckingString(tcpip::Storage &inputStorage, std::string &into)
Reads the value type and a string, verifying the type.
TRACI_CONST int VAR_WIDTH
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
TRACI_CONST int VAR_PARAMETER
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
TRACI_CONST int APPEND_STAGE
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="")
tcpip::Storage & getWrapperStorage()
static void writeStage(tcpip::Storage &outputStorage, const libsumo::TraCIStage &stage)
TRACI_CONST int CMD_SET_VEHICLE_VARIABLE
bool readTypeCheckingDouble(tcpip::Storage &inputStorage, double &into)
Reads the value type and a double, verifying the type.
static libsumo::TraCIStage * readStage(TraCIServer &server, tcpip::Storage &inputStorage)
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
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.
MSTransportable * get(const std::string &id) const
Returns the named transportable, if existing.
void initWrapper(const int domainID, const int variable, const std::string &objID)
virtual int readUnsignedByte()
virtual std::string readString()
bool readTypeCheckingByte(tcpip::Storage &inputStorage, int &into)
Reads the value type and a byte, verifying the type.
virtual void writeStringList(const std::vector< 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)
TRACI_CONST int CMD_SET_PERSON_VARIABLE
bool readTypeCheckingStringList(tcpip::Storage &inputStorage, std::vector< std::string > &into)
Reads the value type and a string list, verifying the type.
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)
static TraCIStage getStage(const std::string &personID, int nextStageIndex=0)
TRACI_CONST int VAR_LENGTH
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xce: Change Person State)
TRACI_CONST int TYPE_STRINGLIST
TRACI_CONST int VAR_EDGES
virtual void writeString(const std::string &s)
static std::string getTypeID(const std::string &personID)
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")
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).
virtual MSTransportableControl & getPersonControl()
Returns the person control.
TRACI_CONST int RESPONSE_GET_PERSON_VARIABLE
static void setType(const std::string &personID, const std::string &typeID)
TRACI_CONST int TYPE_STRING
static void removeStage(const std::string &personID, int nextStageIndex)
static void appendStage(const TraCIStage &stage, const std::string &personID)
static void rerouteTraveltime(const std::string &personID)
static void replaceStage(const std::string &personID, const int stageIndex, const TraCIStage &stage)
TRACI_CONST int MOVE_TO_XY
TRACI_CONST int VAR_SPEED
TraCI server used to control sumo by a remote TraCI client.
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xae: Get Person Variable)
static void appendWaitingStage(const std::string &personID, double duration, const std::string &description="waiting", const std::string &stopID="")
TRACI_CONST int REMOVE_STAGE
static void setParameter(const std::string &personID, const std::string &key, const std::string &value)
static void appendDrivingStage(const std::string &personID, const std::string &toEdge, const std::string &lines, const std::string &stopID="")
TRACI_CONST int VAR_STAGE
TRACI_CONST int CMD_REROUTE_TRAVELTIME
static std::string getParameter(const std::string &routeID, const std::string ¶m)
MSVehicleType & getSingularType()
Replaces the current vehicle type with a new one used by this vehicle only.
TRACI_CONST int TYPE_COMPOUND
bool writeErrorStatusCmd(int commandId, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage with status = RTYPE_ERR.