A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lte-ue-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: Nicola Baldo <nbaldo@cttc.es>
19  * Author: Marco Miozzo <mmiozzo@cttc.es>
20  */
21 
22 #ifndef LTE_UE_MAC_ENTITY_H
23 #define LTE_UE_MAC_ENTITY_H
24 
25 
26 
27 #include <map>
28 
29 #include <ns3/lte-mac-sap.h>
30 #include <ns3/lte-ue-cmac-sap.h>
31 #include <ns3/lte-ue-phy-sap.h>
32 #include <ns3/nstime.h>
33 
34 
35 namespace ns3 {
36 
37 
38 class LteUeMac : public Object
39 {
43 
44 public:
45  static TypeId GetTypeId (void);
46 
47  LteUeMac ();
48  virtual ~LteUeMac ();
49  virtual void DoDispose (void);
50 
54 
60 
66 
73  void DoSubframeIndication (uint32_t frameNo, uint32_t subframeNo);
74 
75 private:
76  // forwarded from MAC SAP
79 
80  // forwarded from UE CMAC SAP
81  void DoConfigureUe (uint16_t rnti);
82  void DoAddLc (uint8_t lcId, LteMacSapUser* msu);
83  void DoRemoveLc (uint8_t lcId);
85 
86  // forwarded from PHY SAP
89 
90  void SendReportBufferStatus (void);
91 
92 private:
93  // end of temporary hack
94  std::map <uint8_t, LteMacSapUser*> m_macSapUserMap;
96 
99 
102 
103  std::map <uint8_t, uint64_t> m_ulBsrReceived; // BSR received from RLC (BSR up to now)
104 
107 
108  bool m_freshUlBsr; // true when a BSR has been received in the last TTI
109 
110 
111  uint16_t m_rnti;
112 
113 };
114 
115 } // namespace ns3
116 
117 #endif // LTE_UE_MAC_ENTITY