/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2026 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file GUIDetectorBuilder.h14/// @author Daniel Krajzewicz15/// @author Michael Behrisch16/// @date Tue, 22 Jul 200317///18// Builds detectors for guisim19/****************************************************************************/20#pragma once21#include <config.h>2223#include <string>24#include <netload/NLDetectorBuilder.h>252627// ===========================================================================28// class declarations29// ===========================================================================30class MSNet;313233// ===========================================================================34// class definitions35// ===========================================================================36/**37* @class GUIDetectorBuilder38* @brief Builds detectors for guisim39*40* This class overrides NLDetectorBuilder's detector creation methods in order41* to build guisim-classes instead of microsim-classes.42*43* @see NLDetectorBuilder44*/45class GUIDetectorBuilder : public NLDetectorBuilder {46public:47/** @brief Constructor48*49* @param[in] net The network to which's detector control built detector shall be added50*/51GUIDetectorBuilder(MSNet& net);525354/// @brief Destructor55~GUIDetectorBuilder();565758/// @name Detector creating methods59///60/// Override NLDetectorBuilder methods.61/// @{6263/** @brief Creates an instance of an e1 detector using the given values64*65* Simply calls the GUIInductLoop constructor66*67* @param[in] id The id the detector shall have68* @param[in] lane The lane the detector is placed at69* @param[in] pos The position on the lane the detector is placed at70* @param[in] length The optional length of the detector71* @param[in] vTypes which vehicle types are considered72* @param[in] show Whether to show the detector in the gui if available73*/74virtual MSDetectorFileOutput* createInductLoop(const std::string& id,75MSLane* lane, double pos, double length,76const std::string name, const std::string& vTypes,77const std::string& nextEdges,78int detectPersons,79bool show) override;808182/** @brief Creates an instance of an e1 detector using the given values83*84* Simply calls the MSInductLoop constructor85*86* @param[in] id The id the detector shall have87* @param[in] lane The lane the detector is placed at88* @param[in] pos The position on the lane the detector is placed at89* @param[in] od The output device the loop shall use90*/91virtual MSDetectorFileOutput* createInstantInductLoop(const std::string& id,92MSLane* lane, double pos, const std::string& od, const std::string name,93const std::string& vTypes, const std::string& nextEdges,94int detectPersons) override;9596/** @brief Creates a GUIE2Collector instance, overrides MSE2Collector::createE2Detector()97*98* Simply calls the GUIE2Collector constructor99*100* @see GUIE2Collector Constructor documentation101*/102virtual MSE2Collector* createE2Detector(const std::string& id,103DetectorUsage usage, MSLane* lane, double pos, double endPos, double length,104SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold,105const std::string name, const std::string& vTypes,106const std::string& nextEdges,107int detectPersons, bool showDetector) override;108109virtual MSE2Collector* createE2Detector(const std::string& id,110DetectorUsage usage, std::vector<MSLane*> lanes, double pos, double endPos,111SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold,112const std::string name, const std::string& vTypes,113const std::string& nextEdges,114int detectPersons, bool showDetector) override;115116117/** @brief Creates an instance of an e3 detector using the given values118*119* Simply calls the GUIE3Collector constructor.120*121* @param[in] id The id the detector shall have122* @param[in] entries The list of this detector's entries123* @param[in] exits The list of this detector's exits124* @param[in] haltingSpeedThreshold Detector parameter: the speed a vehicle's speed must be below to be assigned as jammed125* @param[in] haltingTimeThreshold Detector parameter: the time a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed126*/127virtual MSDetectorFileOutput* createE3Detector(const std::string& id,128const CrossSectionVector& entries,129const CrossSectionVector& exits,130double haltingSpeedThreshold,131SUMOTime haltingTimeThreshold,132const std::string name, const std::string& vTypes,133const std::string& nextEdges,134int detectPersons, bool openEntry, bool expectArrival) override;135/// @}136137138};139140141