wifi::mactime_tracker Struct Reference

Microsecond-grained time tracker. More...

#include <trace-tools/wifi/mactime_tracker.hh>

List of all members.

Public Types

typedef uint32_t mactime

Public Member Functions

 mactime_tracker ()
void tick (mactime)
void tick (const prism::header *h, size_t caplen)
 operator tool::microseconds () const


Detailed Description

Microsecond-grained time tracker.

Prism headers have a mactime field that holds frames' MAC arrival time. But this field is only 32 bits long, thus wrapping every one hour and a half (roughly). This class tracks the evolution of mactime fields from Prism headers and maintains a microsecond count that does not wrap.

Just call the tick() method for every mactime fields you get in your trace.


Member Typedef Documentation

typedef uint32_t wifi::mactime_tracker::mactime

Type of Prism headers' mactime fields.


Constructor & Destructor Documentation

wifi::mactime_tracker::mactime_tracker (  )  [inline]

Default constructor - initialize the tracker to zero.


Member Function Documentation

void wifi::mactime_tracker::tick ( mactime  m  )  [inline]

Update the tracker with the giver mactime.

void wifi::mactime_tracker::tick ( const prism::header h,
size_t  caplen 
) [inline]

Update the tracker with the given Prism header's MAC time.

wifi::mactime_tracker::operator tool::microseconds (  )  const [inline]

Retrieve the current time without wraps.


The documentation for this struct was generated from the following files:
Generated on Wed Sep 12 16:02:47 2007 for trace-tools by  doxygen 1.5.3