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 
29 namespace ns3 {
30 
39 class LteRlcHeader : public Header
40 {
41 public:
42 
48  LteRlcHeader ();
49  ~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 {
107  } ExtensionBit_t;
108 
110  typedef enum {
111  FIRST_BYTE = 0x00,
114 
116  typedef enum {
117  LAST_BYTE = 0x00,
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;
131  virtual uint32_t Deserialize (Buffer::Iterator start);
132 
133 private:
134  uint16_t m_headerLength;
135  uint8_t m_framingInfo;
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
FramingInfoFirstByte_t
FramingInfoFirstByte_t typedef.
Protocol header serialization and deserialization.
Definition: header.h:42
std::list< uint16_t > m_lengthIndicators
length indicators
std::list< uint8_t > m_extensionBits
Includes extensionBit of the fixed part.
def start()
Definition: core.py:1844
virtual uint32_t Deserialize(Buffer::Iterator start)
void PushLengthIndicator(uint16_t lengthIndicator)
Push length indicator.
uint8_t PopExtensionBit(void)
Pop extension bit.
iterator in a Buffer instance
Definition: buffer.h:98
The packet header for the Radio Link Control (RLC) protocol packets.
uint16_t PopLengthIndicator(void)
Pop length indicator.
virtual void Serialize(Buffer::Iterator start) const
void SetSequenceNumber(SequenceNumber10 sequenceNumber)
Set sequence number.
uint16_t m_headerLength
header length
SequenceNumber10 m_sequenceNumber
sequence number
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void PushExtensionBit(uint8_t extensionBit)
Push extension bit.
SequenceNumber10 GetSequenceNumber() const
Get sequence number.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
ExtensionBit_t
ExtensionBit_t typedef.
virtual uint32_t GetSerializedSize(void) const
void SetFramingInfo(uint8_t framingInfo)
Set framing info.
uint8_t m_framingInfo
2 bits
SequenceNumber10 class.
uint8_t GetFramingInfo() const
Get framing info.
LteRlcHeader()
Constructor.
FramingInfoLastByte_t
FramingInfoLastByte_t tyedef.
a unique identifier for an interface.
Definition: type-id.h:58
static TypeId GetTypeId(void)
Get the type ID.
virtual void Print(std::ostream &os) const