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