SENF Extensible Network Framework
Home
Overview
Examples
HowTos
Glossary
Ext
NetEmu
PPI
Packets
Scheduler
Socket
Utils
Console
Daemon
Logger
Termlib
WLAN
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
21
#include <
senf/Utils/Console/ScopedDirectory.hh
>
22
#include <
senf/Socket/Protocols/Raw/MACAddress.hh
>
23
#include <
senf/Scheduler/ClockService.hh
>
24
25
//-/////////////////////////////////////////////////////////////////////////////////////////////////
26
27
namespace
senf
{
28
namespace
emu
{
29
30
class
TSFTHistogram
31
{
32
public
:
33
senf::console::ScopedDirectory<>
dir
;
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_;
50
senf::ClockService::clock_type
startTime_;
51
senf::ClockService::clock_type
duration_;
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
MACAddress.hh
senf::ClockService::clock_type
config::time_type clock_type
ScopedDirectory.hh
senf::MACAddress
senf::emu::TSFTHistogram::TSFTHistogram
TSFTHistogram()
Definition:
TSFTHistogram.cc:28
senf::emu::TSFTHistogram::start
bool start()
Definition:
TSFTHistogram.cc:92
senf::console::ScopedDirectory
senf::emu::TSFTHistogram::dir
senf::console::ScopedDirectory dir
Definition:
TSFTHistogram.hh:33
senf::emu::TSFTHistogram::enabled
bool enabled() const
Definition:
TSFTHistogram.hh:39
senf
Definition:
Annotations.hh:27
ClockService.hh
senf::emu::TSFTHistogram::update
void update(senf::MACAddress const &src, boost::uint64_t const &tsft)
Definition:
TSFTHistogram.cc:52
senf::emu::TSFTHistogram
Definition:
TSFTHistogram.hh:30
senf::emu::TSFTHistogram::dump
void dump(std::ostream &os) const
Definition:
TSFTHistogram.cc:107
senf::emu
Definition:
Annotations.hh:28