![]() |
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 paramter More... | |
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 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 | ~LaneScope () |
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 | |
LaneScope (const LaneScope &src) | |
invalidated copy constructor More... | |
LaneScope & | operator= (const LaneScope &src) |
invalidated assignment operator More... | |
Scope for interaction with lanes.
Definition at line 309 of file TraCIAPI.h.
|
inline |
Definition at line 311 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 312 of file TraCIAPI.h.
|
private |
invalidated copy constructor
|
inherited |
Definition at line 3667 of file TraCIAPI.cpp.
|
inherited |
Definition at line 3651 of file TraCIAPI.cpp.
std::vector< std::string > TraCIAPI::LaneScope::getAllowed | ( | const std::string & | laneID | ) | const |
Definition at line 1060 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::LANE_ALLOWED.
|
inherited |
Definition at line 3635 of file TraCIAPI.cpp.
double TraCIAPI::LaneScope::getCO2Emission | ( | const std::string & | laneID | ) | const |
Definition at line 1135 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::VAR_CO2EMISSION.
double TraCIAPI::LaneScope::getCOEmission | ( | const std::string & | laneID | ) | const |
Definition at line 1140 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::VAR_COEMISSION.
|
inherited |
Definition at line 3657 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::LaneScope::getDisallowed | ( | const std::string & | laneID | ) | const |
Definition at line 1065 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::LANE_DISALLOWED.
std::string TraCIAPI::LaneScope::getEdgeID | ( | const std::string & | laneID | ) | const |
Definition at line 1130 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::LANE_EDGE_ID.
double TraCIAPI::LaneScope::getElectricityConsumption | ( | const std::string & | laneID | ) | const |
Definition at line 1170 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::VAR_ELECTRICITYCONSUMPTION.
std::vector< std::string > TraCIAPI::LaneScope::getFoes | ( | const std::string & | laneID, |
const std::string & | toLaneID | ||
) | const |
Definition at line 1211 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 1160 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::VAR_FUELCONSUMPTION.
double TraCIAPI::LaneScope::getHCEmission | ( | const std::string & | laneID | ) | const |
Definition at line 1145 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::VAR_HCEMISSION.
int TraCIAPI::LaneScope::getIDCount | ( | ) | const |
Definition at line 1040 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::ID_COUNT.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::LaneScope::getIDList | ( | ) | const |
Definition at line 1035 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::TRACI_ID_LIST.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::LaneScope::getInternalFoes | ( | const std::string & | laneID | ) | const |
Definition at line 1227 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
int TraCIAPI::LaneScope::getLastStepHaltingNumber | ( | const std::string & | laneID | ) | const |
Definition at line 1200 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::LAST_STEP_VEHICLE_HALTING_NUMBER.
double TraCIAPI::LaneScope::getLastStepLength | ( | const std::string & | laneID | ) | const |
Definition at line 1185 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::LAST_STEP_LENGTH.
double TraCIAPI::LaneScope::getLastStepMeanSpeed | ( | const std::string & | laneID | ) | const |
Definition at line 1175 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::LAST_STEP_MEAN_SPEED.
double TraCIAPI::LaneScope::getLastStepOccupancy | ( | const std::string & | laneID | ) | const |
Definition at line 1180 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::LAST_STEP_OCCUPANCY.
std::vector< std::string > TraCIAPI::LaneScope::getLastStepVehicleIDs | ( | const std::string & | laneID | ) | const |
Definition at line 1205 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::LAST_STEP_VEHICLE_ID_LIST.
int TraCIAPI::LaneScope::getLastStepVehicleNumber | ( | const std::string & | laneID | ) | const |
Definition at line 1195 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::LAST_STEP_VEHICLE_NUMBER.
double TraCIAPI::LaneScope::getLength | ( | const std::string & | laneID | ) | const |
Definition at line 1045 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::VAR_LENGTH.
int TraCIAPI::LaneScope::getLinkNumber | ( | const std::string & | laneID | ) | const |
Definition at line 1070 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::LANE_LINK_NUMBER.
Referenced by TraCITestClient::testAPI().
std::vector< libsumo::TraCIConnection > TraCIAPI::LaneScope::getLinks | ( | const std::string & | laneID | ) | const |
Definition at line 1075 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 1050 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::VAR_MAXSPEED.
|
inherited |
Definition at line 3680 of file TraCIAPI.cpp.
|
inherited |
Definition at line 3674 of file TraCIAPI.cpp.
double TraCIAPI::LaneScope::getNoiseEmission | ( | const std::string & | laneID | ) | const |
Definition at line 1165 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::VAR_NOISEEMISSION.
double TraCIAPI::LaneScope::getNOxEmission | ( | const std::string & | laneID | ) | const |
Definition at line 1155 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::VAR_NOXEMISSION.
|
inherited |
retrieve generic paramter
Definition at line 3590 of file TraCIAPI.cpp.
References libsumo::TYPE_STRING, libsumo::VAR_PARAMETER, tcpip::Storage::writeByte(), and tcpip::Storage::writeString().
Referenced by TraCITestClient::testAPI().
double TraCIAPI::LaneScope::getPMxEmission | ( | const std::string & | laneID | ) | const |
Definition at line 1150 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::VAR_PMXEMISSION.
libsumo::TraCIPositionVector TraCIAPI::LaneScope::getShape | ( | const std::string & | laneID | ) | const |
Definition at line 1125 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::VAR_SHAPE.
|
inherited |
Definition at line 3641 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::LaneScope::getTraveltime | ( | const std::string & | laneID | ) | const |
Definition at line 1190 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::VAR_CURRENT_TRAVELTIME.
double TraCIAPI::LaneScope::getWidth | ( | const std::string & | laneID | ) | const |
Definition at line 1055 of file TraCIAPI.cpp.
References libsumo::CMD_GET_LANE_VARIABLE, and libsumo::VAR_WIDTH.
invalidated assignment operator
void TraCIAPI::LaneScope::setAllowed | ( | const std::string & | laneID, |
const std::vector< std::string > & | allowedClasses | ||
) | const |
Definition at line 1233 of file TraCIAPI.cpp.
References libsumo::CMD_SET_LANE_VARIABLE, libsumo::LANE_ALLOWED, libsumo::TYPE_STRINGLIST, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::LaneScope::setDisallowed | ( | const std::string & | laneID, |
const std::vector< std::string > & | disallowedClasses | ||
) | const |
Definition at line 1245 of file TraCIAPI.cpp.
References libsumo::CMD_SET_LANE_VARIABLE, libsumo::LANE_DISALLOWED, libsumo::TYPE_STRINGLIST, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::LaneScope::setLength | ( | const std::string & | laneID, |
double | length | ||
) | const |
Definition at line 1266 of file TraCIAPI.cpp.
References libsumo::CMD_SET_LANE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_LENGTH, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::LaneScope::setMaxSpeed | ( | const std::string & | laneID, |
double | speed | ||
) | const |
Definition at line 1257 of file TraCIAPI.cpp.
References libsumo::CMD_SET_LANE_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_MAXSPEED, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
|
inherited |
set generic paramter
Definition at line 3599 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 3613 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3625 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
Definition at line 146 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 147 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 149 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 151 of file TraCIAPI.h.
|
protectedinherited |
The parent TraCI client which offers the connection.
Definition at line 145 of file TraCIAPI.h.
Referenced by TraCIAPI::EdgeScope::getIDList().
|
protectedinherited |
Definition at line 148 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 150 of file TraCIAPI.h.