randomsource.hh

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

HH
45
字号
#ifndef CLICK_RANDOMSOURCE_HH#define CLICK_RANDOMSOURCE_HH#include <click/element.hh>#include <click/task.hh>CLICK_DECLS/* * =c * RandomSource(LENGTH) * =s sources * generates random packets whenever scheduled * =d * * Creates packets, of the indicated length, filled with random bytes. * Packets' timestamp annotations are set to the current time. * * =a InfiniteSource */class RandomSource : public Element { public:    RandomSource();  ~RandomSource();    const char *class_name() const		{ return "RandomSource"; }  const char *processing() const		{ return AGNOSTIC; }  int configure(Vector<String> &, ErrorHandler *);  int initialize(ErrorHandler *);  void add_handlers();  Packet *pull(int);  bool run_task(); protected:    int _length;  Task _task;    Packet *make_packet();};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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