A Discrete-Event Network Simulator
lorawan @ (+)
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
j
l
m
n
o
p
q
r
s
t
w
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Symbols
:
a
b
c
d
e
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
e
l
v
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
▼
ns-3
►
ns-3 Documentation
►
All Environment Variables
Todo List
Deprecated List
Bug List
►
Topics
►
Namespaces
►
Classes
▼
Files
▼
File List
►
doc
►
examples
▼
src
►
antenna
►
aodv
►
applications
►
bridge
►
brite
►
buildings
►
click
►
config-store
►
core
►
csma
►
csma-layout
►
dsdv
►
dsr
►
energy
►
fd-net-device
►
flow-monitor
►
internet
►
internet-apps
►
lorawan
►
lr-wpan
►
lte
►
mesh
►
mobility
►
mpi
►
netanim
▼
network
►
doc
►
examples
►
helper
►
model
►
test
▼
utils
►
address-utils.cc
►
address-utils.h
bit-deserializer.cc
bit-deserializer.h
bit-serializer.cc
bit-serializer.h
►
crc32.cc
►
crc32.h
►
data-rate.cc
►
data-rate.h
drop-tail-queue.cc
drop-tail-queue.h
►
dynamic-queue-limits.cc
dynamic-queue-limits.h
error-channel.cc
error-channel.h
error-model.cc
►
error-model.h
ethernet-header.cc
►
ethernet-header.h
ethernet-trailer.cc
ethernet-trailer.h
flow-id-tag.cc
►
flow-id-tag.h
►
generic-phy.h
inet-socket-address.cc
inet-socket-address.h
inet6-socket-address.cc
inet6-socket-address.h
►
ipv4-address.cc
►
ipv4-address.h
►
ipv6-address.cc
►
ipv6-address.h
llc-snap-header.cc
►
llc-snap-header.h
►
lollipop-counter.h
►
mac16-address.cc
►
mac16-address.h
►
mac48-address.cc
►
mac48-address.h
►
mac64-address.cc
►
mac64-address.h
►
mac8-address.cc
►
mac8-address.h
net-device-queue-interface.cc
net-device-queue-interface.h
output-stream-wrapper.cc
►
output-stream-wrapper.h
packet-burst.cc
►
packet-burst.h
packet-data-calculators.cc
packet-data-calculators.h
packet-probe.cc
►
packet-probe.h
packet-socket-address.cc
packet-socket-address.h
packet-socket-client.cc
packet-socket-client.h
packet-socket-factory.cc
packet-socket-factory.h
packet-socket-server.cc
packet-socket-server.h
packet-socket.cc
►
packet-socket.h
►
packetbb.cc
►
packetbb.h
pcap-file-wrapper.cc
►
pcap-file-wrapper.h
►
pcap-file.cc
►
pcap-file.h
►
pcap-test.h
queue-fwd.h
►
queue-item.cc
►
queue-item.h
queue-limits.cc
queue-limits.h
►
queue-size.cc
►
queue-size.h
queue.cc
►
queue.h
radiotap-header.cc
►
radiotap-header.h
►
sequence-number.h
simple-channel.cc
simple-channel.h
►
simple-net-device.cc
simple-net-device.h
sll-header.cc
sll-header.h
timestamp-tag.cc
►
timestamp-tag.h
►
nix-vector-routing
►
olsr
►
openflow
►
point-to-point
►
point-to-point-layout
►
propagation
►
sixlowpan
►
spectrum
►
stats
►
tap-bridge
►
test
►
topology-read
►
traffic-control
►
uan
►
virtual-net-device
►
visualizer
►
wifi
►
wimax
►
zigbee
►
utils
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
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
9
#include "
packet-data-calculators.h
"
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
17
using namespace
ns3
;
18
19
NS_LOG_COMPONENT_DEFINE
(
"PacketDataCalculators"
);
20
21
//--------------------------------------------------------------
22
//----------------------------------------------
23
PacketCounterCalculator::PacketCounterCalculator
()
24
{
25
NS_LOG_FUNCTION_NOARGS
();
26
}
23
PacketCounterCalculator::PacketCounterCalculator
() {
…
}
27
28
PacketCounterCalculator::~PacketCounterCalculator
()
29
{
30
NS_LOG_FUNCTION_NOARGS
();
31
}
28
PacketCounterCalculator::~PacketCounterCalculator
() {
…
}
32
33
/* static */
34
TypeId
35
PacketCounterCalculator::GetTypeId
()
36
{
37
static
TypeId
tid =
TypeId
(
"ns3::PacketCounterCalculator"
)
38
.
SetParent
<
CounterCalculator<uint32_t>
>()
39
.SetGroupName(
"Network"
)
40
.AddConstructor<
PacketCounterCalculator
>();
41
return
tid;
42
}
35
PacketCounterCalculator::GetTypeId
() {
…
}
43
44
void
45
PacketCounterCalculator::DoDispose
()
46
{
47
NS_LOG_FUNCTION_NOARGS
();
48
49
CounterCalculator<uint32_t>::DoDispose
();
50
// PacketCounterCalculator::DoDispose
51
}
45
PacketCounterCalculator::DoDispose
() {
…
}
52
53
void
54
PacketCounterCalculator::PacketUpdate
(std::string path,
Ptr<const Packet>
packet)
55
{
56
NS_LOG_FUNCTION_NOARGS
();
57
58
CounterCalculator<uint32_t>::Update
();
59
60
// PacketCounterCalculator::Update
61
}
54
PacketCounterCalculator::PacketUpdate
(std::string path,
Ptr<const Packet>
packet) {
…
}
62
63
void
64
PacketCounterCalculator::FrameUpdate
(std::string path,
65
Ptr<const Packet>
packet,
66
Mac48Address
realto)
67
{
68
NS_LOG_FUNCTION_NOARGS
();
69
70
CounterCalculator<uint32_t>::Update
();
71
72
// PacketCounterCalculator::Update
73
}
64
PacketCounterCalculator::FrameUpdate
(std::string path, {
…
}
74
75
//--------------------------------------------------------------
76
//----------------------------------------------
77
PacketSizeMinMaxAvgTotalCalculator::PacketSizeMinMaxAvgTotalCalculator
()
78
{
79
NS_LOG_FUNCTION_NOARGS
();
80
}
77
PacketSizeMinMaxAvgTotalCalculator::PacketSizeMinMaxAvgTotalCalculator
() {
…
}
81
82
PacketSizeMinMaxAvgTotalCalculator::~PacketSizeMinMaxAvgTotalCalculator
()
83
{
84
NS_LOG_FUNCTION_NOARGS
();
85
}
82
PacketSizeMinMaxAvgTotalCalculator::~PacketSizeMinMaxAvgTotalCalculator
() {
…
}
86
87
/* static */
88
TypeId
89
PacketSizeMinMaxAvgTotalCalculator::GetTypeId
()
90
{
91
static
TypeId
tid =
TypeId
(
"ns3::PacketSizeMinMaxAvgTotalCalculator"
)
92
.
SetParent
<
MinMaxAvgTotalCalculator<uint32_t>
>()
93
.SetGroupName(
"Network"
)
94
.AddConstructor<
PacketSizeMinMaxAvgTotalCalculator
>();
95
return
tid;
96
}
89
PacketSizeMinMaxAvgTotalCalculator::GetTypeId
() {
…
}
97
98
void
99
PacketSizeMinMaxAvgTotalCalculator::DoDispose
()
100
{
101
NS_LOG_FUNCTION_NOARGS
();
102
103
MinMaxAvgTotalCalculator<uint32_t>::DoDispose
();
104
// end PacketSizeMinMaxAvgTotalCalculator::DoDispose
105
}
99
PacketSizeMinMaxAvgTotalCalculator::DoDispose
() {
…
}
106
107
void
108
PacketSizeMinMaxAvgTotalCalculator::PacketUpdate
(std::string path,
Ptr<const Packet>
packet)
109
{
110
NS_LOG_FUNCTION_NOARGS
();
111
112
MinMaxAvgTotalCalculator<uint32_t>::Update
(packet->GetSize());
113
114
// end PacketSizeMinMaxAvgTotalCalculator::Update
115
}
108
PacketSizeMinMaxAvgTotalCalculator::PacketUpdate
(std::string path,
Ptr<const Packet>
packet) {
…
}
116
117
void
118
PacketSizeMinMaxAvgTotalCalculator::FrameUpdate
(std::string path,
119
Ptr<const Packet>
packet,
120
Mac48Address
realto)
121
{
122
NS_LOG_FUNCTION_NOARGS
();
123
124
MinMaxAvgTotalCalculator<uint32_t>::Update
(packet->GetSize());
125
126
// end PacketSizeMinMaxAvgTotalCalculator::Update
127
}
118
PacketSizeMinMaxAvgTotalCalculator::FrameUpdate
(std::string path, {
…
}
ns3::CounterCalculator
Template class CounterCalculator.
Definition
basic-data-calculators.h:290
ns3::CounterCalculator::DoDispose
void DoDispose() override
Dispose of this Object.
Definition
basic-data-calculators.h:360
ns3::CounterCalculator::Update
void Update()
Increments count by 1.
Definition
basic-data-calculators.h:368
ns3::Mac48Address
an EUI-48 address
Definition
mac48-address.h:35
ns3::MinMaxAvgTotalCalculator
Template class MinMaxAvgTotalCalculator.
Definition
basic-data-calculators.h:30
ns3::MinMaxAvgTotalCalculator::Update
void Update(const T i)
Updates all variables of MinMaxAvgTotalCalculator.
Definition
basic-data-calculators.h:196
ns3::MinMaxAvgTotalCalculator::DoDispose
void DoDispose() override
Dispose of this Object.
Definition
basic-data-calculators.h:176
ns3::PacketCounterCalculator
A stat for counting packets.
Definition
packet-data-calculators.h:28
ns3::PacketCounterCalculator::~PacketCounterCalculator
~PacketCounterCalculator() override
Definition
packet-data-calculators.cc:28
ns3::PacketCounterCalculator::FrameUpdate
void FrameUpdate(std::string path, Ptr< const Packet > packet, Mac48Address realto)
Increments the packet counter by one.
Definition
packet-data-calculators.cc:64
ns3::PacketCounterCalculator::PacketUpdate
void PacketUpdate(std::string path, Ptr< const Packet > packet)
Increments the packet counter by one.
Definition
packet-data-calculators.cc:54
ns3::PacketCounterCalculator::PacketCounterCalculator
PacketCounterCalculator()
Definition
packet-data-calculators.cc:23
ns3::PacketCounterCalculator::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition
packet-data-calculators.cc:35
ns3::PacketCounterCalculator::DoDispose
void DoDispose() override
Dispose of this Object.
Definition
packet-data-calculators.cc:45
ns3::PacketSizeMinMaxAvgTotalCalculator
A stat for collecting packet size statistics: min, max and average.
Definition
packet-data-calculators.h:73
ns3::PacketSizeMinMaxAvgTotalCalculator::DoDispose
void DoDispose() override
Dispose of this Object.
Definition
packet-data-calculators.cc:99
ns3::PacketSizeMinMaxAvgTotalCalculator::FrameUpdate
void FrameUpdate(std::string path, Ptr< const Packet > packet, Mac48Address realto)
Increments the packet stats by the size of the packet.
Definition
packet-data-calculators.cc:118
ns3::PacketSizeMinMaxAvgTotalCalculator::~PacketSizeMinMaxAvgTotalCalculator
~PacketSizeMinMaxAvgTotalCalculator() override
Definition
packet-data-calculators.cc:82
ns3::PacketSizeMinMaxAvgTotalCalculator::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition
packet-data-calculators.cc:89
ns3::PacketSizeMinMaxAvgTotalCalculator::PacketSizeMinMaxAvgTotalCalculator
PacketSizeMinMaxAvgTotalCalculator()
Definition
packet-data-calculators.cc:77
ns3::PacketSizeMinMaxAvgTotalCalculator::PacketUpdate
void PacketUpdate(std::string path, Ptr< const Packet > packet)
Increments the packet stats by the size of the packet.
Definition
packet-data-calculators.cc:108
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:49
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition
log.h:191
NS_LOG_FUNCTION_NOARGS
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Definition
log-macros-enabled.h:195
mac48-address.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
packet-data-calculators.h
src
network
utils
packet-data-calculators.cc
Generated on Tue Apr 8 2025 15:27:17 for ns-3 by
1.11.0