A Discrete-Event Network Simulator
qkdnetsim_etsi_014 @ (+)
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Main Page
Related Pages
Modules
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
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
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
v
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
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
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
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
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
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
c
e
i
l
o
r
s
t
v
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
uan-header-rc.cc
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 University of Washington
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Leonard Tracy <lentracy@gmail.com>
19
*/
20
21
22
#include "
uan-header-rc.h
"
23
#include "ns3/mac8-address.h"
24
25
#include <set>
26
27
namespace
ns3
{
28
29
NS_OBJECT_ENSURE_REGISTERED
(UanHeaderRcData);
30
NS_OBJECT_ENSURE_REGISTERED
(UanHeaderRcRts);
31
NS_OBJECT_ENSURE_REGISTERED
(UanHeaderRcCtsGlobal);
32
NS_OBJECT_ENSURE_REGISTERED
(UanHeaderRcCts);
33
NS_OBJECT_ENSURE_REGISTERED
(UanHeaderRcAck);
34
35
UanHeaderRcData::UanHeaderRcData
()
36
:
Header
(),
37
m_frameNo (0),
38
m_propDelay (
Seconds
(0))
39
{
40
}
41
42
UanHeaderRcData::UanHeaderRcData
(uint8_t frameNo,
Time
propDelay)
43
:
Header
(),
44
m_frameNo (frameNo),
45
m_propDelay (propDelay)
46
{
47
48
}
49
50
UanHeaderRcData::~UanHeaderRcData
()
51
{
52
}
53
54
TypeId
55
UanHeaderRcData::GetTypeId
()
56
{
57
static
TypeId
tid =
TypeId
(
"ns3::UanHeaderRcData"
)
58
.
SetParent
<
Header
> ()
59
.SetGroupName (
"Uan"
)
60
.AddConstructor<
UanHeaderRcData
> ()
61
;
62
return
tid;
63
}
64
65
void
66
UanHeaderRcData::SetFrameNo
(uint8_t no)
67
{
68
m_frameNo
= no;
69
}
70
71
void
72
UanHeaderRcData::SetPropDelay
(
Time
propDelay)
73
{
74
m_propDelay
= propDelay;
75
}
76
77
uint8_t
78
UanHeaderRcData::GetFrameNo
(
void
)
const
79
{
80
return
m_frameNo
;
81
}
82
83
Time
84
UanHeaderRcData::GetPropDelay
(
void
)
const
85
{
86
return
m_propDelay
;
87
}
88
89
uint32_t
90
UanHeaderRcData::GetSerializedSize
(
void
)
const
91
{
92
return
1 + 2;
93
}
94
95
void
96
UanHeaderRcData::Serialize
(
Buffer::Iterator
start
)
const
97
{
98
start
.WriteU8 (
m_frameNo
);
99
start
.WriteU16 ( (uint16_t)
m_propDelay
.
RoundTo
(
Time::MS
).
GetMilliSeconds
());
100
}
101
uint32_t
102
UanHeaderRcData::Deserialize
(
Buffer::Iterator
start
)
103
{
104
Buffer::Iterator
rbuf =
start
;
105
106
m_frameNo
=
start
.ReadU8 ();
107
m_propDelay
=
Seconds
( ((
double
)
start
.ReadU16 ()) / 1000.0 );
108
109
return
rbuf.
GetDistanceFrom
(
start
);
110
}
111
112
void
113
UanHeaderRcData::Print
(std::ostream &os,
Time::Unit
unit)
const
114
{
115
os <<
"Frame No="
<< (uint32_t)
m_frameNo
<<
" Prop Delay="
<<
m_propDelay
.
As
(unit);
116
}
117
118
void
119
UanHeaderRcData::Print
(std::ostream &os)
const
120
{
121
Print
(os,
Time::S
);
122
}
123
124
TypeId
125
UanHeaderRcData::GetInstanceTypeId
(
void
)
const
126
{
127
return
GetTypeId
();
128
}
129
130
131
UanHeaderRcRts::UanHeaderRcRts
()
132
:
Header
(),
133
m_frameNo (0),
134
m_noFrames (0),
135
m_length (0),
136
m_timeStamp (
Seconds
(0)),
137
m_retryNo (0)
138
{
139
140
}
141
142
UanHeaderRcRts::UanHeaderRcRts
(uint8_t frameNo, uint8_t retryNo, uint8_t noFrames, uint16_t length,
Time
timeStamp)
143
:
Header
(),
144
m_frameNo (frameNo),
145
m_noFrames (noFrames),
146
m_length (length),
147
m_timeStamp (timeStamp),
148
m_retryNo (retryNo)
149
{
150
151
}
152
153
UanHeaderRcRts::~UanHeaderRcRts
()
154
{
155
156
}
157
158
TypeId
159
UanHeaderRcRts::GetTypeId
()
160
{
161
static
TypeId
tid =
TypeId
(
"ns3::UanHeaderRcRts"
)
162
.
SetParent
<
Header
> ()
163
.SetGroupName (
"Uan"
)
164
.AddConstructor<
UanHeaderRcRts
> ()
165
;
166
return
tid;
167
168
}
169
170
void
171
UanHeaderRcRts::SetFrameNo
(uint8_t no)
172
{
173
m_frameNo
= no;
174
}
175
176
void
177
UanHeaderRcRts::SetNoFrames
(uint8_t no)
178
{
179
m_noFrames
= no;
180
}
181
182
void
183
UanHeaderRcRts::SetLength
(uint16_t length)
184
{
185
m_length
= length;
186
}
187
void
188
UanHeaderRcRts::SetTimeStamp
(
Time
timeStamp)
189
{
190
m_timeStamp
= timeStamp;
191
}
192
193
void
194
UanHeaderRcRts::SetRetryNo
(uint8_t no)
195
{
196
m_retryNo
= no;
197
}
198
uint8_t
199
UanHeaderRcRts::GetNoFrames
()
const
200
{
201
return
m_noFrames
;
202
}
203
204
uint16_t
205
UanHeaderRcRts::GetLength
()
const
206
{
207
return
m_length
;
208
}
209
210
Time
211
UanHeaderRcRts::GetTimeStamp
(
void
)
const
212
{
213
return
m_timeStamp
;
214
}
215
216
uint8_t
217
UanHeaderRcRts::GetRetryNo
(
void
)
const
218
{
219
return
m_retryNo
;
220
}
221
222
uint8_t
223
UanHeaderRcRts::GetFrameNo
(
void
)
const
224
{
225
return
m_frameNo
;
226
}
227
228
uint32_t
229
UanHeaderRcRts::GetSerializedSize
(
void
)
const
230
{
231
return
1 + 1 + 1 + 4 + 2;
232
}
233
234
void
235
UanHeaderRcRts::Serialize
(
Buffer::Iterator
start
)
const
236
{
237
start
.WriteU8 (
m_frameNo
);
238
start
.WriteU8 (
m_retryNo
);
239
start
.WriteU8 (
m_noFrames
);
240
start
.WriteU16 (
m_length
);
241
start
.WriteU32 ((uint32_t) (
m_timeStamp
.
RoundTo
(
Time::MS
).
GetMilliSeconds
()));
242
}
243
244
uint32_t
245
UanHeaderRcRts::Deserialize
(
Buffer::Iterator
start
)
246
{
247
Buffer::Iterator
rbuf =
start
;
248
m_frameNo
= rbuf.
ReadU8
();
249
m_retryNo
= rbuf.
ReadU8
();
250
m_noFrames
= rbuf.
ReadU8
();
251
m_length
= rbuf.
ReadU16
();
252
m_timeStamp
=
Seconds
( ((
double
) rbuf.
ReadU32
()) / 1000.0 );
253
// m_timeStamp = Seconds ( rbuf.ReadU16 ()/1000 );
254
return
rbuf.
GetDistanceFrom
(
start
);
255
}
256
257
void
258
UanHeaderRcRts::Print
(std::ostream &os,
Time::Unit
unit)
const
259
{
260
os <<
"Frame #="
<< (uint32_t)
m_frameNo
<<
" Retry #="
<< (uint32_t)
m_retryNo
<<
" Num Frames="
<< (uint32_t)
m_noFrames
<<
"Length="
<<
m_length
<<
" Time Stamp="
<<
m_timeStamp
.
As
(unit);
261
}
262
263
void
264
UanHeaderRcRts::Print
(std::ostream &os)
const
265
{
266
Print
(os,
Time::S
);
267
}
268
269
TypeId
270
UanHeaderRcRts::GetInstanceTypeId
(
void
)
const
271
{
272
return
GetTypeId
();
273
}
274
275
276
277
278
UanHeaderRcCtsGlobal::UanHeaderRcCtsGlobal
()
279
:
Header
(),
280
m_retryRate (0),
281
m_rateNum (0)
282
{
283
284
}
285
286
UanHeaderRcCtsGlobal::UanHeaderRcCtsGlobal
(
Time
wt,
Time
ts, uint16_t rate, uint16_t retryRate)
287
:
Header
(),
288
m_timeStampTx (ts),
289
m_winTime (wt),
290
m_retryRate (retryRate),
291
m_rateNum (rate)
292
{
293
294
}
295
296
UanHeaderRcCtsGlobal::~UanHeaderRcCtsGlobal
()
297
{
298
299
}
300
301
TypeId
302
UanHeaderRcCtsGlobal::GetTypeId
()
303
{
304
static
TypeId
tid =
TypeId
(
"ns3::UanHeaderRcCtsGlobal"
)
305
.
SetParent
<
Header
> ()
306
.SetGroupName (
"Uan"
)
307
.AddConstructor<
UanHeaderRcCtsGlobal
> ()
308
;
309
return
tid;
310
311
}
312
313
314
void
315
UanHeaderRcCtsGlobal::SetRateNum
(uint16_t rate)
316
{
317
m_rateNum
= rate;
318
}
319
320
void
321
UanHeaderRcCtsGlobal::SetRetryRate
(uint16_t rate)
322
{
323
m_retryRate
= rate;
324
}
325
326
void
327
UanHeaderRcCtsGlobal::SetWindowTime
(
Time
t)
328
{
329
m_winTime
= t;
330
}
331
332
void
333
UanHeaderRcCtsGlobal::SetTxTimeStamp
(
Time
t)
334
{
335
m_timeStampTx
= t;
336
}
337
338
Time
339
UanHeaderRcCtsGlobal::GetWindowTime
(
void
)
const
340
{
341
return
m_winTime
;
342
}
343
344
Time
345
UanHeaderRcCtsGlobal::GetTxTimeStamp
(
void
)
const
346
{
347
return
m_timeStampTx
;
348
}
349
350
uint16_t
351
UanHeaderRcCtsGlobal::GetRetryRate
(
void
)
const
352
{
353
return
m_retryRate
;
354
}
355
356
uint16_t
357
UanHeaderRcCtsGlobal::GetRateNum
(
void
)
const
358
{
359
return
m_rateNum
;
360
}
361
uint32_t
362
UanHeaderRcCtsGlobal::GetSerializedSize
(
void
)
const
363
{
364
return
4 + 4 + 2 + 2;
365
}
366
367
void
368
UanHeaderRcCtsGlobal::Serialize
(
Buffer::Iterator
start
)
const
369
{
370
start
.WriteU16 (
m_rateNum
);
371
start
.WriteU16 (
m_retryRate
);
372
start
.WriteU32 ( (uint32_t) (
m_timeStampTx
.
RoundTo
(
Time::MS
).
GetMilliSeconds
()));
373
start
.WriteU32 ( (uint32_t) (
m_winTime
.
RoundTo
(
Time::MS
).
GetMilliSeconds
()));
374
}
375
376
uint32_t
377
UanHeaderRcCtsGlobal::Deserialize
(
Buffer::Iterator
start
)
378
{
379
Buffer::Iterator
rbuf =
start
;
380
m_rateNum
= rbuf.
ReadU16
();
381
m_retryRate
= rbuf.
ReadU16
();
382
m_timeStampTx
=
Seconds
( ( (
double
) rbuf.
ReadU32
()) / 1000.0 );
383
m_winTime
=
Seconds
( ( (
double
) rbuf.
ReadU32
()) / 1000.0 );
384
return
rbuf.
GetDistanceFrom
(
start
);
385
386
}
387
388
void
389
UanHeaderRcCtsGlobal::Print
(std::ostream &os,
Time::Unit
unit)
const
390
{
391
os <<
"CTS Global (Rate #="
<<
m_rateNum
<<
", Retry Rate="
<<
m_retryRate
<<
", TX Time="
<<
m_timeStampTx
.
As
(
Time::S
) <<
", Win Time="
<<
m_winTime
.
As
(
Time::S
) <<
")"
;
392
}
393
394
void
395
UanHeaderRcCtsGlobal::Print
(std::ostream &os)
const
396
{
397
Print
(os,
Time::S
);
398
}
399
400
TypeId
401
UanHeaderRcCtsGlobal::GetInstanceTypeId
(
void
)
const
402
{
403
return
GetTypeId
();
404
}
405
406
UanHeaderRcCts::UanHeaderRcCts
()
407
:
Header
(),
408
m_frameNo (0),
409
m_timeStampRts (
Seconds
(0)),
410
m_retryNo (0),
411
m_delay (
Seconds
(0)),
412
m_address (
Mac8Address
::GetBroadcast ())
413
{
414
415
}
416
417
UanHeaderRcCts::UanHeaderRcCts
(uint8_t frameNo, uint8_t retryNo,
Time
ts,
Time
delay,
Mac8Address
addr)
418
:
Header
(),
419
m_frameNo (frameNo),
420
m_timeStampRts (ts),
421
m_retryNo (retryNo),
422
m_delay (delay),
423
m_address (addr)
424
{
425
426
}
427
428
UanHeaderRcCts::~UanHeaderRcCts
()
429
{
430
431
}
432
433
TypeId
434
UanHeaderRcCts::GetTypeId
()
435
{
436
static
TypeId
tid =
TypeId
(
"ns3::UanHeaderRcCts"
)
437
.
SetParent
<
Header
> ()
438
.SetGroupName (
"Uan"
)
439
.AddConstructor<
UanHeaderRcCts
> ()
440
;
441
return
tid;
442
443
}
444
445
void
446
UanHeaderRcCts::SetFrameNo
(uint8_t frameNo)
447
{
448
m_frameNo
= frameNo;
449
}
450
451
void
452
UanHeaderRcCts::SetRtsTimeStamp
(
Time
timeStamp)
453
{
454
m_timeStampRts
= timeStamp;
455
}
456
457
458
void
459
UanHeaderRcCts::SetDelayToTx
(
Time
delay)
460
{
461
m_delay
= delay;
462
}
463
464
void
465
UanHeaderRcCts::SetRetryNo
(uint8_t no)
466
{
467
m_retryNo
= no;
468
}
469
470
void
471
UanHeaderRcCts::SetAddress
(
Mac8Address
addr)
472
{
473
m_address
= addr;
474
}
475
uint8_t
476
UanHeaderRcCts::GetFrameNo
()
const
477
{
478
return
m_frameNo
;
479
}
480
481
Time
482
UanHeaderRcCts::GetRtsTimeStamp
(
void
)
const
483
{
484
return
m_timeStampRts
;
485
}
486
487
Time
488
UanHeaderRcCts::GetDelayToTx
(
void
)
const
489
{
490
return
m_delay
;
491
}
492
493
uint8_t
494
UanHeaderRcCts::GetRetryNo
()
const
495
{
496
return
m_retryNo
;
497
}
498
499
Mac8Address
500
UanHeaderRcCts::GetAddress
()
const
501
{
502
return
m_address
;
503
}
504
505
uint32_t
506
UanHeaderRcCts::GetSerializedSize
(
void
)
const
507
{
508
return
1 + 1 + 1 + 4 + 4;
509
}
510
511
512
void
513
UanHeaderRcCts::Serialize
(
Buffer::Iterator
start
)
const
514
{
515
uint8_t
address
= 0;
516
m_address
.
CopyTo
(&
address
);
517
start
.WriteU8 (
address
);
518
start
.WriteU8 (
m_frameNo
);
519
start
.WriteU8 (
m_retryNo
);
520
start
.WriteU32 ((uint32_t) (
m_timeStampRts
.
RoundTo
(
Time::MS
).
GetMilliSeconds
()));
521
start
.WriteU32 ((uint32_t) (
m_delay
.
RoundTo
(
Time::MS
).
GetMilliSeconds
()));
522
}
523
524
uint32_t
525
UanHeaderRcCts::Deserialize
(
Buffer::Iterator
start
)
526
{
527
Buffer::Iterator
rbuf =
start
;
528
m_address
=
Mac8Address
(rbuf.
ReadU8
());
529
m_frameNo
= rbuf.
ReadU8
();
530
m_retryNo
= rbuf.
ReadU8
();
531
m_timeStampRts
=
Seconds
( ( (
double
) rbuf.
ReadU32
()) / 1000.0 );
532
m_delay
=
Seconds
( ( (
double
) rbuf.
ReadU32
()) / 1000.0 );
533
534
return
rbuf.
GetDistanceFrom
(
start
);
535
}
536
537
void
538
UanHeaderRcCts::Print
(std::ostream &os,
Time::Unit
unit)
const
539
{
540
os <<
"CTS (Addr="
<<
m_address
<<
" Frame #="
<< (uint32_t)
m_frameNo
<<
" Retry #="
<< (uint32_t)
m_retryNo
<<
" RTS Rx Timestamp="
<<
m_timeStampRts
.
As
(unit) <<
" Delay until TX="
<<
m_delay
.
As
(unit) <<
")"
;
541
}
542
543
void
544
UanHeaderRcCts::Print
(std::ostream &os)
const
545
{
546
Print
(os,
Time::S
);
547
}
548
549
TypeId
550
UanHeaderRcCts::GetInstanceTypeId
(
void
)
const
551
{
552
return
GetTypeId
();
553
}
554
555
UanHeaderRcAck::UanHeaderRcAck
()
556
: m_frameNo (0)
557
{
558
}
559
560
UanHeaderRcAck::~UanHeaderRcAck
()
561
{
562
m_nackedFrames
.clear ();
563
}
564
565
TypeId
566
UanHeaderRcAck::GetTypeId
()
567
{
568
static
TypeId
tid =
TypeId
(
"ns3::UanHeaderRcAck"
)
569
.
SetParent
<
Header
> ()
570
.SetGroupName (
"Uan"
)
571
.AddConstructor<
UanHeaderRcAck
> ()
572
;
573
return
tid;
574
}
575
576
void
577
UanHeaderRcAck::SetFrameNo
(uint8_t noFrames)
578
{
579
m_frameNo
= noFrames;
580
}
581
582
void
583
UanHeaderRcAck::AddNackedFrame
(uint8_t frame)
584
{
585
m_nackedFrames
.insert (frame);
586
}
587
588
const
std::set<uint8_t> &
589
UanHeaderRcAck::GetNackedFrames
(
void
)
const
590
{
591
return
m_nackedFrames
;
592
}
593
594
uint8_t
595
UanHeaderRcAck::GetFrameNo
(
void
)
const
596
{
597
return
m_frameNo
;
598
}
599
600
uint8_t
601
UanHeaderRcAck::GetNoNacks
(
void
)
const
602
{
603
return
static_cast<
uint8_t
>
(
m_nackedFrames
.size ());
604
}
605
606
uint32_t
607
UanHeaderRcAck::GetSerializedSize
(
void
)
const
608
{
609
return
1 + 1 +
GetNoNacks
();
610
}
611
612
void
613
UanHeaderRcAck::Serialize
(
Buffer::Iterator
start
)
const
614
{
615
start
.WriteU8 (
m_frameNo
);
616
start
.WriteU8 (
GetNoNacks
());
617
std::set<uint8_t>::iterator it =
m_nackedFrames
.begin ();
618
for
(; it !=
m_nackedFrames
.end (); it++)
619
{
620
start
.WriteU8 (*it);
621
}
622
}
623
624
uint32_t
625
UanHeaderRcAck::Deserialize
(
Buffer::Iterator
start
)
626
{
627
Buffer::Iterator
rbuf =
start
;
628
m_frameNo
= rbuf.
ReadU8
();
629
uint8_t noAcks = rbuf.
ReadU8
();
630
m_nackedFrames
.clear ();
631
for
(uint32_t i = 0; i < noAcks; i++)
632
{
633
m_nackedFrames
.insert (rbuf.
ReadU8
());
634
}
635
return
rbuf.
GetDistanceFrom
(
start
);
636
}
637
638
void
639
UanHeaderRcAck::Print
(std::ostream &os)
const
640
{
641
os <<
"# Frames="
<< (uint32_t)
m_frameNo
<<
" # nacked="
<< (uint32_t)
GetNoNacks
() <<
" Nacked: "
;
642
if
(
GetNoNacks
() > 0)
643
{
644
std::set<uint8_t>::iterator it =
m_nackedFrames
.begin ();
645
os << (uint32_t) *it;
646
it++;
647
for
(; it !=
m_nackedFrames
.end (); it++)
648
{
649
os <<
", "
<< (uint32_t) *it;
650
}
651
}
652
}
653
654
TypeId
655
UanHeaderRcAck::GetInstanceTypeId
(
void
)
const
656
{
657
return
GetTypeId
();
658
}
659
660
}
// namespace ns3
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:99
ns3::Buffer::Iterator::ReadU16
uint16_t ReadU16(void)
Definition:
buffer.h:1029
ns3::Buffer::Iterator::ReadU8
uint8_t ReadU8(void)
Definition:
buffer.h:1021
ns3::Buffer::Iterator::GetDistanceFrom
uint32_t GetDistanceFrom(Iterator const &o) const
Definition:
buffer.cc:788
ns3::Buffer::Iterator::ReadU32
uint32_t ReadU32(void)
Definition:
buffer.cc:973
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:43
ns3::Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
ns3::Mac8Address
A class used for addressing MAC8 MAC's.
Definition:
mac8-address.h:43
ns3::Mac8Address::CopyTo
void CopyTo(uint8_t *pBuffer) const
Writes address to buffer parameter.
Definition:
mac8-address.cc:80
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:103
ns3::Time::RoundTo
Time RoundTo(enum Unit unit) const
Round a Time to a specific unit.
Definition:
nstime.h:555
ns3::Time::Unit
Unit
The unit to use to interpret a number representing time.
Definition:
nstime.h:109
ns3::Time::MS
@ MS
millisecond
Definition:
nstime.h:115
ns3::Time::S
@ S
second
Definition:
nstime.h:114
ns3::Time::GetMilliSeconds
int64_t GetMilliSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition:
nstime.h:383
ns3::Time::As
TimeWithUnit As(const enum Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
Definition:
time.cc:418
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition:
type-id.cc:922
ns3::UanHeaderRcAck
Header used for ACK packets by protocol UanMacRc.
Definition:
uan-header-rc.h:459
ns3::UanHeaderRcAck::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
uan-header-rc.cc:613
ns3::UanHeaderRcAck::m_frameNo
uint8_t m_frameNo
Next frame number.
Definition:
uan-header-rc.h:512
ns3::UanHeaderRcAck::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition:
uan-header-rc.cc:566
ns3::UanHeaderRcAck::m_nackedFrames
std::set< uint8_t > m_nackedFrames
Marker for nacked frames.
Definition:
uan-header-rc.h:513
ns3::UanHeaderRcAck::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
uan-header-rc.cc:607
ns3::UanHeaderRcAck::GetFrameNo
uint8_t GetFrameNo(void) const
Get the reservation frame number being ACKed.
Definition:
uan-header-rc.cc:595
ns3::UanHeaderRcAck::UanHeaderRcAck
UanHeaderRcAck()
Default constructor.
Definition:
uan-header-rc.cc:555
ns3::UanHeaderRcAck::~UanHeaderRcAck
virtual ~UanHeaderRcAck()
Destructor.
Definition:
uan-header-rc.cc:560
ns3::UanHeaderRcAck::GetNackedFrames
const std::set< uint8_t > & GetNackedFrames(void) const
Get the set of NACK'ed frames.
Definition:
uan-header-rc.cc:589
ns3::UanHeaderRcAck::AddNackedFrame
void AddNackedFrame(uint8_t frame)
NACK a frame.
Definition:
uan-header-rc.cc:583
ns3::UanHeaderRcAck::Print
virtual void Print(std::ostream &os) const
Definition:
uan-header-rc.cc:639
ns3::UanHeaderRcAck::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
uan-header-rc.cc:655
ns3::UanHeaderRcAck::GetNoNacks
uint8_t GetNoNacks(void) const
Get the number of data frames being NACKed.
Definition:
uan-header-rc.cc:601
ns3::UanHeaderRcAck::SetFrameNo
void SetFrameNo(uint8_t frameNo)
Set the frame number of the reservation being acknowledged.
Definition:
uan-header-rc.cc:577
ns3::UanHeaderRcCtsGlobal
Cycle broadcast information.
Definition:
uan-header-rc.h:239
ns3::UanHeaderRcCtsGlobal::Print
void Print(std::ostream &os, Time::Unit unit) const
Specialized Print with Time::Unit declared.
Definition:
uan-header-rc.cc:389
ns3::UanHeaderRcCtsGlobal::UanHeaderRcCtsGlobal
UanHeaderRcCtsGlobal()
Default constructor.
Definition:
uan-header-rc.cc:278
ns3::UanHeaderRcCtsGlobal::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition:
uan-header-rc.cc:302
ns3::UanHeaderRcCtsGlobal::GetRetryRate
uint16_t GetRetryRate(void) const
Get the retry rate number.
Definition:
uan-header-rc.cc:351
ns3::UanHeaderRcCtsGlobal::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
uan-header-rc.cc:368
ns3::UanHeaderRcCtsGlobal::SetRateNum
void SetRateNum(uint16_t rate)
Set the rate number corresponding to data rate of current cycle.
Definition:
uan-header-rc.cc:315
ns3::UanHeaderRcCtsGlobal::SetRetryRate
void SetRetryRate(uint16_t rate)
Set the retry rate number for the current cycle.
Definition:
uan-header-rc.cc:321
ns3::UanHeaderRcCtsGlobal::m_timeStampTx
Time m_timeStampTx
Timestamp.
Definition:
uan-header-rc.h:327
ns3::UanHeaderRcCtsGlobal::SetTxTimeStamp
void SetTxTimeStamp(Time timeStamp)
Set the CTS timestamp.
Definition:
uan-header-rc.cc:333
ns3::UanHeaderRcCtsGlobal::m_winTime
Time m_winTime
Window time.
Definition:
uan-header-rc.h:328
ns3::UanHeaderRcCtsGlobal::GetTxTimeStamp
Time GetTxTimeStamp(void) const
Get the CTS transmit timestamp.
Definition:
uan-header-rc.cc:345
ns3::UanHeaderRcCtsGlobal::m_retryRate
uint16_t m_retryRate
Retry rate.
Definition:
uan-header-rc.h:329
ns3::UanHeaderRcCtsGlobal::m_rateNum
uint16_t m_rateNum
Rate number.
Definition:
uan-header-rc.h:330
ns3::UanHeaderRcCtsGlobal::GetRateNum
uint16_t GetRateNum(void) const
Get the data rate number.
Definition:
uan-header-rc.cc:357
ns3::UanHeaderRcCtsGlobal::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
uan-header-rc.cc:401
ns3::UanHeaderRcCtsGlobal::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
uan-header-rc.cc:362
ns3::UanHeaderRcCtsGlobal::SetWindowTime
void SetWindowTime(Time t)
Set the window time (time duration following blocking time to allow RTS transmissions).
Definition:
uan-header-rc.cc:327
ns3::UanHeaderRcCtsGlobal::GetWindowTime
Time GetWindowTime(void) const
Get the window time (time duration following blocking time to allow RTS transmissions).
Definition:
uan-header-rc.cc:339
ns3::UanHeaderRcCtsGlobal::~UanHeaderRcCtsGlobal
~UanHeaderRcCtsGlobal()
Destructor.
Definition:
uan-header-rc.cc:296
ns3::UanHeaderRcCts
CTS header.
Definition:
uan-header-rc.h:343
ns3::UanHeaderRcCts::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
uan-header-rc.cc:513
ns3::UanHeaderRcCts::~UanHeaderRcCts
virtual ~UanHeaderRcCts()
Destructor.
Definition:
uan-header-rc.cc:428
ns3::UanHeaderRcCts::SetRtsTimeStamp
void SetRtsTimeStamp(Time timeStamp)
Set the timestamp for RTS reception.
Definition:
uan-header-rc.cc:452
ns3::UanHeaderRcCts::GetAddress
Mac8Address GetAddress(void) const
Get the destination address, for scheduling info.
Definition:
uan-header-rc.cc:500
ns3::UanHeaderRcCts::UanHeaderRcCts
UanHeaderRcCts()
Default constructor.
Definition:
uan-header-rc.cc:406
ns3::UanHeaderRcCts::SetFrameNo
void SetFrameNo(uint8_t frameNo)
Set the RTS frame number being cleared.
Definition:
uan-header-rc.cc:446
ns3::UanHeaderRcCts::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
uan-header-rc.cc:506
ns3::UanHeaderRcCts::SetDelayToTx
void SetDelayToTx(Time delay)
Set the time delay from CTS transmission to first data frame arrival.
Definition:
uan-header-rc.cc:459
ns3::UanHeaderRcCts::m_address
Mac8Address m_address
Destination of CTS packet.
Definition:
uan-header-rc.h:449
ns3::UanHeaderRcCts::m_delay
Time m_delay
Delay until transmission.
Definition:
uan-header-rc.h:448
ns3::UanHeaderRcCts::m_timeStampRts
Time m_timeStampRts
RX time of RTS packet at gateway.
Definition:
uan-header-rc.h:446
ns3::UanHeaderRcCts::Print
void Print(std::ostream &os, Time::Unit unit) const
Specialized Print with Time::Unit declared.
Definition:
uan-header-rc.cc:538
ns3::UanHeaderRcCts::GetFrameNo
uint8_t GetFrameNo(void) const
Get the frame number of the RTS being cleared.
Definition:
uan-header-rc.cc:476
ns3::UanHeaderRcCts::GetRtsTimeStamp
Time GetRtsTimeStamp(void) const
Get the receive time of the RTS being cleared.
Definition:
uan-header-rc.cc:482
ns3::UanHeaderRcCts::GetRetryNo
uint8_t GetRetryNo(void) const
Get the retry number of the RTS packet being cleared.
Definition:
uan-header-rc.cc:494
ns3::UanHeaderRcCts::m_frameNo
uint8_t m_frameNo
Reservation frame number being cleared.
Definition:
uan-header-rc.h:445
ns3::UanHeaderRcCts::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition:
uan-header-rc.cc:434
ns3::UanHeaderRcCts::SetRetryNo
void SetRetryNo(uint8_t no)
Set the retry number of the RTS frame being cleared.
Definition:
uan-header-rc.cc:465
ns3::UanHeaderRcCts::GetDelayToTx
Time GetDelayToTx(void) const
Get the time delay from TX time of CTS packet until arrival of first data frame.
Definition:
uan-header-rc.cc:488
ns3::UanHeaderRcCts::SetAddress
void SetAddress(Mac8Address addr)
Set the destination address, for scheduling info.
Definition:
uan-header-rc.cc:471
ns3::UanHeaderRcCts::m_retryNo
uint8_t m_retryNo
Retry number of received RTS packet.
Definition:
uan-header-rc.h:447
ns3::UanHeaderRcCts::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
uan-header-rc.cc:550
ns3::UanHeaderRcData
Extra data header information.
Definition:
uan-header-rc.h:42
ns3::UanHeaderRcData::m_propDelay
Time m_propDelay
Propagation delay.
Definition:
uan-header-rc.h:106
ns3::UanHeaderRcData::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
uan-header-rc.cc:90
ns3::UanHeaderRcData::m_frameNo
uint8_t m_frameNo
Data frame number.
Definition:
uan-header-rc.h:105
ns3::UanHeaderRcData::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition:
uan-header-rc.cc:55
ns3::UanHeaderRcData::SetFrameNo
void SetFrameNo(uint8_t frameNum)
Set the frame number of the reservation being transmitted.
Definition:
uan-header-rc.cc:66
ns3::UanHeaderRcData::UanHeaderRcData
UanHeaderRcData()
Default constructor.
Definition:
uan-header-rc.cc:35
ns3::UanHeaderRcData::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
uan-header-rc.cc:96
ns3::UanHeaderRcData::GetPropDelay
Time GetPropDelay(void) const
Get the propagation delay found in handshaking.
Definition:
uan-header-rc.cc:84
ns3::UanHeaderRcData::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
uan-header-rc.cc:125
ns3::UanHeaderRcData::~UanHeaderRcData
virtual ~UanHeaderRcData()
Destructor.
Definition:
uan-header-rc.cc:50
ns3::UanHeaderRcData::SetPropDelay
void SetPropDelay(Time propDelay)
Set the propagation delay as found in handshaking.
Definition:
uan-header-rc.cc:72
ns3::UanHeaderRcData::GetFrameNo
uint8_t GetFrameNo(void) const
Get the frame number of the reservation being transmitted.
Definition:
uan-header-rc.cc:78
ns3::UanHeaderRcData::Print
void Print(std::ostream &os, Time::Unit unit) const
Specialized Print with Time::Unit declared.
Definition:
uan-header-rc.cc:113
ns3::UanHeaderRcRts
RTS header.
Definition:
uan-header-rc.h:118
ns3::UanHeaderRcRts::m_length
uint16_t m_length
Number of bytes (including headers) in data.
Definition:
uan-header-rc.h:225
ns3::UanHeaderRcRts::GetTimeStamp
Time GetTimeStamp(void) const
Get the transmit timestamp of this RTS packet.
Definition:
uan-header-rc.cc:211
ns3::UanHeaderRcRts::Print
void Print(std::ostream &os, Time::Unit unit) const
Specialized Print with Time::Unit declared.
Definition:
uan-header-rc.cc:258
ns3::UanHeaderRcRts::GetFrameNo
uint8_t GetFrameNo(void) const
Get the frame number.
Definition:
uan-header-rc.cc:223
ns3::UanHeaderRcRts::UanHeaderRcRts
UanHeaderRcRts()
Default constructor.
Definition:
uan-header-rc.cc:131
ns3::UanHeaderRcRts::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition:
uan-header-rc.cc:159
ns3::UanHeaderRcRts::m_retryNo
uint8_t m_retryNo
Retry number of RTS packet.
Definition:
uan-header-rc.h:227
ns3::UanHeaderRcRts::SetFrameNo
void SetFrameNo(uint8_t fno)
Set the frame number.
Definition:
uan-header-rc.cc:171
ns3::UanHeaderRcRts::~UanHeaderRcRts
virtual ~UanHeaderRcRts()
Destructor.
Definition:
uan-header-rc.cc:153
ns3::UanHeaderRcRts::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
uan-header-rc.cc:235
ns3::UanHeaderRcRts::GetNoFrames
uint8_t GetNoFrames(void) const
Get the number of data frames in the reservation.
Definition:
uan-header-rc.cc:199
ns3::UanHeaderRcRts::SetTimeStamp
void SetTimeStamp(Time timeStamp)
Set RTS transmission time.
Definition:
uan-header-rc.cc:188
ns3::UanHeaderRcRts::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
uan-header-rc.cc:270
ns3::UanHeaderRcRts::GetRetryNo
uint8_t GetRetryNo(void) const
Get the retry number of this RTS packet.
Definition:
uan-header-rc.cc:217
ns3::UanHeaderRcRts::m_noFrames
uint8_t m_noFrames
Number of data frames in reservation.
Definition:
uan-header-rc.h:224
ns3::UanHeaderRcRts::GetLength
uint16_t GetLength(void) const
Get the total number of bytes in the reservation, including headers.
Definition:
uan-header-rc.cc:205
ns3::UanHeaderRcRts::SetRetryNo
void SetRetryNo(uint8_t no)
Set the retry number of this RTS packet.
Definition:
uan-header-rc.cc:194
ns3::UanHeaderRcRts::m_frameNo
uint8_t m_frameNo
Reservation frame number.
Definition:
uan-header-rc.h:223
ns3::UanHeaderRcRts::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
uan-header-rc.cc:229
ns3::UanHeaderRcRts::SetNoFrames
void SetNoFrames(uint8_t no)
Set the number of data frames included in this reservation request.
Definition:
uan-header-rc.cc:177
ns3::UanHeaderRcRts::SetLength
void SetLength(uint16_t length)
Set the number of data bytes in the reservation.
Definition:
uan-header-rc.cc:183
ns3::UanHeaderRcRts::m_timeStamp
Time m_timeStamp
RTS TX timestamp.
Definition:
uan-header-rc.h:226
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition:
object-base.h:45
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition:
nstime.h:1244
first.address
address
Definition:
first.py:44
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
visualizer.core.start
def start()
Definition:
core.py:1853
uan-header-rc.h
src
uan
model
uan-header-rc.cc
Generated on Tue Feb 6 2024 19:21:28 for ns-3 by
1.9.1