![]() |
Eclipse 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 beginSeconds=0., double endSeconds=std::numeric_limits< double >::max()) const |
| void | clearSubscriptionResults () |
| EdgeScope (TraCIAPI &parent) | |
| double | getAdaptedTraveltime (const std::string &edgeID, double time) const |
| const libsumo::ContextSubscriptionResults | getAllContextSubscriptionResults () const |
| const libsumo::SubscriptionResults | getAllSubscriptionResults () const |
| double | getCO2Emission (const std::string &edgeID) const |
| double | getCOEmission (const std::string &edgeID) const |
| const libsumo::SubscriptionResults | getContextSubscriptionResults (const std::string &objID) const |
| double | getEffort (const std::string &edgeID, double 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 |
| int | getLaneNumber (const std::string &edgeID) 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 |
| libsumo::SubscriptionResults & | getModifiableContextSubscriptionResults (const std::string &objID) |
| libsumo::SubscriptionResults & | getModifiableSubscriptionResults () |
| double | getNoiseEmission (const std::string &edgeID) const |
| double | getNOxEmission (const std::string &edgeID) const |
| std::string | getParameter (const std::string &objectID, const std::string &key) const |
| retrieve generic paramter More... | |
| double | getPMxEmission (const std::string &edgeID) const |
| std::string | getStreetName (const std::string &id) const |
| const libsumo::TraCIResults | getSubscriptionResults (const std::string &objID) const |
| double | getTraveltime (const std::string &edgeID) const |
| void | setEffort (const std::string &edgeID, double effort, double beginSeconds=0., double endSeconds=std::numeric_limits< double >::max()) const |
| void | setMaxSpeed (const std::string &edgeID, 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 | ~EdgeScope () |
Protected Attributes | |
| int | myCmdGetID |
| int | myCmdSetID |
| int | myContextSubscribeID |
| libsumo::ContextSubscriptionResults | myContextSubscriptionResults |
| TraCIAPI & | myParent |
| The parent TraCI client which offers the connection. More... | |
| int | mySubscribeID |
| libsumo::SubscriptionResults | mySubscriptionResults |
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 169 of file TraCIAPI.h.
|
inline |
Definition at line 171 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 172 of file TraCIAPI.h.
|
private |
invalidated copy constructor
| void TraCIAPI::EdgeScope::adaptTraveltime | ( | const std::string & | edgeID, |
| double | time, | ||
| double | beginSeconds = 0., |
||
| double | endSeconds = std::numeric_limits<double>::max() |
||
| ) | const |
Definition at line 778 of file TraCIAPI.cpp.
References libsumo::CMD_SET_EDGE_VARIABLE, libsumo::TYPE_COMPOUND, libsumo::TYPE_DOUBLE, libsumo::VAR_EDGE_TRAVELTIME, tcpip::Storage::writeByte(), tcpip::Storage::writeDouble(), and tcpip::Storage::writeInt().
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3707 of file TraCIAPI.cpp.
| double TraCIAPI::EdgeScope::getAdaptedTraveltime | ( | const std::string & | edgeID, |
| double | time | ||
| ) | const |
Definition at line 673 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_EDGE_TRAVELTIME, tcpip::Storage::writeByte(), and tcpip::Storage::writeDouble().
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3691 of file TraCIAPI.cpp.
|
inherited |
Definition at line 3675 of file TraCIAPI.cpp.
| double TraCIAPI::EdgeScope::getCO2Emission | ( | const std::string & | edgeID | ) | const |
Definition at line 689 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::VAR_CO2EMISSION.
| double TraCIAPI::EdgeScope::getCOEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 695 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::VAR_COEMISSION.
|
inherited |
Definition at line 3697 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
| double TraCIAPI::EdgeScope::getEffort | ( | const std::string & | edgeID, |
| double | time | ||
| ) | const |
Definition at line 681 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_EDGE_EFFORT, tcpip::Storage::writeByte(), and tcpip::Storage::writeDouble().
Referenced by TraCITestClient::testAPI().
| double TraCIAPI::EdgeScope::getElectricityConsumption | ( | const std::string & | edgeID | ) | const |
Definition at line 725 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::VAR_ELECTRICITYCONSUMPTION.
| double TraCIAPI::EdgeScope::getFuelConsumption | ( | const std::string & | edgeID | ) | const |
Definition at line 715 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::VAR_FUELCONSUMPTION.
| double TraCIAPI::EdgeScope::getHCEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 700 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::VAR_HCEMISSION.
| int TraCIAPI::EdgeScope::getIDCount | ( | ) | const |
Definition at line 668 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::ID_COUNT.
Referenced by TraCITestClient::testAPI().
| std::vector< std::string > TraCIAPI::EdgeScope::getIDList | ( | ) | const |
Definition at line 663 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, TraCIAPI::getStringVector(), TraCIAPI::TraCIScopeWrapper::myParent, and libsumo::TRACI_ID_LIST.
Referenced by TraCITestClient::testAPI().
| int TraCIAPI::EdgeScope::getLaneNumber | ( | const std::string & | edgeID | ) | const |
Definition at line 766 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::VAR_LANE_INDEX.
Referenced by TraCITestClient::testAPI().
| double TraCIAPI::EdgeScope::getLastStepHaltingNumber | ( | const std::string & | edgeID | ) | const |
Definition at line 755 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::LAST_STEP_VEHICLE_HALTING_NUMBER.
| double TraCIAPI::EdgeScope::getLastStepLength | ( | const std::string & | edgeID | ) | const |
Definition at line 740 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::LAST_STEP_LENGTH.
| double TraCIAPI::EdgeScope::getLastStepMeanSpeed | ( | const std::string & | edgeID | ) | const |
Definition at line 730 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::LAST_STEP_MEAN_SPEED.
| double TraCIAPI::EdgeScope::getLastStepOccupancy | ( | const std::string & | edgeID | ) | const |
Definition at line 735 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::LAST_STEP_OCCUPANCY.
| std::vector< std::string > TraCIAPI::EdgeScope::getLastStepVehicleIDs | ( | const std::string & | edgeID | ) | const |
Definition at line 760 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::LAST_STEP_VEHICLE_ID_LIST.
| int TraCIAPI::EdgeScope::getLastStepVehicleNumber | ( | const std::string & | edgeID | ) | const |
Definition at line 750 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::LAST_STEP_VEHICLE_NUMBER.
|
inherited |
Definition at line 3720 of file TraCIAPI.cpp.
|
inherited |
Definition at line 3714 of file TraCIAPI.cpp.
| double TraCIAPI::EdgeScope::getNoiseEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 720 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::VAR_NOISEEMISSION.
| double TraCIAPI::EdgeScope::getNOxEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 710 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::VAR_NOXEMISSION.
|
inherited |
retrieve generic paramter
Definition at line 3630 of file TraCIAPI.cpp.
References libsumo::TYPE_STRING, libsumo::VAR_PARAMETER, tcpip::Storage::writeByte(), and tcpip::Storage::writeString().
Referenced by TraCITestClient::testAPI().
| double TraCIAPI::EdgeScope::getPMxEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 705 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::VAR_PMXEMISSION.
| std::string TraCIAPI::EdgeScope::getStreetName | ( | const std::string & | id | ) | const |
Definition at line 772 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::VAR_NAME.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3681 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
| double TraCIAPI::EdgeScope::getTraveltime | ( | const std::string & | edgeID | ) | const |
Definition at line 745 of file TraCIAPI.cpp.
References libsumo::CMD_GET_EDGE_VARIABLE, and libsumo::VAR_CURRENT_TRAVELTIME.
Referenced by TraCITestClient::testAPI().
invalidated assignment operator
| void TraCIAPI::EdgeScope::setEffort | ( | const std::string & | edgeID, |
| double | effort, | ||
| double | beginSeconds = 0., |
||
| double | endSeconds = std::numeric_limits<double>::max() |
||
| ) | const |
Definition at line 798 of file TraCIAPI.cpp.
References libsumo::CMD_SET_EDGE_VARIABLE, libsumo::TYPE_COMPOUND, libsumo::TYPE_DOUBLE, libsumo::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 817 of file TraCIAPI.cpp.
References libsumo::CMD_SET_EDGE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_MAXSPEED, tcpip::Storage::writeByte(), and tcpip::Storage::writeDouble().
Referenced by TraCITestClient::testAPI().
|
inherited |
set generic paramter
Definition at line 3639 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().
|
inherited |
Definition at line 3653 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3665 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
Definition at line 145 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 146 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 148 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 150 of file TraCIAPI.h.
|
protectedinherited |
The parent TraCI client which offers the connection.
Definition at line 144 of file TraCIAPI.h.
Referenced by getIDList().
|
protectedinherited |
Definition at line 147 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 149 of file TraCIAPI.h.