Eclipse SUMO - Simulation of Urban MObility
MSStopOut Class Reference

Realises dumping the complete network state. More...

#include <MSStopOut.h>

Collaboration diagram for MSStopOut:
[legend]

Data Structures

struct  StopInfo
 

Public Member Functions

void loadedContainers (const SUMOVehicle *veh, int n)
 
void loadedPersons (const SUMOVehicle *veh, int n)
 
 MSStopOut (OutputDevice &dev)
 constructor. More...
 
void stopEnded (const SUMOVehicle *veh, const SUMOVehicleParameter::Stop &stop, const std::string &laneOrEdgeID)
 
void stopStarted (const SUMOVehicle *veh, int numPersons, int numContainers, SUMOTime time)
 
void unloadedContainers (const SUMOVehicle *veh, int n)
 
void unloadedPersons (const SUMOVehicle *veh, int n)
 
virtual ~MSStopOut ()
 Destructor. More...
 

Static Public Member Functions

static bool active ()
 
static void cleanup ()
 
static MSStopOut * getInstance ()
 
static void init ()
 Static intialization. More...
 

Private Member Functions

 MSStopOut (const MSStopOut &)
 Invalidated copy constructor. More...
 
MSStopOut & operator= (const MSStopOut &)
 Invalidated assignment operator. More...
 

Private Attributes

OutputDevice & myDevice
 
std::map< const SUMOVehicle *, StopInfo > myStopped
 

Static Private Attributes

static MSStopOut * myInstance = nullptr
 

Detailed Description

Realises dumping the complete network state.

The class offers a static method, which writes the complete dump of the given network into the given OutputDevice.

Todo:
consider error-handling on write (using IOError)

Definition at line 47 of file MSStopOut.h.

Constructor & Destructor Documentation

◆ MSStopOut() [1/2]

MSStopOut::MSStopOut ( OutputDevice &  dev)

constructor.

Definition at line 57 of file MSStopOut.cpp.

Referenced by init().

Here is the caller graph for this function:

◆ ~MSStopOut()

MSStopOut::~MSStopOut ( )
virtual

Destructor.

Definition at line 61 of file MSStopOut.cpp.

◆ MSStopOut() [2/2]

MSStopOut::MSStopOut ( const MSStopOut &  )
private

Invalidated copy constructor.

Member Function Documentation

◆ active()

static bool MSStopOut::active ( )
inlinestatic

Definition at line 54 of file MSStopOut.h.

References myInstance.

Referenced by MSDevice_Transportable::addTransportable(), MEVehicle::checkStop(), MSVehicle::leaveLane(), MSDevice_Transportable::notifyMove(), MSVehicle::processNextStop(), MEVehicle::processStop(), MSDevice_Transportable::removeTransportable(), and MSVehicle::resumeFromStopping().

Here is the caller graph for this function:

◆ cleanup()

void MSStopOut::cleanup ( )
static

Definition at line 49 of file MSStopOut.cpp.

References myInstance.

Referenced by MSNet::clearAll().

Here is the caller graph for this function:

◆ getInstance()

static MSStopOut* MSStopOut::getInstance ( void  )
inlinestatic

Definition at line 60 of file MSStopOut.h.

References myInstance.

Referenced by MSDevice_Transportable::addTransportable(), MEVehicle::checkStop(), MSVehicle::leaveLane(), MSDevice_Transportable::notifyMove(), MSVehicle::processNextStop(), MEVehicle::processStop(), MSDevice_Transportable::removeTransportable(), and MSVehicle::resumeFromStopping().

Here is the caller graph for this function:

◆ init()

void MSStopOut::init ( )
static

Static intialization.

Definition at line 42 of file MSStopOut.cpp.

References OutputDevice::getDeviceByOption(), OptionsCont::getOptions(), MSStopOut(), and myInstance.

Referenced by MSFrame::buildStreams().

Here is the caller graph for this function:

◆ loadedContainers()

void MSStopOut::loadedContainers ( const SUMOVehicle *  veh,
int  n 
)

Definition at line 88 of file MSStopOut.cpp.

References myStopped.

Referenced by MSDevice_Transportable::addTransportable(), and MSDevice_Transportable::removeTransportable().

Here is the caller graph for this function:

◆ loadedPersons()

void MSStopOut::loadedPersons ( const SUMOVehicle *  veh,
int  n 
)

