104 std::string paramName =
"";
129 std::string warning =
"";
256 const std::map<std::string, PointOfInterest*>& pois = shapeCont.
getPOIs().
getMyMap();
257 for (std::map<std::string, PointOfInterest*>::const_iterator i = pois.begin(); i != pois.end(); ++i) {
258 const float cmin[2] = {(float)(*i).second->x(), (float)(*i).second->y()};
259 const float cmax[2] = {(float)(*i).second->x(), (float)(*i).second->y()};
260 t->
Insert(cmin, cmax, (*i).second);
void Insert(const float a_min[2], const float a_max[2], Named *const &a_data)
Insert entry.
bool readTypeCheckingColor(tcpip::Storage &inputStorage, TraCIColor &into)
Reads the value type and a color, verifying the type.
static void setColor(const std::string &poiID, const TraCIColor &c)
static bool processSet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a set value command (Command 0xc7: Change PoI State)
T get(const std::string &id) const
Retrieves an item.
static void setType(const std::string &poiID, const std::string &setType)
A RT-tree for efficient storing of SUMO's Named objects.
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).
static void addParameter(const std::string &poiID, const std::string ¶m, const std::string &value)
bool readTypeCheckingString(tcpip::Storage &inputStorage, std::string &into)
Reads the value type and a string, verifying the type.
static std::vector< std::string > getIDList()
Storage for geometrical objects.
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 NamedRTree * getTree()
Returns a tree filled with PoI instances.
ShapeContainer & getShapeContainer()
Returns the shapes container.
A point in 2D or 3D with translation and scaling methods.
#define CMD_GET_POI_VARIABLE
static std::string getParameter(const std::string &poiID, const std::string ¶m)
const IDMap & getMyMap() const
virtual void writeStringList(const std::vector< std::string > &s)
virtual std::string readString()
#define CMD_SET_POI_VARIABLE
static bool getPosition(const std::string &id, Position &p)
Returns the named PoI's position.
TraCI server used to control sumo by a remote TraCI client.
static TraCIPosition getPosition(const std::string &poiID)
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xa7: Get PoI Variable)
static bool add(const std::string &poiID, const TraCIPosition &pos, const TraCIColor &c, const std::string &type, int layer)
virtual void writeString(const std::string &s)
static TraCIColor getColor(const std::string &poiID)
std::string toHex(const T i, std::streamsize numDigits=0)
static void setPosition(const std::string &poiID, const TraCIPosition &pos)
#define RESPONSE_GET_POI_VARIABLE
static std::string getType(const std::string &poiID)
virtual void writeDouble(double)
bool readTypeCheckingPosition2D(tcpip::Storage &inputStorage, TraCIPosition &into)
Reads the value type and a 2D position, verifying the type.
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
static PointOfInterest * getPoI(const std::string &id)
Returns the named PoI.
static bool remove(const std::string &poiID, int layer=0)
const POIs & getPOIs() const
Returns all pois.