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

Scope for interaction with lanes. More...

#include <TraCIAPI.h>

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

Public Member Functions

void clearSubscriptionResults ()
 
const libsumo::ContextSubscriptionResults getAllContextSubscriptionResults () const
 
std::vector< std::string > getAllowed (const std::string &laneID) const
 
const libsumo::SubscriptionResults getAllSubscriptionResults () const
 
double getCO2Emission (const std::string &laneID) const
 
double getCOEmission (const std::string &laneID) const
 
const libsumo::SubscriptionResults getContextSubscriptionResults (const std::string &objID) const
 
std::vector< std::string > getDisallowed (const std::string &laneID) const
 
std::string getEdgeID (const std::string &laneID) const
 
double getElectricityConsumption (const std::string &laneID) const
 
std::vector< std::string > getFoes (const std::string &laneID, const std::string &toLaneID) const
 
double getFuelConsumption (const std::string &laneID) const
 
double getHCEmission (const std::string &laneID) const
 
int getIDCount () const
 
std::vector< std::string > getIDList () const
 
std::vector< std::string > getInternalFoes (const std::string &laneID) const
 
int getLastStepHaltingNumber (const std::string &laneID) const
 
double getLastStepLength (const std::string &laneID) const
 
double getLastStepMeanSpeed (const std::string &laneID) const
 
double getLastStepOccupancy (const std::string &laneID) const
 
std::vector< std::string > getLastStepVehicleIDs (const std::string &laneID) const
 
int getLastStepVehicleNumber (const std::string &laneID) const
 
double getLength (const std::string &laneID) const
 
int getLinkNumber (const std::string &laneID) const
 
std::vector< libsumo::TraCIConnectiongetLinks (const std::string &laneID) const
 
double getMaxSpeed (const std::string &laneID) const
 
libsumo::SubscriptionResultsgetModifiableContextSubscriptionResults (const std::string &objID)
 
libsumo::SubscriptionResultsgetModifiableSubscriptionResults ()
 
double getNoiseEmission (const std::string &laneID) const
 
double getNOxEmission (const std::string &laneID) const
 
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...
 
double getPMxEmission (const std::string &laneID) const
 
libsumo::TraCIPositionVector getShape (const std::string &laneID) const
 
const libsumo::TraCIResults getSubscriptionResults (const std::string &objID) const
 
double getTraveltime (const std::string &laneID) const
 
double getWidth (const std::string &laneID) const
 
 LaneScope (TraCIAPI &parent)
 
void setAllowed (const std::string &laneID, const std::vector< std::string > &allowedClasses) const
 
void setDisallowed (const std::string &laneID, const std::vector< std::string > &disallowedClasses) const
 
void setLength (const std::string &laneID, double length) const
 
void setMaxSpeed (const std::string &laneID, double speed) const
 
void setParameter (const std::string &objectID, const std::string &key, const std::string &value) const
 set generic paramter More...
 
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 ~LaneScope ()
 

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 lanes.

Definition at line 264 of file TraCIAPI.h.

Constructor & Destructor Documentation

◆ LaneScope()

TraCIAPI::LaneScope::LaneScope ( TraCIAPI parent)
inline

Definition at line 266 of file TraCIAPI.h.

◆ ~LaneScope()

virtual TraCIAPI::LaneScope::~LaneScope ( )
inlinevirtual

Definition at line 267 of file TraCIAPI.h.

Member Function Documentation

◆ clearSubscriptionResults()

void TraCIAPI::TraCIScopeWrapper::clearSubscriptionResults ( )
inherited

Definition at line 3894 of file TraCIAPI.cpp.

◆ getAllContextSubscriptionResults()

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

Definition at line 3878 of file TraCIAPI.cpp.

◆ getAllowed()

std::vector< std::string > TraCIAPI::LaneScope::getAllowed ( const std::string &  laneID) const

Definition at line 840 of file TraCIAPI.cpp.

References libsumo::LANE_ALLOWED.

◆ getAllSubscriptionResults()

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

Definition at line 3862 of file TraCIAPI.cpp.

◆ getByte()

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

Definition at line 3564 of file TraCIAPI.cpp.

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

◆ getCO2Emission()

double TraCIAPI::LaneScope::getCO2Emission ( const std::string &  laneID) const

