![]() |
SUMO - Simulation of Urban MObility
|
APIs for getting/setting person values via TraCI. More...
#include <TraCIServerAPI_Person.h>
Static Public Member Functions | |
static bool | getPosition (const std::string &id, Position &p) |
Returns the named persons's position. More... | |
static bool | processGet (TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage) |
Processes a get value command (Command 0xae: Get Person Variable) More... | |
static bool | processSet (TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage) |
Processes a set value command (Command 0xce: Change Person State) More... | |
Private Member Functions | |
TraCIServerAPI_Person & | operator= (const TraCIServerAPI_Person &s) |
invalidated assignment operator More... | |
TraCIServerAPI_Person (const TraCIServerAPI_Person &s) | |
invalidated copy constructor More... | |
APIs for getting/setting person values via TraCI.
Definition at line 50 of file TraCIServerAPI_Person.h.
|
private |
invalidated copy constructor
|
static |
Returns the named persons's position.
[in] | id | The id of the searched person |
[out] | p | The position, if the person is on the network |
Definition at line 435 of file TraCIServerAPI_Person.cpp.
References MSTransportableControl::get(), MSNet::getInstance(), MSNet::getPersonControl(), and MSTransportable::getPosition().
Referenced by TraCIServer::findObjectShape().
|
private |
invalidated assignment operator
|
static |
Processes a get value command (Command 0xae: Get Person Variable)
[in] | server | The TraCI-server-instance which schedules this request |
[in] | inputStorage | The storage to read the command from |
[out] | outputStorage | The storage to write the result to |
Definition at line 49 of file TraCIServerAPI_Person.cpp.
References libsumo::TraCIColor::a, libsumo::TraCIColor::b, CMD_GET_PERSON_VARIABLE, libsumo::TraCIColor::g, libsumo::Person::getAngle(), libsumo::Person::getColor(), libsumo::Person::getEdges(), libsumo::Person::getIDCount(), libsumo::Person::getIDList(), libsumo::Person::getLanePosition(), libsumo::Person::getNextEdge(), libsumo::Person::getParameter(), libsumo::Person::getPosition(), libsumo::Person::getRemainingStages(), libsumo::Person::getRoadID(), libsumo::Person::getSpeed(), libsumo::Person::getStage(), libsumo::Person::getTypeID(), TraCIServerAPI_VehicleType::getVariable(), libsumo::Person::getVehicle(), libsumo::Person::getWaitingTime(), ID_COUNT, ID_LIST, POSITION_2D, POSITION_3D, libsumo::TraCIColor::r, tcpip::Storage::readString(), TraCIServer::readTypeCheckingInt(), TraCIServer::readTypeCheckingString(), tcpip::Storage::readUnsignedByte(), RESPONSE_GET_PERSON_VARIABLE, RTYPE_OK, toHex(), TYPE_COLOR, TYPE_DOUBLE, TYPE_INTEGER, TYPE_STRING, TYPE_STRINGLIST, VAR_ANGLE, VAR_COLOR, VAR_EDGES, VAR_LANEPOSITION, VAR_LENGTH, VAR_MINGAP, VAR_NEXT_EDGE, VAR_PARAMETER, VAR_POSITION, VAR_POSITION3D, VAR_ROAD_ID, VAR_SHAPECLASS, VAR_SPEED, VAR_STAGE, VAR_STAGES_REMAINING, VAR_TYPE, VAR_VEHICLE, VAR_WAITING_TIME, VAR_WIDTH, tcpip::Storage::writeDouble(), TraCIServer::writeErrorStatusCmd(), tcpip::Storage::writeInt(), TraCIServer::writeResponseWithLength(), TraCIServer::writeStatusCmd(), tcpip::Storage::writeString(), tcpip::Storage::writeStringList(), tcpip::Storage::writeUnsignedByte(), libsumo::TraCIPosition::x, libsumo::TraCIPosition::y, and libsumo::TraCIPosition::z.
Referenced by TraCIServer::TraCIServer().
|
static |
Processes a set value command (Command 0xce: Change Person State)
[in] | server | The TraCI-server-instance which schedules this request |
[in] | inputStorage | The storage to read the command from |
[out] | outputStorage | The storage to write the result to |
Definition at line 190 of file TraCIServerAPI_Person.cpp.
References libsumo::Person::add(), ADD, APPEND_STAGE, libsumo::Person::appendDrivingStage(), libsumo::Person::appendWaitingStage(), libsumo::Person::appendWalkingStage(), CMD_GET_PERSON_VARIABLE, CMD_REROUTE_TRAVELTIME, CMD_SET_PERSON_VARIABLE, CMD_SET_VEHICLE_VARIABLE, MSTransportable::DRIVING, MSTransportableControl::get(), MSNet::getInstance(), MSNet::getPersonControl(), libsumo::Person::getSingularVType(), MOVE_TO_XY, libsumo::Person::moveToXY(), MSTransportable::MOVING_WITHOUT_VEHICLE, tcpip::Storage::readInt(), tcpip::Storage::readString(), TraCIServer::readTypeCheckingByte(), TraCIServer::readTypeCheckingDouble(), TraCIServer::readTypeCheckingInt(), TraCIServer::readTypeCheckingString(), TraCIServer::readTypeCheckingStringList(), tcpip::Storage::readUnsignedByte(), REMOVE_STAGE, libsumo::Person::removeStage(), libsumo::Person::rerouteTraveltime(), RTYPE_OK, libsumo::Person::setParameter(), libsumo::Person::setSpeed(), libsumo::Person::setType(), TraCIServerAPI_VehicleType::setVariable(), STEPS2TIME, toHex(), TYPE_COMPOUND, VAR_COLOR, VAR_HEIGHT, VAR_LENGTH, VAR_MINGAP, VAR_PARAMETER, VAR_SPEED, VAR_TYPE, VAR_WIDTH, MSTransportable::WAITING, TraCIServer::writeErrorStatusCmd(), and TraCIServer::writeStatusCmd().
Referenced by TraCIServer::TraCIServer().