00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef WIFI_FRAME_STATS_MISSED_ESTIMATIONS_HH_
00023 # define WIFI_FRAME_STATS_MISSED_ESTIMATIONS_HH_
00024
00025 # include <map>
00026
00027 # include <wipal/wifi/frame/stats/simple_counters.hh>
00028 # include <wipal/tool/microseconds.hh>
00029 # include <wipal/wifi/addr.hh>
00030
00031 namespace wifi
00032 {
00033
00034 namespace frame
00035 {
00036
00037 namespace stats
00038 {
00039
00040 struct missed_estimations: public abstract_stats
00041 {
00042 missed_estimations(const simple_counters& c);
00043
00044 void account_beacon(const tool::microseconds& tstamp,
00045 const addr& src);
00046 void account_miss();
00047 void account_gap(unsigned gap_length);
00048 std::ostream& print(std::ostream& o) const;
00049
00050 private:
00051 enum
00052 {
00053
00054
00055
00056 beacon_interval = 102400
00057 };
00058
00059 typedef std::map<addr, tool::microseconds> beacons_map;
00060
00061 beacons_map beacons_;
00062 unsigned missed_beacons_;
00063 unsigned missed_;
00064 const simple_counters* c_;
00065 };
00066
00067 }
00068
00069 }
00070
00071 }
00072
00073 # include "missed_estimations.hxx"
00074
00075 #endif // ! WIFI_FRAME_STATS_MISSED_ESTIMATIONS_HH_