Eclipse SUMO - Simulation of Urban MObility
TraCIAPI::POIScope Class Reference

Scope for interaction with POIs. More...

#include <TraCIAPI.h>

Inheritance diagram for TraCIAPI::POIScope:
[legend]
Collaboration diagram for TraCIAPI::POIScope:
[legend]

Public Member Functions

void add (const std::string &poiID, double x, double y, const libsumo::TraCIColor &c, const std::string &type, int layer, const std::string &imgFile, double width, double height, double angle) const
 
void clearSubscriptionResults ()
 
const libsumo::ContextSubscriptionResults getAllContextSubscriptionResults () const
 
const libsumo::SubscriptionResults getAllSubscriptionResults () const
 
double getAngle (const std::string &poiID) const
 
libsumo::TraCIColor getColor (const std::string &poiID) const
 
const libsumo::SubscriptionResults getContextSubscriptionResults (const std::string &objID) const
 
double getHeight (const std::string &poiID) const
 
int getIDCount () const
 
std::vector< std::string > getIDList () const
 
std::string getImageFile (const std::string &poiID) const
 
libsumo::SubscriptionResultsgetModifiableContextSubscriptionResults (const std::string &objID)
 
libsumo::SubscriptionResultsgetModifiableSubscriptionResults ()
 
std::string getParameter (const std::string &objectID, const std::string &key) const
 retrieve generic parameter More...
 
std::pair< std::string, std::string > getParameterWithKey (const std::string &objectID, const std::string &key) const
 retrieve generic parameter and return (key, value) tuple More...
 
libsumo::TraCIPosition getPosition (const std::string &poiID) const
 
const libsumo::TraCIResults getSubscriptionResults (const std::string &objID) const
 
std::string getType (const std::string &poiID) const
 
double getWidth (const std::string &poiID) const
 
 POIScope (TraCIAPI &parent)
 
void remove (const std::string &poiID, int layer=0) const
 
void setAngle (const std::string &poiID, double angle) const
 
void setColor (const std::string &poiID, const libsumo::TraCIColor &c) const
 
void setHeight (const std::string &poiID, double height) const
 
void setImageFile (const std::string &poiID, const std::string &imageFile) const
 
void setParameter (const std::string &objectID, const std::string &key, const std::string &value) const
 set generic paramter More...
 
void setPosition (const std::string &poiID, double x, double y) const
 
void setType (const std::string &poiID, const std::string &setType) const
 
void setWidth (const std::string &poiID, double width) const
 
void subscribe (const std::string &objID, const std::vector< int > &vars, double beginTime, double endTime) const
 
void subscribeContext (const std::string &objID, int domain, double range, const std::vector< int > &vars, double beginTime, double endTime) const
 
virtual ~POIScope ()
 

Protected Member Functions

int getByte (int var, const std::string &id, tcpip::Storage *add=0) const
 
libsumo::TraCIColor getCol (int var, const std::string &id, tcpip::Storage *add=0) const
 
double getDouble (int var, const std::string &id, tcpip::Storage *add=0) const
 
std::vector< double > getDoubleVector (int var, const std::string &id, tcpip::Storage *add=0) const
 
int getInt (int var, const std::string &id, tcpip::Storage *add=0) const
 
libsumo::TraCIPositionVector getPolygon (int var, const std::string &id, tcpip::Storage *add=0) const
 
libsumo::TraCIPosition getPos (int var, const std::string &id, tcpip::Storage *add=0) const
 
libsumo::TraCIPosition getPos3D (int var, const std::string &id, tcpip::Storage *add=0) const
 
std::string getString (int var, const std::string &id, tcpip::Storage *add=0) const
 
std::vector< std::string > getStringVector (int var, const std::string &id, tcpip::Storage *add=0) const
 
libsumo::TraCIStage getTraCIStage (int var, const std::string &id, tcpip::Storage *add=0) const
 
int getUnsignedByte (int var, const std::string &id, tcpip::Storage *add=0) const
 
void setDouble (int var, const std::string &id, double value) const
 
void setInt (int var, const std::string &id, int value) const
 
void setString (int var, const std::string &id, const std::string &value) const
 
void setStringVector (int var, const std::string &id, const std::vector< std::string > &value) const
 

Protected Attributes

TraCIAPImyParent
 The parent TraCI client which offers the connection. More...
 

Private Attributes

int myCmdGetID
 
