Update documentation for NIST and YANS validation examples; include those examples in the test suite
This commit is contained in:
3
examples/wireless/examples-to-run.py
Normal file → Executable file
3
examples/wireless/examples-to-run.py
Normal file → Executable file
@@ -27,6 +27,9 @@ cpp_examples = [
|
||||
("wifi-wired-bridging", "True", "True"),
|
||||
("power-adaptation-distance --manager=ns3::ParfWifiManager --outputFileName=parf --steps=5 --stepsSize=10", "True", "True"),
|
||||
("power-adaptation-distance --manager=ns3::AparfWifiManager --outputFileName=aparf --steps=5 --stepsSize=10", "True", "True"),
|
||||
("ofdm-ht-validation", "True", "True"),
|
||||
("ofdm-validation", "True", "True"),
|
||||
("ofdm-vht-validation", "True", "True"),
|
||||
]
|
||||
|
||||
# A list of Python examples to run in order to ensure that they remain
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
*
|
||||
* Authors: Sébastien Deronne <sebastien.deronne@gmail.com>
|
||||
*/
|
||||
|
||||
// This example is used to validate NIST and YANS error rate models for HT rates.
|
||||
//
|
||||
// It ouputs plots of the Frame Success Rate versus the Signal-to-noise ratio for
|
||||
// both NIST and YANS error rate models and for every HT MCS value.
|
||||
|
||||
#include "ns3/core-module.h"
|
||||
#include "ns3/yans-error-rate-model.h"
|
||||
#include "ns3/nist-error-rate-model.h"
|
||||
@@ -65,7 +71,17 @@ int main (int argc, char *argv[])
|
||||
{
|
||||
double ps = yans->GetChunkSuccessRate (WifiMode (modes[i]), txVector, std::pow (10.0,snr / 10.0), FrameSize * 8);
|
||||
yansdataset.Add (snr, ps);
|
||||
if (ps < 0 || ps > 1)
|
||||
{
|
||||
//error
|
||||
return 0;
|
||||
}
|
||||
ps = nist->GetChunkSuccessRate (WifiMode (modes[i]), txVector, std::pow (10.0,snr / 10.0), FrameSize * 8);
|
||||
if (ps < 0 || ps > 1)
|
||||
{
|
||||
//error
|
||||
return 0;
|
||||
}
|
||||
nistdataset.Add (snr, ps);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
*
|
||||
* Author: Gary Pei <guangyu.pei@boeing.com>
|
||||
*/
|
||||
|
||||
// This example is used to validate NIST and YANS error rate models for OFDM rates.
|
||||
//
|
||||
// It ouputs plots of the Frame Success Rate versus the Signal-to-noise ratio for
|
||||
// both NIST and YANS error rate models and for every OFDM mode.
|
||||
|
||||
#include "ns3/core-module.h"
|
||||
#include "ns3/yans-error-rate-model.h"
|
||||
#include "ns3/nist-error-rate-model.h"
|
||||
@@ -66,7 +72,17 @@ int main (int argc, char *argv[])
|
||||
{
|
||||
double ps = yans->GetChunkSuccessRate (WifiMode (modes[i]), txVector, std::pow (10.0,snr / 10.0), FrameSize * 8);
|
||||
yansdataset.Add (snr, ps);
|
||||
if (ps < 0 || ps > 1)
|
||||
{
|
||||
//error
|
||||
return 0;
|
||||
}
|
||||
ps = nist->GetChunkSuccessRate (WifiMode (modes[i]), txVector, std::pow (10.0,snr / 10.0), FrameSize * 8);
|
||||
if (ps < 0 || ps > 1)
|
||||
{
|
||||
//error
|
||||
return 0;
|
||||
}
|
||||
nistdataset.Add (snr, ps);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,13 @@
|
||||
*
|
||||
* Authors: Sébastien Deronne <sebastien.deronne@gmail.com>
|
||||
*/
|
||||
|
||||
// This example is used to validate NIST and YANS error rate models for VHT rates.
|
||||
//
|
||||
// It ouputs plots of the Frame Success Rate versus the Signal-to-noise ratio for
|
||||
// both NIST and YANS error rate models and for every VHT MCS value (MCS 9 is not
|
||||
// included since it is forbidden for 20 MHz channels).
|
||||
|
||||
#include "ns3/core-module.h"
|
||||
#include "ns3/yans-error-rate-model.h"
|
||||
#include "ns3/nist-error-rate-model.h"
|
||||
@@ -64,8 +71,18 @@ int main (int argc, char *argv[])
|
||||
for (double snr = -5.0; snr <= 30.0; snr += 0.1)
|
||||
{
|
||||
double ps = yans->GetChunkSuccessRate (WifiMode (modes[i]), txVector, std::pow (10.0,snr / 10.0), FrameSize * 8);
|
||||
if (ps < 0 || ps > 1)
|
||||
{
|
||||
//error
|
||||
return 0;
|
||||
}
|
||||
yansdataset.Add (snr, ps);
|
||||
ps = nist->GetChunkSuccessRate (WifiMode (modes[i]), txVector, std::pow (10.0,snr / 10.0), FrameSize * 8);
|
||||
if (ps < 0 || ps > 1)
|
||||
{
|
||||
//error
|
||||
return 0;
|
||||
}
|
||||
nistdataset.Add (snr, ps);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user