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

Scope for interaction with the simulation. More...

#include <TraCIAPI.h>

Inheritance diagram for TraCIAPI::SimulationScope:
Collaboration diagram for TraCIAPI::SimulationScope:

Public Member Functions

void clearSubscriptionResults ()
 
libsumo::TraCIPosition convert2D (const std::string &edgeID, double pos, int laneIndex=0, bool toGeo=false) const
 
libsumo::TraCIPosition convert3D (const std::string &edgeID, double pos, int laneIndex=0, bool toGeo=false) const
 
libsumo::TraCIPosition convertGeo (double x, double y, bool fromGeo=false) const
 
libsumo::TraCIRoadPosition convertRoad (double x, double y, bool isGeo=false, const std::string &vClass="ignoring") const
 
const libsumo::ContextSubscriptionResults getAllContextSubscriptionResults () const
 
const libsumo::SubscriptionResults getAllSubscriptionResults () const
 
std::vector< std::string > getArrivedIDList () const
 
int getArrivedNumber () const
 
int getBusStopWaiting (const std::string &stopID) const
 
std::vector< std::string > getBusStopWaitingIDList (const std::string &stopID) const
 
const libsumo::SubscriptionResults getContextSubscriptionResults (const std::string &objID) const
 
int getCurrentTime () const
 
double getDeltaT () const
 
std::vector< std::string > getDepartedIDList () const
 
int getDepartedNumber () const
 
double getDistance2D (double x1, double y1, double x2, double y2, bool isGeo=false, bool isDriving=false)
 
double getDistanceRoad (const std::string &edgeID1, double pos1, const std::string &edgeID2, double pos2, bool isDriving=false)
 
std::vector< std::string > getEndingTeleportIDList () const
 
int getEndingTeleportNumber () const
 
std::vector< std::string > getLoadedIDList () const
 
int getLoadedNumber () const
 
int getMinExpectedNumber () const
 
libsumo::SubscriptionResultsgetModifiableContextSubscriptionResults (const std::string &objID)
 
libsumo::SubscriptionResultsgetModifiableSubscriptionResults ()
 
libsumo::TraCIPositionVector getNetBoundary () const
 
std::string getParameter (const std::string &objectID, const std::string &key) const
 retrieve generic paramter More...
 
std::vector< std::string > getStartingTeleportIDList () const
 
int getStartingTeleportNumber () const
 
const libsumo::TraCIResults getSubscriptionResults (const std::string &objID) const
 
double getTime () const
 
void setParameter (const std::string &objectID, const std::string &key, const std::string &value) const
 set generic paramter More...
 
 SimulationScope (TraCIAPI &parent)
 
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 ~SimulationScope ()
 

Protected Attributes

int myCmdGetID
 
int myCmdSetID
 
int myContextSubscribeID
 
libsumo::ContextSubscriptionResults myContextSubscriptionResults
 
TraCIAPImyParent
 The parent TraCI client which offers the connection. More...
 
int mySubscribeID
 
libsumo::SubscriptionResults mySubscriptionResults
 

Private Member Functions

SimulationScopeoperator= (const SimulationScope &src)
 invalidated assignment operator More...
 
 SimulationScope (const SimulationScope &src)
 invalidated copy constructor More...
 

Detailed Description

Scope for interaction with the simulation.

Definition at line 507 of file TraCIAPI.h.

Constructor & Destructor Documentation

◆ SimulationScope() [1/2]

TraCIAPI::SimulationScope::SimulationScope ( TraCIAPI parent)
inline

Definition at line 509 of file TraCIAPI.h.

◆ ~SimulationScope()

virtual TraCIAPI::SimulationScope::~SimulationScope ( )
inlinevirtual

Definition at line 510 of file TraCIAPI.h.

◆ SimulationScope() [2/2]

TraCIAPI::SimulationScope::SimulationScope ( const SimulationScope src)
private

invalidated copy constructor

Member Function Documentation

◆ clearSubscriptionResults()

void TraCIAPI::TraCIScopeWrapper::clearSubscriptionResults ( )
inherited

Definition at line 3667 of file TraCIAPI.cpp.

◆ convert2D()

◆ convert3D()

◆ convertGeo()

◆ convertRoad()

◆ getAllContextSubscriptionResults()

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

Definition at line 3651 of file TraCIAPI.cpp.

◆ getAllSubscriptionResults()

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

Definition at line 3635 of file TraCIAPI.cpp.

◆ getArrivedIDList()

std::vector< std::string > TraCIAPI::SimulationScope::getArrivedIDList ( ) const

◆ getArrivedNumber()

int TraCIAPI::SimulationScope::getArrivedNumber ( ) const

◆ getBusStopWaiting()

int TraCIAPI::SimulationScope::getBusStopWaiting ( const std::string &  stopID) const

◆ getBusStopWaitingIDList()

std::vector< std::string > TraCIAPI::SimulationScope::getBusStopWaitingIDList ( const std::string &  stopID) const

