1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2012-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
10 /// @file    MSFCDExport.h
11 /// @author  Mario Krumnow
12 /// @date    2012-04-26
13 /// @version $Id$
14 ///
15 // Realises dumping Floating Car Data (FCD) Data
16 /****************************************************************************/
17 #ifndef MSFCDExport_h
18 #define MSFCDExport_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <utils/common/SUMOTime.h>
27 
28 
29 // ===========================================================================
30 // class declarations
31 // ===========================================================================
32 class OutputDevice;
33 class MSEdgeControl;
34 class MSEdge;
35 class MSLane;
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
41 /**
42  * @class MSFCDExport
43  * @brief Realises dumping FCD Data
44  *
45  *  The class offers a static method, which writes Position of each vehicle of
46  *  the network into the given OutputDevice.
47  *
48  * @todo consider error-handling on write (using IOError)
49  */
50 class MSFCDExport {
51 public:
52     /** @brief Writes the position and the angle of each vehicle into the given device
53      *
54      *  Opens the current time step and export the values vehicle id, position and angle
55      *
56      * @param[in] of The output device to use
57      * @param[in] timestep The current time step
58      * @param[in] elevation Whether elevation data shall be written
59      * @exception IOError If an error on writing occurs (!!! not yet implemented)
60      */
61     static void write(OutputDevice& of, SUMOTime timestep, bool elevation);
62 
63 private:
64     /// @brief write transportable
65     static void writeTransportable(OutputDevice& of, const MSEdge* e, MSTransportable* p, SumoXMLTag tag, bool useGeo, bool elevation);
66 
67 private:
68     /// @brief Invalidated copy constructor.
69     MSFCDExport(const MSFCDExport&);
70 
71     /// @brief Invalidated assignment operator.
72     MSFCDExport& operator=(const MSFCDExport&);
73 
74 
75 };
76 
77 
78 #endif
79 
80 /****************************************************************************/
81 
82 
83