![]() |
User Manual, Developers Guide and API Documentation |
![]() |
00001 /******************************************************************************* 00002 * This file is part of openWNS (open Wireless Network Simulator) 00003 * _____________________________________________________________________________ 00004 * 00005 * Copyright (C) 2004-2007 00006 * Chair of Communication Networks (ComNets) 00007 * Kopernikusstr. 16, D-52074 Aachen, Germany 00008 * phone: ++49-241-80-27910, 00009 * fax: ++49-241-80-22242 00010 * email: info@openwns.org 00011 * www: http://www.openwns.org 00012 * _____________________________________________________________________________ 00013 * 00014 * openWNS is free software; you can redistribute it and/or modify it under the 00015 * terms of the GNU Lesser General Public License version 2 as published by the 00016 * Free Software Foundation; 00017 * 00018 * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY 00019 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 00020 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00021 * details. 00022 * 00023 * You should have received a copy of the GNU Lesser General Public License 00024 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00025 * 00026 ******************************************************************************/ 00027 00028 #ifndef WNS_SIMULATOR_SIMULATOR_HPP 00029 #define WNS_SIMULATOR_SIMULATOR_HPP 00030 00031 #include <WNS/simulator/ISimulator.hpp> 00032 #include <WNS/pyconfig/View.hpp> 00033 00034 #include <memory> 00035 00036 namespace wns { namespace simulator { 00037 00057 class Simulator : 00058 public ISimulator 00059 { 00060 public: 00064 explicit 00065 Simulator(const pyconfig::View& configuration); 00066 00070 virtual 00071 ~Simulator(); 00072 00073 protected: 00077 virtual void 00078 configureRNG(const pyconfig::View& rngConfiguration); 00079 00080 private: 00084 Simulator(const Simulator&); 00085 00089 virtual wns::events::scheduler::Interface* 00090 doGetEventScheduler() const; 00091 00095 virtual wns::logger::Master* 00096 doGetMasterLogger() const; 00097 00101 virtual wns::rng::RNGen* 00102 doGetRNG() const; 00103 00107 virtual Registry* 00108 doGetRegistry() const; 00109 00113 virtual wns::probe::bus::ProbeBusRegistry* 00114 doGetProbeBusRegistry() const; 00115 00119 virtual ResetSignal* 00120 doGetResetSignal() const; 00121 00125 virtual ShutdownSignal* 00126 doGetShutdownSignal() const; 00127 00131 virtual wns::pyconfig::View 00132 doGetConfiguration() const; 00133 00137 virtual void 00138 doReset(); 00139 00143 void 00144 configureEventScheduler(const pyconfig::View& eventSchedulerConfiguration); 00145 00149 void 00150 configureMasterLogger(const pyconfig::View& masterLoggerConfiguration); 00151 00155 void 00156 configureProbeBusRegistry(const pyconfig::View& pbrConfiguration); 00157 00161 wns::pyconfig::View configuration_; 00162 00166 std::auto_ptr<wns::events::scheduler::Interface> eventScheduler_; 00167 00171 std::auto_ptr<wns::logger::Master> masterLogger_; 00172 00176 std::auto_ptr<wns::rng::RNGen> rng_; 00177 00181 std::auto_ptr<Registry> registry_; 00182 00186 std::auto_ptr<wns::probe::bus::ProbeBusRegistry> probeBusRegistry_; 00187 00191 std::auto_ptr<ResetSignal> resetSignal_; 00192 00196 std::auto_ptr<ShutdownSignal> shutdownSignal_; 00197 }; 00198 00199 } // namespace simulator 00200 } // namesapce wns 00201 00202 00203 #endif // NOT defined WNS_SIMULATOR_SIMULATOR_HPP
1.5.5