58 "Get Polygon Variable: unsupported variable " +
toHex(variable, 2) +
" specified", outputStorage);
97 for (
int iPoint = 0; iPoint < (int)tp.size(); ++iPoint) {
109 std::string paramName =
"";
130 std::string warning =
"";
136 "Change Polygon State: unsupported variable " +
toHex(variable, 2) +
" specified", outputStorage);
193 bool fill = value != 0;
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.
const Polygons & getPolygons() const
Returns all polygons.
T get(const std::string &id) const
Retrieves an item.
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.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
bool readTypeCheckingString(tcpip::Storage &inputStorage, std::string &into)
Reads the value type and a string, verifying the type.
const PositionVector & getShape() const
Returns whether the shape of the polygon.
#define CMD_GET_POLYGON_VARIABLE
static TraCIPositionVector makeTraCIPositionVector(const PositionVector &positionVector)
helper functions
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.
virtual void writeInt(int)
virtual int readUnsignedByte()
static std::string getType(const std::string &polygonID)
ShapeContainer & getShapeContainer()
Returns the shapes container.
static std::string getParameter(const std::string &polygonID, const std::string ¶mName)
virtual void writeStringList(const std::vector< std::string > &s)
static void remove(const std::string &polygonID, int layer=0)
static TraCIPositionVector getShape(const std::string &polygonID)
static void setShape(const std::string &polygonID, const TraCIPositionVector &shape)
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.
static void setParameter(std::string &name, std::string &value, std::string &string)
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
#define CMD_SET_POLYGON_VARIABLE
virtual void writeString(const std::string &s)
static std::vector< std::string > getIDList()
std::string toHex(const T i, std::streamsize numDigits=0)
std::vector< TraCIPosition > TraCIPositionVector
static void add(const std::string &polygonID, const TraCIPositionVector &shape, const TraCIColor &c, bool fill, const std::string &type, int layer)
static SUMOPolygon * getPolygon(const std::string &id)
Returns the named polygon.
static TraCIColor getColor(const std::string &polygonID)
static bool getFilled(const std::string &polygonID)
virtual void writeDouble(double)
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.
static bool getShape(const std::string &id, PositionVector &shape)
Returns the named polygons's shape.
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)