|
INET Framework for OMNeT++/OMNEST
|
00001 /* -*- mode:c++ -*- ******************************************************** 00002 * file: WirelessMacBase.h 00003 * 00004 * derived by Andras Varga using decremental programming from BasicMacLayer.h, 00005 * which had the following copyright: 00006 * 00007 * author: Daniel Willkomm 00008 * 00009 * copyright: (C) 2004 Telecommunication Networks Group (TKN) at 00010 * Technische Universitaet Berlin, Germany. 00011 * 00012 * This program is free software; you can redistribute it 00013 * and/or modify it under the terms of the GNU Lesser General Public 00014 * License as published by the Free Software Foundation; either 00015 * version 2 of the License, or (at your option) any later 00016 * version. 00017 * For further information see file COPYING 00018 * in the top level directory 00019 *************************************************************************** 00020 * part of: framework implementation developed by tkn 00021 **************************************************************************/ 00022 00023 00024 #ifndef WIRELESSMACBASE_H 00025 #define WIRELESSMACBASE_H 00026 00027 #include <omnetpp.h> 00028 #include "INETDefs.h" 00029 #include "NotifierConsts.h" 00030 00031 class NotificationBoard; 00032 00038 class INET_API WirelessMacBase : public cSimpleModule 00039 { 00040 protected: 00043 int uppergateIn; 00044 int uppergateOut; 00045 int lowergateIn; 00046 int lowergateOut; 00048 00050 NotificationBoard *nb; 00051 00052 protected: 00054 virtual void initialize(int); 00055 00057 virtual void handleMessage(cMessage *msg); 00058 00059 protected: 00066 virtual void handleSelfMsg(cMessage *msg) = 0; 00067 00069 virtual void handleUpperMsg(cPacket *msg) = 0; 00070 00072 virtual void handleCommand(cMessage *msg) = 0; 00073 00075 virtual void handleLowerMsg(cPacket *msg) = 0; 00076 00077 virtual bool isUpperMsg(cMessage *msg); 00078 virtual bool isLowerMsg(cMessage *msg); 00080 00084 virtual void sendDown(cMessage *msg); 00085 00087 virtual void sendUp(cMessage *msg); 00089 }; 00090 00091 #endif 00092