diff --git a/CHANGES.html b/CHANGES.html
index b0674169d..3e56e1b06 100644
--- a/CHANGES.html
+++ b/CHANGES.html
@@ -64,6 +64,7 @@ us a note on ns-developers mailing list.
Added a new trace source EndOfHePreamble in WifiPhy for tracing end of preamble (after training fields) for received 802.11ax packets.
Added a new helper method to SpectrumWifiPhyHelper and YansWifiPhyHelper to set the frame capture model.
Added a new helper method to SpectrumWifiPhyHelper and YansWifiPhyHelper to set the preamble detection model.
+Added a new helper method to WifiPhyHelper to disable the preamble detection model.
Added a method to ObjectFactory to check whether a TypeId has been configured on the factory.
Added a new helper method to WifiHelper to set the 802.11ax OBSS PD spatial reuse algorithm.
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 2f15e6add..cafbae5b7 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -23,7 +23,7 @@ requirements (Note: not all features available on all platforms):
New user-visible features
-------------------------
-- (wifi) Preamble detection can now be modelled.
+- (wifi) Preamble detection can now be modelled and is enabled by default.
- (wifi) 802.11ax spatial reuse is now supported.
- (lte) Radio Link Failure (RLF) functionality is now supported.
diff --git a/examples/wireless/examples-to-run.py b/examples/wireless/examples-to-run.py
index ab124ffc5..0f9252bf8 100755
--- a/examples/wireless/examples-to-run.py
+++ b/examples/wireless/examples-to-run.py
@@ -49,7 +49,7 @@ cpp_examples = [
("he-wifi-network --simulationTime=0.25 --frequency=2.4 --useRts=0 --minExpectedThroughput=6 --maxExpectedThroughput=238", "True", "True"),
("he-wifi-network --simulationTime=4 --frequency=2.4 --useRts=1 --minExpectedThroughput=6 --maxExpectedThroughput=224", "True", "True"),
("simple-ht-hidden-stations --simulationTime=1.5 --enableRts=0 --nMpdus=32 --minExpectedThroughput=59 --maxExpectedThroughput=60", "True", "True"),
- ("simple-ht-hidden-stations --simulationTime=1 --enableRts=1 --nMpdus=32 --minExpectedThroughput=57 --maxExpectedThroughput=58", "True", "True"),
+ ("simple-ht-hidden-stations --simulationTime=1 --enableRts=1 --nMpdus=32 --minExpectedThroughput=56 --maxExpectedThroughput=57", "True", "True"),
("mixed-network --simulationTime=1", "True", "True"),
("wifi-aggregation --simulationTime=1 --verifyResults=1", "True", "True"),
("wifi-txop-aggregation --simulationTime=1 --verifyResults=1", "True", "True"),
diff --git a/src/aodv/test/aodv-chain-regression-test-0-0.pcap b/src/aodv/test/aodv-chain-regression-test-0-0.pcap
index ebab66de7..dd4d381ab 100644
Binary files a/src/aodv/test/aodv-chain-regression-test-0-0.pcap and b/src/aodv/test/aodv-chain-regression-test-0-0.pcap differ
diff --git a/src/aodv/test/aodv-chain-regression-test-1-0.pcap b/src/aodv/test/aodv-chain-regression-test-1-0.pcap
index e6d4a2f60..a8486eca8 100644
Binary files a/src/aodv/test/aodv-chain-regression-test-1-0.pcap and b/src/aodv/test/aodv-chain-regression-test-1-0.pcap differ
diff --git a/src/aodv/test/aodv-chain-regression-test-2-0.pcap b/src/aodv/test/aodv-chain-regression-test-2-0.pcap
index 047a42c94..aa61bb29d 100644
Binary files a/src/aodv/test/aodv-chain-regression-test-2-0.pcap and b/src/aodv/test/aodv-chain-regression-test-2-0.pcap differ
diff --git a/src/aodv/test/aodv-chain-regression-test-3-0.pcap b/src/aodv/test/aodv-chain-regression-test-3-0.pcap
index c7bbf4bd3..30c4ea28a 100644
Binary files a/src/aodv/test/aodv-chain-regression-test-3-0.pcap and b/src/aodv/test/aodv-chain-regression-test-3-0.pcap differ
diff --git a/src/aodv/test/aodv-chain-regression-test-4-0.pcap b/src/aodv/test/aodv-chain-regression-test-4-0.pcap
index d7e988f42..ab9bb4adf 100644
Binary files a/src/aodv/test/aodv-chain-regression-test-4-0.pcap and b/src/aodv/test/aodv-chain-regression-test-4-0.pcap differ
diff --git a/src/aodv/test/bug-606-test-0-0.pcap b/src/aodv/test/bug-606-test-0-0.pcap
index d0b840239..f3b305fbf 100644
Binary files a/src/aodv/test/bug-606-test-0-0.pcap and b/src/aodv/test/bug-606-test-0-0.pcap differ
diff --git a/src/aodv/test/bug-606-test-1-0.pcap b/src/aodv/test/bug-606-test-1-0.pcap
index c6d1c7705..60a46e02e 100644
Binary files a/src/aodv/test/bug-606-test-1-0.pcap and b/src/aodv/test/bug-606-test-1-0.pcap differ
diff --git a/src/aodv/test/bug-606-test-2-0.pcap b/src/aodv/test/bug-606-test-2-0.pcap
index 14f23022c..855705acf 100644
Binary files a/src/aodv/test/bug-606-test-2-0.pcap and b/src/aodv/test/bug-606-test-2-0.pcap differ
diff --git a/src/aodv/test/bug-772.cc b/src/aodv/test/bug-772.cc
index ec889377e..6768ce98a 100644
--- a/src/aodv/test/bug-772.cc
+++ b/src/aodv/test/bug-772.cc
@@ -127,6 +127,7 @@ Bug772ChainTest::CreateDevices ()
WifiMacHelper wifiMac;
wifiMac.SetType ("ns3::AdhocWifiMac");
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
+ wifiPhy.DisablePreambleDetectionModel ();
// This test suite output was originally based on YansErrorRateModel
wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel");
YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
diff --git a/src/mesh/test/dot11s/hwmp-proactive-regression-test-0-1.pcap b/src/mesh/test/dot11s/hwmp-proactive-regression-test-0-1.pcap
index ef403bf98..4177b5e96 100644
Binary files a/src/mesh/test/dot11s/hwmp-proactive-regression-test-0-1.pcap and b/src/mesh/test/dot11s/hwmp-proactive-regression-test-0-1.pcap differ
diff --git a/src/mesh/test/dot11s/hwmp-proactive-regression-test-1-1.pcap b/src/mesh/test/dot11s/hwmp-proactive-regression-test-1-1.pcap
index 3fd6ef133..9727e56b4 100644
Binary files a/src/mesh/test/dot11s/hwmp-proactive-regression-test-1-1.pcap and b/src/mesh/test/dot11s/hwmp-proactive-regression-test-1-1.pcap differ
diff --git a/src/mesh/test/dot11s/hwmp-proactive-regression-test-2-1.pcap b/src/mesh/test/dot11s/hwmp-proactive-regression-test-2-1.pcap
index 394304415..321308af8 100644
Binary files a/src/mesh/test/dot11s/hwmp-proactive-regression-test-2-1.pcap and b/src/mesh/test/dot11s/hwmp-proactive-regression-test-2-1.pcap differ
diff --git a/src/mesh/test/dot11s/hwmp-proactive-regression-test-3-1.pcap b/src/mesh/test/dot11s/hwmp-proactive-regression-test-3-1.pcap
index dfeeefc3f..dcb7d561b 100644
Binary files a/src/mesh/test/dot11s/hwmp-proactive-regression-test-3-1.pcap and b/src/mesh/test/dot11s/hwmp-proactive-regression-test-3-1.pcap differ
diff --git a/src/mesh/test/dot11s/hwmp-proactive-regression-test-4-1.pcap b/src/mesh/test/dot11s/hwmp-proactive-regression-test-4-1.pcap
index 347ba6816..6d1badc34 100644
Binary files a/src/mesh/test/dot11s/hwmp-proactive-regression-test-4-1.pcap and b/src/mesh/test/dot11s/hwmp-proactive-regression-test-4-1.pcap differ
diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression-test-0-1.pcap b/src/mesh/test/dot11s/hwmp-reactive-regression-test-0-1.pcap
index f9971c427..9140b832c 100644
Binary files a/src/mesh/test/dot11s/hwmp-reactive-regression-test-0-1.pcap and b/src/mesh/test/dot11s/hwmp-reactive-regression-test-0-1.pcap differ
diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression-test-1-1.pcap b/src/mesh/test/dot11s/hwmp-reactive-regression-test-1-1.pcap
index cc829a324..9f37af638 100644
Binary files a/src/mesh/test/dot11s/hwmp-reactive-regression-test-1-1.pcap and b/src/mesh/test/dot11s/hwmp-reactive-regression-test-1-1.pcap differ
diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression-test-2-1.pcap b/src/mesh/test/dot11s/hwmp-reactive-regression-test-2-1.pcap
index 6111dabd7..0ee9a588d 100644
Binary files a/src/mesh/test/dot11s/hwmp-reactive-regression-test-2-1.pcap and b/src/mesh/test/dot11s/hwmp-reactive-regression-test-2-1.pcap differ
diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression-test-3-1.pcap b/src/mesh/test/dot11s/hwmp-reactive-regression-test-3-1.pcap
index c4a116a8e..0b7a95027 100644
Binary files a/src/mesh/test/dot11s/hwmp-reactive-regression-test-3-1.pcap and b/src/mesh/test/dot11s/hwmp-reactive-regression-test-3-1.pcap differ
diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression-test-4-1.pcap b/src/mesh/test/dot11s/hwmp-reactive-regression-test-4-1.pcap
index b364dfeda..23258feee 100644
Binary files a/src/mesh/test/dot11s/hwmp-reactive-regression-test-4-1.pcap and b/src/mesh/test/dot11s/hwmp-reactive-regression-test-4-1.pcap differ
diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression-test-5-1.pcap b/src/mesh/test/dot11s/hwmp-reactive-regression-test-5-1.pcap
index 0c6c72f44..a06a13dd5 100644
Binary files a/src/mesh/test/dot11s/hwmp-reactive-regression-test-5-1.pcap and b/src/mesh/test/dot11s/hwmp-reactive-regression-test-5-1.pcap differ
diff --git a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-0-1.pcap b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-0-1.pcap
index a48ddbcc2..a3900b418 100644
Binary files a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-0-1.pcap and b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-0-1.pcap differ
diff --git a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-1-1.pcap b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-1-1.pcap
index fe3ca5a18..105dc09f0 100644
Binary files a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-1-1.pcap and b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-1-1.pcap differ
diff --git a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-2-1.pcap b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-2-1.pcap
index 4f52374cf..62ba0e7d4 100644
Binary files a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-2-1.pcap and b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-2-1.pcap differ
diff --git a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-3-1.pcap b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-3-1.pcap
index 5ea84e128..aceb5816a 100644
Binary files a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-3-1.pcap and b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-3-1.pcap differ
diff --git a/src/mesh/test/flame/flame-regression-test-1-1.pcap b/src/mesh/test/flame/flame-regression-test-1-1.pcap
index 37169e367..4d23035c5 100644
Binary files a/src/mesh/test/flame/flame-regression-test-1-1.pcap and b/src/mesh/test/flame/flame-regression-test-1-1.pcap differ
diff --git a/src/wifi/helper/spectrum-wifi-helper.cc b/src/wifi/helper/spectrum-wifi-helper.cc
index 3499b5d86..62d96bcea 100644
--- a/src/wifi/helper/spectrum-wifi-helper.cc
+++ b/src/wifi/helper/spectrum-wifi-helper.cc
@@ -66,12 +66,12 @@ SpectrumWifiPhyHelper::Create (Ptr node, Ptr device) const
phy->CreateWifiSpectrumPhyInterface (device);
Ptr error = m_errorRateModel.Create ();
phy->SetErrorRateModel (error);
- if (m_frameCaptureModel.GetTypeId ().GetUid ())
+ if (m_frameCaptureModel.IsTypeIdSet ())
{
Ptr capture = m_frameCaptureModel.Create ();
phy->SetFrameCaptureModel (capture);
}
- if (m_preambleDetectionModel.GetTypeId ().GetUid ())
+ if (m_preambleDetectionModel.IsTypeIdSet ())
{
Ptr capture = m_preambleDetectionModel.Create ();
phy->SetPreambleDetectionModel (capture);
diff --git a/src/wifi/helper/wifi-helper.cc b/src/wifi/helper/wifi-helper.cc
index 95478fb9c..9127e88b8 100644
--- a/src/wifi/helper/wifi-helper.cc
+++ b/src/wifi/helper/wifi-helper.cc
@@ -131,6 +131,7 @@ AsciiPhyReceiveSinkWithoutContext (
WifiPhyHelper::WifiPhyHelper ()
: m_pcapDlt (PcapHelper::DLT_IEEE802_11)
{
+ SetPreambleDetectionModel ("ns3::ThresholdPreambleDetectionModel");
}
WifiPhyHelper::~WifiPhyHelper ()
@@ -212,6 +213,12 @@ WifiPhyHelper::SetPreambleDetectionModel (std::string name,
m_preambleDetectionModel.Set (n7, v7);
}
+void
+WifiPhyHelper::DisablePreambleDetectionModel ()
+{
+ m_preambleDetectionModel.SetTypeId (TypeId ());
+}
+
void
WifiPhyHelper::PcapSniffTxEvent (
Ptr file,
diff --git a/src/wifi/helper/wifi-helper.h b/src/wifi/helper/wifi-helper.h
index b849565e3..0342a8d8f 100644
--- a/src/wifi/helper/wifi-helper.h
+++ b/src/wifi/helper/wifi-helper.h
@@ -161,6 +161,11 @@ public:
std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (),
std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ());
+ /**
+ * Disable the preamble detection model.
+ */
+ void DisablePreambleDetectionModel ();
+
/**
* An enumeration of the pcap data link types (DLTs) which this helper
* supports. See http://wiki.wireshark.org/Development/LibpcapFileFormat
diff --git a/src/wifi/helper/yans-wifi-helper.cc b/src/wifi/helper/yans-wifi-helper.cc
index bb4ae1767..afe3ee6e6 100644
--- a/src/wifi/helper/yans-wifi-helper.cc
+++ b/src/wifi/helper/yans-wifi-helper.cc
@@ -156,12 +156,12 @@ YansWifiPhyHelper::Create (Ptr node, Ptr device) const
Ptr phy = m_phy.Create ();
Ptr error = m_errorRateModel.Create ();
phy->SetErrorRateModel (error);
- if (m_frameCaptureModel.GetTypeId ().GetUid ())
+ if (m_frameCaptureModel.IsTypeIdSet ())
{
Ptr capture = m_frameCaptureModel.Create ();
phy->SetFrameCaptureModel (capture);
}
- if (m_preambleDetectionModel.GetTypeId ().GetUid ())
+ if (m_preambleDetectionModel.IsTypeIdSet ())
{
Ptr capture = m_preambleDetectionModel.Create ();
phy->SetPreambleDetectionModel (capture);
diff --git a/src/wifi/test/inter-bss-test-suite.cc b/src/wifi/test/inter-bss-test-suite.cc
index d9a3bb5f7..658135bce 100644
--- a/src/wifi/test/inter-bss-test-suite.cc
+++ b/src/wifi/test/inter-bss-test-suite.cc
@@ -416,6 +416,7 @@ TestInterBssConstantObssPdAlgo::RunOne (void)
lossModel->SetDefaultLoss (m_txPowerDbm - m_obssRxPowerDbm); //Force received RSSI to be equal to m_obssRxPowerDbm
SpectrumWifiPhyHelper phy = SpectrumWifiPhyHelper::Default ();
+ phy.DisablePreambleDetectionModel ();
Ptr channel = CreateObject ();
channel->SetPropagationDelayModel (CreateObject ());
channel->AddPropagationLossModel (lossModel);