SUMO - Simulation of Urban MObility
TraCIAPI::EdgeScope Class Reference

Scope for interaction with edges. More...

#include <TraCIAPI.h>

Inheritance diagram for TraCIAPI::EdgeScope:
Inheritance graph
Collaboration diagram for TraCIAPI::EdgeScope:
Collaboration graph

Public Member Functions

void adaptTraveltime (const std::string &edgeID, double time, int beginSeconds=0, int endSeconds=std::numeric_limits< int >::max()) const
 
 EdgeScope (TraCIAPI &parent)
 
double getAdaptedTraveltime (const std::string &edgeID, double time) const
 
double getCO2Emission (const std::string &edgeID) const
 
double getCOEmission (const std::string &edgeID) const
 
double getEffort (const std::string &edgeID, SUMOTime time) const
 
double getElectricityConsumption (const std::string &edgeID) const
 
double getFuelConsumption (const std::string &edgeID) const
 
double getHCEmission (const std::string &edgeID) const
 
int getIDCount () const
 
std::vector< std::string > getIDList () const
 
double getLastStepHaltingNumber (const std::string &edgeID) const
 
double getLastStepLength (const std::string &edgeID) const
 
double getLastStepMeanSpeed (const std::string &edgeID) const
 
double getLastStepOccupancy (const std::string &edgeID) const
 
std::vector< std::string > getLastStepVehicleIDs (const std::string &edgeID) const
 
int getLastStepVehicleNumber (const std::string &edgeID) const
 
double getNoiseEmission (const std::string &edgeID) const
 
double getNOxEmission (const std::string &edgeID) const
 
double getPMxEmission (const std::string &edgeID) const
 
double getTraveltime (const std::string &edgeID) const
 
void setEffort (const std::string &edgeID, double effort, int beginSeconds=0, int endSeconds=std::numeric_limits< int >::max()) const
 
void setMaxSpeed (const std::string &edgeID, double speed) const
 
virtual ~EdgeScope ()
 

Protected Attributes

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

Private Member Functions

 EdgeScope (const EdgeScope &src)
 invalidated copy constructor More...
 
EdgeScopeoperator= (const EdgeScope &src)
 invalidated assignment operator More...
 

Detailed Description

Scope for interaction with edges.

Definition at line 148 of file TraCIAPI.h.

Constructor & Destructor Documentation

◆ EdgeScope() [1/2]

TraCIAPI::EdgeScope::EdgeScope ( TraCIAPI parent)
inline

Definition at line 150 of file TraCIAPI.h.

◆ ~EdgeScope()

virtual TraCIAPI::EdgeScope::~EdgeScope ( )
inlinevirtual

Definition at line 151 of file TraCIAPI.h.

References TraCIAPI::TraCIScopeWrapper::operator=().

◆ EdgeScope() [2/2]

TraCIAPI::EdgeScope::EdgeScope ( const EdgeScope src)
private

invalidated copy constructor

Member Function Documentation

◆ adaptTraveltime()

void TraCIAPI::EdgeScope::adaptTraveltime ( const std::string &  edgeID,
double  time,
int  beginSeconds = 0,
int  endSeconds = std::numeric_limits<int>::max() 
) const

◆ getAdaptedTraveltime()

double TraCIAPI::EdgeScope::getAdaptedTraveltime ( const std::string &  edgeID,
double  time 
) const

◆ getCO2Emission()

double TraCIAPI::EdgeScope::getCO2Emission ( const std::string &  edgeID) const

Definition at line 651 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and VAR_CO2EMISSION.

◆ getCOEmission()

double TraCIAPI::EdgeScope::getCOEmission ( const std::string &  edgeID) const

Definition at line 657 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and VAR_COEMISSION.

◆ getEffort()

double TraCIAPI::EdgeScope::getEffort ( const std::string &  edgeID,
SUMOTime  time 
) const

◆ getElectricityConsumption()

double TraCIAPI::EdgeScope::getElectricityConsumption ( const std::string &  edgeID) const

