SUMO - Simulation of Urban MObility
TraCIServerAPI_Person Class Reference

APIs for getting/setting person values via TraCI. More...

#include <TraCIServerAPI_Person.h>

Collaboration diagram for TraCIServerAPI_Person:
Collaboration graph

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_Personoperator= (const TraCIServerAPI_Person &s)
 invalidated assignment operator More...
 
 TraCIServerAPI_Person (const TraCIServerAPI_Person &s)
 invalidated copy constructor More...
 

Detailed Description

APIs for getting/setting person values via TraCI.

Definition at line 50 of file TraCIServerAPI_Person.h.

Constructor & Destructor Documentation

◆ TraCIServerAPI_Person()

TraCIServerAPI_Person::TraCIServerAPI_Person ( const TraCIServerAPI_Person s)
private

invalidated copy constructor

Member Function Documentation

◆ getPosition()

bool TraCIServerAPI_Person::getPosition ( const std::string &  id,
Position p 
)
static

Returns the named persons's position.

Parameters
[in]idThe id of the searched person
[out]pThe position, if the person is on the network
Returns
Whether the person is known

Definition at line 435 of file TraCIServerAPI_Person.cpp.

References MSTransportableControl::get(), MSNet::getInstance(), MSNet::getPersonControl(), and MSTransportable::getPosition().

Referenced by TraCIServer::findObjectShape().

◆ operator=()

TraCIServerAPI_Person& TraCIServerAPI_Person::operator= ( const TraCIServerAPI_Person s)
private

invalidated assignment operator

◆ processGet()

bool TraCIServerAPI_Person::processGet ( TraCIServer server,
tcpip::Storage inputStorage,
tcpip::Storage outputStorage 
)
static

Processes a get value command (Command 0xae: Get Person Variable)

Parameters
[in]serverThe TraCI-server-instance which schedules this request
[in]inputStorageThe storage to read the command from
[out]outputStorageThe 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().

◆ processSet()

bool TraCIServerAPI_Person::processSet ( TraCIServer server,
tcpip::Storage inputStorage,
tcpip::Storage outputStorage 
)
static

Processes a set value command (Command 0xce: Change Person State)

Parameters
[in]serverThe TraCI-server-instance which schedules this request
[in]inputStorageThe storage to read the command from
[out]outputStorageThe 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().


The documentation for this class was generated from the following files: