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
lte-rlc-am-header.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Manuel Requena <manuel.requena@cttc.es>
7
*/
8
9
#include "
lte-rlc-am-header.h
"
10
11
#include "ns3/log.h"
12
13
namespace
ns3
14
{
15
16
NS_LOG_COMPONENT_DEFINE
(
"LteRlcAmHeader"
);
17
18
NS_OBJECT_ENSURE_REGISTERED
(LteRlcAmHeader);
19
20
LteRlcAmHeader::LteRlcAmHeader
()
21
: m_headerLength(0),
22
m_dataControlBit(0xff),
23
m_resegmentationFlag(0xff),
24
m_pollingBit(0xff),
25
m_framingInfo(0xff),
26
m_sequenceNumber(0xfffa),
27
m_segmentOffset(0xffff),
28
m_lastOffset(0xffff),
29
m_controlPduType(0xff),
30
m_ackSn(0xffff)
31
{
32
}
33
34
LteRlcAmHeader::~LteRlcAmHeader
()
35
{
36
m_headerLength
= 0;
37
m_dataControlBit
= 0xff;
38
m_resegmentationFlag
= 0xff;
39
m_pollingBit
= 0xff;
40
m_framingInfo
= 0xff;
41
m_sequenceNumber
= 0xfffb;
42
m_segmentOffset
= 0xffff;
43
m_lastOffset
= 0xffff;
44
m_controlPduType
= 0xff;
45
m_ackSn
= 0xffff;
46
}
47
48
void
49
LteRlcAmHeader::SetDataPdu
()
50
{
51
m_headerLength
= 4;
52
m_dataControlBit
=
DATA_PDU
;
53
}
54
55
void
56
LteRlcAmHeader::SetControlPdu
(uint8_t controlPduType)
57
{
58
m_headerLength
= 2;
59
m_dataControlBit
=
CONTROL_PDU
;
60
m_controlPduType
= controlPduType;
61
}
62
63
bool
64
LteRlcAmHeader::IsDataPdu
()
const
65
{
66
return
m_dataControlBit
==
DATA_PDU
;
67
}
68
69
bool
70
LteRlcAmHeader::IsControlPdu
()
const
71
{
72
return
m_dataControlBit
==
CONTROL_PDU
;
73
}
74
75
void
76
LteRlcAmHeader::SetFramingInfo
(uint8_t framingInfo)
77
{
78
m_framingInfo
= framingInfo & 0x03;
79
}
80
81
void
82
LteRlcAmHeader::SetSequenceNumber
(
SequenceNumber10
sequenceNumber)
83
{
84
m_sequenceNumber
= sequenceNumber;
85
}
86
87
uint8_t
88
LteRlcAmHeader::GetFramingInfo
()
const
89
{
90
return
m_framingInfo
;
91
}
92
93
SequenceNumber10
94
LteRlcAmHeader::GetSequenceNumber
()
const
95
{
96
return
m_sequenceNumber
;
97
}
98
99
void
100
LteRlcAmHeader::PushExtensionBit
(uint8_t extensionBit)
101
{
102
m_extensionBits
.push_back(extensionBit);
103
if
(
m_extensionBits
.size() > 1)
104
{
105
if
(
m_extensionBits
.size() % 2)
106
{
107
m_headerLength
+= 1;
108
}
109
else
110
{
111
m_headerLength
+= 2;
112
}
113
}
114
}
115
116
void
117
LteRlcAmHeader::PushLengthIndicator
(uint16_t lengthIndicator)
118
{
119
m_lengthIndicators
.push_back(lengthIndicator);
120
}
121
122
uint8_t
123
LteRlcAmHeader::PopExtensionBit
()
124
{
125
uint8_t extensionBit =
m_extensionBits
.front();
126
m_extensionBits
.pop_front();
127
128
return
extensionBit;
129
}
130
131
uint16_t
132
LteRlcAmHeader::PopLengthIndicator
()
133
{
134
uint16_t lengthIndicator =
m_lengthIndicators
.front();
135
m_lengthIndicators
.pop_front();
136
137
return
lengthIndicator;
138
}
139
140
void
141
LteRlcAmHeader::SetResegmentationFlag
(uint8_t resegFlag)
142
{
143
m_resegmentationFlag
= resegFlag & 0x01;
144
}
145
146
uint8_t
147
LteRlcAmHeader::GetResegmentationFlag
()
const
148
{
149
return
m_resegmentationFlag
;
150
}
151
152
void
153
LteRlcAmHeader::SetPollingBit
(uint8_t pollingBit)
154
{
155
m_pollingBit
= pollingBit & 0x01;
156
}
157
158
uint8_t
159
LteRlcAmHeader::GetPollingBit
()
const
160
{
161
return
m_pollingBit
;
162
}
163
164
void
165
LteRlcAmHeader::SetLastSegmentFlag
(uint8_t lsf)
166
{
167
m_lastSegmentFlag
= lsf & 0x01;
168
}
169
170
uint8_t
171
LteRlcAmHeader::GetLastSegmentFlag
()
const
172
{
173
return
m_lastSegmentFlag
;
174
}
175
176
void
177
LteRlcAmHeader::SetSegmentOffset
(uint16_t segmentOffset)
178
{
179
m_segmentOffset
= segmentOffset & 0x7FFF;
180
}
181
182
uint16_t
183
LteRlcAmHeader::GetSegmentOffset
()
const
184
{
185
return
m_segmentOffset
;
186
}
187
188
uint16_t
189
LteRlcAmHeader::GetLastOffset
()
const
190
{
191
return
m_lastOffset
;
192
}
193
194
void
195
LteRlcAmHeader::SetAckSn
(
SequenceNumber10
ackSn)
196
{
197
m_ackSn
= ackSn;
198
}
199
200
bool
201
LteRlcAmHeader::OneMoreNackWouldFitIn
(uint16_t bytes)
202
{
203
NS_LOG_FUNCTION
(
this
<< bytes);
204
NS_ASSERT_MSG
(
m_dataControlBit
==
CONTROL_PDU
&&
m_controlPduType
==
LteRlcAmHeader::STATUS_PDU
,
205
"method allowed only for STATUS PDUs"
);
206
if
(
m_nackSnList
.size() % 2 == 0)
207
{
208
return
(
m_headerLength
< bytes);
209
}
210
else
211
{
212
return
(
m_headerLength
< (bytes - 1));
213
}
214
}
215
216
void
217
LteRlcAmHeader::PushNack
(
int
nack)
218
{
219
NS_LOG_FUNCTION
(
this
<< nack);
220
NS_ASSERT_MSG
(
m_dataControlBit
==
CONTROL_PDU
&&
m_controlPduType
==
LteRlcAmHeader::STATUS_PDU
,
221
"method allowed only for STATUS PDUs"
);
222
m_nackSnList
.push_back(nack);
223
224
if
(
m_nackSnList
.size() % 2 == 0)
225
{
226
m_headerLength
++;
227
}
228
else
229
{
230
m_headerLength
+= 2;
231
}
232
}
233
234
bool
235
LteRlcAmHeader::IsNackPresent
(
SequenceNumber10
nack)
236
{
237
NS_LOG_FUNCTION
(
this
);
238
NS_ASSERT_MSG
(
m_dataControlBit
==
CONTROL_PDU
&&
m_controlPduType
==
LteRlcAmHeader::STATUS_PDU
,
239
"method allowed only for STATUS PDUs"
);
240
for
(
auto
nackIt =
m_nackSnList
.begin(); nackIt !=
m_nackSnList
.end(); ++nackIt)
241
{
242
if
((*nackIt) == nack.
GetValue
())
243
{
244
return
true
;
245
}
246
}
247
return
false
;
248
}
249
250
int
251
LteRlcAmHeader::PopNack
()
252
{
253
NS_LOG_FUNCTION
(
this
);
254
NS_ASSERT_MSG
(
m_dataControlBit
==
CONTROL_PDU
&&
m_controlPduType
==
LteRlcAmHeader::STATUS_PDU
,
255
"method allowed only for STATUS PDUs"
);
256
if
(
m_nackSnList
.empty())
257
{
258
return
-1;
259
}
260
261
int
nack =
m_nackSnList
.front();
262
m_nackSnList
.pop_front();
263
264
return
nack;
265
}
266
267
SequenceNumber10
268
LteRlcAmHeader::GetAckSn
()
const
269
{
270
return
m_ackSn
;
271
}
272
273
TypeId
274
LteRlcAmHeader::GetTypeId
()
275
{
276
static
TypeId
tid =
TypeId
(
"ns3::LteRlcAmHeader"
)
277
.
SetParent
<
Header
>()
278
.SetGroupName(
"Lte"
)
279
.AddConstructor<
LteRlcAmHeader
>();
280
return
tid;
281
}
282
283
TypeId
284
LteRlcAmHeader::GetInstanceTypeId
()
const
285
{
286
return
GetTypeId
();
287
}
288
289
void
290
LteRlcAmHeader::Print
(std::ostream& os)
const
291
{
292
auto
it1 =
m_extensionBits
.begin();
293
auto
it2 =
m_lengthIndicators
.begin();
294
auto
it3 =
m_nackSnList
.begin();
295
296
os <<
"Len="
<<
m_headerLength
;
297
os <<
" D/C="
<< (uint16_t)
m_dataControlBit
;
298
299
if
(
m_dataControlBit
==
DATA_PDU
)
300
{
301
os <<
" RF="
<< (uint16_t)
m_resegmentationFlag
;
302
os <<
" P="
<< (uint16_t)
m_pollingBit
;
303
os <<
" FI="
<< (uint16_t)
m_framingInfo
;
304
os <<
" E="
<< (uint16_t)(*it1);
305
os <<
" SN="
<<
m_sequenceNumber
;
306
os <<
" LSF="
<< (uint16_t)(
m_lastSegmentFlag
);
307
os <<
" SO="
<<
m_segmentOffset
;
308
309
it1++;
310
if
(it1 !=
m_extensionBits
.end())
311
{
312
os <<
" E="
;
313
}
314
while
(it1 !=
m_extensionBits
.end())
315
{
316
os << (uint16_t)(*it1);
317
it1++;
318
}
319
320
if
(it2 !=
m_lengthIndicators
.end())
321
{
322
os <<
" LI="
;
323
}
324
while
(it2 !=
m_lengthIndicators
.end())
325
{
326
os << (uint16_t)(*it2) <<
" "
;
327
it2++;
328
}
329
}
330
else
// if ( m_dataControlBit == CONTROL_PDU )
331
{
332
os <<
" ACK_SN="
<<
m_ackSn
;
333
334
while
(it3 !=
m_nackSnList
.end())
335
{
336
os <<
" NACK_SN="
<< (int)(*it3);
337
it3++;
338
}
339
}
340
}
341
342
uint32_t
343
LteRlcAmHeader::GetSerializedSize
()
const
344
{
345
return
m_headerLength
;
346
}
347
348
void
349
LteRlcAmHeader::Serialize
(
Buffer::Iterator
start)
const
350
{
351
Buffer::Iterator
i = start;
352
353
auto
it1 =
m_extensionBits
.begin();
354
auto
it2 =
m_lengthIndicators
.begin();
355
auto
it3 =
m_nackSnList
.begin();
356
357
if
(
m_dataControlBit
==
DATA_PDU
)
358
{
359
i.
WriteU8
(((
DATA_PDU
<< 7) & 0x80) | ((
m_resegmentationFlag
<< 6) & 0x40) |
360
((
m_pollingBit
<< 5) & 0x20) | ((
m_framingInfo
<< 3) & 0x18) |
361
(((*it1) << 2) & 0x04) | ((
m_sequenceNumber
.
GetValue
() >> 8) & 0x0003));
362
i.
WriteU8
(
m_sequenceNumber
.
GetValue
() & 0x00FF);
363
i.
WriteU8
(((
m_lastSegmentFlag
<< 7) & 0x80) | ((
m_segmentOffset
>> 8) & 0x007F));
364
i.
WriteU8
(
m_segmentOffset
& 0x00FF);
365
it1++;
366
367
while
(it1 !=
m_extensionBits
.end() && it2 !=
m_lengthIndicators
.end())
368
{
369
uint16_t oddLi;
370
uint16_t evenLi;
371
uint8_t oddE;
372
uint8_t evenE;
373
374
oddE = *it1;
375
oddLi = *it2;
376
377
it1++;
378
it2++;
379
380
if
(it1 !=
m_extensionBits
.end() && it2 !=
m_lengthIndicators
.end())
381
{
382
evenE = *it1;
383
evenLi = *it2;
384
385
i.
WriteU8
(((oddE << 7) & 0x80) | ((oddLi >> 4) & 0x007F));
386
i.
WriteU8
(((oddLi << 4) & 0x00F0) | ((evenE << 3) & 0x08) |
387
((evenLi >> 8) & 0x0007));
388
i.
WriteU8
(evenLi & 0x00FF);
389
390
it1++;
391
it2++;
392
}
393
else
394
{
395
i.
WriteU8
(((oddE << 7) & 0x80) | ((oddLi >> 4) & 0x007F));
396
i.
WriteU8
((oddLi << 4) & 0x00F0);
// Padding is implicit
397
}
398
}
399
}
400
else
// if ( m_dataControlBit == CONTROL_PDU )
401
{
402
i.
WriteU8
(((
CONTROL_PDU
<< 7) & 0x80) | ((
m_controlPduType
<< 4) & 0x70) |
403
((
m_ackSn
.
GetValue
() >> 6) & 0x0F));
404
// note: second part of ackSn will be written later
405
406
// serialize the NACKs
407
if
(it3 ==
m_nackSnList
.end())
408
{
409
NS_LOG_LOGIC
(
this
<<
" no NACKs"
);
410
// If there are no NACKs then this line adds the rest of the ACK
411
// along with 0x00, indicating an E1 value of 0 or no NACKs follow.
412
i.
WriteU8
((
m_ackSn
.
GetValue
() << 2) & 0xFC);
413
}
414
else
415
{
416
int
oddNack = *it3;
417
int
evenNack = -1;
418
// Else write out a series of E1 = 1 and NACK values. Note since we
419
// are not supporting SO start/end the value of E2 will always be 0.
420
421
// First write out the ACK along with the very first NACK
422
// And the remaining NACK with 0x02 or 10 in binary to set
423
// E1 to 1, then Or in the first bit of the NACK
424
i.
WriteU8
(((
m_ackSn
.
GetValue
() << 2) & 0xFC) | (0x02) | ((*it3 >> 9) & 0x01));
425
426
while
(it3 !=
m_nackSnList
.end())
427
{
428
// The variable oddNack has the current NACK value to write, also
429
// either the setup to enter this loop or the previous loop would
430
// have written the highest order bit to the previous octet.
431
// Write the next set of bits (2 - 9) into the next octet
432
i.
WriteU8
((oddNack >> 1) & 0xFF);
433
434
// Next check to see if there is going to be another NACK after
435
// this
436
it3++;
437
if
(it3 !=
m_nackSnList
.end())
438
{
439
// Yes there will be another NACK after this, so E1 will be 1
440
evenNack = *it3;
441
i.
WriteU8
(((oddNack << 7) & 0x80) | (0x40)
// E1 = 1 E2 = 0, more NACKs
442
| ((evenNack >> 5) & 0x1F));
443
444
// The final octet of this loop will have the rest of the
445
// NACK and another E1, E2. Check to see if there will be
446
// one more NACK after this.
447
it3++;
448
if
(it3 !=
m_nackSnList
.end())
449
{
450
// Yes there is at least one more NACK. Finish writing
451
// this octet and the next iteration will do the rest.
452
oddNack = *it3;
453
i.
WriteU8
(((evenNack << 3) & 0xF8) | (0x04) | ((oddNack >> 9) & 0x01));
454
}
455
else
456
{
457
// No, there are no more NACKs
458
i.
WriteU8
((evenNack << 3) & 0xF8);
459
}
460
}
461
else
462
{
463
// No, this is the last NACK so E1 will be 0
464
i.
WriteU8
((oddNack << 7) & 0x80);
465
}
466
}
467
}
468
}
469
}
470
471
uint32_t
472
LteRlcAmHeader::Deserialize
(
Buffer::Iterator
start)
473
{
474
Buffer::Iterator
i = start;
475
uint8_t byte_1;
476
uint8_t byte_2;
477
uint8_t byte_3;
478
uint8_t byte_4;
479
uint8_t extensionBit;
480
481
byte_1 = i.
ReadU8
();
482
m_headerLength
= 1;
483
m_dataControlBit
= (byte_1 & 0x80) >> 7;
484
485
if
(
m_dataControlBit
==
DATA_PDU
)
486
{
487
byte_2 = i.
ReadU8
();
488
byte_3 = i.
ReadU8
();
489
byte_4 = i.
ReadU8
();
490
m_headerLength
+= 3;
491
492
m_resegmentationFlag
= (byte_1 & 0x40) >> 6;
493
m_pollingBit
= (byte_1 & 0x20) >> 5;
494
m_framingInfo
= (byte_1 & 0x18) >> 3;
495
m_sequenceNumber
= ((byte_1 & 0x03) << 8) | byte_2;
496
497
m_lastSegmentFlag
= (byte_3 & 0x80) >> 7;
498
m_segmentOffset
= (byte_3 & 0x7F) | byte_4;
499
500
extensionBit = (byte_1 & 0x04) >> 2;
501
m_extensionBits
.push_back(extensionBit);
502
503
if
(extensionBit ==
DATA_FIELD_FOLLOWS
)
504
{
505
return
GetSerializedSize
();
506
}
507
508
uint16_t oddLi;
509
uint16_t evenLi;
510
uint8_t oddE;
511
uint8_t evenE;
512
bool
moreLiFields = (extensionBit ==
E_LI_FIELDS_FOLLOWS
);
513
514
while
(moreLiFields)
515
{
516
byte_1 = i.
ReadU8
();
517
byte_2 = i.
ReadU8
();
518
519
oddE = (byte_1 & 0x80) >> 7;
520
oddLi = ((byte_1 & 0x7F) << 4) | ((byte_2 & 0xF0) >> 4);
521
moreLiFields = (oddE ==
E_LI_FIELDS_FOLLOWS
);
522
523
m_extensionBits
.push_back(oddE);
524
m_lengthIndicators
.push_back(oddLi);
525
m_headerLength
+= 2;
526
527
if
(moreLiFields)
528
{
529
byte_3 = i.
ReadU8
();
530
531
evenE = (byte_2 & 0x08) >> 3;
532
evenLi = ((byte_2 & 0x07) << 8) | (byte_3 & 0xFF);
533
moreLiFields = (evenE ==
E_LI_FIELDS_FOLLOWS
);
534
535
m_extensionBits
.push_back(evenE);
536
m_lengthIndicators
.push_back(evenLi);
537
538
m_headerLength
+= 1;
539
}
540
}
541
542
if
(
m_resegmentationFlag
==
SEGMENT
)
543
{
544
m_lastOffset
=
m_segmentOffset
+ start.GetSize() -
m_headerLength
;
545
}
546
}
547
else
// if ( m_dataControlBit == CONTROL_PDU )
548
{
549
byte_2 = i.
ReadU8
();
550
551
m_controlPduType
= (byte_1 & 0x70) >> 4;
552
m_ackSn
= ((byte_1 & 0x0F) << 6) | ((byte_2 & 0xFC) >> 2);
553
554
int
moreNacks = (byte_2 & 0x02) >> 1;
555
// Get the first NACK outside the loop as it is not preceded by an E2
556
// field but all following NACKs will.
557
if
(moreNacks == 1)
558
{
559
byte_3 = i.
ReadU8
();
560
byte_4 = i.
ReadU8
();
561
m_headerLength
= 4;
562
563
m_nackSnList
.push_back(((byte_2 & 0x01) << 9) | (byte_3 << 1) | ((byte_4 & 0x80) >> 7));
564
565
// Loop until all NACKs are found
566
moreNacks = ((byte_4 & 0x40) >> 6);
567
uint8_t
byte
= byte_4;
568
uint8_t nextByte;
569
uint8_t finalByte;
570
while
(moreNacks == 1)
571
{
572
// Ignore E2, read next NACK
573
nextByte = i.
ReadU8
();
574
m_nackSnList
.push_back(((
byte
& 0x1F) << 5) | ((nextByte & 0xF8) >> 3));
575
576
// Check for another NACK, after this any following NACKs will
577
// be aligned properly for the next iteration of this loop.
578
moreNacks = (nextByte & 0x04) >> 2;
579
byte
= nextByte;
580
if
(moreNacks == 1)
581
{
582
nextByte = i.
ReadU8
();
583
finalByte = i.
ReadU8
();
584
585
m_nackSnList
.push_back(((
byte
& 0x01) << 9) | (nextByte << 1) |
586
((finalByte & 0x80) >> 7));
587
588
moreNacks = ((finalByte & 0x40) >> 6);
589
byte
= finalByte;
590
m_headerLength
+= 3;
591
}
592
else
593
{
594
m_headerLength
++;
595
}
596
}
597
}
598
else
599
{
600
m_headerLength
++;
601
}
602
}
603
604
return
GetSerializedSize
();
605
}
606
607
};
// 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::WriteU8
void WriteU8(uint8_t data)
Definition
buffer.h:870
ns3::Header
Protocol header serialization and deserialization.
Definition
header.h:33
ns3::LteRlcAmHeader
The packet header for the AM Radio Link Control (RLC) protocol packets.
Definition
lte-rlc-am-header.h:30
ns3::LteRlcAmHeader::GetPollingBit
uint8_t GetPollingBit() const
Get polling bit function.
Definition
lte-rlc-am-header.cc:159
ns3::LteRlcAmHeader::PopExtensionBit
uint8_t PopExtensionBit()
Pop extension bit function.
Definition
lte-rlc-am-header.cc:123
ns3::LteRlcAmHeader::SetSegmentOffset
void SetSegmentOffset(uint16_t segmentOffset)
Set segment offset function.
Definition
lte-rlc-am-header.cc:177
ns3::LteRlcAmHeader::PushExtensionBit
void PushExtensionBit(uint8_t extensionBit)
Push extension bit function.
Definition
lte-rlc-am-header.cc:100
ns3::LteRlcAmHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Definition
lte-rlc-am-header.cc:472
ns3::LteRlcAmHeader::IsDataPdu
bool IsDataPdu() const
Is data PDU function.
Definition
lte-rlc-am-header.cc:64
ns3::LteRlcAmHeader::GetAckSn
SequenceNumber10 GetAckSn() const
Get ack sn function.
Definition
lte-rlc-am-header.cc:268
ns3::LteRlcAmHeader::SetPollingBit
void SetPollingBit(uint8_t pollingBit)
Set polling bit function.
Definition
lte-rlc-am-header.cc:153
ns3::LteRlcAmHeader::OneMoreNackWouldFitIn
bool OneMoreNackWouldFitIn(uint16_t bytes)
Definition
lte-rlc-am-header.cc:201
ns3::LteRlcAmHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition
lte-rlc-am-header.cc:343
ns3::LteRlcAmHeader::m_headerLength
uint16_t m_headerLength
header length
Definition
lte-rlc-am-header.h:282
ns3::LteRlcAmHeader::SetLastSegmentFlag
void SetLastSegmentFlag(uint8_t lsf)
Set last segment flag function.
Definition
lte-rlc-am-header.cc:165
ns3::LteRlcAmHeader::Print
void Print(std::ostream &os) const override
Definition
lte-rlc-am-header.cc:290
ns3::LteRlcAmHeader::DATA_FIELD_FOLLOWS
@ DATA_FIELD_FOLLOWS
Definition
lte-rlc-am-header.h:137
ns3::LteRlcAmHeader::E_LI_FIELDS_FOLLOWS
@ E_LI_FIELDS_FOLLOWS
Definition
lte-rlc-am-header.h:138
ns3::LteRlcAmHeader::GetLastOffset
uint16_t GetLastOffset() const
Get last offset function.
Definition
lte-rlc-am-header.cc:189
ns3::LteRlcAmHeader::m_sequenceNumber
SequenceNumber10 m_sequenceNumber
sequence number
Definition
lte-rlc-am-header.h:289
ns3::LteRlcAmHeader::m_lastOffset
uint16_t m_lastOffset
last offset
Definition
lte-rlc-am-header.h:292
ns3::LteRlcAmHeader::LteRlcAmHeader
LteRlcAmHeader()
Constructor.
Definition
lte-rlc-am-header.cc:20
ns3::LteRlcAmHeader::PushNack
void PushNack(int nack)
Add one more NACK to the CONTROL PDU.
Definition
lte-rlc-am-header.cc:217
ns3::LteRlcAmHeader::m_dataControlBit
uint8_t m_dataControlBit
data control bit
Definition
lte-rlc-am-header.h:283
ns3::LteRlcAmHeader::m_extensionBits
std::list< uint8_t > m_extensionBits
Includes extensionBit of the fixed part.
Definition
lte-rlc-am-header.h:294
ns3::LteRlcAmHeader::SetFramingInfo
void SetFramingInfo(uint8_t framingInfo)
Set sequence number.
Definition
lte-rlc-am-header.cc:76
ns3::LteRlcAmHeader::STATUS_PDU
static constexpr uint8_t STATUS_PDU
Control PDU type status.
Definition
lte-rlc-am-header.h:67
ns3::LteRlcAmHeader::DATA_PDU
@ DATA_PDU
Definition
lte-rlc-am-header.h:63
ns3::LteRlcAmHeader::CONTROL_PDU
@ CONTROL_PDU
Definition
lte-rlc-am-header.h:62
ns3::LteRlcAmHeader::GetLastSegmentFlag
uint8_t GetLastSegmentFlag() const
Get last segment flag function.
Definition
lte-rlc-am-header.cc:171
ns3::LteRlcAmHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition
lte-rlc-am-header.cc:284
ns3::LteRlcAmHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition
lte-rlc-am-header.cc:349
ns3::LteRlcAmHeader::m_ackSn
SequenceNumber10 m_ackSn
ack sn
Definition
lte-rlc-am-header.h:301
ns3::LteRlcAmHeader::PopLengthIndicator
uint16_t PopLengthIndicator()
Pop length indicator function.
Definition
lte-rlc-am-header.cc:132
ns3::LteRlcAmHeader::m_controlPduType
uint8_t m_controlPduType
control PDU type
Definition
lte-rlc-am-header.h:298
ns3::LteRlcAmHeader::SEGMENT
@ SEGMENT
Definition
lte-rlc-am-header.h:158
ns3::LteRlcAmHeader::m_segmentOffset
uint16_t m_segmentOffset
segment offset
Definition
lte-rlc-am-header.h:291
ns3::LteRlcAmHeader::SetAckSn
void SetAckSn(SequenceNumber10 ackSn)
Set ack sn function.
Definition
lte-rlc-am-header.cc:195
ns3::LteRlcAmHeader::IsControlPdu
bool IsControlPdu() const
Is control PDU function.
Definition
lte-rlc-am-header.cc:70
ns3::LteRlcAmHeader::SetDataPdu
void SetDataPdu()
Set data PDU function.
Definition
lte-rlc-am-header.cc:49
ns3::LteRlcAmHeader::m_framingInfo
uint8_t m_framingInfo
2 bits
Definition
lte-rlc-am-header.h:288
ns3::LteRlcAmHeader::m_resegmentationFlag
uint8_t m_resegmentationFlag
resegmentation flag
Definition
lte-rlc-am-header.h:286
ns3::LteRlcAmHeader::PushLengthIndicator
void PushLengthIndicator(uint16_t lengthIndicator)
Push length indicator function.
Definition
lte-rlc-am-header.cc:117
ns3::LteRlcAmHeader::GetResegmentationFlag
uint8_t GetResegmentationFlag() const
Get resegmentation flag function.
Definition
lte-rlc-am-header.cc:147
ns3::LteRlcAmHeader::SetResegmentationFlag
void SetResegmentationFlag(uint8_t resegFlag)
Pop extension bit function.
Definition
lte-rlc-am-header.cc:141
ns3::LteRlcAmHeader::GetSegmentOffset
uint16_t GetSegmentOffset() const
Get segment offset function.
Definition
lte-rlc-am-header.cc:183
ns3::LteRlcAmHeader::m_pollingBit
uint8_t m_pollingBit
polling bit
Definition
lte-rlc-am-header.h:287
ns3::LteRlcAmHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
lte-rlc-am-header.cc:274
ns3::LteRlcAmHeader::m_lastSegmentFlag
uint8_t m_lastSegmentFlag
last segment flag
Definition
lte-rlc-am-header.h:290
ns3::LteRlcAmHeader::IsNackPresent
bool IsNackPresent(SequenceNumber10 nack)
Definition
lte-rlc-am-header.cc:235
ns3::LteRlcAmHeader::m_nackSnList
std::list< int > m_nackSnList
nack sn list
Definition
lte-rlc-am-header.h:302
ns3::LteRlcAmHeader::GetFramingInfo
uint8_t GetFramingInfo() const
Get framing info.
Definition
lte-rlc-am-header.cc:88
ns3::LteRlcAmHeader::GetSequenceNumber
SequenceNumber10 GetSequenceNumber() const
Get sequence number.
Definition
lte-rlc-am-header.cc:94
ns3::LteRlcAmHeader::PopNack
int PopNack()
Retrieve one NACK from the CONTROL PDU.
Definition
lte-rlc-am-header.cc:251
ns3::LteRlcAmHeader::~LteRlcAmHeader
~LteRlcAmHeader() override
Definition
lte-rlc-am-header.cc:34
ns3::LteRlcAmHeader::SetControlPdu
void SetControlPdu(uint8_t controlPduType)
Set control PDU function.
Definition
lte-rlc-am-header.cc:56
ns3::LteRlcAmHeader::m_lengthIndicators
std::list< uint16_t > m_lengthIndicators
length indicators
Definition
lte-rlc-am-header.h:295
ns3::LteRlcAmHeader::SetSequenceNumber
void SetSequenceNumber(SequenceNumber10 sequenceNumber)
Set sequence number.
Definition
lte-rlc-am-header.cc:82
ns3::SequenceNumber10
SequenceNumber10 class.
Definition
lte-rlc-sequence-number.h:23
ns3::SequenceNumber10::GetValue
uint16_t GetValue() const
Extracts the numeric value of the sequence number.
Definition
lte-rlc-sequence-number.h:69
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
uint32_t
NS_ASSERT_MSG
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition
assert.h:75
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition
log.h:191
NS_LOG_LOGIC
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition
log.h:271
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition
log-macros-enabled.h:229
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
lte-rlc-am-header.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
model
lte-rlc-am-header.cc
Generated on Fri Nov 8 2024 13:59:03 for ns-3 by
1.11.0