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

📄 hgpsrequesttable.h

📁 在Linux下做的QuadTree的程序
💻 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   Derived from dmaltz's DSR implementation   $Id: hgpsrequesttable.h,v 1.1.1.1 2000/08/28 18:40:22 jinyang Exp $*/#ifndef _hgpsrequesttable_h#define _hgpsrequesttable_h#define RT_RQ_PERIOD 0.5#include <config.h>struct HGPSEntry {  nsaddr_t id;  int req_num;  int rt_reqs_outstanding;  double last_rt_req;};class HGPSRequestTable {public:  HGPSRequestTable(int size = 30);  ~HGPSRequestTable();  void insert(nsaddr_t net_id, int req_num);  int get(nsaddr_t id);  // rtns 0 if id not found  HGPSEntry* getHGPSEntry(nsaddr_t id);  private:  HGPSEntry *table;  int size;  int ptr;  int find(nsaddr_t net_id);};#endif //_requesttable_h

⌨️ 快捷键说明

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