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

Scope for interaction with vehicles. More...

#include <TraCIAPI.h>

Inheritance diagram for TraCIAPI::VehicleScope:
Inheritance graph
Collaboration diagram for TraCIAPI::VehicleScope:
Collaboration graph

Public Types

enum  VehicleSignal {
  SIGNAL_BLINKER_RIGHT = 1, SIGNAL_BLINKER_LEFT = 2, SIGNAL_BLINKER_EMERGENCY = 4, SIGNAL_BRAKELIGHT = 8,
  SIGNAL_FRONTLIGHT = 16, SIGNAL_FOGLIGHT = 32, SIGNAL_HIGHBEAM = 64, SIGNAL_BACKDRIVE = 128,
  SIGNAL_WIPER = 256, SIGNAL_DOOR_OPEN_LEFT = 512, SIGNAL_DOOR_OPEN_RIGHT = 1024, SIGNAL_EMERGENCY_BLUE = 2048,
  SIGNAL_EMERGENCY_RED = 4096, SIGNAL_EMERGENCY_YELLOW = 8192, SIGNAL_RESET = -1
}
 

Public Member Functions

void clearSubscriptionResults ()
 
const libsumo::ContextSubscriptionResults getAllContextSubscriptionResults () const
 
const libsumo::SubscriptionResults getAllSubscriptionResults () const
 
const libsumo::SubscriptionResults getContextSubscriptionResults (const std::string &objID) const
 
libsumo::SubscriptionResultsgetModifiableContextSubscriptionResults (const std::string &objID)
 
libsumo::SubscriptionResultsgetModifiableSubscriptionResults ()
 
std::string getParameter (const std::string &objectID, const std::string &key) const
 retrieve generic paramter More...
 
const libsumo::TraCIResults getSubscriptionResults (const std::string &objID) const
 
void setParameter (const std::string &objectID, const std::string &key, const std::string &value) const
 set generic paramter More...
 
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
 
 VehicleScope (TraCIAPI &parent)
 
virtual ~VehicleScope ()
 
vehicle value retrieval
std::vector< std::string > getIDList () const
 
int getIDCount () const
 
double getSpeed (const std::string &vehicleID) const
 
double getAcceleration (const std::string &vehicleID) const
 
libsumo::TraCIPosition getPosition (const std::string &vehicleID) const
 
libsumo::TraCIPosition getPosition3D (const std::string &vehicleID) const
 
double getAngle (const std::string &vehicleID) const
 
std::string getRoadID (const std::string &vehicleID) const
 
std::string getLaneID (const std::string &vehicleID) const
 
int getLaneIndex (const std::string &vehicleID) const
 
std::string getTypeID (const std::string &vehicleID) const
 
std::string getRouteID (const std::string &vehicleID) const
 
int getRouteIndex (const std::string &vehicleID) const
 
std::vector< std::string > getRoute (const std::string &vehicleID) const
 
libsumo::TraCIColor getColor (const std::string &vehicleID) const
 
double getLanePosition (const std::string &vehicleID) const
 
double getDistance (const std::string &vehicleID) const
 
int getSignals (const std::string &vehicleID) const
 
double getCO2Emission (const std::string &vehicleID) const
 
double getCOEmission (const std::string &vehicleID) const
 
double getHCEmission (const std::string &vehicleID) const
 
double getPMxEmission (const std::string &vehicleID) const
 
double getNOxEmission (const std::string &vehicleID) const
 
double getFuelConsumption (const std::string &vehicleID) const
 
double getNoiseEmission (const std::string &vehicleID) const
 
double getElectricityConsumption (const std::string &vehicleID) const
 
int getSpeedMode (const std::string &vehicleID) const
 
int getStopState (const std::string &vehicleID) const
 
double getWaitingTime (const std::string &vehicleID) const
 
double getAccumulatedWaitingTime (const std::string &vehicleID) const
 
double getSlope (const std::string &vehicleID) const
 
double getAllowedSpeed (const std::string &vehicleID) const
 
int getPersonNumber (const std::string &vehicleID) const
 
std::vector< std::string > getPersonIDList (const std::string &vehicleID) const
 
double getSpeedWithoutTraCI (const std::string &vehicleID) const
 
