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

Scope for interaction with vehicles. More...

#include <TraCIAPI.h>

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

Public Member Functions

void add (const std::string &personID, const std::string &edgeID, double pos, double depart=libsumo::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 appendStage (const std::string &personID, const libsumo::TraCIStage &stage)
 
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="")
 
void clearSubscriptionResults ()
 
const libsumo::ContextSubscriptionResults getAllContextSubscriptionResults () const
 
const libsumo::SubscriptionResults getAllSubscriptionResults () const
 
double getAngle (const std::string &personID) const
 
libsumo::TraCIColor getColor (const std::string &personID) const
 
const libsumo::SubscriptionResults getContextSubscriptionResults (const std::string &objID) const
 
std::vector< std::string > getEdges (const std::string &personID, int nextStageIndex=0) const
 
int getIDCount () const
 
std::vector< std::string > getIDList () const
 
double getLanePosition (const std::string &personID) const
 
libsumo::SubscriptionResultsgetModifiableContextSubscriptionResults (const std::string &objID)
 
libsumo::SubscriptionResultsgetModifiableSubscriptionResults ()
 
std::string getNextEdge (const std::string &personID) const
 
std::string getParameter (const std::string &objectID, const std::string &key) const
 retrieve generic paramter More...
 
libsumo::TraCIPosition getPosition (const std::string &personID) const
 
libsumo::TraCIPosition getPosition3D (const std::string &personID) const
 
int getRemainingStages (const std::string &personID) const
 
std::string getRoadID (const std::string &personID) const
 
double getSlope (const std::string &personID) const
 
double getSpeed (const std::string &personID) const
 
libsumo::TraCIStage getStage (const std::string &personID, int nextStageIndex=0) const
 
const libsumo::TraCIResults getSubscriptionResults (const std::string &objID) 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 setParameter (const std::string &objectID, const std::string &key, const std::string &value) const
 set generic paramter More...
 
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
 
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 ~PersonScope ()
 
vehicle type value retrieval shortcuts
double getLength (const std::string &personID) const
 

Protected Attributes

int myCmdGetID
 
int myCmdSetID
 
int myContextSubscribeID
 
libsumo::ContextSubscriptionResults myContextSubscriptionResults
 
TraCIAPImyParent
 The parent TraCI client which offers the connection. More...
 
int mySubscribeID
 
libsumo::SubscriptionResults mySubscriptionResults
 

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 877 of file TraCIAPI.h.

Constructor & Destructor Documentation

◆ PersonScope() [1/2]

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

Definition at line 879 of file TraCIAPI.h.

◆ ~PersonScope()

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

Definition at line 880 of file TraCIAPI.h.

◆ 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 = libsumo::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 = "" 
)

◆ appendStage()

◆ 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 = "" 
)

◆ clearSubscriptionResults()

void TraCIAPI::TraCIScopeWrapper::clearSubscriptionResults ( )
inherited

Definition at line 3707 of file TraCIAPI.cpp.

◆ getAllContextSubscriptionResults()

const libsumo::ContextSubscriptionResults TraCIAPI::TraCIScopeWrapper::getAllContextSubscriptionResults ( ) const
inherited

Definition at line 3691 of file TraCIAPI.cpp.

◆ getAllSubscriptionResults()

const libsumo::SubscriptionResults TraCIAPI::TraCIScopeWrapper::getAllSubscriptionResults ( ) const
inherited

Definition at line 3675 of file TraCIAPI.cpp.

◆ getAngle()

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

Definition at line 3350 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::VAR_ANGLE.

Referenced by TraCITestClient::testAPI().

◆ getColor()

libsumo::TraCIColor TraCIAPI::PersonScope::getColor ( const std::string &  personID) const

Definition at line 3365 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::VAR_COLOR.

Referenced by TraCITestClient::testAPI().

◆ getContextSubscriptionResults()

const libsumo::SubscriptionResults TraCIAPI::TraCIScopeWrapper::getContextSubscriptionResults ( const std::string &  objID) const
inherited

Definition at line 3697 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

◆ 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 3330 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::ID_COUNT.

◆ getIDList()

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

Definition at line 3325 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::TRACI_ID_LIST.

Referenced by TraCITestClient::testAPI().

◆ getLanePosition()

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

Definition at line 3360 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::VAR_LANEPOSITION.

Referenced by TraCITestClient::testAPI().

◆ getLength()

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

Definition at line 3370 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::VAR_LENGTH.

Referenced by TraCITestClient::testAPI().

◆ getModifiableContextSubscriptionResults()

libsumo::SubscriptionResults & TraCIAPI::TraCIScopeWrapper::getModifiableContextSubscriptionResults ( const std::string &  objID)
inherited

