Test frequency reuse algorithm by teleporting UEs to different parts of area and checking if the frequency is used according to the frequency pattern for different parts of area. More...
#include "lte-test-frequency-reuse.h"
Public Member Functions | |
LteFrAreaTestCase (std::string name, std::string schedulerType) | |
Constructor. | |
~LteFrAreaTestCase () override | |
void | DlDataRxStart (Ptr< const SpectrumValue > spectrumValue) |
DL data receive start function. | |
void | SetDlExpectedValues (double expectedPower, std::vector< bool > expectedDlRb) |
Set DL expected values function. | |
void | SetUlExpectedValues (double expectedPower, std::vector< bool > expectedDlRb) |
Set UL expected values function. | |
void | SimpleTeleportUe (uint32_t x, uint32_t y) |
Simple teleport UE function. | |
void | TeleportUe (uint32_t x, uint32_t y, double expectedPower, std::vector< bool > expectedDlRb) |
Teleport UE function. | |
void | TeleportUe2 (Ptr< Node > ueNode, uint32_t x, uint32_t y, double expectedPower, std::vector< bool > expectedDlRb) |
Teleport UE 2 function. | |
void | UlDataRxStart (Ptr< const SpectrumValue > spectrumValue) |
UL data receive start function. | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Protected Member Functions | |
void | DoRun () override |
Implementation to actually run this TestCase. | |
Protected Member Functions inherited from ns3::TestCase | |
TestCase (std::string name) | |
Constructor. | |
void | AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK) |
Add an individual child TestCase to this test suite. | |
TestCase * | GetParent () const |
Get the parent of this TestCase. | |
bool | IsStatusFailure () const |
Check if any tests failed. | |
bool | IsStatusSuccess () const |
Check if all tests passed. | |
void | SetDataDir (std::string directory) |
Set the data directory where reference trace files can be found. | |
void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
Log the failure of this TestCase. | |
bool | MustAssertOnFailure () const |
Check if this run should assert on failure. | |
bool | MustContinueOnFailure () const |
Check if this run should continue on failure. | |
std::string | CreateDataDirFilename (std::string filename) |
Construct the full path to a file in the data directory. | |
std::string | CreateTempDirFilename (std::string filename) |
Construct the full path to a file in a temporary directory. | |
Protected Attributes | |
uint16_t | m_dlBandwidth |
the DL bandwidth | |
double | m_expectedDlPower |
the expected DL power | |
std::vector< bool > | m_expectedDlRb |
the expected DL per RB | |
double | m_expectedUlPower |
expected UL power | |
std::vector< bool > | m_expectedUlRb |
expected UL per RB | |
std::string | m_schedulerType |
the scheduler type | |
Time | m_teleportTime |
the teleport time | |
Ptr< MobilityModel > | m_ueMobility |
the UE mobility model | |
uint16_t | m_ulBandwidth |
the UL bandwidth | |
bool | m_usedWrongDlPower |
used wrong DL power? | |
bool | m_usedWrongDlRbg |
used wrong DL RBG? | |
bool | m_usedWrongUlPower |
used wrong UL power? | |
bool | m_usedWrongUlRbg |
used wrong UL RBG? | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
enum class | Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
Static Public Attributes inherited from ns3::TestCase | |
static constexpr auto | QUICK = Duration::QUICK |
Deprecated test duration simple enums. | |
static constexpr auto | EXTENSIVE = Duration::EXTENSIVE |
static constexpr auto | TAKES_FOREVER = Duration::TAKES_FOREVER |
Test frequency reuse algorithm by teleporting UEs to different parts of area and checking if the frequency is used according to the frequency pattern for different parts of area.
Test fails if the muted frequencies for a given part of area are being used by UE.
Definition at line 202 of file lte-test-frequency-reuse.h.
LteFrAreaTestCase::LteFrAreaTestCase | ( | std::string | name, |
std::string | schedulerType ) |
Constructor.
name | the reference name |
schedulerType | the scheduler type |
Definition at line 788 of file lte-test-frequency-reuse.cc.
References m_dlBandwidth, m_ulBandwidth, m_usedWrongDlRbg, and m_usedWrongUlRbg.
|
override |
Definition at line 798 of file lte-test-frequency-reuse.cc.
void LteFrAreaTestCase::DlDataRxStart | ( | Ptr< const SpectrumValue > | spectrumValue | ) |
DL data receive start function.
spectrumValue | the DL receive spectrum value |
Definition at line 803 of file lte-test-frequency-reuse.cc.
References m_dlBandwidth, m_expectedDlPower, m_expectedDlRb, m_teleportTime, m_usedWrongDlRbg, ns3::MilliSeconds(), ns3::Simulator::Now(), NS_LOG_DEBUG, and NS_TEST_ASSERT_MSG_EQ_TOL.
Referenced by DlDataRxStartNotificationArea().
|
overrideprotectedvirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Reimplemented in LteSoftFfrAreaTestCase, LteSoftFrAreaTestCase, and LteStrictFrAreaTestCase.
Definition at line 945 of file lte-test-frequency-reuse.cc.
void LteFrAreaTestCase::SetDlExpectedValues | ( | double | expectedPower, |
std::vector< bool > | expectedDlRb ) |
Set DL expected values function.
expectedPower | the expected power |
expectedDlRb | the expected DL pwr RB |
Definition at line 929 of file lte-test-frequency-reuse.cc.
References m_expectedDlPower, m_expectedDlRb, and NS_LOG_FUNCTION.
void LteFrAreaTestCase::SetUlExpectedValues | ( | double | expectedPower, |
std::vector< bool > | expectedDlRb ) |
Set UL expected values function.
expectedPower | the expected power |
expectedDlRb | the expected DL pwr RB |
Definition at line 937 of file lte-test-frequency-reuse.cc.
References m_expectedUlPower, m_expectedUlRb, and NS_LOG_FUNCTION.
Referenced by LteDistributedFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), and LteStrictFrAreaTestCase::DoRun().
Simple teleport UE function.
x | the X position |
y | the Y position |
Definition at line 889 of file lte-test-frequency-reuse.cc.
References m_teleportTime, m_ueMobility, ns3::Simulator::Now(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.
void LteFrAreaTestCase::TeleportUe | ( | uint32_t | x, |
uint32_t | y, | ||
double | expectedPower, | ||
std::vector< bool > | expectedDlRb ) |
Teleport UE function.
x | the X position |
y | the Y position |
expectedPower | the expected power |
expectedDlRb | the expected DL pwr RB |
Definition at line 898 of file lte-test-frequency-reuse.cc.
References m_expectedDlPower, m_expectedDlRb, m_teleportTime, m_ueMobility, ns3::Simulator::Now(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by LteDistributedFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), and LteStrictFrAreaTestCase::DoRun().
void LteFrAreaTestCase::TeleportUe2 | ( | Ptr< Node > | ueNode, |
uint32_t | x, | ||
uint32_t | y, | ||
double | expectedPower, | ||
std::vector< bool > | expectedDlRb ) |
Teleport UE 2 function.
ueNode | the UE node |
x | the X position |
y | the Y position |
expectedPower | the expected power |
expectedDlRb | the expected DL pwr RB |
Definition at line 912 of file lte-test-frequency-reuse.cc.
References m_expectedDlPower, m_expectedDlRb, m_teleportTime, ns3::Simulator::Now(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by LteDistributedFfrAreaTestCase::DoRun().
void LteFrAreaTestCase::UlDataRxStart | ( | Ptr< const SpectrumValue > | spectrumValue | ) |
UL data receive start function.
spectrumValue | the UL receive spectrum value |
Definition at line 838 of file lte-test-frequency-reuse.cc.
References m_expectedUlPower, m_expectedUlRb, m_teleportTime, m_usedWrongUlRbg, ns3::MilliSeconds(), ns3::Simulator::Now(), NS_LOG_DEBUG, NS_TEST_ASSERT_MSG_EQ_TOL, and ns3::Time::S.
Referenced by UlDataRxStartNotificationArea().
|
protected |
the DL bandwidth
Definition at line 271 of file lte-test-frequency-reuse.h.
Referenced by LteFrAreaTestCase(), DlDataRxStart(), LteDistributedFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), and LteStrictFrAreaTestCase::DoRun().
|
protected |
the expected DL power
Definition at line 277 of file lte-test-frequency-reuse.h.
Referenced by DlDataRxStart(), SetDlExpectedValues(), TeleportUe(), and TeleportUe2().
|
protected |
the expected DL per RB
Definition at line 278 of file lte-test-frequency-reuse.h.
Referenced by DlDataRxStart(), SetDlExpectedValues(), TeleportUe(), and TeleportUe2().
|
protected |
expected UL power
Definition at line 282 of file lte-test-frequency-reuse.h.
Referenced by SetUlExpectedValues(), and UlDataRxStart().
|
protected |
expected UL per RB
Definition at line 283 of file lte-test-frequency-reuse.h.
Referenced by SetUlExpectedValues(), and UlDataRxStart().
|
protected |
the scheduler type
Definition at line 269 of file lte-test-frequency-reuse.h.
Referenced by LteDistributedFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), and LteStrictFrAreaTestCase::DoRun().
|
protected |
the teleport time
Definition at line 274 of file lte-test-frequency-reuse.h.
Referenced by DlDataRxStart(), SimpleTeleportUe(), TeleportUe(), TeleportUe2(), and UlDataRxStart().
|
protected |
the UE mobility model
Definition at line 275 of file lte-test-frequency-reuse.h.
Referenced by LteDistributedFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), LteStrictFrAreaTestCase::DoRun(), SimpleTeleportUe(), and TeleportUe().
|
protected |
the UL bandwidth
Definition at line 272 of file lte-test-frequency-reuse.h.
Referenced by LteFrAreaTestCase(), LteDistributedFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), and LteStrictFrAreaTestCase::DoRun().
|
protected |
used wrong DL power?
Definition at line 280 of file lte-test-frequency-reuse.h.
|
protected |
used wrong DL RBG?
Definition at line 279 of file lte-test-frequency-reuse.h.
Referenced by LteFrAreaTestCase(), DlDataRxStart(), LteDistributedFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), and LteStrictFrAreaTestCase::DoRun().
|
protected |
used wrong UL power?
Definition at line 285 of file lte-test-frequency-reuse.h.
|
protected |
used wrong UL RBG?
Definition at line 284 of file lte-test-frequency-reuse.h.
Referenced by LteFrAreaTestCase(), LteDistributedFfrAreaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), LteStrictFrAreaTestCase::DoRun(), and UlDataRxStart().