A Discrete-Event Network Simulator
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
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
32namespace ns3
33{
34
35NS_LOG_COMPONENT_DEFINE("ComponentCarrierUe");
36
37NS_OBJECT_ENSURE_REGISTERED(ComponentCarrierUe);
38
39TypeId
41{
42 static TypeId tid = TypeId("ns3::ComponentCarrierUe")
44 .AddConstructor<ComponentCarrierUe>()
45 .AddAttribute("LteUePhy",
46 "The PHY associated to this EnbNetDevice",
49 MakePointerChecker<LteUePhy>())
50 .AddAttribute("LteUeMac",
51 "The MAC associated to this UeNetDevice",
54 MakePointerChecker<LteUeMac>());
55 return tid;
56}
57
59{
60 NS_LOG_FUNCTION(this);
61}
62
64{
65 NS_LOG_FUNCTION(this);
66}
67
68void
70{
71 NS_LOG_FUNCTION(this);
72 m_phy->Dispose();
73 m_phy = nullptr;
74 m_mac->Dispose();
75 m_mac = nullptr;
77}
78
79void
81{
82 NS_LOG_FUNCTION(this);
83 m_phy->Initialize();
84 m_mac->Initialize();
85}
86
87void
89{
90 NS_LOG_FUNCTION(this);
91 m_phy = s;
92}
93
96{
97 NS_LOG_FUNCTION(this);
98 return m_phy;
99}
100
101void
103{
104 NS_LOG_FUNCTION(this);
105 m_mac = s;
106}
107
110{
111 NS_LOG_FUNCTION(this);
112 return m_mac;
113}
114
115} // namespace ns3
ComponentCarrier Object, it defines a single Carrier This is the parent class for both ComponentCarri...
void DoInitialize() override
Initialize() implementation.
void DoDispose() override
Destructor implementation.
Ptr< LteUePhy > m_phy
the Phy instance of this eNodeB component carrier
static TypeId GetTypeId()
Get the type ID.
Ptr< LteUeMac > GetMac() const
Ptr< LteUeMac > m_mac
the MAC instance of this eNodeB component carrier
void SetPhy(Ptr< LteUePhy > s)
Set LteUePhy.
void SetMac(Ptr< LteUeMac > s)
Set the LteEnbMac.
Ptr< LteUePhy > GetPhy() const
virtual void DoDispose()
Destructor implementation.
Definition: object.cc:444
AttributeValue implementation for Pointer.
Definition: pointer.h:48
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:932
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Definition: pointer.h:259
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#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:46
Every class exported by the ns3 library is enclosed in the ns3 namespace.