Definition at line 687 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and VAR_ELECTRICITYCONSUMPTION.

◆ getFuelConsumption()

double TraCIAPI::EdgeScope::getFuelConsumption ( const std::string &  edgeID) const

Definition at line 677 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and VAR_FUELCONSUMPTION.

◆ getHCEmission()

double TraCIAPI::EdgeScope::getHCEmission ( const std::string &  edgeID) const

Definition at line 662 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and VAR_HCEMISSION.

◆ getIDCount()

int TraCIAPI::EdgeScope::getIDCount ( ) const

Definition at line 630 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and ID_COUNT.

Referenced by TraCITestClient::testAPI().

◆ getIDList()

std::vector< std::string > TraCIAPI::EdgeScope::getIDList ( ) const

Definition at line 625 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and ID_LIST.

Referenced by TraCITestClient::testAPI().

◆ getLastStepHaltingNumber()

double TraCIAPI::EdgeScope::getLastStepHaltingNumber ( const std::string &  edgeID) const

Definition at line 717 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and LAST_STEP_VEHICLE_HALTING_NUMBER.

◆ getLastStepLength()

double TraCIAPI::EdgeScope::getLastStepLength ( const std::string &  edgeID) const

Definition at line 702 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and LAST_STEP_LENGTH.

◆ getLastStepMeanSpeed()

double TraCIAPI::EdgeScope::getLastStepMeanSpeed ( const std::string &  edgeID) const

Definition at line 692 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and LAST_STEP_MEAN_SPEED.

◆ getLastStepOccupancy()

double TraCIAPI::EdgeScope::getLastStepOccupancy ( const std::string &  edgeID) const

Definition at line 697 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and LAST_STEP_OCCUPANCY.

◆ getLastStepVehicleIDs()

std::vector< std::string > TraCIAPI::EdgeScope::getLastStepVehicleIDs ( const std::string &  edgeID) const

Definition at line 722 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and LAST_STEP_VEHICLE_ID_LIST.

◆ getLastStepVehicleNumber()

int TraCIAPI::EdgeScope::getLastStepVehicleNumber ( const std::string &  edgeID) const

Definition at line 712 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and LAST_STEP_VEHICLE_NUMBER.

◆ getNoiseEmission()

double TraCIAPI::EdgeScope::getNoiseEmission ( const std::string &  edgeID) const

Definition at line 682 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and VAR_NOISEEMISSION.

◆ getNOxEmission()

double TraCIAPI::EdgeScope::getNOxEmission ( const std::string &  edgeID) const

Definition at line 672 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and VAR_NOXEMISSION.

◆ getPMxEmission()

double TraCIAPI::EdgeScope::getPMxEmission ( const std::string &  edgeID) const

Definition at line 667 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and VAR_PMXEMISSION.

◆ getTraveltime()

double TraCIAPI::EdgeScope::getTraveltime ( const std::string &  edgeID) const

Definition at line 707 of file TraCIAPI.cpp.

References CMD_GET_EDGE_VARIABLE, and VAR_CURRENT_TRAVELTIME.

Referenced by TraCITestClient::testAPI().

◆ operator=()

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

invalidated assignment operator

◆ setEffort()

void TraCIAPI::EdgeScope::setEffort ( const std::string &  edgeID,
double  effort,
int  beginSeconds = 0,
int  endSeconds = std::numeric_limits<int>::max() 
) const

◆ setMaxSpeed()

void TraCIAPI::EdgeScope::setMaxSpeed ( const std::string &  edgeID,
double  speed 
) const

Definition at line 769 of file TraCIAPI.cpp.

References CMD_SET_EDGE_VARIABLE, VAR_MAXSPEED, and tcpip::Storage::writeDouble().

Field Documentation

◆ myParent

TraCIAPI& TraCIAPI::TraCIScopeWrapper::myParent
protectedinherited

The parent TraCI client which offers the connection.

Definition at line 129 of file TraCIAPI.h.


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