![]() |
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 497 of file TraCIAPI.h.
|
inline |
Definition at line 499 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 500 of file TraCIAPI.h.
References TraCIAPI::TraCIScopeWrapper::operator=().
|
private |
invalidated copy constructor
|
inherited |
Definition at line 3313 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3297 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3281 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
std::vector< std::string > TraCIAPI::SimulationScope::getArrivedIDList | ( | ) | const |
Definition at line 1561 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_ARRIVED_VEHICLES_IDS.
int TraCIAPI::SimulationScope::getArrivedNumber | ( | ) | const |
Definition at line 1556 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_ARRIVED_VEHICLES_NUMBER.
|
inherited |
Definition at line 3303 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
int TraCIAPI::SimulationScope::getCurrentTime | ( | ) | const |
Definition at line 1526 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 1586 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 1551 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_DEPARTED_VEHICLES_IDS.
int TraCIAPI::SimulationScope::getDepartedNumber | ( | ) | const |
Definition at line 1546 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 1603 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 1622 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 1581 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_TELEPORT_ENDING_VEHICLES_IDS.
int TraCIAPI::SimulationScope::getEndingTeleportNumber | ( | ) | const |
Definition at line 1576 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 1541 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_LOADED_VEHICLES_IDS.
int TraCIAPI::SimulationScope::getLoadedNumber | ( | ) | const |
Definition at line 1536 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_LOADED_VEHICLES_NUMBER.
int TraCIAPI::SimulationScope::getMinExpectedNumber | ( | ) | const |
Definition at line 1597 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_MIN_EXPECTED_VEHICLES.
|
inherited |
Definition at line 3326 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3320 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
libsumo::TraCIPositionVector TraCIAPI::SimulationScope::getNetBoundary | ( | ) | const |
Definition at line 1591 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_NET_BOUNDING_BOX.
|
inherited |
retrieve generic paramter
Definition at line 3235 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 1571 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_TELEPORT_STARTING_VEHICLES_IDS.
int TraCIAPI::SimulationScope::getStartingTeleportNumber | ( | ) | const |
Definition at line 1566 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_TELEPORT_STARTING_VEHICLES_NUMBER.
|
inherited |
Definition at line 3287 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
double TraCIAPI::SimulationScope::getTime | ( | ) | const |
Definition at line 1531 of file TraCIAPI.cpp.
References CMD_GET_SIM_VARIABLE, and VAR_TIME.
|
private |
invalidated assignment operator
|
inherited |
set generic paramter
Definition at line 3244 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 3259 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3271 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.