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_FILTER_UNIQUELY_IDENTIFIABLE_HH_
00023 # define WIFI_FRAME_FILTER_UNIQUELY_IDENTIFIABLE_HH_
00024
00025 # include <trace-tools/prism_header.hh>
00026 # include <trace-tools/tool/iterator_base.hh>
00027 # include <trace-tools/tool/iterable.hh>
00028 # include <trace-tools/wifi/addr_mapping.hh>
00029 # include <trace-tools/wifi/mactime_tracker.hh>
00030
00031 # include "uniquely_identifiable_fwd.hh"
00032
00033 namespace tool
00034 {
00035
00040 template <class U, class I, class H, class B1, class B2>
00041 struct types< wifi::frame::filter::internals::ui_iterator<U, I, H, B1, B2> >
00042 {
00043 typedef
00044 wifi::frame::filter::internals::ui_iterator_value_type<U>
00045 value_type;
00046
00047 typedef
00048 wifi::frame::filter::uniquely_identifiable<U, I, H, B1>
00049 iterable_type;
00050 };
00051
00056 template <class U, class I, class H, class B>
00057 struct types< wifi::frame::filter::uniquely_identifiable<U, I, H, B> >
00058 {
00059 typedef
00060 wifi::frame::filter::internals::ui_iterator<U, I, H, B, bottom>
00061 iterator;
00062 };
00063
00064 }
00065
00066 namespace wifi
00067 {
00068 namespace frame
00069 {
00070
00077 namespace filter
00078 {
00079
00081 namespace internals
00082 {
00083
00085 template <class UniqueId>
00086 struct ui_iterator_value_type: public UniqueId
00087 {
00092 ui_iterator_value_type(const UniqueId&,
00093 const tool::microseconds&);
00094
00096 const tool::microseconds& microseconds() const;
00097
00098 private:
00099 tool::microseconds microseconds_;
00100 };
00101
00103 template <class U, class I, class H, class B, class Bottom>
00104 struct ui_iterator: tt_inherit(public tool::iterator_base,
00105 ui_iterator<U, I, H, B, Bottom>)
00106 {
00108 typedef
00109 tt_get_exact(Bottom, ui_iterator<U, I, H, B, Bottom>) exact_type;
00110 typedef tt_type(iterable_type, exact_type) iterable_type;
00111
00113 ui_iterator(iterable_type& uif, bool end);
00114
00116 void increment();
00117 };
00118
00119 }
00120
00121
00123 template <class UniqueId,
00124 class InputIterator,
00125 class HeaderType = prism::header,
00126 class Bottom = tool::bottom>
00127 struct uniquely_identifiable:
00128 tt_inherit(public tool::iterable,
00129 uniquely_identifiable<UniqueId, InputIterator, HeaderType,
00130 Bottom>)
00131 {
00136 uniquely_identifiable(const InputIterator& begin,
00137 const InputIterator& end,
00138 addr_mapping&);
00139
00140 bool prism_header_noise_means_error;
00141
00142 private:
00143 InputIterator next_;
00144 InputIterator end_;
00145 addr_mapping* mapping_;
00146 mactime_tracker mactime_;
00147
00148 friend class internals::ui_iterator<UniqueId,
00149 InputIterator,
00150 HeaderType,
00151 Bottom, tool::bottom>;
00152 };
00153
00154 }
00155
00156 }
00157
00158 }
00159
00160 # include "uniquely_identifiable.hxx"
00161
00162 #endif