A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
lte
test
lte-test-ue-phy.cc
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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: Manuel Requena <manuel.requena@cttc.es>
19
*/
20
21
#include "ns3/log.h"
22
#include "
lte-test-ue-phy.h
"
23
24
namespace
ns3
{
25
26
NS_LOG_COMPONENT_DEFINE
(
"LteTestUePhy"
);
27
28
NS_OBJECT_ENSURE_REGISTERED
(LteTestUePhy);
29
30
LteTestUePhy::LteTestUePhy
()
31
{
32
NS_LOG_FUNCTION
(
this
);
33
NS_FATAL_ERROR
(
"This constructor should not be called"
);
34
}
35
36
LteTestUePhy::LteTestUePhy
(
Ptr<LteSpectrumPhy>
dlPhy,
Ptr<LteSpectrumPhy>
ulPhy)
37
:
LtePhy
(dlPhy, ulPhy)
38
{
39
NS_LOG_FUNCTION
(
this
);
40
}
41
42
LteTestUePhy::~LteTestUePhy
()
43
{
44
}
45
46
void
47
LteTestUePhy::DoDispose
()
48
{
49
NS_LOG_FUNCTION
(
this
);
50
51
LtePhy::DoDispose
();
52
}
53
54
TypeId
55
LteTestUePhy::GetTypeId
(
void
)
56
{
57
static
TypeId
tid =
TypeId
(
"ns3::LteTestUePhy"
)
58
.
SetParent
<
LtePhy
> ()
59
.AddConstructor<LteTestUePhy> ()
60
;
61
return
tid;
62
}
63
64
void
65
LteTestUePhy::DoSendMacPdu
(
Ptr<Packet>
p)
66
{
67
NS_LOG_FUNCTION
(
this
);
68
}
69
70
Ptr<SpectrumValue>
71
LteTestUePhy::CreateTxPowerSpectralDensity
()
72
{
73
NS_LOG_FUNCTION
(
this
);
74
Ptr<SpectrumValue>
psd;
75
76
return
psd;
77
}
78
79
void
80
LteTestUePhy::GenerateCtrlCqiReport
(
const
SpectrumValue
& sinr)
81
{
82
NS_LOG_FUNCTION
(
this
);
83
84
// Store calculated SINR, it will be retrieved at the end of the test
85
m_sinr
= sinr;
86
}
87
88
void
89
LteTestUePhy::GenerateDataCqiReport
(
const
SpectrumValue
& sinr)
90
{
91
NS_LOG_FUNCTION
(
this
);
92
93
// Store calculated SINR, it will be retrieved at the end of the test
94
m_sinr
= sinr;
95
}
96
97
void
98
LteTestUePhy::ReportRsReceivedPower
(
const
SpectrumValue
& power)
99
{
100
NS_LOG_FUNCTION
(
this
);
101
// Not used by the LteTestUePhy
102
}
103
104
void
105
LteTestUePhy::ReportInterference
(
const
SpectrumValue
& interf)
106
{
107
NS_LOG_FUNCTION
(
this
);
108
// Not used by the LteTestUePhy
109
}
110
111
void
112
LteTestUePhy::ReceiveLteControlMessage
(
Ptr<LteControlMessage>
msg)
113
{
114
NS_LOG_FUNCTION
(
this
<< msg);
115
}
116
117
SpectrumValue
118
LteTestUePhy::GetSinr
()
119
{
120
NS_LOG_FUNCTION
(
this
);
121
122
return
m_sinr
;
123
}
124
125
126
}
// namespace ns3
ns3::LteTestUePhy::ReportRsReceivedPower
virtual void ReportRsReceivedPower(const SpectrumValue &power)
generate a report based on the linear RS power perceived during CTRL frame NOTE: used only by UE for ...
Definition:
lte-test-ue-phy.cc:98
ns3::LteTestUePhy::GenerateCtrlCqiReport
virtual void GenerateCtrlCqiReport(const SpectrumValue &sinr)
generate a CQI report based on the given SINR of Ctrl frame
Definition:
lte-test-ue-phy.cc:80
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:73
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:213
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition:
object-base.h:45
ns3::LteTestUePhy::~LteTestUePhy
virtual ~LteTestUePhy()
Definition:
lte-test-ue-phy.cc:42
ns3::LteTestUePhy::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition:
lte-test-ue-phy.cc:47
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition:
log.h:202
ns3::LteTestUePhy::ReportInterference
virtual void ReportInterference(const SpectrumValue &interf)
generate a report based on the linear interference and noise power perceived during DATA frame NOTE: ...
Definition:
lte-test-ue-phy.cc:105
ns3::LteTestUePhy::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
lte-test-ue-phy.cc:55
NS_FATAL_ERROR
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition:
fatal-error.h:162
ns3::LteTestUePhy::GetSinr
SpectrumValue GetSinr()
Get the SINR.
Definition:
lte-test-ue-phy.cc:118
ns3::LteTestUePhy::LteTestUePhy
LteTestUePhy()
Definition:
lte-test-ue-phy.cc:30
ns3::LtePhy::DoDispose
void DoDispose()
Destructor implementation.
Definition:
lte-phy.cc:76
ns3::LteTestUePhy::ReceiveLteControlMessage
virtual void ReceiveLteControlMessage(Ptr< LteControlMessage > msg)
Reeive LTE Control Message.
Definition:
lte-test-ue-phy.cc:112
lte-test-ue-phy.h
ns3::LteTestUePhy::GenerateDataCqiReport
virtual void GenerateDataCqiReport(const SpectrumValue &sinr)
generate a CQI report based on the given SINR of Data frame (used for PUSCH CQIs) ...
Definition:
lte-test-ue-phy.cc:89
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LteTestUePhy::m_sinr
SpectrumValue m_sinr
the SINR
Definition:
lte-test-ue-phy.h:94
ns3::LteTestUePhy::CreateTxPowerSpectralDensity
virtual Ptr< SpectrumValue > CreateTxPowerSpectralDensity()
Create the PSD for the TX.
Definition:
lte-test-ue-phy.cc:71
ns3::LteTestUePhy::DoSendMacPdu
virtual void DoSendMacPdu(Ptr< Packet > p)
Queue the MAC PDU to be sent.
Definition:
lte-test-ue-phy.cc:65
ns3::SpectrumValue
Set of values corresponding to a given SpectrumModel.
Definition:
spectrum-value.h:58
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition:
type-id.cc:915
ns3::LtePhy
The LtePhy models the physical layer of LTE.
Definition:
lte-phy.h:52
Generated on Wed Nov 7 2018 10:02:04 for ns-3 by
1.8.14