A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
lollipop-comparisons.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020 Universita' di Firenze, Italy
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Tommaso Pecorella <tommaso.pecorella@unifi.it>
7
*/
8
9
#include "ns3/lollipop-counter.h"
10
11
using namespace
ns3
;
12
13
int
14
main(
int
argc,
char
* argv[])
15
{
16
LollipopCounter8
counterA;
17
LollipopCounter8
counterB;
18
19
// counterA.SetSequenceWindowSize (5);
20
// counterB.SetSequenceWindowSize (5);
21
22
for
(uint8_t i = 0; i < std::numeric_limits<uint8_t>::max(); i++)
23
{
24
std::cout << +i <<
" -- "
;
25
for
(uint8_t j = 0; j < std::numeric_limits<uint8_t>::max(); j++)
26
{
27
counterA = i;
28
counterB = j;
29
if
(counterA < counterB)
30
{
31
std::cout <<
"<"
;
32
}
33
else
if
(counterA == counterB)
34
{
35
std::cout <<
"="
;
36
}
37
else
if
(counterA > counterB)
38
{
39
std::cout <<
">"
;
40
}
41
else
42
{
43
std::cout <<
"."
;
44
}
45
}
46
std::cout << std::endl;
47
}
48
49
return
0;
50
}
ns3::LollipopCounter
Template class implementing a Lollipop counter as defined in RFC 8505 , RFC 6550 ,...
Definition
lollipop-counter.h:57
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
network
examples
lollipop-comparisons.cc
Generated on Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0