A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
lte-rlc-am-header.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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: Manuel Requena <manuel.requena@cttc.es>
18
*/
19
20
#ifndef LTE_RLC_AM_HEADER_H
21
#define LTE_RLC_AM_HEADER_H
22
23
#include "
lte-rlc-sequence-number.h
"
24
25
#include "ns3/header.h"
26
27
#include <list>
28
29
namespace
ns3
30
{
31
40
class
LteRlcAmHeader
:
public
Header
41
{
42
public
:
48
LteRlcAmHeader
();
49
~LteRlcAmHeader
()
override
;
50
52
void
SetDataPdu
();
58
void
SetControlPdu
(uint8_t controlPduType);
63
bool
IsDataPdu
()
const
;
68
bool
IsControlPdu
()
const
;
69
71
enum
DataControlPdu_t
72
{
73
CONTROL_PDU
= 0,
74
DATA_PDU
= 1
75
};
76
78
static
constexpr uint8_t
STATUS_PDU
{0};
79
80
//
81
// DATA PDU
82
//
83
89
void
SetSequenceNumber
(
SequenceNumber10
sequenceNumber);
95
SequenceNumber10
GetSequenceNumber
()
const
;
96
102
void
SetFramingInfo
(uint8_t framingInfo);
108
uint8_t
GetFramingInfo
()
const
;
109
111
enum
FramingInfoByte_t
112
{
113
FIRST_BYTE
= 0x00,
114
NO_FIRST_BYTE
= 0x02,
115
LAST_BYTE
= 0x00,
116
NO_LAST_BYTE
= 0x01
117
};
118
124
void
PushExtensionBit
(uint8_t extensionBit);
130
void
PushLengthIndicator
(uint16_t lengthIndicator);
131
137
uint8_t
PopExtensionBit
();
143
uint16_t
PopLengthIndicator
();
144
146
enum
ExtensionBit_t
147
{
148
DATA_FIELD_FOLLOWS
= 0,
149
E_LI_FIELDS_FOLLOWS
= 1
150
};
151
157
void
SetResegmentationFlag
(uint8_t resegFlag);
163
uint8_t
GetResegmentationFlag
()
const
;
164
166
enum
ResegmentationFlag_t
167
{
168
PDU
= 0,
169
SEGMENT
= 1
170
};
171
177
void
SetPollingBit
(uint8_t pollingBit);
183
uint8_t
GetPollingBit
()
const
;
184
186
enum
PollingBit_t
187
{
188
STATUS_REPORT_NOT_REQUESTED
= 0,
189
STATUS_REPORT_IS_REQUESTED
= 1
190
};
191
197
void
SetLastSegmentFlag
(uint8_t lsf);
203
uint8_t
GetLastSegmentFlag
()
const
;
204
206
enum
LastSegmentFlag_t
207
{
208
NO_LAST_PDU_SEGMENT
= 0,
209
LAST_PDU_SEGMENT
= 1
210
};
211
217
void
SetSegmentOffset
(uint16_t segmentOffset);
223
uint16_t
GetSegmentOffset
()
const
;
229
uint16_t
GetLastOffset
()
const
;
230
231
//
232
// CONTROL PDU
233
//
234
240
void
SetAckSn
(
SequenceNumber10
ackSn);
246
SequenceNumber10
GetAckSn
()
const
;
247
252
static
TypeId
GetTypeId
();
253
TypeId
GetInstanceTypeId
()
const override
;
254
void
Print
(std::ostream& os)
const override
;
255
uint32_t
GetSerializedSize
()
const override
;
256
void
Serialize
(
Buffer::Iterator
start
)
const override
;
257
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
258
266
bool
OneMoreNackWouldFitIn
(uint16_t bytes);
267
273
void
PushNack
(
int
nack);
274
282
bool
IsNackPresent
(
SequenceNumber10
nack);
283
290
int
PopNack
();
291
292
private
:
293
uint16_t
m_headerLength
;
294
uint8_t
m_dataControlBit
;
295
296
// Data PDU fields
297
uint8_t
m_resegmentationFlag
;
298
uint8_t
m_pollingBit
;
299
uint8_t
m_framingInfo
;
300
SequenceNumber10
m_sequenceNumber
;
301
uint8_t
m_lastSegmentFlag
;
302
uint16_t
m_segmentOffset
;
303
uint16_t
m_lastOffset
;
304
305
std::list<uint8_t>
m_extensionBits
;
306
std::list<uint16_t>
m_lengthIndicators
;
307
308
// Control PDU fields
309
uint8_t
m_controlPduType
;
310
311
// Status PDU fields
312
SequenceNumber10
m_ackSn
;
313
std::list<int>
m_nackSnList
;
314
315
std::list<uint8_t>
m_extensionBits1
;
316
std::list<uint8_t>
m_extensionBits2
;
317
};
318
319
};
// namespace ns3
320
321
#endif
// LTE_RLC_AM_HEADER_H
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:100
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::LteRlcAmHeader
The packet header for the AM Radio Link Control (RLC) protocol packets.
Definition:
lte-rlc-am-header.h:41
ns3::LteRlcAmHeader::GetPollingBit
uint8_t GetPollingBit() const
Get polling bit function.
Definition:
lte-rlc-am-header.cc:170
ns3::LteRlcAmHeader::LastSegmentFlag_t
LastSegmentFlag_t
LastSegmentFlag_t typedef.
Definition:
lte-rlc-am-header.h:207
ns3::LteRlcAmHeader::LAST_PDU_SEGMENT
@ LAST_PDU_SEGMENT
Definition:
lte-rlc-am-header.h:209
ns3::LteRlcAmHeader::NO_LAST_PDU_SEGMENT
@ NO_LAST_PDU_SEGMENT
Definition:
lte-rlc-am-header.h:208
ns3::LteRlcAmHeader::PollingBit_t
PollingBit_t
PollingBit_t enumeration.
Definition:
lte-rlc-am-header.h:187
ns3::LteRlcAmHeader::STATUS_REPORT_NOT_REQUESTED
@ STATUS_REPORT_NOT_REQUESTED
Definition:
lte-rlc-am-header.h:188
ns3::LteRlcAmHeader::STATUS_REPORT_IS_REQUESTED
@ STATUS_REPORT_IS_REQUESTED
Definition:
lte-rlc-am-header.h:189
ns3::LteRlcAmHeader::PopExtensionBit
uint8_t PopExtensionBit()
Pop extension bit function.
Definition:
lte-rlc-am-header.cc:134
ns3::LteRlcAmHeader::SetSegmentOffset
void SetSegmentOffset(uint16_t segmentOffset)
Set segment offset function.
Definition:
lte-rlc-am-header.cc:188
ns3::LteRlcAmHeader::PushExtensionBit
void PushExtensionBit(uint8_t extensionBit)
Push extension bit function.
Definition:
lte-rlc-am-header.cc:111
ns3::LteRlcAmHeader::IsDataPdu
bool IsDataPdu() const
Is data PDU function.
Definition:
lte-rlc-am-header.cc:75
ns3::LteRlcAmHeader::GetAckSn
SequenceNumber10 GetAckSn() const
Get ack sn function.
Definition:
lte-rlc-am-header.cc:279
ns3::LteRlcAmHeader::SetPollingBit
void SetPollingBit(uint8_t pollingBit)
Set polling bit function.
Definition:
lte-rlc-am-header.cc:164
ns3::LteRlcAmHeader::OneMoreNackWouldFitIn
bool OneMoreNackWouldFitIn(uint16_t bytes)
Definition:
lte-rlc-am-header.cc:212
ns3::LteRlcAmHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
lte-rlc-am-header.cc:354
ns3::LteRlcAmHeader::m_headerLength
uint16_t m_headerLength
header length
Definition:
lte-rlc-am-header.h:293
ns3::LteRlcAmHeader::SetLastSegmentFlag
void SetLastSegmentFlag(uint8_t lsf)
Set last segment flag function.
Definition:
lte-rlc-am-header.cc:176
ns3::LteRlcAmHeader::Print
void Print(std::ostream &os) const override
Definition:
lte-rlc-am-header.cc:301
ns3::LteRlcAmHeader::ExtensionBit_t
ExtensionBit_t
ExtensionBit_t typedef.
Definition:
lte-rlc-am-header.h:147
ns3::LteRlcAmHeader::DATA_FIELD_FOLLOWS
@ DATA_FIELD_FOLLOWS
Definition:
lte-rlc-am-header.h:148
ns3::LteRlcAmHeader::E_LI_FIELDS_FOLLOWS
@ E_LI_FIELDS_FOLLOWS
Definition:
lte-rlc-am-header.h:149
ns3::LteRlcAmHeader::GetLastOffset
uint16_t GetLastOffset() const
Get last offset function.
Definition:
lte-rlc-am-header.cc:200
ns3::LteRlcAmHeader::m_sequenceNumber
SequenceNumber10 m_sequenceNumber
sequence number
Definition:
lte-rlc-am-header.h:300
ns3::LteRlcAmHeader::m_lastOffset
uint16_t m_lastOffset
last offset
Definition:
lte-rlc-am-header.h:303
ns3::LteRlcAmHeader::LteRlcAmHeader
LteRlcAmHeader()
Constructor.
Definition:
lte-rlc-am-header.cc:31
ns3::LteRlcAmHeader::PushNack
void PushNack(int nack)
Add one more NACK to the CONTROL PDU.
Definition:
lte-rlc-am-header.cc:228
ns3::LteRlcAmHeader::m_dataControlBit
uint8_t m_dataControlBit
data control bit
Definition:
lte-rlc-am-header.h:294
ns3::LteRlcAmHeader::m_extensionBits
std::list< uint8_t > m_extensionBits
Includes extensionBit of the fixed part.
Definition:
lte-rlc-am-header.h:305
ns3::LteRlcAmHeader::SetFramingInfo
void SetFramingInfo(uint8_t framingInfo)
Set sequence number.
Definition:
lte-rlc-am-header.cc:87
ns3::LteRlcAmHeader::STATUS_PDU
static constexpr uint8_t STATUS_PDU
Control PDU type status.
Definition:
lte-rlc-am-header.h:78
ns3::LteRlcAmHeader::DataControlPdu_t
DataControlPdu_t
DataControlPdu_t enumeration.
Definition:
lte-rlc-am-header.h:72
ns3::LteRlcAmHeader::DATA_PDU
@ DATA_PDU
Definition:
lte-rlc-am-header.h:74
ns3::LteRlcAmHeader::CONTROL_PDU
@ CONTROL_PDU
Definition:
lte-rlc-am-header.h:73
ns3::LteRlcAmHeader::GetLastSegmentFlag
uint8_t GetLastSegmentFlag() const
Get last segment flag function.
Definition:
lte-rlc-am-header.cc:182
ns3::LteRlcAmHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
lte-rlc-am-header.cc:295
ns3::LteRlcAmHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition:
lte-rlc-am-header.cc:360
ns3::LteRlcAmHeader::FramingInfoByte_t
FramingInfoByte_t
FramingInfoByte_t enumeration.
Definition:
lte-rlc-am-header.h:112
ns3::LteRlcAmHeader::NO_FIRST_BYTE
@ NO_FIRST_BYTE
Definition:
lte-rlc-am-header.h:114
ns3::LteRlcAmHeader::FIRST_BYTE
@ FIRST_BYTE
Definition:
lte-rlc-am-header.h:113
ns3::LteRlcAmHeader::NO_LAST_BYTE
@ NO_LAST_BYTE
Definition:
lte-rlc-am-header.h:116
ns3::LteRlcAmHeader::LAST_BYTE
@ LAST_BYTE
Definition:
lte-rlc-am-header.h:115
ns3::LteRlcAmHeader::m_ackSn
SequenceNumber10 m_ackSn
ack sn
Definition:
lte-rlc-am-header.h:312
ns3::LteRlcAmHeader::PopLengthIndicator
uint16_t PopLengthIndicator()
Pop length indicator function.
Definition:
lte-rlc-am-header.cc:143
ns3::LteRlcAmHeader::m_controlPduType
uint8_t m_controlPduType
control PDU type
Definition:
lte-rlc-am-header.h:309
ns3::LteRlcAmHeader::ResegmentationFlag_t
ResegmentationFlag_t
ResegmentationFlag_t typedef.
Definition:
lte-rlc-am-header.h:167
ns3::LteRlcAmHeader::PDU
@ PDU
Definition:
lte-rlc-am-header.h:168
ns3::LteRlcAmHeader::SEGMENT
@ SEGMENT
Definition:
lte-rlc-am-header.h:169
ns3::LteRlcAmHeader::m_segmentOffset
uint16_t m_segmentOffset
segment offset
Definition:
lte-rlc-am-header.h:302
ns3::LteRlcAmHeader::m_extensionBits2
std::list< uint8_t > m_extensionBits2
extension bits 2
Definition:
lte-rlc-am-header.h:316
ns3::LteRlcAmHeader::SetAckSn
void SetAckSn(SequenceNumber10 ackSn)
Set ack sn function.
Definition:
lte-rlc-am-header.cc:206
ns3::LteRlcAmHeader::m_extensionBits1
std::list< uint8_t > m_extensionBits1
Includes E1 after ACK_SN.
Definition:
lte-rlc-am-header.h:315
ns3::LteRlcAmHeader::IsControlPdu
bool IsControlPdu() const
Is control PDU function.
Definition:
lte-rlc-am-header.cc:81
ns3::LteRlcAmHeader::SetDataPdu
void SetDataPdu()
Set data PDU function.
Definition:
lte-rlc-am-header.cc:60
ns3::LteRlcAmHeader::m_framingInfo
uint8_t m_framingInfo
2 bits
Definition:
lte-rlc-am-header.h:299
ns3::LteRlcAmHeader::m_resegmentationFlag
uint8_t m_resegmentationFlag
resegmentation flag
Definition:
lte-rlc-am-header.h:297
ns3::LteRlcAmHeader::PushLengthIndicator
void PushLengthIndicator(uint16_t lengthIndicator)
Push length indicator function.
Definition:
lte-rlc-am-header.cc:128
ns3::LteRlcAmHeader::GetResegmentationFlag
uint8_t GetResegmentationFlag() const
Get resegmentation flag function.
Definition:
lte-rlc-am-header.cc:158
ns3::LteRlcAmHeader::SetResegmentationFlag
void SetResegmentationFlag(uint8_t resegFlag)
Pop extension bit function.
Definition:
lte-rlc-am-header.cc:152
ns3::LteRlcAmHeader::GetSegmentOffset
uint16_t GetSegmentOffset() const
Get segment offset function.
Definition:
lte-rlc-am-header.cc:194
ns3::LteRlcAmHeader::m_pollingBit
uint8_t m_pollingBit
polling bit
Definition:
lte-rlc-am-header.h:298
ns3::LteRlcAmHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
lte-rlc-am-header.cc:285
ns3::LteRlcAmHeader::m_lastSegmentFlag
uint8_t m_lastSegmentFlag
last segment flag
Definition:
lte-rlc-am-header.h:301
ns3::LteRlcAmHeader::IsNackPresent
bool IsNackPresent(SequenceNumber10 nack)
Definition:
lte-rlc-am-header.cc:246
ns3::LteRlcAmHeader::m_nackSnList
std::list< int > m_nackSnList
nack sn list
Definition:
lte-rlc-am-header.h:313
ns3::LteRlcAmHeader::GetFramingInfo
uint8_t GetFramingInfo() const
Get framing info.
Definition:
lte-rlc-am-header.cc:99
ns3::LteRlcAmHeader::GetSequenceNumber
SequenceNumber10 GetSequenceNumber() const
Get sequence number.
Definition:
lte-rlc-am-header.cc:105
ns3::LteRlcAmHeader::PopNack
int PopNack()
Retrieve one NACK from the CONTROL PDU.
Definition:
lte-rlc-am-header.cc:262
ns3::LteRlcAmHeader::~LteRlcAmHeader
~LteRlcAmHeader() override
Definition:
lte-rlc-am-header.cc:45
ns3::LteRlcAmHeader::SetControlPdu
void SetControlPdu(uint8_t controlPduType)
Set control PDU function.
Definition:
lte-rlc-am-header.cc:67
ns3::LteRlcAmHeader::m_lengthIndicators
std::list< uint16_t > m_lengthIndicators
length indicators
Definition:
lte-rlc-am-header.h:306
ns3::LteRlcAmHeader::SetSequenceNumber
void SetSequenceNumber(SequenceNumber10 sequenceNumber)
Set sequence number.
Definition:
lte-rlc-am-header.cc:93
ns3::SequenceNumber10
SequenceNumber10 class.
Definition:
lte-rlc-sequence-number.h:34
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
lte-rlc-sequence-number.h
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:520
src
lte
model
lte-rlc-am-header.h
Generated on Sun Mar 3 2024 17:11:02 for ns-3 by
1.9.1