A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
lte
test
lte-test-downlink-power-control.h
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2014 Piotr Gawlowicz
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: Piotr Gawlowicz <gawlowicz.p@gmail.com>
19
*
20
*/
21
22
#ifndef LTE_TEST_DOWNLINK_POWER_CONTROL_H
23
#define LTE_TEST_DOWNLINK_POWER_CONTROL_H
24
25
#include "ns3/spectrum-value.h"
26
#include <ns3/lte-rrc-sap.h>
27
28
#include "ns3/spectrum-test.h"
29
#include "ns3/lte-spectrum-value-helper.h"
30
31
#include "ns3/test.h"
32
33
using namespace
ns3
;
34
42
class
LteDownlinkPowerControlTestSuite
:
public
TestSuite
43
{
44
public
:
45
LteDownlinkPowerControlTestSuite
();
46
53
double
CalculateRbTxPower (
double
txPower, uint8_t pa);
54
};
55
63
class
LteDownlinkPowerControlSpectrumValueTestCase
:
public
TestCase
64
{
65
public
:
77
LteDownlinkPowerControlSpectrumValueTestCase
(std::string name,
78
uint16_t earfcn, uint8_t bw,
double
powerTx,
79
std::map<int, double> powerTxMap, std::vector <int> activeRbs,
80
SpectrumValue
& expected);
81
virtual
~
LteDownlinkPowerControlSpectrumValueTestCase
();
82
83
private
:
84
virtual
void
DoRun (
void
);
85
Ptr<SpectrumValue>
m_actual
;
86
Ptr<SpectrumValue>
m_expected
;
87
88
};
89
98
class
LteDownlinkPowerControlTestCase
:
public
TestCase
99
{
100
public
:
108
LteDownlinkPowerControlTestCase
(
bool
changePower, uint8_t pa, std::string name);
109
virtual
~
LteDownlinkPowerControlTestCase
();
110
111
private
:
112
virtual
void
DoRun (
void
);
113
114
bool
m_changePdschConfigDedicated
;
115
LteRrcSap::PdschConfigDedicated
m_pdschConfigDedicated
;
116
double
m_expectedPowerDiff
;
117
};
118
119
128
class
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase
:
public
TestCase
129
{
130
public
:
137
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase
(
bool
useIdealRrc, std::string name);
138
virtual
~
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase
();
139
148
void
ConnectionReconfigurationEnb (std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti);
149
158
void
ConnectionReconfigurationUe (std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti);
159
166
void
ChangePdschConfigDedicated (uint16_t rnti, uint8_t pa);
167
private
:
168
virtual
void
DoRun (
void
);
169
bool
m_useIdealRrc
;
170
171
bool
m_changePdschConfigDedicatedTriggered
;
172
bool
m_connectionReconfigurationUeReceived
;
173
bool
m_connectionReconfigurationEnbCompleted
;
174
};
175
176
#endif
/* LTE_TEST_DOWNLINK_POWER_CONTROL_H */
ns3::Ptr< SpectrumValue >
LteDownlinkPowerControlSpectrumValueTestCase::m_expected
Ptr< SpectrumValue > m_expected
expected Tx Power Spectral Density
Definition:
lte-test-downlink-power-control.h:86
ns3::TestSuite
A suite of tests to run.
Definition:
test.h:1342
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::m_useIdealRrc
bool m_useIdealRrc
use ideal RRC?
Definition:
lte-test-downlink-power-control.h:169
ns3::TestCase
encapsulates test code
Definition:
test.h:1155
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::m_connectionReconfigurationUeReceived
bool m_connectionReconfigurationUeReceived
connection reconfiguration UE received?
Definition:
lte-test-downlink-power-control.h:172
LteDownlinkPowerControlTestCase::m_pdschConfigDedicated
LteRrcSap::PdschConfigDedicated m_pdschConfigDedicated
PDSCH config dedicated.
Definition:
lte-test-downlink-power-control.h:115
LteDownlinkPowerControlSpectrumValueTestCase::m_actual
Ptr< SpectrumValue > m_actual
actual Tx Power Spectral Density
Definition:
lte-test-downlink-power-control.h:85
LteDownlinkPowerControlTestCase
Test SINR calculation in the downlink when the power control is used.
Definition:
lte-test-downlink-power-control.h:98
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::m_changePdschConfigDedicatedTriggered
bool m_changePdschConfigDedicatedTriggered
change PDSCH config dedicated triggered?
Definition:
lte-test-downlink-power-control.h:171
LteDownlinkPowerControlTestCase::m_changePdschConfigDedicated
bool m_changePdschConfigDedicated
PDSCH config dedicated change.
Definition:
lte-test-downlink-power-control.h:114
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase
Test if RRC connection reconfiguration messages are properly generated upon the change in the downlin...
Definition:
lte-test-downlink-power-control.h:128
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
LteDownlinkPowerControlSpectrumValueTestCase
Test SINR calculation in the downlink when power control is used.
Definition:
lte-test-downlink-power-control.h:63
LteDownlinkPowerControlTestCase::m_expectedPowerDiff
double m_expectedPowerDiff
expected power difference
Definition:
lte-test-downlink-power-control.h:116
LteDownlinkPowerControlTestSuite
Test suite for the LteDownlinkPowerControlSpectrumValueTestCase.
Definition:
lte-test-downlink-power-control.h:42
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::m_connectionReconfigurationEnbCompleted
bool m_connectionReconfigurationEnbCompleted
connection reconfiguration ENB completed?
Definition:
lte-test-downlink-power-control.h:173
ns3::LteRrcSap::PdschConfigDedicated
PdschConfigDedicated structure.
Definition:
lte-rrc-sap.h:154
ns3::SpectrumValue
Set of values corresponding to a given SpectrumModel.
Definition:
spectrum-value.h:58
Generated on Wed Nov 7 2018 10:02:03 for ns-3 by
1.8.14