9#include "ns3/constant-obss-pd-algorithm.h"
10#include "ns3/eht-configuration.h"
11#include "ns3/eht-phy.h"
12#include "ns3/eht-ppdu.h"
13#include "ns3/he-ppdu.h"
14#include "ns3/ht-ppdu.h"
15#include "ns3/interference-helper.h"
17#include "ns3/multi-model-spectrum-channel.h"
18#include "ns3/nist-error-rate-model.h"
19#include "ns3/non-communicating-net-device.h"
20#include "ns3/ofdm-ppdu.h"
21#include "ns3/pointer.h"
22#include "ns3/rng-seed-manager.h"
23#include "ns3/spectrum-wifi-helper.h"
24#include "ns3/spectrum-wifi-phy.h"
26#include "ns3/threshold-preamble-detection-model.h"
27#include "ns3/vht-configuration.h"
28#include "ns3/vht-ppdu.h"
29#include "ns3/waveform-generator.h"
30#include "ns3/wifi-mac-header.h"
31#include "ns3/wifi-net-device.h"
32#include "ns3/wifi-phy-listener.h"
33#include "ns3/wifi-psdu.h"
34#include "ns3/wifi-spectrum-value-helper.h"
35#include "ns3/wifi-standards.h"
36#include "ns3/wifi-utils.h"
82 void DoRun()
override;
141 dBm_u expectedCcaThreshold);
162 :
TestCase(
"Wi-Fi PHY CCA thresholds test"),
163 m_CcaEdThreshold{-62.0},
164 m_CcaSensitivity{-82.0},
165 m_secondaryCcaSensitivityThresholds{
dBm_u{-72},
dBm_u{-72},
dBm_u{-69}},
166 m_obssPdLevel{-82.0},
167 m_per20CcaSensitivity{-72.0}
273 dBm_u expectedCcaThreshold)
276 const auto actualThreshold = phy->GetCcaThreshold(ppdu, channelType);
277 NS_LOG_INFO((ppdu ==
nullptr ?
"any signal" :
"a PPDU")
278 <<
" in " << channelType <<
" channel: " << actualThreshold <<
"dBm");
280 expectedCcaThreshold,
282 "Actual CCA threshold for "
283 << (ppdu ==
nullptr ?
"any signal" :
"a PPDU") <<
" in "
284 << channelType <<
" channel " << actualThreshold
285 <<
"dBm does not match expected threshold "
286 << expectedCcaThreshold <<
"dBm");
796 const std::vector<Time>& per20MhzDurations)
override
798 NS_LOG_FUNCTION(
this << duration << channelType << per20MhzDurations.size());
862 void DoRun()
override;
908 const std::vector<Time>& expectedPer20MhzDurations);
970 const std::vector<TxSignalInfo>& generatedSignals,
971 const std::vector<TxPpduInfo>& generatedPpdus,
972 const std::vector<StateCheckPoint>& stateCheckpoints,
973 const std::vector<CcaCheckPoint>& ccaCheckpoints);
994 std::shared_ptr<CcaTestPhyListener>
1003 ?
std::string(
"802.11ax")
1004 :
std::string(
"802.11be"))),
1005 m_standard{standard},
1006 m_numSignalGenerators{2},
1008 m_channelWidth{
MHz_u{20}}
1019 NS_LOG_FUNCTION(
this << signalGenerator << txPower << frequency << bandwidth << duration);
1023 bandInfo.
fl = bandInfo.
fc -
MHzToHz(bandwidth / 2);
1024 bandInfo.
fh = bandInfo.
fc +
MHzToHz(bandwidth / 2);
1026 bands.push_back(bandInfo);
1032 signalGenerator->SetTxPowerSpectralDensity(signalPsd);
1033 signalGenerator->SetPeriod(duration);
1034 signalGenerator->Start();
1042 signalGenerator->Stop();
1058 const auto preamble =
1067 m_txPhy->SetTxPowerStart(txPower);
1068 m_txPhy->SetTxPowerEnd(txPower);
1070 m_txPhy->Send(psdu, txVector);
1086 m_rxPhy->GetAttribute(
"State", ptr);
1088 currentState = state->GetState();
1091 "PHY State " << currentState <<
" does not match expected state "
1097 Time expectedEndTime,
1099 const std::vector<Time>& expectedPer20MhzDurations)
1104 <<
" does not match expected time " << expectedEndTime
1107 expectedChannelType,
1109 <<
" does not match expected channel type "
1112 expectedPer20MhzDurations.size(),
1113 "PHY CCA-BUSY per-20 MHz durations does not match expected vector"
1115 for (std::size_t i = 0; i < expectedPer20MhzDurations.size(); ++i)
1118 expectedPer20MhzDurations.at(i),
1119 "PHY CCA-BUSY per-20 MHz duration at index "
1120 << i <<
" does not match expected duration at "
1133 const std::vector<TxSignalInfo>& generatedSignals,
1134 const std::vector<TxPpduInfo>& generatedPpdus,
1135 const std::vector<StateCheckPoint>& stateCheckpoints,
1136 const std::vector<CcaCheckPoint>& ccaCheckpoints)
1138 for (
const auto& generatedPpdu : generatedPpdus)
1143 generatedPpdu.power,
1144 generatedPpdu.centerFreq,
1145 generatedPpdu.bandwidth);
1148 std::size_t index = 0;
1149 for (
const auto& generatedSignal : generatedSignals)
1155 generatedSignal.power,
1156 generatedSignal.centerFreq,
1157 generatedSignal.bandwidth,
1158 generatedSignal.duration);
1161 for (
const auto& checkpoint : ccaCheckpoints)
1167 checkpoint.expectedChannelListType,
1168 checkpoint.expectedPer20MhzDurations);
1171 for (
const auto& checkpoint : stateCheckpoints)
1176 checkpoint.expectedPhyState);
1200 rxDev->SetVhtConfiguration(vhtConfiguration);
1204 rxDev->SetEhtConfiguration(ehtConfiguration);
1210 m_rxPhy->SetInterferenceHelper(rxInterferenceHelper);
1212 m_rxPhy->SetErrorRateModel(rxErrorModel);
1215 m_rxPhy->SetPreambleDetectionModel(preambleDetectionModel);
1216 m_rxPhy->AddChannel(spectrumChannel);
1220 rxNode->AddDevice(rxDev);
1227 m_txPhy->SetInterferenceHelper(txInterferenceHelper);
1229 m_txPhy->SetErrorRateModel(txErrorModel);
1230 m_txPhy->AddChannel(spectrumChannel);
1234 txNode->AddDevice(txDev);
1242 signalGenerator->SetDevice(signalGeneratorDev);
1243 signalGenerator->SetChannel(spectrumChannel);
1244 signalGenerator->SetDutyCycle(1);
1245 signalGeneratorNode->AddDevice(signalGeneratorDev);
1255 int64_t streamNumber = 0;
1256 m_rxPhy->AssignStreams(streamNumber);
1257 m_txPhy->AssignStreams(streamNumber);
1271 const auto& ppduDurations =
1274 std::vector<Time> expectedPer20MhzCcaBusyDurations{};
1285 "Reception of a signal that occupies P20 below ED threshold");
1293 WifiPhyState::IDLE},
1306 "Reception of signal that occupies P20 above ED threshold");
1314 WifiPhyState::CCA_BUSY},
1336 : std::vector<Time>{})}});
1345 "Reception of two 20 MHz signals that occupies P20 below ED threshold with "
1346 "sum above ED threshold");
1354 WifiPhyState::CCA_BUSY},
1356 WifiPhyState::CCA_BUSY},
1378 : std::vector<Time>{})}});
1388 "Reception of a 20 MHz PPDU that occupies P20 below CCA sensitivity threshold");
1395 WifiPhyState::IDLE},
1410 "Reception of a 20 MHz PPDU that occupies P20 above CCA sensitivity threshold");
1428 ? std::vector<Time>{
Seconds(0),
1438 : std::vector<Time>{})}});
1448 "Reception of a 40 MHz PPDU that occupies P20 below CCA sensitivity threshold");
1455 WifiPhyState::IDLE},
1470 "Reception of a 40 MHz PPDU that occupies P40 above CCA sensitivity threshold");
1480 : WifiPhyState::CCA_BUSY},
1490 ? std::vector<Time>{
Seconds(0),
1500 : std::vector<Time>{})}});
1511 "Reception of a 20 MHz signal that occupies S20 below ED threshold");
1519 WifiPhyState::IDLE},
1532 "Reception of a 20 MHz signal that occupies S20 above ED threshold");
1540 WifiPhyState::IDLE},
1569 "Reception of a 40 MHz signal that occupies P40 above ED threshold");
1577 WifiPhyState::CCA_BUSY},
1606 "Reception of a signal that occupies S20 followed by the reception of "
1607 "another signal that occupies P20");
1615 WifiPhyState::IDLE},
1617 WifiPhyState::CCA_BUSY},
1620 WifiPhyState::CCA_BUSY},
1667 "Reception of a signal that occupies P20 followed by the reception of "
1668 "another signal that occupies S20");
1677 WifiPhyState::CCA_BUSY},
1680 WifiPhyState::CCA_BUSY},
1728 "Reception of a 20 MHz PPDU that occupies S20 below CCA sensitivity threshold");
1735 WifiPhyState::IDLE},
1749 "Reception of a 20 MHz PPDU that occupies S20 above CCA sensitivity threshold");
1757 WifiPhyState::IDLE},
1762 ppduDurations.at(
MHz_u{20}),
1766 ppduDurations.at(
MHz_u{20}),
1774 ppduDurations.at(
MHz_u{20}),
1788 "Reception of a 20 MHz signal that occupies S20 above ED threshold followed by a 40 "
1789 "MHz PPDU that occupies P40 below CCA sensitivity threshold");
1822 : std::vector<Time>{})},
1851 "Reception of a 20 MHz signal that occupies the first subchannel of "
1852 "S40 below ED threshold");
1863 WifiPhyState::IDLE},
1878 "Reception of a 20 MHz signal that occupies the first subchannel of "
1879 "S40 above ED threshold");
1890 WifiPhyState::IDLE},
1917 "Reception of a 20 MHz signal that occupies the second subchannel of "
1918 "S40 below ED threshold");
1929 WifiPhyState::IDLE},
1944 "Reception of a 20 MHz signal that occupies the second subchannel of "
1945 "S40 above ED threshold");
1956 WifiPhyState::IDLE},
1983 "Reception of a 40 MHz signal that occupies S40 below ED threshold");
1991 WifiPhyState::IDLE},
2006 "Reception of a 20 MHz signal that occupies the second subchannel of "
2007 "S40 above ED threshold");
2015 WifiPhyState::IDLE},
2042 "Reception of a 80 MHz signal that occupies P80 above ED threshold");
2050 WifiPhyState::CCA_BUSY},
2077 "Reception of a 20 MHz signal that occupies S40 followed by the "
2078 "reception of another 20 MHz signal that occupies P20");
2090 WifiPhyState::IDLE},
2092 WifiPhyState::CCA_BUSY},
2095 WifiPhyState::CCA_BUSY},
2138 "Reception of a signal that occupies S40 followed by the reception of "
2139 "another signal that occupies S20");
2151 WifiPhyState::IDLE},
2153 WifiPhyState::IDLE},
2155 WifiPhyState::IDLE},
2199 "Reception of a 40 MHz PPDU that occupies S40 below CCA sensitivity threshold");
2206 WifiPhyState::IDLE},
2221 "Reception of a 40 MHz PPDU that occupies S40 above CCA sensitivity threshold");
2229 WifiPhyState::IDLE},
2234 ppduDurations.at(
MHz_u{40}),
2238 ppduDurations.at(
MHz_u{40}),
2239 ppduDurations.at(
MHz_u{40}),
2246 ppduDurations.at(
MHz_u{40}),
2247 ppduDurations.at(
MHz_u{40})})}});
2258 "Reception of a 40 MHz signal that occupies S40 above ED threshold followed by a 80 "
2259 "MHz PPDU that occupies P80 below CCA sensitivity threshold");
2315 "Reception of a 80 MHz PPDU that occupies the 40 MHz band above CCA "
2316 "sensitivity threshold");
2324 WifiPhyState::CCA_BUSY},
2341 : std::vector<Time>{
Seconds(0),
2346 : std::vector<Time>{})},
2348 ppduDurations.at(
MHz_u{80}),
2360 : std::vector<Time>{
Seconds(0),
2365 : std::vector<Time>{})}});
2375 "Reception of a 80 MHz PPDU that occupies the 40 MHz band above CCA "
2376 "sensitivity threshold");
2384 WifiPhyState::CCA_BUSY},
2408 : std::vector<Time>{})},
2410 ppduDurations.at(
MHz_u{80}),
2431 : std::vector<Time>{})}});
2441 "Reception of a 40 MHz PPDU that does not occupy the operational channel");
2448 WifiPhyState::IDLE},
2456 if (m_channelWidth >
MHz_u{80})
2464 "Reception of a 20 MHz signal that occupies the first subchannel of "
2465 "S80 below ED threshold");
2476 WifiPhyState::IDLE},
2490 "Reception of a 20 MHz signal that occupies the first subchannel of "
2491 "S80 above ED threshold");
2502 WifiPhyState::IDLE},
2525 "Reception of a 20 MHz signal that occupies the second subchannel of "
2526 "S80 below ED threshold");
2537 WifiPhyState::IDLE},
2551 "Reception of a 20 MHz signal that occupies the second subchannel of "
2552 "S80 above ED threshold");
2563 WifiPhyState::IDLE},
2586 "Reception of a 20 MHz signal that occupies the third subchannel of "
2587 "S80 below ED threshold");
2598 WifiPhyState::IDLE},
2612 "Reception of a 20 MHz signal that occupies the third subchannel of "
2613 "S80 above ED threshold");
2624 WifiPhyState::IDLE},
2647 "Reception of a 20 MHz signal that occupies the fourth subchannel of "
2648 "S80 below ED threshold");
2659 WifiPhyState::IDLE},
2673 "Reception of a 20 MHz signal that occupies the fourth subchannel of "
2674 "S80 above ED threshold");
2685 WifiPhyState::IDLE},
2708 "Reception of a 40 MHz signal that occupies the first and second "
2709 "subchannels of S80 below ED threshold");
2720 WifiPhyState::IDLE},
2734 "Reception of a 40 MHz signal that occupies the first and second "
2735 "subchannels of S80 above ED threshold");
2746 WifiPhyState::IDLE},
2769 "Reception of a 40 MHz signal that occupies the third and fourth "
2770 "subchannels of S80 below ED threshold");
2781 WifiPhyState::IDLE},
2795 "Reception of a 40 MHz signal that occupies the third and fourth "
2796 "subchannels of S80 above ED threshold");
2807 WifiPhyState::IDLE},
2830 "Reception of a 80 MHz signal that occupies S80 below ED threshold");
2838 WifiPhyState::IDLE},
2852 "Reception of a 80 MHz signal that occupies S80 above ED threshold");
2860 WifiPhyState::IDLE},
2884 "Reception of a 160 MHz signal that occupies the whole band below ED threshold");
2892 WifiPhyState::IDLE},
2907 "Reception of a 160 MHz signal that occupies the whole band above ED threshold");
2915 WifiPhyState::CCA_BUSY},
2938 "Reception of a 20 MHz signal that occupies S80 followed by the "
2939 "reception of another 20 MHz signal that occupies P20");
2951 WifiPhyState::IDLE},
2953 WifiPhyState::CCA_BUSY},
2956 WifiPhyState::CCA_BUSY},
2991 "Reception of a signal that occupies S80 followed by the reception of "
2992 "another signal that occupies S40");
3008 WifiPhyState::IDLE},
3010 WifiPhyState::IDLE},
3012 WifiPhyState::IDLE},
3047 "Reception of a signal that occupies S80 followed by the reception of "
3048 "another signal that occupies S20");
3060 WifiPhyState::IDLE},
3062 WifiPhyState::IDLE},
3064 WifiPhyState::IDLE},
3100 "Reception of a 80 MHz PPDU that occupies S80 below CCA sensitivity threshold");
3107 WifiPhyState::IDLE},
3121 "Reception of a 80 MHz PPDU that occupies S80 above CCA sensitivity threshold");
3128 WifiPhyState::IDLE},
3133 ppduDurations.at(
MHz_u{80}),
3139 ppduDurations.at(
MHz_u{80}),
3140 ppduDurations.at(
MHz_u{80}),
3141 ppduDurations.at(
MHz_u{80}),
3142 ppduDurations.at(
MHz_u{80})}}});
3154 "Reception of a 20 MHz signal that generates a per20bitmap parameter "
3155 "change when previous CCA indication reports IDLE");
3167 WifiPhyState::IDLE},
3191 "Reception of a 20 MHz signal that generates a per20bitmap parameter change when "
3192 "previous CCA indication reports BUSY for the primary channel");
3209 WifiPhyState::CCA_BUSY},
3274 signalGenerator->Dispose();
3275 signalGenerator =
nullptr;
PHY listener for CCA tests.
void NotifyOn() override
Notify listeners that we went to switch on.
WifiChannelListType m_lastCcaBusyChannelType
Channel type indication for the last CCA-BUSY notification.
void NotifyTxStart(Time duration, dBm_u txPower) override
void NotifyCcaBusyStart(Time duration, WifiChannelListType channelType, const std::vector< Time > &per20MhzDurations) override
void NotifySleep() override
Notify listeners that we went to sleep.
void NotifyRxEndOk() override
We have received the last bit of a packet for which NotifyRxStart was invoked first and,...
CcaTestPhyListener()=default
void NotifyOff() override
Notify listeners that we went to switch off.
std::size_t m_notifications
Number of CCA notifications.
void NotifyRxStart(Time duration) override
Time m_endCcaBusy
End of the CCA-BUSY duration.
void Reset()
Reset function.
void NotifyWakeup() override
Notify listeners that we woke up.
std::vector< Time > m_lastPer20MhzCcaBusyDurations
End of the CCA-BUSY durations per 20 MHz.
void NotifySwitchingStart(Time duration) override
void NotifyRxEndError(const WifiTxVector &txVector) override
Wifi Phy Threshold Test base class.
MHz_u m_channelWidth
Operating channel width.
std::size_t m_numSignalGenerators
The number of non-wifi signals generators needed for the test.
WifiStandard m_standard
The standard to use for the test.
void SendSuPpdu(dBm_u txPower, MHz_u frequency, MHz_u bandwidth)
Send a HE or EHT SU PPDU.
void CheckPhyState(WifiPhyState expectedState)
Check the PHY state.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
void CheckLastCcaBusyNotification(Time expectedEndTime, WifiChannelListType expectedChannelType, const std::vector< Time > &expectedPer20MhzDurations)
Check the last CCA-BUSY notification.
MHz_u m_frequency
Operating frequency.
void StartSignal(Ptr< WaveformGenerator > signalGenerator, dBm_u txPower, MHz_u frequency, MHz_u bandwidth, Time duration)
Start to generate a signal.
void RunOne()
Run one function.
void DoCheckPhyState(WifiPhyState expectedState)
Check the PHY state.
std::shared_ptr< CcaTestPhyListener > m_rxPhyStateListener
Listener for PHY state transitions.
std::vector< Ptr< WaveformGenerator > > m_signalGenerators
Generators of non-wifi signals.
void ScheduleTest(Time delay, const std::vector< TxSignalInfo > &generatedSignals, const std::vector< TxPpduInfo > &generatedPpdus, const std::vector< StateCheckPoint > &stateCheckpoints, const std::vector< CcaCheckPoint > &ccaCheckpoints)
Schedule test to perform.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
WifiPhyCcaIndicationTest(WifiStandard standard)
Constructor.
void DoRun() override
Implementation to actually run this TestCase.
void LogScenario(const std::string &log) const
Log scenario description.
void Reset()
Reset function.
Ptr< SpectrumWifiPhy > m_rxPhy
PHY object of the receiver.
Ptr< SpectrumWifiPhy > m_txPhy
PHY object of the transmitter.
void StopSignal(Ptr< WaveformGenerator > signalGenerator)
Stop to generate a signal.
Wi-Fi PHY CCA Test Suite.
void VerifyCcaThreshold(const Ptr< PhyEntity > phy, const Ptr< const WifiPpdu > ppdu, WifiChannelListType channelType, dBm_u expectedCcaThreshold)
Function to verify the CCA threshold that is being reported by a given PHY entity upon reception of a...
Ptr< WifiNetDevice > m_device
The WifiNetDevice.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
Ptr< SpectrumWifiPhy > m_phy
The spectrum PHY.
Ptr< ObssPdAlgorithm > m_obssPdAlgorithm
The OBSS-PD algorithm.
dBm_u m_obssPdLevel
The current OBSS-PD level.
Ptr< EhtConfiguration > m_ehtConfiguration
The EHT configuration.
Ptr< WifiPsdu > CreateDummyPsdu()
Create a dummy PSDU whose payload is 1000 bytes.
VhtConfiguration::SecondaryCcaSensitivityThresholds m_secondaryCcaSensitivityThresholds
The current CCA sensitivity thresholds for signals that do not occupy the primary 20 MHz channel.
void RunOne()
Run tests for given CCA attributes.
Ptr< VhtConfiguration > m_vhtConfiguration
The VHT configuration.
void DoRun() override
Implementation to actually run this TestCase.
Ptr< EhtPpdu > CreateDummyEhtPpdu(MHz_u bandwidth, const WifiPhyOperatingChannel &channel)
Create a EHT PPDU.
dBm_u m_per20CcaSensitivity
The current CCA sensitivity threshold for Per 20MHz check.
Ptr< VhtPpdu > CreateDummyVhtPpdu(MHz_u bandwidth, const WifiPhyOperatingChannel &channel)
Create a VHT PPDU.
Ptr< HtPpdu > CreateDummyHtPpdu(MHz_u bandwidth, const WifiPhyOperatingChannel &channel)
Create a HT PPDU.
Ptr< OfdmPpdu > CreateDummyNonHtPpdu(const WifiPhyOperatingChannel &channel)
Create a non-HT PPDU.
dBm_u m_CcaEdThreshold
The current CCA-ED threshold for a 20 MHz subchannel.
WifiPhyCcaThresholdsTest()
dBm_u m_CcaSensitivity
The current CCA sensitivity threshold for signals that occupy the primary 20 MHz channel.
Ptr< HePpdu > CreateDummyHePpdu(MHz_u bandwidth, const WifiPhyOperatingChannel &channel)
Create a HE PPDU.
static WifiMode GetEhtMcs0()
Return MCS 0 from EHT MCS values.
static WifiMode GetHeMcs0()
Return MCS 0 from HE MCS values.
@ PSD_NON_HE_PORTION
Non-HE portion of an HE PPDU.
static WifiMode GetHtMcs0()
Return MCS 0 from HT MCS values.
static WifiMode GetOfdmRate6Mbps()
Return a WifiMode for OFDM at 6 Mbps.
AttributeValue implementation for Pointer.
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 Time Now()
Return the current simulation virtual time.
static void Run()
Run the simulation.
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Simulation virtual time values and global simulation resolution.
AttributeValue implementation for Time.
std::tuple< dBm_u, dBm_u, dBm_u > SecondaryCcaSensitivityThresholds
Tuple identifying CCA sensitivity thresholds for secondary channels.
static WifiMode GetVhtMcs0()
Return MCS 0 from VHT MCS values.
std::tuple< uint8_t, MHz_u, WifiPhyBand, uint8_t > ChannelTuple
Tuple identifying a segment of an operating channel.
receive notifications about PHY events.
Class that keeps track of all information about the current PHY operating channel.
static ConstIterator FindFirst(uint8_t number, MHz_u frequency, MHz_u width, WifiStandard standard, WifiPhyBand band, ConstIterator start=m_frequencyChannels.begin())
Find the first frequency segment matching the specified parameters.
This objects implements the PHY state machine of the Wifi device.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
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.
#define NS_TEST_EXPECT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report if ...
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.
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
WifiChannelListType
Enumeration of the possible channel-list parameter elements defined in Table 8-5 of IEEE 802....
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
@ WIFI_MOD_CLASS_OFDM
OFDM (Clause 17)
@ WIFI_MOD_CLASS_HT
HT (Clause 19)
@ WIFI_MOD_CLASS_EHT
EHT (Clause 36)
@ WIFI_MOD_CLASS_VHT
VHT (Clause 22)
@ WIFI_MOD_CLASS_HE
HE (Clause 27)
@ WIFI_CHANLIST_SECONDARY40
@ WIFI_CHANLIST_SECONDARY
@ WIFI_CHANLIST_SECONDARY80
Every class exported by the ns3 library is enclosed in the ns3 namespace.
WifiPhyState
The state of the PHY layer.
std::vector< BandInfo > Bands
Container of BandInfo.
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.
Watt_u DbmToW(dBm_u val)
Convert from dBm to Watts.
Hz_u MHzToHz(MHz_u val)
Convert from MHz to Hz.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
structure that holds information to perform CCA check
Time expectedCcaEndTime
expected CCA_BUSY end time
Time timePoint
time at which the check will performed
std::vector< Time > expectedPer20MhzDurations
expected per-20 MHz CCA duration
WifiChannelListType expectedChannelListType
expected channel list type
structure that holds information to perform PHY state check
WifiPhyState expectedPhyState
expected PHY state
Time timePoint
time at which the check will performed
structure that holds information to generate PPDUs
dBm_u power
transmit power to use
Time startTime
time at which transmission will be started
MHz_u centerFreq
center frequency to use
MHz_u bandwidth
bandwidth to use
structure that holds information to generate signals
MHz_u centerFreq
center frequency to use
Time startTime
time at which transmission will be started
MHz_u bandwidth
bandwidth to use
Time duration
the duration of the transmission
dBm_u power
transmit power to use
The building block of a SpectrumModel.
double fc
center frequency
double fl
lower limit of subband
double fh
upper limit of subband
const Time aCcaTimeWithDelta
constexpr MHz_u S80_CENTER_FREQUENCY
static WifiPhyCcaTestSuite WifiPhyCcaTestSuite
the test suite
constexpr MHz_u S20_CENTER_FREQUENCY
constexpr MHz_u P20_CENTER_FREQUENCY
const Time phyHeaderDuration
constexpr MHz_u S40_CENTER_FREQUENCY
const std::map< MHz_u, Time > ehtPpduDurations
constexpr MHz_u P160_CENTER_FREQUENCY
constexpr MHz_u P80_CENTER_FREQUENCY
constexpr MHz_u P40_CENTER_FREQUENCY
const std::map< MHz_u, Time > hePpduDurations