A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
NS_LOG_COMPONENT_DEFINE
(
"LteTestUePhy"
);
25
26
namespace
ns3 {
27
28
29
NS_OBJECT_ENSURE_REGISTERED
(LteTestUePhy)
30
;
31
32
LteTestUePhy::LteTestUePhy
()
33
{
34
NS_LOG_FUNCTION
(
this
);
35
NS_FATAL_ERROR
(
"This constructor should not be called"
);
36
}
37
38
LteTestUePhy::LteTestUePhy
(
Ptr<LteSpectrumPhy>
dlPhy,
Ptr<LteSpectrumPhy>
ulPhy)
39
:
LtePhy
(dlPhy, ulPhy)
40
{
41
NS_LOG_FUNCTION
(
this
);
42
}
43
44
LteTestUePhy::~LteTestUePhy
()
45
{
46
}
47
48
void
49
LteTestUePhy::DoDispose
()
50
{
51
NS_LOG_FUNCTION
(
this
);
52
53
LtePhy::DoDispose
();
54
}
55
56
TypeId
57
LteTestUePhy::GetTypeId
(
void
)
58
{
59
static
TypeId
tid =
TypeId
(
"ns3::LteTestUePhy"
)
60
.
SetParent
<
LtePhy
> ()
61
.AddConstructor<LteTestUePhy> ()
62
;
63
return
tid;
64
}
65
66
void
67
LteTestUePhy::DoSendMacPdu
(
Ptr<Packet>
p)
68
{
69
NS_LOG_FUNCTION
(
this
);
70
}
71
72
Ptr<SpectrumValue>
73
LteTestUePhy::CreateTxPowerSpectralDensity
()
74
{
75
NS_LOG_FUNCTION
(
this
);
76
Ptr<SpectrumValue>
psd;
77
78
return
psd;
79
}
80
81
void
82
LteTestUePhy::GenerateCtrlCqiReport
(
const
SpectrumValue
& sinr)
83
{
84
NS_LOG_FUNCTION
(
this
);
85
86
// Store calculated SINR, it will be retrieved at the end of the test
87
m_sinr
= sinr;
88
}
89
90
void
91
LteTestUePhy::GenerateDataCqiReport
(
const
SpectrumValue
& sinr)
92
{
93
NS_LOG_FUNCTION
(
this
);
94
95
// Store calculated SINR, it will be retrieved at the end of the test
96
m_sinr
= sinr;
97
}
98
99
void
100
LteTestUePhy::ReportRsReceivedPower
(
const
SpectrumValue
& power)
101
{
102
NS_LOG_FUNCTION
(
this
);
103
// Not used by the LteTestUePhy
104
}
105
106
void
107
LteTestUePhy::ReportInterference
(
const
SpectrumValue
& interf)
108
{
109
NS_LOG_FUNCTION
(
this
);
110
// Not used by the LteTestUePhy
111
}
112
113
void
114
LteTestUePhy::ReceiveLteControlMessage
(
Ptr<LteControlMessage>
msg)
115
{
116
NS_LOG_FUNCTION
(
this
<< msg);
117
}
118
119
SpectrumValue
120
LteTestUePhy::GetSinr
()
121
{
122
NS_LOG_FUNCTION
(
this
);
123
124
return
m_sinr
;
125
}
126
127
128
}
// 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:100
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:82
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
Definition:
log.h:345
ns3::LteTestUePhy::~LteTestUePhy
virtual ~LteTestUePhy()
Definition:
lte-test-ue-phy.cc:44
ns3::LteTestUePhy::DoDispose
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition:
lte-test-ue-phy.cc:49
ns3::NS_OBJECT_ENSURE_REGISTERED
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
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:107
ns3::LteTestUePhy::GetTypeId
static TypeId GetTypeId(void)
Definition:
lte-test-ue-phy.cc:57
ns3::LteTestUePhy::GetSinr
SpectrumValue GetSinr()
Definition:
lte-test-ue-phy.cc:120
NS_FATAL_ERROR
#define NS_FATAL_ERROR(msg)
fatal error handling
Definition:
fatal-error.h:72
ns3::LteTestUePhy::LteTestUePhy
LteTestUePhy()
Definition:
lte-test-ue-phy.cc:32
ns3::LtePhy::DoDispose
void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition:
lte-phy.cc:76
ns3::LteTestUePhy::ReceiveLteControlMessage
virtual void ReceiveLteControlMessage(Ptr< LteControlMessage > msg)
Definition:
lte-test-ue-phy.cc:114
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:91
NS_LOG_COMPONENT_DEFINE
NS_LOG_COMPONENT_DEFINE("LteTestUePhy")
ns3::LteTestUePhy::m_sinr
SpectrumValue m_sinr
Definition:
lte-test-ue-phy.h:74
ns3::LteTestUePhy::CreateTxPowerSpectralDensity
virtual Ptr< SpectrumValue > CreateTxPowerSpectralDensity()
Create the PSD for the TX.
Definition:
lte-test-ue-phy.cc:73
ns3::LteTestUePhy::DoSendMacPdu
virtual void DoSendMacPdu(Ptr< Packet > p)
Queue the MAC PDU to be sent.
Definition:
lte-test-ue-phy.cc:67
ns3::SpectrumValue
Set of values corresponding to a given SpectrumModel.
Definition:
spectrum-value.h:57
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Definition:
type-id.cc:611
ns3::LtePhy
The LtePhy models the physical layer of LTE.
Definition:
lte-phy.h:52
src
lte
test
lte-test-ue-phy.cc
Generated on Sat Apr 19 2014 14:07:02 for ns-3 by
1.8.6