A Discrete-Event Network Simulator
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 * 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_HEADER_H
21#define LTE_RLC_HEADER_H
22
24
25#include "ns3/header.h"
26
27#include <list>
28
29namespace ns3
30{
31
40class LteRlcHeader : public Header
41{
42 public:
49 ~LteRlcHeader() override;
50
56 void SetFramingInfo(uint8_t framingInfo);
62 void SetSequenceNumber(SequenceNumber10 sequenceNumber);
63
69 uint8_t GetFramingInfo() const;
76
82 void PushExtensionBit(uint8_t extensionBit);
88 void PushLengthIndicator(uint16_t lengthIndicator);
89
95 uint8_t PopExtensionBit();
101 uint16_t PopLengthIndicator();
102
105 {
108 };
109
112 {
114 NO_FIRST_BYTE = 0x02
115 };
116
119 {
120 LAST_BYTE = 0x00,
121 NO_LAST_BYTE = 0x01
122 };
123
128 static TypeId GetTypeId();
129 TypeId GetInstanceTypeId() const override;
130 void Print(std::ostream& os) const override;
131 uint32_t GetSerializedSize() const override;
132 void Serialize(Buffer::Iterator start) const override;
133 uint32_t Deserialize(Buffer::Iterator start) override;
134
135 private:
136 uint16_t m_headerLength;
139
140 std::list<uint8_t> m_extensionBits;
141 std::list<uint16_t> m_lengthIndicators;
142};
143
144}; // namespace ns3
145
146#endif // LTE_RLC_HEADER_H
iterator in a Buffer instance
Definition: buffer.h:100
Protocol header serialization and deserialization.
Definition: header.h:44
The packet header for the Radio Link Control (RLC) protocol packets.
void Serialize(Buffer::Iterator start) const override
uint8_t m_framingInfo
2 bits
std::list< uint8_t > m_extensionBits
Includes extensionBit of the fixed part.
uint32_t GetSerializedSize() const override
void PushExtensionBit(uint8_t extensionBit)
Push extension bit.
SequenceNumber10 m_sequenceNumber
sequence number
void Print(std::ostream &os) const override
ExtensionBit_t
ExtensionBit_t typedef.
SequenceNumber10 GetSequenceNumber() const
Get sequence number.
uint16_t m_headerLength
header length
void SetSequenceNumber(SequenceNumber10 sequenceNumber)
Set sequence number.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
void SetFramingInfo(uint8_t framingInfo)
Set framing info.
std::list< uint16_t > m_lengthIndicators
length indicators
FramingInfoFirstByte_t
FramingInfoFirstByte_t typedef.
uint32_t Deserialize(Buffer::Iterator start) override
FramingInfoLastByte_t
FramingInfoLastByte_t tyedef.
uint8_t PopExtensionBit()
Pop extension bit.
~LteRlcHeader() override
LteRlcHeader()
Constructor.
uint16_t PopLengthIndicator()
Pop length indicator.
static TypeId GetTypeId()
Get the type ID.
uint8_t GetFramingInfo() const
Get framing info.
void PushLengthIndicator(uint16_t lengthIndicator)
Push length indicator.
SequenceNumber10 class.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.