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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Danilo Abrignani <danilo.abrignani@unibo.it>
7 */
8
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
21namespace ns3
22{
23
24NS_LOG_COMPONENT_DEFINE("ComponentCarrierUe");
25
26NS_OBJECT_ENSURE_REGISTERED(ComponentCarrierUe);
27
28TypeId
30{
31 static TypeId tid = TypeId("ns3::ComponentCarrierUe")
33 .AddConstructor<ComponentCarrierUe>()
34 .AddAttribute("LteUePhy",
35 "The PHY associated to this EnbNetDevice",
39 .AddAttribute("LteUeMac",
40 "The MAC associated to this UeNetDevice",
44 return tid;
45}
46
51
56
57void
59{
60 NS_LOG_FUNCTION(this);
61 m_phy->Dispose();
62 m_phy = nullptr;
63 m_mac->Dispose();
64 m_mac = nullptr;
66}
67
68void
70{
71 NS_LOG_FUNCTION(this);
72 m_phy->Initialize();
73 m_mac->Initialize();
74}
75
76void
82
85{
86 NS_LOG_FUNCTION(this);
87 return m_phy;
88}
89
90void
96
99{
100 NS_LOG_FUNCTION(this);
101 return m_mac;
102}
103
104} // 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: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.