Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages

BasicSnrEval.h

00001 /* -*- mode:c++ -*- ********************************************************
00002  * file:        BasicSnrEval.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 
00021 #ifndef BASIC_SNREVAL_H
00022 #define BASIC_SNREVAL_H
00023 
00024 #include <map>
00025 
00026 #include "ChannelAccess.h"
00027 #include "AirFrame_m.h"
00028 #include "NicControlType.h"
00029 #include "ActiveChannel.h"
00030 
00055 class BasicSnrEval : public ChannelAccess
00056 {
00057 
00058 protected:
00059 
00061     int headerLength;
00062 
00073     double transmitterPower;
00074 
00084     double carrierFrequency;
00085 
00096     double sensitivity;
00097     
00107     double alpha;
00108 
00110     static const double speedOfLight;
00111 
00114     int uppergateOut;
00115     int uppergateIn;
00116     int upperControlOut;
00120     bool coreDebug;
00121 
00123     cMessage *txOverTimer;
00124 
00126     ActiveChannel channel;
00128     int catActiveChannel;
00129 
00135     enum BasicSnrMsgKinds {
00136         RECEPTION_COMPLETE = 1350101811
00137     };
00138     
00139     
00140 public:
00141     Module_Class_Members( BasicSnrEval, ChannelAccess, 0 );
00142 
00144     virtual void initialize(int);
00145     virtual void finish();
00146 
00148     void handleMessage( cMessage* );
00149 
00151     virtual void receiveBBItem(int category, const BBItem *details, int scopeModuleId);
00152     
00153 protected:
00168     virtual void handleUpperMsg(AirFrame*);
00169 
00176     virtual void handleSelfMsg(cMessage *msg){
00177         error("deleting msg");
00178         delete msg;
00179     };
00180 
00205     virtual void handleLowerMsgStart(AirFrame*) = 0;
00206 
00214     virtual void handleLowerMsgEnd(AirFrame*);
00215 
00231 
00233     void bufferMsg(AirFrame *frame);
00234 
00236     AirFrame* unbufferMsg(cMessage *msg);
00237 
00239     void sendUp(AirFrame*, const SnrList&);
00240 
00242     void sendDown(AirFrame *msg);
00243 
00245     void sendControlUp(cMessage *);
00246 
00248     AirFrame* encapsMsg(cMessage *msg);
00252     virtual double calcDuration(cMessage*) = 0;
00253 };
00254 
00255 #endif

Generated on Fri Jan 12 08:29:32 2007 for Mobility Framework by  doxygen 1.4.4