📄 d-tail.h
字号:
#ifndef ns_d_tail_h#define ns_d_tail_h#include <string.h>#include "queue.h"#include "config.h"/* * A bounded, drop-tail queue */class DTail : public Queue { public: DTail() { q_ = new PacketQueue; pq_ = q_; bind_bool("drop_front_", &drop_front_); bind_bool("summarystats_", &summarystats); bind_bool("queue_in_bytes_", &qib_); // boolean: q in bytes? bind("mean_pktsize_", &mean_pktsize_); // _RENAMED("drop-front_", "drop_front_"); //parameter for backoff instance PF = 0; CW_MIN = 0; CW_MAX = 0; AIFS = 0; //added by smallko //bind("qweight", &qweight); avgquelen=0.0; } void target_handle(NsObject* targ); void recv(Packet* p, Handler* h); ~DTail() { delete q_; } void setPF(int pf); void setCW_MIN(int cw_min); void setCW_MAX(int cw_max); void setAIFS(int aifs); void setTXOPLimit(double limit); int getPF(); int getCW_MIN(); int getCW_MAX(); int getAIFS(); double getTXOPLimit(); int getLen(); int getByteLen(); void recvHighPri(Packet* p); PacketQueue *q_; /* underlying FIFO queue */ Packet* deque(); void enque(Packet* p); void setdrop(NsObject* getdrop_); //Connector* pricon; //NsObject* qdrop_; //added by smallko double getavgLen(); protected: void reset(); int command(int argc, const char*const* argv); int drop_front_; /* drop-from-front (rather than from tail) */ int summarystats; void print_summarystats(); int qib_; /* bool: queue measured in bytes? */ int mean_pktsize_; /* configured mean packet size in bytes */ int PF; int CW_MIN; int CW_MAX; int AIFS; double LIMIT; //added by smallko //double qweight; double avgquelen;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -