![]() |
SUMO - Simulation of Urban MObility
|
Scope for interaction with edges. More...
#include <TraCIAPI.h>
Public Member Functions | |
void | adaptTraveltime (const std::string &edgeID, double time, double begin=0, double end=SUMOTime_MAX/1000.0) 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, SUMOTime begin=0, SUMOTime end=SUMOTime_MAX) const |
void | setMaxSpeed (const std::string &edgeID, double 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 150 of file TraCIAPI.h.
|
inline |
Definition at line 152 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 153 of file TraCIAPI.h.
References TraCIAPI::TraCIScopeWrapper::operator=(), and SUMOTime_MAX.
|
private |
invalidated copy constructor
void TraCIAPI::EdgeScope::adaptTraveltime | ( | const std::string & | edgeID, |
double | time, | ||
double | begin = 0 , |
||
double | end = SUMOTime_MAX / 1000.0 |
||
) | const |
Definition at line 686 of file TraCIAPI.cpp.
References CMD_SET_EDGE_VARIABLE, TYPE_COMPOUND, TYPE_DOUBLE, TYPE_INTEGER, VAR_EDGE_TRAVELTIME, tcpip::Storage::writeByte(), tcpip::Storage::writeDouble(), and tcpip::Storage::writeInt().
Referenced by TraCITestClient::testAPI().
double TraCIAPI::EdgeScope::getAdaptedTraveltime | ( | const std::string & | edgeID, |
double | time | ||
) | const |
Definition at line 592 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, TYPE_INTEGER, VAR_EDGE_TRAVELTIME, tcpip::Storage::writeByte(), and tcpip::Storage::writeInt().
Referenced by TraCITestClient::testAPI().
double TraCIAPI::EdgeScope::getCO2Emission | ( | const std::string & | edgeID | ) | const |
Definition at line 608 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and VAR_CO2EMISSION.
double TraCIAPI::EdgeScope::getCOEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 614 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and VAR_COEMISSION.
double TraCIAPI::EdgeScope::getEffort | ( | const std::string & | edgeID, |
SUMOTime | time | ||
) | const |
Definition at line 600 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, TYPE_INTEGER, VAR_EDGE_EFFORT, tcpip::Storage::writeByte(), and tcpip::Storage::writeInt().
Referenced by TraCITestClient::testAPI().
double TraCIAPI::EdgeScope::getElectricityConsumption | ( | const std::string & | edgeID | ) | const |
Definition at line 644 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and VAR_ELECTRICITYCONSUMPTION.
double TraCIAPI::EdgeScope::getFuelConsumption | ( | const std::string & | edgeID | ) | const |
Definition at line 634 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and VAR_FUELCONSUMPTION.
double TraCIAPI::EdgeScope::getHCEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 619 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and VAR_HCEMISSION.
int TraCIAPI::EdgeScope::getIDCount | ( | ) | const |
Definition at line 587 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and ID_COUNT.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::EdgeScope::getIDList | ( | ) | const |
Definition at line 582 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and ID_LIST.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::EdgeScope::getLastStepHaltingNumber | ( | const std::string & | edgeID | ) | const |
Definition at line 674 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and LAST_STEP_VEHICLE_HALTING_NUMBER.
double TraCIAPI::EdgeScope::getLastStepLength | ( | const std::string & | edgeID | ) | const |
Definition at line 659 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and LAST_STEP_LENGTH.
double TraCIAPI::EdgeScope::getLastStepMeanSpeed | ( | const std::string & | edgeID | ) | const |
Definition at line 649 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and LAST_STEP_MEAN_SPEED.
double TraCIAPI::EdgeScope::getLastStepOccupancy | ( | const std::string & | edgeID | ) | const |
Definition at line 654 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and LAST_STEP_OCCUPANCY.
std::vector< std::string > TraCIAPI::EdgeScope::getLastStepVehicleIDs | ( | const std::string & | edgeID | ) | const |
Definition at line 679 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and LAST_STEP_VEHICLE_ID_LIST.
int TraCIAPI::EdgeScope::getLastStepVehicleNumber | ( | const std::string & | edgeID | ) | const |
Definition at line 669 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and LAST_STEP_VEHICLE_NUMBER.
double TraCIAPI::EdgeScope::getNoiseEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 639 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and VAR_NOISEEMISSION.
double TraCIAPI::EdgeScope::getNOxEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 629 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and VAR_NOXEMISSION.
double TraCIAPI::EdgeScope::getPMxEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 624 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and VAR_PMXEMISSION.
double TraCIAPI::EdgeScope::getTraveltime | ( | const std::string & | edgeID | ) | const |
Definition at line 664 of file TraCIAPI.cpp.
References CMD_GET_EDGE_VARIABLE, and VAR_CURRENT_TRAVELTIME.
Referenced by TraCITestClient::testAPI().
invalidated assignment operator
void TraCIAPI::EdgeScope::setEffort | ( | const std::string & | edgeID, |
double | effort, | ||
SUMOTime | begin = 0 , |
||
SUMOTime | end = SUMOTime_MAX |
||
) | const |
Definition at line 702 of file TraCIAPI.cpp.
References CMD_SET_EDGE_VARIABLE, TYPE_COMPOUND, TYPE_DOUBLE, TYPE_INTEGER, VAR_EDGE_EFFORT, tcpip::Storage::writeByte(), tcpip::Storage::writeDouble(), and tcpip::Storage::writeInt().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::EdgeScope::setMaxSpeed | ( | const std::string & | edgeID, |
double | speed | ||
) | const |
Definition at line 718 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 131 of file TraCIAPI.h.