43 const std::string
id = inputStorage.
readString();
52 std::string paramName =
"";
61 std::string paramName =
"";
88 std::string warning =
"";
95 "Change Polygon State: unsupported variable " +
toHex(variable, 2) +
" specified", outputStorage);
146 int itemNo = inputStorage.
readInt();
147 if (itemNo != 5 && itemNo != 6) {
162 bool fill = value != 0;
171 double lineWidth = 1;
186 int itemNo = inputStorage.
readInt();
191 std::string trackedID;
196 std::vector<double> timeSpan;
201 std::vector<double> alphaSpan;
243 libsumo::Polygon::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 0xc8: Change Polygon State)
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xa8: Get Polygon 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 readTypeCheckingInt(tcpip::Storage &inputStorage, int &into)
Reads the value type and an int, verifying the type.
bool readTypeCheckingDoubleList(tcpip::Storage &inputStorage, std::vector< double > &into)
Reads the value type and a double list, verifying the type.
bool readTypeCheckingDouble(tcpip::Storage &inputStorage, double &into)
Reads the value type and a double, verifying the type.
void writePositionVector(tcpip::Storage &outputStorage, const libsumo::TraCIPositionVector &shape)
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
bool readTypeCheckingPolygon(tcpip::Storage &inputStorage, PositionVector &into)
Reads the value type and a polygon, verifying the type.
bool readTypeCheckingColor(tcpip::Storage &inputStorage, libsumo::TraCIColor &into)
Reads the value type and a color, verifying the type.
static TraCIPositionVector makeTraCIPositionVector(const PositionVector &positionVector)
helper functions
static void setShape(const std::string &polygonID, const TraCIPositionVector &shape)
static void setLineWidth(std::string polygonID, double lineWidth)
static void addDynamics(const std::string &polygonID, const std::string &trackedID="", const std::vector< double > &timeSpan=std::vector< double >(), const std::vector< double > &alphaSpan=std::vector< double >(), bool looped=false, bool rotate=true)
static void setColor(const std::string &polygonID, const TraCIColor &color)
static void add(const std::string &polygonID, const TraCIPositionVector &shape, const TraCIColor &color, bool fill=false, const std::string &polygonType="", int layer=0, double lineWidth=1)
static void remove(const std::string &polygonID, int layer=0)
static TraCIPositionVector getShape(const std::string &polygonID)
static void setFilled(std::string polygonID, bool filled)
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API void setType(const std::string &polygonID, const std::string &setType)
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 RESPONSE_GET_POLYGON_VARIABLE
TRACI_CONST int TYPE_COMPOUND
std::vector< TraCIPosition > TraCIPositionVector
TRACI_CONST int VAR_MOVE_TO
TRACI_CONST int CMD_SET_POLYGON_VARIABLE
TRACI_CONST int VAR_COLOR
TRACI_CONST int VAR_WIDTH
TRACI_CONST int CMD_SET_VEHICLE_VARIABLE
TRACI_CONST int VAR_SHAPE
TRACI_CONST int VAR_PARAMETER
TRACI_CONST int VAR_ADD_DYNAMICS
TRACI_CONST int VAR_PARAMETER_WITH_KEY
TRACI_CONST int CMD_GET_POLYGON_VARIABLE
TRACI_CONST int TYPE_STRING