SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSDetectorFileOutput Class Referenceabstract

Base of value-generating classes (detectors) More...

#include <MSDetectorFileOutput.h>

Inheritance diagram for MSDetectorFileOutput:
Named MS_E2_ZS_CollectorOverLanes MSE2Collector MSE3Collector MSInductLoop MSInstantInductLoop MSMeanData MSRouteProbe GUI_E2_ZS_CollectorOverLanes GUI_E2_ZS_Collector GUIE3Collector GUIInductLoop GUIInstantInductLoop MSMeanData_Harmonoise MSMeanData_HBEFA MSMeanData_Net

Public Member Functions

void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
const std::string & getID () const
 Returns the id. More...
 
 MSDetectorFileOutput (const std::string &id)
 Constructor. More...
 
void setID (const std::string &newID)
 resets the id More...
 
virtual ~MSDetectorFileOutput ()
 (virtual) destructor More...
 

Protected Attributes

std::string myID
 The name of the object. More...
 

Virtual methods to implement by derived classes

virtual void writeXMLOutput (OutputDevice &dev, SUMOTime startTime, SUMOTime stopTime)=0
 Write the generated output to the given device. More...
 
virtual void writeXMLDetectorProlog (OutputDevice &dev) const =0
 Open the XML-output. More...
 
virtual void reset ()
 Resets collected values. More...
 
virtual void detectorUpdate (const SUMOTime step)
 Updates the detector (computes values) More...
 
virtual GUIDetectorWrapperbuildDetectorGUIRepresentation ()
 Builds the graphical representation. More...
 
 MSDetectorFileOutput (const MSDetectorFileOutput &)
 Invalidated copy constructor. More...
 
MSDetectorFileOutputoperator= (const MSDetectorFileOutput &)
 Invalidated assignment operator. More...
 

Detailed Description

Base of value-generating classes (detectors)

Pure virtual base class for classes (e.g. MSInductLoop) that should produce XML-output.

Definition at line 65 of file MSDetectorFileOutput.h.

Constructor & Destructor Documentation

MSDetectorFileOutput::MSDetectorFileOutput ( const std::string &  id)
inline

Constructor.

Definition at line 68 of file MSDetectorFileOutput.h.

virtual MSDetectorFileOutput::~MSDetectorFileOutput ( )
inlinevirtual

(virtual) destructor

Definition at line 72 of file MSDetectorFileOutput.h.

MSDetectorFileOutput::MSDetectorFileOutput ( const MSDetectorFileOutput )
private

Invalidated copy constructor.

Member Function Documentation

void Named::addTo ( const StoringVisitor cont) const
inlineinherited

Adds this object to the given container.

Parameters
in,filled]cont The container to add this item to

Definition at line 114 of file Named.h.

References Named::StoringVisitor::add().

virtual GUIDetectorWrapper* MSDetectorFileOutput::buildDetectorGUIRepresentation ( )
inlinevirtual

Builds the graphical representation.

Meant to be overridden by graphical versions of the detectors

Returns
A wrapper for the detector which performs the user I/O within the GUI

Reimplemented in GUI_E2_ZS_Collector, GUIInductLoop, GUIE3Collector, GUI_E2_ZS_CollectorOverLanes, and GUIInstantInductLoop.

Definition at line 123 of file MSDetectorFileOutput.h.

virtual void MSDetectorFileOutput::detectorUpdate ( const SUMOTime  step)
inlinevirtual

Updates the detector (computes values)

Parameters
[in]stepThe current time step

Reimplemented in MSMeanData, MSE3Collector, MSMeanData_Harmonoise, and MSE2Collector.

Definition at line 113 of file MSDetectorFileOutput.h.

References UNUSED_PARAMETER.

const std::string& Named::getID ( ) const
inlineinherited

Returns the id.

Returns
The stored id

Definition at line 60 of file Named.h.

References Named::myID.

Referenced by Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBTrafficLightDefinition::collectEdges(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBNode::computeNodeShape(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), NBEdge::connections_sorter(), NLDetectorBuilder::convUncontE2PosLength(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), AGStreet::getName(), NIImporter_VISUM::getNamedEdgeContinuating(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), NIImporter_OpenDrive::loadNetwork(), NBRampsComputer::moveRampRight(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), MSVehicle::MSVehicle(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), NIXMLTrafficLightsHandler::myEndElement(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_Tripinfo::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Person::notifyLeave(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSEdge::by_id_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), NBLoadedTLDef::SignalGroup::patchTYellow(), AGStreet::print(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Vehicle::processSet(), NWWriter_SUMO::prohibitionConnection(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), NIXMLEdgesHandler::setNodes(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), NIXMLConnectionsHandler::validateLaneInfo(), TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), NBSign::writeAsPOI(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), MSInductLoop::writeTypedXMLOutput(), MSFullExport::writeVehicles(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().

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

Invalidated assignment operator.

virtual void MSDetectorFileOutput::reset ( )
inlinevirtual

Resets collected values.

Please note that this is only a "hack" for coupled-tls-outputs.

See Also
Command_SaveTLCoupledLaneDet
Todo:
Reckeck/refactor

Reimplemented in MSE2Collector, MSE3Collector, MSInductLoop, and GUIInductLoop.

Definition at line 106 of file MSDetectorFileOutput.h.

Referenced by Command_SaveTLCoupledLaneDet::execute().

void Named::setID ( const std::string &  newID)
inlineinherited

resets the id

Parameters
[in]newIDThe new id of this object

Definition at line 68 of file Named.h.

References Named::myID.

Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().

virtual void MSDetectorFileOutput::writeXMLDetectorProlog ( OutputDevice dev) const
pure virtual

Open the XML-output.

The implementing function should open an xml element using OutputDevice::writeXMLHeader.

Parameters
[in]devThe output device to write the root into
Exceptions
IOErrorIf an error on writing occurs

Implemented in MSMeanData, MSE3Collector, MSInductLoop, MSE2Collector, MSInstantInductLoop, MS_E2_ZS_CollectorOverLanes, and MSRouteProbe.

Referenced by MSDetectorControl::addDetectorAndInterval(), and Command_SaveTLCoupledDet::Command_SaveTLCoupledDet().

virtual void MSDetectorFileOutput::writeXMLOutput ( OutputDevice dev,
SUMOTime  startTime,
SUMOTime  stopTime 
)
pure virtual

Write the generated output to the given device.

Parameters
[in]devThe output device to write the data into
[in]startTimeFirst time step the data were gathered
[in]stopTimeLast time step the data were gathered
Exceptions
IOErrorIf an error on writing occurs

Implemented in MSMeanData, MSE3Collector, MSInductLoop, MSE2Collector, MSInstantInductLoop, MS_E2_ZS_CollectorOverLanes, and MSRouteProbe.

Referenced by Command_SaveTLCoupledLaneDet::execute(), Command_SaveTLCoupledDet::execute(), and MSDetectorControl::writeOutput().

Field Documentation


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