1 /* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015 Danilo Abrignani
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: Danilo Abrignani <danilo.abrignani@unibo.it>
19  */
20 
21 
22 #ifndef COMPONENT_CARRIER_ENB_H
23 #define COMPONENT_CARRIER_ENB_H
24 
25 #include "component-carrier.h"
26 #include <ns3/object.h>
27 #include <ns3/packet.h>
28 #include <ns3/nstime.h>
29 #include "ns3/lte-phy.h"
30 #include <ns3/lte-enb-phy.h>
31 #include <ns3/pointer.h>
32 //#include <ns3/lte-enb-mac.h>
33 
34 
35 namespace ns3 {
36 
37 class LteEnbMac;
38 class FfMacScheduler;
39 class LteFfrAlgorithm;
40 
41 /**
42  * \ingroup lte
43  *
44  * Defines a single carrier for enb, and contains pointers to LteEnbPhy,
45  * LteEnbMac, LteFfrAlgorithm, and FfMacScheduler objects.
46  *
47  */
48 class ComponentCarrierEnb : public ComponentCarrierBaseStation
49 {
50 public:
51   /**
52    * \brief Get the type ID.
53    * \return the object TypeId
54    */
55   static TypeId GetTypeId (void);
56 
57   ComponentCarrierEnb ();
58 
59   virtual ~ComponentCarrierEnb (void);
60   virtual void DoDispose (void);
61 
62   /**
63    * \return a pointer to the physical layer.
64    */
65   Ptr<LteEnbPhy> GetPhy (void);
66 
67   /**
68    * \return a pointer to the MAC layer.
69    */
70   Ptr<LteEnbMac> GetMac (void);
71 
72   /**
73    * \return a pointer to the Ffr Algorithm.
74    */
75   Ptr<LteFfrAlgorithm> GetFfrAlgorithm ();
76 
77   /**
78    * \return a pointer to the Mac Scheduler.
79    */
80   Ptr<FfMacScheduler> GetFfMacScheduler ();
81 
82   /**
83    * Set the LteEnbPhy
84    * \param s a pointer to the LteEnbPhy
85    */
86   void SetPhy (Ptr<LteEnbPhy> s);
87   /**
88    * Set the LteEnbMac
89    * \param s a pointer to the LteEnbMac
90    */
91   void SetMac (Ptr<LteEnbMac> s);
92 
93   /**
94    * Set the FfMacScheduler Algorithm
95    * \param s a pointer to the FfMacScheduler
96    */
97   void SetFfMacScheduler (Ptr<FfMacScheduler> s);
98 
99   /**
100    * Set the LteFfrAlgorithm
101    * \param s a pointer to the LteFfrAlgorithm
102    */
103   void SetFfrAlgorithm (Ptr<LteFfrAlgorithm> s);
104 
105 protected:
106 
107   virtual void DoInitialize (void);
108 
109 private:
110   Ptr<LteEnbPhy> m_phy; ///< the Phy instance of this eNodeB component carrier
111   Ptr<LteEnbMac> m_mac; ///< the MAC instance of this eNodeB component carrier
112   Ptr<FfMacScheduler> m_scheduler; ///< the scheduler instance of this eNodeB component carrier
113   Ptr<LteFfrAlgorithm> m_ffrAlgorithm; ///< the FFR algorithm instance of this eNodeB component carrier
114 };
115 
116 } // namespace ns3
117 
118 #endif /* COMPONENT_CARRIER_H */
119