bool isRouteValid (const std::string &vehicleID) const
 
double getLateralLanePosition (const std::string &vehicleID) const
 
double getSpeedFactor (const std::string &vehicleID) const
 
std::string getLine (const std::string &vehicleID) const
 
std::vector< std::string > getVia (const std::string &vehicleID) const
 
std::vector< libsumo::TraCINextTLSDatagetNextTLS (const std::string &vehID) const
 
std::vector< libsumo::TraCIBestLanesDatagetBestLanes (const std::string &vehicleID) const
 
std::pair< std::string, double > getLeader (const std::string &vehicleID, double dist) const
 
int getRoutingMode (const std::string &vehicleID) const
 
std::pair< int, int > getLaneChangeState (const std::string &vehicleID, int direction) const
 
vehicle type value retrieval shortcuts
double getLength (const std::string &vehicleID) const
 
double getMaxSpeed (const std::string &vehicleID) const
 
double getAccel (const std::string &vehicleID) const
 
double getDecel (const std::string &vehicleID) const
 
double getEmergencyDecel (const std::string &vehicleID) const
 
double getApparentDecel (const std::string &vehicleID) const
 
double getTau (const std::string &vehicleID) const
 
double getImperfection (const std::string &vehicleID) const
 
double getSpeedDeviation (const std::string &vehicleID) const
 
double getMinGap (const std::string &vehicleID) const
 
double getWidth (const std::string &vehicleID) const
 
double getHeight (const std::string &veihcleID) const
 
double getMaxSpeedLat (const std::string &vehicleID) const
 
double getMinGapLat (const std::string &vehicleID) const
 
std::string getVehicleClass (const std::string &vehicleID) const
 
std::string getEmissionClass (const std::string &vehicleID) const
 
std::string getShapeClass (const std::string &vehicleID) const
 
std::string getLateralAlignment (const std::string &vehicleID) const
 
vehicle state changing
void add (const std::string &vehicleID, const std::string &routeID, const std::string &typeID="DEFAULT_VEHTYPE", std::string depart="-1", const std::string &departLane="first", const std::string &departPos="base", const std::string &departSpeed="0", const std::string &arrivalLane="current", const std::string &arrivalPos="max", const std::string &arrivalSpeed="current", const std::string &fromTaz="", const std::string &toTaz="", const std::string &line="", int personCapacity=0, int personNumber=0) const
 
void changeTarget (const std::string &vehicleID, const std::string &edgeID) const
 
void changeLane (const std::string &vehicleID, int laneIndex, double duration) const
 
void changeLaneRelative (const std::string &vehicleID, int laneChange, double duration) const
 
void changeSublane (const std::string &vehicleID, double latDist) const
 
void setRouteID (const std::string &vehicleID, const std::string &routeID) const
 
void setRoute (const std::string &vehicleID, const std::vector< std::string > &edge) const
 
void rerouteTraveltime (const std::string &vehicleID, bool currentTravelTimes=true) const
 
void moveTo (const std::string &vehicleID, const std::string &laneID, double position) const
 
void moveToXY (const std::string &vehicleID, const std::string &edgeID, const int lane, const double x, const double y, const double angle, const int keepRoute) const
 
void slowDown (const std::string &vehicleID, double speed, double duration) const
 
void openGap (const std::string &vehicleID, double newTau, double duration, double changeRate, double maxDecel) const
 
void setSpeed (const std::string &vehicleID, double speed) const
 
void setSpeedMode (const std::string &vehicleID, int mode) const
 
void setStop (const std::string vehicleID, const std::string edgeID, const double endPos=1., const int laneIndex=0, const double duration=std::numeric_limits< double >::max(), const int flags=0, const double startPos=std::numeric_limits< int >::min(), const double until=-1) const
 
void setType (const std::string &vehicleID, const std::string &typeID) const
 
void remove (const std::string &vehicleID, char reason=REMOVE_VAPORIZED) const
 
void setColor (const std::string &vehicleID, const libsumo::TraCIColor &c) const
 
void setLine (const std::string &vehicleID, const std::string &line) const
 
void setVia (const std::string &vehicleID, const std::vector< std::string > &via) const
 
void setSignals (const std::string &vehicleID, int signals) const
 