Definition at line 3720 of file TraCIAPI.cpp.

◆ getModifiableSubscriptionResults()

libsumo::SubscriptionResults & TraCIAPI::TraCIScopeWrapper::getModifiableSubscriptionResults ( )
inherited

Definition at line 3714 of file TraCIAPI.cpp.

◆ getNextEdge()

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

Definition at line 3390 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::VAR_NEXT_EDGE.

Referenced by TraCITestClient::testAPI().

◆ getParameter()

std::string TraCIAPI::TraCIScopeWrapper::getParameter ( const std::string &  objectID,
const std::string &  key 
) const
inherited

retrieve generic paramter

Definition at line 3630 of file TraCIAPI.cpp.

References libsumo::TYPE_STRING, libsumo::VAR_PARAMETER, tcpip::Storage::writeByte(), and tcpip::Storage::writeString().

Referenced by TraCITestClient::testAPI().

◆ getPosition()

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

Definition at line 3340 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::VAR_POSITION.

Referenced by TraCITestClient::testAPI().

◆ getPosition3D()

libsumo::TraCIPosition TraCIAPI::PersonScope::getPosition3D ( const std::string &  personID) const

Definition at line 3345 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::VAR_POSITION3D.

Referenced by TraCITestClient::testAPI().

◆ getRemainingStages()

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

◆ getRoadID()

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

Definition at line 3375 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::VAR_ROAD_ID.

Referenced by TraCITestClient::testAPI().

◆ getSlope()

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

Definition at line 3355 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::VAR_SLOPE.

Referenced by TraCITestClient::testAPI().

◆ getSpeed()

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

Definition at line 3335 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::VAR_SPEED.

Referenced by TraCITestClient::testAPI().

◆ getStage()

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

◆ getSubscriptionResults()

const libsumo::TraCIResults TraCIAPI::TraCIScopeWrapper::getSubscriptionResults ( const std::string &  objID) const
inherited

Definition at line 3681 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

◆ getTypeID()

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

Definition at line 3380 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::VAR_TYPE.

Referenced by TraCITestClient::testAPI().

◆ getVehicle()

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

Definition at line 3396 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::VAR_VEHICLE.

Referenced by TraCITestClient::testAPI().

◆ getWaitingTime()

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

Definition at line 3385 of file TraCIAPI.cpp.

References libsumo::CMD_GET_PERSON_VARIABLE, and libsumo::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 3422 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

◆ setParameter()

void TraCIAPI::TraCIScopeWrapper::setParameter ( const std::string &  objectID,
const std::string &  key,
const std::string &  value 
) const
inherited

◆ 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

◆ subscribe()

void TraCIAPI::TraCIScopeWrapper::subscribe ( const std::string &  objID,
const std::vector< int > &  vars,
double  beginTime,
double  endTime 
) const
inherited

Definition at line 3653 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

◆ subscribeContext()

void TraCIAPI::TraCIScopeWrapper::subscribeContext ( const std::string &  objID,
int  domain,
double  range,
const std::vector< int > &  vars,
double  beginTime,
double  endTime 
) const
inherited

Definition at line 3665 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI().

Field Documentation

◆ myCmdGetID

int TraCIAPI::TraCIScopeWrapper::myCmdGetID
protectedinherited

Definition at line 145 of file TraCIAPI.h.

◆ myCmdSetID

int TraCIAPI::TraCIScopeWrapper::myCmdSetID
protectedinherited

Definition at line 146 of file TraCIAPI.h.

◆ myContextSubscribeID

int TraCIAPI::TraCIScopeWrapper::myContextSubscribeID
protectedinherited

Definition at line 148 of file TraCIAPI.h.

◆ myContextSubscriptionResults

libsumo::ContextSubscriptionResults TraCIAPI::TraCIScopeWrapper::myContextSubscriptionResults
protectedinherited

Definition at line 150 of file TraCIAPI.h.

◆ myParent

TraCIAPI& TraCIAPI::TraCIScopeWrapper::myParent
protectedinherited

The parent TraCI client which offers the connection.

Definition at line 144 of file TraCIAPI.h.

Referenced by TraCIAPI::EdgeScope::getIDList().

◆ mySubscribeID

int TraCIAPI::TraCIScopeWrapper::mySubscribeID
protectedinherited

Definition at line 147 of file TraCIAPI.h.

◆ mySubscriptionResults

libsumo::SubscriptionResults TraCIAPI::TraCIScopeWrapper::mySubscriptionResults
protectedinherited

Definition at line 149 of file TraCIAPI.h.


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