timerange.hh

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

HH
84
字号
// -*- mode: c++; c-basic-offset: 4 -*-#ifndef CLICK_TIMERANGE_HH#define CLICK_TIMERANGE_HH#include <click/element.hh>CLICK_DECLS/*=cTimeRange(I<keyword SIMPLE>)=s measurement, analysismonitor range of packet timestamps=dTimeRange passes packets along unchanged, monitoring the smallest range thatcontains all of their timestamps. You can access that range with handlers.Keyword arguments are:=over 8=item SIMPLEBoolean. If true, then packets arrive at TimeRange with monotonicallyincreasing timestamps. Default is false.=back=h first read-onlyReturns the earliest timestamp observed, or "0.0" if no packets have passed.=h last read-onlyReturns the latest timestamp observed, or "0.0" if no packets have passed.=h range read-onlyReturns the earliest and latest timestamps observed, separated by a space.=h interval read-onlyReturns the difference between the earliest and latest timestamps observed,in seconds.=h reset write-onlyClears the stored range. Future packets will accumulate a new range.=aTimeFilter */class TimeRange : public Element { public:    TimeRange();    ~TimeRange();    const char *class_name() const	{ return "TimeRange"; }    const char *processing() const	{ return AGNOSTIC; }    int configure(Vector<String> &, ErrorHandler *);    void add_handlers();    Packet *simple_action(Packet *);      private:    Timestamp _first;    Timestamp _last;        bool _simple;    static String read_handler(Element *, void *);    static int write_handler(const String &, Element *, void *, ErrorHandler*);    };CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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