void setRoutingMode (const std::string &vehicleID, int routingMode) const
 
vehicle type attribute changing shortcuts
void setShapeClass (const std::string &vehicleID, const std::string &clazz) const
 
void setEmissionClass (const std::string &vehicleID, const std::string &clazz) const
 
void setSpeedFactor (const std::string &vehicleID, double factor) const
 
void setMaxSpeed (const std::string &vehicleID, double speed) 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

VehicleScopeoperator= (const VehicleScope &src)
 invalidated assignment operator More...
 
 VehicleScope (const VehicleScope &src)
 invalidated copy constructor More...
 

Detailed Description

Scope for interaction with vehicles.

Definition at line 640 of file TraCIAPI.h.

Member Enumeration Documentation

◆ VehicleSignal

Enumerator
SIGNAL_BLINKER_RIGHT 
SIGNAL_BLINKER_LEFT 
SIGNAL_BLINKER_EMERGENCY 
SIGNAL_BRAKELIGHT 
SIGNAL_FRONTLIGHT 
SIGNAL_FOGLIGHT 
SIGNAL_HIGHBEAM 
SIGNAL_BACKDRIVE 
SIGNAL_WIPER 
SIGNAL_DOOR_OPEN_LEFT 
SIGNAL_DOOR_OPEN_RIGHT 
SIGNAL_EMERGENCY_BLUE 
SIGNAL_EMERGENCY_RED 
SIGNAL_EMERGENCY_YELLOW 
SIGNAL_RESET 

Definition at line 645 of file TraCIAPI.h.

Constructor & Destructor Documentation

◆ VehicleScope() [1/2]

TraCIAPI::VehicleScope::VehicleScope ( TraCIAPI parent)
inline

Definition at line 642 of file TraCIAPI.h.

◆ ~VehicleScope()

virtual TraCIAPI::VehicleScope::~VehicleScope ( )
inlinevirtual

Definition at line 643 of file TraCIAPI.h.

◆ VehicleScope() [2/2]

TraCIAPI::VehicleScope::VehicleScope ( const VehicleScope src)
private

invalidated copy constructor

Member Function Documentation

◆ add()

void TraCIAPI::VehicleScope::add ( const std::string &  vehicleID,
const std::string &  routeID,
const std::string &  typeID = "DEFAULT_VEHTYPE",
std::string  depart = "-1",
const std::string &  departLane = "first",
const std::string &  departPos = "base",
const std::string &  departSpeed = "0",
const std::string &  arrivalLane = "current",
const std::string &  arrivalPos = "max",
const std::string &  arrivalSpeed = "current",
const std::string &  fromTaz = "",
const std::string &  toTaz = "",
const std::string &  line = "",
int  personCapacity = 0,
int  personNumber = 0 
) const

◆ changeLane()

void TraCIAPI::VehicleScope::changeLane ( const std::string &  vehicleID,
int  laneIndex,
double  duration 
) const

◆ changeLaneRelative()

void TraCIAPI::VehicleScope::changeLaneRelative ( const std::string &  vehicleID,
int  laneChange,
double  duration 
) const

◆ changeSublane()

void TraCIAPI::VehicleScope::changeSublane ( const std::string &  vehicleID,
double  latDist 
) const

◆ changeTarget()

void TraCIAPI::VehicleScope::changeTarget ( const std::string &  vehicleID,
const std::string &  edgeID 
) const

◆ clearSubscriptionResults()

void TraCIAPI::TraCIScopeWrapper::clearSubscriptionResults ( )
inherited

Definition at line 3313 of file TraCIAPI.cpp.

Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().

◆ getAccel()

double TraCIAPI::VehicleScope::getAccel ( const std::string &  vehicleID) const

Definition at line 2468 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_ACCEL.

◆ getAcceleration()

double TraCIAPI::VehicleScope::getAcceleration ( const std::string &  vehicleID) const

Definition at line 2193 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_ACCELERATION.

Referenced by TraCITestClient::testAPI().

◆ getAccumulatedWaitingTime()

double TraCIAPI::VehicleScope::getAccumulatedWaitingTime ( const std::string &  vehicleID) const

Definition at line 2523 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_ACCUMULATED_WAITING_TIME.

Referenced by TraCITestClient::testAPI().

