|
INET Framework for OMNeT++/OMNEST
|
00001 /* -*- mode:c++ -*- ******************************************************** 00002 * file: GilbertElliotSnr.h 00003 * 00004 * author: Marc Loebbers 00005 * 00006 * copyright: (C) 2004 Telecommunication Networks Group (TKN) at 00007 * Technische Universitaet Berlin, Germany. 00008 * 00009 * This program is free software; you can redistribute it 00010 * and/or modify it under the terms of the GNU General Public 00011 * License as published by the Free Software Foundation; either 00012 * version 2 of the License, or (at your option) any later 00013 * version. 00014 * For further information see file COPYING 00015 * in the top level directory 00016 *************************************************************************** 00017 * part of: framework implementation developed by tkn 00018 ***************************************************************************/ 00019 00020 #ifndef GE_SNR_H 00021 #define GE_SNR_H 00022 00023 #include "SnrEval.h" 00024 00025 00046 class INET_API GilbertElliotSnr : public SnrEval 00047 { 00048 public: 00049 GilbertElliotSnr(); 00050 virtual ~GilbertElliotSnr(); 00051 00052 protected: 00054 virtual void initialize(int); 00055 00057 virtual void handleSelfMsg(cMessage*); 00058 00060 virtual void handleLowerMsgStart(AirFrame*); 00061 00063 virtual void handleLowerMsgEnd(AirFrame*); 00064 00065 protected: 00067 enum State{ 00068 GOOD, 00069 BAD 00070 }; 00071 00073 State state; 00074 00076 double meanGood; 00077 00079 double meanBad; 00080 00082 cMessage* stateChange; 00083 }; 00084 00085 #endif