1 /****************************************************************************/ 2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo 3 // Copyright (C) 2001-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 MSFrame.h 11 /// @author Daniel Krajzewicz 12 /// @author Michael Behrisch 13 /// @date Sept 2002 14 /// @version $Id$ 15 /// 16 // Sets and checks options for microsim; inits global outputs and settings 17 /****************************************************************************/ 18 #ifndef MSFrame_h 19 #define MSFrame_h 20 21 22 // =========================================================================== 23 // included modules 24 // =========================================================================== 25 #include <config.h> 26 27 28 // =========================================================================== 29 // class declarations 30 // =========================================================================== 31 class OptionsCont; 32 class MSNet; 33 class OutputDevice; 34 35 36 // =========================================================================== 37 // class definitions 38 // =========================================================================== 39 /** 40 * @class MSFrame 41 * @brief Sets and checks options for microsim; inits global outputs and settings 42 * 43 * In addition to setting and checking options, this frame also sets global 44 * values via "setMSGlobals". They are stored in MSGlobals. 45 * 46 * Also, global output streams are initialised within "buildStreams". 47 * 48 * @see MSGlobals 49 */ 50 class MSFrame { 51 public: 52 /** @brief Inserts options used by the simulation into the OptionsCont-singleton 53 * 54 * Device-options are inserted by calling the device's "insertOptions" 55 * -methods. 56 */ 57 static void fillOptions(); 58 59 60 /** @brief Builds the streams used possibly by the simulation */ 61 static void buildStreams(); 62 63 64 /** @brief Checks the set options. 65 * 66 * The following constraints must be valid: 67 * @arg the network-file was specified (otherwise no simulation is existing) 68 * @arg the begin and the end of the simulation must be given 69 * @arg The default lane change model must be known 70 * If one is not, false is returned. 71 * 72 * @return Whether the settings are valid 73 * @todo Rechek usage of the lane change model 74 * @todo probably, more things should be checked... 75 */ 76 static bool checkOptions(); 77 78 79 /** @brief Sets the global microsim-options 80 * 81 * @param[in] oc The options container to get the values from 82 * @see MSGlobals 83 */ 84 static void setMSGlobals(OptionsCont& oc); 85 86 }; 87 88 89 #endif 90 91 /****************************************************************************/ 92 93