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

📄 requesttable.h

📁 CBRP协议(移动adhoc中基于分簇的路由协议)ns2下的源码
💻 H
字号:
/* -*- c++ -*-   requesttable.h   implement a table to keep track of the most current request   number we've heard from a node in terms of that node's id   implemented as a circular buffer   $Id: requesttable.h,v 1.2 1998/02/17 20:27:52 dmaltz Exp $*/#ifndef _requesttable_h#define _requesttable_h#include "path.h"struct Entry;enum LastType { LIMIT0, UNLIMIT};class RequestTable {public:  RequestTable(int size = 30);  ~RequestTable();  void insert(const ID& net_id, int req_num);  void insert(const ID& net_id, const ID& MAC_id, int req_num);  int get(const ID& id) const;  // rtns 0 if id not found  Entry* getEntry(const ID& id);  private:  Entry *table;  int size;  int ptr;  int find(const ID& net_id, const ID& MAC_id ) const;};struct Entry {  ID MAC_id;  ID net_id;  int req_num;  Time last_arp;  int rt_reqs_outstanding;  Time last_rt_req;  LastType last_type;};#endif //_requesttable_h

⌨️ 快捷键说明

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