TSFTHistogram.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
17 #ifndef HH_SENF_Ext_NetEmu_WLAN_TSFTHistogram_
18 #define HH_SENF_Ext_NetEmu_WLAN_TSFTHistogram_ 1
19 
20 // Custom includes
24 
25 //-/////////////////////////////////////////////////////////////////////////////////////////////////
26 
27 namespace senf {
28 namespace emu {
29 
31  {
32  public:
34 
35  TSFTHistogram();
36  void update(senf::MACAddress const & src, boost::uint64_t const & tsft);
37  bool start(senf::MACAddress const & src);
38  bool start();
39  bool enabled() const {
40  return enabled_;
41  }
42  void dump(std::ostream & os) const;
43 
44  private:
45  // we want a sorted map, even if it might be slightly slower - debugging only !
46  typedef std::map<boost::uint32_t,boost::uint32_t> TSFTMap;
47  TSFTMap tsftMap_;
48  boost::uint64_t lastTSFT_;
49  bool tsftMapInitialized_;
52  senf::MACAddress src_;
53  bool enabled_;
54  };
55 
56 }}
57 
58 //-/////////////////////////////////////////////////////////////////////////////////////////////////
59 //#include "TSFTHistogram.cci"
60 //#include "TSFTHistogram.ct"
61 //#include "TSFTHistogram.cti"
62 #endif
config::time_type clock_type
senf::console::ScopedDirectory dir
void update(senf::MACAddress const &src, boost::uint64_t const &tsft)
void dump(std::ostream &os) const