◆ getAllContextSubscriptionResults()

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

Definition at line 3297 of file TraCIAPI.cpp.

Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().

◆ getAllowedSpeed()

double TraCIAPI::VehicleScope::getAllowedSpeed ( const std::string &  vehicleID) const

Definition at line 2528 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_ALLOWED_SPEED.

◆ getAllSubscriptionResults()

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

Definition at line 3281 of file TraCIAPI.cpp.

Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().

◆ getAngle()

double TraCIAPI::VehicleScope::getAngle ( const std::string &  vehicleID) const

Definition at line 2213 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_ANGLE.

◆ getApparentDecel()

double TraCIAPI::VehicleScope::getApparentDecel ( const std::string &  vehicleID) const

◆ getBestLanes()

◆ getCO2Emission()

double TraCIAPI::VehicleScope::getCO2Emission ( const std::string &  vehicleID) const

Definition at line 2279 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_CO2EMISSION.

◆ getCOEmission()

double TraCIAPI::VehicleScope::getCOEmission ( const std::string &  vehicleID) const

Definition at line 2284 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_COEMISSION.

◆ getColor()

libsumo::TraCIColor TraCIAPI::VehicleScope::getColor ( const std::string &  vehicleID) const

Definition at line 2254 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_COLOR.

Referenced by TraCITestClient::testAPI().

◆ getContextSubscriptionResults()

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

◆ getDecel()

double TraCIAPI::VehicleScope::getDecel ( const std::string &  vehicleID) const

Definition at line 2473 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_DECEL.

◆ getDistance()

double TraCIAPI::VehicleScope::getDistance ( const std::string &  vehicleID) const

Definition at line 2264 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_DISTANCE.

◆ getElectricityConsumption()

double TraCIAPI::VehicleScope::getElectricityConsumption ( const std::string &  vehicleID) const

Definition at line 2314 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_ELECTRICITYCONSUMPTION.

◆ getEmergencyDecel()

double TraCIAPI::VehicleScope::getEmergencyDecel ( const std::string &  vehicleID) const

◆ getEmissionClass()

std::string TraCIAPI::VehicleScope::getEmissionClass ( const std::string &  vehicleID) const

Definition at line 2346 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_EMISSIONCLASS.

◆ getFuelConsumption()

double TraCIAPI::VehicleScope::getFuelConsumption ( const std::string &  vehicleID) const

Definition at line 2304 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_FUELCONSUMPTION.

◆ getHCEmission()

double TraCIAPI::VehicleScope::getHCEmission ( const std::string &  vehicleID) const

Definition at line 2289 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_HCEMISSION.

◆ getHeight()

double TraCIAPI::VehicleScope::getHeight ( const std::string &  veihcleID) const

Definition at line 2518 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_HEIGHT.

◆ getIDCount()

int TraCIAPI::VehicleScope::getIDCount ( ) const

Definition at line 2183 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and ID_COUNT.

Referenced by TraCITestClient::testAPI().

◆ getIDList()

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

Definition at line 2178 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and TRACI_ID_LIST.

Referenced by TraCITestClient::testAPI().

◆ getImperfection()

double TraCIAPI::VehicleScope::getImperfection ( const std::string &  vehicleID) const

Definition at line 2483 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_IMPERFECTION.

◆ getLaneChangeState()

std::pair< int, int > TraCIAPI::VehicleScope::getLaneChangeState ( const std::string &  vehicleID,
int  direction 
) const

◆ getLaneID()

std::string TraCIAPI::VehicleScope::getLaneID ( const std::string &  vehicleID) const

Definition at line 2223 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_LANE_ID.

Referenced by TraCITestClient::testAPI().

◆ getLaneIndex()

int TraCIAPI::VehicleScope::getLaneIndex ( const std::string &  vehicleID) const

Definition at line 2228 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_LANE_INDEX.

◆ getLanePosition()

double TraCIAPI::VehicleScope::getLanePosition ( const std::string &  vehicleID) const

Definition at line 2259 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_LANEPOSITION.

Referenced by TraCITestClient::testAPI().

◆ getLateralAlignment()

std::string TraCIAPI::VehicleScope::getLateralAlignment ( const std::string &  vehicleID) const

