LCOV - code coverage report
Current view: top level - src/microsim/devices - MSTransportableDevice_FCD.cpp (source / functions) Hit Total Coverage
Test: lcov.info Lines: 17 19 89.5 %
Date: 2024-04-30 15:40:33 Functions: 5 6 83.3 %

          Line data    Source code
       1             : /****************************************************************************/
       2             : // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
       3             : // Copyright (C) 2013-2024 German Aerospace Center (DLR) and others.
       4             : // This program and the accompanying materials are made available under the
       5             : // terms of the Eclipse Public License 2.0 which is available at
       6             : // https://www.eclipse.org/legal/epl-2.0/
       7             : // This Source Code may also be made available under the following Secondary
       8             : // Licenses when the conditions for such availability set forth in the Eclipse
       9             : // Public License 2.0 are satisfied: GNU General Public License, version 2
      10             : // or later which is available at
      11             : // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
      12             : // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
      13             : /****************************************************************************/
      14             : /// @file    MSTransportableDevice_FCD.cpp
      15             : /// @author  Daniel Krajzewicz
      16             : /// @author  Michael Behrisch
      17             : /// @author  Jakob Erdmann
      18             : /// @date    11.06.2013
      19             : ///
      20             : // A device which stands as an implementation FCD and which outputs movereminder calls
      21             : /****************************************************************************/
      22             : #include <config.h>
      23             : 
      24             : #include <utils/common/StringUtils.h>
      25             : #include <utils/options/OptionsCont.h>
      26             : #include <utils/iodevices/OutputDevice.h>
      27             : #include <microsim/MSNet.h>
      28             : #include <microsim/MSLane.h>
      29             : #include <microsim/MSEdge.h>
      30             : #include <microsim/transportables/MSTransportable.h>
      31             : #include "MSDevice_FCD.h"
      32             : #include "MSTransportableDevice_FCD.h"
      33             : 
      34             : // ===========================================================================
      35             : // static members
      36             : // ===========================================================================
      37             : 
      38             : // ===========================================================================
      39             : // method definitions
      40             : // ===========================================================================
      41             : // ---------------------------------------------------------------------------
      42             : // static initialisation methods
      43             : // ---------------------------------------------------------------------------
      44             : void
      45       36322 : MSTransportableDevice_FCD::insertOptions(OptionsCont& oc) {
      46       72644 :     insertDefaultAssignmentOptions("fcd", "FCD Device", oc, true);
      47             : 
      48       72644 :     oc.doRegister("person-device.fcd.period", new Option_String("0"));
      49       72644 :     oc.addDescription("person-device.fcd.period", "FCD Device", TL("Recording period for FCD-data"));
      50       36322 : }
      51             : 
      52             : 
      53             : void
      54      456733 : MSTransportableDevice_FCD::buildDevices(MSTransportable& t, std::vector<MSTransportableDevice*>& into) {
      55      456733 :     OptionsCont& oc = OptionsCont::getOptions();
      56      913466 :     if (equippedByDefaultAssignmentOptions(oc, "fcd", t, oc.isSet("fcd-output"), true)) {
      57        1960 :         MSTransportableDevice_FCD* device = new MSTransportableDevice_FCD(t, "fcd_" + t.getID());
      58        1960 :         into.push_back(device);
      59        1960 :         MSDevice_FCD::initOnce();
      60             :     }
      61      456733 : }
      62             : 
      63             : 
      64             : // ---------------------------------------------------------------------------
      65             : // MSTransportableDevice_FCD-methods
      66             : // ---------------------------------------------------------------------------
      67        1960 : MSTransportableDevice_FCD::MSTransportableDevice_FCD(MSTransportable& holder, const std::string& id) :
      68        1960 :     MSTransportableDevice(holder, id) {
      69        1960 : }
      70             : 
      71             : 
      72        3916 : MSTransportableDevice_FCD::~MSTransportableDevice_FCD() {
      73        3916 : }
      74             : 
      75             : 
      76             : void
      77           0 : MSTransportableDevice_FCD::cleanup() {
      78           0 : }
      79             : 
      80             : 
      81             : /****************************************************************************/

Generated by: LCOV version 1.14