PacketStatistics.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 
14 #ifndef __PACKETSTATISTICS_HH__
15 #define __PACKETSTATISTICS_HH__
16 
17 // Custom includes
23 #include "MGENPacket.hh"
24 #include "IperfPacket.hh"
25 #include "MPLSPacket.hh"
26 #include "TIMPacket.hh"
27 
29 
31 {
33 
34 public:
36 
37  Accumulator rssi;
38  Accumulator rate;
39  Accumulator length;
40  std::uint64_t retries;
41  std::uint64_t aggregated;
43 
45 
46  virtual void clear();
47  bool analyze(senf::AnnotationsPacket const & ap, std::uint16_t payloadSize);
48 
49  virtual void dump(std::ostream & os, senf::ClockService::clock_type const & actualDuration, bool csv);
50 };
51 
53  : public PacketStatistics
54 {
55 public:
58 
59  FlowStatistics(std::uint8_t Sbits, std::int32_t SmaxLate, std::uint8_t Tbits);
60 
61  void clear();
62  bool analyze(senf::AnnotationsPacket const & ap, std::uint16_t payloadSize, std::uint32_t seqNo, std::uint32_t txTSamp, std::uint32_t rxTStamp);
63 
64  void dump(std::ostream & os, senf::ClockService::clock_type const & actualDuration, bool csv);
65 };
66 
68  : public FlowStatistics
69 {
70 public:
72 
73  bool analyze(MGENPacket const & mgen, senf::AnnotationsPacket const & ap);
74 };
75 
77  : public FlowStatistics
78 {
79 public:
81 
82  bool analyze(IperfUDPPacket const & iperf, senf::AnnotationsPacket const & ap);
83 };
84 
86  : public FlowStatistics
87 {
88 public:
90 
91  bool analyze(senf::TIMPacket const & tim, senf::AnnotationsPacket const & ap);
92 };
93 
95 #endif
config::time_type clock_type
virtual void dump(std::ostream &os, senf::ClockService::clock_type const &actualDuration, bool csv)
senf::ClockService::clock_type airtime
senf::TimestampStatistics tstampStats
senf::SequenceNumberStatistics seqNoStats
virtual void clear()
bool analyze(senf::AnnotationsPacket const &ap, std::uint16_t payloadSize)
std::uint64_t retries
std::uint64_t aggregated
AnnotationsPacket public header.