![]() |
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 parameter | |
| std::pair< std::string, std::string > | getParameterWithKey (const std::string &objectID, const std::string &key) const |
| retrieve generic parameter and return (key, value) tuple | |
| 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 | |
| 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 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 | |
| TraCIAPI & | myParent |
| The parent TraCI client which offers the connection. | |
Private Attributes | |
| int | myCmdGetID |
| int | myCmdSetID |
| int | myContextSubscribeID |
| libsumo::ContextSubscriptionResults | myContextSubscriptionResults |
| int | mySubscribeID |
| libsumo::SubscriptionResults | mySubscriptionResults |
Scope for interaction with edges.
Definition at line 171 of file TraCIAPI.h.
|
inline |
Definition at line 173 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 174 of file TraCIAPI.h.
| void TraCIAPI::EdgeScope::adaptTraveltime | ( | const std::string & | edgeID, |
| double | time, | ||
| double | beginSeconds = 0., |
||
| double | endSeconds = std::numeric_limits<double>::max() |
||
| ) | const |
Definition at line 607 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 3899 of file TraCIAPI.cpp.
| double TraCIAPI::EdgeScope::getAdaptedTraveltime | ( | const std::string & | edgeID, |
| double | time | ||
| ) | const |
Definition at line 502 of file TraCIAPI.cpp.
References TraCIAPI::TraCIScopeWrapper::getDouble(), libsumo::TYPE_DOUBLE, libsumo::VAR_EDGE_TRAVELTIME, tcpip::Storage::writeByte(), and tcpip::Storage::writeDouble().
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3883 of file TraCIAPI.cpp.
|
inherited |
Definition at line 3867 of file TraCIAPI.cpp.
|
protectedinherited |
Definition at line 3569 of file TraCIAPI.cpp.
References libsumo::INVALID_INT_VALUE, and libsumo::TYPE_BYTE.
| double TraCIAPI::EdgeScope::getCO2Emission | ( | const std::string & | edgeID | ) | const |
Definition at line 518 of file TraCIAPI.cpp.
References libsumo::VAR_CO2EMISSION.
| double TraCIAPI::EdgeScope::getCOEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 524 of file TraCIAPI.cpp.
References libsumo::VAR_COEMISSION.
|
protectedinherited |
Definition at line 3685 of file TraCIAPI.cpp.
References libsumo::TraCIColor::a, libsumo::TraCIColor::b, libsumo::TraCIColor::g, libsumo::TraCIColor::r, and libsumo::TYPE_COLOR.
|
inherited |
Definition at line 3889 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
Definition at line 3590 of file TraCIAPI.cpp.
References libsumo::INVALID_DOUBLE_VALUE, and libsumo::TYPE_DOUBLE.
Referenced by getAdaptedTraveltime().
|
protectedinherited |
Definition at line 3671 of file TraCIAPI.cpp.
References libsumo::TYPE_DOUBLELIST.
| double TraCIAPI::EdgeScope::getEffort | ( | const std::string & | edgeID, |
| double | time | ||
| ) | const |
Definition at line 510 of file TraCIAPI.cpp.
References 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 554 of file TraCIAPI.cpp.
References libsumo::VAR_ELECTRICITYCONSUMPTION.
| double TraCIAPI::EdgeScope::getFuelConsumption | ( | const std::string & | edgeID | ) | const |
Definition at line 544 of file TraCIAPI.cpp.
References libsumo::VAR_FUELCONSUMPTION.
| double TraCIAPI::EdgeScope::getHCEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 529 of file TraCIAPI.cpp.
References libsumo::VAR_HCEMISSION.
|
inherited |
Definition at line 3754 of file TraCIAPI.cpp.
References libsumo::ID_COUNT.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3748 of file TraCIAPI.cpp.
References libsumo::TRACI_ID_LIST.
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
Definition at line 3580 of file TraCIAPI.cpp.
References libsumo::INVALID_INT_VALUE, and libsumo::TYPE_INTEGER.
| int TraCIAPI::EdgeScope::getLaneNumber | ( | const std::string & | edgeID | ) | const |
Definition at line 595 of file TraCIAPI.cpp.
References libsumo::VAR_LANE_INDEX.
Referenced by TraCITestClient::testAPI().
| double TraCIAPI::EdgeScope::getLastStepHaltingNumber | ( | const std::string & | edgeID | ) | const |
Definition at line 584 of file TraCIAPI.cpp.
References libsumo::LAST_STEP_VEHICLE_HALTING_NUMBER.
| double TraCIAPI::EdgeScope::getLastStepLength | ( | const std::string & | edgeID | ) | const |
Definition at line 569 of file TraCIAPI.cpp.
References libsumo::LAST_STEP_LENGTH.
| double TraCIAPI::EdgeScope::getLastStepMeanSpeed | ( | const std::string & | edgeID | ) | const |
Definition at line 559 of file TraCIAPI.cpp.
References libsumo::LAST_STEP_MEAN_SPEED.
| double TraCIAPI::EdgeScope::getLastStepOccupancy | ( | const std::string & | edgeID | ) | const |
Definition at line 564 of file TraCIAPI.cpp.
References libsumo::LAST_STEP_OCCUPANCY.
| std::vector< std::string > TraCIAPI::EdgeScope::getLastStepVehicleIDs | ( | const std::string & | edgeID | ) | const |
Definition at line 589 of file TraCIAPI.cpp.
References libsumo::LAST_STEP_VEHICLE_ID_LIST.
| int TraCIAPI::EdgeScope::getLastStepVehicleNumber | ( | const std::string & | edgeID | ) | const |
Definition at line 579 of file TraCIAPI.cpp.
References libsumo::LAST_STEP_VEHICLE_NUMBER.
|
inherited |
Definition at line 3912 of file TraCIAPI.cpp.
|
inherited |
Definition at line 3906 of file TraCIAPI.cpp.
| double TraCIAPI::EdgeScope::getNoiseEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 549 of file TraCIAPI.cpp.
References libsumo::VAR_NOISEEMISSION.
| double TraCIAPI::EdgeScope::getNOxEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 539 of file TraCIAPI.cpp.
References libsumo::VAR_NOXEMISSION.
|
inherited |
retrieve generic parameter
Definition at line 3760 of file TraCIAPI.cpp.
References libsumo::TYPE_STRING, libsumo::VAR_PARAMETER, tcpip::Storage::writeByte(), and tcpip::Storage::writeString().
Referenced by TraCITestClient::testAPI().
|
inherited |
retrieve generic parameter and return (key, value) tuple
Definition at line 3769 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().
| double TraCIAPI::EdgeScope::getPMxEmission | ( | const std::string & | edgeID | ) | const |
Definition at line 534 of file TraCIAPI.cpp.
References libsumo::VAR_PMXEMISSION.
|
protectedinherited |
Definition at line 3600 of file TraCIAPI.cpp.
References libsumo::TYPE_POLYGON, libsumo::TraCIPositionVector::value, libsumo::TraCIPosition::x, libsumo::TraCIPosition::y, and libsumo::TraCIPosition::z.
|
protectedinherited |
Definition at line 3621 of file TraCIAPI.cpp.
References libsumo::POSITION_2D, libsumo::TraCIPosition::x, libsumo::TraCIPosition::y, and libsumo::TraCIPosition::z.
|
protectedinherited |
Definition at line 3634 of file TraCIAPI.cpp.
References libsumo::POSITION_3D, libsumo::TraCIPosition::x, libsumo::TraCIPosition::y, and libsumo::TraCIPosition::z.
| std::string TraCIAPI::EdgeScope::getStreetName | ( | const std::string & | id | ) | const |
Definition at line 601 of file TraCIAPI.cpp.
References libsumo::VAR_NAME.
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
Definition at line 3647 of file TraCIAPI.cpp.
References libsumo::TYPE_STRING.
|
protectedinherited |
Definition at line 3657 of file TraCIAPI.cpp.
References libsumo::TYPE_STRINGLIST.
|
inherited |
Definition at line 3873 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
Definition at line 3699 of file TraCIAPI.cpp.
References libsumo::TraCIStage::arrivalPos, libsumo::TraCIStage::cost, libsumo::TraCIStage::depart, libsumo::TraCIStage::departPos, libsumo::TraCIStage::description, libsumo::TraCIStage::destStop, libsumo::TraCIStage::edges, libsumo::TraCIStage::intended, libsumo::TraCIStage::length, libsumo::TraCIStage::line, libsumo::TraCIStage::travelTime, libsumo::TraCIStage::type, libsumo::TYPE_COMPOUND, and libsumo::TraCIStage::vType.
| double TraCIAPI::EdgeScope::getTraveltime | ( | const std::string & | edgeID | ) | const |
Definition at line 574 of file TraCIAPI.cpp.
References libsumo::VAR_CURRENT_TRAVELTIME.
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
Definition at line 3559 of file TraCIAPI.cpp.
References libsumo::INVALID_INT_VALUE, and libsumo::TYPE_UBYTE.
|
protectedinherited |
Definition at line 3812 of file TraCIAPI.cpp.
References libsumo::TYPE_DOUBLE, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
| void TraCIAPI::EdgeScope::setEffort | ( | const std::string & | edgeID, |
| double | effort, | ||
| double | beginSeconds = 0., |
||
| double | endSeconds = std::numeric_limits<double>::max() |
||
| ) | const |
Definition at line 627 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().
|
protectedinherited |
Definition at line 3802 of file TraCIAPI.cpp.
References libsumo::TYPE_INTEGER, tcpip::Storage::writeInt(), and tcpip::Storage::writeUnsignedByte().
| void TraCIAPI::EdgeScope::setMaxSpeed | ( | const std::string & | edgeID, |
| double | speed | ||
| ) | const |
Definition at line 646 of file TraCIAPI.cpp.
References libsumo::VAR_MAXSPEED.
Referenced by TraCITestClient::testAPI().
|
inherited |
set generic paramter
Definition at line 3788 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().
|
protectedinherited |
Definition at line 3822 of file TraCIAPI.cpp.
References libsumo::TYPE_STRING, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
|
protectedinherited |
Definition at line 3832 of file TraCIAPI.cpp.
References libsumo::TYPE_STRINGLIST, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
|
inherited |
Definition at line 3845 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3857 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
privateinherited |
Definition at line 154 of file TraCIAPI.h.
|
privateinherited |
Definition at line 155 of file TraCIAPI.h.
|
privateinherited |
Definition at line 157 of file TraCIAPI.h.
|
privateinherited |
Definition at line 159 of file TraCIAPI.h.
|
protectedinherited |
The parent TraCI client which offers the connection.
Definition at line 151 of file TraCIAPI.h.
|
privateinherited |
Definition at line 156 of file TraCIAPI.h.
|
privateinherited |
Definition at line 158 of file TraCIAPI.h.