A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
component-carrier-ue.cc
Go to the documentation of this file.
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
#include "
component-carrier-ue.h
"
22
#include <ns3/uinteger.h>
23
#include <ns3/boolean.h>
24
#include <ns3/simulator.h>
25
#include <ns3/log.h>
26
#include <ns3/abort.h>
27
#include <ns3/lte-ue-phy.h>
28
#include <ns3/lte-ue-mac.h>
29
#include <ns3/pointer.h>
30
31
namespace
ns3
{
32
33
NS_LOG_COMPONENT_DEFINE
(
"ComponentCarrierUe"
);
34
35
NS_OBJECT_ENSURE_REGISTERED
( ComponentCarrierUe);
36
37
TypeId
ComponentCarrierUe::GetTypeId
(
void
)
38
{
39
static
TypeId
40
tid =
41
TypeId
(
"ns3::ComponentCarrierUe"
)
42
.
SetParent
<
ComponentCarrier
> ()
43
.AddConstructor<ComponentCarrierUe> ()
44
.AddAttribute (
"LteUePhy"
,
45
"The PHY associated to this EnbNetDevice"
,
46
PointerValue
(),
47
MakePointerAccessor
(&
ComponentCarrierUe::m_phy
),
48
MakePointerChecker <LteUePhy> ())
49
.AddAttribute (
"LteUeMac"
,
50
"The MAC associated to this UeNetDevice"
,
51
PointerValue
(),
52
MakePointerAccessor
(&
ComponentCarrierUe::m_mac
),
53
MakePointerChecker <LteUeMac> ())
54
;
55
return
tid;
56
}
57
ComponentCarrierUe::ComponentCarrierUe
()
58
{
59
NS_LOG_FUNCTION
(
this
);
60
}
61
62
ComponentCarrierUe::~ComponentCarrierUe
(
void
)
63
{
64
NS_LOG_FUNCTION
(
this
);
65
}
66
67
void
68
ComponentCarrierUe::DoDispose
()
69
{
70
NS_LOG_FUNCTION
(
this
);
71
m_phy
->Dispose ();
72
m_phy
= 0;
73
m_mac
->Dispose ();
74
m_mac
= 0;
75
Object::DoDispose
();
76
}
77
78
79
void
80
ComponentCarrierUe::DoInitialize
(
void
)
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
95
Ptr<LteUePhy>
96
ComponentCarrierUe::GetPhy
()
const
97
{
98
NS_LOG_FUNCTION
(
this
);
99
return
m_phy
;
100
}
101
102
void
103
ComponentCarrierUe::SetMac
(
Ptr<LteUeMac>
s)
104
{
105
NS_LOG_FUNCTION
(
this
);
106
m_mac
= s;
107
}
108
109
Ptr<LteUeMac>
110
ComponentCarrierUe::GetMac
()
const
111
{
112
NS_LOG_FUNCTION
(
this
);
113
return
m_mac
;
114
}
115
116
}
// namespace ns3
117
118
ns3::ComponentCarrier
ComponentCarrier Object, it defines a single Carrier This is the parent class for both ComponentCarri...
Definition:
component-carrier.h:40
ns3::ComponentCarrierUe::ComponentCarrierUe
ComponentCarrierUe()
Definition:
component-carrier-ue.cc:57
ns3::ComponentCarrierUe::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
component-carrier-ue.cc:37
ns3::ComponentCarrierUe::m_phy
Ptr< LteUePhy > m_phy
the Phy instance of this eNodeB component carrier
Definition:
component-carrier-ue.h:83
ns3::ComponentCarrierUe::GetPhy
Ptr< LteUePhy > GetPhy(void) const
Definition:
component-carrier-ue.cc:96
ns3::ComponentCarrierUe::GetMac
Ptr< LteUeMac > GetMac(void) const
Definition:
component-carrier-ue.cc:110
ns3::ComponentCarrierUe::m_mac
Ptr< LteUeMac > m_mac
the MAC instance of this eNodeB component carrier
Definition:
component-carrier-ue.h:84
ns3::ComponentCarrierUe::SetPhy
void SetPhy(Ptr< LteUePhy > s)
Set LteUePhy.
Definition:
component-carrier-ue.cc:88
ns3::ComponentCarrierUe::~ComponentCarrierUe
virtual ~ComponentCarrierUe(void)
Definition:
component-carrier-ue.cc:62
ns3::ComponentCarrierUe::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition:
component-carrier-ue.cc:68
ns3::ComponentCarrierUe::DoInitialize
virtual void DoInitialize(void)
Initialize() implementation.
Definition:
component-carrier-ue.cc:80
ns3::ComponentCarrierUe::SetMac
void SetMac(Ptr< LteUeMac > s)
Set the LteEnbMac.
Definition:
component-carrier-ue.cc:103
ns3::Object::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition:
object.cc:346
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:74
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:922
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:227
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition:
log.h:205
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:244
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition:
object-base.h:45
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
model
component-carrier-ue.cc
Generated on Tue Feb 6 2024 19:21:21 for ns-3 by
1.9.1