![]() |
SUMO - Simulation of Urban MObility
|
Scope for interaction with lanes. More...
#include <TraCIAPI.h>
Public Member Functions | |
std::vector< std::string > | getAllowed (const std::string &laneID) const |
double | getCO2Emission (const std::string &laneID) const |
double | getCOEmission (const std::string &laneID) 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 |
double | getNoiseEmission (const std::string &laneID) const |
double | getNOxEmission (const std::string &laneID) const |
double | getPMxEmission (const std::string &laneID) const |
libsumo::TraCIPositionVector | getShape (const std::string &laneID) 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 |
virtual | ~LaneScope () |
Protected Attributes | |
TraCIAPI & | myParent |
The parent TraCI client which offers the connection. More... | |
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 283 of file TraCIAPI.h.
|
inline |
Definition at line 285 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 286 of file TraCIAPI.h.
References TraCIAPI::TraCIScopeWrapper::operator=().
|
private |
invalidated copy constructor
std::vector< std::string > TraCIAPI::LaneScope::getAllowed | ( | const std::string & | laneID | ) | const |
Definition at line 1004 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and LANE_ALLOWED.
double TraCIAPI::LaneScope::getCO2Emission | ( | const std::string & | laneID | ) | const |
Definition at line 1079 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and VAR_CO2EMISSION.
double TraCIAPI::LaneScope::getCOEmission | ( | const std::string & | laneID | ) | const |
Definition at line 1084 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and VAR_COEMISSION.
std::vector< std::string > TraCIAPI::LaneScope::getDisallowed | ( | const std::string & | laneID | ) | const |
Definition at line 1009 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and LANE_DISALLOWED.
std::string TraCIAPI::LaneScope::getEdgeID | ( | const std::string & | laneID | ) | const |
Definition at line 1074 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and LANE_EDGE_ID.
double TraCIAPI::LaneScope::getElectricityConsumption | ( | const std::string & | laneID | ) | const |
Definition at line 1114 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and VAR_ELECTRICITYCONSUMPTION.
std::vector< std::string > TraCIAPI::LaneScope::getFoes | ( | const std::string & | laneID, |
const std::string & | toLaneID | ||
) | const |
Definition at line 1155 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, tcpip::Storage::readInt(), tcpip::Storage::readString(), TYPE_STRING, TYPE_STRINGLIST, 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 1104 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and VAR_FUELCONSUMPTION.
double TraCIAPI::LaneScope::getHCEmission | ( | const std::string & | laneID | ) | const |
Definition at line 1089 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and VAR_HCEMISSION.
int TraCIAPI::LaneScope::getIDCount | ( | ) | const |
Definition at line 984 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and ID_COUNT.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::LaneScope::getIDList | ( | ) | const |
Definition at line 979 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and ID_LIST.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::LaneScope::getInternalFoes | ( | const std::string & | laneID | ) | const |
Definition at line 1171 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
int TraCIAPI::LaneScope::getLastStepHaltingNumber | ( | const std::string & | laneID | ) | const |
Definition at line 1144 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and LAST_STEP_VEHICLE_HALTING_NUMBER.
double TraCIAPI::LaneScope::getLastStepLength | ( | const std::string & | laneID | ) | const |
Definition at line 1129 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and LAST_STEP_LENGTH.
double TraCIAPI::LaneScope::getLastStepMeanSpeed | ( | const std::string & | laneID | ) | const |
Definition at line 1119 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and LAST_STEP_MEAN_SPEED.
double TraCIAPI::LaneScope::getLastStepOccupancy | ( | const std::string & | laneID | ) | const |
Definition at line 1124 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and LAST_STEP_OCCUPANCY.
std::vector< std::string > TraCIAPI::LaneScope::getLastStepVehicleIDs | ( | const std::string & | laneID | ) | const |
Definition at line 1149 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and LAST_STEP_VEHICLE_ID_LIST.
int TraCIAPI::LaneScope::getLastStepVehicleNumber | ( | const std::string & | laneID | ) | const |
Definition at line 1139 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and LAST_STEP_VEHICLE_NUMBER.
double TraCIAPI::LaneScope::getLength | ( | const std::string & | laneID | ) | const |
Definition at line 989 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and VAR_LENGTH.
int TraCIAPI::LaneScope::getLinkNumber | ( | const std::string & | laneID | ) | const |
Definition at line 1014 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and LANE_LINK_NUMBER.
Referenced by TraCITestClient::testAPI().
std::vector< TraCIConnection > TraCIAPI::LaneScope::getLinks | ( | const std::string & | laneID | ) | const |
Definition at line 1019 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, LANE_LINKS, tcpip::Storage::readDouble(), tcpip::Storage::readInt(), tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), and TYPE_COMPOUND.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::LaneScope::getMaxSpeed | ( | const std::string & | laneID | ) | const |
Definition at line 994 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and VAR_MAXSPEED.
double TraCIAPI::LaneScope::getNoiseEmission | ( | const std::string & | laneID | ) | const |
Definition at line 1109 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and VAR_NOISEEMISSION.
double TraCIAPI::LaneScope::getNOxEmission | ( | const std::string & | laneID | ) | const |
Definition at line 1099 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and VAR_NOXEMISSION.
double TraCIAPI::LaneScope::getPMxEmission | ( | const std::string & | laneID | ) | const |
Definition at line 1094 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and VAR_PMXEMISSION.
TraCIPositionVector TraCIAPI::LaneScope::getShape | ( | const std::string & | laneID | ) | const |
Definition at line 1069 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and VAR_SHAPE.
double TraCIAPI::LaneScope::getTraveltime | ( | const std::string & | laneID | ) | const |
Definition at line 1134 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and VAR_CURRENT_TRAVELTIME.
double TraCIAPI::LaneScope::getWidth | ( | const std::string & | laneID | ) | const |
Definition at line 999 of file TraCIAPI.cpp.
References CMD_GET_LANE_VARIABLE, and VAR_WIDTH.
invalidated assignment operator
void TraCIAPI::LaneScope::setAllowed | ( | const std::string & | laneID, |
const std::vector< std::string > & | allowedClasses | ||
) | const |
Definition at line 1177 of file TraCIAPI.cpp.
References CMD_SET_LANE_VARIABLE, LANE_ALLOWED, 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 1190 of file TraCIAPI.cpp.
References CMD_SET_LANE_VARIABLE, LANE_DISALLOWED, 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 1213 of file TraCIAPI.cpp.
References CMD_SET_LANE_VARIABLE, TYPE_DOUBLE, VAR_LENGTH, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::LaneScope::setMaxSpeed | ( | const std::string & | laneID, |
double | speed | ||
) | const |
Definition at line 1203 of file TraCIAPI.cpp.
References CMD_SET_LANE_VARIABLE, TYPE_DOUBLE, VAR_MAXSPEED, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
|
protectedinherited |
The parent TraCI client which offers the connection.
Definition at line 129 of file TraCIAPI.h.