SUMO - Simulation of Urban MObility
TraCIAPI::PersonScope Class Reference

Scope for interaction with vehicles. More...

#include <TraCIAPI.h>

Inheritance diagram for TraCIAPI::PersonScope:
Inheritance graph
Collaboration diagram for TraCIAPI::PersonScope:
Collaboration graph

Public Member Functions

void add (const std::string &personID, const std::string &edgeID, double pos, double depart=DEPARTFLAG_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, double duration, const std::string &description="waiting", const std::string &stopID="")
 
void appendWalkingStage (const std::string &personID, const std::vector< std::string > &edges, double arrivalPos, double duration=-1, double 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
 
libsumo::TraCIPosition getPosition (const std::string &personID) const
 
int getRemainingStages (const std::string &personID) const
 
std::string getRoadID (const std::string &personID) const
 
double 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
 
double 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 rerouteTraveltime (const std::string &personID) const
 
void setColor (const std::string &personID, const libsumo::TraCIColor &c) const
 
void setHeight (const std::string &personID, double height) const
 
void setLength (const std::string &personID, double length) const
 
void setMinGap (const std::string &personID, double minGap) const
 
void setSpeed (const std::string &personID, double speed) const
 
void setType (const std::string &personID, const std::string &typeID) const
 
void setWidth (const std::string &personID, double width) const
 
virtual ~PersonScope ()
 

Protected Attributes

TraCIAPImyParent
 The parent TraCI client which offers the connection. More...
 

Private Member Functions

PersonScopeoperator= (const PersonScope &src)
 invalidated assignment operator More...
 
 PersonScope (const PersonScope &src)
 invalidated copy constructor More...
 

Detailed Description

Scope for interaction with vehicles.

Definition at line 748 of file TraCIAPI.h.

Constructor & Destructor Documentation

◆ PersonScope() [1/2]

TraCIAPI::PersonScope::PersonScope ( TraCIAPI parent)
inline

Definition at line 750 of file TraCIAPI.h.

◆ ~PersonScope()

virtual TraCIAPI::PersonScope::~PersonScope ( )
inlinevirtual

◆ PersonScope() [2/2]

TraCIAPI::PersonScope::PersonScope ( const PersonScope src)
private

invalidated copy constructor

Member Function Documentation

◆ add()

void TraCIAPI::PersonScope::add ( const std::string &  personID,
const std::string &  edgeID,
double  pos,
double  depart = DEPARTFLAG_NOW,
const std::string  typeID = "DEFAULT_PEDTYPE" 
)

◆ appendDrivingStage()

void TraCIAPI::PersonScope::appendDrivingStage ( const std::string &  personID,
const std::string &  toEdge,
const std::string &  lines,
const std::string &  stopID = "" 
)

◆ appendWaitingStage()

void TraCIAPI::PersonScope::appendWaitingStage ( const std::string &  personID,
double  duration,
const std::string &  description = "waiting",
const std::string &  stopID = "" 
)

◆ appendWalkingStage()

void TraCIAPI::PersonScope::appendWalkingStage ( const std::string &  personID,
const std::vector< std::string > &  edges,
double  arrivalPos,
double  duration = -1,
double  speed = -1,
const std::string &  stopID = "" 
)

◆ getEdges()

std::vector< std::string > TraCIAPI::PersonScope::getEdges ( const std::string &  personID,
int  nextStageIndex = 0 
) const

◆ getIDCount()

int TraCIAPI::PersonScope::getIDCount ( ) const

Definition at line 2739 of file TraCIAPI.cpp.

References CMD_GET_PERSON_VARIABLE, and ID_COUNT.

◆ getIDList()

std::vector< std::string > TraCIAPI::PersonScope::getIDList ( ) const

Definition at line 2734 of file TraCIAPI.cpp.

References CMD_GET_PERSON_VARIABLE, and ID_LIST.

Referenced by TraCITestClient::testAPI().

◆ getNextEdge()

std::string TraCIAPI::PersonScope::getNextEdge ( const std::string &  personID) const

Definition at line 2769 of file TraCIAPI.cpp.

References CMD_GET_PERSON_VARIABLE, and VAR_NEXT_EDGE.

Referenced by TraCITestClient::testAPI().

◆ getPosition()

TraCIPosition TraCIAPI::PersonScope::getPosition ( const std::string &  personID) const

Definition at line 2749 of file TraCIAPI.cpp.

References CMD_GET_PERSON_VARIABLE, and VAR_POSITION.

◆ getRemainingStages()

int TraCIAPI::PersonScope::getRemainingStages ( const std::string &  personID) const

Definition at line 2780 of file TraCIAPI.cpp.

References CMD_GET_PERSON_VARIABLE, and VAR_STAGES_REMAINING.

Referenced by TraCITestClient::testAPI().

◆ getRoadID()

std::string TraCIAPI::PersonScope::getRoadID ( const std::string &  personID) const

Definition at line 2754 of file TraCIAPI.cpp.

References CMD_GET_PERSON_VARIABLE, and VAR_ROAD_ID.

Referenced by TraCITestClient::testAPI().

◆ getSpeed()

double TraCIAPI::PersonScope::getSpeed ( const std::string &  personID) const

Definition at line 2744 of file TraCIAPI.cpp.

References CMD_GET_PERSON_VARIABLE, and VAR_SPEED.

Referenced by TraCITestClient::testAPI().

◆ getStage()

int TraCIAPI::PersonScope::getStage ( const std::string &  personID,
int  nextStageIndex = 0 
) const

◆ getTypeID()

std::string TraCIAPI::PersonScope::getTypeID ( const std::string &  personID) const

Definition at line 2759 of file TraCIAPI.cpp.

References CMD_GET_PERSON_VARIABLE, and VAR_TYPE.

Referenced by TraCITestClient::testAPI().

◆ getVehicle()

std::string TraCIAPI::PersonScope::getVehicle ( const std::string &  personID) const

Definition at line 2775 of file TraCIAPI.cpp.

References CMD_GET_PERSON_VARIABLE, and VAR_VEHICLE.

Referenced by TraCITestClient::testAPI().

◆ getWaitingTime()

double TraCIAPI::PersonScope::getWaitingTime ( const std::string &  personID) const

Definition at line 2764 of file TraCIAPI.cpp.

References CMD_GET_PERSON_VARIABLE, and VAR_WAITING_TIME.

Referenced by TraCITestClient::testAPI().

◆ operator=()

PersonScope& TraCIAPI::PersonScope::operator= ( const PersonScope src)
private

invalidated assignment operator

◆ removeStage()

void TraCIAPI::PersonScope::removeStage ( const std::string &  personID,
int  nextStageIndex 
) const

◆ removeStages()

void TraCIAPI::PersonScope::removeStages ( const std::string &  personID) const

Definition at line 2801 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

◆ rerouteTraveltime()

void TraCIAPI::PersonScope::rerouteTraveltime ( const std::string &  personID) const

◆ setColor()

void TraCIAPI::PersonScope::setColor ( const std::string &  personID,
const libsumo::TraCIColor c 
) const

◆ setHeight()

void TraCIAPI::PersonScope::setHeight ( const std::string &  personID,
double  height 
) const

◆ setLength()

void TraCIAPI::PersonScope::setLength ( const std::string &  personID,
double  length 
) const

◆ setMinGap()

void TraCIAPI::PersonScope::setMinGap ( const std::string &  personID,
double  minGap 
) const

◆ setSpeed()

void TraCIAPI::PersonScope::setSpeed ( const std::string &  personID,
double  speed 
) const

◆ setType()

void TraCIAPI::PersonScope::setType ( const std::string &  personID,
const std::string &  typeID 
) const

◆ setWidth()

void TraCIAPI::PersonScope::setWidth ( const std::string &  personID,
double  width 
) const

Field Documentation

◆ myParent

TraCIAPI& TraCIAPI::TraCIScopeWrapper::myParent
protectedinherited

The parent TraCI client which offers the connection.

Definition at line 129 of file TraCIAPI.h.


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