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-enb-mac.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: Marco Miozzo <marco.miozzo@cttc.es>
19
* Nicola Baldo <nbaldo@cttc.es>
20
*/
21
22
#ifndef LTE_ENB_MAC_H
23
#define LTE_ENB_MAC_H
24
25
26
#include <map>
27
#include <vector>
28
#include <ns3/lte-common.h>
29
#include <ns3/lte-mac-sap.h>
30
#include <ns3/lte-enb-cmac-sap.h>
31
#include <ns3/ff-mac-csched-sap.h>
32
#include <ns3/ff-mac-sched-sap.h>
33
#include <ns3/lte-enb-phy-sap.h>
34
#include "ns3/traced-value.h"
35
#include "ns3/trace-source-accessor.h"
36
#include <ns3/packet.h>
37
#include <ns3/packet-burst.h>
38
39
namespace
ns3 {
40
41
class
DlCqiLteControlMessage;
42
class
UlCqiLteControlMessage;
43
class
PdcchMapLteControlMessage;
44
45
typedef
std::vector <std::vector < Ptr<PacketBurst> > >
DlHarqProcessesBuffer_t
;
46
50
class
LteEnbMac
:
public
Object
51
{
52
friend
class
EnbMacMemberLteEnbCmacSapProvider
;
53
friend
class
EnbMacMemberLteMacSapProvider
<
LteEnbMac
>;
54
friend
class
EnbMacMemberFfMacSchedSapUser
;
55
friend
class
EnbMacMemberFfMacCschedSapUser
;
56
friend
class
EnbMacMemberLteEnbPhySapUser
;
57
58
public
:
59
static
TypeId
GetTypeId
(
void
);
60
61
LteEnbMac
(
void
);
62
virtual
~LteEnbMac
(
void
);
63
virtual
void
DoDispose
(
void
);
64
65
70
void
SetFfMacSchedSapProvider
(
FfMacSchedSapProvider
* s);
75
FfMacSchedSapUser
*
GetFfMacSchedSapUser
(
void
);
80
void
SetFfMacCschedSapProvider
(
FfMacCschedSapProvider
* s);
85
FfMacCschedSapUser
*
GetFfMacCschedSapUser
(
void
);
86
87
88
93
void
SetLteMacSapUser
(
LteMacSapUser
* s);
98
LteMacSapProvider
*
GetLteMacSapProvider
(
void
);
103
void
SetLteEnbCmacSapUser
(
LteEnbCmacSapUser
* s);
108
LteEnbCmacSapProvider
*
GetLteEnbCmacSapProvider
(
void
);
109
110
115
LteEnbPhySapUser
*
GetLteEnbPhySapUser
();
116
121
void
SetLteEnbPhySapProvider
(
LteEnbPhySapProvider
* s);
122
123
124
private
:
125
130
void
ReceiveDlCqiLteControlMessage
(
Ptr<DlCqiLteControlMessage>
msg);
131
132
void
DoReceiveLteControlMessage
(
Ptr<LteControlMessage>
msg);
133
138
void
ReceiveBsrMessage
(
MacCeListElement_s
bsr);
139
140
141
void
DoUlCqiReport
(
FfMacSchedSapProvider::SchedUlCqiInfoReqParameters
ulcqi);
142
143
144
145
// forwarded from LteEnbCmacSapProvider
146
void
DoConfigureMac
(uint8_t ulBandwidth, uint8_t dlBandwidth);
147
void
DoAddUe
(uint16_t rnti);
148
void
DoRemoveUe
(uint16_t rnti);
149
void
DoAddLc
(
LteEnbCmacSapProvider::LcInfo
lcinfo,
LteMacSapUser
* msu);
150
void
DoReconfigureLc
(
LteEnbCmacSapProvider::LcInfo
lcinfo);
151
void
DoReleaseLc
(uint16_t rnti, uint8_t lcid);
152
void
DoUeUpdateConfigurationReq
(
LteEnbCmacSapProvider::UeConfig
params);
153
LteEnbCmacSapProvider::RachConfig
DoGetRachConfig
();
154
LteEnbCmacSapProvider::AllocateNcRaPreambleReturnValue
DoAllocateNcRaPreamble
(uint16_t rnti);
155
156
// forwarded from LteMacSapProvider
157
void
DoTransmitPdu
(
LteMacSapProvider::TransmitPduParameters
);
158
void
DoReportBufferStatus
(
LteMacSapProvider::ReportBufferStatusParameters
);
159
160
161
// forwarded from FfMacCchedSapUser
162
void
DoCschedCellConfigCnf
(
FfMacCschedSapUser::CschedCellConfigCnfParameters
params);
163
void
DoCschedUeConfigCnf
(
FfMacCschedSapUser::CschedUeConfigCnfParameters
params);
164
void
DoCschedLcConfigCnf
(
FfMacCschedSapUser::CschedLcConfigCnfParameters
params);
165
void
DoCschedLcReleaseCnf
(
FfMacCschedSapUser::CschedLcReleaseCnfParameters
params);
166
void
DoCschedUeReleaseCnf
(
FfMacCschedSapUser::CschedUeReleaseCnfParameters
params);
167
void
DoCschedUeConfigUpdateInd
(
FfMacCschedSapUser::CschedUeConfigUpdateIndParameters
params);
168
void
DoCschedCellConfigUpdateInd
(
FfMacCschedSapUser::CschedCellConfigUpdateIndParameters
params);
169
170
// forwarded from FfMacSchedSapUser
171
void
DoSchedDlConfigInd
(
FfMacSchedSapUser::SchedDlConfigIndParameters
ind);
172
void
DoSchedUlConfigInd
(
FfMacSchedSapUser::SchedUlConfigIndParameters
params);
173
174
// forwarded from LteEnbPhySapUser
175
void
DoSubframeIndication
(uint32_t frameNo, uint32_t subframeNo);
176
void
DoReceiveRachPreamble
(uint8_t prachId);
177
178
public
:
179
// legacy public for use the Phy callback
180
void
DoReceivePhyPdu
(
Ptr<Packet>
p);
181
182
private
:
183
void
DoUlInfoListElementHarqFeeback
(
UlInfoListElement_s
params);
184
void
DoDlInfoListElementHarqFeeback
(
DlInfoListElement_s
params);
185
186
// rnti, lcid, SAP of the RLC instance
187
std::map <uint16_t, std::map<uint8_t, LteMacSapUser*> >
m_rlcAttached
;
188
189
std::vector <CqiListElement_s>
m_dlCqiReceived
;
// DL-CQI received
190
std::vector <FfMacSchedSapProvider::SchedUlCqiInfoReqParameters>
m_ulCqiReceived
;
// UL-CQI received
191
std::vector <MacCeListElement_s>
m_ulCeReceived
;
// CE received (BSR up to now)
192
193
std::vector <DlInfoListElement_s>
m_dlInfoListReceived
;
// DL HARQ feedback received
194
195
std::vector <UlInfoListElement_s>
m_ulInfoListReceived
;
// UL HARQ feedback received
196
197
198
/*
199
* Map of UE's info element (see 4.3.12 of FF MAC Scheduler API)
200
*/
201
// std::map <uint16_t,UlInfoListElement_s> m_ulInfoListElements;
202
203
204
205
LteMacSapProvider
*
m_macSapProvider
;
206
LteEnbCmacSapProvider
*
m_cmacSapProvider
;
207
LteMacSapUser
*
m_macSapUser
;
208
LteEnbCmacSapUser
*
m_cmacSapUser
;
209
210
211
FfMacSchedSapProvider
*
m_schedSapProvider
;
212
FfMacCschedSapProvider
*
m_cschedSapProvider
;
213
FfMacSchedSapUser
*
m_schedSapUser
;
214
FfMacCschedSapUser
*
m_cschedSapUser
;
215
216
// PHY-SAP
217
LteEnbPhySapProvider
*
m_enbPhySapProvider
;
218
LteEnbPhySapUser
*
m_enbPhySapUser
;
219
220
uint32_t
m_frameNo
;
221
uint32_t
m_subframeNo
;
227
TracedCallback<uint32_t, uint32_t, uint16_t, uint8_t, uint16_t, uint8_t, uint16_t>
m_dlScheduling
;
232
TracedCallback<uint32_t, uint32_t, uint16_t, uint8_t, uint16_t>
m_ulScheduling
;
233
234
uint8_t
m_macChTtiDelay
;
// delay of MAC, PHY and channel in terms of TTIs
235
236
237
std::map <uint16_t, DlHarqProcessesBuffer_t>
m_miDlHarqProcessesPackets
;
// Packet under trasmission of the DL HARQ process
238
239
uint8_t
m_numberOfRaPreambles
;
240
uint8_t
m_preambleTransMax
;
241
uint8_t
m_raResponseWindowSize
;
242
247
struct
NcRaPreambleInfo
248
{
249
uint16_t
rnti
;
250
Time
expiryTime
;
251
};
252
258
std::map<uint8_t, NcRaPreambleInfo>
m_allocatedNcRaPreambleMap
;
259
260
std::map<uint8_t, uint32_t>
m_receivedRachPreambleCount
;
261
262
std::map<uint8_t, uint32_t>
m_rapIdRntiMap
;
263
};
264
265
}
// end namespace ns3
266
267
#endif
/* LTE_ENB_MAC_ENTITY_H */
src
lte
model
lte-enb-mac.h
Generated on Tue May 14 2013 11:08:25 for ns-3 by
1.8.1.2