42 const std::string
id = inputStorage.
readString();
45 if (!libsumo::POI::handleVariable(
id, variable, &server, &inputStorage)) {
60 std::string warning =
"";
86 libsumo::POI::setType(
id, type);
94 libsumo::POI::setColor(
id, col);
102 libsumo::POI::setPosition(
id, pos.
x, pos.
y);
110 libsumo::POI::setWidth(
id, width);
118 libsumo::POI::setHeight(
id, height);
126 libsumo::POI::setAngle(
id, angle);
130 std::string imageFile;
134 libsumo::POI::setImageFile(
id, imageFile);
142 const int itemNo = inputStorage.
readInt();
164 double duration = -1;
176 libsumo::POI::highlight(
id, col, size, alphaMax, duration, type);
184 const int parameterCount = inputStorage.
readInt();
193 int layer =
StoHelp::readTypedInt(inputStorage,
"The third PoI parameter must be the layer encoded as int.");
198 if (parameterCount == 4) {
199 if (!libsumo::POI::add(
id, pos.
x, pos.
y, col, type, layer)) {
202 }
else if (parameterCount >= 8) {
224 if (!libsumo::POI::add(
id, pos.
x, pos.
y, col, type, layer, imgFile, width, height, angle, icon)) {
229 "Adding a PoI requires either only type, color, layer and position parameters or these and icon, imageFile, width, height and angle parameters.",
237 if (!libsumo::POI::remove(
id, layer)) {
256 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 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 int readTypedInt(tcpip::Storage &ret, const std::string &error="")
An error which allows to continue.
virtual std::string readString()
virtual int readUnsignedByte()
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
A 2D or 3D-position, for 2D positions z == INVALID_DOUBLE_VALUE.