wifi::mactime_tracker< Bottom > Struct Template Reference

Microsecond-grained time tracker. More...

#include <wipal/wifi/mactime_tracker.hh>

List of all members.

Public Types

typedef uint32_t mactime_type

Public Member Functions

 mactime_tracker ()
 mactime_tracker (const mactime_type &mactime_start)
void tick (const mactime_type &)
void tick (const prism::header *header, size_t caplen, bool swapped)
tool::microseconds microseconds () const
const mactime_typemactime () const


Detailed Description

template<class Bottom = tool::bottom>
struct wifi::mactime_tracker< Bottom >

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

template<class Bottom = tool::bottom>
typedef uint32_t wifi::mactime_tracker< Bottom >::mactime_type

Type of Prism headers' mactime fields.


Constructor & Destructor Documentation

template<class Bottom>
wifi::mactime_tracker< Bottom >::mactime_tracker (  )  [inline]

Default constructor - initialize the microsecond count to zero.

template<class Bottom>
wifi::mactime_tracker< Bottom >::mactime_tracker ( const mactime_type mactime_start  )  [inline]

Construct a mactime tracker according to the given starting time.


Member Function Documentation

template<class Bottom>
void wifi::mactime_tracker< Bottom >::tick ( const mactime_type m  )  [inline]

Update the tracker with the giver mactime.

template<class Bottom>
void wifi::mactime_tracker< Bottom >::tick ( const prism::header header,
size_t  caplen,
bool  swapped 
) [inline]

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

template<class Bottom>
tool::microseconds wifi::mactime_tracker< Bottom >::microseconds (  )  const [inline]

Retrieve the current microsecond count without wraps.

template<class Bottom>
const mactime_tracker< Bottom >::mactime_type & wifi::mactime_tracker< Bottom >::mactime (  )  const [inline]

Retrieve the current mactime (might wrap).


The documentation for this struct was generated from the following files:
Generated on Wed Jan 16 16:15:15 2008 for wipal by  doxygen 1.5.4