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

BasicMacLayer.h

00001 /* -*- mode:c++ -*- ********************************************************
00002  * file:        BasicMacLayer.h
00003  *
00004  * author:      Daniel Willkomm
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  * description: basic MAC layer class
00019  *              subclass to create your own MAC layer
00020  **************************************************************************/
00021 
00022 
00023 #ifndef BASICMAC_LAYER_H
00024 #define BASICMAC_LAYER_H
00025 
00026 #include <omnetpp.h>
00027 #include "BasicLayer.h"
00028 #include "MacPkt_m.h"
00029 
00040 class BasicMacLayer : public BasicLayer
00041 {
00042 protected:
00043     
00047     int headerLength;
00048 
00052     int myMacAddr;
00053     
00055     bool coreDebug;
00056 
00057 public:
00058     Module_Class_Members( BasicMacLayer, BasicLayer, 0 );
00059 
00061     virtual void initialize(int);
00062 
00073     virtual void handleUpperMsg(cMessage *msg) = 0;
00074     
00079     virtual void handleLowerMsg(cMessage *msg);
00080 
00081 protected:
00083     virtual cMessage* decapsMsg(MacPkt*);
00084 
00086     virtual MacPkt* encapsMsg(cMessage*);
00087 };
00088 
00089 #endif

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