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-header.h
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
#ifndef LTE_RLC_HEADER_H
10
#define LTE_RLC_HEADER_H
11
12
#include "
lte-rlc-sequence-number.h
"
13
14
#include "ns3/header.h"
15
16
#include <list>
17
18
namespace
ns3
19
{
20
21
/**
22
* \ingroup lte
23
* \brief The packet header for the Radio Link Control (RLC) protocol packets
24
*
25
* This class has fields corresponding to those in an RLC header as well as
26
* methods for serialization to and deserialization from a byte buffer.
27
* It follows 3GPP TS 36.322 Radio Link Control (RLC) protocol specification.
28
*/
29
class
LteRlcHeader
:
public
Header
30
{
31
public
:
32
/**
33
* \brief Constructor
34
*
35
* Creates a null header
36
*/
37
LteRlcHeader
();
38
~LteRlcHeader
()
override
;
39
40
/**
41
* Set framing info
42
*
43
* \param framingInfo framing info
44
*/
45
void
SetFramingInfo
(uint8_t framingInfo);
46
/**
47
* Set sequence number
48
*
49
* \param sequenceNumber sequence number
50
*/
51
void
SetSequenceNumber
(
SequenceNumber10
sequenceNumber);
52
53
/**
54
* Get framing info
55
*
56
* \returns framing info
57
*/
58
uint8_t
GetFramingInfo
()
const
;
59
/**
60
* Get sequence number
61
*
62
* \returns sequence number
63
*/
64
SequenceNumber10
GetSequenceNumber
()
const
;
65
66
/**
67
* Push extension bit
68
*
69
* \param extensionBit the extension bit
70
*/
71
void
PushExtensionBit
(uint8_t extensionBit);
72
/**
73
* Push length indicator
74
*
75
* \param lengthIndicator the length indicator
76
*/
77
void
PushLengthIndicator
(uint16_t lengthIndicator);
78
79
/**
80
* Pop extension bit
81
*
82
* \returns the extension bit
83
*/
84
uint8_t
PopExtensionBit
();
85
/**
86
* Pop length indicator
87
*
88
* \returns the length indicator
89
*/
90
uint16_t
PopLengthIndicator
();
91
92
/// ExtensionBit_t typedef
93
enum
ExtensionBit_t
94
{
95
DATA_FIELD_FOLLOWS
= 0,
96
E_LI_FIELDS_FOLLOWS
= 1
97
};
98
99
/// FramingInfoByte_t typedef
100
enum
FramingInfoByte_t
101
{
102
FIRST_BYTE
= 0x00,
103
NO_FIRST_BYTE
= 0x02,
104
LAST_BYTE
= 0x00,
105
NO_LAST_BYTE
= 0x01
106
};
107
108
/**
109
* \brief Get the type ID.
110
* \return the object TypeId
111
*/
112
static
TypeId
GetTypeId
();
113
TypeId
GetInstanceTypeId
()
const override
;
114
void
Print
(std::ostream& os)
const override
;
115
uint32_t
GetSerializedSize
()
const override
;
116
void
Serialize
(
Buffer::Iterator
start)
const override
;
117
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
118
119
private
:
120
uint16_t
m_headerLength
;
///< header length
121
uint8_t
m_framingInfo
;
///< 2 bits
122
SequenceNumber10
m_sequenceNumber
;
///< sequence number
123
124
std::list<uint8_t>
m_extensionBits
;
///< Includes extensionBit of the fixed part
125
std::list<uint16_t>
m_lengthIndicators
;
///< length indicators
126
};
127
128
};
// namespace ns3
129
130
#endif
// LTE_RLC_HEADER_H
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::Header
Protocol header serialization and deserialization.
Definition
header.h:33
ns3::LteRlcHeader
The packet header for the Radio Link Control (RLC) protocol packets.
Definition
lte-rlc-header.h:30
ns3::LteRlcHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition
lte-rlc-header.cc:156
ns3::LteRlcHeader::m_framingInfo
uint8_t m_framingInfo
2 bits
Definition
lte-rlc-header.h:121
ns3::LteRlcHeader::FramingInfoByte_t
FramingInfoByte_t
FramingInfoByte_t typedef.
Definition
lte-rlc-header.h:101
ns3::LteRlcHeader::LAST_BYTE
@ LAST_BYTE
Definition
lte-rlc-header.h:104
ns3::LteRlcHeader::NO_FIRST_BYTE
@ NO_FIRST_BYTE
Definition
lte-rlc-header.h:103
ns3::LteRlcHeader::FIRST_BYTE
@ FIRST_BYTE
Definition
lte-rlc-header.h:102
ns3::LteRlcHeader::NO_LAST_BYTE
@ NO_LAST_BYTE
Definition
lte-rlc-header.h:105
ns3::LteRlcHeader::m_extensionBits
std::list< uint8_t > m_extensionBits
Includes extensionBit of the fixed part.
Definition
lte-rlc-header.h:124
ns3::LteRlcHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition
lte-rlc-header.cc:150
ns3::LteRlcHeader::PushExtensionBit
void PushExtensionBit(uint8_t extensionBit)
Push extension bit.
Definition
lte-rlc-header.cc:59
ns3::LteRlcHeader::m_sequenceNumber
SequenceNumber10 m_sequenceNumber
sequence number
Definition
lte-rlc-header.h:122
ns3::LteRlcHeader::Print
void Print(std::ostream &os) const override
Definition
lte-rlc-header.cc:117
ns3::LteRlcHeader::ExtensionBit_t
ExtensionBit_t
ExtensionBit_t typedef.
Definition
lte-rlc-header.h:94
ns3::LteRlcHeader::DATA_FIELD_FOLLOWS
@ DATA_FIELD_FOLLOWS
Definition
lte-rlc-header.h:95
ns3::LteRlcHeader::E_LI_FIELDS_FOLLOWS
@ E_LI_FIELDS_FOLLOWS
Definition
lte-rlc-header.h:96
ns3::LteRlcHeader::GetSequenceNumber
SequenceNumber10 GetSequenceNumber() const
Get sequence number.
Definition
lte-rlc-header.cc:53
ns3::LteRlcHeader::m_headerLength
uint16_t m_headerLength
header length
Definition
lte-rlc-header.h:120
ns3::LteRlcHeader::SetSequenceNumber
void SetSequenceNumber(SequenceNumber10 sequenceNumber)
Set sequence number.
Definition
lte-rlc-header.cc:41
ns3::LteRlcHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition
lte-rlc-header.cc:111
ns3::LteRlcHeader::SetFramingInfo
void SetFramingInfo(uint8_t framingInfo)
Set framing info.
Definition
lte-rlc-header.cc:35
ns3::LteRlcHeader::m_lengthIndicators
std::list< uint16_t > m_lengthIndicators
length indicators
Definition
lte-rlc-header.h:125
ns3::LteRlcHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Definition
lte-rlc-header.cc:202
ns3::LteRlcHeader::PopExtensionBit
uint8_t PopExtensionBit()
Pop extension bit.
Definition
lte-rlc-header.cc:83
ns3::LteRlcHeader::~LteRlcHeader
~LteRlcHeader() override
Definition
lte-rlc-header.cc:27
ns3::LteRlcHeader::LteRlcHeader
LteRlcHeader()
Constructor.
Definition
lte-rlc-header.cc:20
ns3::LteRlcHeader::PopLengthIndicator
uint16_t PopLengthIndicator()
Pop length indicator.
Definition
lte-rlc-header.cc:92
ns3::LteRlcHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
lte-rlc-header.cc:101
ns3::LteRlcHeader::GetFramingInfo
uint8_t GetFramingInfo() const
Get framing info.
Definition
lte-rlc-header.cc:47
ns3::LteRlcHeader::PushLengthIndicator
void PushLengthIndicator(uint16_t lengthIndicator)
Push length indicator.
Definition
lte-rlc-header.cc:77
ns3::SequenceNumber10
SequenceNumber10 class.
Definition
lte-rlc-sequence-number.h:23
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
uint32_t
lte-rlc-sequence-number.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
model
lte-rlc-header.h
Generated on Fri Nov 8 2024 13:59:03 for ns-3 by
1.11.0