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


Public Member Functions | |
| void | add (const std::string &personID, const std::string &edgeID, SUMOReal pos, SUMOReal depart=DEPART_NOW, const std::string typeID="DEFAULT_PEDTYPE") |
| void | appendDrivingStage (const std::string &personID, const std::string &toEdge, const std::string &lines, const std::string &stopID="") |
| void | appendWaitingStage (const std::string &personID, SUMOReal duration, const std::string &description="waiting", const std::string &stopID="") |
| void | appendWalkingStage (const std::string &personID, const std::vector< std::string > &edges, SUMOReal arrivalPos, SUMOReal duration=-1, SUMOReal speed=-1, const std::string &stopID="") |
| std::vector< std::string > | getEdges (const std::string &personID, int nextStageIndex=0) const |
| int | getIDCount () const |
| std::vector< std::string > | getIDList () const |
| std::string | getNextEdge (const std::string &personID) const |
| TraCIPosition | getPosition (const std::string &personID) const |
| int | getRemainingStages (const std::string &personID) const |
| std::string | getRoadID (const std::string &personID) const |
| SUMOReal | getSpeed (const std::string &personID) const |
| int | getStage (const std::string &personID, int nextStageIndex=0) const |
| std::string | getTypeID (const std::string &personID) const |
| std::string | getVehicle (const std::string &personID) const |
| SUMOReal | getWaitingTime (const std::string &personID) const |
| PersonScope (TraCIAPI &parent) | |
| void | removeStage (const std::string &personID, int nextStageIndex) const |
| void | removeStages (const std::string &personID) const |
| void | setColor (const std::string &personID, const TraCIColor &c) const |
| void | setHeight (const std::string &personID, SUMOReal height) const |
| void | setLength (const std::string &personID, SUMOReal length) const |
| void | setMinGap (const std::string &personID, SUMOReal minGap) const |
| void | setSpeed (const std::string &personID, SUMOReal speed) const |
| void | setType (const std::string &personID, const std::string &typeID) const |
| void | setWidth (const std::string &personID, SUMOReal width) const |
| virtual | ~PersonScope () |
Protected Attributes | |
| TraCIAPI & | myParent |
| The parent TraCI client which offers the connection. More... | |
Private Member Functions | |
| PersonScope & | operator= (const PersonScope &src) |
| invalidated assignment operator More... | |
| PersonScope (const PersonScope &src) | |
| invalidated copy constructor More... | |
|
inline |
Definition at line 819 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 820 of file TraCIAPI.h.
References TraCIAPI::getPosition(), and SUMOReal.
|
private |
invalidated copy constructor
| void TraCIAPI::PersonScope::add | ( | const std::string & | personID, |
| const std::string & | edgeID, | ||
| SUMOReal | pos, | ||
| SUMOReal | depart = DEPART_NOW, |
||
| const std::string | typeID = "DEFAULT_PEDTYPE" |
||
| ) |
Definition at line 2319 of file TraCIAPI.cpp.
References ADD, CMD_SET_PERSON_VARIABLE, TYPE_COMPOUND, TYPE_DOUBLE, TYPE_INTEGER, TYPE_STRING, tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
| void TraCIAPI::PersonScope::appendDrivingStage | ( | const std::string & | personID, |
| const std::string & | toEdge, | ||
| const std::string & | lines, | ||
| const std::string & | stopID = "" |
||
| ) |
Definition at line 2384 of file TraCIAPI.cpp.
References APPEND_STAGE, CMD_SET_PERSON_VARIABLE, STAGE_DRIVING, TYPE_COMPOUND, TYPE_INTEGER, TYPE_STRING, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
| void TraCIAPI::PersonScope::appendWaitingStage | ( | const std::string & | personID, |
| SUMOReal | duration, | ||
| const std::string & | description = "waiting", |
||
| const std::string & | stopID = "" |
||
| ) |
Definition at line 2340 of file TraCIAPI.cpp.
References APPEND_STAGE, CMD_SET_PERSON_VARIABLE, STAGE_WAITING, TYPE_COMPOUND, TYPE_INTEGER, TYPE_STRING, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
| void TraCIAPI::PersonScope::appendWalkingStage | ( | const std::string & | personID, |
| const std::vector< std::string > & | edges, | ||
| SUMOReal | arrivalPos, | ||
| SUMOReal | duration = -1, |
||
| SUMOReal | speed = -1, |
||
| const std::string & | stopID = "" |
||
| ) |
Definition at line 2359 of file TraCIAPI.cpp.
References APPEND_STAGE, CMD_SET_PERSON_VARIABLE, STAGE_WALKING, TYPE_COMPOUND, TYPE_DOUBLE, TYPE_INTEGER, TYPE_STRING, TYPE_STRINGLIST, tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), tcpip::Storage::writeString(), tcpip::Storage::writeStringList(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
| std::vector< std::string > TraCIAPI::PersonScope::getEdges | ( | const std::string & | personID, |
| int | nextStageIndex = 0 |
||
| ) | const |
Definition at line 2302 of file TraCIAPI.cpp.
References CMD_GET_PERSON_VARIABLE, TYPE_INTEGER, VAR_EDGES, tcpip::Storage::writeByte(), and tcpip::Storage::writeInt().
Referenced by TraCITestClient::testAPI().
| int TraCIAPI::PersonScope::getIDCount | ( | ) | const |
Definition at line 2248 of file TraCIAPI.cpp.
References CMD_GET_PERSON_VARIABLE, ID_COUNT, and SUMOReal.
| std::vector< std::string > TraCIAPI::PersonScope::getIDList | ( | ) | const |
Definition at line 2243 of file TraCIAPI.cpp.
References CMD_GET_PERSON_VARIABLE, and ID_LIST.
Referenced by TraCITestClient::testAPI().
| std::string TraCIAPI::PersonScope::getNextEdge | ( | const std::string & | personID | ) | const |
Definition at line 2278 of file TraCIAPI.cpp.
References CMD_GET_PERSON_VARIABLE, and VAR_NEXT_EDGE.
Referenced by TraCITestClient::testAPI().
| TraCIAPI::TraCIPosition TraCIAPI::PersonScope::getPosition | ( | const std::string & | personID | ) | const |
Definition at line 2258 of file TraCIAPI.cpp.
References CMD_GET_PERSON_VARIABLE, and VAR_POSITION.
| int TraCIAPI::PersonScope::getRemainingStages | ( | const std::string & | personID | ) | const |
Definition at line 2289 of file TraCIAPI.cpp.
References CMD_GET_PERSON_VARIABLE, and VAR_STAGES_REMAINING.
Referenced by TraCITestClient::testAPI().
| std::string TraCIAPI::PersonScope::getRoadID | ( | const std::string & | personID | ) | const |
Definition at line 2263 of file TraCIAPI.cpp.
References CMD_GET_PERSON_VARIABLE, and VAR_ROAD_ID.
Referenced by TraCITestClient::testAPI().
| SUMOReal TraCIAPI::PersonScope::getSpeed | ( | const std::string & | personID | ) | const |
Definition at line 2253 of file TraCIAPI.cpp.
References CMD_GET_PERSON_VARIABLE, and VAR_SPEED.
Referenced by TraCITestClient::testAPI().
| int TraCIAPI::PersonScope::getStage | ( | const std::string & | personID, |
| int | nextStageIndex = 0 |
||
| ) | const |
Definition at line 2294 of file TraCIAPI.cpp.
References CMD_GET_PERSON_VARIABLE, TYPE_INTEGER, VAR_STAGE, tcpip::Storage::writeByte(), and tcpip::Storage::writeInt().
Referenced by TraCITestClient::testAPI().
| std::string TraCIAPI::PersonScope::getTypeID | ( | const std::string & | personID | ) | const |
Definition at line 2268 of file TraCIAPI.cpp.
References CMD_GET_PERSON_VARIABLE, SUMOReal, and VAR_TYPE.
Referenced by TraCITestClient::testAPI().
| std::string TraCIAPI::PersonScope::getVehicle | ( | const std::string & | personID | ) | const |
Definition at line 2284 of file TraCIAPI.cpp.
References CMD_GET_PERSON_VARIABLE, and VAR_VEHICLE.
Referenced by TraCITestClient::testAPI().
| SUMOReal TraCIAPI::PersonScope::getWaitingTime | ( | const std::string & | personID | ) | const |
Definition at line 2273 of file TraCIAPI.cpp.
References CMD_GET_PERSON_VARIABLE, and VAR_WAITING_TIME.
Referenced by TraCITestClient::testAPI().
|
private |
invalidated assignment operator
| void TraCIAPI::PersonScope::removeStage | ( | const std::string & | personID, |
| int | nextStageIndex | ||
| ) | const |
Definition at line 2402 of file TraCIAPI.cpp.
References CMD_SET_PERSON_VARIABLE, REMOVE_STAGE, TYPE_INTEGER, tcpip::Storage::writeByte(), and tcpip::Storage::writeInt().
Referenced by TraCITestClient::testAPI().
| void TraCIAPI::PersonScope::removeStages | ( | const std::string & | personID | ) | const |
Definition at line 2310 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI().
| void TraCIAPI::PersonScope::setColor | ( | const std::string & | personID, |
| const TraCIColor & | c | ||
| ) | const |
Definition at line 2476 of file TraCIAPI.cpp.
References TraCIAPI::TraCIColor::a, TraCIAPI::TraCIColor::b, CMD_SET_PERSON_VARIABLE, TraCIAPI::TraCIColor::g, TraCIAPI::TraCIColor::r, TYPE_COLOR, VAR_COLOR, and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
| void TraCIAPI::PersonScope::setHeight | ( | const std::string & | personID, |
| SUMOReal | height | ||
| ) | const |
Definition at line 2455 of file TraCIAPI.cpp.
References CMD_SET_PERSON_VARIABLE, TYPE_DOUBLE, VAR_HEIGHT, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
| void TraCIAPI::PersonScope::setLength | ( | const std::string & | personID, |
| SUMOReal | length | ||
| ) | const |
Definition at line 2434 of file TraCIAPI.cpp.
References CMD_SET_PERSON_VARIABLE, TYPE_DOUBLE, VAR_LENGTH, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
| void TraCIAPI::PersonScope::setMinGap | ( | const std::string & | personID, |
| SUMOReal | minGap | ||
| ) | const |
Definition at line 2465 of file TraCIAPI.cpp.
References CMD_SET_PERSON_VARIABLE, TYPE_DOUBLE, VAR_MINGAP, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
| void TraCIAPI::PersonScope::setSpeed | ( | const std::string & | personID, |
| SUMOReal | speed | ||
| ) | const |
Definition at line 2413 of file TraCIAPI.cpp.
References CMD_SET_PERSON_VARIABLE, TYPE_DOUBLE, VAR_SPEED, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
| void TraCIAPI::PersonScope::setType | ( | const std::string & | personID, |
| const std::string & | typeID | ||
| ) | const |
Definition at line 2424 of file TraCIAPI.cpp.
References CMD_SET_PERSON_VARIABLE, TYPE_STRING, VAR_TYPE, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
| void TraCIAPI::PersonScope::setWidth | ( | const std::string & | personID, |
| SUMOReal | width | ||
| ) | const |
Definition at line 2445 of file TraCIAPI.cpp.
References CMD_SET_PERSON_VARIABLE, TYPE_DOUBLE, VAR_WIDTH, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
|
protectedinherited |
The parent TraCI client which offers the connection.
Definition at line 208 of file TraCIAPI.h.