23 #include <ns3/tv-spectrum-transmitter-helper.h>
61 virtual void DoRun (
void);
67 static std::string
Name (uint32_t maxNumTransmitters);
74 std::ostringstream oss;
75 oss <<
"Max Number of Transmitters = " << maxNumTransmitters;
81 m_maxNumTransmitters (maxNumTransmitters)
99 for (
int i = 0; i < 30; i ++)
108 for (
int i = 0; i < 30; i ++)
120 for (
int i = 0; i < 30; i ++)
146 :
TestSuite (
"tv-helper-distribution", UNIT)
148 NS_LOG_INFO (
"creating TvHelperDistributionTestSuite");
149 for (uint32_t maxNumTransmitters = 3; maxNumTransmitters <= 203; maxNumTransmitters+= 10)
This test verifies the accuracy of the private GetRandomNumTransmitters() method in the TvSpectrumT...
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual ~TvHelperDistributionTestCase()
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.