6#include "ns3/ampdu-tag.h"
7#include "ns3/ap-wifi-mac.h"
8#include "ns3/boolean.h"
10#include "ns3/constant-position-mobility-model.h"
11#include "ns3/double.h"
12#include "ns3/eht-configuration.h"
13#include "ns3/he-phy.h"
14#include "ns3/he-ppdu.h"
15#include "ns3/interference-helper.h"
17#include "ns3/mobility-helper.h"
18#include "ns3/mpdu-aggregator.h"
19#include "ns3/multi-model-spectrum-channel.h"
20#include "ns3/nist-error-rate-model.h"
21#include "ns3/ofdm-ppdu.h"
22#include "ns3/packet-socket-address.h"
23#include "ns3/packet-socket-client.h"
24#include "ns3/packet-socket-helper.h"
25#include "ns3/packet-socket-server.h"
26#include "ns3/pointer.h"
27#include "ns3/propagation-loss-model.h"
28#include "ns3/rng-seed-manager.h"
29#include "ns3/simple-frame-capture-model.h"
30#include "ns3/single-model-spectrum-channel.h"
31#include "ns3/spectrum-wifi-helper.h"
32#include "ns3/spectrum-wifi-phy.h"
34#include "ns3/threshold-preamble-detection-model.h"
35#include "ns3/wifi-bandwidth-filter.h"
36#include "ns3/wifi-mac-header.h"
37#include "ns3/wifi-mpdu.h"
38#include "ns3/wifi-net-device.h"
39#include "ns3/wifi-phy-rx-trace-helper.h"
40#include "ns3/wifi-psdu.h"
41#include "ns3/wifi-spectrum-phy-interface.h"
42#include "ns3/wifi-spectrum-signal-parameters.h"
43#include "ns3/wifi-spectrum-value-helper.h"
44#include "ns3/wifi-utils.h"
45#include "ns3/yans-wifi-channel.h"
46#include "ns3/yans-wifi-phy.h"
82 void DoRun()
override;
115 uint64_t expectedPpduFailure,
116 uint64_t expectedMpduSuccess,
117 uint64_t expectedMpduFailure,
118 uint64_t expectedOverlaps,
119 uint64_t expectedNonOverlaps);
178 m_txA->SetDevice(devA);
179 m_txA->SetTxPowerStart(txPower);
180 m_txA->SetTxPowerEnd(txPower);
185 m_txB->SetDevice(devB);
186 m_txB->SetTxPowerStart(txPower);
187 m_txB->SetTxPowerEnd(txPower);
192 m_rx->SetDevice(devRx);
195 m_txA->SetInterferenceHelper(interferenceTxA);
197 m_txA->SetErrorRateModel(errorTxA);
200 m_txB->SetInterferenceHelper(interferenceTxB);
202 m_txB->SetErrorRateModel(errorTxB);
205 m_rx->SetInterferenceHelper(interferenceRx);
207 m_rx->SetErrorRateModel(errorRx);
209 m_txA->AddChannel(spectrumChannel);
210 m_txB->AddChannel(spectrumChannel);
211 m_rx->AddChannel(spectrumChannel);
222 nodeA->AddDevice(devA);
224 nodeB->AddDevice(devB);
236 preambleDetectionModel->SetAttribute(
"Threshold",
DoubleValue(4));
237 preambleDetectionModel->SetAttribute(
"MinimumRssi",
DoubleValue(-82));
238 m_rx->SetPreambleDetectionModel(preambleDetectionModel);
255 auto txPower = rxPower;
256 tx_phy->SetTxPowerStart(txPower);
257 tx_phy->SetTxPowerEnd(txPower);
269 std::vector<Ptr<WifiMpdu>> mpduList;
287 tx_phy->Send(psdu, txVector);
295 auto txPower = rxPower;
296 tx_phy->SetTxPowerStart(txPower);
297 tx_phy->SetTxPowerEnd(txPower);
309 std::vector<Ptr<WifiMpdu>> mpduList;
319 tx_phy->Send(psdu, txVector);
324 uint64_t expectedPpduFailure,
325 uint64_t expectedMpduSuccess,
326 uint64_t expectedMpduFailure,
327 uint64_t expectedOverlaps,
328 uint64_t expectedNonOverlaps)
334 "Didn't receive right number of successful PPDUs");
337 "Didn't receive right number of unsuccessful PPDUs");
340 "Didn't receive right number of successful MPDUs");
343 "Didn't receive right number of unsuccessful MPDUs");
346 "Didn't receive right number of overlapping PPDUs");
349 "Didn't receive right number of nonoverlapping PPDUs");
363 "Didn't receive right number of successful PPDUs");
366 "Didn't receive right number of unsuccessful PPDUs");
369 "Didn't receive right number of successful MPDUs");
372 "Didn't receive right number of unsuccessful MPDUs");
375 "Didn't receive right number of overlapping PPDUs");
378 "Didn't receive right number of nonoverlapping PPDUs");
387 "Didn't produce the right number of Records");
395 int64_t streamNumber = 1;
397 streamNumber +=
m_txA->AssignStreams(streamNumber);
398 streamNumber +=
m_txB->AssignStreams(streamNumber);
399 streamNumber +=
m_rx->AssignStreams(streamNumber);
451 rxPower =
dBm_u{-83};
491 rxPower =
dBm_u{-80};
531 rxPower =
dBm_u{-83};
572 rxPower =
dBm_u{-80};
619 rxPower =
dBm_u{-80};
669 rxPower =
dBm_u{-80};
712 rxPower =
dBm_u{-80};
756 rxPower =
dBm_u{-80};
800 rxPower =
dBm_u{-80};
865 void DoRun()
override;
927 uint64_t expectedPpduFailure,
928 uint64_t expectedMpduSuccess,
929 uint64_t expectedMpduFailure,
930 uint64_t expectedOverlaps,
931 uint64_t expectedNonOverlaps);
967 :
TestCase(
"Test for correct MLO operation")
980 devA->SetEhtConfiguration(ehtConfiguration);
984 m_tx0A->SetTxPowerStart(txPower);
985 m_tx0A->SetTxPowerEnd(txPower);
989 m_tx0B->SetTxPowerStart(txPower);
990 m_tx0B->SetTxPowerEnd(txPower);
995 devB->SetEhtConfiguration(ehtConfiguration);
999 m_tx1A->SetTxPowerStart(txPower);
1000 m_tx1A->SetTxPowerEnd(txPower);
1004 m_tx1B->SetTxPowerStart(txPower);
1005 m_tx1B->SetTxPowerEnd(txPower);
1010 devRx->SetEhtConfiguration(ehtConfiguration);
1012 m_rxA->SetDevice(devRx);
1014 m_rxB->SetDevice(devRx);
1017 m_tx0A->SetInterferenceHelper(interferenceTx0A);
1019 m_tx0A->SetErrorRateModel(errorTx0A);
1022 m_tx0B->SetInterferenceHelper(interferenceTx0B);
1024 m_tx0B->SetErrorRateModel(errorTx0B);
1027 m_tx1A->SetInterferenceHelper(interferenceTx1A);
1029 m_tx1A->SetErrorRateModel(errorTx1A);
1032 m_tx1B->SetInterferenceHelper(interferenceTx1B);
1034 m_tx1B->SetErrorRateModel(errorTx1B);
1037 m_rxA->SetInterferenceHelper(interferenceRxA);
1039 m_rxA->SetErrorRateModel(errorRxA);
1042 m_rxB->SetInterferenceHelper(interferenceRxB);
1044 m_rxB->SetErrorRateModel(errorRxB);
1076 std::vector<Ptr<WifiPhy>> phys0;
1077 phys0.emplace_back(
m_tx0A);
1078 phys0.emplace_back(
m_tx0B);
1080 std::vector<Ptr<WifiPhy>> phys1;
1081 phys1.emplace_back(
m_tx1A);
1082 phys1.emplace_back(
m_tx1B);
1084 std::vector<Ptr<WifiPhy>> physRx;
1085 physRx.emplace_back(
m_rxA);
1086 physRx.emplace_back(
m_rxB);
1088 devA->SetPhys(phys0);
1089 nodeA->AddDevice(devA);
1091 devB->SetPhys(phys1);
1092 nodeB->AddDevice(devB);
1094 devRx->SetPhys(physRx);
1095 nodeRx->AddDevice(devRx);
1104 preambleDetectionModel->SetAttribute(
"Threshold",
DoubleValue(4));
1105 preambleDetectionModel->SetAttribute(
"MinimumRssi",
DoubleValue(-82));
1106 m_rxA->SetPreambleDetectionModel(preambleDetectionModel);
1107 m_rxB->SetPreambleDetectionModel(preambleDetectionModel);
1127 auto txPower = rxPower;
1128 tx_phy->SetTxPowerStart(txPower);
1129 tx_phy->SetTxPowerEnd(txPower);
1141 std::vector<Ptr<WifiMpdu>> mpduList;
1159 tx_phy->Send(psdu, txVector);
1167 auto txPower = rxPower;
1168 tx_phy->SetTxPowerStart(txPower);
1169 tx_phy->SetTxPowerEnd(txPower);
1182 std::vector<Ptr<WifiMpdu>> mpduList;
1192 tx_phy->Send(psdu, txVector);
1211 "Didn't receive right number of successful PPDUs");
1214 "Didn't receive right number of unsuccessful PPDUs");
1217 "Didn't receive right number of successful MPDUs");
1220 "Didn't receive right number of unsuccessful MPDUs");
1223 "Didn't receive right number of overlapping PPDUs");
1226 "Didn't receive right number of nonoverlapping PPDUs");
1245 "Didn't receive right number of successful PPDUs");
1248 "Didn't receive right number of unsuccessful PPDUs");
1251 "Didn't receive right number of successful MPDUs");
1254 "Didn't receive right number of unsuccessful MPDUs");
1257 "Didn't receive right number of overlapping PPDUs");
1260 "Didn't receive right number of nonoverlapping PPDUs");
1273 "Didn't receive right number of successful PPDUs");
1276 "Didn't receive right number of unsuccessful PPDUs");
1279 "Didn't receive right number of successful MPDUs");
1282 "Didn't receive right number of unsuccessful MPDUs");
1285 "Didn't receive right number of overlapping PPDUs");
1288 "Didn't receive right number of nonoverlapping PPDUs");
1293 uint64_t expectedPpduFailure,
1294 uint64_t expectedMpduSuccess,
1295 uint64_t expectedMpduFailure,
1296 uint64_t expectedOverlaps,
1297 uint64_t expectedNonOverlaps)
1302 expectedPpduSuccess,
1303 "Didn't receive right number of successful PPDUs");
1305 expectedPpduFailure,
1306 "Didn't receive right number of unsuccessful PPDUs");
1308 expectedMpduSuccess,
1309 "Didn't receive right number of successful MPDUs");
1311 expectedMpduFailure,
1312 "Didn't receive right number of unsuccessful MPDUs");
1315 "Didn't receive right number of overlapping PPDUs");
1317 expectedNonOverlaps,
1318 "Didn't receive right number of nonoverlapping PPDUs");
1328 expectedRecordCount,
1329 "Didn't produce the right number of Records");
1337 int64_t streamNumber = 1;
1339 streamNumber +=
m_tx0A->AssignStreams(streamNumber);
1340 streamNumber +=
m_tx0B->AssignStreams(streamNumber);
1341 streamNumber +=
m_tx1A->AssignStreams(streamNumber);
1342 streamNumber +=
m_tx1B->AssignStreams(streamNumber);
1343 streamNumber +=
m_rxA->AssignStreams(streamNumber);
1344 streamNumber +=
m_rxB->AssignStreams(streamNumber);
1404 rxPower =
dBm_u{-83};
1452 rxPower =
dBm_u{-80};
1501 rxPower =
dBm_u{-83};
1551 rxPower =
dBm_u{-80};
1613 rxPower =
dBm_u{-80};
1696 void DoRun()
override;
1730 uint64_t expectedPpduFailure,
1731 uint64_t expectedMpduSuccess,
1732 uint64_t expectedMpduFailure,
1733 uint64_t expectedOverlaps,
1734 uint64_t expectedNonOverlaps);
1783 :
TestCase(
"Test for correct operation when using Yans")
1795 yansChannel->SetPropagationDelayModel(propDelay);
1796 yansChannel->SetPropagationLossModel(
propLoss);
1844 devA->SetPhy(
m_txA);
1845 nodeA->AddDevice(devA);
1846 devB->SetPhy(
m_txB);
1847 nodeB->AddDevice(devB);
1848 devRx->SetPhy(
m_rx);
1852 mobilityA->SetPosition(Vector(0.0, 0.0, 0.0));
1853 nodeA->AggregateObject(mobilityA);
1856 mobilityB->SetPosition(Vector(0.0, 0.0, 0.0));
1857 nodeB->AggregateObject(mobilityB);
1860 mobilityRx->SetPosition(Vector(0.0, 0.0, 0.0));
1871 preambleDetectionModel->SetAttribute(
"Threshold",
DoubleValue(4));
1872 preambleDetectionModel->SetAttribute(
"MinimumRssi",
DoubleValue(-82));
1902 std::vector<Ptr<WifiMpdu>> mpduList;
1922 tx_phy->GetOperatingChannel(),
1923 YansWifiPhy::CalculateTxDuration(psdu->GetSize(), txVector, tx_phy->GetPhyBand()),
1928 tx_phy->StartTx(ppdu);
1948 std::vector<Ptr<WifiMpdu>> mpduList;
1961 tx_phy->GetOperatingChannel(),
1962 YansWifiPhy::CalculateTxDuration(psdu->GetSize(), txVector, tx_phy->GetPhyBand()),
1967 tx_phy->StartTx(ppdu);
1972 uint64_t expectedPpduFailure,
1973 uint64_t expectedMpduSuccess,
1974 uint64_t expectedMpduFailure,
1975 uint64_t expectedOverlaps,
1976 uint64_t expectedNonOverlaps)
1981 expectedPpduSuccess,
1982 "Didn't receive right number of successful PPDUs");
1984 expectedPpduFailure,
1985 "Didn't receive right number of unsuccessful PPDUs");
1987 expectedMpduSuccess,
1988 "Didn't receive right number of successful MPDUs");
1990 expectedMpduFailure,
1991 "Didn't receive right number of unsuccessful MPDUs");
1994 "Didn't receive right number of overlapping PPDUs");
1996 expectedNonOverlaps,
1997 "Didn't receive right number of nonoverlapping PPDUs");
2012 "Didn't receive right number of successful PPDUs");
2015 "Didn't receive right number of unsuccessful PPDUs");
2018 "Didn't receive right number of successful MPDUs");
2021 "Didn't receive right number of unsuccessful MPDUs");
2024 "Didn't receive right number of overlapping PPDUs");
2027 "Didn't receive right number of nonoverlapping PPDUs");
2035 expectedRecordCount,
2036 "Didn't produce the right number of Records");
2044 int64_t streamNumber = 1;
2099 rxPower =
dBm_u{-83};
2139 rxPower =
dBm_u{-80};
2179 rxPower =
dBm_u{-83};
2220 rxPower =
dBm_u{-80};
2267 rxPower =
dBm_u{-80};
2317 rxPower =
dBm_u{-80};
2360 rxPower =
dBm_u{-80};
2404 rxPower =
dBm_u{-80};
2448 rxPower =
dBm_u{-80};
Implements a test case to evaluate the reception process of WiFi Physical Layer (PHY) frames (PPDU) w...
TestWifiPhyRxTraceHelper(std::string test_name)
Constructs a TestWifiPhyRxTraceHelper instance with a given test name.
void DoRun() override
Implementation to actually run this TestCase.
void SendPpduWithTwoMpdus(dBm_u rxPower, Mac48Address add1, Mac48Address add2, Ptr< ns3::SpectrumWifiPhy > tx_phy)
Sends a PPDU containing two MPDUs addressed to specific receivers.
Mac48Address wrongReceiver
The MAC address representing an incorrect receiver, used for testing.
void SendPpduWithOneMpdu(dBm_u rxPower, Mac48Address add1, Ptr< ns3::SpectrumWifiPhy > tx_phy)
Sends a PPDU containing one MPDU addressed to a specific receiver.
WifiPhyRxTraceHelper m_rxTraceHelper
The helper being tested for tracking PHY reception events.
void CheckRecords(uint64_t expectedRecordCount)
Checks the statistics of PPDU and MPDU reception success and failure.
Mac48Address correctReceiver
The MAC address representing the correct receiver, used for testing.
Ptr< SpectrumWifiPhy > m_txB
The transmit function for node B.
std::map< ns3::Mac48Address, uint32_t > MacToNodeId
Maps MAC addresses to node IDs.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
Ptr< Node > nodeRx
The receiving node.
void CheckAllStats(uint64_t expectedPpduSuccess, uint64_t expectedPpduFailure, uint64_t expectedMpduSuccess, uint64_t expectedMpduFailure, uint64_t expectedOverlaps, uint64_t expectedNonOverlaps)
Checks the statistics of PPDU and MPDU reception success and failure.
~TestWifiPhyRxTraceHelper() override=default
Destructor.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
Ptr< SpectrumWifiPhy > m_txA
The transmit function for node A.
void CheckStats(WifiPhyTraceStatistics expectedStats, uint32_t nodeId, uint32_t deviceId, uint32_t linkId)
Checks the statistics of PPDU and MPDU reception success and failure.
Ptr< SpectrumWifiPhy > m_rx
The receive function for testing.
Implements a test case to evaluate the reception process of WiFi Physical Layer (PHY) frames (PPDU) c...
Ptr< SpectrumWifiPhy > m_tx1A
The transmit function for node 1, link A.
void CheckRecords(uint64_t expectedRecordCount)
Checks the statistics of PPDU and MPDU reception success and failure.
void CheckAllStats(uint64_t expectedPpduSuccess, uint64_t expectedPpduFailure, uint64_t expectedMpduSuccess, uint64_t expectedMpduFailure, uint64_t expectedOverlaps, uint64_t expectedNonOverlaps)
Checks the statistics of PPDU and MPDU reception success and failure in MLO scenarios.
WifiPhyRxTraceHelper m_rxTraceHelper
The helper being tested for tracking PHY reception events in MLO scenarios.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
TestWifiPhyRxTraceHelperMloStr()
Constructs a TestWifiPhyRxTraceHelperMloStr instance for MLO reception testing.
void SendPpduWithTwoMpdus(dBm_u rxPower, Mac48Address add1, Mac48Address add2, Ptr< ns3::SpectrumWifiPhy > tx_phy)
Sends a PPDU containing two MPDUs addressed to specific receivers, simulating an MLO scenario.
Ptr< SpectrumWifiPhy > m_rxA
The receive function for node 2, link A.
void DoRun() override
Implementation to actually run this TestCase.
void CheckStats(WifiPhyTraceStatistics expectedStats, uint32_t nodeId)
Checks the statistics of PPDU and MPDU reception success and failure.
Ptr< SpectrumWifiPhy > m_rxB
The receive function for node 2, link B.
Mac48Address correctReceiver
The MAC address representing the correct receiver, used for testing in MLO.
Ptr< SpectrumWifiPhy > m_tx1B
The transmit function for node 1, link B.
NodeContainer wifiNodes
All wifi nodes.
std::map< ns3::Mac48Address, uint32_t > MacToNodeId
Maps MAC addresses to node IDs for MLO test configuration.
void SendPpduWithOneMpdu(dBm_u rxPower, Mac48Address add1, Ptr< ns3::SpectrumWifiPhy > tx_phy)
Sends a PPDU containing one MPDU addressed to a specific receiver, within an MLO setup.
Mac48Address wrongReceiver
The MAC address representing an incorrect receiver, used for testing in MLO.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
Ptr< SpectrumWifiPhy > m_tx0A
The transmit function for node 0, link A.
Ptr< SpectrumWifiPhy > m_tx0B
The transmit function for node 0, link B.
Implements a test case to evaluate the reception process of WiFi Physical Layer (PHY) frames (PPDU) w...
Ptr< YansWifiPhy > m_rx
The receive function for testing.
WifiPhyRxTraceHelper m_rxTraceHelper
The helper being tested for tracking PHY reception events.
void CheckStats(WifiPhyTraceStatistics expectedStats, uint32_t nodeId, uint32_t deviceId, uint32_t linkId)
Checks the statistics of PPDU and MPDU reception success and failure.
void DoRun() override
Implementation to actually run this TestCase.
Ptr< YansWifiPhy > m_txA
The transmit function for node A.
uint64_t m_uid
The unique identifier used for the PPDU in the test.
TestWifiPhyRxTraceHelperYans()
Constructs a TestWifiPhyRxTraceHelperYans instance for testing the trace helper with Yans.
void CheckRecords(uint64_t expectedRecordCount)
Checks the statistics of PPDU and MPDU reception success and failure.
Mac48Address wrongReceiver
The MAC address representing an incorrect receiver, used for testing.
std::map< ns3::Mac48Address, uint32_t > MacToNodeId
Maps MAC addresses to node IDs.
Mac48Address correctReceiver
The MAC address representing the correct receiver, used for testing.
void SendPpduWithOneMpdu(dBm_u rxPower, Mac48Address add1, Ptr< ns3::YansWifiPhy > tx_phy)
Sends a PPDU containing one MPDU addressed to a specific receiver.
Ptr< Node > nodeRx
The receiving node.
void SendPpduWithTwoMpdus(dBm_u rxPower, Mac48Address add1, Mac48Address add2, Ptr< ns3::YansWifiPhy > tx_phy)
Sends a PPDU containing two MPDUs addressed to specific receivers.
Ptr< YansWifiPhy > m_txB
The transmit function for node B.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
void CheckAllStats(uint64_t expectedPpduSuccess, uint64_t expectedPpduFailure, uint64_t expectedMpduSuccess, uint64_t expectedMpduFailure, uint64_t expectedOverlaps, uint64_t expectedNonOverlaps)
Checks the statistics of PPDU and MPDU reception success and failure.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
Ptr< FixedRssLossModel > propLoss
The propagation loss model used to configure RSSI.
wifi PHY reception Test Suite
WifiPhyRxTraceHelperTestSuite()
This class can be used to hold variables of floating point type such as 'double' or 'float'.
static WifiMode GetHeMcs0()
Return MCS 0 from HE MCS values.
keep track of a set of node pointers.
void Add(const NodeContainer &nc)
Append the contents of another NodeContainer to the end of this container.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
void Dispose()
Dispose of this Object.
Smart pointer class similar to boost::intrusive_ptr.
static void SetRun(uint64_t run)
Set the run number of simulation.
static void SetSeed(uint32_t seed)
Set the seed.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
void SetTxPowerEnd(dBm_u end)
Sets the maximum available transmission power level.
void SetErrorRateModel(const Ptr< ErrorRateModel > model)
Sets the error rate model.
std::tuple< uint8_t, MHz_u, WifiPhyBand, uint8_t > ChannelTuple
Tuple identifying a segment of an operating channel.
void SetTxPowerStart(dBm_u start)
Sets the minimum available transmission power level.
virtual void ConfigureStandard(WifiStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
virtual void SetDevice(const Ptr< WifiNetDevice > device)
Sets the device this PHY is associated with.
void SetOperatingChannel(const WifiPhyOperatingChannel &channel)
If the standard for this object has not been set yet, store the channel settings corresponding to the...
void SetPreambleDetectionModel(const Ptr< PreambleDetectionModel > preambleDetectionModel)
Sets the preamble detection model.
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Assists in tracing and analyzing Wi-Fi Physical Layer (PHY) receptions.
const std::vector< WifiPpduRxRecord > & GetPpduRecords() const
Accesses a vector of saved and completed PPDU reception records.
void Reset()
Resets the current statistics, clearing all counts and PPDU records.
void Stop(Time stopTime)
Stops the collection of statistics at a specified time.
WifiPhyTraceStatistics GetStatistics() const
Retrieves current statistics of successful and failed data PPDUs and MPDUs receptions,...
void Enable(NodeContainer nodes)
Enables trace collection for all nodes and WifiNetDevices in the specified NodeContainer.
void Start(Time startTime)
Starts the collection of statistics from a specified start time.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void SetChannel(const Ptr< YansWifiChannel > channel)
Set the YansWifiChannel this YansWifiPhy is to be connected to.
void SetInterferenceHelper(const Ptr< InterferenceHelper > helper) override
Sets the interference helper.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time Seconds(double value)
Construct a Time in the indicated unit.
@ WIFI_PHY_BAND_2_4GHZ
The 2.4 GHz band.
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
constexpr FrequencyRange WIFI_SPECTRUM_5_GHZ
Identifier for the frequency range covering the wifi spectrum in the 5 GHz band.
constexpr FrequencyRange WIFI_SPECTRUM_2_4_GHZ
Identifier for the frequency range covering the wifi spectrum in the 2.4 GHz band.
Keeps track of PHY layer trace statistics.
uint64_t m_failedMpdus
Number of failed unicast data MPDU receptions.
uint64_t m_failedPpdus
Number of failed PPDU receptions (with unicast data).
uint64_t m_receivedPpdus
Number of successfully received PPDUs (with unicast data).
uint64_t m_receivedMpdus
Number of successfully received unicast data MPDUs.
uint64_t m_overlappingPpdus
Number of PPDUs that overlapped in time with at least one other PPDU.
uint64_t m_nonOverlappingPpdus
Number of PPDUs that did not overlap in time with any other PPDU.
static WifiPhyRxTraceHelperTestSuite wifiPhyRxTestSuite
the test suite