/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 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) override;9495/** @brief Creates a GUIE2Collector instance, overrides MSE2Collector::createE2Detector()96*97* Simply calls the GUIE2Collector constructor98*99* @see GUIE2Collector Constructor documentation100*/101virtual MSE2Collector* createE2Detector(const std::string& id,102DetectorUsage usage, MSLane* lane, double pos, double endPos, double length,103SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold,104const std::string name, const std::string& vTypes,105const std::string& nextEdges,106int detectPersons, bool showDetector) override;107108virtual MSE2Collector* createE2Detector(const std::string& id,109DetectorUsage usage, std::vector<MSLane*> lanes, double pos, double endPos,110SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold,111const std::string name, const std::string& vTypes,112const std::string& nextEdges,113int detectPersons, bool showDetector) override;114115116/** @brief Creates an instance of an e3 detector using the given values117*118* Simply calls the GUIE3Collector constructor.119*120* @param[in] id The id the detector shall have121* @param[in] entries The list of this detector's entries122* @param[in] exits The list of this detector's exits123* @param[in] haltingSpeedThreshold Detector parameter: the speed a vehicle's speed must be below to be assigned as jammed124* @param[in] haltingTimeThreshold Detector parameter: the time a vehicle's speed must be below haltingSpeedThreshold to be assigned as jammed125*/126virtual MSDetectorFileOutput* createE3Detector(const std::string& id,127const CrossSectionVector& entries,128const CrossSectionVector& exits,129double haltingSpeedThreshold,130SUMOTime haltingTimeThreshold,131const std::string name, const std::string& vTypes,132const std::string& nextEdges,133int detectPersons, bool openEntry, bool expectArrival) override;134/// @}135136137};138139140