int myCmdSetID
 
int myContextSubscribeID
 
libsumo::ContextSubscriptionResults myContextSubscriptionResults
 
int mySubscribeID
 
libsumo::SubscriptionResults mySubscriptionResults
 

Detailed Description

Scope for interaction with POIs.

Definition at line 330 of file TraCIAPI.h.

Constructor & Destructor Documentation

◆ POIScope()

TraCIAPI::POIScope::POIScope ( TraCIAPI parent)
inline

Definition at line 332 of file TraCIAPI.h.

◆ ~POIScope()

virtual TraCIAPI::POIScope::~POIScope ( )
inlinevirtual

Definition at line 333 of file TraCIAPI.h.

Member Function Documentation

◆ add()

void TraCIAPI::POIScope::add ( const std::string &  poiID,
double  x,
double  y,
const libsumo::TraCIColor c,
const std::string &  type,
int  layer,
const std::string &  imgFile,
double  width,
double  height,
double  angle 
) const

◆ clearSubscriptionResults()

void TraCIAPI::TraCIScopeWrapper::clearSubscriptionResults ( )
inherited

Definition at line 3889 of file TraCIAPI.cpp.

◆ getAllContextSubscriptionResults()

const libsumo::ContextSubscriptionResults TraCIAPI::TraCIScopeWrapper::getAllContextSubscriptionResults ( ) const
inherited

Definition at line 3873 of file TraCIAPI.cpp.

◆ getAllSubscriptionResults()

const libsumo::SubscriptionResults TraCIAPI::TraCIScopeWrapper::getAllSubscriptionResults ( ) const
inherited

Definition at line 3857 of file TraCIAPI.cpp.

◆ getAngle()

double TraCIAPI::POIScope::getAngle ( const std::string &  poiID) const

Definition at line 1105 of file TraCIAPI.cpp.

References libsumo::VAR_ANGLE.

◆ getByte()

int TraCIAPI::TraCIScopeWrapper::getByte ( int  var,
const std::string &  id,
tcpip::Storage add = 0 
) const
protectedinherited

Definition at line 3559 of file TraCIAPI.cpp.

References libsumo::INVALID_INT_VALUE, and libsumo::TYPE_BYTE.

◆ getCol()

libsumo::TraCIColor TraCIAPI::TraCIScopeWrapper::getCol ( int  var,
const std::string &  id,
tcpip::Storage add = 0 
) const
protectedinherited

◆ getColor()

libsumo::TraCIColor TraCIAPI::POIScope::getColor ( const std::string &  poiID) const

Definition at line 1090 of file TraCIAPI.cpp.

References libsumo::VAR_COLOR.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getContextSubscriptionResults()

const libsumo::SubscriptionResults TraCIAPI::TraCIScopeWrapper::getContextSubscriptionResults ( const std::string &  objID) const
inherited

Definition at line 3879 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getDouble()

double TraCIAPI::TraCIScopeWrapper::getDouble ( int  var,
const std::string &  id,
tcpip::Storage add = 0 
) const
protectedinherited

Definition at line 3580 of file TraCIAPI.cpp.

References libsumo::INVALID_DOUBLE_VALUE, and libsumo::TYPE_DOUBLE.

Referenced by TraCIAPI::EdgeScope::getAdaptedTraveltime().

Here is the caller graph for this function:

◆ getDoubleVector()

std::vector< double > TraCIAPI::TraCIScopeWrapper::getDoubleVector ( int  var,
const std::string &  id,
tcpip::Storage add = 0 
) const
protectedinherited

Definition at line 3661 of file TraCIAPI.cpp.

References libsumo::TYPE_DOUBLELIST.

◆ getHeight()

double TraCIAPI::POIScope::getHeight ( const std::string &  poiID) const

Definition at line 1100 of file TraCIAPI.cpp.

References libsumo::VAR_HEIGHT.

◆ getIDCount()

int TraCIAPI::TraCIScopeWrapper::getIDCount ( ) const
inherited

Definition at line 3744 of file TraCIAPI.cpp.

References libsumo::ID_COUNT.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getIDList()

std::vector< std::string > TraCIAPI::TraCIScopeWrapper::getIDList ( ) const
inherited

Definition at line 3738 of file TraCIAPI.cpp.

References libsumo::TRACI_ID_LIST.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getImageFile()

std::string TraCIAPI::POIScope::getImageFile ( const std::string &  poiID) const

