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