A Discrete-Event Network Simulator
API
 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 
37 namespace ns3 {
38 
39 class DlCqiIdealControlMessage;
40 class UlCqiIdealControlMessage;
41 class PdcchMapIdealControlMessage;
42 
43 
44 
48 class LteEnbMac : public Object
49 {
55 
56 public:
57  static TypeId GetTypeId (void);
58 
59  LteEnbMac (void);
60  virtual ~LteEnbMac (void);
61  virtual void DoDispose (void);
62 
63 
84 
85 
86 
107 
108 
114 
120 
121 
127 
129 
135 
136  void DoUlCqiReport (UlCqi_s ulcqi);
137 
138 
139 
140 private:
141  // forwarded from LteEnbCmacSapProvider
142  void DoConfigureMac (uint8_t ulBandwidth, uint8_t dlBandwidth);
143  void DoAddUe (uint16_t rnti);
146  void DoReleaseLc (uint16_t rnti, uint8_t lcid);
147 
148  // forwarded from LteMacSapProvider
151 
152 
153  // forwarded from FfMacCchedSapUser
161 
162  // forwarded from FfMacSchedSapUser
165 
167 
174  void DoSubframeIndication (uint32_t frameNo, uint32_t subframeNo);
175 
181 public:
182  // legacy public for use the Phy callback
183  void DoReceivePhyPdu (Ptr<Packet> p);
184 
185 private:
186 private:
187  // std::map <uint16_t, std::map <uint8_t,Ptr<LteMacSapUser> > > m_rlcAttached;
188  std::map <LteFlowId_t, LteMacSapUser*> m_rlcAttached;
189 
190  std::vector <CqiListElement_s> m_dlCqiReceived; // DL-CQI received
191  std::vector <UlCqi_s> m_ulCqiReceived; // UL-CQI received
192  std::vector <MacCeListElement_s> m_ulCeReceived; // CE received (BSR up to now)
193 
194 
195  /*
196  * Map of UE's info element (see 4.3.12 of FF MAC Scheduler API)
197  */
198  std::map <uint16_t,UlInfoListElement_s> m_ulInfoListElements;
199 
200 
201 
206 
207 
212 
213  // PHY-SAP
216 
217  uint32_t m_frameNo;
218  uint32_t m_subframeNo;
230 
231  uint8_t m_macChTtiDelay; // delay of MAC, PHY and channel in terms of TTIs
232 
233 
234 };
235 
236 } // end namespace ns3
237 
238 #endif /* LTE_ENB_MAC_ENTITY_H */