A Discrete-Event Network Simulator
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
17using namespace ns3;
18
19/**
20 * \ingroup lte-test
21 *
22 * \brief Test 1.2 SINR calculation in uplink
23 */
25{
26 public:
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 */
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 */
51 std::string name);
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 */
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 */
87 std::string name);
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 */
Smart pointer class similar to boost::intrusive_ptr.
Set of values corresponding to a given SpectrumModel.
encapsulates test code
Definition test.h:1050
A suite of tests to run.
Definition test.h:1267
Every class exported by the ns3 library is enclosed in the ns3 namespace.