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

📄 delayshaper.hh

📁 COPE the first practical network coding scheme which is developped on click
💻 HH
字号:
// -*- c-basic-offset: 4 -*-#ifndef CLICK_DELAYSHAPER_HH#define CLICK_DELAYSHAPER_HH#include <click/element.hh>#include <click/timer.hh>#include <click/notifier.hh>CLICK_DECLS/*=cDelayShaper(DELAY)=s packet schedulingshapes traffic to meet delay requirements=dPulls packets from the single input port. Delays them for at least DELAYseconds, with microsecond precision. A packet with timestamp T will be emittedno earlier than time (T + DELAY). On output, the packet's timestamp is set tothe current time.Differs from DelayUnqueue in that both its input and output are pull. Packetsbeing delayed are enqueued until the necessary time has passed. At most onepacket is enqueued at a time. DelayUnqueue returns null for every pull requestuntil the enqueued packet is ready.SetTimestamp element can be used to stamp the packet.=h delay read/writeReturns or sets the DELAY parameter.=a BandwidthShaper, DelayUnqueue, SetTimestamp */class DelayShaper : public Element, public ActiveNotifier { public:      DelayShaper();    ~DelayShaper();    const char *class_name() const	{ return "DelayShaper"; }    const char *processing() const	{ return PULL; }    void *cast(const char *);    int configure(Vector<String> &, ErrorHandler *);    int initialize(ErrorHandler *);    void cleanup(CleanupStage);    void add_handlers();    Packet *pull(int);    void run_timer();    // from ActiveNotifier    SearchOp notifier_search_op();      private:    Packet *_p;    Timestamp _delay;    Timer _timer;    NotifierSignal _upstream_signal;    static String read_param(Element *, void *);    static int write_param(const String &, Element *, void *, ErrorHandler *);    };CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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