wifi::mactime_tracker< Bottom > Struct Template Reference

Microsecond-grained time tracker. More...

#include <wipal/wifi/mactime_tracker.hh>

Inheritance diagram for wifi::mactime_tracker< Bottom >:

tool::static_base< Bottom >

List of all members.

Public Types

typedef uint32_t mactime_type
typedef HIDDEN exact_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
Downcast methods
const exact_typeexact () const
exact_typeexact ()
const exact_typeexact_ptr () const
exact_typeexact_ptr ()


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.

template<class Bottom>
typedef HIDDEN tool::static_base< Bottom >::exact_type [inherited]

Exact type for this template instanciation.

See also:
static_base

Reimplemented in pcapxx::descriptor< Bottom >, pcapxx::internals::frame_iterator< Bottom >, tool::iterable< Bottom >, tool::iterator< Bottom >, tool::valued_iterator< Bottom >, tool::window< InputIterator, WSize, Step, Bottom >, wifi::frame::filter::internals::non_noisy_prism_iterator< I, B, Bottom >, wifi::frame::filter::internals::uniquely_identifiable_iterator< U, I, H, B, Bottom >, and wifi::time_converter< Bottom >.


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).

template<class Bottom>
const static_base< Bottom >::exact_type & tool::static_base< Bottom >::exact (  )  const [inline, inherited]

Safely downcast to the exact type as a const reference.

template<class Bottom>
static_base< Bottom >::exact_type & tool::static_base< Bottom >::exact (  )  [inline, inherited]

Safely downcast to the exact type as a non-const reference.

template<class Bottom>
const static_base< Bottom >::exact_type * tool::static_base< Bottom >::exact_ptr (  )  const [inline, inherited]

Safely downcast to the exact type as a const pointer.

template<class Bottom>
static_base< Bottom >::exact_type * tool::static_base< Bottom >::exact_ptr (  )  [inline, inherited]

Safely downcast to the exact type as a non-const pointer.


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