23 #include "ns3/dsss-error-rate-model.h"
24 #include "ns3/yans-error-rate-model.h"
25 #include "ns3/nist-error-rate-model.h"
34 double noisePowerDbw = -100.5522786 + 7;
36 double sinrDb = rssDbw - noisePowerDbw;
38 return pow (10.0, sinrDb / 10.0);
48 virtual void DoRun (
void);
52 :
TestCase (
"WifiErrorRateModel test case DSSS")
65 uint32_t size = (1024 + 40 + 14) * 8;
70 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-105.0), size);
72 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-100.0), size);
74 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-99.0), size);
76 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-98.0), size);
78 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-97.0), size);
80 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-96.0), size);
82 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-95.0), size);
84 value = DsssErrorRateModel::GetDsssDbpskSuccessRate (
FromRss (-90.0), size);
89 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-96.0), size);
91 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-95.0), size);
93 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-94.0), size);
95 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-93.0), size);
97 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-92.0), size);
99 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-91.0), size);
101 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-90.0), size);
103 value = DsssErrorRateModel::GetDsssDqpskSuccessRate (
FromRss (-89.0), size);
108 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-94.0), size);
110 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-93.0), size);
112 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-92.0), size);
114 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-91.0), size);
116 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-90.0), size);
118 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-89.0), size);
120 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-88.0), size);
122 value = DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (
FromRss (-87.0), size);
126 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-91.0), size);
128 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-90.0), size);
130 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-89.0), size);
132 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-88.0), size);
134 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-87.0), size);
136 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-86.0), size);
138 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-85.0), size);
140 value = DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (
FromRss (-84.0), size);
152 virtual void DoRun (
void);
156 :
TestCase (
"WifiErrorRateModel test case NIST")
168 uint32_t FrameSize = 2000;
289 :
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
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, enum TestDuration duration)
Add an individual child TestCase to this test suite.
virtual double GetChunkSuccessRate(WifiMode mode, WifiTxVector txVector, double snr, uint32_t nbits) const
A pure virtual method that must be implemented in the subclass.
#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()
WifiErrorRateModelsTestCaseDsss()
WifiErrorRateModelsTestSuite()