![]() |
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-2009 00006 * Chair of Communication Networks (ComNets) 00007 * Kopernikusstr. 5, D-52074 Aachen, Germany 00008 * email: info@openwns.org 00009 * www: http://www.openwns.org 00010 * _____________________________________________________________________________ 00011 * 00012 * openWNS is free software; you can redistribute it and/or modify it under the 00013 * terms of the GNU Lesser General Public License version 2 as published by the 00014 * Free Software Foundation; 00015 * 00016 * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY 00017 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 00018 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00019 * details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public License 00022 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00023 * 00024 ******************************************************************************/ 00025 00031 #ifndef WIMAC_ERRORMODELLING_HPP 00032 #define WIMAC_ERRORMODELLING_HPP 00033 00034 #include <WNS/ldk/Forwarding.hpp> 00035 #include <WNS/ldk/fu/Plain.hpp> 00036 #include <WNS/ldk/Command.hpp> 00037 #include <WNS/ldk/ErrorRateProviderInterface.hpp> 00038 #include <WNS/pyconfig/View.hpp> 00039 #include <WNS/PowerRatio.hpp> 00040 00041 #include <WIMAC/PhyUser.hpp> 00042 #include <WIMAC/Logger.hpp> 00043 00044 namespace wimac { 00045 00049 class ErrorModellingCommand : 00050 public wns::ldk::Command, 00051 public wns::ldk::ErrorRateProviderInterface 00052 00053 { 00054 public: 00055 ErrorModellingCommand() 00056 { 00057 local.per = 1; 00058 } 00059 00060 virtual double getErrorRate() const 00061 { 00062 return local.per; 00063 } 00064 00065 struct { 00066 double per; 00067 } local; 00068 struct {} peer; 00069 struct {} magic; 00070 00071 }; 00072 00079 class ErrorModelling : 00080 public wns::ldk::fu::Plain<ErrorModelling, ErrorModellingCommand>, 00081 public wns::ldk::Forwarding<ErrorModelling> 00082 { 00083 public: 00084 ErrorModelling(wns::ldk::fun::FUN* fun, const wns::pyconfig::View& config); 00085 00086 // Forwarding Interface 00087 virtual void 00088 processOutgoing(const wns::ldk::CompoundPtr& componud); 00089 00090 virtual void 00091 processIncoming(const wns::ldk::CompoundPtr& componud); 00092 00093 virtual void 00094 onFUNCreated(); 00095 00096 00097 private: 00098 std::string CIRProviderName_; 00099 std::string PHYModeProviderName_; 00100 00101 struct Friends { 00102 FunctionalUnit* CIRProvider; 00103 FunctionalUnit* PHYModeProvider; 00104 } friends; 00105 }; 00106 } 00107 00108 #endif 00109
1.5.5