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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
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
24
#include <set>
25
26
namespace
ns3 {
27
28
NS_OBJECT_ENSURE_REGISTERED
(UanHeaderRcData)
29
;
30
NS_OBJECT_ENSURE_REGISTERED
(UanHeaderRcRts)
31
;
32
NS_OBJECT_ENSURE_REGISTERED
(UanHeaderRcCtsGlobal)
33
;
34
NS_OBJECT_ENSURE_REGISTERED
(UanHeaderRcCts)
35
;
36
NS_OBJECT_ENSURE_REGISTERED
(UanHeaderRcAck)
37
;
38
39
UanHeaderRcData::UanHeaderRcData
()
40
:
Header
(),
41
m_frameNo (0),
42
m_propDelay (Seconds (0))
43
{
44
}
45
46
UanHeaderRcData::UanHeaderRcData
(uint8_t frameNo,
Time
propDelay)
47
:
Header
(),
48
m_frameNo (frameNo),
49
m_propDelay (propDelay)
50
{
51
52
}
53
54
UanHeaderRcData::~UanHeaderRcData
()
55
{
56
}
57
58
TypeId
59
UanHeaderRcData::GetTypeId
()
60
{
61
static
TypeId
tid =
TypeId
(
"ns3::UanHeaderRcData"
)
62
.
SetParent
<
Header
> ()
63
.AddConstructor<UanHeaderRcData> ()
64
;
65
return
tid;
66
}
67
68
void
69
UanHeaderRcData::SetFrameNo
(uint8_t no)
70
{
71
m_frameNo
= no;
72
}
73
74
void
75
UanHeaderRcData::SetPropDelay
(
Time
propDelay)
76
{
77
m_propDelay
= propDelay;
78
}
79
80
uint8_t
81
UanHeaderRcData::GetFrameNo
(
void
)
const
82
{
83
return
m_frameNo
;
84
}
85
86
Time
87
UanHeaderRcData::GetPropDelay
(
void
)
const
88
{
89
return
m_propDelay
;
90
}
91
92
uint32_t
93
UanHeaderRcData::GetSerializedSize
(
void
)
const
94
{
95
return
1 + 2;
96
}
97
98
void
99
UanHeaderRcData::Serialize
(
Buffer::Iterator
start
)
const
100
{
101
start.
WriteU8
(
m_frameNo
);
102
start.
WriteU16
( (uint16_t)(1000.0 *
m_propDelay
.
GetSeconds
() + 0.5));
103
}
104
uint32_t
105
UanHeaderRcData::Deserialize
(
Buffer::Iterator
start
)
106
{
107
Buffer::Iterator
rbuf =
start
;
108
109
m_frameNo
= start.
ReadU8
();
110
m_propDelay
= Seconds ( ((
double
) start.
ReadU16
()) / 1000.0 );
111
112
return
rbuf.
GetDistanceFrom
(start);
113
}
114
115
void
116
UanHeaderRcData::Print
(std::ostream &os)
const
117
{
118
os <<
"Frame No="
<< (uint32_t)
m_frameNo
<<
" Prop Delay="
<<
m_propDelay
.
GetSeconds
();
119
}
120
121
TypeId
122
UanHeaderRcData::GetInstanceTypeId
(
void
)
const
123
{
124
return
GetTypeId
();
125
}
126
127
128
UanHeaderRcRts::UanHeaderRcRts
()
129
:
Header
(),
130
m_frameNo (0),
131
m_noFrames (0),
132
m_length (0),
133
m_timeStamp (Seconds (0)),
134
m_retryNo (0)
135
{
136
137
}
138
139
UanHeaderRcRts::UanHeaderRcRts
(uint8_t frameNo, uint8_t retryNo, uint8_t noFrames, uint16_t length,
Time
timeStamp)
140
:
Header
(),
141
m_frameNo (frameNo),
142
m_noFrames (noFrames),
143
m_length (length),
144
m_timeStamp (timeStamp),
145
m_retryNo (retryNo)
146
{
147
148
}
149
150
UanHeaderRcRts::~UanHeaderRcRts
()
151
{
152
153
}
154
155
TypeId
156
UanHeaderRcRts::GetTypeId
()
157
{
158
static
TypeId
tid =
TypeId
(
"ns3::UanHeaderRcRts"
)
159
.
SetParent
<
Header
> ()
160
.AddConstructor<UanHeaderRcRts> ()
161
;
162
return
tid;
163
164
}
165
166
void
167
UanHeaderRcRts::SetFrameNo
(uint8_t no)
168
{
169
m_frameNo
= no;
170
}
171
172
void
173
UanHeaderRcRts::SetNoFrames
(uint8_t no)
174
{
175
m_noFrames
= no;
176
}
177
178
void
179
UanHeaderRcRts::SetLength
(uint16_t length)
180
{
181
m_length
= length;
182
}
183
void
184
UanHeaderRcRts::SetTimeStamp
(
Time
timeStamp)
185
{
186
m_timeStamp
= timeStamp;
187
}
188
189
void
190
UanHeaderRcRts::SetRetryNo
(uint8_t no)
191
{
192
m_retryNo
= no;
193
}
194
uint8_t
195
UanHeaderRcRts::GetNoFrames
()
const
196
{
197
return
m_noFrames
;
198
}
199
200
uint16_t
201
UanHeaderRcRts::GetLength
()
const
202
{
203
return
m_length
;
204
}
205
206
Time
207
UanHeaderRcRts::GetTimeStamp
(
void
)
const
208
{
209
return
m_timeStamp
;
210
}
211
212
uint8_t
213
UanHeaderRcRts::GetRetryNo
(
void
)
const
214
{
215
return
m_retryNo
;
216
}
217
218
uint8_t
219
UanHeaderRcRts::GetFrameNo
(
void
)
const
220
{
221
return
m_frameNo
;
222
}
223
224
uint32_t
225
UanHeaderRcRts::GetSerializedSize
(
void
)
const
226
{
227
return
1 + 1 + 1 + 4 + 2;
228
}
229
230
void
231
UanHeaderRcRts::Serialize
(
Buffer::Iterator
start
)
const
232
{
233
start.
WriteU8
(
m_frameNo
);
234
start.
WriteU8
(
m_retryNo
);
235
start.
WriteU8
(
m_noFrames
);
236
start.
WriteU16
(
m_length
);
237
start.
WriteU32
((uint32_t)(
m_timeStamp
.
GetSeconds
() * 1000.0 + 0.5));
238
// start.WriteU16(uint16_t (m_timeStamp.GetSeconds ()*1000));
239
}
240
241
uint32_t
242
UanHeaderRcRts::Deserialize
(
Buffer::Iterator
start
)
243
{
244
Buffer::Iterator
rbuf =
start
;
245
m_frameNo
= rbuf.
ReadU8
();
246
m_retryNo
= rbuf.
ReadU8
();
247
m_noFrames
= rbuf.
ReadU8
();
248
m_length
= rbuf.
ReadU16
();
249
m_timeStamp
= Seconds ( ((
double
) rbuf.
ReadU32
()) / 1000.0 );
250
// m_timeStamp = Seconds ( rbuf.ReadU16 ()/1000 );
251
return
rbuf.
GetDistanceFrom
(start);
252
}
253
254
void
255
UanHeaderRcRts::Print
(std::ostream &os)
const
256
{
257
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
();
258
}
259
260
TypeId
261
UanHeaderRcRts::GetInstanceTypeId
(
void
)
const
262
{
263
return
GetTypeId
();
264
}
265
266
267
268
269
UanHeaderRcCtsGlobal::UanHeaderRcCtsGlobal
()
270
:
Header
(),
271
m_retryRate (0),
272
m_rateNum (0)
273
{
274
275
}
276
277
UanHeaderRcCtsGlobal::UanHeaderRcCtsGlobal
(
Time
wt,
Time
ts, uint16_t rate, uint16_t retryRate)
278
:
Header
(),
279
m_timeStampTx (ts),
280
m_winTime (wt),
281
m_retryRate (retryRate),
282
m_rateNum (rate)
283
{
284
285
}
286
287
UanHeaderRcCtsGlobal::~UanHeaderRcCtsGlobal
()
288
{
289
290
}
291
292
TypeId
293
UanHeaderRcCtsGlobal::GetTypeId
()
294
{
295
static
TypeId
tid =
TypeId
(
"ns3::UanHeaderRcCtsGlobal"
)
296
.
SetParent
<
Header
> ()
297
.AddConstructor<UanHeaderRcCtsGlobal> ()
298
;
299
return
tid;
300
301
}
302
303
304
void
305
UanHeaderRcCtsGlobal::SetRateNum
(uint16_t rate)
306
{
307
m_rateNum
= rate;
308
}
309
310
void
311
UanHeaderRcCtsGlobal::SetRetryRate
(uint16_t rate)
312
{
313
m_retryRate
= rate;
314
}
315
316
void
317
UanHeaderRcCtsGlobal::SetWindowTime
(
Time
t)
318
{
319
m_winTime
= t;
320
}
321
322
void
323
UanHeaderRcCtsGlobal::SetTxTimeStamp
(
Time
t)
324
{
325
m_timeStampTx
= t;
326
}
327
328
Time
329
UanHeaderRcCtsGlobal::GetWindowTime
(
void
)
const
330
{
331
return
m_winTime
;
332
}
333
334
Time
335
UanHeaderRcCtsGlobal::GetTxTimeStamp
(
void
)
const
336
{
337
return
m_timeStampTx
;
338
}
339
340
uint16_t
341
UanHeaderRcCtsGlobal::GetRetryRate
(
void
)
const
342
{
343
return
m_retryRate
;
344
}
345
346
uint16_t
347
UanHeaderRcCtsGlobal::GetRateNum
(
void
)
const
348
{
349
return
m_rateNum
;
350
}
351
uint32_t
352
UanHeaderRcCtsGlobal::GetSerializedSize
(
void
)
const
353
{
354
return
4 + 4 + 2 + 2;
355
}
356
357
void
358
UanHeaderRcCtsGlobal::Serialize
(
Buffer::Iterator
start
)
const
359
{
360
start.
WriteU16
(
m_rateNum
);
361
start.
WriteU16
(
m_retryRate
);
362
start.
WriteU32
( (uint32_t)(
m_timeStampTx
.
GetSeconds
() * 1000.0 + 0.5));
363
start.
WriteU32
( (uint32_t)(
m_winTime
.
GetSeconds
() * 1000.0 + 0.5));
364
}
365
366
uint32_t
367
UanHeaderRcCtsGlobal::Deserialize
(
Buffer::Iterator
start
)
368
{
369
Buffer::Iterator
rbuf =
start
;
370
m_rateNum
= rbuf.
ReadU16
();
371
m_retryRate
= rbuf.
ReadU16
();
372
m_timeStampTx
= Seconds ( ( (
double
) rbuf.
ReadU32
()) / 1000.0 );
373
m_winTime
= Seconds ( ( (
double
) rbuf.
ReadU32
()) / 1000.0 );
374
return
rbuf.
GetDistanceFrom
(start);
375
376
}
377
378
void
379
UanHeaderRcCtsGlobal::Print
(std::ostream &os)
const
380
{
381
os <<
"CTS Global (Rate #="
<<
m_rateNum
<<
", Retry Rate="
<<
m_retryRate
<<
", TX Time="
<<
m_timeStampTx
.
GetSeconds
() <<
", Win Time="
<<
m_winTime
.
GetSeconds
() <<
")"
;
382
}
383
384
TypeId
385
UanHeaderRcCtsGlobal::GetInstanceTypeId
(
void
)
const
386
{
387
return
GetTypeId
();
388
}
389
390
UanHeaderRcCts::UanHeaderRcCts
()
391
:
Header
(),
392
m_frameNo (0),
393
m_timeStampRts (Seconds (0)),
394
m_retryNo (0),
395
m_delay (Seconds (0)),
396
m_address (
UanAddress
::GetBroadcast ())
397
{
398
399
}
400
401
UanHeaderRcCts::UanHeaderRcCts
(uint8_t frameNo, uint8_t retryNo,
Time
ts,
Time
delay,
UanAddress
addr)
402
:
Header
(),
403
m_frameNo (frameNo),
404
m_timeStampRts (ts),
405
m_retryNo (retryNo),
406
m_delay (delay),
407
m_address (addr)
408
{
409
410
}
411
412
UanHeaderRcCts::~UanHeaderRcCts
()
413
{
414
415
}
416
417
TypeId
418
UanHeaderRcCts::GetTypeId
()
419
{
420
static
TypeId
tid =
TypeId
(
"ns3::UanHeaderRcCts"
)
421
.
SetParent
<
Header
> ()
422
.AddConstructor<UanHeaderRcCts> ()
423
;
424
return
tid;
425
426
}
427
428
void
429
UanHeaderRcCts::SetFrameNo
(uint8_t frameNo)
430
{
431
m_frameNo
= frameNo;
432
}
433
434
void
435
UanHeaderRcCts::SetRtsTimeStamp
(
Time
timeStamp)
436
{
437
m_timeStampRts
= timeStamp;
438
}
439
440
441
void
442
UanHeaderRcCts::SetDelayToTx
(
Time
delay)
443
{
444
m_delay
= delay;
445
}
446
447
void
448
UanHeaderRcCts::SetRetryNo
(uint8_t no)
449
{
450
m_retryNo
= no;
451
}
452
453
void
454
UanHeaderRcCts::SetAddress
(
UanAddress
addr)
455
{
456
m_address
= addr;
457
}
458
uint8_t
459
UanHeaderRcCts::GetFrameNo
()
const
460
{
461
return
m_frameNo
;
462
}
463
464
Time
465
UanHeaderRcCts::GetRtsTimeStamp
(
void
)
const
466
{
467
return
m_timeStampRts
;
468
}
469
470
Time
471
UanHeaderRcCts::GetDelayToTx
(
void
)
const
472
{
473
return
m_delay
;
474
}
475
476
uint8_t
477
UanHeaderRcCts::GetRetryNo
()
const
478
{
479
return
m_retryNo
;
480
}
481
482
UanAddress
483
UanHeaderRcCts::GetAddress
()
const
484
{
485
return
m_address
;
486
}
487
488
uint32_t
489
UanHeaderRcCts::GetSerializedSize
(
void
)
const
490
{
491
return
1 + 1 + 1 + 4 + 4;
492
}
493
494
495
void
496
UanHeaderRcCts::Serialize
(
Buffer::Iterator
start
)
const
497
{
498
start.
WriteU8
(
m_address
.
GetAsInt
());
499
start.
WriteU8
(
m_frameNo
);
500
start.
WriteU8
(
m_retryNo
);
501
start.
WriteU32
((uint32_t)(
m_timeStampRts
.
GetSeconds
() * 1000.0 + 0.5));
502
start.
WriteU32
((uint32_t)(
m_delay
.
GetSeconds
() * 1000.0 + 0.5));
503
}
504
505
uint32_t
506
UanHeaderRcCts::Deserialize
(
Buffer::Iterator
start
)
507
{
508
Buffer::Iterator
rbuf =
start
;
509
m_address
=
UanAddress
(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)
const
520
{
521
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
() <<
")"
;
522
}
523
524
TypeId
525
UanHeaderRcCts::GetInstanceTypeId
(
void
)
const
526
{
527
return
GetTypeId
();
528
}
529
530
UanHeaderRcAck::UanHeaderRcAck
()
531
: m_frameNo (0)
532
{
533
}
534
535
UanHeaderRcAck::~UanHeaderRcAck
()
536
{
537
m_nackedFrames
.clear ();
538
}
539
540
TypeId
541
UanHeaderRcAck::GetTypeId
()
542
{
543
static
TypeId
tid =
TypeId
(
"ns3::UanHeaderRcAck"
)
544
.
SetParent
<
Header
> ()
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:845
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:496
ns3::UanHeaderRcData::GetPropDelay
Time GetPropDelay(void) const
Get the propagation delay found in handshaking.
Definition:
uan-header-rc.cc:87
ns3::UanHeaderRcRts::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition:
uan-header-rc.cc:242
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:173
ns3::Time
keep track of time values and allow control of global simulation resolution
Definition:
nstime.h:81
ns3::Buffer::Iterator::ReadU32
uint32_t ReadU32(void)
Definition:
buffer.cc:997
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:156
ns3::UanHeaderRcData::SetPropDelay
void SetPropDelay(Time propDelay)
Set the propagation delay as found in handshaking.
Definition:
uan-header-rc.cc:75
ns3::UanHeaderRcCts::GetRetryNo
uint8_t GetRetryNo(void) const
Get the retry number of the RTS packet being cleared.
Definition:
uan-header-rc.cc:477
ns3::UanHeaderRcCtsGlobal::SetRateNum
void SetRateNum(uint16_t rate)
Set the rate number corresponding to data rate of current cycle.
Definition:
uan-header-rc.cc:305
ns3::UanHeaderRcCtsGlobal::UanHeaderRcCtsGlobal
UanHeaderRcCtsGlobal()
Default constructor.
Definition:
uan-header-rc.cc:269
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:448
ns3::UanHeaderRcData::SetFrameNo
void SetFrameNo(uint8_t frameNum)
Set the frame number of the reservation being transmitted.
Definition:
uan-header-rc.cc:69
ns3::UanHeaderRcRts::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Definition:
uan-header-rc.cc:261
ns3::UanHeaderRcCts::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition:
uan-header-rc.cc:506
ns3::UanHeaderRcCts::SetAddress
void SetAddress(UanAddress addr)
Set the destination address, for scheduling info.
Definition:
uan-header-rc.cc:454
ns3::UanHeaderRcRts::m_frameNo
uint8_t m_frameNo
Reservation frame number.
Definition:
uan-header-rc.h:209
ns3::NS_OBJECT_ENSURE_REGISTERED
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
ns3::UanHeaderRcCtsGlobal::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Definition:
uan-header-rc.cc:385
ns3::UanHeaderRcCtsGlobal::m_rateNum
uint16_t m_rateNum
Rate number.
Definition:
uan-header-rc.h:309
visualizer.core.start
def start
Definition:
core.py:1482
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:317
ns3::UanHeaderRcRts::GetFrameNo
uint8_t GetFrameNo(void) const
Get the frame number.
Definition:
uan-header-rc.cc:219
ns3::Buffer::Iterator::GetDistanceFrom
uint32_t GetDistanceFrom(Iterator const &o) const
Definition:
buffer.cc:807
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:98
ns3::Time::GetSeconds
double GetSeconds(void) const
Definition:
nstime.h:274
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
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:207
ns3::Buffer::Iterator::WriteU16
void WriteU16(uint16_t data)
Definition:
buffer.cc:895
ns3::UanHeaderRcRts::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
uan-header-rc.cc:231
ns3::UanHeaderRcCts::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Definition:
uan-header-rc.cc:525
ns3::UanHeaderRcCtsGlobal::Print
virtual void Print(std::ostream &os) const
Definition:
uan-header-rc.cc:379
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:367
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:213
uan-header-rc.h
ns3::UanHeaderRcCts::GetAddress
UanAddress GetAddress(void) const
Get the destination address, for scheduling info.
Definition:
uan-header-rc.cc:483
ns3::UanHeaderRcRts::SetLength
void SetLength(uint16_t length)
Set the number of data bytes in the reservation.
Definition:
uan-header-rc.cc:179
ns3::UanHeaderRcData::GetFrameNo
uint8_t GetFrameNo(void) const
Get the frame number of the reservation being transmitted.
Definition:
uan-header-rc.cc:81
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:184
ns3::UanHeaderRcCts::m_timeStampRts
Time m_timeStampRts
RX time of RTS packet at gateway.
Definition:
uan-header-rc.h:418
ns3::UanHeaderRcCtsGlobal::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition:
uan-header-rc.cc:293
ns3::UanHeaderRcCts::GetRtsTimeStamp
Time GetRtsTimeStamp(void) const
Get the receive time of the RTS being cleared.
Definition:
uan-header-rc.cc:465
ns3::UanHeaderRcCts::SetDelayToTx
void SetDelayToTx(Time delay)
Set the time delay from CTS transmission to first data frame arrival.
Definition:
uan-header-rc.cc:442
ns3::UanHeaderRcAck::~UanHeaderRcAck
virtual ~UanHeaderRcAck()
Destructor.
Definition:
uan-header-rc.cc:535
ns3::UanHeaderRcCts::SetFrameNo
void SetFrameNo(uint8_t frameNo)
Set the RTS frame number being cleared.
Definition:
uan-header-rc.cc:429
ns3::UanHeaderRcCts::Print
virtual void Print(std::ostream &os) const
Definition:
uan-header-rc.cc:519
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:329
ns3::UanHeaderRcCtsGlobal::GetRateNum
uint16_t GetRateNum(void) const
Get the data rate number.
Definition:
uan-header-rc.cc:347
ns3::UanHeaderRcCts::~UanHeaderRcCts
virtual ~UanHeaderRcCts()
Destructor.
Definition:
uan-header-rc.cc:412
ns3::UanHeaderRcCtsGlobal::SetTxTimeStamp
void SetTxTimeStamp(Time timeStamp)
Set the CTS timestamp.
Definition:
uan-header-rc.cc:323
ns3::UanHeaderRcRts::GetNoFrames
uint8_t GetNoFrames(void) const
Get the number of data frames in the reservation.
Definition:
uan-header-rc.cc:195
ns3::UanHeaderRcData::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Definition:
uan-header-rc.cc:122
ns3::UanHeaderRcCts::SetRtsTimeStamp
void SetRtsTimeStamp(Time timeStamp)
Set the timestamp for RTS reception.
Definition:
uan-header-rc.cc:435
ns3::UanHeaderRcData::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition:
uan-header-rc.cc:59
ns3::Buffer::Iterator::WriteU8
void WriteU8(uint8_t data)
Definition:
buffer.h:690
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:39
ns3::UanHeaderRcCtsGlobal::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
uan-header-rc.cc:358
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:99
ns3::UanHeaderRcData::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition:
uan-header-rc.cc:105
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:116
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:150
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:390
ns3::UanHeaderRcCtsGlobal::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
uan-header-rc.cc:352
ns3::UanHeaderRcCtsGlobal::GetRetryRate
uint16_t GetRetryRate(void) const
Get the retry rate number.
Definition:
uan-header-rc.cc:341
ns3::Buffer::Iterator::ReadU8
uint8_t ReadU8(void)
Definition:
buffer.h:819
ns3::UanHeaderRcCts::GetFrameNo
uint8_t GetFrameNo(void) const
Get the frame number of the RTS being cleared.
Definition:
uan-header-rc.cc:459
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:471
ns3::UanHeaderRcAck::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition:
uan-header-rc.cc:541
ns3::UanHeaderRcCtsGlobal::SetRetryRate
void SetRetryRate(uint16_t rate)
Set the retry rate number for the current cycle.
Definition:
uan-header-rc.cc:311
ns3::UanHeaderRcRts::UanHeaderRcRts
UanHeaderRcRts()
Default constructor.
Definition:
uan-header-rc.cc:128
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:287
ns3::Buffer::Iterator::WriteU32
void WriteU32(uint32_t data)
Definition:
buffer.cc:903
ns3::UanHeaderRcCts::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
uan-header-rc.cc:489
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:49
ns3::UanHeaderRcCtsGlobal::GetTxTimeStamp
Time GetTxTimeStamp(void) const
Get the CTS transmit timestamp.
Definition:
uan-header-rc.cc:335
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:418
ns3::UanHeaderRcRts::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
uan-header-rc.cc:225
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Definition:
type-id.cc:611
ns3::UanHeaderRcRts::SetRetryNo
void SetRetryNo(uint8_t no)
Set the retry number of this RTS packet.
Definition:
uan-header-rc.cc:190
ns3::UanHeaderRcRts::m_noFrames
uint8_t m_noFrames
Number of data frames in reservation.
Definition:
uan-header-rc.h:210
ns3::UanHeaderRcAck::UanHeaderRcAck
UanHeaderRcAck()
Default constructor.
Definition:
uan-header-rc.cc:530
ns3::UanHeaderRcRts::SetFrameNo
void SetFrameNo(uint8_t fno)
Set the frame number.
Definition:
uan-header-rc.cc:167
ns3::UanHeaderRcRts::GetLength
uint16_t GetLength(void) const
Get the total number of bytes in the reservation, including headers.
Definition:
uan-header-rc.cc:201
ns3::UanHeaderRcRts::Print
virtual void Print(std::ostream &os) const
Definition:
uan-header-rc.cc:255
ns3::UanHeaderRcData::~UanHeaderRcData
virtual ~UanHeaderRcData()
Destructor.
Definition:
uan-header-rc.cc:54
ns3::UanHeaderRcData::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
uan-header-rc.cc:93
src
uan
model
uan-header-rc.cc
Generated on Sat Apr 19 2014 14:07:09 for ns-3 by
1.8.6