![]() |
SUMO - Simulation of Urban MObility
|
Scope for interaction with the simulation. More...
#include <TraCIAPI.h>


Public Member Functions | |
| void | clearSubscriptionResults () |
| const libsumo::ContextSubscriptionResults | getAllContextSubscriptionResults () const |
| const libsumo::SubscriptionResults | getAllSubscriptionResults () const |
| std::vector< std::string > | getArrivedIDList () const |
| int | getArrivedNumber () const |
| const libsumo::SubscriptionResults | getContextSubscriptionResults (const std::string &objID) const |
| int | getCurrentTime () const |
| double | getDeltaT () const |
| std::vector< std::string > | getDepartedIDList () const |
| int | getDepartedNumber () const |
| double | getDistance2D (double x1, double y1, double x2, double y2, bool isGeo=false, bool isDriving=false) |
| double | getDistanceRoad (const std::string &edgeID1, double pos1, const std::string &edgeID2, double pos2, bool isDriving=false) |
| std::vector< std::string > | getEndingTeleportIDList () const |
| int | getEndingTeleportNumber () const |
| std::vector< std::string > | getLoadedIDList () const |
| int | getLoadedNumber () const |
| int | getMinExpectedNumber () const |
| libsumo::SubscriptionResults & | getModifiableContextSubscriptionResults (const std::string &objID) |
| libsumo::SubscriptionResults & | getModifiableSubscriptionResults () |
| libsumo::TraCIPositionVector | getNetBoundary () const |
| std::string | getParameter (const std::string &objectID, const std::string &key) const |
| retrieve generic paramter More... | |
| std::vector< std::string > | getStartingTeleportIDList () const |
| int | getStartingTeleportNumber () const |
| const libsumo::TraCIResults | getSubscriptionResults (const std::string &objID) const |
| double | getTime () const |
| void | setParameter (const std::string &objectID, const std::string &key, const std::string &value) const |
| set generic paramter More... | |
| SimulationScope (TraCIAPI &parent) | |
| 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 | ~SimulationScope () |
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 | |
| SimulationScope & | operator= (const SimulationScope &src) |
| invalidated assignment operator More... | |
| SimulationScope (const SimulationScope &src) | |
| invalidated copy constructor More... | |
Scope for interaction with the simulation.
Definition at line 492 of file TraCIAPI.h.
|
inline |
Definition at line 494 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 495 of file TraCIAPI.h.
References TraCIAPI::TraCIScopeWrapper::operator=().
|
private |
invalidated copy constructor
|
inherited |
Definition at line 3208 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3192 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3176 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
| std::vector< std::string > TraCIAPI::SimulationScope::getArrivedIDList | ( | ) | const |
Definition at line 1523 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_ARRIVED_VEHICLES_IDS.
| int TraCIAPI::SimulationScope::getArrivedNumber | ( | ) | const |
Definition at line 1518 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_ARRIVED_VEHICLES_NUMBER.
|
inherited |
Definition at line 3198 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
| int TraCIAPI::SimulationScope::getCurrentTime | ( | ) | const |
Definition at line 1488 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_TIME_STEP.
Referenced by TraCITestClient::testAPI().
| double TraCIAPI::SimulationScope::getDeltaT | ( | ) | const |
Definition at line 1548 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_DELTA_T.
Referenced by TraCITestClient::testAPI().
| std::vector< std::string > TraCIAPI::SimulationScope::getDepartedIDList | ( | ) | const |
Definition at line 1513 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_DEPARTED_VEHICLES_IDS.
| int TraCIAPI::SimulationScope::getDepartedNumber | ( | ) | const |
Definition at line 1508 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_DEPARTED_VEHICLES_NUMBER.
| double TraCIAPI::SimulationScope::getDistance2D | ( | double | x1, |
| double | y1, | ||
| double | x2, | ||
| double | y2, | ||
| bool | isGeo = false, |
||
| bool | isDriving = false |
||
| ) |
Definition at line 1565 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, DISTANCE_REQUEST, POSITION_2D, POSITION_LON_LAT, tcpip::Storage::readDouble(), REQUEST_AIRDIST, REQUEST_DRIVINGDIST, TYPE_COMPOUND, TYPE_DOUBLE, tcpip::Storage::writeByte(), tcpip::Storage::writeDouble(), and tcpip::Storage::writeInt().
Referenced by TraCITestClient::testAPI().
| double TraCIAPI::SimulationScope::getDistanceRoad | ( | const std::string & | edgeID1, |
| double | pos1, | ||
| const std::string & | edgeID2, | ||
| double | pos2, | ||
| bool | isDriving = false |
||
| ) |
Definition at line 1584 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, DISTANCE_REQUEST, POSITION_ROADMAP, tcpip::Storage::readDouble(), REQUEST_AIRDIST, REQUEST_DRIVINGDIST, TYPE_COMPOUND, TYPE_DOUBLE, tcpip::Storage::writeByte(), tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), and tcpip::Storage::writeString().
Referenced by TraCITestClient::testAPI().
| std::vector< std::string > TraCIAPI::SimulationScope::getEndingTeleportIDList | ( | ) | const |
Definition at line 1543 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_TELEPORT_ENDING_VEHICLES_IDS.
| int TraCIAPI::SimulationScope::getEndingTeleportNumber | ( | ) | const |
Definition at line 1538 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_TELEPORT_ENDING_VEHICLES_NUMBER.
| std::vector< std::string > TraCIAPI::SimulationScope::getLoadedIDList | ( | ) | const |
Definition at line 1503 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_LOADED_VEHICLES_IDS.
| int TraCIAPI::SimulationScope::getLoadedNumber | ( | ) | const |
Definition at line 1498 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_LOADED_VEHICLES_NUMBER.
| int TraCIAPI::SimulationScope::getMinExpectedNumber | ( | ) | const |
Definition at line 1559 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_MIN_EXPECTED_VEHICLES.
|
inherited |
Definition at line 3221 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3215 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
| libsumo::TraCIPositionVector TraCIAPI::SimulationScope::getNetBoundary | ( | ) | const |
Definition at line 1553 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_NET_BOUNDING_BOX.
|
inherited |
retrieve generic paramter
Definition at line 3130 of file TraCIAPI.cpp.
References TYPE_STRING, VAR_PARAMETER, tcpip::Storage::writeByte(), and tcpip::Storage::writeString().
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
| std::vector< std::string > TraCIAPI::SimulationScope::getStartingTeleportIDList | ( | ) | const |
Definition at line 1533 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_TELEPORT_STARTING_VEHICLES_IDS.
| int TraCIAPI::SimulationScope::getStartingTeleportNumber | ( | ) | const |
Definition at line 1528 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_TELEPORT_STARTING_VEHICLES_NUMBER.
|
inherited |
Definition at line 3182 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
| double TraCIAPI::SimulationScope::getTime | ( | ) | const |
Definition at line 1493 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_TIME.
|
private |
invalidated assignment operator
|
inherited |
set generic paramter
Definition at line 3139 of file TraCIAPI.cpp.
References TYPE_COMPOUND, TYPE_STRING, VAR_PARAMETER, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3154 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3166 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
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.
|
protectedinherited |
Definition at line 148 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 150 of file TraCIAPI.h.