44 const std::string
id = inputStorage.
readString();
53 std::string paramName =
"";
76 std::string warning =
"";
83 "Change Polygon State: unsupported variable " +
toHex(variable, 2) +
" specified", outputStorage);
134 int itemNo = inputStorage.
readInt();
135 if (itemNo != 5 && itemNo != 6) {
150 bool fill = value != 0;
159 double lineWidth = 1;
static void setColor(const std::string &polygonID, const TraCIColor &c)
bool readTypeCheckingColor(tcpip::Storage &inputStorage, libsumo::TraCIColor &into)
Reads the value type and a color, verifying the type.
static void setLineWidth(std::string polygonID, double lineWidth)
static std::string getParameter(const std::string &polygonID, const std::string &key)
static void add(const std::string &polygonID, const TraCIPositionVector &shape, const TraCIColor &color, bool fill=false, double lineWidth=1, const std::string &polygonType="", int layer=0)
static void setFilled(std::string polygonID, bool filled)
#define RESPONSE_GET_POLYGON_VARIABLE
bool readTypeCheckingInt(tcpip::Storage &inputStorage, int &into)
Reads the value type and an int, verifying the type.
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.
#define CMD_GET_POLYGON_VARIABLE
bool readTypeCheckingPolygon(tcpip::Storage &inputStorage, PositionVector &into)
Reads the value type and a polygon, verifying the type.
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.
static TraCIPositionVector makeTraCIPositionVector(const PositionVector &positionVector)
helper functions
virtual int readUnsignedByte()
static void remove(const std::string &polygonID, int layer=0)
#define CMD_SET_VEHICLE_VARIABLE
static TraCIPositionVector getShape(const std::string &polygonID)
static void setShape(const std::string &polygonID, const TraCIPositionVector &shape)
tcpip::Storage & getWrapperStorage()
virtual std::string readString()
bool readTypeCheckingUnsignedByte(tcpip::Storage &inputStorage, int &into)
Reads the value type and an unsigned byte, verifying the type.
TraCI server used to control sumo by a remote TraCI client.
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
#define CMD_SET_POLYGON_VARIABLE
void writePositionVector(tcpip::Storage &outputStorage, const libsumo::TraCIPositionVector &shape)
virtual void writeString(const std::string &s)
std::string toHex(const T i, std::streamsize numDigits=0)
std::vector< TraCIPosition > TraCIPositionVector
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xa8: Get Polygon Variable)
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)
static void setParameter(const std::string &polygonID, const std::string &key, const std::string &value)
static void setType(const std::string &polygonID, const std::string &setType)
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xc8: Change Polygon State)