Definition at line 75 of file MSStopOut.cpp.

References SUMOVehicle::hasDeparted(), and myStopped.

Referenced by MSDevice_Transportable::addTransportable(), and MSDevice_Transportable::removeTransportable().

Here is the caller graph for this function:

◆ operator=()

MSStopOut& MSStopOut::operator= ( const MSStopOut &  )
private

Invalidated assignment operator.

◆ stopEnded()

void MSStopOut::stopEnded ( const SUMOVehicle *  veh,
const SUMOVehicleParameter::Stop &  stop,
const std::string &  laneOrEdgeID 
)

Definition at line 98 of file MSStopOut.cpp.

References SUMOVehicleParameter::Stop::actualArrival, SUMOVehicleParameter::Stop::arrival, SUMOVehicleParameter::Stop::busstop, SUMOVehicleParameter::Stop::chargingStation, OutputDevice::closeTag(), SUMOVehicleParameter::Stop::containerstop, SUMOTrafficObject::getEdge(), MSVehicleType::getID(), Named::getID(), MSNet::getInstance(), SUMOTrafficObject::getPositionOnLane(), SUMOTrafficObject::getVehicleType(), MSGlobals::gUseMesoSim, MSStopOut::StopInfo::initialNumContainers, MSStopOut::StopInfo::initialNumPersons, SUMOVehicleParameter::Stop::line, MSStopOut::StopInfo::loadedContainers, MSStopOut::StopInfo::loadedPersons, myDevice, myStopped, OutputDevice::openTag(), SUMOVehicleParameter::Stop::overheadWireSegment, SUMOVehicleParameter::Stop::parking, SUMOVehicleParameter::Stop::parkingarea, SUMOVehicleParameter::Stop::split, STEPS2TIME, SUMO_ATTR_BUS_STOP, SUMO_ATTR_CHARGING_STATION, SUMO_ATTR_CONTAINER_STOP, SUMO_ATTR_EDGE, SUMO_ATTR_ID, SUMO_ATTR_LANE, SUMO_ATTR_LINE, SUMO_ATTR_OVERHEAD_WIRE_SEGMENT, SUMO_ATTR_PARKING, SUMO_ATTR_PARKING_AREA, SUMO_ATTR_POSITION, SUMO_ATTR_SPLIT, SUMO_ATTR_TRIP_ID, SUMO_ATTR_TYPE, time2string(), SUMOVehicleParameter::Stop::tripId, MSStopOut::StopInfo::unloadedContainers, MSStopOut::StopInfo::unloadedPersons, SUMOVehicleParameter::Stop::until, WRITE_WARNING, and OutputDevice::writeAttr().

Referenced by MEVehicle::processStop(), and MSVehicle::resumeFromStopping().

Here is the caller graph for this function:

◆ stopStarted()

void MSStopOut::stopStarted ( const SUMOVehicle *  veh,
int  numPersons,
int  numContainers,
SUMOTime  time 
)

Definition at line 65 of file MSStopOut.cpp.

References SUMOTrafficObject::getEdge(), Named::getID(), myStopped, time2string(), and WRITE_WARNING.

Referenced by MEVehicle::checkStop(), MSVehicle::leaveLane(), and MSVehicle::processNextStop().

Here is the caller graph for this function:

◆ unloadedContainers()

void MSStopOut::unloadedContainers ( const SUMOVehicle *  veh,
int  n 
)

Definition at line 93 of file MSStopOut.cpp.

References myStopped.

Referenced by MSDevice_Transportable::notifyMove().

Here is the caller graph for this function:

◆ unloadedPersons()

void MSStopOut::unloadedPersons ( const SUMOVehicle *  veh,
int  n 
)

Definition at line 83 of file MSStopOut.cpp.

References myStopped.

Referenced by MSDevice_Transportable::notifyMove().

Here is the caller graph for this function:

Field Documentation

◆ myDevice

OutputDevice& MSStopOut::myDevice
private

Definition at line 103 of file MSStopOut.h.

Referenced by stopEnded().

◆ myInstance

MSStopOut * MSStopOut::myInstance = nullptr
staticprivate

Definition at line 105 of file MSStopOut.h.

Referenced by active(), cleanup(), getInstance(), and init().

◆ myStopped

std::map<const SUMOVehicle*, StopInfo> MSStopOut::myStopped
private

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