settimestamp.hh

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

HH
62
字号
// -*- c-basic-offset: 4 -*-#ifndef CLICK_SETTIMESTAMP_HH#define CLICK_SETTIMESTAMP_HH#include <click/element.hh>CLICK_DECLS/*=cSetTimestamp([TIMESTAMP, I<keyword> FIRST, DELTA])=s annotationsstore the time in the packet's timestamp annotation=dStore the specified TIMESTAMP in the packet's timestamp annotation. IfTIMESTAMP is not specified, then sets the annotation to the system time whenthe packet arrived at the SetTimestamp element.Keyword arguments are:=over 8=item FIRSTBoolean.  If true, then set the packet's "first timestamp" annotation, not itstimestamp annotation.  Default is true.=item DELTABoolean.  If true, then set the packet's timestamp annotation to thedifference between its current timestamp annotation and its "first timestamp"annotation.  Default is false.=back=a StoreTimestamp, PrintOld */class SetTimestamp : public Element { public:      SetTimestamp();    ~SetTimestamp();      const char *class_name() const		{ return "SetTimestamp"; }    const char *processing() const		{ return AGNOSTIC; }    int configure(Vector<String> &, ErrorHandler *);      Packet *simple_action(Packet *);  private:    enum { ACT_NOW, ACT_TIME, ACT_FIRST_NOW, ACT_FIRST_TIME, ACT_DELTA };    int _action;    Timestamp _tv;};CLICK_ENDDECLS#endif

⌨️ 快捷键说明

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