merge
This commit is contained in:
@@ -22,16 +22,13 @@
|
||||
|
||||
#include "ns3/log.h"
|
||||
|
||||
// #include "ns3/packet.h"
|
||||
// #include "ns3/simulator.h"
|
||||
// #include "ns3/lte-spectrum-phy.h"
|
||||
#include "ns3/lte-phy-tag.h"
|
||||
#include "ns3/lte-ue-phy.h"
|
||||
#include "ns3/lena-test-sinr-chunk-processor.h"
|
||||
#include "ns3/lte-test-sinr-chunk-processor.h"
|
||||
|
||||
#include "ns3/lena-test-downlink-sinr.h"
|
||||
#include "ns3/lte-test-downlink-sinr.h"
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("LenaDownlinkSinrTest");
|
||||
NS_LOG_COMPONENT_DEFINE ("LteDownlinkSinrTest");
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
@@ -44,15 +41,15 @@ using namespace ns3;
|
||||
* TestSuite
|
||||
*/
|
||||
|
||||
LenaDownlinkSinrTestSuite::LenaDownlinkSinrTestSuite ()
|
||||
: TestSuite ("lena-downlink-sinr", SYSTEM)
|
||||
LteDownlinkSinrTestSuite::LteDownlinkSinrTestSuite ()
|
||||
: TestSuite ("lte-downlink-sinr", SYSTEM)
|
||||
{
|
||||
LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_ALL);
|
||||
|
||||
LogComponentEnable ("LenaTestSinrChunkProcessor", logLevel);
|
||||
LogComponentEnable ("LenaDownlinkSinrTest", logLevel);
|
||||
LogComponentEnable ("LteTestSinrChunkProcessor", logLevel);
|
||||
LogComponentEnable ("LteDownlinkSinrTest", logLevel);
|
||||
|
||||
NS_LOG_INFO ("Creating LenaDownlinkSinrTestSuite");
|
||||
NS_LOG_INFO ("Creating LteDownlinkSinrTestSuite");
|
||||
|
||||
/**
|
||||
* Build Spectrum Model values for the TX signal
|
||||
@@ -85,7 +82,7 @@ LenaDownlinkSinrTestSuite::LenaDownlinkSinrTestSuite ()
|
||||
(*theoreticalSinr1)[0] = 3.72589167251055;
|
||||
(*theoreticalSinr1)[1] = 3.72255684126076;
|
||||
|
||||
AddTestCase (new LenaDownlinkSinrTestCase (rxPsd1, theoreticalSinr1, "sdBm = [-46 -48]"));
|
||||
AddTestCase (new LteDownlinkSinrTestCase (rxPsd1, theoreticalSinr1, "sdBm = [-46 -48]"));
|
||||
|
||||
/**
|
||||
* TX signal #2: Power Spectral Density (W/Hz) of the signal of interest = [-63 -61] dBm and BW = [20 22] MHz
|
||||
@@ -98,18 +95,18 @@ LenaDownlinkSinrTestSuite::LenaDownlinkSinrTestSuite ()
|
||||
(*theoreticalSinr2)[0] = 0.0743413124381667;
|
||||
(*theoreticalSinr2)[1] = 0.1865697965291756;
|
||||
|
||||
AddTestCase (new LenaDownlinkSinrTestCase (rxPsd2, theoreticalSinr2, "sdBm = [-63 -61]"));
|
||||
AddTestCase (new LteDownlinkSinrTestCase (rxPsd2, theoreticalSinr2, "sdBm = [-63 -61]"));
|
||||
|
||||
}
|
||||
|
||||
static LenaDownlinkSinrTestSuite lenaDownlinkSinrTestSuite;
|
||||
static LteDownlinkSinrTestSuite lteDownlinkSinrTestSuite;
|
||||
|
||||
|
||||
/**
|
||||
* TestCase
|
||||
*/
|
||||
|
||||
LenaDownlinkSinrTestCase::LenaDownlinkSinrTestCase (Ptr<SpectrumValue> sv, Ptr<SpectrumValue> sinr, std::string name)
|
||||
LteDownlinkSinrTestCase::LteDownlinkSinrTestCase (Ptr<SpectrumValue> sv, Ptr<SpectrumValue> sinr, std::string name)
|
||||
: TestCase ("SINR calculation in downlink: " + name),
|
||||
m_sv (sv),
|
||||
m_sm (sv->GetSpectrumModel ()),
|
||||
@@ -118,12 +115,12 @@ LenaDownlinkSinrTestCase::LenaDownlinkSinrTestCase (Ptr<SpectrumValue> sv, Ptr<S
|
||||
NS_LOG_INFO ("Creating LenaDownlinkSinrTestCase");
|
||||
}
|
||||
|
||||
LenaDownlinkSinrTestCase::~LenaDownlinkSinrTestCase ()
|
||||
LteDownlinkSinrTestCase::~LteDownlinkSinrTestCase ()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
LenaDownlinkSinrTestCase::DoRun (void)
|
||||
LteDownlinkSinrTestCase::DoRun (void)
|
||||
{
|
||||
LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_ALL);
|
||||
|
||||
@@ -162,7 +159,7 @@ LenaDownlinkSinrTestCase::DoRun (void)
|
||||
|
||||
dlPhy->SetCellId (100);
|
||||
|
||||
Ptr<LenaTestSinrChunkProcessor> chunkProcessor = Create<LenaTestSinrChunkProcessor> (uePhy->GetObject<LtePhy> ());
|
||||
Ptr<LteTestSinrChunkProcessor> chunkProcessor = Create<LteTestSinrChunkProcessor> (uePhy->GetObject<LtePhy> ());
|
||||
dlPhy->AddSinrChunkProcessor (chunkProcessor);
|
||||
|
||||
/**
|
||||
@@ -18,8 +18,8 @@
|
||||
* Author: Manuel Requena <manuel.requena@cttc.es>
|
||||
*/
|
||||
|
||||
#ifndef LENA_TEST_DOWNLINK_SINR_H
|
||||
#define LENA_TEST_DOWNLINK_SINR_H
|
||||
#ifndef LTE_TEST_DOWNLINK_SINR_H
|
||||
#define LTE_TEST_DOWNLINK_SINR_H
|
||||
|
||||
#include "ns3/spectrum-value.h"
|
||||
|
||||
@@ -32,18 +32,18 @@ using namespace ns3;
|
||||
/**
|
||||
* Test 1.1 SINR calculation in downlink
|
||||
*/
|
||||
class LenaDownlinkSinrTestSuite : public TestSuite
|
||||
class LteDownlinkSinrTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
LenaDownlinkSinrTestSuite ();
|
||||
LteDownlinkSinrTestSuite ();
|
||||
};
|
||||
|
||||
|
||||
class LenaDownlinkSinrTestCase : public TestCase
|
||||
class LteDownlinkSinrTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
LenaDownlinkSinrTestCase (Ptr<SpectrumValue> sv, Ptr<SpectrumValue> sinr, std::string name);
|
||||
virtual ~LenaDownlinkSinrTestCase ();
|
||||
LteDownlinkSinrTestCase (Ptr<SpectrumValue> sv, Ptr<SpectrumValue> sinr, std::string name);
|
||||
virtual ~LteDownlinkSinrTestCase ();
|
||||
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
@@ -54,4 +54,4 @@ class LenaDownlinkSinrTestCase : public TestCase
|
||||
};
|
||||
|
||||
|
||||
#endif /* LENA_TEST_DOWNLINK_SINR_H */
|
||||
#endif /* LTE_TEST_DOWNLINK_SINR_H */
|
||||
@@ -21,27 +21,27 @@
|
||||
|
||||
#include <ns3/log.h>
|
||||
|
||||
#include "lena-test-sinr-chunk-processor.h"
|
||||
#include "lte-test-sinr-chunk-processor.h"
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("LenaTestSinrChunkProcessor");
|
||||
NS_LOG_COMPONENT_DEFINE ("LteTestSinrChunkProcessor");
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
LenaTestSinrChunkProcessor::LenaTestSinrChunkProcessor (Ptr<LtePhy> p)
|
||||
LteTestSinrChunkProcessor::LteTestSinrChunkProcessor (Ptr<LtePhy> p)
|
||||
: m_phy (p)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << p);
|
||||
NS_ASSERT (m_phy);
|
||||
}
|
||||
|
||||
LenaTestSinrChunkProcessor::~LenaTestSinrChunkProcessor ()
|
||||
LteTestSinrChunkProcessor::~LteTestSinrChunkProcessor ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
void
|
||||
LenaTestSinrChunkProcessor::Start ()
|
||||
LteTestSinrChunkProcessor::Start ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_sumSinr = 0;
|
||||
@@ -49,7 +49,7 @@ LenaTestSinrChunkProcessor::Start ()
|
||||
}
|
||||
|
||||
void
|
||||
LenaTestSinrChunkProcessor::EvaluateSinrChunk (const SpectrumValue& sinr, Time duration)
|
||||
LteTestSinrChunkProcessor::EvaluateSinrChunk (const SpectrumValue& sinr, Time duration)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << sinr << duration);
|
||||
if (m_sumSinr == 0)
|
||||
@@ -63,7 +63,7 @@ LenaTestSinrChunkProcessor::EvaluateSinrChunk (const SpectrumValue& sinr, Time d
|
||||
}
|
||||
|
||||
void
|
||||
LenaTestSinrChunkProcessor::End ()
|
||||
LteTestSinrChunkProcessor::End ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
if (m_totDuration.GetSeconds () > 0)
|
||||
@@ -79,7 +79,7 @@ LenaTestSinrChunkProcessor::End ()
|
||||
}
|
||||
|
||||
SpectrumValue
|
||||
LenaTestSinrChunkProcessor::GetSinr ()
|
||||
LteTestSinrChunkProcessor::GetSinr ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
* Nicola Baldo <nbaldo@cttc.es>
|
||||
*/
|
||||
|
||||
#ifndef LENA_TEST_SINR_CHUNK_PROCESSOR_H
|
||||
#define LENA_TEST_SINR_CHUNK_PROCESSOR_H
|
||||
#ifndef LTE_TEST_SINR_CHUNK_PROCESSOR_H
|
||||
#define LTE_TEST_SINR_CHUNK_PROCESSOR_H
|
||||
|
||||
#include "ns3/lte-sinr-chunk-processor.h"
|
||||
|
||||
@@ -32,11 +32,11 @@ namespace ns3 {
|
||||
* It is plugged on the receiving SpectrumPhy and therefore
|
||||
* receives the SINR SpectrumValue calculated by the LteInterference module.
|
||||
*/
|
||||
class LenaTestSinrChunkProcessor : public LteSinrChunkProcessor
|
||||
class LteTestSinrChunkProcessor : public LteSinrChunkProcessor
|
||||
{
|
||||
public:
|
||||
LenaTestSinrChunkProcessor (Ptr<LtePhy> p);
|
||||
virtual ~LenaTestSinrChunkProcessor ();
|
||||
LteTestSinrChunkProcessor (Ptr<LtePhy> p);
|
||||
virtual ~LteTestSinrChunkProcessor ();
|
||||
|
||||
virtual void Start ();
|
||||
virtual void EvaluateSinrChunk (const SpectrumValue& sinr, Time duration);
|
||||
@@ -53,4 +53,4 @@ private:
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* LENA_TEST_SINR_CHUNK_PROCESSOR_H */
|
||||
#endif /* LTE_TEST_SINR_CHUNK_PROCESSOR_H */
|
||||
@@ -24,11 +24,11 @@
|
||||
|
||||
#include "ns3/lte-phy-tag.h"
|
||||
#include "ns3/lte-ue-phy.h"
|
||||
#include "ns3/lena-test-sinr-chunk-processor.h"
|
||||
#include "ns3/lte-test-sinr-chunk-processor.h"
|
||||
|
||||
#include "ns3/lena-test-uplink-sinr.h"
|
||||
#include "ns3/lte-test-uplink-sinr.h"
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("LenaUplinkSinrTest");
|
||||
NS_LOG_COMPONENT_DEFINE ("LteUplinkSinrTest");
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
@@ -40,15 +40,15 @@ using namespace ns3;
|
||||
/**
|
||||
* TestSuite
|
||||
*/
|
||||
LenaUplinkSinrTestSuite::LenaUplinkSinrTestSuite ()
|
||||
: TestSuite ("lena-uplink-sinr", SYSTEM)
|
||||
LteUplinkSinrTestSuite::LteUplinkSinrTestSuite ()
|
||||
: TestSuite ("lte-uplink-sinr", SYSTEM)
|
||||
{
|
||||
LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_ALL);
|
||||
|
||||
LogComponentEnable ("LenaTestSinrChunkProcessor", logLevel);
|
||||
LogComponentEnable ("LenaUplinkSinrTest", logLevel);
|
||||
LogComponentEnable ("LteTestSinrChunkProcessor", logLevel);
|
||||
LogComponentEnable ("LteUplinkSinrTest", logLevel);
|
||||
|
||||
NS_LOG_INFO ("Creating LenaUplinkSinrTestSuite");
|
||||
NS_LOG_INFO ("Creating LteUplinkSinrTestSuite");
|
||||
|
||||
/**
|
||||
* Build Spectrum Model values for the TX signal
|
||||
@@ -85,7 +85,7 @@ LenaUplinkSinrTestSuite::LenaUplinkSinrTestSuite ()
|
||||
(*theoreticalSinr1)[0] = 3.72589167251055;
|
||||
(*theoreticalSinr1)[1] = 3.72255684126076;
|
||||
|
||||
AddTestCase (new LenaUplinkSinrTestCase (rxPsd1, rxPsd2, theoreticalSinr1, "sdBm = [-46 -inf] and [-inf -48]"));
|
||||
AddTestCase (new LteUplinkSinrTestCase (rxPsd1, rxPsd2, theoreticalSinr1, "sdBm = [-46 -inf] and [-inf -48]"));
|
||||
|
||||
/**
|
||||
* TX signals #2: Power Spectral Density of the signals of interest = [-63 -inf] and [-inf -61] dBm and BW = [20 22] MHz
|
||||
@@ -102,33 +102,33 @@ LenaUplinkSinrTestSuite::LenaUplinkSinrTestSuite ()
|
||||
(*theoreticalSinr2)[0] = 0.0743413124381667;
|
||||
(*theoreticalSinr2)[1] = 0.1865697965291756;
|
||||
|
||||
AddTestCase (new LenaUplinkSinrTestCase (rxPsd3, rxPsd4, theoreticalSinr2, "sdBm = [-63 -inf] and [-inf -61]"));
|
||||
AddTestCase (new LteUplinkSinrTestCase (rxPsd3, rxPsd4, theoreticalSinr2, "sdBm = [-63 -inf] and [-inf -61]"));
|
||||
|
||||
}
|
||||
|
||||
static LenaUplinkSinrTestSuite lenaUplinkSinrTestSuite;
|
||||
static LteUplinkSinrTestSuite lteUplinkSinrTestSuite;
|
||||
|
||||
|
||||
/**
|
||||
* TestCase
|
||||
*/
|
||||
|
||||
LenaUplinkSinrTestCase::LenaUplinkSinrTestCase (Ptr<SpectrumValue> sv1, Ptr<SpectrumValue> sv2, Ptr<SpectrumValue> sinr, std::string name)
|
||||
LteUplinkSinrTestCase::LteUplinkSinrTestCase (Ptr<SpectrumValue> sv1, Ptr<SpectrumValue> sv2, Ptr<SpectrumValue> sinr, std::string name)
|
||||
: TestCase ("SINR calculation in uplink: " + name),
|
||||
m_sv1 (sv1),
|
||||
m_sv2 (sv2),
|
||||
m_sm (sv1->GetSpectrumModel ()),
|
||||
m_sinr (sinr)
|
||||
{
|
||||
NS_LOG_INFO ("Creating LenaUplinkSinrTestCase");
|
||||
NS_LOG_INFO ("Creating LteUplinkSinrTestCase");
|
||||
}
|
||||
|
||||
LenaUplinkSinrTestCase::~LenaUplinkSinrTestCase ()
|
||||
LteUplinkSinrTestCase::~LteUplinkSinrTestCase ()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
LenaUplinkSinrTestCase::DoRun (void)
|
||||
LteUplinkSinrTestCase::DoRun (void)
|
||||
{
|
||||
LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_ALL);
|
||||
|
||||
@@ -167,7 +167,7 @@ LenaUplinkSinrTestCase::DoRun (void)
|
||||
|
||||
ulPhy->SetCellId (100);
|
||||
|
||||
Ptr<LenaTestSinrChunkProcessor> chunkProcessor = Create<LenaTestSinrChunkProcessor> (uePhy->GetObject<LtePhy> ());
|
||||
Ptr<LteTestSinrChunkProcessor> chunkProcessor = Create<LteTestSinrChunkProcessor> (uePhy->GetObject<LtePhy> ());
|
||||
ulPhy->AddSinrChunkProcessor (chunkProcessor);
|
||||
|
||||
/**
|
||||
@@ -18,8 +18,8 @@
|
||||
* Author: Manuel Requena <manuel.requena@cttc.es>
|
||||
*/
|
||||
|
||||
#ifndef LENA_TEST_UPLINK_SINR_H
|
||||
#define LENA_TEST_UPLINK_SINR_H
|
||||
#ifndef LTE_TEST_UPLINK_SINR_H
|
||||
#define LTE_TEST_UPLINK_SINR_H
|
||||
|
||||
#include "ns3/spectrum-value.h"
|
||||
|
||||
@@ -32,18 +32,18 @@ using namespace ns3;
|
||||
/**
|
||||
* Test 1.2 SINR calculation in uplink
|
||||
*/
|
||||
class LenaUplinkSinrTestSuite : public TestSuite
|
||||
class LteUplinkSinrTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
LenaUplinkSinrTestSuite ();
|
||||
LteUplinkSinrTestSuite ();
|
||||
};
|
||||
|
||||
|
||||
class LenaUplinkSinrTestCase : public TestCase
|
||||
class LteUplinkSinrTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
LenaUplinkSinrTestCase (Ptr<SpectrumValue> sv1, Ptr<SpectrumValue> sv2, Ptr<SpectrumValue> sinr, std::string name);
|
||||
virtual ~LenaUplinkSinrTestCase ();
|
||||
LteUplinkSinrTestCase (Ptr<SpectrumValue> sv1, Ptr<SpectrumValue> sv2, Ptr<SpectrumValue> sinr, std::string name);
|
||||
virtual ~LteUplinkSinrTestCase ();
|
||||
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
@@ -55,4 +55,4 @@ class LenaUplinkSinrTestCase : public TestCase
|
||||
};
|
||||
|
||||
|
||||
#endif /* LENA_TEST_UPLINK_SINR_H */
|
||||
#endif /* LTE_TEST_UPLINK_SINR_H */
|
||||
@@ -46,9 +46,9 @@ def build(bld):
|
||||
'model/lte-interference.cc',
|
||||
'model/lte-sinr-chunk-processor.cc',
|
||||
'model/pf-ff-mac-scheduler.cc',
|
||||
'test/lena-test-downlink-sinr.cc',
|
||||
'test/lena-test-uplink-sinr.cc',
|
||||
'test/lena-test-sinr-chunk-processor.cc',
|
||||
'test/lte-test-downlink-sinr.cc',
|
||||
'test/lte-test-uplink-sinr.cc',
|
||||
'test/lte-test-sinr-chunk-processor.cc',
|
||||
'test/lte-test-rr-ff-mac-scheduler.cc',
|
||||
'test/lte-test-pf-ff-mac-scheduler.cc',
|
||||
'test/lte-test-earfcn.cc',
|
||||
@@ -100,9 +100,9 @@ def build(bld):
|
||||
'model/lte-interference.h',
|
||||
'model/lte-sinr-chunk-processor.h',
|
||||
'model/pf-ff-mac-scheduler.h',
|
||||
'test/lena-test-downlink-sinr.h',
|
||||
'test/lena-test-uplink-sinr.h',
|
||||
'test/lena-test-sinr-chunk-processor.h',
|
||||
'test/lte-test-downlink-sinr.h',
|
||||
'test/lte-test-uplink-sinr.h',
|
||||
'test/lte-test-sinr-chunk-processor.h',
|
||||
'test/lte-test-rr-ff-mac-scheduler.h',
|
||||
'test/lte-test-pf-ff-mac-scheduler.h',
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user