5G-LENA nr-v3.0-32-g83aee33
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-spectrum-phy-test.h
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
3// Copyright (c) 2020 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4//
5// SPDX-License-Identifier: GPL-2.0-only
6
7// An essential include is test.h
8#include "ns3/spectrum-propagation-loss-model.h"
9#include "ns3/test.h"
10
20namespace ns3
21{
22
23class MobilityModel;
24
30class NoLossSpectrumPropagationLossModel : public SpectrumPropagationLossModel
31{
32 public:
35
40 static TypeId GetTypeId();
41
42 protected:
43 int64_t DoAssignStreams(int64_t stream) override;
44
45 private:
46 Ptr<SpectrumValue> DoCalcRxPowerSpectralDensity(Ptr<const SpectrumSignalParameters> params,
47 Ptr<const MobilityModel> a,
48 Ptr<const MobilityModel> b) const override;
49};
50
51class SetNoisePsdTestCase : public TestCase
52{
53 public:
55 SetNoisePsdTestCase(double txPower,
56 double bandwidth,
57 double noiseFigureFirst,
58 double noiseFigureSecond,
59 double expectedSnrFirst,
60 double expectedSnrSecond,
61 uint8_t numerology);
63 ~SetNoisePsdTestCase() override;
64
68 void SaveSnr(double snr);
69
70 private:
74 void DoRun() override;
75
79 void DoEvaluateTest();
80
81 std::vector<double>
82 m_snr;
83 double m_txPower;
84 double m_bandwidth;
85 double m_noiseFigureFirst;
87 double m_noiseFigureSecond;
89 double m_expectedSnrFirst;
90 double
91 m_expectedSnrSecond;
92 uint8_t m_numerology;
93};
94
99class NrSpectrumPhyTestSuite : public TestSuite
100{
101 public:
104};
105
106} // namespace ns3
No loss spectrum propagation loss model created for testing purposes. As its name says,...
static TypeId GetTypeId()
Get the type ID.
void SaveSnr(double snr)
Save SNR value in the list of values.