A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
component-carrier-ue.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015 Danilo Abrignani
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Danilo Abrignani <danilo.abrignani@unibo.it>
18
*/
19
20
#include "
component-carrier-ue.h
"
21
22
#include "
lte-ue-mac.h
"
23
#include "
lte-ue-phy.h
"
24
25
#include <ns3/abort.h>
26
#include <ns3/boolean.h>
27
#include <ns3/log.h>
28
#include <ns3/pointer.h>
29
#include <ns3/simulator.h>
30
#include <ns3/uinteger.h>
31
32
namespace
ns3
33
{
34
35
NS_LOG_COMPONENT_DEFINE
(
"ComponentCarrierUe"
);
36
37
NS_OBJECT_ENSURE_REGISTERED
(ComponentCarrierUe);
38
39
TypeId
40
ComponentCarrierUe::GetTypeId
()
41
{
42
static
TypeId
tid =
TypeId
(
"ns3::ComponentCarrierUe"
)
43
.
SetParent
<
ComponentCarrier
>()
44
.AddConstructor<ComponentCarrierUe>()
45
.AddAttribute(
"LteUePhy"
,
46
"The PHY associated to this EnbNetDevice"
,
47
PointerValue
(),
48
MakePointerAccessor
(&
ComponentCarrierUe::m_phy
),
49
MakePointerChecker<LteUePhy>())
50
.AddAttribute(
"LteUeMac"
,
51
"The MAC associated to this UeNetDevice"
,
52
PointerValue
(),
53
MakePointerAccessor
(&
ComponentCarrierUe::m_mac
),
54
MakePointerChecker<LteUeMac>());
55
return
tid;
56
}
57
58
ComponentCarrierUe::ComponentCarrierUe
()
59
{
60
NS_LOG_FUNCTION
(
this
);
61
}
62
63
ComponentCarrierUe::~ComponentCarrierUe
()
64
{
65
NS_LOG_FUNCTION
(
this
);
66
}
67
68
void
69
ComponentCarrierUe::DoDispose
()
70
{
71
NS_LOG_FUNCTION
(
this
);
72
m_phy
->Dispose();
73
m_phy
=
nullptr
;
74
m_mac
->Dispose();
75
m_mac
=
nullptr
;
76
Object::DoDispose
();
77
}
78
79
void
80
ComponentCarrierUe::DoInitialize
()
81
{
82
NS_LOG_FUNCTION
(
this
);
83
m_phy
->Initialize();
84
m_mac
->Initialize();
85
}
86
87
void
88
ComponentCarrierUe::SetPhy
(
Ptr<LteUePhy>
s)
89
{
90
NS_LOG_FUNCTION
(
this
);
91
m_phy
= s;
92
}
93
94
Ptr<LteUePhy>
95
ComponentCarrierUe::GetPhy
()
const
96
{
97
NS_LOG_FUNCTION
(
this
);
98
return
m_phy
;
99
}
100
101
void
102
ComponentCarrierUe::SetMac
(
Ptr<LteUeMac>
s)
103
{
104
NS_LOG_FUNCTION
(
this
);
105
m_mac
= s;
106
}
107
108
Ptr<LteUeMac>
109
ComponentCarrierUe::GetMac
()
const
110
{
111
NS_LOG_FUNCTION
(
this
);
112
return
m_mac
;
113
}
114
115
}
// namespace ns3
ns3::ComponentCarrier
ComponentCarrier Object, it defines a single Carrier This is the parent class for both ComponentCarri...
Definition:
component-carrier.h:39
ns3::ComponentCarrierUe::ComponentCarrierUe
ComponentCarrierUe()
Definition:
component-carrier-ue.cc:58
ns3::ComponentCarrierUe::DoInitialize
void DoInitialize() override
Initialize() implementation.
Definition:
component-carrier-ue.cc:80
ns3::ComponentCarrierUe::DoDispose
void DoDispose() override
Destructor implementation.
Definition:
component-carrier-ue.cc:69
ns3::ComponentCarrierUe::m_phy
Ptr< LteUePhy > m_phy
the Phy instance of this eNodeB component carrier
Definition:
component-carrier-ue.h:82
ns3::ComponentCarrierUe::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
component-carrier-ue.cc:40
ns3::ComponentCarrierUe::GetMac
Ptr< LteUeMac > GetMac() const
Definition:
component-carrier-ue.cc:109
ns3::ComponentCarrierUe::~ComponentCarrierUe
~ComponentCarrierUe() override
Definition:
component-carrier-ue.cc:63
ns3::ComponentCarrierUe::m_mac
Ptr< LteUeMac > m_mac
the MAC instance of this eNodeB component carrier
Definition:
component-carrier-ue.h:83
ns3::ComponentCarrierUe::SetPhy
void SetPhy(Ptr< LteUePhy > s)
Set LteUePhy.
Definition:
component-carrier-ue.cc:88
ns3::ComponentCarrierUe::SetMac
void SetMac(Ptr< LteUeMac > s)
Set the LteEnbMac.
Definition:
component-carrier-ue.cc:102
ns3::ComponentCarrierUe::GetPhy
Ptr< LteUePhy > GetPhy() const
Definition:
component-carrier-ue.cc:95
ns3::Object::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition:
object.cc:353
ns3::PointerValue
Hold objects of type Ptr<T>.
Definition:
pointer.h:37
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:78
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition:
type-id.cc:936
component-carrier-ue.h
ns3::MakePointerAccessor
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Definition:
pointer.h:227
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition:
log.h:202
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition:
log-macros-enabled.h:238
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition:
object-base.h:46
lte-ue-mac.h
lte-ue-phy.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
model
component-carrier-ue.cc
Generated on Sun Jul 2 2023 18:21:46 for ns-3 by
1.9.6