◆ getContextSubscriptionResults()

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

Definition at line 3657 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

◆ getCurrentTime()

int TraCIAPI::SimulationScope::getCurrentTime ( ) const

Definition at line 1627 of file TraCIAPI.cpp.

References libsumo::CMD_GET_SIM_VARIABLE, and libsumo::VAR_TIME_STEP.

Referenced by TraCITestClient::testAPI().

◆ getDeltaT()

double TraCIAPI::SimulationScope::getDeltaT ( ) const

Definition at line 1687 of file TraCIAPI.cpp.

References libsumo::CMD_GET_SIM_VARIABLE, and libsumo::VAR_DELTA_T.

Referenced by TraCITestClient::testAPI().

◆ getDepartedIDList()

std::vector< std::string > TraCIAPI::SimulationScope::getDepartedIDList ( ) const

◆ getDepartedNumber()

int TraCIAPI::SimulationScope::getDepartedNumber ( ) const

◆ getDistance2D()

double TraCIAPI::SimulationScope::getDistance2D ( double  x1,
double  y1,
double  x2,
double  y2,
bool  isGeo = false,
bool  isDriving = false 
)

◆ getDistanceRoad()

double TraCIAPI::SimulationScope::getDistanceRoad ( const std::string &  edgeID1,
double  pos1,
const std::string &  edgeID2,
double  pos2,
bool  isDriving = false 
)

◆ getEndingTeleportIDList()

std::vector< std::string > TraCIAPI::SimulationScope::getEndingTeleportIDList ( ) const

◆ getEndingTeleportNumber()

int TraCIAPI::SimulationScope::getEndingTeleportNumber ( ) const

◆ getLoadedIDList()

std::vector< std::string > TraCIAPI::SimulationScope::getLoadedIDList ( ) const

◆ getLoadedNumber()

int TraCIAPI::SimulationScope::getLoadedNumber ( ) const

◆ getMinExpectedNumber()

int TraCIAPI::SimulationScope::getMinExpectedNumber ( ) const

◆ getModifiableContextSubscriptionResults()

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

Definition at line 3680 of file TraCIAPI.cpp.

◆ getModifiableSubscriptionResults()

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

Definition at line 3674 of file TraCIAPI.cpp.

◆ getNetBoundary()

libsumo::TraCIPositionVector TraCIAPI::SimulationScope::getNetBoundary ( ) const

Definition at line 1692 of file TraCIAPI.cpp.

References libsumo::CMD_GET_SIM_VARIABLE, and libsumo::VAR_NET_BOUNDING_BOX.

◆ getParameter()

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

retrieve generic paramter

Definition at line 3590 of file TraCIAPI.cpp.

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

Referenced by TraCITestClient::testAPI().

◆ getStartingTeleportIDList()

std::vector< std::string > TraCIAPI::SimulationScope::getStartingTeleportIDList ( ) const

◆ getStartingTeleportNumber()

int TraCIAPI::SimulationScope::getStartingTeleportNumber ( ) const

◆ getSubscriptionResults()

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

Definition at line 3641 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

◆ getTime()

double TraCIAPI::SimulationScope::getTime ( ) const

Definition at line 1632 of file TraCIAPI.cpp.

References libsumo::CMD_GET_SIM_VARIABLE, and libsumo::VAR_TIME.

◆ operator=()

SimulationScope& TraCIAPI::SimulationScope::operator= ( const SimulationScope src)
private

invalidated assignment operator

◆ setParameter()

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

◆ subscribe()

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

Definition at line 3613 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

◆ 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 3625 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

Field Documentation

◆ myCmdGetID

int TraCIAPI::TraCIScopeWrapper::myCmdGetID
protectedinherited

Definition at line 146 of file TraCIAPI.h.

◆ myCmdSetID

int TraCIAPI::TraCIScopeWrapper::myCmdSetID
protectedinherited

Definition at line 147 of file TraCIAPI.h.

◆ myContextSubscribeID

int TraCIAPI::TraCIScopeWrapper::myContextSubscribeID
protectedinherited

Definition at line 149 of file TraCIAPI.h.

◆ myContextSubscriptionResults

libsumo::ContextSubscriptionResults TraCIAPI::TraCIScopeWrapper::myContextSubscriptionResults
protectedinherited

Definition at line 151 of file TraCIAPI.h.

◆ myParent

TraCIAPI& TraCIAPI::TraCIScopeWrapper::myParent
protectedinherited

The parent TraCI client which offers the connection.

Definition at line 145 of file TraCIAPI.h.

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

◆ mySubscribeID

int TraCIAPI::TraCIScopeWrapper::mySubscribeID
protectedinherited

Definition at line 148 of file TraCIAPI.h.

◆ mySubscriptionResults

libsumo::SubscriptionResults TraCIAPI::TraCIScopeWrapper::mySubscriptionResults
protectedinherited

Definition at line 150 of file TraCIAPI.h.


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