A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
component-carrier-enb.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 Danilo Abrignani
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Danilo Abrignani <danilo.abrignani@unibo.it>
7 */
8
10
11#include "ff-mac-scheduler.h"
12#include "lte-enb-mac.h"
13#include "lte-enb-phy.h"
14#include "lte-ffr-algorithm.h"
15
16#include <ns3/abort.h>
17#include <ns3/boolean.h>
18#include <ns3/log.h>
19#include <ns3/pointer.h>
20#include <ns3/simulator.h>
21#include <ns3/uinteger.h>
22
23namespace ns3
24{
25
26NS_LOG_COMPONENT_DEFINE("ComponentCarrierEnb");
27NS_OBJECT_ENSURE_REGISTERED(ComponentCarrierEnb);
28
29TypeId
31{
32 static TypeId tid = TypeId("ns3::ComponentCarrierEnb")
34 .AddConstructor<ComponentCarrierEnb>()
35 .AddAttribute("LteEnbPhy",
36 "The PHY associated to this EnbNetDevice",
40 .AddAttribute("LteEnbMac",
41 "The MAC associated to this EnbNetDevice",
45 .AddAttribute("FfMacScheduler",
46 "The scheduler associated to this EnbNetDevice",
50 .AddAttribute("LteFfrAlgorithm",
51 "The FFR algorithm associated to this EnbNetDevice",
55 return tid;
56}
57
62
67
68void
70{
71 NS_LOG_FUNCTION(this);
72 if (m_phy)
73 {
74 m_phy->Dispose();
75 m_phy = nullptr;
76 }
77 if (m_mac)
78 {
79 m_mac->Dispose();
80 m_mac = nullptr;
81 }
82 if (m_scheduler)
83 {
84 m_scheduler->Dispose();
85 m_scheduler = nullptr;
86 }
88 {
89 m_ffrAlgorithm->Dispose();
90 m_ffrAlgorithm = nullptr;
91 }
92
94}
95
96void
98{
99 NS_LOG_FUNCTION(this);
100 m_phy->Initialize();
101 m_mac->Initialize();
102 m_ffrAlgorithm->Initialize();
103 m_scheduler->Initialize();
104}
105
108{
109 NS_LOG_FUNCTION(this);
110 return m_phy;
111}
112
113void
119
122{
123 NS_LOG_FUNCTION(this);
124 return m_mac;
125}
126
127void
133
140
141void
147
154
155void
161
162} // namespace ns3
void DoInitialize() override
Initialize() implementation.
void DoDispose() override
Destructor implementation.
Ptr< LteFfrAlgorithm > GetFfrAlgorithm()
static TypeId GetTypeId()
Get the type ID.
Ptr< FfMacScheduler > m_scheduler
the scheduler instance of this eNodeB component carrier
Ptr< LteEnbMac > m_mac
the MAC instance of this eNodeB component carrier
void SetFfrAlgorithm(Ptr< LteFfrAlgorithm > s)
Set the LteFfrAlgorithm.
Ptr< LteFfrAlgorithm > m_ffrAlgorithm
the FFR algorithm instance of this eNodeB component carrier
void SetMac(Ptr< LteEnbMac > s)
Set the LteEnbMac.
void SetFfMacScheduler(Ptr< FfMacScheduler > s)
Set the FfMacScheduler Algorithm.
Ptr< FfMacScheduler > GetFfMacScheduler()
Ptr< LteEnbPhy > m_phy
the Phy instance of this eNodeB component carrier
void SetPhy(Ptr< LteEnbPhy > s)
Set the LteEnbPhy.
ComponentCarrier Object, it defines a single Carrier This is the parent class for both ComponentCarri...
virtual void DoDispose()
Destructor implementation.
Definition object.cc:433
AttributeValue implementation for Pointer.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
Definition type-id.h:48
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition pointer.h:248
Ptr< AttributeChecker > MakePointerChecker()
Create a PointerChecker for a type.
Definition pointer.h:269
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition object-base.h:35
Every class exported by the ns3 library is enclosed in the ns3 namespace.