00001 /* -*- mode:c++ -*- ******************************************************** 00002 * file: AlohaMacLayer.h 00003 * 00004 * author: Jerome Rousselot <jerome.rousselot@csem.ch> 00005 * 00006 * copyright: (C) 2008 Centre Suisse d'Electronique et Microtechnique (CSEM) SA 00007 * Systems Engineering 00008 * Real-Time Software and Networking 00009 * Jaquet-Droz 1, CH-2002 Neuchatel, Switzerland. 00010 * 00011 * This program is free software; you can redistribute it 00012 * and/or modify it under the terms of the GNU General Public 00013 * License as published by the Free Software Foundation; either 00014 * version 2 of the License, or (at your option) any later 00015 * version. 00016 * For further information see file COPYING 00017 * in the top level directory 00018 * description: this class implements a basic Aloha MAC protocol for an UWB-IR 00019 * IEEE 802.15.4A transceiver to allow testing the PHY layer. 00020 ***************************************************************************/ 00021 00022 #ifndef ALOHA_MAC_LAYER_H 00023 #define ALOHA_MAC_LAYER_H 00024 00025 #include "UWBIRMac.h" 00026 00027 using namespace std; 00028 00038 class AlohaMacLayer : public UWBIRMac { 00039 00040 public: 00041 00042 virtual void initialize(int stage); 00043 00044 virtual void finish(); 00045 00046 int minBE; 00047 int maxBE; 00048 00049 protected: 00050 00051 virtual MacPkt* encapsMsg(cPacket *msg); 00052 00053 00054 virtual void handleLowerMsg(cMessage *msg); 00055 00056 //virtual void handleUpperMsg(cMessage * msg); 00057 00058 }; 00059 00060 #endif // ALOHA_MAC_LAYER_H 00061