SUMO - Simulation of Urban MObility
|
APIs for getting/setting POI values via TraCI. More...
#include <TraCIServerAPI_POI.h>
Static Public Member Functions | |
static bool | getPosition (const std::string &id, Position &p) |
Returns the named PoI's position. More... | |
static TraCIRTree * | getTree () |
Returns a tree filled with inductive loop instances. More... | |
static bool | processGet (traci::TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage) |
Processes a get value command (Command 0xa7: Get PoI Variable) More... | |
static bool | processSet (traci::TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage) |
Processes a set value command (Command 0xc7: Change PoI State) More... | |
Private Member Functions | |
TraCIServerAPI_POI & | operator= (const TraCIServerAPI_POI &s) |
invalidated assignment operator More... | |
TraCIServerAPI_POI (const TraCIServerAPI_POI &s) | |
invalidated copy constructor More... | |
Static Private Member Functions | |
static PointOfInterest * | getPoI (const std::string &id) |
Returns the named PoI. More... | |
APIs for getting/setting POI values via TraCI.
Definition at line 48 of file TraCIServerAPI_POI.h.
|
private |
invalidated copy constructor
|
staticprivate |
Returns the named PoI.
[in] | id | The id of the searched PoI |
Definition at line 222 of file TraCIServerAPI_POI.cpp.
References NamedObjectCont< T >::get(), MSNet::getInstance(), ShapeContainer::getPOIs(), and MSNet::getShapeContainer().
Returns the named PoI's position.
[in] | id | The id of the searched PoI |
[out] | p | The position, if the PoI is known |
Definition at line 211 of file TraCIServerAPI_POI.cpp.
Referenced by traci::TraCIServer::findObjectShape().
|
static |
Returns a tree filled with inductive loop instances.
Definition at line 228 of file TraCIServerAPI_POI.cpp.
References TraCIRTree::addObject(), MSNet::getInstance(), NamedObjectCont< T >::getMyMap(), ShapeContainer::getPOIs(), and MSNet::getShapeContainer().
Referenced by traci::TraCIServer::collectObjectsInRange().
|
private |
invalidated assignment operator
|
static |
Processes a get value command (Command 0xa7: Get PoI 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 56 of file TraCIServerAPI_POI.cpp.
References RGBColor::alpha(), RGBColor::blue(), CMD_GET_POI_VARIABLE, Shape::getColor(), MSNet::getInstance(), ShapeContainer::getPOIs(), MSNet::getShapeContainer(), Shape::getType(), RGBColor::green(), ID_COUNT, ID_LIST, NamedObjectCont< T >::insertIDs(), POSITION_2D, tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), RGBColor::red(), RESPONSE_GET_POI_VARIABLE, RTYPE_OK, TYPE_COLOR, TYPE_INTEGER, TYPE_STRING, TYPE_STRINGLIST, VAR_COLOR, VAR_POSITION, VAR_TYPE, tcpip::Storage::writeDouble(), traci::TraCIServer::writeErrorStatusCmd(), tcpip::Storage::writeInt(), traci::TraCIServer::writeResponseWithLength(), traci::TraCIServer::writeStatusCmd(), tcpip::Storage::writeString(), tcpip::Storage::writeStringList(), tcpip::Storage::writeUnsignedByte(), Position::x(), and Position::y().
Referenced by traci::TraCIServer::TraCIServer().
|
static |
Processes a set value command (Command 0xc7: Change PoI 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 116 of file TraCIServerAPI_POI.cpp.
References ADD, ShapeContainer::addPOI(), CMD_SET_POI_VARIABLE, Shape::DEFAULT_ANGLE, Shape::DEFAULT_IMG_FILE, Shape::DEFAULT_IMG_HEIGHT, Shape::DEFAULT_IMG_WIDTH, MSNet::getInstance(), MSNet::getShapeContainer(), ShapeContainer::movePOI(), tcpip::Storage::readInt(), tcpip::Storage::readString(), traci::TraCIServer::readTypeCheckingColor(), traci::TraCIServer::readTypeCheckingInt(), traci::TraCIServer::readTypeCheckingPosition2D(), traci::TraCIServer::readTypeCheckingString(), tcpip::Storage::readUnsignedByte(), REMOVE, ShapeContainer::removePOI(), RTYPE_OK, Shape::setColor(), Shape::setType(), SUMOReal, TYPE_COMPOUND, VAR_COLOR, VAR_POSITION, VAR_TYPE, traci::TraCIServer::writeErrorStatusCmd(), and traci::TraCIServer::writeStatusCmd().
Referenced by traci::TraCIServer::TraCIServer().