41 const std::string
id = inputStorage.
readString();
47 std::string paramName =
"";
56 std::string paramName =
"";
84 std::string warning =
"";
154 std::string imageFile;
166 const int itemNo = inputStorage.
readInt();
188 double duration = -1;
208 const int parameterCount = inputStorage.
readInt();
225 if (parameterCount == 4) {
229 }
else if (parameterCount == 8) {
247 if (!
libsumo::POI::add(
id, pos.
x, pos.
y, col, type, layer, imgFile, width, height, angle)) {
252 "Adding a PoI requires either only type, color, layer and position parameters or these and imageFile, width, height and angle parameters.",
281 libsumo::POI::setParameter(
id, name, value);
std::string toHex(const T i, std::streamsize numDigits=0)
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xc7: Change PoI State)
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xa7: Get PoI Variable)
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.
tcpip::Storage & getWrapperStorage()
bool readTypeCheckingUnsignedByte(tcpip::Storage &inputStorage, int &into)
Reads the value type and an unsigned byte, verifying the type.
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 readTypeCheckingPosition2D(tcpip::Storage &inputStorage, libsumo::TraCIPosition &into)
Reads the value type and a 2D position, verifying the type.
bool readTypeCheckingInt(tcpip::Storage &inputStorage, int &into)
Reads the value type and an int, 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 bool remove(const std::string &poiID, int layer=0)
static void setPosition(const std::string &poiID, double x, double y)
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)
static void setHeight(const std::string &poiID, double height)
LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API void setType(const std::string &poiID, const std::string &setType)
static void setColor(const std::string &poiID, const TraCIColor &color)
static void setImageFile(const std::string &poiID, const std::string &imageFile)
static void setWidth(const std::string &poiID, double width)
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
static void setAngle(const std::string &poiID, double angle)
static void highlight(const std::string &poiID, const TraCIColor &col=TraCIColor(255, 0, 0, 255), double size=-1, const int alphaMax=-1, const double duration=-1, const int type=0)
virtual std::string readString()
virtual void writeString(const std::string &s)
virtual void writeInt(int)
virtual int readUnsignedByte()
virtual void writeUnsignedByte(int)
TRACI_CONST int VAR_IMAGEFILE
TRACI_CONST int CMD_GET_POI_VARIABLE
TRACI_CONST int VAR_ANGLE
TRACI_CONST int TYPE_COMPOUND
TRACI_CONST int VAR_HIGHLIGHT
TRACI_CONST int CMD_SET_POI_VARIABLE
TRACI_CONST int VAR_COLOR
TRACI_CONST int VAR_POSITION
TRACI_CONST int VAR_WIDTH
TRACI_CONST int RESPONSE_GET_POI_VARIABLE
TRACI_CONST int CMD_SET_VEHICLE_VARIABLE
TRACI_CONST int VAR_PARAMETER
TRACI_CONST int VAR_HEIGHT
TRACI_CONST int VAR_PARAMETER_WITH_KEY
TRACI_CONST int TYPE_STRING