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
lte-test-ue-phy.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Manuel Requena <manuel.requena@cttc.es>
7
*/
8
9
#include "
lte-test-ue-phy.h
"
10
11
#include "ns3/log.h"
12
13
namespace
ns3
14
{
15
16
NS_LOG_COMPONENT_DEFINE
(
"LteTestUePhy"
);
17
18
NS_OBJECT_ENSURE_REGISTERED
(LteTestUePhy);
19
20
LteTestUePhy::LteTestUePhy
()
21
{
22
NS_LOG_FUNCTION
(
this
);
23
NS_FATAL_ERROR
(
"This constructor should not be called"
);
24
}
25
26
LteTestUePhy::LteTestUePhy
(
Ptr<LteSpectrumPhy>
dlPhy,
Ptr<LteSpectrumPhy>
ulPhy)
27
:
LtePhy
(dlPhy, ulPhy)
28
{
29
NS_LOG_FUNCTION
(
this
);
30
}
31
32
LteTestUePhy::~LteTestUePhy
()
33
{
34
}
35
36
void
37
LteTestUePhy::DoDispose
()
38
{
39
NS_LOG_FUNCTION
(
this
);
40
41
LtePhy::DoDispose
();
42
}
43
44
TypeId
45
LteTestUePhy::GetTypeId
()
46
{
47
static
TypeId
tid =
48
TypeId
(
"ns3::LteTestUePhy"
).
SetParent
<
LtePhy
>().AddConstructor<LteTestUePhy>();
49
return
tid;
50
}
51
52
void
53
LteTestUePhy::DoSendMacPdu
(
Ptr<Packet>
p)
54
{
55
NS_LOG_FUNCTION
(
this
);
56
}
57
58
Ptr<SpectrumValue>
59
LteTestUePhy::CreateTxPowerSpectralDensity
()
60
{
61
NS_LOG_FUNCTION
(
this
);
62
Ptr<SpectrumValue>
psd;
63
64
return
psd;
65
}
66
67
void
68
LteTestUePhy::GenerateCtrlCqiReport
(
const
SpectrumValue
& sinr)
69
{
70
NS_LOG_FUNCTION
(
this
);
71
72
// Store calculated SINR, it will be retrieved at the end of the test
73
m_sinr
= sinr;
74
}
75
76
void
77
LteTestUePhy::GenerateDataCqiReport
(
const
SpectrumValue
& sinr)
78
{
79
NS_LOG_FUNCTION
(
this
);
80
81
// Store calculated SINR, it will be retrieved at the end of the test
82
m_sinr
= sinr;
83
}
84
85
void
86
LteTestUePhy::ReportRsReceivedPower
(
const
SpectrumValue
& power)
87
{
88
NS_LOG_FUNCTION
(
this
);
89
// Not used by the LteTestUePhy
90
}
91
92
void
93
LteTestUePhy::ReportInterference
(
const
SpectrumValue
& interf)
94
{
95
NS_LOG_FUNCTION
(
this
);
96
// Not used by the LteTestUePhy
97
}
98
99
void
100
LteTestUePhy::ReceiveLteControlMessage
(
Ptr<LteControlMessage>
msg)
101
{
102
NS_LOG_FUNCTION
(
this
<< msg);
103
}
104
105
SpectrumValue
106
LteTestUePhy::GetSinr
()
107
{
108
NS_LOG_FUNCTION
(
this
);
109
110
return
m_sinr
;
111
}
112
113
}
// namespace ns3
ns3::LtePhy
The LtePhy models the physical layer of LTE.
Definition
lte-phy.h:40
ns3::LtePhy::DoDispose
void DoDispose() override
Destructor implementation.
Definition
lte-phy.cc:65
ns3::LteTestUePhy::CreateTxPowerSpectralDensity
Ptr< SpectrumValue > CreateTxPowerSpectralDensity() override
Create the PSD for the TX.
Definition
lte-test-ue-phy.cc:59
ns3::LteTestUePhy::DoSendMacPdu
void DoSendMacPdu(Ptr< Packet > p) override
Queue the MAC PDU to be sent.
Definition
lte-test-ue-phy.cc:53
ns3::LteTestUePhy::m_sinr
SpectrumValue m_sinr
the SINR
Definition
lte-test-ue-phy.h:82
ns3::LteTestUePhy::~LteTestUePhy
~LteTestUePhy() override
Definition
lte-test-ue-phy.cc:32
ns3::LteTestUePhy::ReportInterference
void ReportInterference(const SpectrumValue &interf) override
generate a report based on the linear interference and noise power perceived during DATA frame NOTE: ...
Definition
lte-test-ue-phy.cc:93
ns3::LteTestUePhy::ReceiveLteControlMessage
virtual void ReceiveLteControlMessage(Ptr< LteControlMessage > msg)
Reeive LTE Control Message.
Definition
lte-test-ue-phy.cc:100
ns3::LteTestUePhy::ReportRsReceivedPower
void ReportRsReceivedPower(const SpectrumValue &power) override
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:86
ns3::LteTestUePhy::DoDispose
void DoDispose() override
Destructor implementation.
Definition
lte-test-ue-phy.cc:37
ns3::LteTestUePhy::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
lte-test-ue-phy.cc:45
ns3::LteTestUePhy::GenerateCtrlCqiReport
void GenerateCtrlCqiReport(const SpectrumValue &sinr) override
generate a CQI report based on the given SINR of Ctrl frame
Definition
lte-test-ue-phy.cc:68
ns3::LteTestUePhy::GenerateDataCqiReport
void GenerateDataCqiReport(const SpectrumValue &sinr) override
generate a CQI report based on the given SINR of Data frame (used for PUSCH CQIs)
Definition
lte-test-ue-phy.cc:77
ns3::LteTestUePhy::GetSinr
SpectrumValue GetSinr()
Get the SINR.
Definition
lte-test-ue-phy.cc:106
ns3::LteTestUePhy::LteTestUePhy
LteTestUePhy()
Definition
lte-test-ue-phy.cc:20
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::SpectrumValue
Set of values corresponding to a given SpectrumModel.
Definition
spectrum-value.h:50
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
NS_FATAL_ERROR
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition
fatal-error.h:168
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-test-ue-phy.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
test
lte-test-ue-phy.cc
Generated on Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0