LCOV - code coverage report
Current view: top level - src/microsim/devices - MSTransportableDevice_FCD.cpp (source / functions) Coverage Total Hit
Test: lcov.info Lines: 89.5 % 19 17
Test Date: 2024-11-22 15:46:21 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-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        43644 : MSTransportableDevice_FCD::insertOptions(OptionsCont& oc) {
      46        87288 :     insertDefaultAssignmentOptions("fcd", "FCD Device", oc, true);
      47              : 
      48        87288 :     oc.doRegister("person-device.fcd.period", new Option_String("0"));
      49        87288 :     oc.addDescription("person-device.fcd.period", "FCD Device", TL("Recording period for FCD-data"));
      50        43644 : }
      51              : 
      52              : 
      53              : void
      54       501966 : MSTransportableDevice_FCD::buildDevices(MSTransportable& t, std::vector<MSTransportableDevice*>& into) {
      55       501966 :     OptionsCont& oc = OptionsCont::getOptions();
      56      1003932 :     if (equippedByDefaultAssignmentOptions(oc, "fcd", t, oc.isSet("fcd-output"), true)) {
      57         1949 :         MSTransportableDevice_FCD* device = new MSTransportableDevice_FCD(t, "fcd_" + t.getID());
      58         1949 :         into.push_back(device);
      59         1949 :         MSDevice_FCD::initOnce();
      60              :     }
      61       501966 : }
      62              : 
      63              : 
      64              : // ---------------------------------------------------------------------------
      65              : // MSTransportableDevice_FCD-methods
      66              : // ---------------------------------------------------------------------------
      67         1949 : MSTransportableDevice_FCD::MSTransportableDevice_FCD(MSTransportable& holder, const std::string& id) :
      68         1949 :     MSTransportableDevice(holder, id) {
      69         1949 : }
      70              : 
      71              : 
      72         3892 : MSTransportableDevice_FCD::~MSTransportableDevice_FCD() {
      73         3892 : }
      74              : 
      75              : 
      76              : void
      77            0 : MSTransportableDevice_FCD::cleanup() {
      78            0 : }
      79              : 
      80              : 
      81              : /****************************************************************************/
        

Generated by: LCOV version 2.0-1