A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
flow-monitor.cc
Go to the documentation of this file.
1//
2// Copyright (c) 2009 INESC Porto
3//
4// This program is free software; you can redistribute it and/or modify
5// it under the terms of the GNU General Public License version 2 as
6// published by the Free Software Foundation;
7//
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// GNU General Public License for more details.
12//
13// You should have received a copy of the GNU General Public License
14// along with this program; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
18//
19
20#include "flow-monitor.h"
21
22#include "ns3/double.h"
23#include "ns3/log.h"
24#include "ns3/simulator.h"
25
26#include <fstream>
27#include <sstream>
28
29#define PERIODIC_CHECK_INTERVAL (Seconds(1))
30
31namespace ns3
32{
33
34NS_LOG_COMPONENT_DEFINE("FlowMonitor");
35
37
38TypeId
40{
41 static TypeId tid =
42 TypeId("ns3::FlowMonitor")
44 .SetGroupName("FlowMonitor")
45 .AddConstructor<FlowMonitor>()
46 .AddAttribute(
47 "MaxPerHopDelay",
48 ("The maximum per-hop delay that should be considered. "
49 "Packets still not received after this delay are to be considered lost."),
50 TimeValue(Seconds(10.0)),
53 .AddAttribute("StartTime",
54 ("The time when the monitoring starts."),
55 TimeValue(Seconds(0.0)),
58 .AddAttribute("DelayBinWidth",
59 ("The width used in the delay histogram."),
60 DoubleValue(0.001),
62 MakeDoubleChecker<double>())
63 .AddAttribute("JitterBinWidth",
64 ("The width used in the jitter histogram."),
65 DoubleValue(0.001),
67 MakeDoubleChecker<double>())
68 .AddAttribute("PacketSizeBinWidth",
69 ("The width used in the packetSize histogram."),
70 DoubleValue(20),
72 MakeDoubleChecker<double>())
73 .AddAttribute("FlowInterruptionsBinWidth",
74 ("The width used in the flowInterruptions histogram."),
75 DoubleValue(0.250),
77 MakeDoubleChecker<double>())
78 .AddAttribute(
79 "FlowInterruptionsMinTime",
80 ("The minimum inter-arrival time that is considered a flow interruption."),
81 TimeValue(Seconds(0.5)),
84 return tid;
85}
86
89{
90 return GetTypeId();
91}
92
94 : m_enabled(false)
95{
96 NS_LOG_FUNCTION(this);
97}
98
99void
101{
102 NS_LOG_FUNCTION(this);
105 for (auto iter = m_classifiers.begin(); iter != m_classifiers.end(); iter++)
106 {
107 *iter = nullptr;
108 }
109 for (uint32_t i = 0; i < m_flowProbes.size(); i++)
110 {
111 m_flowProbes[i]->Dispose();
112 m_flowProbes[i] = nullptr;
113 }
115}
116
119{
120 NS_LOG_FUNCTION(this);
121 auto iter = m_flowStats.find(flowId);
122 if (iter == m_flowStats.end())
123 {
124 FlowMonitor::FlowStats& ref = m_flowStats[flowId];
125 ref.delaySum = Seconds(0);
126 ref.jitterSum = Seconds(0);
127 ref.lastDelay = Seconds(0);
128 ref.txBytes = 0;
129 ref.rxBytes = 0;
130 ref.txPackets = 0;
131 ref.rxPackets = 0;
132 ref.lostPackets = 0;
133 ref.timesForwarded = 0;
138 return ref;
139 }
140 else
141 {
142 return iter->second;
143 }
144}
145
146void
148 uint32_t flowId,
149 uint32_t packetId,
151{
152 NS_LOG_FUNCTION(this << probe << flowId << packetId << packetSize);
153 if (!m_enabled)
154 {
155 NS_LOG_DEBUG("FlowMonitor not enabled; returning");
156 return;
157 }
158 Time now = Simulator::Now();
159 TrackedPacket& tracked = m_trackedPackets[std::make_pair(flowId, packetId)];
160 tracked.firstSeenTime = now;
161 tracked.lastSeenTime = tracked.firstSeenTime;
162 tracked.timesForwarded = 0;
163 NS_LOG_DEBUG("ReportFirstTx: adding tracked packet (flowId=" << flowId << ", packetId="
164 << packetId << ").");
165
166 probe->AddPacketStats(flowId, packetSize, Seconds(0));
167
168 FlowStats& stats = GetStatsForFlow(flowId);
169 stats.txBytes += packetSize;
170 stats.txPackets++;
171 if (stats.txPackets == 1)
172 {
173 stats.timeFirstTxPacket = now;
174 }
175 stats.timeLastTxPacket = now;
176}
177
178void
180 uint32_t flowId,
181 uint32_t packetId,
183{
184 NS_LOG_FUNCTION(this << probe << flowId << packetId << packetSize);
185 if (!m_enabled)
186 {
187 NS_LOG_DEBUG("FlowMonitor not enabled; returning");
188 return;
189 }
190 std::pair<FlowId, FlowPacketId> key(flowId, packetId);
191 auto tracked = m_trackedPackets.find(key);
192 if (tracked == m_trackedPackets.end())
193 {
194 NS_LOG_WARN("Received packet forward report (flowId="
195 << flowId << ", packetId=" << packetId << ") but not known to be transmitted.");
196 return;
197 }
198
199 tracked->second.timesForwarded++;
200 tracked->second.lastSeenTime = Simulator::Now();
201
202 Time delay = (Simulator::Now() - tracked->second.firstSeenTime);
203 probe->AddPacketStats(flowId, packetSize, delay);
204}
205
206void
208 uint32_t flowId,
209 uint32_t packetId,
211{
212 NS_LOG_FUNCTION(this << probe << flowId << packetId << packetSize);
213 if (!m_enabled)
214 {
215 NS_LOG_DEBUG("FlowMonitor not enabled; returning");
216 return;
217 }
218 auto tracked = m_trackedPackets.find(std::make_pair(flowId, packetId));
219 if (tracked == m_trackedPackets.end())
220 {
221 NS_LOG_WARN("Received packet last-tx report (flowId="
222 << flowId << ", packetId=" << packetId << ") but not known to be transmitted.");
223 return;
224 }
225
226 Time now = Simulator::Now();
227 Time delay = (now - tracked->second.firstSeenTime);
228 probe->AddPacketStats(flowId, packetSize, delay);
229
230 FlowStats& stats = GetStatsForFlow(flowId);
231 stats.delaySum += delay;
232 stats.delayHistogram.AddValue(delay.GetSeconds());
233 if (stats.rxPackets > 0)
234 {
235 Time jitter = stats.lastDelay - delay;
236 if (jitter > Seconds(0))
237 {
238 stats.jitterSum += jitter;
239 stats.jitterHistogram.AddValue(jitter.GetSeconds());
240 }
241 else
242 {
243 stats.jitterSum -= jitter;
244 stats.jitterHistogram.AddValue(-jitter.GetSeconds());
245 }
246 }
247 stats.lastDelay = delay;
248
249 stats.rxBytes += packetSize;
251 stats.rxPackets++;
252 if (stats.rxPackets == 1)
253 {
254 stats.timeFirstRxPacket = now;
255 }
256 else
257 {
258 // measure possible flow interruptions
259 Time interArrivalTime = now - stats.timeLastRxPacket;
260 if (interArrivalTime > m_flowInterruptionsMinTime)
261 {
262 stats.flowInterruptionsHistogram.AddValue(interArrivalTime.GetSeconds());
263 }
264 }
265 stats.timeLastRxPacket = now;
266 stats.timesForwarded += tracked->second.timesForwarded;
267
268 NS_LOG_DEBUG("ReportLastTx: removing tracked packet (flowId=" << flowId << ", packetId="
269 << packetId << ").");
270
271 m_trackedPackets.erase(tracked); // we don't need to track this packet anymore
272}
273
274void
276 uint32_t flowId,
277 uint32_t packetId,
279 uint32_t reasonCode)
280{
281 NS_LOG_FUNCTION(this << probe << flowId << packetId << packetSize << reasonCode);
282 if (!m_enabled)
283 {
284 NS_LOG_DEBUG("FlowMonitor not enabled; returning");
285 return;
286 }
287
288 probe->AddPacketDropStats(flowId, packetSize, reasonCode);
289
290 FlowStats& stats = GetStatsForFlow(flowId);
291 stats.lostPackets++;
292 if (stats.packetsDropped.size() < reasonCode + 1)
293 {
294 stats.packetsDropped.resize(reasonCode + 1, 0);
295 stats.bytesDropped.resize(reasonCode + 1, 0);
296 }
297 ++stats.packetsDropped[reasonCode];
298 stats.bytesDropped[reasonCode] += packetSize;
299 NS_LOG_DEBUG("++stats.packetsDropped["
300 << reasonCode << "]; // becomes: " << stats.packetsDropped[reasonCode]);
301
302 auto tracked = m_trackedPackets.find(std::make_pair(flowId, packetId));
303 if (tracked != m_trackedPackets.end())
304 {
305 // we don't need to track this packet anymore
306 // FIXME: this will not necessarily be true with broadcast/multicast
307 NS_LOG_DEBUG("ReportDrop: removing tracked packet (flowId=" << flowId << ", packetId="
308 << packetId << ").");
309 m_trackedPackets.erase(tracked);
310 }
311}
312
315{
316 return m_flowStats;
317}
318
319void
321{
322 NS_LOG_FUNCTION(this << maxDelay.As(Time::S));
323 Time now = Simulator::Now();
324
325 for (auto iter = m_trackedPackets.begin(); iter != m_trackedPackets.end();)
326 {
327 if (now - iter->second.lastSeenTime >= maxDelay)
328 {
329 // packet is considered lost, add it to the loss statistics
330 auto flow = m_flowStats.find(iter->first.first);
331 NS_ASSERT(flow != m_flowStats.end());
332 flow->second.lostPackets++;
333
334 // we won't track it anymore
335 m_trackedPackets.erase(iter++);
336 }
337 else
338 {
339 iter++;
340 }
341 }
342}
343
344void
346{
348}
349
350void
352{
355}
356
357void
359{
362}
363
364void
366{
367 m_flowProbes.push_back(probe);
368}
369
372{
373 return m_flowProbes;
374}
375
376void
378{
379 NS_LOG_FUNCTION(this << time.As(Time::S));
380 if (m_enabled)
381 {
382 NS_LOG_DEBUG("FlowMonitor already enabled; returning");
383 return;
384 }
386 NS_LOG_DEBUG("Scheduling start at " << time.As(Time::S));
388}
389
390void
392{
393 NS_LOG_FUNCTION(this << time.As(Time::S));
395 NS_LOG_DEBUG("Scheduling stop at " << time.As(Time::S));
397}
398
399void
401{
402 NS_LOG_FUNCTION(this);
403 if (m_enabled)
404 {
405 NS_LOG_DEBUG("FlowMonitor already enabled; returning");
406 return;
407 }
408 m_enabled = true;
409}
410
411void
413{
414 NS_LOG_FUNCTION(this);
415 if (!m_enabled)
416 {
417 NS_LOG_DEBUG("FlowMonitor not enabled; returning");
418 return;
419 }
420 m_enabled = false;
422}
423
424void
426{
427 m_classifiers.push_back(classifier);
428}
429
430void
432 uint16_t indent,
433 bool enableHistograms,
434 bool enableProbes)
435{
436 NS_LOG_FUNCTION(this << indent << enableHistograms << enableProbes);
438
439 os << std::string(indent, ' ') << "<FlowMonitor>\n";
440 indent += 2;
441 os << std::string(indent, ' ') << "<FlowStats>\n";
442 indent += 2;
443 for (auto flowI = m_flowStats.begin(); flowI != m_flowStats.end(); flowI++)
444 {
445 os << std::string(indent, ' ');
446#define ATTRIB(name) << " " #name "=\"" << flowI->second.name << "\""
447#define ATTRIB_TIME(name) << " " #name "=\"" << flowI->second.name.As(Time::NS) << "\""
448 os << "<Flow flowId=\"" << flowI->first
449 << "\"" ATTRIB_TIME(timeFirstTxPacket) ATTRIB_TIME(timeFirstRxPacket)
450 ATTRIB_TIME(timeLastTxPacket) ATTRIB_TIME(timeLastRxPacket) ATTRIB_TIME(delaySum)
451 ATTRIB_TIME(jitterSum) ATTRIB_TIME(lastDelay) ATTRIB(txBytes) ATTRIB(rxBytes)
452 ATTRIB(txPackets) ATTRIB(rxPackets) ATTRIB(lostPackets)
453 ATTRIB(timesForwarded)
454 << ">\n";
455#undef ATTRIB_TIME
456#undef ATTRIB
457
458 indent += 2;
459 for (uint32_t reasonCode = 0; reasonCode < flowI->second.packetsDropped.size();
460 reasonCode++)
461 {
462 os << std::string(indent, ' ');
463 os << "<packetsDropped reasonCode=\"" << reasonCode << "\""
464 << " number=\"" << flowI->second.packetsDropped[reasonCode] << "\" />\n";
465 }
466 for (uint32_t reasonCode = 0; reasonCode < flowI->second.bytesDropped.size(); reasonCode++)
467 {
468 os << std::string(indent, ' ');
469 os << "<bytesDropped reasonCode=\"" << reasonCode << "\""
470 << " bytes=\"" << flowI->second.bytesDropped[reasonCode] << "\" />\n";
471 }
472 if (enableHistograms)
473 {
474 flowI->second.delayHistogram.SerializeToXmlStream(os, indent, "delayHistogram");
475 flowI->second.jitterHistogram.SerializeToXmlStream(os, indent, "jitterHistogram");
476 flowI->second.packetSizeHistogram.SerializeToXmlStream(os,
477 indent,
478 "packetSizeHistogram");
479 flowI->second.flowInterruptionsHistogram.SerializeToXmlStream(
480 os,
481 indent,
482 "flowInterruptionsHistogram");
483 }
484 indent -= 2;
485
486 os << std::string(indent, ' ') << "</Flow>\n";
487 }
488 indent -= 2;
489 os << std::string(indent, ' ') << "</FlowStats>\n";
490
491 for (auto iter = m_classifiers.begin(); iter != m_classifiers.end(); iter++)
492 {
493 (*iter)->SerializeToXmlStream(os, indent);
494 }
495
496 if (enableProbes)
497 {
498 os << std::string(indent, ' ') << "<FlowProbes>\n";
499 indent += 2;
500 for (uint32_t i = 0; i < m_flowProbes.size(); i++)
501 {
502 m_flowProbes[i]->SerializeToXmlStream(os, indent, i);
503 }
504 indent -= 2;
505 os << std::string(indent, ' ') << "</FlowProbes>\n";
506 }
507
508 indent -= 2;
509 os << std::string(indent, ' ') << "</FlowMonitor>\n";
510}
511
512std::string
513FlowMonitor::SerializeToXmlString(uint16_t indent, bool enableHistograms, bool enableProbes)
514{
515 NS_LOG_FUNCTION(this << indent << enableHistograms << enableProbes);
516 std::ostringstream os;
517 SerializeToXmlStream(os, indent, enableHistograms, enableProbes);
518 return os.str();
519}
520
521void
522FlowMonitor::SerializeToXmlFile(std::string fileName, bool enableHistograms, bool enableProbes)
523{
524 NS_LOG_FUNCTION(this << fileName << enableHistograms << enableProbes);
525 std::ofstream os(fileName, std::ios::out | std::ios::binary);
526 os << "<?xml version=\"1.0\" ?>\n";
527 SerializeToXmlStream(os, 0, enableHistograms, enableProbes);
528 os.close();
529}
530
531void
533{
534 NS_LOG_FUNCTION(this);
535
536 for (auto& iter : m_flowStats)
537 {
538 auto& flowStat = iter.second;
539 flowStat.delaySum = Seconds(0);
540 flowStat.jitterSum = Seconds(0);
541 flowStat.lastDelay = Seconds(0);
542 flowStat.txBytes = 0;
543 flowStat.rxBytes = 0;
544 flowStat.txPackets = 0;
545 flowStat.rxPackets = 0;
546 flowStat.lostPackets = 0;
547 flowStat.timesForwarded = 0;
548 flowStat.bytesDropped.clear();
549 flowStat.packetsDropped.clear();
550
551 flowStat.delayHistogram.Clear();
552 flowStat.jitterHistogram.Clear();
553 flowStat.packetSizeHistogram.Clear();
554 flowStat.flowInterruptionsHistogram.Clear();
555 }
556}
557
558} // namespace ns3
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:42
An object that monitors and reports back packet flows observed during a simulation.
Definition: flow-monitor.h:52
FlowStats & GetStatsForFlow(FlowId flowId)
Get the stats for a given flow.
FlowProbeContainer m_flowProbes
all the FlowProbes
Definition: flow-monitor.h:300
void StopRightNow()
End monitoring flows right now
void ResetAllStats()
Reset all the statistics.
const FlowProbeContainer & GetAllProbes() const
Get a list of all FlowProbe's associated with this FlowMonitor.
std::vector< Ptr< FlowProbe > > FlowProbeContainer
Container: FlowProbe.
Definition: flow-monitor.h:237
FlowStatsContainer m_flowStats
FlowId --> FlowStats.
Definition: flow-monitor.h:294
bool m_enabled
FlowMon is enabled.
Definition: flow-monitor.h:307
void CheckForLostPackets()
Check right now for packets that appear to be lost.
void Start(const Time &time)
Set the time, counting from the current time, from which to start monitoring flows.
double m_flowInterruptionsBinWidth
Flow interruptions bin width (for histograms)
Definition: flow-monitor.h:311
void SerializeToXmlFile(std::string fileName, bool enableHistograms, bool enableProbes)
Same as SerializeToXmlStream, but writes to a file instead.
void AddFlowClassifier(Ptr< FlowClassifier > classifier)
Add a FlowClassifier to be used by the flow monitor.
void ReportLastRx(Ptr< FlowProbe > probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize)
FlowProbe implementations are supposed to call this method to report that a known packet is being rec...
EventId m_startEvent
Start event.
Definition: flow-monitor.h:305
std::list< Ptr< FlowClassifier > > m_classifiers
the FlowClassifiers
Definition: flow-monitor.h:303
void AddProbe(Ptr< FlowProbe > probe)
Register a new FlowProbe that will begin monitoring and report events to this monitor.
void ReportForwarding(Ptr< FlowProbe > probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize)
FlowProbe implementations are supposed to call this method to report that a known packet is being for...
Time m_flowInterruptionsMinTime
Flow interruptions minimum time.
Definition: flow-monitor.h:312
std::map< FlowId, FlowStats > FlowStatsContainer
Container: FlowId, FlowStats.
Definition: flow-monitor.h:231
double m_jitterBinWidth
Jitter bin width (for histograms)
Definition: flow-monitor.h:309
std::string SerializeToXmlString(uint16_t indent, bool enableHistograms, bool enableProbes)
Same as SerializeToXmlStream, but returns the output as a std::string.
void Stop(const Time &time)
Set the time, counting from the current time, from which to stop monitoring flows.
void PeriodicCheckForLostPackets()
Periodic function to check for lost packets and prune statistics.
double m_packetSizeBinWidth
packet size bin width (for histograms)
Definition: flow-monitor.h:310
Time m_maxPerHopDelay
Minimum per-hop delay.
Definition: flow-monitor.h:299
void DoDispose() override
Destructor implementation.
void NotifyConstructionCompleted() override
Notifier called once the ObjectBase is fully constructed.
const FlowStatsContainer & GetFlowStats() const
Retrieve all collected the flow statistics.
TrackedPacketMap m_trackedPackets
Tracked packets.
Definition: flow-monitor.h:298
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition: flow-monitor.cc:88
double m_delayBinWidth
Delay bin width (for histograms)
Definition: flow-monitor.h:308
void StartRightNow()
Begin monitoring flows right now
void ReportFirstTx(Ptr< FlowProbe > probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize)
FlowProbe implementations are supposed to call this method to report that a new packet was transmitte...
void SerializeToXmlStream(std::ostream &os, uint16_t indent, bool enableHistograms, bool enableProbes)
Serializes the results to an std::ostream in XML format.
EventId m_stopEvent
Stop event.
Definition: flow-monitor.h:306
static TypeId GetTypeId()
Get the type ID.
Definition: flow-monitor.cc:39
void ReportDrop(Ptr< FlowProbe > probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize, uint32_t reasonCode)
FlowProbe implementations are supposed to call this method to report that a known packet is being dro...
void SetDefaultBinWidth(double binWidth)
Set the bin width.
Definition: histogram.cc:67
void AddValue(double value)
Add a value to the histogram.
Definition: histogram.cc:81
virtual void NotifyConstructionCompleted()
Notifier called once the ObjectBase is fully constructed.
Definition: object-base.cc:86
A base class which provides memory management and object aggregation.
Definition: object.h:89
virtual void DoDispose()
Destructor implementation.
Definition: object.cc:444
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition: simulator.h:571
static void Cancel(const EventId &id)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
Definition: simulator.cc:285
static Time Now()
Return the current simulation virtual time.
Definition: simulator.cc:208
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
TimeWithUnit As(const Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
Definition: time.cc:415
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:403
@ S
second
Definition: nstime.h:116
AttributeValue implementation for Time.
Definition: nstime.h:1406
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:932
#define ATTRIB(name)
#define PERIODIC_CHECK_INTERVAL
Definition: flow-monitor.cc:29
#define ATTRIB_TIME(name)
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition: assert.h:66
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Definition: double.h:43
Ptr< const AttributeChecker > MakeTimeChecker()
Helper to make an unbounded Time checker.
Definition: nstime.h:1427
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Definition: nstime.h:1407
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:268
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:261
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:46
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1319
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Structure that represents the measured metrics of an individual packet flow.
Definition: flow-monitor.h:56
uint32_t rxPackets
Total number of received packets for the flow.
Definition: flow-monitor.h:100
Histogram packetSizeHistogram
Histogram of the packet sizes.
Definition: flow-monitor.h:118
Time timeLastTxPacket
Contains the absolute time when the last packet in the flow was transmitted, i.e.
Definition: flow-monitor.h:70
uint32_t lostPackets
Total number of packets that are assumed to be lost, i.e.
Definition: flow-monitor.h:107
Histogram jitterHistogram
Histogram of the packet jitters.
Definition: flow-monitor.h:116
Time lastDelay
Contains the last measured delay of a packet It is stored to measure the packet's Jitter.
Definition: flow-monitor.h:91
Time timeLastRxPacket
Contains the absolute time when the last packet in the flow was received, i.e.
Definition: flow-monitor.h:74
Histogram flowInterruptionsHistogram
histogram of durations of flow interruptions
Definition: flow-monitor.h:138
uint64_t rxBytes
Total number of received bytes for the flow.
Definition: flow-monitor.h:96
Time delaySum
Contains the sum of all end-to-end delays for all received packets of the flow.
Definition: flow-monitor.h:78
Time timeFirstRxPacket
Contains the absolute time when the first packet in the flow was received by an end node,...
Definition: flow-monitor.h:65
uint32_t timesForwarded
Contains the number of times a packet has been reportedly forwarded, summed for all received packets ...
Definition: flow-monitor.h:111
uint32_t txPackets
Total number of transmitted packets for the flow.
Definition: flow-monitor.h:98
uint64_t txBytes
Total number of transmitted bytes for the flow.
Definition: flow-monitor.h:94
Histogram delayHistogram
Histogram of the packet delays.
Definition: flow-monitor.h:114
Time jitterSum
Contains the sum of all end-to-end delay jitter (delay variation) values for all received packets of ...
Definition: flow-monitor.h:87
std::vector< uint64_t > bytesDropped
This attribute also tracks the number of lost bytes.
Definition: flow-monitor.h:137
Time timeFirstTxPacket
Contains the absolute time when the first packet in the flow was transmitted, i.e.
Definition: flow-monitor.h:60
std::vector< uint32_t > packetsDropped
This attribute also tracks the number of lost packets and bytes, but discriminates the losses by a re...
Definition: flow-monitor.h:133
Structure to represent a single tracked packet data.
Definition: flow-monitor.h:287
Time lastSeenTime
absolute time when the packet was last seen by a probe
Definition: flow-monitor.h:289
Time firstSeenTime
absolute time when the packet was first seen by a probe
Definition: flow-monitor.h:288
uint32_t timesForwarded
number of times the packet was reportedly forwarded
Definition: flow-monitor.h:290
static const uint32_t packetSize
Packet size generated at the AP.