Definition at line 2563 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_LATALIGNMENT.

◆ getLateralLanePosition()

double TraCIAPI::VehicleScope::getLateralLanePosition ( const std::string &  vehicleID) const

Definition at line 2274 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_LANEPOSITION_LAT.

Referenced by TraCITestClient::testAPI().

◆ getLeader()

std::pair< std::string, double > TraCIAPI::VehicleScope::getLeader ( const std::string &  vehicleID,
double  dist 
) const

◆ getLength()

double TraCIAPI::VehicleScope::getLength ( const std::string &  vehicleID) const

Definition at line 2513 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_LENGTH.

◆ getLine()

std::string TraCIAPI::VehicleScope::getLine ( const std::string &  vehicleID) const

Definition at line 2336 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_LINE.

Referenced by TraCITestClient::testAPI().

◆ getMaxSpeed()

double TraCIAPI::VehicleScope::getMaxSpeed ( const std::string &  vehicleID) const

Definition at line 2198 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_MAXSPEED.

Referenced by TraCITestClient::testAPI().

◆ getMaxSpeedLat()

double TraCIAPI::VehicleScope::getMaxSpeedLat ( const std::string &  vehicleID) const

Definition at line 2553 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_MAXSPEED_LAT.

◆ getMinGap()

double TraCIAPI::VehicleScope::getMinGap ( const std::string &  vehicleID) const

Definition at line 2503 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_MINGAP.

◆ getMinGapLat()

double TraCIAPI::VehicleScope::getMinGapLat ( const std::string &  vehicleID) const

Definition at line 2558 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_MINGAP_LAT.

◆ getModifiableContextSubscriptionResults()

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

Definition at line 3326 of file TraCIAPI.cpp.

Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().

◆ getModifiableSubscriptionResults()

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

Definition at line 3320 of file TraCIAPI.cpp.

Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().

◆ getNextTLS()

◆ getNoiseEmission()

double TraCIAPI::VehicleScope::getNoiseEmission ( const std::string &  vehicleID) const

Definition at line 2309 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_NOISEEMISSION.

◆ getNOxEmission()

double TraCIAPI::VehicleScope::getNOxEmission ( const std::string &  vehicleID) const

Definition at line 2299 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_NOXEMISSION.

◆ getParameter()

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

◆ getPersonIDList()

std::vector< std::string > TraCIAPI::VehicleScope::getPersonIDList ( const std::string &  vehicleID) const

Definition at line 2538 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and LAST_STEP_PERSON_ID_LIST.

◆ getPersonNumber()

int TraCIAPI::VehicleScope::getPersonNumber ( const std::string &  vehicleID) const

Definition at line 2533 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_PERSON_NUMBER.

◆ getPMxEmission()

double TraCIAPI::VehicleScope::getPMxEmission ( const std::string &  vehicleID) const

Definition at line 2294 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_PMXEMISSION.

◆ getPosition()

libsumo::TraCIPosition TraCIAPI::VehicleScope::getPosition ( const std::string &  vehicleID) const

Definition at line 2203 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_POSITION.

◆ getPosition3D()

libsumo::TraCIPosition TraCIAPI::VehicleScope::getPosition3D ( const std::string &  vehicleID) const

Definition at line 2208 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_POSITION3D.

◆ getRoadID()

std::string TraCIAPI::VehicleScope::getRoadID ( const std::string &  vehicleID) const

Definition at line 2218 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_ROAD_ID.

Referenced by TraCITestClient::testAPI().

◆ getRoute()

std::vector< std::string > TraCIAPI::VehicleScope::getRoute ( const std::string &  vehicleID) const

Definition at line 2249 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_EDGES.

Referenced by TraCITestClient::testAPI().

◆ getRouteID()

std::string TraCIAPI::VehicleScope::getRouteID ( const std::string &  vehicleID) const

Definition at line 2238 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_ROUTE_ID.

Referenced by TraCITestClient::testAPI().

◆ getRouteIndex()

int TraCIAPI::VehicleScope::getRouteIndex ( const std::string &  vehicleID) const

Definition at line 2243 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_ROUTE_INDEX.

◆ getRoutingMode()

int TraCIAPI::VehicleScope::getRoutingMode ( const std::string &  vehicleID) const

Definition at line 2463 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_ROUTING_MODE.

Referenced by TraCITestClient::testAPI().

◆ getShapeClass()

std::string TraCIAPI::VehicleScope::getShapeClass ( const std::string &  vehicleID) const

Definition at line 2351 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_SHAPECLASS.

Referenced by TraCITestClient::testAPI().

◆ getSignals()

int TraCIAPI::VehicleScope::getSignals ( const std::string &  vehicleID) const

Definition at line 2269 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_SIGNALS.

Referenced by TraCITestClient::testAPI().

◆ getSlope()

double TraCIAPI::VehicleScope::getSlope ( const std::string &  vehicleID) const

Definition at line 2330 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_SLOPE.

Referenced by TraCITestClient::testAPI().

◆ getSpeed()

double TraCIAPI::VehicleScope::getSpeed ( const std::string &  vehicleID) const

Definition at line 2188 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_SPEED.

Referenced by TraCITestClient::testAPI().

◆ getSpeedDeviation()

double TraCIAPI::VehicleScope::getSpeedDeviation ( const std::string &  vehicleID) const

Definition at line 2493 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_SPEED_DEVIATION.

◆ getSpeedFactor()

double TraCIAPI::VehicleScope::getSpeedFactor ( const std::string &  vehicleID) const

Definition at line 2488 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_SPEED_FACTOR.

◆ getSpeedMode()

int TraCIAPI::VehicleScope::getSpeedMode ( const std::string &  vehicleID) const

Definition at line 2324 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_SPEEDSETMODE.

Referenced by TraCITestClient::testAPI().

◆ getSpeedWithoutTraCI()

double TraCIAPI::VehicleScope::getSpeedWithoutTraCI ( const std::string &  vehicleID) const

Definition at line 2543 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_SPEED_WITHOUT_TRACI.

◆ getStopState()

int TraCIAPI::VehicleScope::getStopState ( const std::string &  vehicleID) const

Definition at line 2458 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_STOPSTATE.

◆ getSubscriptionResults()

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

◆ getTau()

double TraCIAPI::VehicleScope::getTau ( const std::string &  vehicleID) const

Definition at line 2478 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_TAU.

◆ getTypeID()

std::string TraCIAPI::VehicleScope::getTypeID ( const std::string &  vehicleID) const

Definition at line 2233 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_TYPE.

Referenced by TraCITestClient::testAPI().

◆ getVehicleClass()

std::string TraCIAPI::VehicleScope::getVehicleClass ( const std::string &  vehicleID) const

Definition at line 2498 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_VEHICLECLASS.

◆ getVia()

std::vector< std::string > TraCIAPI::VehicleScope::getVia ( const std::string &  vehicleID) const

Definition at line 2341 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_VIA.

Referenced by TraCITestClient::testAPI().

◆ getWaitingTime()

double TraCIAPI::VehicleScope::getWaitingTime ( const std::string &  vehicleID) const

Definition at line 2319 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_WAITING_TIME.

Referenced by TraCITestClient::testAPI().

◆ getWidth()

double TraCIAPI::VehicleScope::getWidth ( const std::string &  vehicleID) const

Definition at line 2508 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_WIDTH.

◆ isRouteValid()

bool TraCIAPI::VehicleScope::isRouteValid ( const std::string &  vehicleID) const

Definition at line 2548 of file TraCIAPI.cpp.

References CMD_GET_VEHICLE_VARIABLE, and VAR_ROUTE_VALID.

Referenced by TraCITestClient::testAPI().

◆ moveTo()

void TraCIAPI::VehicleScope::moveTo ( const std::string &  vehicleID,
const std::string &  laneID,
double  position 
) const

◆ moveToXY()

void TraCIAPI::VehicleScope::moveToXY ( const std::string &  vehicleID,
const std::string &  edgeID,
const int  lane,
const double  x,
const double  y,
const double  angle,
const int  keepRoute 
) const

Definition at line 2752 of file TraCIAPI.cpp.

References CMD_SET_VEHICLE_VARIABLE.

Referenced by TraCITestClient::testAPI().

◆ openGap()

void TraCIAPI::VehicleScope::openGap ( const std::string &  vehicleID,
double  newTau,
double  duration,
double  changeRate,
double  maxDecel 
) const

◆ operator=()

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

invalidated assignment operator

◆ remove()

void TraCIAPI::VehicleScope::remove ( const std::string &  vehicleID,
char  reason = REMOVE_VAPORIZED 
) const

◆ rerouteTraveltime()

void TraCIAPI::VehicleScope::rerouteTraveltime ( const std::string &  vehicleID,
bool  currentTravelTimes = true 
) const

◆ setColor()

void TraCIAPI::VehicleScope::setColor ( const std::string &  vehicleID,
const libsumo::TraCIColor c 
) const

◆ setEmissionClass()

void TraCIAPI::VehicleScope::setEmissionClass ( const std::string &  vehicleID,
const std::string &  clazz 
) const

◆ setLine()

void TraCIAPI::VehicleScope::setLine ( const std::string &  vehicleID,
const std::string &  line 
) const

◆ setMaxSpeed()

void TraCIAPI::VehicleScope::setMaxSpeed ( const std::string &  vehicleID,
double  speed 
) const

◆ setParameter()

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

◆ setRoute()

void TraCIAPI::VehicleScope::setRoute ( const std::string &  vehicleID,
const std::vector< std::string > &  edge 
) const

◆ setRouteID()

void TraCIAPI::VehicleScope::setRouteID ( const std::string &  vehicleID,
const std::string &  routeID 
) const

◆ setRoutingMode()

void TraCIAPI::VehicleScope::setRoutingMode ( const std::string &  vehicleID,
int  routingMode 
) const

◆ setShapeClass()

void TraCIAPI::VehicleScope::setShapeClass ( const std::string &  vehicleID,
const std::string &  clazz 
) const

◆ setSignals()

void TraCIAPI::VehicleScope::setSignals ( const std::string &  vehicleID,
int  signals 
) const

◆ setSpeed()

void TraCIAPI::VehicleScope::setSpeed ( const std::string &  vehicleID,
double  speed 
) const

◆ setSpeedFactor()

void TraCIAPI::VehicleScope::setSpeedFactor ( const std::string &  vehicleID,
double  factor 
) const

◆ setSpeedMode()

void TraCIAPI::VehicleScope::setSpeedMode ( const std::string &  vehicleID,
int  mode 
) const

◆ setStop()

void TraCIAPI::VehicleScope::setStop ( const std::string  vehicleID,
const std::string  edgeID,
const double  endPos = 1.,
const int  laneIndex = 0,
const double  duration = std::numeric_limits<double>::max(),
const int  flags = 0,
const double  startPos = std::numeric_limits<int>::min(),
const double  until = -1 
) const

◆ setType()

void TraCIAPI::VehicleScope::setType ( const std::string &  vehicleID,
const std::string &  typeID 
) const

◆ setVia()

void TraCIAPI::VehicleScope::setVia ( const std::string &  vehicleID,
const std::vector< std::string > &  via 
) const

◆ slowDown()

void TraCIAPI::VehicleScope::slowDown ( const std::string &  vehicleID,
double  speed,
double  duration 
) const

◆ subscribe()

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

◆ subscribeContext()

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

Field Documentation

◆ myCmdGetID

int TraCIAPI::TraCIScopeWrapper::myCmdGetID
protectedinherited

Definition at line 146 of file TraCIAPI.h.

◆ myCmdSetID

int TraCIAPI::TraCIScopeWrapper::myCmdSetID
protectedinherited

Definition at line 147 of file TraCIAPI.h.

◆ myContextSubscribeID

int TraCIAPI::TraCIScopeWrapper::myContextSubscribeID
protectedinherited

Definition at line 149 of file TraCIAPI.h.

◆ myContextSubscriptionResults

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

Definition at line 151 of file TraCIAPI.h.

◆ myParent

TraCIAPI& TraCIAPI::TraCIScopeWrapper::myParent
protectedinherited

The parent TraCI client which offers the connection.

Definition at line 145 of file TraCIAPI.h.

◆ mySubscribeID

int TraCIAPI::TraCIScopeWrapper::mySubscribeID
protectedinherited

Definition at line 148 of file TraCIAPI.h.

◆ mySubscriptionResults

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

Definition at line 150 of file TraCIAPI.h.


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