 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
45 const std::string
id = inputStorage.
readString();
54 std::string paramName =
"";
77 std::string warning =
"";
84 "Change Polygon State: unsupported variable " +
toHex(variable, 2) +
" specified", outputStorage);
135 int itemNo = inputStorage.
readInt();
136 if (itemNo != 5 && itemNo != 6) {
151 bool fill = value != 0;
160 double lineWidth = 1;
175 int itemNo = inputStorage.
readInt();
180 std::string trackedID;
185 std::vector<double> timeSpan;
190 std::vector<double> alphaSpan;
TRACI_CONST int CMD_GET_POLYGON_VARIABLE
static void setColor(const std::string &polygonID, const TraCIColor &c)
TRACI_CONST int RESPONSE_GET_POLYGON_VARIABLE
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 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)
bool readTypeCheckingUnsignedByte(tcpip::Storage &inputStorage, int &into)
Reads the value type and an unsigned byte, verifying the type.
virtual void writeUnsignedByte(int)
TRACI_CONST int VAR_COLOR
bool readTypeCheckingColor(tcpip::Storage &inputStorage, libsumo::TraCIColor &into)
Reads the value type and a color, verifying the type.
bool readTypeCheckingString(tcpip::Storage &inputStorage, std::string &into)
Reads the value type and a string, verifying the type.
TRACI_CONST int VAR_WIDTH
TRACI_CONST int CMD_SET_POLYGON_VARIABLE
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xc8: Change Polygon State)
static std::string getParameter(const std::string &polygonID, const std::string &key)
static void remove(const std::string &polygonID, int layer=0)
TRACI_CONST int VAR_PARAMETER
TRACI_CONST int VAR_MOVE_TO
tcpip::Storage & getWrapperStorage()
TRACI_CONST int CMD_SET_VEHICLE_VARIABLE
static void setShape(const std::string &polygonID, const TraCIPositionVector &shape)
bool readTypeCheckingDouble(tcpip::Storage &inputStorage, double &into)
Reads the value type and a double, verifying the type.
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
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)
TRACI_CONST int VAR_SHAPE
virtual int readUnsignedByte()
bool readTypeCheckingDoubleList(tcpip::Storage &inputStorage, std::vector< double > &into)
Reads the value type and a double list, verifying the type.
bool readTypeCheckingPolygon(tcpip::Storage &inputStorage, PositionVector &into)
Reads the value type and a polygon, verifying the type.
virtual std::string readString()
std::string toHex(const T i, std::streamsize numDigits=0)
static void setFilled(std::string polygonID, bool filled)
static TraCIPositionVector makeTraCIPositionVector(const PositionVector &positionVector)
helper functions
void writePositionVector(tcpip::Storage &outputStorage, const libsumo::TraCIPositionVector &shape)
virtual void writeString(const std::string &s)
bool readTypeCheckingInt(tcpip::Storage &inputStorage, int &into)
Reads the value type and an int, verifying the type.
TRACI_CONST int VAR_ADD_DYNAMICS
TRACI_CONST int TYPE_STRING
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xa8: Get Polygon Variable)
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 TraCIPositionVector getShape(const std::string &polygonID)
std::vector< TraCIPosition > TraCIPositionVector
TraCI server used to control sumo by a remote TraCI client.
static void setLineWidth(std::string polygonID, double lineWidth)
TRACI_CONST int TYPE_COMPOUND
bool writeErrorStatusCmd(int commandId, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage with status = RTYPE_ERR.