A Discrete-Event Network Simulator
API
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
23#include "ns3/header.h"
24#include "ns3/lte-rlc-sequence-number.h"
25
26#include <list>
27
28namespace ns3
29{
30
39class LteRlcHeader : public Header
40{
41 public:
48 ~LteRlcHeader() override;
49
55 void SetFramingInfo(uint8_t framingInfo);
61 void SetSequenceNumber(SequenceNumber10 sequenceNumber);
62
68 uint8_t GetFramingInfo() const;
75
81 void PushExtensionBit(uint8_t extensionBit);
87 void PushLengthIndicator(uint16_t lengthIndicator);
88
94 uint8_t PopExtensionBit();
100 uint16_t PopLengthIndicator();
101
103 typedef enum
104 {
108
110 typedef enum
111 {
113 NO_FIRST_BYTE = 0x02
115
117 typedef enum
118 {
119 LAST_BYTE = 0x00,
120 NO_LAST_BYTE = 0x01
122
127 static TypeId GetTypeId();
128 TypeId GetInstanceTypeId() const override;
129 void Print(std::ostream& os) const override;
130 uint32_t GetSerializedSize() const override;
131 void Serialize(Buffer::Iterator start) const override;
133
134 private:
135 uint16_t m_headerLength;
138
139 std::list<uint8_t> m_extensionBits;
140 std::list<uint16_t> m_lengthIndicators;
141};
142
143}; // namespace ns3
144
145#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:60
Every class exported by the ns3 library is enclosed in the ns3 namespace.
def start()
Definition: core.py:1861