Definition at line 915 of file TraCIAPI.cpp.

References libsumo::VAR_CO2EMISSION.

◆ getCOEmission()

double TraCIAPI::LaneScope::getCOEmission ( const std::string &  laneID) const

Definition at line 920 of file TraCIAPI.cpp.

References libsumo::VAR_COEMISSION.

◆ getCol()

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

◆ getContextSubscriptionResults()

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

Definition at line 3884 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getDisallowed()

std::vector< std::string > TraCIAPI::LaneScope::getDisallowed ( const std::string &  laneID) const

Definition at line 845 of file TraCIAPI.cpp.

References libsumo::LANE_DISALLOWED.

◆ getDouble()

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

Definition at line 3585 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 3666 of file TraCIAPI.cpp.

References libsumo::TYPE_DOUBLELIST.

◆ getEdgeID()

std::string TraCIAPI::LaneScope::getEdgeID ( const std::string &  laneID) const

Definition at line 910 of file TraCIAPI.cpp.

References libsumo::LANE_EDGE_ID.

◆ getElectricityConsumption()

double TraCIAPI::LaneScope::getElectricityConsumption ( const std::string &  laneID) const

Definition at line 950 of file TraCIAPI.cpp.

References libsumo::VAR_ELECTRICITYCONSUMPTION.

◆ getFoes()

std::vector< std::string > TraCIAPI::LaneScope::getFoes ( const std::string &  laneID,
const std::string &  toLaneID 
) const

Definition at line 991 of file TraCIAPI.cpp.

References libsumo::CMD_GET_LANE_VARIABLE, libsumo::TYPE_STRING, libsumo::TYPE_STRINGLIST, libsumo::VAR_FOES, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getFuelConsumption()

double TraCIAPI::LaneScope::getFuelConsumption ( const std::string &  laneID) const

Definition at line 940 of file TraCIAPI.cpp.

References libsumo::VAR_FUELCONSUMPTION.

◆ getHCEmission()

double TraCIAPI::LaneScope::getHCEmission ( const std::string &  laneID) const

Definition at line 925 of file TraCIAPI.cpp.

References libsumo::VAR_HCEMISSION.

◆ getIDCount()

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

Definition at line 3749 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 3743 of file TraCIAPI.cpp.

References libsumo::TRACI_ID_LIST.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getInt()

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

Definition at line 3575 of file TraCIAPI.cpp.

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

◆ getInternalFoes()

std::vector< std::string > TraCIAPI::LaneScope::getInternalFoes ( const std::string &  laneID) const

Definition at line 1007 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getLastStepHaltingNumber()

int TraCIAPI::LaneScope::getLastStepHaltingNumber ( const std::string &  laneID) const

Definition at line 980 of file TraCIAPI.cpp.

References libsumo::LAST_STEP_VEHICLE_HALTING_NUMBER.

◆ getLastStepLength()

double TraCIAPI::LaneScope::getLastStepLength ( const std::string &  laneID) const

Definition at line 965 of file TraCIAPI.cpp.

References libsumo::LAST_STEP_LENGTH.

◆ getLastStepMeanSpeed()

double TraCIAPI::LaneScope::getLastStepMeanSpeed ( const std::string &  laneID) const

Definition at line 955 of file TraCIAPI.cpp.

References libsumo::LAST_STEP_MEAN_SPEED.

◆ getLastStepOccupancy()

double TraCIAPI::LaneScope::getLastStepOccupancy ( const std::string &  laneID) const

Definition at line 960 of file TraCIAPI.cpp.

References libsumo::LAST_STEP_OCCUPANCY.

◆ getLastStepVehicleIDs()

std::vector< std::string > TraCIAPI::LaneScope::getLastStepVehicleIDs ( const std::string &  laneID) const

Definition at line 985 of file TraCIAPI.cpp.

References libsumo::LAST_STEP_VEHICLE_ID_LIST.

◆ getLastStepVehicleNumber()

int TraCIAPI::LaneScope::getLastStepVehicleNumber ( const std::string &  laneID) const

Definition at line 975 of file TraCIAPI.cpp.

References libsumo::LAST_STEP_VEHICLE_NUMBER.

◆ getLength()

double TraCIAPI::LaneScope::getLength ( const std::string &  laneID) const