Definition at line 1110 of file TraCIAPI.cpp.

References libsumo::VAR_IMAGEFILE.

◆ getInt()

int TraCIAPI::TraCIScopeWrapper::getInt ( int  var,
const std::string &  id,
tcpip::Storage add = 0 
) const
protectedinherited

Definition at line 3570 of file TraCIAPI.cpp.

References libsumo::INVALID_INT_VALUE, and libsumo::TYPE_INTEGER.

◆ getModifiableContextSubscriptionResults()

libsumo::SubscriptionResults & TraCIAPI::TraCIScopeWrapper::getModifiableContextSubscriptionResults ( const std::string &  objID)
inherited

Definition at line 3902 of file TraCIAPI.cpp.

◆ getModifiableSubscriptionResults()

libsumo::SubscriptionResults & TraCIAPI::TraCIScopeWrapper::getModifiableSubscriptionResults ( )
inherited

Definition at line 3896 of file TraCIAPI.cpp.

◆ getParameter()

std::string TraCIAPI::TraCIScopeWrapper::getParameter ( const std::string &  objectID,
const std::string &  key 
) const
inherited

retrieve generic parameter

Definition at line 3750 of file TraCIAPI.cpp.

References libsumo::TYPE_STRING, libsumo::VAR_PARAMETER, tcpip::Storage::writeByte(), and tcpip::Storage::writeString().

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getParameterWithKey()

std::pair< std::string, std::string > TraCIAPI::TraCIScopeWrapper::getParameterWithKey ( const std::string &  objectID,
const std::string &  key 
) const
inherited

retrieve generic parameter and return (key, value) tuple

Definition at line 3759 of file TraCIAPI.cpp.

References libsumo::TYPE_COMPOUND, libsumo::TYPE_STRING, libsumo::VAR_PARAMETER_WITH_KEY, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getPolygon()

libsumo::TraCIPositionVector TraCIAPI::TraCIScopeWrapper::getPolygon ( int  var,
const std::string &  id,
tcpip::Storage add = 0 
) const
protectedinherited

◆ getPos()

libsumo::TraCIPosition TraCIAPI::TraCIScopeWrapper::getPos ( int  var,
const std::string &  id,
tcpip::Storage add = 0 
) const
protectedinherited

◆ getPos3D()

libsumo::TraCIPosition TraCIAPI::TraCIScopeWrapper::getPos3D ( int  var,
const std::string &  id,
tcpip::Storage add = 0 
) const
protectedinherited

◆ getPosition()

libsumo::TraCIPosition TraCIAPI::POIScope::getPosition ( const std::string &  poiID) const

Definition at line 1085 of file TraCIAPI.cpp.

References libsumo::VAR_POSITION.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getString()

std::string TraCIAPI::TraCIScopeWrapper::getString ( int  var,
const std::string &  id,
tcpip::Storage add = 0 
) const
protectedinherited

Definition at line 3637 of file TraCIAPI.cpp.

References libsumo::TYPE_STRING.

◆ getStringVector()

std::vector< std::string > TraCIAPI::TraCIScopeWrapper::getStringVector ( int  var,
const std::string &  id,
tcpip::Storage add = 0 
) const
protectedinherited

Definition at line 3647 of file TraCIAPI.cpp.

References libsumo::TYPE_STRINGLIST.

◆ getSubscriptionResults()

const libsumo::TraCIResults TraCIAPI::TraCIScopeWrapper::getSubscriptionResults ( const std::string &  objID) const
inherited

Definition at line 3863 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getTraCIStage()

◆ getType()

std::string TraCIAPI::POIScope::getType ( const std::string &  poiID) const

Definition at line 1080 of file TraCIAPI.cpp.

References libsumo::VAR_TYPE.

◆ getUnsignedByte()

int TraCIAPI::TraCIScopeWrapper::getUnsignedByte ( int  var,
const std::string &  id,
tcpip::Storage add = 0 
) const
protectedinherited

Definition at line 3549 of file TraCIAPI.cpp.

References libsumo::INVALID_INT_VALUE, and libsumo::TYPE_UBYTE.

◆ getWidth()

double TraCIAPI::POIScope::getWidth ( const std::string &  poiID) const

Definition at line 1095 of file TraCIAPI.cpp.

References libsumo::VAR_WIDTH.

◆ remove()

void TraCIAPI::POIScope::remove ( const std::string &  poiID,
int  layer = 0 
) const

