43 const std::string
id = inputStorage.
readString();
46 if (!libsumo::Polygon::handleVariable(
id, variable, &server, &inputStorage)) {
60 std::string warning =
"";
67 "Change Polygon State: unsupported variable " +
toHex(variable, 2) +
" specified", outputStorage);
79 libsumo::Polygon::setType(
id, type);
87 libsumo::Polygon::setColor(
id, col);
103 libsumo::Polygon::setFilled(
id, value != 0);
111 libsumo::Polygon::setLineWidth(
id, value);
118 int itemNo = inputStorage.
readInt();
119 if (itemNo != 5 && itemNo != 6) {
134 bool fill = value != 0;
143 double lineWidth = 1;
150 libsumo::Polygon::add(
id, tp, col, fill, type, layer, lineWidth);
158 int itemNo = inputStorage.
readInt();
163 std::string trackedID;
168 std::vector<double> timeSpan;
173 std::vector<double> alphaSpan;
188 libsumo::Polygon::addDynamics(
id, trackedID, timeSpan, alphaSpan, looped != 0, rotate != 0);
197 libsumo::Polygon::remove(
id, layer);
215 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 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
An error which allows to continue.
virtual std::string readString()
virtual int readUnsignedByte()
TRACI_CONST int RESPONSE_GET_POLYGON_VARIABLE
TRACI_CONST int TYPE_COMPOUND
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 CMD_GET_POLYGON_VARIABLE