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