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-downlink-power-control.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2014 Piotr Gawlowicz
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
7
*
8
*/
9
10
#ifndef LTE_TEST_DOWNLINK_POWER_CONTROL_H
11
#define LTE_TEST_DOWNLINK_POWER_CONTROL_H
12
13
#include "ns3/lte-rrc-sap.h"
14
#include "ns3/lte-spectrum-value-helper.h"
15
#include "ns3/spectrum-test.h"
16
#include "ns3/spectrum-value.h"
17
#include "ns3/test.h"
18
19
using namespace
ns3
;
20
21
/**
22
* @ingroup lte-test
23
*
24
* @brief Test suite for the LteDownlinkPowerControlSpectrumValueTestCase.
25
*
26
*/
27
class
LteDownlinkPowerControlTestSuite
:
public
TestSuite
28
{
29
public
:
30
LteDownlinkPowerControlTestSuite
();
31
32
/**
33
* @brief Calculate RB transmit power function
34
* @param txPower the transmit power
35
* @param pa the PA
36
* @returns RB transmit power
37
*/
38
double
CalculateRbTxPower
(
double
txPower
, uint8_t pa);
39
};
40
41
/**
42
* @ingroup lte-test
43
*
44
* @brief Test SINR calculation in the downlink when power control is used.
45
* Test if the difference in power levels are corresponding to the estamated values.
46
*/
47
class
LteDownlinkPowerControlSpectrumValueTestCase
:
public
TestCase
48
{
49
public
:
50
/**
51
* @brief Constructor
52
*
53
* @param name the reference name
54
* @param earfcn the EARFCN
55
* @param bw the bandwidth
56
* @param powerTx
57
* @param powerTxMap
58
* @param activeRbs
59
* @param expected the expected Tx Power Spectral Density
60
*/
61
LteDownlinkPowerControlSpectrumValueTestCase
(std::string name,
62
uint16_t earfcn,
63
uint16_t bw,
64
double
powerTx
,
65
std::map<int, double>
powerTxMap
,
66
std::vector<int>
activeRbs
,
67
SpectrumValue
&
expected
);
68
~LteDownlinkPowerControlSpectrumValueTestCase
()
override
;
69
70
private
:
71
void
DoRun
()
override
;
72
Ptr<SpectrumValue>
m_actual
;
///< actual Tx Power Spectral Density
73
Ptr<SpectrumValue>
m_expected
;
///< expected Tx Power Spectral Density
74
};
75
76
/**
77
* @ingroup lte-test
78
*
79
* @brief Test SINR calculation in the downlink when the power control is used.
80
* Test the power control by comparing the downlink data and ctrl power
81
* difference with the estimated value based on the specified change in power.
82
*/
83
class
LteDownlinkPowerControlTestCase
:
public
TestCase
84
{
85
public
:
86
/**
87
* @brief Constructor
88
*
89
* @param changePower
90
* @param pa
91
* @param name the reference name
92
*/
93
LteDownlinkPowerControlTestCase
(
bool
changePower
, uint8_t pa, std::string name);
94
~LteDownlinkPowerControlTestCase
()
override
;
95
96
private
:
97
void
DoRun
()
override
;
98
99
bool
m_changePdschConfigDedicated
;
///< PDSCH config dedicated change
100
LteRrcSap::PdschConfigDedicated
m_pdschConfigDedicated
;
///< PDSCH config dedicated
101
double
m_expectedPowerDiff
;
///< expected power difference
102
};
103
104
/**
105
* @ingroup lte-test
106
*
107
* @brief Test if RRC connection reconfiguration messages are properly
108
* generated upon the change in the downlink power.
109
*
110
*/
111
class
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase
:
public
TestCase
112
{
113
public
:
114
/**
115
* @brief Constructor
116
*
117
* @param useIdealRrc if true use ideal RRC
118
* @param name the reference name
119
*/
120
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase
(
bool
useIdealRrc
, std::string name);
121
~LteDownlinkPowerControlRrcConnectionReconfigurationTestCase
()
override
;
122
123
/**
124
* @brief Connection Reconfiguration ENB
125
*
126
* @param context the context name
127
* @param imsi the IMSI
128
* @param cellid the cell ID
129
* @param rnti the RNTI
130
*/
131
void
ConnectionReconfigurationEnb
(std::string context,
132
uint64_t imsi,
133
uint16_t
cellid
,
134
uint16_t rnti);
135
136
/**
137
* @brief Connection Reconfiguration UE
138
*
139
* @param context the context name
140
* @param imsi the IMSI
141
* @param cellid the cell ID
142
* @param rnti the RNTI
143
*/
144
void
ConnectionReconfigurationUe
(std::string context,
145
uint64_t imsi,
146
uint16_t
cellid
,
147
uint16_t rnti);
148
149
/**
150
* @brief Change PDSCH config dedicated
151
*
152
* @param rnti the RNTI
153
* @param pa the PA
154
*/
155
void
ChangePdschConfigDedicated
(uint16_t rnti, uint8_t pa);
156
157
private
:
158
void
DoRun
()
override
;
159
bool
m_useIdealRrc
;
///< use ideal RRC?
160
161
bool
m_changePdschConfigDedicatedTriggered
;
///< change PDSCH config dedicated triggered?
162
bool
m_connectionReconfigurationUeReceived
;
///< connection reconfiguration UE received?
163
bool
m_connectionReconfigurationEnbCompleted
;
///< connection reconfiguration ENB completed?
164
};
165
166
#endif
/* LTE_TEST_DOWNLINK_POWER_CONTROL_H */
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase
Test if RRC connection reconfiguration messages are properly generated upon the change in the downlin...
Definition
lte-test-downlink-power-control.h:112
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::~LteDownlinkPowerControlRrcConnectionReconfigurationTestCase
~LteDownlinkPowerControlRrcConnectionReconfigurationTestCase() override
Definition
lte-test-downlink-power-control.cc:566
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::ConnectionReconfigurationEnb
void ConnectionReconfigurationEnb(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
Connection Reconfiguration ENB.
Definition
lte-test-downlink-power-control.cc:571
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::ConnectionReconfigurationUe
void ConnectionReconfigurationUe(std::string context, uint64_t imsi, uint16_t cellid, uint16_t rnti)
Connection Reconfiguration UE.
Definition
lte-test-downlink-power-control.cc:585
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::DoRun
void DoRun() override
Implementation to actually run this TestCase.
Definition
lte-test-downlink-power-control.cc:608
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::m_useIdealRrc
bool m_useIdealRrc
use ideal RRC?
Definition
lte-test-downlink-power-control.h:159
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::m_changePdschConfigDedicatedTriggered
bool m_changePdschConfigDedicatedTriggered
change PDSCH config dedicated triggered?
Definition
lte-test-downlink-power-control.h:161
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::m_connectionReconfigurationUeReceived
bool m_connectionReconfigurationUeReceived
connection reconfiguration UE received?
Definition
lte-test-downlink-power-control.h:162
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::ChangePdschConfigDedicated
void ChangePdschConfigDedicated(uint16_t rnti, uint8_t pa)
Change PDSCH config dedicated.
Definition
lte-test-downlink-power-control.cc:599
LteDownlinkPowerControlRrcConnectionReconfigurationTestCase::m_connectionReconfigurationEnbCompleted
bool m_connectionReconfigurationEnbCompleted
connection reconfiguration ENB completed?
Definition
lte-test-downlink-power-control.h:163
LteDownlinkPowerControlSpectrumValueTestCase
Test SINR calculation in the downlink when power control is used.
Definition
lte-test-downlink-power-control.h:48
LteDownlinkPowerControlSpectrumValueTestCase::m_actual
Ptr< SpectrumValue > m_actual
actual Tx Power Spectral Density
Definition
lte-test-downlink-power-control.h:72
LteDownlinkPowerControlSpectrumValueTestCase::DoRun
void DoRun() override
Implementation to actually run this TestCase.
Definition
lte-test-downlink-power-control.cc:412
LteDownlinkPowerControlSpectrumValueTestCase::m_expected
Ptr< SpectrumValue > m_expected
expected Tx Power Spectral Density
Definition
lte-test-downlink-power-control.h:73
LteDownlinkPowerControlSpectrumValueTestCase::~LteDownlinkPowerControlSpectrumValueTestCase
~LteDownlinkPowerControlSpectrumValueTestCase() override
Definition
lte-test-downlink-power-control.cc:407
LteDownlinkPowerControlTestCase
Test SINR calculation in the downlink when the power control is used.
Definition
lte-test-downlink-power-control.h:84
LteDownlinkPowerControlTestCase::m_expectedPowerDiff
double m_expectedPowerDiff
expected power difference
Definition
lte-test-downlink-power-control.h:101
LteDownlinkPowerControlTestCase::~LteDownlinkPowerControlTestCase
~LteDownlinkPowerControlTestCase() override
Definition
lte-test-downlink-power-control.cc:435
LteDownlinkPowerControlTestCase::DoRun
void DoRun() override
Implementation to actually run this TestCase.
Definition
lte-test-downlink-power-control.cc:440
LteDownlinkPowerControlTestCase::m_pdschConfigDedicated
LteRrcSap::PdschConfigDedicated m_pdschConfigDedicated
PDSCH config dedicated.
Definition
lte-test-downlink-power-control.h:100
LteDownlinkPowerControlTestCase::m_changePdschConfigDedicated
bool m_changePdschConfigDedicated
PDSCH config dedicated change.
Definition
lte-test-downlink-power-control.h:99
LteDownlinkPowerControlTestSuite
Test suite for the LteDownlinkPowerControlSpectrumValueTestCase.
Definition
lte-test-downlink-power-control.h:28
LteDownlinkPowerControlTestSuite::CalculateRbTxPower
double CalculateRbTxPower(double txPower, uint8_t pa)
Calculate RB transmit power function.
Definition
lte-test-downlink-power-control.cc:368
LteDownlinkPowerControlTestSuite::LteDownlinkPowerControlTestSuite
LteDownlinkPowerControlTestSuite()
TestSuite.
Definition
lte-test-downlink-power-control.cc:44
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
ptr.h:66
ns3::SpectrumValue
Set of values corresponding to a given SpectrumModel.
Definition
spectrum-value.h:50
ns3::TestCase
encapsulates test code
Definition
test.h:1050
ns3::TestSuite
A suite of tests to run.
Definition
test.h:1267
ns3::Create
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition
ptr.h:436
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LteRrcSap::PdschConfigDedicated
PdschConfigDedicated structure.
Definition
lte-rrc-sap.h:152
src
lte
test
lte-test-downlink-power-control.h
Generated on Mon Dec 15 2025 15:21:58 for ns-3 by
1.9.8