LCOV - code coverage report
Current view: top level - src/microsim/devices - MSTransportableDevice_FCD.cpp (source / functions) Coverage Total Hit
Test: lcov.info Lines: 88.9 % 18 16
Test Date: 2025-11-13 15:38:19 Functions: 83.3 % 6 5

            Line data    Source code
       1              : /****************************************************************************/
       2              : // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
       3              : // Copyright (C) 2013-2025 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        39784 : MSTransportableDevice_FCD::insertOptions(OptionsCont& oc) {
      46        79568 :     insertDefaultAssignmentOptions("fcd", "FCD Device", oc, true);
      47              : 
      48        79568 :     oc.doRegister("person-device.fcd.period", new Option_String("0"));
      49        79568 :     oc.addDescription("person-device.fcd.period", "FCD Device", TL("Recording period for FCD-data"));
      50        39784 : }
      51              : 
      52              : 
      53              : void
      54       513415 : MSTransportableDevice_FCD::buildDevices(MSTransportable& t, std::vector<MSTransportableDevice*>& into) {
      55       513415 :     OptionsCont& oc = OptionsCont::getOptions();
      56      1026830 :     if (equippedByDefaultAssignmentOptions(oc, "fcd", t, oc.isSet("fcd-output"), true)) {
      57         2121 :         MSTransportableDevice_FCD* device = new MSTransportableDevice_FCD(t, "fcd_" + t.getID());
      58         2121 :         into.push_back(device);
      59              :     }
      60       513415 : }
      61              : 
      62              : 
      63              : // ---------------------------------------------------------------------------
      64              : // MSTransportableDevice_FCD-methods
      65              : // ---------------------------------------------------------------------------
      66         2121 : MSTransportableDevice_FCD::MSTransportableDevice_FCD(MSTransportable& holder, const std::string& id) :
      67         2121 :     MSTransportableDevice(holder, id) {
      68         2121 : }
      69              : 
      70              : 
      71         4236 : MSTransportableDevice_FCD::~MSTransportableDevice_FCD() {
      72         4236 : }
      73              : 
      74              : 
      75              : void
      76            0 : MSTransportableDevice_FCD::cleanup() {
      77            0 : }
      78              : 
      79              : 
      80              : /****************************************************************************/
        

Generated by: LCOV version 2.0-1