23 #include "ns3/nist-error-rate-model.h" 24 #include "ns3/dsss-error-rate-model.h" 25 #include "ns3/wifi-tx-vector.h" 34 double noisePowerDbw = -100.5522786 + 7;
36 double sinrDb = rssDbw - noisePowerDbw;
38 return pow (10.0, sinrDb / 10.0);
54 virtual void DoRun (
void);
58 :
TestCase (
"WifiErrorRateModel test case DSSS")
71 uint64_t size = (1024 + 40 + 14) * 8;
76 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-105.0), size);
78 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-100.0), size);
80 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-99.0), size);
82 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-98.0), size);
84 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-97.0), size);
86 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-96.0), size);
88 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-95.0), size);
90 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-90.0), size);
95 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-96.0), size);
97 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-95.0), size);
99 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-94.0), size);
101 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-93.0), size);
103 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-92.0), size);
105 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-91.0), size);
107 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-90.0), size);
109 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-89.0), size);
114 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-94.0), size);
116 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-93.0), size);
118 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-92.0), size);
120 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-91.0), size);
122 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-90.0), size);
124 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-89.0), size);
126 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-88.0), size);
128 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-87.0), size);
132 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-91.0), size);
134 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-90.0), size);
136 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-89.0), size);
138 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-88.0), size);
140 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-87.0), size);
142 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-86.0), size);
144 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-85.0), size);
146 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-84.0), size);
164 virtual void DoRun (
void);
168 :
TestCase (
"WifiErrorRateModel test case NIST")
180 uint32_t FrameSize = 2000;
307 :
TestSuite (
"wifi-error-rate-models", UNIT)
Smart pointer class similar to boost::intrusive_ptr.
WifiErrorRateModelsTestCaseNist()
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
static WifiErrorRateModelsTestSuite wifiErrorRateModelsTestSuite
the test suite
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual void DoRun(void)
Implementation to actually run this TestCase.
double FromRss(double rssDbw)
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
virtual ~WifiErrorRateModelsTestCaseNist()
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
virtual ~WifiErrorRateModelsTestCaseDsss()
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Wifi Error Rate Models Test Case Nist.
WifiErrorRateModelsTestCaseDsss()
double GetChunkSuccessRate(WifiMode mode, WifiTxVector txVector, double snr, uint64_t nbits) const
A pure virtual method that must be implemented in the subclass.
WifiErrorRateModelsTestSuite()
Wifi Error Rate Models Test Suite.
Wifi Error Rate Models Test Case Dsss.