22 #include <ns3/tv-spectrum-transmitter-helper.h>
60 void DoRun()
override;
66 static std::string
Name(uint32_t maxNumTransmitters);
73 std::ostringstream oss;
74 oss <<
"Max Number of Transmitters = " << maxNumTransmitters;
80 m_maxNumTransmitters(maxNumTransmitters)
98 for (
int i = 0; i < 30; i++)
108 for (
int i = 0; i < 30; i++)
121 for (
int i = 0; i < 30; i++)
147 :
TestSuite(
"tv-helper-distribution", UNIT)
149 NS_LOG_INFO(
"creating TvHelperDistributionTestSuite");
150 for (uint32_t maxNumTransmitters = 3; maxNumTransmitters <= 203; maxNumTransmitters += 10)
This test verifies the accuracy of the private GetRandomNumTransmitters() method in the TvSpectrumTra...
~TvHelperDistributionTestCase() override
void DoRun() override
Implementation to actually run this TestCase.
TvHelperDistributionTestCase(uint32_t maxNumTransmitters)
Constructor.
static std::string Name(uint32_t maxNumTransmitters)
Build the test name.
uint32_t m_maxNumTransmitters
Maximum number of transmitters.
Test suite for the TvSpectrumTransmitterHelper class.
TvHelperDistributionTestSuite()
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Helper class which uses TvSpectrumTransmitter class to create customizable TV transmitter(s) that tra...
int GetRandomNumTransmitters(Density density, uint32_t numChannels)
Randomly generates the number of TV transmitters to be created based on given density and number of p...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_TEST_ASSERT_MSG_LT(actual, limit, msg)
Test that an actual value is less than a limit and report and abort if not.
#define NS_TEST_ASSERT_MSG_GT(actual, limit, msg)
Test that an actual value is greater than a limit and report and abort if not.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static std::string Name(std::string str, uint32_t totalStreamSize, uint32_t sourceWriteSize, uint32_t serverReadSize, uint32_t serverWriteSize, uint32_t sourceReadSize, bool useIpv6)
static TvHelperDistributionTestSuite g_TvHelperDistributionTestSuite
Static variable for test initialization.