A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
packet-data-calculators.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 Drexel University
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Joe Kopena (tjkopena@cs.drexel.edu)
7 */
8
10
11#include "mac48-address.h"
12
13#include "ns3/basic-data-calculators.h"
14#include "ns3/log.h"
15#include "ns3/packet.h"
16
17using namespace ns3;
18
19NS_LOG_COMPONENT_DEFINE("PacketDataCalculators");
20
21//--------------------------------------------------------------
22//----------------------------------------------
27
32
33/* static */
36{
37 static TypeId tid = TypeId("ns3::PacketCounterCalculator")
39 .SetGroupName("Network")
40 .AddConstructor<PacketCounterCalculator>();
41 return tid;
42}
43
44void
46{
48
50 // PacketCounterCalculator::DoDispose
51}
52
53void
55{
57
59
60 // PacketCounterCalculator::Update
61}
62
63void
65 Ptr<const Packet> packet,
66 Mac48Address realto)
67{
69
71
72 // PacketCounterCalculator::Update
73}
74
75//--------------------------------------------------------------
76//----------------------------------------------
81
86
87/* static */
90{
91 static TypeId tid = TypeId("ns3::PacketSizeMinMaxAvgTotalCalculator")
93 .SetGroupName("Network")
94 .AddConstructor<PacketSizeMinMaxAvgTotalCalculator>();
95 return tid;
96}
97
98void
100{
102
104 // end PacketSizeMinMaxAvgTotalCalculator::DoDispose
105}
106
107void
109{
111
113
114 // end PacketSizeMinMaxAvgTotalCalculator::Update
115}
116
117void
119 Ptr<const Packet> packet,
120 Mac48Address realto)
121{
123
125
126 // end PacketSizeMinMaxAvgTotalCalculator::Update
127}
Template class CounterCalculator.
void DoDispose() override
Dispose of this Object.
void Update()
Increments count by 1.
an EUI-48 address
Template class MinMaxAvgTotalCalculator.
void Update(const T i)
Updates all variables of MinMaxAvgTotalCalculator.
void DoDispose() override
Dispose of this Object.
A stat for counting packets.
void FrameUpdate(std::string path, Ptr< const Packet > packet, Mac48Address realto)
Increments the packet counter by one.
void PacketUpdate(std::string path, Ptr< const Packet > packet)
Increments the packet counter by one.
static TypeId GetTypeId()
Register this type.
void DoDispose() override
Dispose of this Object.
A stat for collecting packet size statistics: min, max and average.
void DoDispose() override
Dispose of this Object.
void FrameUpdate(std::string path, Ptr< const Packet > packet, Mac48Address realto)
Increments the packet stats by the size of the packet.
static TypeId GetTypeId()
Register this type.
void PacketUpdate(std::string path, Ptr< const Packet > packet)
Increments the packet stats by the size of the packet.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
Definition type-id.h:48
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Every class exported by the ns3 library is enclosed in the ns3 namespace.