1 /****************************************************************************/ 2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo 3 // Copyright (C) 2013-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 MSTransportableDevice_FCD.h 11 /// @author Daniel Krajzewicz 12 /// @author Jakob Erdmann 13 /// @date 11.06.2013 14 /// @version $Id$ 15 /// 16 // A device which records floating car data 17 /****************************************************************************/ 18 #ifndef MSTransportableDevice_FCD_h 19 #define MSTransportableDevice_FCD_h 20 21 22 // =========================================================================== 23 // included modules 24 // =========================================================================== 25 #include <config.h> 26 27 #include "MSTransportableDevice.h" 28 #include <utils/common/SUMOTime.h> 29 30 31 // =========================================================================== 32 // class declarations 33 // =========================================================================== 34 class MSTransportable; 35 36 37 // =========================================================================== 38 // class definitions 39 // =========================================================================== 40 /** 41 * @class MSTransportableDevice_FCD 42 * @brief A device which collects info on the vehicle trip (mainly on departure and arrival) 43 * 44 * Each device collects departure time, lane and speed and the same for arrival. 45 * 46 * @see MSTransportableDevice 47 */ 48 class MSTransportableDevice_FCD : public MSTransportableDevice { 49 public: 50 /** @brief Inserts MSTransportableDevice_FCD-options 51 * @param[filled] oc The options container to add the options to 52 */ 53 static void insertOptions(OptionsCont& oc); 54 55 56 /** @brief Build devices for the given vehicle, if needed 57 * 58 * The options are read and evaluated whether a FCD-device shall be built 59 * for the given vehicle. 60 * 61 * The built device is stored in the given vector. 62 * 63 * @param[in] v The vehicle for which a device may be built 64 * @param[filled] into The vector to store the built device in 65 */ 66 static void buildDevices(MSTransportable& t, std::vector<MSTransportableDevice*>& into); 67 68 public: 69 /// @brief Destructor. 70 ~MSTransportableDevice_FCD(); 71 notifyEnter(SUMOTrafficObject &,MSMoveReminder::Notification,const MSLane *)72 bool notifyEnter(SUMOTrafficObject& /*veh*/, MSMoveReminder::Notification /*reason*/, const MSLane* /*enteredLane*/) { 73 return false; 74 } 75 saveState(OutputDevice &)76 void saveState(OutputDevice& /* out */) const { 77 } 78 79 /// @brief return the name for this type of device deviceName()80 const std::string deviceName() const { 81 return "fcd"; 82 } 83 84 /// @brief resets the edge filter 85 static void cleanup(); 86 87 private: 88 /** @brief Constructor 89 * 90 * @param[in] holder The vehicle that holds this device 91 * @param[in] id The ID of the device 92 */ 93 MSTransportableDevice_FCD(MSTransportable& holder, const std::string& id); 94 95 private: 96 /// @brief Invalidated copy constructor. 97 MSTransportableDevice_FCD(const MSTransportableDevice_FCD&); 98 99 /// @brief Invalidated assignment operator. 100 MSTransportableDevice_FCD& operator=(const MSTransportableDevice_FCD&); 101 102 103 }; 104 105 106 #endif 107 108 /****************************************************************************/ 109 110