Definition at line 825 of file TraCIAPI.cpp.

References libsumo::VAR_LENGTH.

◆ getLinkNumber()

int TraCIAPI::LaneScope::getLinkNumber ( const std::string &  laneID) const

Definition at line 850 of file TraCIAPI.cpp.

References libsumo::LANE_LINK_NUMBER.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getLinks()

std::vector< libsumo::TraCIConnection > TraCIAPI::LaneScope::getLinks ( const std::string &  laneID) const

Definition at line 855 of file TraCIAPI.cpp.

References libsumo::CMD_GET_LANE_VARIABLE, libsumo::LANE_LINKS, and libsumo::TYPE_COMPOUND.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getMaxSpeed()

double TraCIAPI::LaneScope::getMaxSpeed ( const std::string &  laneID) const

Definition at line 830 of file TraCIAPI.cpp.

References libsumo::VAR_MAXSPEED.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getModifiableContextSubscriptionResults()

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

Definition at line 3907 of file TraCIAPI.cpp.

◆ getModifiableSubscriptionResults()

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

Definition at line 3901 of file TraCIAPI.cpp.

◆ getNoiseEmission()

double TraCIAPI::LaneScope::getNoiseEmission ( const std::string &  laneID) const

Definition at line 945 of file TraCIAPI.cpp.

References libsumo::VAR_NOISEEMISSION.

◆ getNOxEmission()

double TraCIAPI::LaneScope::getNOxEmission ( const std::string &  laneID) const

Definition at line 935 of file TraCIAPI.cpp.

References libsumo::VAR_NOXEMISSION.

◆ getParameter()

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

retrieve generic parameter

Definition at line 3755 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 3764 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:

◆ getPMxEmission()

double TraCIAPI::LaneScope::getPMxEmission ( const std::string &  laneID) const

Definition at line 930 of file TraCIAPI.cpp.

References libsumo::VAR_PMXEMISSION.

◆ 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

◆ getShape()

libsumo::TraCIPositionVector TraCIAPI::LaneScope::getShape ( const std::string &  laneID) const

Definition at line 905 of file TraCIAPI.cpp.

References libsumo::VAR_SHAPE.

◆ getString()

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

Definition at line 3642 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 3652 of file TraCIAPI.cpp.

References libsumo::TYPE_STRINGLIST.

◆ getSubscriptionResults()

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

Definition at line 3868 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ getTraCIStage()

◆ getTraveltime()

double TraCIAPI::LaneScope::getTraveltime ( const std::string &  laneID) const

Definition at line 970 of file TraCIAPI.cpp.

References libsumo::VAR_CURRENT_TRAVELTIME.

◆ getUnsignedByte()

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

Definition at line 3554 of file TraCIAPI.cpp.

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

◆ getWidth()

double TraCIAPI::LaneScope::getWidth ( const std::string &  laneID) const

Definition at line 835 of file TraCIAPI.cpp.

References libsumo::VAR_WIDTH.

◆ setAllowed()

void TraCIAPI::LaneScope::setAllowed ( const std::string &  laneID,
const std::vector< std::string > &  allowedClasses 
) const

Definition at line 1013 of file TraCIAPI.cpp.

References libsumo::LANE_ALLOWED.

◆ setDisallowed()

void TraCIAPI::LaneScope::setDisallowed ( const std::string &  laneID,
const std::vector< std::string > &  disallowedClasses 
) const

Definition at line 1018 of file TraCIAPI.cpp.

References libsumo::LANE_DISALLOWED.

◆ setDouble()

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

◆ setInt()

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

◆ setLength()

void TraCIAPI::LaneScope::setLength ( const std::string &  laneID,
double  length 
) const

Definition at line 1028 of file TraCIAPI.cpp.

References libsumo::VAR_LENGTH.

◆ setMaxSpeed()

void TraCIAPI::LaneScope::setMaxSpeed ( const std::string &  laneID,
double  speed 
) const

Definition at line 1023 of file TraCIAPI.cpp.

References libsumo::VAR_MAXSPEED.

Referenced by TraCITestClient::testAPI().

Here is the caller graph for this function:

◆ 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 3783 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:

◆ 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

◆ subscribe()

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

Definition at line 3840 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 3852 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: