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-uplink-sinr.h
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
* Modified by Marco Miozzo <mmiozzo@ctt.es>
8
* Extend to Data and SRS frames
9
*/
10
11
#ifndef LTE_TEST_UPLINK_SINR_H
12
#define LTE_TEST_UPLINK_SINR_H
13
14
#include "ns3/spectrum-value.h"
15
#include "ns3/test.h"
16
17
using namespace
ns3
;
18
19
/**
20
* \ingroup lte-test
21
*
22
* \brief Test 1.2 SINR calculation in uplink
23
*/
24
class
LteUplinkSinrTestSuite
:
public
TestSuite
25
{
26
public
:
27
LteUplinkSinrTestSuite
();
28
};
29
30
/**
31
* \ingroup lte-test
32
*
33
* \brief Test generation of SINR in the uplink. Test schedules the signal and the interference
34
* signals and it evaluates if the obtained value for SINR corresponds to the theoretical value
35
* in given conditions.
36
*/
37
class
LteUplinkDataSinrTestCase
:
public
TestCase
38
{
39
public
:
40
/**
41
* Constructor
42
*
43
* \param sv1 spectrum value 1
44
* \param sv2 spectrum value 2
45
* \param sinr the SINR
46
* \param name the reference name
47
*/
48
LteUplinkDataSinrTestCase
(
Ptr<SpectrumValue>
sv1,
49
Ptr<SpectrumValue>
sv2,
50
Ptr<SpectrumValue>
sinr,
51
std::string name);
52
~LteUplinkDataSinrTestCase
()
override
;
53
54
private
:
55
void
DoRun
()
override
;
56
57
Ptr<SpectrumValue>
m_sv1
;
///< the spectrum value #1
58
Ptr<SpectrumValue>
m_sv2
;
///< the spectrum value #2
59
Ptr<const SpectrumModel>
m_sm
;
///< the spectrum model
60
Ptr<SpectrumValue>
m_expectedSinr
;
///< the expected SINR
61
};
62
63
/**
64
* \ingroup lte-test
65
*
66
* \brief In this test one signal will be of interest, i.e., the
67
* SRS of the first signal will have the same CellId of the
68
* receiving PHY; the others will have a different
69
* CellId and hence will be the interfering signals. The test
70
* checks whether the SINR of the signal correspond to the
71
* theoretical value.
72
*/
73
class
LteUplinkSrsSinrTestCase
:
public
TestCase
74
{
75
public
:
76
/**
77
* Constructor
78
*
79
* \param sv1 spectrum value 1
80
* \param sv2 spectrum value 2
81
* \param sinr the SINR
82
* \param name the reference name
83
*/
84
LteUplinkSrsSinrTestCase
(
Ptr<SpectrumValue>
sv1,
85
Ptr<SpectrumValue>
sv2,
86
Ptr<SpectrumValue>
sinr,
87
std::string name);
88
~LteUplinkSrsSinrTestCase
()
override
;
89
90
/**
91
* Callback to be connected to an LteChunkProcessor to collect the reported SINR
92
*
93
* \param sinr
94
*/
95
void
ReportSinr
(
const
SpectrumValue
& sinr);
96
97
private
:
98
void
DoRun
()
override
;
99
100
Ptr<SpectrumValue>
m_sv1
;
///< the spectrum value #1
101
Ptr<SpectrumValue>
m_sv2
;
///< the spectrum value #2
102
Ptr<const SpectrumModel>
m_sm
;
///< the spectrum model
103
104
Ptr<SpectrumValue>
m_expectedSinr
;
///< the expected SINR
105
Ptr<SpectrumValue>
m_actualSinr
;
///< the actual SINR
106
};
107
108
#endif
/* LTE_TEST_UPLINK_SINR_H */
LteUplinkDataSinrTestCase
Test generation of SINR in the uplink.
Definition
lte-test-uplink-sinr.h:38
LteUplinkDataSinrTestCase::m_sv1
Ptr< SpectrumValue > m_sv1
the spectrum value #1
Definition
lte-test-uplink-sinr.h:57
LteUplinkDataSinrTestCase::m_sv2
Ptr< SpectrumValue > m_sv2
the spectrum value #2
Definition
lte-test-uplink-sinr.h:58
LteUplinkDataSinrTestCase::DoRun
void DoRun() override
Implementation to actually run this TestCase.
Definition
lte-test-uplink-sinr.cc:142
LteUplinkDataSinrTestCase::m_sm
Ptr< const SpectrumModel > m_sm
the spectrum model
Definition
lte-test-uplink-sinr.h:59
LteUplinkDataSinrTestCase::m_expectedSinr
Ptr< SpectrumValue > m_expectedSinr
the expected SINR
Definition
lte-test-uplink-sinr.h:60
LteUplinkDataSinrTestCase::~LteUplinkDataSinrTestCase
~LteUplinkDataSinrTestCase() override
Definition
lte-test-uplink-sinr.cc:137
LteUplinkDataSinrTestCase::LteUplinkDataSinrTestCase
LteUplinkDataSinrTestCase(Ptr< SpectrumValue > sv1, Ptr< SpectrumValue > sv2, Ptr< SpectrumValue > sinr, std::string name)
Constructor.
Definition
lte-test-uplink-sinr.cc:124
LteUplinkSinrTestSuite
Test 1.2 SINR calculation in uplink.
Definition
lte-test-uplink-sinr.h:25
LteUplinkSinrTestSuite::LteUplinkSinrTestSuite
LteUplinkSinrTestSuite()
Test 1.2 SINR calculation in uplink.
Definition
lte-test-uplink-sinr.cc:34
LteUplinkSrsSinrTestCase
In this test one signal will be of interest, i.e., the SRS of the first signal will have the same Cel...
Definition
lte-test-uplink-sinr.h:74
LteUplinkSrsSinrTestCase::ReportSinr
void ReportSinr(const SpectrumValue &sinr)
Callback to be connected to an LteChunkProcessor to collect the reported SINR.
Definition
lte-test-uplink-sinr.cc:339
LteUplinkSrsSinrTestCase::~LteUplinkSrsSinrTestCase
~LteUplinkSrsSinrTestCase() override
Definition
lte-test-uplink-sinr.cc:334
LteUplinkSrsSinrTestCase::m_actualSinr
Ptr< SpectrumValue > m_actualSinr
the actual SINR
Definition
lte-test-uplink-sinr.h:105
LteUplinkSrsSinrTestCase::m_sm
Ptr< const SpectrumModel > m_sm
the spectrum model
Definition
lte-test-uplink-sinr.h:102
LteUplinkSrsSinrTestCase::m_expectedSinr
Ptr< SpectrumValue > m_expectedSinr
the expected SINR
Definition
lte-test-uplink-sinr.h:104
LteUplinkSrsSinrTestCase::DoRun
void DoRun() override
Implementation to actually run this TestCase.
Definition
lte-test-uplink-sinr.cc:345
LteUplinkSrsSinrTestCase::LteUplinkSrsSinrTestCase
LteUplinkSrsSinrTestCase(Ptr< SpectrumValue > sv1, Ptr< SpectrumValue > sv2, Ptr< SpectrumValue > sinr, std::string name)
Constructor.
Definition
lte-test-uplink-sinr.cc:321
LteUplinkSrsSinrTestCase::m_sv2
Ptr< SpectrumValue > m_sv2
the spectrum value #2
Definition
lte-test-uplink-sinr.h:101
LteUplinkSrsSinrTestCase::m_sv1
Ptr< SpectrumValue > m_sv1
the spectrum value #1
Definition
lte-test-uplink-sinr.h:100
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::TestCase
encapsulates test code
Definition
test.h:1050
ns3::TestSuite
A suite of tests to run.
Definition
test.h:1267
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
test
lte-test-uplink-sinr.h
Generated on Mon Nov 4 2024 19:38:04 for ns-3 by
1.11.0