📄 filterbyrange.hh
字号:
#ifndef CLICK_FILTERBYRANGE_HH#define CLICK_FILTERBYRANGE_HH#include <click/element.hh>#include "elements/grid/gridlocationinfo.hh"CLICK_DECLS/* * =c * FilterByRange(RANGE, LOCINFO) * =s Grid * =d * * Expects Grid MAC layer packets on input 0. Any packet transmitted * by a Grid node within RANGE metres from this node is sent to output * 0. Packets transmitted by ``out of range'' nodes are sent out * output 1. RANGE is an Integer. A negative range means no packets * are filtered out. This element is useful for simulating physical * topologies. This element uses the GridLocationInfo element named * LOCINFO. * * =a * GridLocationInfo * FilterByGridHops */class FilterByRange : public Element { public: FilterByRange(); ~FilterByRange(); const char *class_name() const { return "FilterByRange"; } const char *processing() const { return PUSH; } int configure(Vector<String> &, ErrorHandler *); int initialize(ErrorHandler *); void push(int port, Packet *);private: GridLocationInfo *_locinfo; int _range; // in metres, negative meand don't filter};CLICK_ENDDECLS#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -