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
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Danilo Abrignani <danilo.abrignani@unibo.it>
7
*/
8
9
#include "
component-carrier-ue.h
"
10
11
#include "
lte-ue-mac.h
"
12
#include "
lte-ue-phy.h
"
13
14
#include <ns3/abort.h>
15
#include <ns3/boolean.h>
16
#include <ns3/log.h>
17
#include <ns3/pointer.h>
18
#include <ns3/simulator.h>
19
#include <ns3/uinteger.h>
20
21
namespace
ns3
22
{
23
24
NS_LOG_COMPONENT_DEFINE
(
"ComponentCarrierUe"
);
25
26
NS_OBJECT_ENSURE_REGISTERED
(ComponentCarrierUe);
27
28
TypeId
29
ComponentCarrierUe::GetTypeId
()
30
{
31
static
TypeId
tid =
TypeId
(
"ns3::ComponentCarrierUe"
)
32
.
SetParent
<
ComponentCarrier
>()
33
.AddConstructor<ComponentCarrierUe>()
34
.AddAttribute(
"LteUePhy"
,
35
"The PHY associated to this EnbNetDevice"
,
36
PointerValue
(),
37
MakePointerAccessor
(&
ComponentCarrierUe::m_phy
),
38
MakePointerChecker<LteUePhy>
())
39
.AddAttribute(
"LteUeMac"
,
40
"The MAC associated to this UeNetDevice"
,
41
PointerValue
(),
42
MakePointerAccessor
(&
ComponentCarrierUe::m_mac
),
43
MakePointerChecker<LteUeMac>
());
44
return
tid;
45
}
46
47
ComponentCarrierUe::ComponentCarrierUe
()
48
{
49
NS_LOG_FUNCTION
(
this
);
50
}
51
52
ComponentCarrierUe::~ComponentCarrierUe
()
53
{
54
NS_LOG_FUNCTION
(
this
);
55
}
56
57
void
58
ComponentCarrierUe::DoDispose
()
59
{
60
NS_LOG_FUNCTION
(
this
);
61
m_phy
->Dispose();
62
m_phy
=
nullptr
;
63
m_mac
->Dispose();
64
m_mac
=
nullptr
;
65
Object::DoDispose
();
66
}
67
68
void
69
ComponentCarrierUe::DoInitialize
()
70
{
71
NS_LOG_FUNCTION
(
this
);
72
m_phy
->Initialize();
73
m_mac
->Initialize();
74
}
75
76
void
77
ComponentCarrierUe::SetPhy
(
Ptr<LteUePhy>
s)
78
{
79
NS_LOG_FUNCTION
(
this
);
80
m_phy
= s;
81
}
82
83
Ptr<LteUePhy>
84
ComponentCarrierUe::GetPhy
()
const
85
{
86
NS_LOG_FUNCTION
(
this
);
87
return
m_phy
;
88
}
89
90
void
91
ComponentCarrierUe::SetMac
(
Ptr<LteUeMac>
s)
92
{
93
NS_LOG_FUNCTION
(
this
);
94
m_mac
= s;
95
}
96
97
Ptr<LteUeMac>
98
ComponentCarrierUe::GetMac
()
const
99
{
100
NS_LOG_FUNCTION
(
this
);
101
return
m_mac
;
102
}
103
104
}
// namespace ns3
ns3::ComponentCarrier
ComponentCarrier Object, it defines a single Carrier This is the parent class for both ComponentCarri...
Definition
component-carrier.h:28
ns3::ComponentCarrierUe::ComponentCarrierUe
ComponentCarrierUe()
Definition
component-carrier-ue.cc:47
ns3::ComponentCarrierUe::DoInitialize
void DoInitialize() override
Initialize() implementation.
Definition
component-carrier-ue.cc:69
ns3::ComponentCarrierUe::DoDispose
void DoDispose() override
Destructor implementation.
Definition
component-carrier-ue.cc:58
ns3::ComponentCarrierUe::m_phy
Ptr< LteUePhy > m_phy
the Phy instance of this eNodeB component carrier
Definition
component-carrier-ue.h:71
ns3::ComponentCarrierUe::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
component-carrier-ue.cc:29
ns3::ComponentCarrierUe::GetMac
Ptr< LteUeMac > GetMac() const
Definition
component-carrier-ue.cc:98
ns3::ComponentCarrierUe::~ComponentCarrierUe
~ComponentCarrierUe() override
Definition
component-carrier-ue.cc:52
ns3::ComponentCarrierUe::m_mac
Ptr< LteUeMac > m_mac
the MAC instance of this eNodeB component carrier
Definition
component-carrier-ue.h:72
ns3::ComponentCarrierUe::SetPhy
void SetPhy(Ptr< LteUePhy > s)
Set LteUePhy.
Definition
component-carrier-ue.cc:77
ns3::ComponentCarrierUe::SetMac
void SetMac(Ptr< LteUeMac > s)
Set the LteEnbMac.
Definition
component-carrier-ue.cc:91
ns3::ComponentCarrierUe::GetPhy
Ptr< LteUePhy > GetPhy() const
Definition
component-carrier-ue.cc:84
ns3::Object::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition
object.cc:433
ns3::PointerValue
AttributeValue implementation for Pointer.
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
component-carrier-ue.h
ns3::MakePointerAccessor
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
ns3::MakePointerChecker
Ptr< AttributeChecker > MakePointerChecker()
Create a PointerChecker for a type.
Definition
pointer.h:269
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition
log.h:191
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:229
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
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 Fri Nov 8 2024 13:59:02 for ns-3 by
1.11.0