![]() |
SUMO - Simulation of Urban MObility
|
Scope for interaction with edges. More...
#include <TraCIAPI.h>
Public Member Functions | |
void | adaptTraveltime (const std::string &edgeID, SUMOReal time) const |
EdgeScope (TraCIAPI &parent) | |
SUMOReal | getAdaptedTraveltime (const std::string &edgeID, SUMOTime time) const |
SUMOReal | getCO2Emission (const std::string &edgeID) const |
SUMOReal | getCOEmission (const std::string &edgeID) const |
SUMOReal | getEffort (const std::string &edgeID, SUMOTime time) const |
SUMOReal | getFuelConsumption (const std::string &edgeID) const |
SUMOReal | getHCEmission (const std::string &edgeID) const |
unsigned int | getIDCount () const |
std::vector< std::string > | getIDList () const |
SUMOReal | getLastStepHaltingNumber (const std::string &edgeID) const |
SUMOReal | getLastStepLength (const std::string &edgeID) const |
SUMOReal | getLastStepMeanSpeed (const std::string &edgeID) const |
SUMOReal | getLastStepOccupancy (const std::string &edgeID) const |
std::vector< std::string > | getLastStepVehicleIDs (const std::string &edgeID) const |
unsigned int | getLastStepVehicleNumber (const std::string &edgeID) const |
SUMOReal | getNoiseEmission (const std::string &edgeID) const |
SUMOReal | getNOxEmission (const std::string &edgeID) const |
SUMOReal | getPMxEmission (const std::string &edgeID) const |
SUMOReal | getTraveltime (const std::string &edgeID) const |
void | setEffort (const std::string &edgeID, SUMOReal effort) const |
void | setMaxSpeed (const std::string &edgeID, SUMOReal speed) const |
virtual | ~EdgeScope () |
Protected Attributes | |
TraCIAPI & | myParent |
The parent TraCI client which offers the connection. More... | |
Private Member Functions | |
EdgeScope (const EdgeScope &src) | |
invalidated copy constructor More... | |
EdgeScope & | operator= (const EdgeScope &src) |
invalidated assignment operator More... | |
Scope for interaction with edges.
Definition at line 211 of file TraCIAPI.h.
|
inline |
Definition at line 213 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 214 of file TraCIAPI.h.
References SUMOReal.
|
private |
invalidated copy constructor
void TraCIAPI::EdgeScope::adaptTraveltime | ( | const std::string & | edgeID, |
SUMOReal | time | ||
) | const |
Definition at line 543 of file TraCIAPI.cpp.
References CMD_SET_EDGE_VARIABLE, VAR_EDGE_TRAVELTIME, and tcpip::Storage::writeDouble().
SUMOReal TraCIAPI::EdgeScope::getAdaptedTraveltime | ( | const std::string & | edgeID, |
SUMOTime | time | ||
) | const |
Definition at line 457 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, SUMOReal, VAR_CO2EMISSION, and tcpip::Storage::writeInt().
SUMOReal TraCIAPI::EdgeScope::getCO2Emission | ( | const std::string & | edgeID | ) | const |
Definition at line 471 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, SUMOReal, and VAR_CO2EMISSION.
SUMOReal TraCIAPI::EdgeScope::getCOEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 476 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, SUMOReal, and VAR_COEMISSION.
Definition at line 464 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, SUMOReal, VAR_CO2EMISSION, and tcpip::Storage::writeInt().
SUMOReal TraCIAPI::EdgeScope::getFuelConsumption | ( | const std::string & | edgeID | ) | const |
Definition at line 496 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, SUMOReal, and VAR_FUELCONSUMPTION.
SUMOReal TraCIAPI::EdgeScope::getHCEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 481 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, SUMOReal, and VAR_HCEMISSION.
unsigned int TraCIAPI::EdgeScope::getIDCount | ( | ) | const |
Definition at line 452 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, ID_COUNT, and SUMOReal.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::EdgeScope::getIDList | ( | ) | const |
Definition at line 447 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and ID_LIST.
Referenced by TraCITestClient::testAPI().
SUMOReal TraCIAPI::EdgeScope::getLastStepHaltingNumber | ( | const std::string & | edgeID | ) | const |
Definition at line 531 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and LAST_STEP_VEHICLE_HALTING_NUMBER.
SUMOReal TraCIAPI::EdgeScope::getLastStepLength | ( | const std::string & | edgeID | ) | const |
Definition at line 516 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, LAST_STEP_LENGTH, and SUMOReal.
SUMOReal TraCIAPI::EdgeScope::getLastStepMeanSpeed | ( | const std::string & | edgeID | ) | const |
Definition at line 506 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, LAST_STEP_MEAN_SPEED, and SUMOReal.
SUMOReal TraCIAPI::EdgeScope::getLastStepOccupancy | ( | const std::string & | edgeID | ) | const |
Definition at line 511 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, LAST_STEP_OCCUPANCY, and SUMOReal.
std::vector< std::string > TraCIAPI::EdgeScope::getLastStepVehicleIDs | ( | const std::string & | edgeID | ) | const |
Definition at line 536 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and LAST_STEP_VEHICLE_ID_LIST.
unsigned int TraCIAPI::EdgeScope::getLastStepVehicleNumber | ( | const std::string & | edgeID | ) | const |
Definition at line 526 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, LAST_STEP_VEHICLE_NUMBER, and SUMOReal.
SUMOReal TraCIAPI::EdgeScope::getNoiseEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 501 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, SUMOReal, and VAR_NOISEEMISSION.
SUMOReal TraCIAPI::EdgeScope::getNOxEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 491 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, SUMOReal, and VAR_NOXEMISSION.
SUMOReal TraCIAPI::EdgeScope::getPMxEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 486 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, SUMOReal, and VAR_PMXEMISSION.
SUMOReal TraCIAPI::EdgeScope::getTraveltime | ( | const std::string & | edgeID | ) | const |
Definition at line 521 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and VAR_CURRENT_TRAVELTIME.
invalidated assignment operator
void TraCIAPI::EdgeScope::setEffort | ( | const std::string & | edgeID, |
SUMOReal | effort | ||
) | const |
Definition at line 550 of file TraCIAPI.cpp.
References CMD_SET_EDGE_VARIABLE, VAR_EDGE_EFFORT, and tcpip::Storage::writeDouble().
void TraCIAPI::EdgeScope::setMaxSpeed | ( | const std::string & | edgeID, |
SUMOReal | speed | ||
) | const |
Definition at line 557 of file TraCIAPI.cpp.
References CMD_SET_EDGE_VARIABLE, VAR_MAXSPEED, and tcpip::Storage::writeDouble().
|
protectedinherited |
The parent TraCI client which offers the connection.
Definition at line 192 of file TraCIAPI.h.