Eclipse SUMO - Simulation of Urban MObility
MSTransportableDevice_FCDReplay.h
Go to the documentation of this file.
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 /****************************************************************************/
18 // A device which replays recorded floating car data
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
23 #include <utils/common/Command.h>
24 #include "MSTransportableDevice.h"
25 #include "MSDevice_FCDReplay.h"
26 
27 
28 // ===========================================================================
29 // class definitions
30 // ===========================================================================
40 public:
44  static void insertOptions(OptionsCont& oc);
45 
46 
57  static void buildDevices(MSTransportable& t, std::vector<MSTransportableDevice*>& into);
58 
59 public:
62 
64  const std::string deviceName() const {
65  return "fcd-replay";
66  }
67 
69  myTrajectory = t;
71  }
72 
73  bool move(SUMOTime currentTime);
74 
75 private:
81  MSTransportableDevice_FCDReplay(MSTransportable& holder, const std::string& id);
82 
83  class MovePedestrians : public Command {
84  public:
86  SUMOTime execute(SUMOTime currentTime);
87  private:
90  };
91 
92 private:
94 
96 
98  static bool myAmActive;
99 
100 private:
103 
106 
107 
108 };
long long int SUMOTime
Definition: GUI.h:35
Base (microsim) event class.
Definition: Command.h:50
std::vector< TrajectoryEntry > Trajectory
SUMOTime execute(SUMOTime currentTime)
Executes the command.
MovePedestrians & operator=(const MovePedestrians &)=delete
Invalidated assignment operator.
A device which collects info on the vehicle trip (mainly on departure and arrival)
MSTransportableDevice_FCDReplay(const MSTransportableDevice_FCDReplay &)
Invalidated copy constructor.
const std::string deviceName() const
return the name for this type of device
MSTransportableDevice_FCDReplay(MSTransportable &holder, const std::string &id)
Constructor.
static bool myAmActive
whether an event for pedestrian processing was added
static void buildDevices(MSTransportable &t, std::vector< MSTransportableDevice * > &into)
Build devices for the given vehicle, if needed.
MSTransportableDevice_FCDReplay & operator=(const MSTransportableDevice_FCDReplay &)
Invalidated assignment operator.
void setTrajectory(MSDevice_FCDReplay::Trajectory *const t)
static void insertOptions(OptionsCont &oc)
Inserts MSTransportableDevice_FCDReplay-options.
const MSDevice_FCDReplay::Trajectory * myTrajectory
Abstract in-person device.
A storage for options typed value containers)
Definition: OptionsCont.h:89