SUMO - Simulation of Urban MObility
TraCIServerAPI_POI Class Reference

APIs for getting/setting POI values via TraCI. More...

#include <TraCIServerAPI_POI.h>

Collaboration diagram for TraCIServerAPI_POI:
Collaboration graph

Static Public Member Functions

static bool getPosition (const std::string &id, Position &p)
 Returns the named PoI's position. More...
 
static NamedRTreegetTree ()
 Returns a tree filled with PoI instances. More...
 
static bool processGet (TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
 Processes a get value command (Command 0xa7: Get PoI Variable) More...
 
static bool processSet (TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
 Processes a set value command (Command 0xc7: Change PoI State) More...
 

Private Member Functions

TraCIServerAPI_POIoperator= (const TraCIServerAPI_POI &s)
 invalidated assignment operator More...
 
 TraCIServerAPI_POI (const TraCIServerAPI_POI &s)
 invalidated copy constructor More...
 

Static Private Member Functions

static PointOfInterestgetPoI (const std::string &id)
 Returns the named PoI. More...
 

Detailed Description

APIs for getting/setting POI values via TraCI.

Definition at line 48 of file TraCIServerAPI_POI.h.

Constructor & Destructor Documentation

◆ TraCIServerAPI_POI()

TraCIServerAPI_POI::TraCIServerAPI_POI ( const TraCIServerAPI_POI s)
private

invalidated copy constructor

Member Function Documentation

◆ getPoI()

PointOfInterest * TraCIServerAPI_POI::getPoI ( const std::string &  id)
staticprivate

Returns the named PoI.

Parameters
[in]idThe id of the searched PoI
Returns
The named PoI, or 0 if it is not known

Definition at line 247 of file TraCIServerAPI_POI.cpp.

References NamedObjectCont< T >::get(), MSNet::getInstance(), ShapeContainer::getPOIs(), and MSNet::getShapeContainer().

Referenced by getPosition().

◆ getPosition()

bool TraCIServerAPI_POI::getPosition ( const std::string &  id,
Position p 
)
static

Returns the named PoI's position.

Parameters
[in]idThe id of the searched PoI
[out]pThe position, if the PoI is known
Returns
Whether the PoI is known (and on road)

Definition at line 236 of file TraCIServerAPI_POI.cpp.

References getPoI().

Referenced by TraCIServer::findObjectShape().

◆ getTree()

NamedRTree * TraCIServerAPI_POI::getTree ( )
static

Returns a tree filled with PoI instances.

Returns
The rtree of PoIs

Definition at line 253 of file TraCIServerAPI_POI.cpp.

References MSNet::getInstance(), NamedObjectCont< T >::getMyMap(), ShapeContainer::getPOIs(), MSNet::getShapeContainer(), and NamedRTree::Insert().

Referenced by TraCIServer::collectObjectsInRange().

◆ operator=()

TraCIServerAPI_POI& TraCIServerAPI_POI::operator= ( const TraCIServerAPI_POI s)
private

invalidated assignment operator

◆ processGet()

◆ processSet()

bool TraCIServerAPI_POI::processSet ( TraCIServer server,
tcpip::Storage inputStorage,
tcpip::Storage outputStorage 
)
static

The documentation for this class was generated from the following files: