Eclipse SUMO - Simulation of Urban MObility
libsumo::InductionLoop Class Reference

#include <InductionLoop.h>

Collaboration diagram for libsumo::InductionLoop:

Static Public Member Functions

static int getIDCount ()
 
static std::vector< std::string > getIDList ()
 
static std::string getLaneID (const std::string &detID)
 
static double getLastStepMeanLength (const std::string &detID)
 
static double getLastStepMeanSpeed (const std::string &detID)
 
static double getLastStepOccupancy (const std::string &detID)
 
static std::vector< std::string > getLastStepVehicleIDs (const std::string &detID)
 
static int getLastStepVehicleNumber (const std::string &detID)
 
static double getPosition (const std::string &detID)
 
static double getTimeSinceDetection (const std::string &detID)
 
static LIBSUMO_SUBSCRIPTION_API NamedRTreegetTree ()
 Returns a tree filled with inductive loop instances. More...
 
static std::vector< libsumo::TraCIVehicleDatagetVehicleData (const std::string &detID)
 
static bool handleVariable (const std::string &objID, const int variable, VariableWrapper *wrapper)
 
static std::shared_ptr< VariableWrappermakeWrapper ()
 
static void storeShape (const std::string &id, PositionVector &shape)
 Saves the shape of the requested object in the given container. More...
 

Private Member Functions

 InductionLoop ()=delete
 invalidated standard constructor More...
 

Static Private Member Functions

static MSInductLoopgetDetector (const std::string &detID)
 

Static Private Attributes

static ContextSubscriptionResults myContextSubscriptionResults
 
static SubscriptionResults mySubscriptionResults
 

Detailed Description

Definition at line 49 of file InductionLoop.h.

Constructor & Destructor Documentation

◆ InductionLoop()

libsumo::InductionLoop::InductionLoop ( )
privatedelete

invalidated standard constructor

Member Function Documentation

◆ getDetector()

◆ getIDCount()

◆ getIDList()

std::vector< std::string > InductionLoop::getIDList ( )
static

◆ getLaneID()

std::string InductionLoop::getLaneID ( const std::string &  detID)
static

Definition at line 67 of file InductionLoop.cpp.

References getDetector(), Named::getID(), and MSMoveReminder::getLane().

Referenced by handleVariable().

◆ getLastStepMeanLength()

double InductionLoop::getLastStepMeanLength ( const std::string &  detID)
static

Definition at line 97 of file InductionLoop.cpp.

References DELTA_T, getDetector(), and MSInductLoop::getVehicleLength().

Referenced by handleVariable().

◆ getLastStepMeanSpeed()

double InductionLoop::getLastStepMeanSpeed ( const std::string &  detID)
static

Definition at line 79 of file InductionLoop.cpp.

References DELTA_T, getDetector(), and MSInductLoop::getSpeed().

Referenced by handleVariable().

◆ getLastStepOccupancy()

double InductionLoop::getLastStepOccupancy ( const std::string &  detID)
static

Definition at line 91 of file InductionLoop.cpp.

References getDetector(), and MSInductLoop::getOccupancy().

Referenced by handleVariable().

◆ getLastStepVehicleIDs()

std::vector< std::string > InductionLoop::getLastStepVehicleIDs ( const std::string &  detID)
static

Definition at line 85 of file InductionLoop.cpp.

References DELTA_T, getDetector(), and MSInductLoop::getVehicleIDs().

Referenced by handleVariable().

◆ getLastStepVehicleNumber()

int InductionLoop::getLastStepVehicleNumber ( const std::string &  detID)
static

Definition at line 73 of file InductionLoop.cpp.

References DELTA_T, getDetector(), and MSInductLoop::getPassedNumber().

Referenced by handleVariable().

◆ getPosition()

double InductionLoop::getPosition ( const std::string &  detID)
static

Definition at line 61 of file InductionLoop.cpp.

References getDetector(), and MSInductLoop::getPosition().

Referenced by handleVariable().

◆ getTimeSinceDetection()

double InductionLoop::getTimeSinceDetection ( const std::string &  detID)
static

Definition at line 103 of file InductionLoop.cpp.

References getDetector(), and MSInductLoop::getTimeSinceLastDetection().

Referenced by handleVariable().

◆ getTree()

NamedRTree * InductionLoop::getTree ( )
static

Returns a tree filled with inductive loop instances.

Returns
The rtree of inductive loops

Definition at line 139 of file InductionLoop.cpp.

References MSNet::getInstance(), MSMoveReminder::getLane(), MSInductLoop::getPosition(), MSLane::getShape(), NamedRTree::Insert(), PositionVector::positionAtOffset(), SUMO_TAG_INDUCTION_LOOP, Position::x(), and Position::y().

Referenced by libsumo::Helper::collectObjectsInRange().

◆ getVehicleData()

std::vector< libsumo::TraCIVehicleData > InductionLoop::getVehicleData ( const std::string &  detID)
static

◆ handleVariable()

◆ makeWrapper()

std::shared_ptr< VariableWrapper > InductionLoop::makeWrapper ( )
static

◆ storeShape()

void InductionLoop::storeShape ( const std::string &  id,
PositionVector shape 
)
static

Saves the shape of the requested object in the given container.

Parameters
idThe id of the loop to retrieve
shapeThe container to fill

Definition at line 153 of file InductionLoop.cpp.

References getDetector(), MSMoveReminder::getLane(), MSInductLoop::getPosition(), MSLane::getShape(), and PositionVector::positionAtOffset().

Referenced by libsumo::Helper::findObjectShape().

Field Documentation

◆ myContextSubscriptionResults

ContextSubscriptionResults InductionLoop::myContextSubscriptionResults
staticprivate

Definition at line 85 of file InductionLoop.h.

Referenced by makeWrapper().

◆ mySubscriptionResults

SubscriptionResults InductionLoop::mySubscriptionResults
staticprivate

Definition at line 84 of file InductionLoop.h.

Referenced by makeWrapper().


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