Eclipse SUMO - Simulation of Urban MObility
|
Scope for interaction with POIs. More...
#include <TraCIAPI.h>
Public Member Functions | |
void | add (const std::string &poiID, double x, double y, const libsumo::TraCIColor &c, const std::string &type, int layer, const std::string &imgFile, double width, double height, double angle) const |
void | clearSubscriptionResults () |
const libsumo::ContextSubscriptionResults | getAllContextSubscriptionResults () const |
const libsumo::SubscriptionResults | getAllSubscriptionResults () const |
double | getAngle (const std::string &poiID) const |
libsumo::TraCIColor | getColor (const std::string &poiID) const |
const libsumo::SubscriptionResults | getContextSubscriptionResults (const std::string &objID) const |
double | getHeight (const std::string &poiID) const |
int | getIDCount () const |
std::vector< std::string > | getIDList () const |
std::string | getImageFile (const std::string &poiID) const |
libsumo::SubscriptionResults & | getModifiableContextSubscriptionResults (const std::string &objID) |
libsumo::SubscriptionResults & | getModifiableSubscriptionResults () |
std::string | getParameter (const std::string &objectID, const std::string &key) const |
retrieve generic parameter More... | |
std::pair< std::string, std::string > | getParameterWithKey (const std::string &objectID, const std::string &key) const |
retrieve generic parameter and return (key, value) tuple More... | |
libsumo::TraCIPosition | getPosition (const std::string &poiID) const |
const libsumo::TraCIResults | getSubscriptionResults (const std::string &objID) const |
std::string | getType (const std::string &poiID) const |
double | getWidth (const std::string &poiID) const |
POIScope (TraCIAPI &parent) | |
void | remove (const std::string &poiID, int layer=0) const |
void | setAngle (const std::string &poiID, double angle) const |
void | setColor (const std::string &poiID, const libsumo::TraCIColor &c) const |
void | setHeight (const std::string &poiID, double height) const |
void | setImageFile (const std::string &poiID, const std::string &imageFile) const |
void | setParameter (const std::string &objectID, const std::string &key, const std::string &value) const |
set generic paramter More... | |
void | setPosition (const std::string &poiID, double x, double y) const |
void | setType (const std::string &poiID, const std::string &setType) const |
void | setWidth (const std::string &poiID, double width) const |
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 | ~POIScope () |
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. More... | |
Private Attributes | |
int | myCmdGetID |
int | myCmdSetID |
int | myContextSubscribeID |
libsumo::ContextSubscriptionResults | myContextSubscriptionResults |
int | mySubscribeID |
libsumo::SubscriptionResults | mySubscriptionResults |
Scope for interaction with POIs.
Definition at line 330 of file TraCIAPI.h.
|
inline |
Definition at line 332 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 333 of file TraCIAPI.h.
void TraCIAPI::POIScope::add | ( | const std::string & | poiID, |
double | x, | ||
double | y, | ||
const libsumo::TraCIColor & | c, | ||
const std::string & | type, | ||
int | layer, | ||
const std::string & | imgFile, | ||
double | width, | ||
double | height, | ||
double | angle | ||
) | const |
Definition at line 1170 of file TraCIAPI.cpp.
References libsumo::TraCIColor::a, libsumo::ADD, libsumo::TraCIColor::b, libsumo::CMD_SET_POI_VARIABLE, libsumo::TraCIColor::g, libsumo::POSITION_2D, libsumo::TraCIColor::r, libsumo::TYPE_COLOR, libsumo::TYPE_COMPOUND, libsumo::TYPE_DOUBLE, libsumo::TYPE_INTEGER, libsumo::TYPE_STRING, tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
|
inherited |
Definition at line 3889 of file TraCIAPI.cpp.
|
inherited |
Definition at line 3873 of file TraCIAPI.cpp.
|
inherited |
Definition at line 3857 of file TraCIAPI.cpp.
double TraCIAPI::POIScope::getAngle | ( | const std::string & | poiID | ) | const |
Definition at line 1105 of file TraCIAPI.cpp.
References libsumo::VAR_ANGLE.
|
protectedinherited |
Definition at line 3559 of file TraCIAPI.cpp.
References libsumo::INVALID_INT_VALUE, and libsumo::TYPE_BYTE.
|
protectedinherited |
Definition at line 3675 of file TraCIAPI.cpp.
References libsumo::TraCIColor::a, libsumo::TraCIColor::b, libsumo::TraCIColor::g, libsumo::TraCIColor::r, and libsumo::TYPE_COLOR.
libsumo::TraCIColor TraCIAPI::POIScope::getColor | ( | const std::string & | poiID | ) | const |
Definition at line 1090 of file TraCIAPI.cpp.
References libsumo::VAR_COLOR.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3879 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
Definition at line 3580 of file TraCIAPI.cpp.
References libsumo::INVALID_DOUBLE_VALUE, and libsumo::TYPE_DOUBLE.
Referenced by TraCIAPI::EdgeScope::getAdaptedTraveltime().
|
protectedinherited |
Definition at line 3661 of file TraCIAPI.cpp.
References libsumo::TYPE_DOUBLELIST.
double TraCIAPI::POIScope::getHeight | ( | const std::string & | poiID | ) | const |
Definition at line 1100 of file TraCIAPI.cpp.
References libsumo::VAR_HEIGHT.
|
inherited |
Definition at line 3744 of file TraCIAPI.cpp.
References libsumo::ID_COUNT.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3738 of file TraCIAPI.cpp.
References libsumo::TRACI_ID_LIST.
Referenced by TraCITestClient::testAPI().
std::string TraCIAPI::POIScope::getImageFile | ( | const std::string & | poiID | ) | const |
Definition at line 1110 of file TraCIAPI.cpp.
References libsumo::VAR_IMAGEFILE.
|
protectedinherited |
Definition at line 3570 of file TraCIAPI.cpp.
References libsumo::INVALID_INT_VALUE, and libsumo::TYPE_INTEGER.
|
inherited |
Definition at line 3902 of file TraCIAPI.cpp.
|
inherited |
Definition at line 3896 of file TraCIAPI.cpp.
|
inherited |
retrieve generic parameter
Definition at line 3750 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 3759 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().
|
protectedinherited |
Definition at line 3590 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 3611 of file TraCIAPI.cpp.
References libsumo::POSITION_2D, libsumo::TraCIPosition::x, libsumo::TraCIPosition::y, and libsumo::TraCIPosition::z.
|
protectedinherited |
Definition at line 3624 of file TraCIAPI.cpp.
References libsumo::POSITION_3D, libsumo::TraCIPosition::x, libsumo::TraCIPosition::y, and libsumo::TraCIPosition::z.
libsumo::TraCIPosition TraCIAPI::POIScope::getPosition | ( | const std::string & | poiID | ) | const |
Definition at line 1085 of file TraCIAPI.cpp.
References libsumo::VAR_POSITION.
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
Definition at line 3637 of file TraCIAPI.cpp.
References libsumo::TYPE_STRING.
|
protectedinherited |
Definition at line 3647 of file TraCIAPI.cpp.
References libsumo::TYPE_STRINGLIST.
|
inherited |
Definition at line 3863 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
Definition at line 3689 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.
std::string TraCIAPI::POIScope::getType | ( | const std::string & | poiID | ) | const |
Definition at line 1080 of file TraCIAPI.cpp.
References libsumo::VAR_TYPE.
|
protectedinherited |
Definition at line 3549 of file TraCIAPI.cpp.
References libsumo::INVALID_INT_VALUE, and libsumo::TYPE_UBYTE.
double TraCIAPI::POIScope::getWidth | ( | const std::string & | poiID | ) | const |
Definition at line 1095 of file TraCIAPI.cpp.
References libsumo::VAR_WIDTH.
void TraCIAPI::POIScope::remove | ( | const std::string & | poiID, |
int | layer = 0 |
||
) | const |
Definition at line 1199 of file TraCIAPI.cpp.
References libsumo::CMD_SET_POI_VARIABLE, libsumo::REMOVE, libsumo::TYPE_INTEGER, tcpip::Storage::writeInt(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::POIScope::setAngle | ( | const std::string & | poiID, |
double | angle | ||
) | const |
Definition at line 1158 of file TraCIAPI.cpp.
References libsumo::VAR_ANGLE.
void TraCIAPI::POIScope::setColor | ( | const std::string & | poiID, |
const libsumo::TraCIColor & | c | ||
) | const |
Definition at line 1133 of file TraCIAPI.cpp.
References libsumo::TraCIColor::a, libsumo::TraCIColor::b, libsumo::CMD_SET_POI_VARIABLE, libsumo::TraCIColor::g, libsumo::TraCIColor::r, libsumo::TYPE_COLOR, libsumo::VAR_COLOR, and tcpip::Storage::writeUnsignedByte().
|
protectedinherited |
Definition at line 3802 of file TraCIAPI.cpp.
References libsumo::TYPE_DOUBLE, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::POIScope::setHeight | ( | const std::string & | poiID, |
double | height | ||
) | const |
Definition at line 1152 of file TraCIAPI.cpp.
References libsumo::VAR_HEIGHT.
void TraCIAPI::POIScope::setImageFile | ( | const std::string & | poiID, |
const std::string & | imageFile | ||
) | const |
Definition at line 1164 of file TraCIAPI.cpp.
References libsumo::VAR_IMAGEFILE.
|
protectedinherited |
Definition at line 3792 of file TraCIAPI.cpp.
References libsumo::TYPE_INTEGER, tcpip::Storage::writeInt(), and tcpip::Storage::writeUnsignedByte().
|
inherited |
set generic paramter
Definition at line 3778 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().
void TraCIAPI::POIScope::setPosition | ( | const std::string & | poiID, |
double | x, | ||
double | y | ||
) | const |
Definition at line 1122 of file TraCIAPI.cpp.
References libsumo::CMD_SET_POI_VARIABLE, libsumo::POSITION_2D, libsumo::VAR_POSITION, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
|
protectedinherited |
Definition at line 3812 of file TraCIAPI.cpp.
References libsumo::TYPE_STRING, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
|
protectedinherited |
Definition at line 3822 of file TraCIAPI.cpp.
References libsumo::TYPE_STRINGLIST, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::POIScope::setType | ( | const std::string & | poiID, |
const std::string & | setType | ||
) | const |
Definition at line 1116 of file TraCIAPI.cpp.
References libsumo::VAR_TYPE.
void TraCIAPI::POIScope::setWidth | ( | const std::string & | poiID, |
double | width | ||
) | const |
Definition at line 1146 of file TraCIAPI.cpp.
References libsumo::VAR_WIDTH.
|
inherited |
Definition at line 3835 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3847 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.