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

📄 cyclecountaccum.hh

📁 Click is a modular router toolkit. To use it you ll need to know how to compile and install the sof
💻 HH
字号:
// -*- c-basic-offset: 4 -*-#ifndef CLICK_CYCLECOUNTACCUM_HH#define CLICK_CYCLECOUNTACCUM_HH/*=cCycleCountAccum()=s counterscollects differences in cycle counters=dIncoming packets should have their cycle counter annotation set.  Measures thecurrent value of the cycle counter, and keeps track of the total accumulateddifference.  Packets whose cycle counter annotations are zero are not added tothe count or difference.=nA packet has room for either exactly one cycle count or exactly oneperformance metric.=h count read-onlyReturns the number of packets that have passed.=h cycles read-onlyReturns the accumulated cycles for all passing packets.=h zero_count read-onlyReturns the number of packets with zero-valued cycle counter annotations thathave passed.  These aren't included in the C<count>.=h reset_counts write-onlyResets C<count>, C<cycles>, and C<zero_count> counters to zero when written.=a SetCycleCount, RoundTripCycleCount, SetPerfCount, PerfCountAccum */#include <click/element.hh>class CycleCountAccum : public Element { public:    CycleCountAccum();    ~CycleCountAccum();    const char *class_name() const	{ return "CycleCountAccum"; }    const char *port_count() const	{ return PORTS_1_1; }    const char *processing() const	{ return AGNOSTIC; }    void add_handlers();    inline void smaction(Packet *);    void push(int, Packet *p);    Packet *pull(int);  private:    uint64_t _accum;    uint64_t _count;    uint64_t _zero_count;    static String read_handler(Element *, void *);    static int reset_handler(const String &, Element*, void*, ErrorHandler*);};#endif

⌨️ 快捷键说明

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