![]() |
SUMO - Simulation of Urban MObility
|
APIs for getting/setting polygon values via TraCI. More...
#include <TraCIServerAPI_Polygon.h>
Static Public Member Functions | |
static bool | getShape (const std::string &id, PositionVector &shape) |
Returns the named polygons's shape. More... | |
static NamedRTree * | getTree () |
Returns a tree filled with polygon instances. More... | |
static bool | processGet (TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage) |
Processes a get value command (Command 0xa8: Get Polygon Variable) More... | |
static bool | processSet (TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage) |
Processes a set value command (Command 0xc8: Change Polygon State) More... | |
Private Member Functions | |
TraCIServerAPI_Polygon & | operator= (const TraCIServerAPI_Polygon &s) |
invalidated assignment operator More... | |
TraCIServerAPI_Polygon (const TraCIServerAPI_Polygon &s) | |
invalidated copy constructor More... | |
Static Private Member Functions | |
static SUMO::Polygon * | getPolygon (const std::string &id) |
Returns the named polygon. More... | |
APIs for getting/setting polygon values via TraCI.
Definition at line 48 of file TraCIServerAPI_Polygon.h.
|
private |
invalidated copy constructor
|
staticprivate |
Returns the named polygon.
[in] | id | The id of the searched polygon |
Definition at line 259 of file TraCIServerAPI_Polygon.cpp.
References MSNet::getInstance(), ShapeContainer::getPolygons(), and MSNet::getShapeContainer().
Referenced by getShape().
|
static |
Returns the named polygons's shape.
[in] | id | The id of the searched polygon |
[out] | shape | The shape, if the polygon is known |
Definition at line 249 of file TraCIServerAPI_Polygon.cpp.
References getPolygon(), and SUMO::Polygon::getShape().
Referenced by TraCIServer::findObjectShape().
|
static |
Returns a tree filled with polygon instances.
Definition at line 264 of file TraCIServerAPI_Polygon.cpp.
References MSNet::getInstance(), ShapeContainer::getPolygons(), MSNet::getShapeContainer(), NamedRTree::Insert(), Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
Referenced by TraCIServer::collectObjectsInRange().
|
private |
invalidated assignment operator
|
static |
Processes a get value command (Command 0xa8: Get Polygon Variable)
[in] | server | The TraCI-server-instance which schedules this request |
[in] | inputStorage | The storage to read the command from |
[out] | outputStorage | The storage to write the result to |
Definition at line 51 of file TraCIServerAPI_Polygon.cpp.
References TraCIColor::a, TraCIColor::b, CMD_GET_POLYGON_VARIABLE, TraCIColor::g, TraCI_Polygon::getColor(), TraCI_Polygon::getFilled(), TraCI_Polygon::getIDList(), TraCI_Polygon::getParameter(), TraCI_Polygon::getShape(), TraCI_Polygon::getType(), ID_COUNT, ID_LIST, TraCIColor::r, tcpip::Storage::readString(), TraCIServer::readTypeCheckingString(), tcpip::Storage::readUnsignedByte(), RESPONSE_GET_POLYGON_VARIABLE, RTYPE_OK, toHex(), TYPE_COLOR, TYPE_INTEGER, TYPE_POLYGON, TYPE_STRING, TYPE_STRINGLIST, TYPE_UBYTE, VAR_COLOR, VAR_FILL, VAR_PARAMETER, VAR_SHAPE, VAR_TYPE, tcpip::Storage::writeDouble(), TraCIServer::writeErrorStatusCmd(), tcpip::Storage::writeInt(), TraCIServer::writeResponseWithLength(), TraCIServer::writeStatusCmd(), tcpip::Storage::writeString(), tcpip::Storage::writeStringList(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCIServer::TraCIServer().
|
static |
Processes a set value command (Command 0xc8: Change Polygon State)
[in] | server | The TraCI-server-instance which schedules this request |
[in] | inputStorage | The storage to read the command from |
[out] | outputStorage | The storage to write the result to |
Definition at line 130 of file TraCIServerAPI_Polygon.cpp.
References TraCI_Polygon::add(), ADD, CMD_SET_POLYGON_VARIABLE, TraCI::makeTraCIPositionVector(), tcpip::Storage::readInt(), tcpip::Storage::readString(), TraCIServer::readTypeCheckingColor(), TraCIServer::readTypeCheckingInt(), TraCIServer::readTypeCheckingPolygon(), TraCIServer::readTypeCheckingString(), TraCIServer::readTypeCheckingUnsignedByte(), tcpip::Storage::readUnsignedByte(), TraCI_Polygon::remove(), REMOVE, RTYPE_OK, TraCI_Polygon::setColor(), TraCI_Polygon::setFilled(), TraCI_Polygon::setParameter(), TraCI_Polygon::setShape(), TraCI_Polygon::setType(), toHex(), TYPE_COMPOUND, VAR_COLOR, VAR_FILL, VAR_PARAMETER, VAR_SHAPE, VAR_TYPE, TraCIServer::writeErrorStatusCmd(), and TraCIServer::writeStatusCmd().
Referenced by TraCIServer::TraCIServer().