A Discrete-Event Network Simulator
API
lte-rlc-header.h
Go to the documentation of this file.
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Manuel Requena <manuel.requena@cttc.es>
19 */
20
21#ifndef LTE_RLC_HEADER_H
22#define LTE_RLC_HEADER_H
23
24#include "ns3/header.h"
25#include "ns3/lte-rlc-sequence-number.h"
26
27#include <list>
28
29namespace ns3 {
30
39class LteRlcHeader : public Header
40{
41public:
42
48 LteRlcHeader ();
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 (void);
101 uint16_t PopLengthIndicator (void);
102
104 typedef enum {
108
110 typedef enum {
112 NO_FIRST_BYTE = 0x02
114
116 typedef enum {
117 LAST_BYTE = 0x00,
118 NO_LAST_BYTE = 0x01
120
121
126 static TypeId GetTypeId (void);
127 virtual TypeId GetInstanceTypeId (void) const;
128 virtual void Print (std::ostream &os) const;
129 virtual uint32_t GetSerializedSize (void) const;
130 virtual void Serialize (Buffer::Iterator start) const;
132
133private:
134 uint16_t m_headerLength;
137
138 std::list <uint8_t> m_extensionBits;
139 std::list <uint16_t> m_lengthIndicators;
140
141};
142
143}; // namespace ns3
144
145#endif // LTE_RLC_HEADER_H
iterator in a Buffer instance
Definition: buffer.h:99
Protocol header serialization and deserialization.
Definition: header.h:43
The packet header for the Radio Link Control (RLC) protocol packets.
uint8_t m_framingInfo
2 bits
std::list< uint8_t > m_extensionBits
Includes extensionBit of the fixed part.
void PushExtensionBit(uint8_t extensionBit)
Push extension bit.
SequenceNumber10 m_sequenceNumber
sequence number
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
ExtensionBit_t
ExtensionBit_t typedef.
SequenceNumber10 GetSequenceNumber() const
Get sequence number.
static TypeId GetTypeId(void)
Get the type ID.
uint8_t PopExtensionBit(void)
Pop extension bit.
uint16_t m_headerLength
header length
void SetSequenceNumber(SequenceNumber10 sequenceNumber)
Set sequence number.
virtual uint32_t Deserialize(Buffer::Iterator start)
void SetFramingInfo(uint8_t framingInfo)
Set framing info.
std::list< uint16_t > m_lengthIndicators
length indicators
uint16_t PopLengthIndicator(void)
Pop length indicator.
virtual void Serialize(Buffer::Iterator start) const
FramingInfoFirstByte_t
FramingInfoFirstByte_t typedef.
FramingInfoLastByte_t
FramingInfoLastByte_t tyedef.
LteRlcHeader()
Constructor.
virtual uint32_t GetSerializedSize(void) const
virtual void Print(std::ostream &os) const
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.
def start()
Definition: core.py:1853