unqueue.hh

来自「COPE the first practical network coding 」· HH 代码 · 共 77 行

HH
77
字号
#ifndef CLICK_UNQUEUE_HH#define CLICK_UNQUEUE_HH#include <click/element.hh>#include <click/task.hh>#include <click/notifier.hh>CLICK_DECLS/*=cUnqueue([BURSTSIZE] [, I<KEYWORDS>])=s packet schedulingpull-to-push converter=dPulls packets whenever they are available, then pushes them outits single output. Pulls a maximum of BURSTSIZE packets every timeit is scheduled. Default BURSTSIZE is 1. If BURSTSIZEis less than 0, pull until nothing comes back.Keyword arguments are:=over 4=item ACTIVEIf false, does nothing (doesn't pull packets). One possible useis to set ACTIVE to false in the configuration, and laterchange it to true with a handler from DriverManager element.The default value is true.=back=h count read-onlyReturns the count of packets that have passed through Unqueue.=h active read/writeThe same as ACTIVE keyword.=a RatedUnqueue, BandwidthRatedUnqueue*/class Unqueue : public Element { public:    Unqueue();  ~Unqueue();    const char *class_name() const		{ return "Unqueue"; }  const char *processing() const		{ return PULL_TO_PUSH; }    int configure(Vector<String> &, ErrorHandler *);  int initialize(ErrorHandler *);  void add_handlers();    bool run_task();  static String read_param(Element *e, void *);  static int write_param(const String &, Element *, void *, ErrorHandler *); private:    bool _active;  int32_t _burst;  unsigned _count;  Task _task;  NotifierSignal _signal;};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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