From 549a162b4b4a108fbf5cdcc905f0d927262bfe98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Wed, 2 Jan 2019 10:48:50 +0100 Subject: [PATCH] wifi: Set default attributes for wifi-phy-reception tests --- src/wifi/test/wifi-phy-reception-test.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/wifi/test/wifi-phy-reception-test.cc b/src/wifi/test/wifi-phy-reception-test.cc index 33a91bb51..cc861d2e8 100644 --- a/src/wifi/test/wifi-phy-reception-test.cc +++ b/src/wifi/test/wifi-phy-reception-test.cc @@ -20,6 +20,7 @@ #include "ns3/log.h" #include "ns3/test.h" +#include "ns3/double.h" #include "ns3/pointer.h" #include "ns3/rng-seed-manager.h" #include "ns3/spectrum-wifi-helper.h" @@ -182,6 +183,7 @@ TestThresholdPreambleDetectionWithoutFrameCapture::DoSetup (void) m_phy->SetReceiveErrorCallback (MakeCallback (&TestThresholdPreambleDetectionWithoutFrameCapture::RxFailure, this)); Ptr preambleDetectionModel = CreateObject (); + preambleDetectionModel->SetAttribute ("Threshold", DoubleValue (2)); m_phy->SetPreambleDetectionModel (preambleDetectionModel); } @@ -380,9 +382,12 @@ TestThresholdPreambleDetectionWithFrameCapture::DoSetup (void) m_phy->SetReceiveErrorCallback (MakeCallback (&TestThresholdPreambleDetectionWithFrameCapture::RxFailure, this)); Ptr preambleDetectionModel = CreateObject (); + preambleDetectionModel->SetAttribute ("Threshold", DoubleValue (2)); m_phy->SetPreambleDetectionModel (preambleDetectionModel); Ptr frameCaptureModel = CreateObject (); + frameCaptureModel->SetAttribute ("Margin", DoubleValue (5)); + frameCaptureModel->SetAttribute ("CaptureWindow", TimeValue (MicroSeconds (16))); m_phy->SetFrameCaptureModel (frameCaptureModel); } @@ -615,9 +620,12 @@ TestSimpleFrameCaptureModel::DoSetup (void) m_phy->TraceConnectWithoutContext ("PhyRxDrop", MakeCallback (&TestSimpleFrameCaptureModel::RxDropped, this)); Ptr preambleDetectionModel = CreateObject (); + preambleDetectionModel->SetAttribute ("Threshold", DoubleValue (2)); m_phy->SetPreambleDetectionModel (preambleDetectionModel); Ptr frameCaptureModel = CreateObject (); + frameCaptureModel->SetAttribute ("Margin", DoubleValue (5)); + frameCaptureModel->SetAttribute ("CaptureWindow", TimeValue (MicroSeconds (16))); m_phy->SetFrameCaptureModel (frameCaptureModel); } @@ -988,9 +996,12 @@ TestAmpduReception::DoSetup (void) m_phy->TraceConnectWithoutContext ("PhyRxDrop", MakeCallback (&TestAmpduReception::RxDropped, this)); Ptr preambleDetectionModel = CreateObject (); + preambleDetectionModel->SetAttribute ("Threshold", DoubleValue (2)); m_phy->SetPreambleDetectionModel (preambleDetectionModel); Ptr frameCaptureModel = CreateObject (); + frameCaptureModel->SetAttribute ("Margin", DoubleValue (5)); + frameCaptureModel->SetAttribute ("CaptureWindow", TimeValue (MicroSeconds (16))); m_phy->SetFrameCaptureModel (frameCaptureModel); }