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 HIDDEN exact_type

Public Member Functions

 mactime_tracker ()
void tick_32 (uint32_t ts)
void tick_64 (uint64_t ts)
void tick_tv (const struct timeval &tv)
template<class HeaderType>
void tick (const pcapxx::frame_descriptor &frame, tool::endian::endianness phy_end)
tool::microseconds microseconds () 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.

PHY headers have various fields that holds frames' arrival time on the medium. Some of them are only 32 bits long, thus wrapping every one hour and a half (roughly). This class tracks the evolution of such fields and maintains a microsecond count that does not wrap.

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


Member Typedef Documentation

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


Constructor & Destructor Documentation

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

Default constructor - initialize the microsecond count to zero.


Member Function Documentation

template<class Bottom>
void wifi::mactime_tracker< Bottom >::tick_32 ( uint32_t  ts  )  [inline]

Update the tracker with the given 32 bit timestamp.

This method tracks wraparounds and maintains a consistent microsecond count.

template<class Bottom>
void wifi::mactime_tracker< Bottom >::tick_64 ( uint64_t  ts  )  [inline]

Update the tracker with the given 64 bit timestamp.

This method assumes the given timestamp never wraparounds.

template<class Bottom>
void wifi::mactime_tracker< Bottom >::tick_tv ( const struct timeval &  tv  )  [inline]

Update the tracker with the given timeval structure.

template<class Bottom>
template<class HT>
void wifi::mactime_tracker< Bottom >::tick ( const pcapxx::frame_descriptor frame,
tool::endian::endianness  phy_end 
) [inline]

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

Retrieve the current microsecond count without wraps.

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

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 Fri Mar 28 14:53:32 2008 for wipal by  doxygen 1.5.5