A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
lte-rlc-am.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_AM_H
22
#define LTE_RLC_AM_H
23
24
#include "ns3/lte-rlc-sequence-number.h"
25
26
#include "ns3/lte-rlc.h"
27
28
#include <vector>
29
#include <map>
30
31
namespace
ns3 {
32
36
class
LteRlcAm
:
public
LteRlc
37
{
38
public
:
39
LteRlcAm
();
40
virtual
~LteRlcAm
();
41
static
TypeId
GetTypeId
(
void
);
42
46
virtual
void
DoTransmitPdcpPdu
(
Ptr<Packet>
p);
47
51
virtual
void
DoNotifyTxOpportunity
(uint32_t bytes, uint8_t layer);
52
virtual
void
DoNotifyHarqDeliveryFailure
();
53
virtual
void
DoReceivePdu
(
Ptr<Packet>
p);
54
55
void
Start
();
56
57
private
:
63
void
ExpireReorderingTimer
(
void
);
64
void
ExpirePollRetransmitTimer
(
void
);
65
66
bool
IsInsideReceivingWindow
(
SequenceNumber10
seqNumber);
67
//
68
// void ReassembleOutsideWindow (void);
69
// void ReassembleSnLessThan (uint16_t seqNumber);
70
//
71
void
ReassembleAndDeliver
(
Ptr<Packet>
packet);
72
73
private
:
74
std::vector < Ptr<Packet> >
m_txonBuffer
;
// Transmission buffer
75
std::vector < Ptr<Packet> >
m_txedBuffer
;
// Transmitted packets buffer
76
77
struct
RetxBuffer
78
{
79
Ptr<Packet>
m_pdu
;
80
uint16_t
m_retxCount
;
81
};
82
83
std::vector < RetxBuffer >
m_retxBuffer
;
// Retransmission buffer
84
85
uint32_t
m_txonBufferSize
;
86
uint32_t
m_retxBufferSize
;
87
uint32_t
m_txedBufferSize
;
88
89
bool
m_statusPduRequested
;
90
uint32_t
m_statusPduBufferSize
;
91
92
struct
PduBuffer
93
{
94
SequenceNumber10
m_seqNumber
;
95
std::list < Ptr<Packet> >
m_byteSegments
;
96
97
bool
m_pduComplete
;
98
uint16_t
m_totalSize
;
99
uint16_t
m_currSize
;
100
};
101
102
std::map <uint16_t, PduBuffer >
m_rxonBuffer
;
// Reception buffer
103
104
Ptr<Packet>
m_controlPduBuffer
;
// Control PDU buffer (just one PDU)
105
106
// SDU reassembly
107
// std::vector < Ptr<Packet> > m_reasBuffer; // Reassembling buffer
108
//
109
std::list < Ptr<Packet> >
m_sdusBuffer
;
// List of SDUs in a packet (PDU)
110
114
// Transmitting side
115
SequenceNumber10
m_vtA
;
// VT(A)
116
SequenceNumber10
m_vtMs
;
// VT(MS)
117
SequenceNumber10
m_vtS
;
// VT(S)
118
SequenceNumber10
m_pollSn
;
// POLL_SN
119
120
// Receiving side
121
SequenceNumber10
m_vrR
;
// VR(R)
122
SequenceNumber10
m_vrMr
;
// VR(MR)
123
SequenceNumber10
m_vrX
;
// VR(X)
124
SequenceNumber10
m_vrMs
;
// VR(MS)
125
SequenceNumber10
m_vrH
;
// VR(H)
126
130
uint32_t
m_pduWithoutPoll
;
131
uint32_t
m_byteWithoutPoll
;
132
136
uint16_t
m_windowSize
;
137
141
EventId
m_pollRetransmitTimer
;
142
EventId
m_reorderingTimer
;
143
EventId
m_statusProhibitTimer
;
144
148
uint16_t
m_maxRetxThreshold
;
// TODO How these parameters are configured???
149
uint16_t
m_pollPdu
;
150
uint16_t
m_pollByte
;
151
155
typedef
enum
{
NONE
= 0,
156
WAITING_S0_FULL
= 1,
157
WAITING_SI_SF
= 2 }
ReassemblingState_t
;
158
ReassemblingState_t
m_reassemblingState
;
159
Ptr<Packet>
m_keepS0
;
160
164
SequenceNumber10
m_expectedSeqNumber
;
165
166
};
167
168
169
}
// namespace ns3
170
171
#endif // LTE_RLC_AM_H
src
lte
model
lte-rlc-am.h
Generated on Tue Nov 13 2012 10:32:17 for ns-3 by
1.8.1.2