⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mac-802_16-timers.h

📁 OPNET 中的Wimax模块, 主要用于wimax 无线网络仿真,以及普通无线网络仿真.
💻 H
字号:
/***************************************************************************** * WiMAX module * * Copyright (C) 2008 Juliana Freitag Borin, Flavio Kubota and Nelson L. * S. da Fonseca - wimaxgroup@lrc.ic.unicamp.br * * This program is a free result: you can redistribute it and/or modify * it under the terms of the UOL Public License Version 1 or (at your * option) any later version. The license terms are available at * http://bolsapesquisa.uol.com.br/lpu.jhtm. * * *	12/17/02 *      Nitin Shrivastav			 *       *      This file contains Timer class definitions.  * ****************************************************************************//*! \file mac-802_16-timers.h   This file contains Timer class definitions. */#ifndef ns_mac_802_16timers_h#define ns_mac_802_16timers_h//#include "mac-802_16.h"/*=======================CLASS DEFINITIONS============================*//*========================TIMER CLASSES===============================*/class Mac802_16;/*************************************************************************Base class for all the timer classes*************************************************************************//*! Base class for all the timer classes */class Mac802_16Timer : public Handler { public:   Mac802_16Timer(Mac802_16* m) : mac(m)      {      busy_ =  paused_ = 0; stime = rtime = 0.0;     }        virtual void handle(Event *e) {} ;        void start(Packet *e, double time);    virtual void stop(Packet *e);        inline int busy(void)       { 	return busy_;       }        inline double expire(void)       {	return((stime + rtime) - Scheduler::instance().clock());      }     protected:    Mac802_16 	*mac;    int		busy_;    int 	paused_;    Event	intr;    double	stime;	// start time    double	rtime;	// remaining time};/*=================== Timers common to BS & SS =======================*//************************************************************************* Timers to control packet sending and receiving time.*************************************************************************//*! Timers to control packet sending and receiving time. */class RxPkt802_16Timer : public Mac802_16Timer { public:  RxPkt802_16Timer(Mac802_16 *m) : Mac802_16Timer(m) {}        void handle(Event *e);};/**************************************************************************************************************************************************/class TxPkt802_16Timer : public Mac802_16Timer {   public:  TxPkt802_16Timer(Mac802_16 *m) : Mac802_16Timer(m) {}        void handle(Event *e);};/*==================== End Timers common to BS & SS ==================*//*======================== BS timers================================= *//**************************************************************************************************************************************************/class BsTxPkt802_16Timer : public Mac802_16Timer {   public:  BsTxPkt802_16Timer(Mac802_16 *m) : Mac802_16Timer(m) {}        void handle(Event *e);};/*************************************************************************Timers to schedule transmition of MAPS.*************************************************************************//*! Timers to schedule transmition of MAPS. */class Map802_16Timer : public Mac802_16Timer { public:  Map802_16Timer(Mac802_16 *m) : Mac802_16Timer(m) {}        void handle(Event *e);};/*************************************************************************Timers to schedule transmition of Management messages*************************************************************************//*! Timers to schedule transmition of Management messages */class BsUcd802_16Timer : public Mac802_16Timer { public:  BsUcd802_16Timer(Mac802_16 *m) : Mac802_16Timer(m) {}        void handle(Event *e);};/**************************************************************************************************************************************************/class BsRng802_16Timer : public Mac802_16Timer { public:  BsRng802_16Timer(Mac802_16 *m) : Mac802_16Timer(m) {}      void handle(Event *e);};/**************************************************************************************************************************************************/class BsSync802_16Timer : public Mac802_16Timer { public:  BsSync802_16Timer(Mac802_16 *m) : Mac802_16Timer(m) {}        void handle(Event *e);};//#ifdef RATE_CONTROL//---------------------------------------------------/**************************************************************************************************************************************************/class BsToken802_16Timer : public Mac802_16Timer { public:  BsToken802_16Timer(Mac802_16 *m) : Mac802_16Timer(m) {}        void handle(Event *e);};//#endif//----------------------------------------------------------------/**************************************************************************************************************************************************/class BsServiceFlowSendTimer: public Mac802_16Timer { public:  BsServiceFlowSendTimer(Mac802_16 *m) : Mac802_16Timer(m) {}        void handle(Event *e);};/*************************************************************************Window used to control the provision of the minimum BW requested byrtPS and nrtPS services.*************************************************************************//*! Window used to control the provision of the minimum BW requested byrtPS and nrtPS services. */class BsUplinkSchedWindowTimer: public Mac802_16Timer{ public:  BsUplinkSchedWindowTimer(Mac802_16 *m) : Mac802_16Timer(m) {}  void handle(Event *e);};/*======================== END BS timers============================= *//*======================== SS timers=================================== *//*************************************************************************Timers to schedule transmition of Management messages*************************************************************************//*! Timers to schedule transmition of Management messages */class SSRng802_16Timer : public Mac802_16Timer { public:  SSRng802_16Timer(Mac802_16 *m) : Mac802_16Timer(m) {}        void handle(Event *e);};/*************************************************************************SEND timer..(per service-flow timer) *************************************************************************//*! SEND timer..(per service-flow timer) */class SSServiceFlowSendTimer : public Mac802_16Timer { public:  SSServiceFlowSendTimer(Mac802_16 *m) : Mac802_16Timer(m) {}        void handle(Event *e);};/*************************************************************************REQUEST timer..(per service-flow timer)*************************************************************************//*! REQUEST timer..(per service-flow timer) */class SSServiceFlowRequestTimer : public Mac802_16Timer { public:  SSServiceFlowRequestTimer(Mac802_16 *m) : Mac802_16Timer(m) {}        void handle(Event *e);};/*======================== End SS timers=================================== */#endif /* __mac_802_16timers_h__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -