Eclipse SUMO - Simulation of Urban MObility
|
Scope for interaction with lanes. More...
#include <TraCIAPI.h>
Public Member Functions | |
void | clearSubscriptionResults () |
const libsumo::ContextSubscriptionResults | getAllContextSubscriptionResults () const |
std::vector< std::string > | getAllowed (const std::string &laneID) const |
const libsumo::SubscriptionResults | getAllSubscriptionResults () const |
double | getCO2Emission (const std::string &laneID) const |
double | getCOEmission (const std::string &laneID) const |
const libsumo::SubscriptionResults | getContextSubscriptionResults (const std::string &objID) const |
std::vector< std::string > | getDisallowed (const std::string &laneID) const |
std::string | getEdgeID (const std::string &laneID) const |
double | getElectricityConsumption (const std::string &laneID) const |
std::vector< std::string > | getFoes (const std::string &laneID, const std::string &toLaneID) const |
double | getFuelConsumption (const std::string &laneID) const |
double | getHCEmission (const std::string &laneID) const |
int | getIDCount () const |
std::vector< std::string > | getIDList () const |
std::vector< std::string > | getInternalFoes (const std::string &laneID) const |
int | getLastStepHaltingNumber (const std::string &laneID) const |
double | getLastStepLength (const std::string &laneID) const |
double | getLastStepMeanSpeed (const std::string &laneID) const |
double | getLastStepOccupancy (const std::string &laneID) const |
std::vector< std::string > | getLastStepVehicleIDs (const std::string &laneID) const |
int | getLastStepVehicleNumber (const std::string &laneID) const |
double | getLength (const std::string &laneID) const |
int | getLinkNumber (const std::string &laneID) const |
std::vector< libsumo::TraCIConnection > | getLinks (const std::string &laneID) const |
double | getMaxSpeed (const std::string &laneID) const |
libsumo::SubscriptionResults & | getModifiableContextSubscriptionResults (const std::string &objID) |
libsumo::SubscriptionResults & | getModifiableSubscriptionResults () |
double | getNoiseEmission (const std::string &laneID) const |
double | getNOxEmission (const std::string &laneID) 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 &laneID) const |
libsumo::TraCIPositionVector | getShape (const std::string &laneID) const |
const libsumo::TraCIResults | getSubscriptionResults (const std::string &objID) const |
double | getTraveltime (const std::string &laneID) const |
double | getWidth (const std::string &laneID) const |
LaneScope (TraCIAPI &parent) | |
void | setAllowed (const std::string &laneID, const std::vector< std::string > &allowedClasses) const |
void | setDisallowed (const std::string &laneID, const std::vector< std::string > &disallowedClasses) const |
void | setLength (const std::string &laneID, double length) const |
void | setMaxSpeed (const std::string &laneID, 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 | ~LaneScope () |
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 lanes.
Definition at line 264 of file TraCIAPI.h.
|
inline |
Definition at line 266 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 267 of file TraCIAPI.h.
|
inherited |
Definition at line 3894 of file TraCIAPI.cpp.
|
inherited |
Definition at line 3878 of file TraCIAPI.cpp.
std::vector< std::string > TraCIAPI::LaneScope::getAllowed | ( | const std::string & | laneID | ) | const |
Definition at line 840 of file TraCIAPI.cpp.
References libsumo::LANE_ALLOWED.
|
inherited |
Definition at line 3862 of file TraCIAPI.cpp.
|
protectedinherited |
Definition at line 3564 of file TraCIAPI.cpp.
References libsumo::INVALID_INT_VALUE, and libsumo::TYPE_BYTE.
double TraCIAPI::LaneScope::getCO2Emission | ( | const std::string & | laneID | ) | const |
Definition at line 915 of file TraCIAPI.cpp.
References libsumo::VAR_CO2EMISSION.
double TraCIAPI::LaneScope::getCOEmission | ( | const std::string & | laneID | ) | const |
Definition at line 920 of file TraCIAPI.cpp.
References libsumo::VAR_COEMISSION.
|
protectedinherited |
Definition at line 3680 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 3884 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::LaneScope::getDisallowed | ( | const std::string & | laneID | ) | const |
Definition at line 845 of file TraCIAPI.cpp.
References libsumo::LANE_DISALLOWED.
|
protectedinherited |
Definition at line 3585 of file TraCIAPI.cpp.
References libsumo::INVALID_DOUBLE_VALUE, and libsumo::TYPE_DOUBLE.
Referenced by TraCIAPI::EdgeScope::getAdaptedTraveltime().
|
protectedinherited |
Definition at line 3666 of file TraCIAPI.cpp.
References libsumo::TYPE_DOUBLELIST.
std::string TraCIAPI::LaneScope::getEdgeID | ( | const std::string & | laneID | ) | const |
Definition at line 910 of file TraCIAPI.cpp.
References libsumo::LANE_EDGE_ID.
double TraCIAPI::LaneScope::getElectricityConsumption | ( | const std::string & | laneID | ) | const |
Definition at line 950 of file TraCIAPI.cpp.
References libsumo::VAR_ELECTRICITYCONSUMPTION.
std::vector< std::string > TraCIAPI::LaneScope::getFoes | ( | const std::string & | laneID, |
const std::string & | toLaneID | ||
) | const |
Definition at line 991 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, libsumo::TYPE_STRING, libsumo::TYPE_STRINGLIST, libsumo::VAR_FOES, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
double TraCIAPI::LaneScope::getFuelConsumption | ( | const std::string & | laneID | ) | const |
Definition at line 940 of file TraCIAPI.cpp.
References libsumo::VAR_FUELCONSUMPTION.
double TraCIAPI::LaneScope::getHCEmission | ( | const std::string & | laneID | ) | const |
Definition at line 925 of file TraCIAPI.cpp.
References libsumo::VAR_HCEMISSION.
|
inherited |
Definition at line 3749 of file TraCIAPI.cpp.
References libsumo::ID_COUNT.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3743 of file TraCIAPI.cpp.
References libsumo::TRACI_ID_LIST.
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
Definition at line 3575 of file TraCIAPI.cpp.
References libsumo::INVALID_INT_VALUE, and libsumo::TYPE_INTEGER.
std::vector< std::string > TraCIAPI::LaneScope::getInternalFoes | ( | const std::string & | laneID | ) | const |
Definition at line 1007 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
int TraCIAPI::LaneScope::getLastStepHaltingNumber | ( | const std::string & | laneID | ) | const |
Definition at line 980 of file TraCIAPI.cpp.
References libsumo::LAST_STEP_VEHICLE_HALTING_NUMBER.
double TraCIAPI::LaneScope::getLastStepLength | ( | const std::string & | laneID | ) | const |
Definition at line 965 of file TraCIAPI.cpp.
References libsumo::LAST_STEP_LENGTH.
double TraCIAPI::LaneScope::getLastStepMeanSpeed | ( | const std::string & | laneID | ) | const |
Definition at line 955 of file TraCIAPI.cpp.
References libsumo::LAST_STEP_MEAN_SPEED.
double TraCIAPI::LaneScope::getLastStepOccupancy | ( | const std::string & | laneID | ) | const |
Definition at line 960 of file TraCIAPI.cpp.
References libsumo::LAST_STEP_OCCUPANCY.
std::vector< std::string > TraCIAPI::LaneScope::getLastStepVehicleIDs | ( | const std::string & | laneID | ) | const |
Definition at line 985 of file TraCIAPI.cpp.
References libsumo::LAST_STEP_VEHICLE_ID_LIST.
int TraCIAPI::LaneScope::getLastStepVehicleNumber | ( | const std::string & | laneID | ) | const |
Definition at line 975 of file TraCIAPI.cpp.
References libsumo::LAST_STEP_VEHICLE_NUMBER.
double TraCIAPI::LaneScope::getLength | ( | const std::string & | laneID | ) | const |
Definition at line 825 of file TraCIAPI.cpp.
References libsumo::VAR_LENGTH.
int TraCIAPI::LaneScope::getLinkNumber | ( | const std::string & | laneID | ) | const |
Definition at line 850 of file TraCIAPI.cpp.
References libsumo::LANE_LINK_NUMBER.
Referenced by TraCITestClient::testAPI().
std::vector< libsumo::TraCIConnection > TraCIAPI::LaneScope::getLinks | ( | const std::string & | laneID | ) | const |
Definition at line 855 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, libsumo::LANE_LINKS, and libsumo::TYPE_COMPOUND.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::LaneScope::getMaxSpeed | ( | const std::string & | laneID | ) | const |
Definition at line 830 of file TraCIAPI.cpp.
References libsumo::VAR_MAXSPEED.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3907 of file TraCIAPI.cpp.
|
inherited |
Definition at line 3901 of file TraCIAPI.cpp.
double TraCIAPI::LaneScope::getNoiseEmission | ( | const std::string & | laneID | ) | const |
Definition at line 945 of file TraCIAPI.cpp.
References libsumo::VAR_NOISEEMISSION.
double TraCIAPI::LaneScope::getNOxEmission | ( | const std::string & | laneID | ) | const |
Definition at line 935 of file TraCIAPI.cpp.
References libsumo::VAR_NOXEMISSION.
|
inherited |
retrieve generic parameter
Definition at line 3755 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 3764 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::LaneScope::getPMxEmission | ( | const std::string & | laneID | ) | const |
Definition at line 930 of file TraCIAPI.cpp.
References libsumo::VAR_PMXEMISSION.
|
protectedinherited |
Definition at line 3595 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 3616 of file TraCIAPI.cpp.
References libsumo::POSITION_2D, libsumo::TraCIPosition::x, libsumo::TraCIPosition::y, and libsumo::TraCIPosition::z.
|
protectedinherited |
Definition at line 3629 of file TraCIAPI.cpp.
References libsumo::POSITION_3D, libsumo::TraCIPosition::x, libsumo::TraCIPosition::y, and libsumo::TraCIPosition::z.
libsumo::TraCIPositionVector TraCIAPI::LaneScope::getShape | ( | const std::string & | laneID | ) | const |
Definition at line 905 of file TraCIAPI.cpp.
References libsumo::VAR_SHAPE.
|
protectedinherited |
Definition at line 3642 of file TraCIAPI.cpp.
References libsumo::TYPE_STRING.
|
protectedinherited |
Definition at line 3652 of file TraCIAPI.cpp.
References libsumo::TYPE_STRINGLIST.
|
inherited |
Definition at line 3868 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
Definition at line 3694 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::LaneScope::getTraveltime | ( | const std::string & | laneID | ) | const |
Definition at line 970 of file TraCIAPI.cpp.
References libsumo::VAR_CURRENT_TRAVELTIME.
|
protectedinherited |
Definition at line 3554 of file TraCIAPI.cpp.
References libsumo::INVALID_INT_VALUE, and libsumo::TYPE_UBYTE.
double TraCIAPI::LaneScope::getWidth | ( | const std::string & | laneID | ) | const |
Definition at line 835 of file TraCIAPI.cpp.
References libsumo::VAR_WIDTH.
void TraCIAPI::LaneScope::setAllowed | ( | const std::string & | laneID, |
const std::vector< std::string > & | allowedClasses | ||
) | const |
Definition at line 1013 of file TraCIAPI.cpp.
References libsumo::LANE_ALLOWED.
void TraCIAPI::LaneScope::setDisallowed | ( | const std::string & | laneID, |
const std::vector< std::string > & | disallowedClasses | ||
) | const |
Definition at line 1018 of file TraCIAPI.cpp.
References libsumo::LANE_DISALLOWED.
|
protectedinherited |
Definition at line 3807 of file TraCIAPI.cpp.
References libsumo::TYPE_DOUBLE, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
|
protectedinherited |
Definition at line 3797 of file TraCIAPI.cpp.
References libsumo::TYPE_INTEGER, tcpip::Storage::writeInt(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::LaneScope::setLength | ( | const std::string & | laneID, |
double | length | ||
) | const |
Definition at line 1028 of file TraCIAPI.cpp.
References libsumo::VAR_LENGTH.
void TraCIAPI::LaneScope::setMaxSpeed | ( | const std::string & | laneID, |
double | speed | ||
) | const |
Definition at line 1023 of file TraCIAPI.cpp.
References libsumo::VAR_MAXSPEED.
Referenced by TraCITestClient::testAPI().
|
inherited |
set generic paramter
Definition at line 3783 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 3817 of file TraCIAPI.cpp.
References libsumo::TYPE_STRING, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
|
protectedinherited |
Definition at line 3827 of file TraCIAPI.cpp.
References libsumo::TYPE_STRINGLIST, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
|
inherited |
Definition at line 3840 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3852 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.