 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
42 const std::string
id = inputStorage.
readString();
48 std::string paramName =
"";
72 std::string warning =
"";
142 std::string imageFile;
176 double duration = -1;
196 const int parameterCount = inputStorage.
readInt();
213 if (parameterCount == 4) {
217 }
else if (parameterCount == 8) {
235 if (!
libsumo::POI::add(
id, pos.
x, pos.
y, col, type, layer, imgFile, width, height, angle)) {
240 "Adding a PoI requires either only type, color, layer and position parameters or these and imageFile, width, height and angle parameters.",
TRACI_CONST int VAR_HEIGHT
TRACI_CONST int VAR_POSITION
bool readTypeCheckingUnsignedByte(tcpip::Storage &inputStorage, int &into)
Reads the value type and an unsigned byte, verifying the type.
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_SET_POI_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_HIGHLIGHT
TRACI_CONST int VAR_PARAMETER
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
tcpip::Storage & getWrapperStorage()
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 void setHeight(const std::string &poiID, double height)
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
static void setPosition(const std::string &poiID, double x, double y)
TRACI_CONST int RESPONSE_GET_POI_VARIABLE
static void setAngle(const std::string &poiID, double angle)
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xc7: Change PoI State)
void initWrapper(const int domainID, const int variable, const std::string &objID)
virtual int readUnsignedByte()
static bool add(const std::string &poiID, double x, double y, const TraCIColor &color, const std::string &poiType="", int layer=0, const std::string &imgFile=Shape::DEFAULT_IMG_FILE, double width=Shape::DEFAULT_IMG_WIDTH, double height=Shape::DEFAULT_IMG_HEIGHT, double angle=Shape::DEFAULT_ANGLE)
TRACI_CONST int CMD_GET_POI_VARIABLE
virtual std::string readString()
TRACI_CONST int VAR_ANGLE
std::string toHex(const T i, std::streamsize numDigits=0)
static void setType(const std::string &poiID, const std::string &setType)
static void setWidth(const std::string &poiID, double width)
virtual void writeString(const std::string &s)
static void setColor(const std::string &poiID, const TraCIColor &c)
bool readTypeCheckingInt(tcpip::Storage &inputStorage, int &into)
Reads the value type and an int, verifying the type.
static std::string getParameter(const std::string &poiID, const std::string &key)
TRACI_CONST int TYPE_STRING
static void setImageFile(const std::string &poiID, const std::string &imageFile)
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 0xa7: Get PoI Variable)
TRACI_CONST int VAR_IMAGEFILE
bool readTypeCheckingPosition2D(tcpip::Storage &inputStorage, libsumo::TraCIPosition &into)
Reads the value type and a 2D position, verifying the type.
static void highlight(const std::string &poiID, const TraCIColor &col, double size, const int alphaMax, const double duration, const int type)
static void setParameter(const std::string &poiID, const std::string &key, const std::string &value)
static bool remove(const std::string &poiID, int layer=0)
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.