◆ setAngle()

void TraCIAPI::POIScope::setAngle ( const std::string &  poiID,
double  angle 
) const

Definition at line 1158 of file TraCIAPI.cpp.

References libsumo::VAR_ANGLE.

◆ setColor()

void TraCIAPI::POIScope::setColor ( const std::string &  poiID,
const libsumo::TraCIColor c 
) const

◆ setDouble()

void TraCIAPI::TraCIScopeWrapper::setDouble ( int  var,
const std::string &  id,
double  value 
) const
protectedinherited

◆ setHeight()

void TraCIAPI::POIScope::setHeight ( const std::string &  poiID,
double  height 
) const

Definition at line 1152 of file TraCIAPI.cpp.

References libsumo::VAR_HEIGHT.

◆ setImageFile()

void TraCIAPI::POIScope::setImageFile ( const std::string &  poiID,
const std::string &  imageFile 
) const

Definition at line 1164 of file TraCIAPI.cpp.

References libsumo::VAR_IMAGEFILE.

◆ setInt()

void TraCIAPI::TraCIScopeWrapper::setInt ( int  var,
const std::string &  id,
int  value 
) const
protectedinherited

◆ setParameter()

void TraCIAPI::TraCIScopeWrapper::setParameter ( const std::string &  objectID,
const std::string &  key,
const std::string &  value 
) const
inherited

set generic paramter

Definition at line 3778 of file TraCIAPI.cpp.

References libsumo::TYPE_COMPOUND, libsumo::TYPE_STRING, libsumo::VAR_PARAMETER, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ setPosition()

void TraCIAPI::POIScope::setPosition ( const std::string &  poiID,
double  x,
double  y 
) const

◆ setString()

void TraCIAPI::TraCIScopeWrapper::setString ( int  var,
const std::string &  id,
const std::string &  value 
) const
protectedinherited

◆ setStringVector()

void TraCIAPI::TraCIScopeWrapper::setStringVector ( int  var,
const std::string &  id,
const std::vector< std::string > &  value 
) const
protectedinherited

◆ setType()

void TraCIAPI::POIScope::setType ( const std::string &  poiID,
const std::string &  setType 
) const

Definition at line 1116 of file TraCIAPI.cpp.

References libsumo::VAR_TYPE.

◆ setWidth()

void TraCIAPI::POIScope::setWidth ( const std::string &  poiID,
double  width 
) const

Definition at line 1146 of file TraCIAPI.cpp.

References libsumo::VAR_WIDTH.

◆ subscribe()

void TraCIAPI::TraCIScopeWrapper::subscribe ( const std::string &  objID,
const std::vector< int > &  vars,
double  beginTime,
double  endTime 
) const
inherited

Definition at line 3835 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ subscribeContext()

void TraCIAPI::TraCIScopeWrapper::subscribeContext ( const std::string &  objID,
int  domain,
double  range,
const std::vector< int > &  vars,
double  beginTime,
double  endTime 
) const
inherited

Definition at line 3847 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

Field Documentation

◆ myCmdGetID

int TraCIAPI::TraCIScopeWrapper::myCmdGetID
privateinherited

Definition at line 154 of file TraCIAPI.h.

◆ myCmdSetID

int TraCIAPI::TraCIScopeWrapper::myCmdSetID
privateinherited

Definition at line 155 of file TraCIAPI.h.

◆ myContextSubscribeID

int TraCIAPI::TraCIScopeWrapper::myContextSubscribeID
privateinherited

Definition at line 157 of file TraCIAPI.h.

◆ myContextSubscriptionResults

libsumo::ContextSubscriptionResults TraCIAPI::TraCIScopeWrapper::myContextSubscriptionResults
privateinherited

Definition at line 159 of file TraCIAPI.h.

◆ myParent

TraCIAPI& TraCIAPI::TraCIScopeWrapper::myParent
protectedinherited

The parent TraCI client which offers the connection.

Definition at line 151 of file TraCIAPI.h.

◆ mySubscribeID

int TraCIAPI::TraCIScopeWrapper::mySubscribeID
privateinherited

Definition at line 156 of file TraCIAPI.h.

◆ mySubscriptionResults

libsumo::SubscriptionResults TraCIAPI::TraCIScopeWrapper::mySubscriptionResults
privateinherited

Definition at line 158 of file TraCIAPI.h.


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