20 #include "ns3/constant-obss-pd-algorithm.h"
21 #include "ns3/he-phy.h"
22 #include "ns3/he-ppdu.h"
23 #include "ns3/ht-ppdu.h"
24 #include "ns3/interference-helper.h"
26 #include "ns3/multi-model-spectrum-channel.h"
27 #include "ns3/nist-error-rate-model.h"
28 #include "ns3/non-communicating-net-device.h"
29 #include "ns3/ofdm-ppdu.h"
30 #include "ns3/pointer.h"
31 #include "ns3/rng-seed-manager.h"
32 #include "ns3/spectrum-wifi-helper.h"
33 #include "ns3/spectrum-wifi-phy.h"
35 #include "ns3/threshold-preamble-detection-model.h"
36 #include "ns3/vht-configuration.h"
37 #include "ns3/vht-ppdu.h"
38 #include "ns3/waveform-generator.h"
39 #include "ns3/wifi-mac-header.h"
40 #include "ns3/wifi-net-device.h"
41 #include "ns3/wifi-phy-listener.h"
42 #include "ns3/wifi-psdu.h"
43 #include "ns3/wifi-spectrum-value-helper.h"
44 #include "ns3/wifi-utils.h"
81 void DoSetup()
override;
82 void DoTeardown()
override;
83 void DoRun()
override;
135 double expectedCcaThresholdDbm);
155 :
TestCase(
"Wi-Fi PHY CCA thresholds test"),
156 m_CcaEdThresholdDbm{-62.0},
157 m_CcaSensitivityDbm{-82.0},
158 m_secondaryCcaSensitivityThresholds{-72.0, -72.0, -69.0},
170 return Create<WifiPsdu>(pkt, hdr);
179 return Create<OfdmPpdu>(psdu, txVector,
channel, 0);
216 double expectedCcaThresholdDbm)
219 double actualThresholdDbm =
phy->GetCcaThreshold(ppdu, channelType);
220 NS_LOG_INFO((ppdu ==
nullptr ?
"any signal" :
"a PPDU")
221 <<
" in " << channelType <<
" channel: " << actualThresholdDbm <<
"dBm");
223 expectedCcaThresholdDbm,
225 "Actual CCA threshold for "
226 << (ppdu ==
nullptr ?
"any signal" :
"a PPDU") <<
" in "
227 << channelType <<
" channel " << actualThresholdDbm
228 <<
"dBm does not match expected threshold "
229 << expectedCcaThresholdDbm <<
"dBm");
238 m_device = CreateObject<WifiNetDevice>();
243 m_phy = CreateObject<SpectrumWifiPhy>();
249 auto channelNum = std::get<0>(
588 Simulator::Destroy();
624 const std::vector<Time>& per20MhzDurations)
override
626 NS_LOG_FUNCTION(
this << duration << channelType << per20MhzDurations.size());
685 void DoRun()
override;
694 void SendHeSuPpdu(
double txPowerDbm, uint16_t frequency, uint16_t bandwidth);
731 const std::vector<Time>& expectedPer20MhzDurations);
793 const std::vector<TxSignalInfo>& generatedSignals,
794 const std::vector<TxPpduInfo>& generatedPpdus,
795 const std::vector<StateCheckPoint>& stateCheckpoints,
796 const std::vector<CcaCheckPoint>& ccaCheckpoints);
815 std::shared_ptr<CcaTestPhyListener>
823 :
TestCase(
"Wi-Fi PHY CCA indication test"),
824 m_numSignalGenerators(2),
837 NS_LOG_FUNCTION(
this << signalGenerator << txPowerDbm << frequency << bandwidth << duration);
840 bandInfo.
fc = frequency * 1e6;
841 bandInfo.
fl = bandInfo.
fc - ((bandwidth / 2) * 1e6);
842 bandInfo.
fh = bandInfo.
fc + ((bandwidth / 2) * 1e6);
844 bands.push_back(bandInfo);
848 *signalPsd =
DbmToW(txPowerDbm) / (bandwidth * 1e6);
852 signalGenerator->
Start();
860 signalGenerator->
Stop();
868 auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
906 currentState = state->GetState();
909 "PHY State " << currentState <<
" does not match expected state "
915 Time expectedEndTime,
917 const std::vector<Time>& expectedPer20MhzDurations)
922 <<
" does not match expected time " << expectedEndTime
927 <<
" does not match expected channel type "
930 expectedPer20MhzDurations.size(),
931 "PHY CCA-BUSY per-20 MHz durations does not match expected vector"
933 for (std::size_t i = 0; i < expectedPer20MhzDurations.size(); ++i)
936 expectedPer20MhzDurations.at(i),
937 "PHY CCA-BUSY per-20 MHz duration at index "
938 << i <<
" does not match expected duration at "
951 const std::vector<TxSignalInfo>& generatedSignals,
952 const std::vector<TxPpduInfo>& generatedPpdus,
953 const std::vector<StateCheckPoint>& stateCheckpoints,
954 const std::vector<CcaCheckPoint>& ccaCheckpoints)
956 for (
const auto& generatedPpdu : generatedPpdus)
958 Simulator::Schedule(delay + generatedPpdu.startTime,
962 generatedPpdu.centerFreq,
963 generatedPpdu.bandwidth);
966 std::size_t index = 0;
967 for (
const auto& generatedSignal : generatedSignals)
969 Simulator::Schedule(delay + generatedSignal.startTime,
973 generatedSignal.power,
974 generatedSignal.centerFreq,
975 generatedSignal.bandwidth,
976 generatedSignal.duration);
979 for (
const auto& checkpoint : ccaCheckpoints)
981 Simulator::Schedule(delay + checkpoint.timePoint,
985 checkpoint.expectedChannelListType,
986 checkpoint.expectedPer20MhzDurations);
989 for (
const auto& checkpoint : stateCheckpoints)
991 Simulator::Schedule(delay + checkpoint.timePoint,
994 checkpoint.expectedPhyState);
1014 Ptr<Node> rxNode = CreateObject<Node>();
1019 m_rxPhy = CreateObject<SpectrumWifiPhy>();
1027 CreateObject<ThresholdPreambleDetectionModel>();
1035 Ptr<Node> txNode = CreateObject<Node>();
1037 m_txPhy = CreateObject<SpectrumWifiPhy>();
1051 Ptr<Node> signalGeneratorNode = CreateObject<Node>();
1053 CreateObject<NonCommunicatingNetDevice>();
1055 signalGenerator->
SetDevice(signalGeneratorDev);
1056 signalGenerator->
SetChannel(spectrumChannel);
1058 signalGeneratorNode->
AddDevice(signalGeneratorDev);
1066 RngSeedManager::SetSeed(1);
1067 RngSeedManager::SetRun(1);
1068 int64_t streamNumber = 0;
1072 auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
1083 std::vector<Time> expectedPer20MhzCcaBusyDurations{};
1091 Simulator::Schedule(delay,
1094 "Reception of a signal that occupies P20 below ED threshold");
1111 Simulator::Schedule(delay,
1114 "Reception of signal that occupies P20 above ED threshold");
1143 : std::vector<Time>{})}});
1149 Simulator::Schedule(delay,
1152 "Reception of two 20 MHz signals that occupies P20 below ED threshold with "
1153 "sum above ED threshold");
1184 : std::vector<Time>{})}});
1190 Simulator::Schedule(
1194 "Reception of a 20 MHz HE PPDU that occupies P20 below CCA sensitivity threshold");
1212 Simulator::Schedule(
1216 "Reception of a 20 MHz HE PPDU that occupies P20 above CCA sensitivity threshold");
1234 ? std::vector<Time>{
Seconds(0),
1244 : std::vector<Time>{})}});
1250 Simulator::Schedule(
1254 "Reception of a 40 MHz HE PPDU that occupies P20 below CCA sensitivity threshold");
1272 Simulator::Schedule(
1276 "Reception of a 40 MHz HE PPDU that occupies P40 above CCA sensitivity threshold");
1296 ? std::vector<Time>{
Seconds(0),
1306 : std::vector<Time>{})}});
1314 Simulator::Schedule(delay,
1317 "Reception of a 20 MHz signal that occupies S20 below ED threshold");
1334 Simulator::Schedule(delay,
1337 "Reception of a 20 MHz signal that occupies S20 above ED threshold");
1370 Simulator::Schedule(delay,
1373 "Reception of a 40 MHz signal that occupies P40 above ED threshold");
1406 Simulator::Schedule(delay,
1409 "Reception of a signal that occupies S20 followed by the reception of "
1410 "another signal that occupies P20");
1463 Simulator::Schedule(delay,
1466 "Reception of a signal that occupies P20 followed by the reception of "
1467 "another signal that occupies S20");
1520 Simulator::Schedule(
1524 "Reception of a 20 MHz HE PPDU that occupies S20 below CCA sensitivity threshold");
1541 Simulator::Schedule(
1545 "Reception of a 20 MHz HE PPDU that occupies S20 above CCA sensitivity threshold");
1579 Simulator::Schedule(
1583 "Reception of a 20 MHz signal that occupies S20 above ED threshold followed by a 40 "
1584 "MHz HE PPDU that occupies P40 below CCA sensitivity threshold");
1614 : std::vector<Time>{})},
1639 Simulator::Schedule(delay,
1642 "Reception of a 20 MHz signal that occupies the first subchannel of "
1643 "S40 below ED threshold");
1662 Simulator::Schedule(delay,
1665 "Reception of a 20 MHz signal that occupies the first subchannel of "
1666 "S40 above ED threshold");
1697 Simulator::Schedule(delay,
1700 "Reception of a 20 MHz signal that occupies the second subchannel of "
1701 "S40 below ED threshold");
1720 Simulator::Schedule(delay,
1723 "Reception of a 20 MHz signal that occupies the second subchannel of "
1724 "S40 above ED threshold");
1755 Simulator::Schedule(delay,
1758 "Reception of a 40 MHz signal that occupies S40 below ED threshold");
1777 Simulator::Schedule(delay,
1780 "Reception of a 20 MHz signal that occupies the second subchannel of "
1781 "S40 above ED threshold");
1812 Simulator::Schedule(delay,
1815 "Reception of a 80 MHz signal that occupies P80 above ED threshold");
1846 Simulator::Schedule(delay,
1849 "Reception of a 20 MHz signal that occupies S40 followed by the "
1850 "reception of another 20 MHz signal that occupies P20");
1901 Simulator::Schedule(delay,
1904 "Reception of a signal that occupies S40 followed by the reception of "
1905 "another signal that occupies S20");
1954 Simulator::Schedule(
1958 "Reception of a 40 MHz HE PPDU that occupies S40 below CCA sensitivity threshold");
1975 Simulator::Schedule(
1979 "Reception of a 40 MHz HE PPDU that occupies S40 above CCA sensitivity threshold");
2011 Simulator::Schedule(
2015 "Reception of a 40 MHz signal that occupies S40 above ED threshold followed by a 80 "
2016 "MHz HE PPDU that occupies P80 below CCA sensitivity threshold");
2066 Simulator::Schedule(delay,
2069 "Reception of a 80 MHz HE PPDU that occupies the 40 MHz band above CCA "
2070 "sensitivity threshold");
2094 : std::vector<Time>{
Seconds(0),
2099 : std::vector<Time>{})},
2113 : std::vector<Time>{
Seconds(0),
2118 : std::vector<Time>{})}});
2125 Simulator::Schedule(delay,
2128 "Reception of a 80 MHz HE PPDU that occupies the 40 MHz band above CCA "
2129 "sensitivity threshold");
2159 : std::vector<Time>{})},
2178 : std::vector<Time>{})}});
2184 Simulator::Schedule(
2188 "Reception of a 40 MHz HE PPDU that does not occupy the operational channel");
2208 Simulator::Schedule(delay,
2211 "Reception of a 20 MHz signal that occupies the first subchannel of "
2212 "S80 below ED threshold");
2230 Simulator::Schedule(delay,
2233 "Reception of a 20 MHz signal that occupies the first subchannel of "
2234 "S80 above ED threshold");
2261 Simulator::Schedule(delay,
2264 "Reception of a 20 MHz signal that occupies the second subchannel of "
2265 "S80 below ED threshold");
2283 Simulator::Schedule(delay,
2286 "Reception of a 20 MHz signal that occupies the second subchannel of "
2287 "S80 above ED threshold");
2314 Simulator::Schedule(delay,
2317 "Reception of a 20 MHz signal that occupies the third subchannel of "
2318 "S80 below ED threshold");
2336 Simulator::Schedule(delay,
2339 "Reception of a 20 MHz signal that occupies the third subchannel of "
2340 "S80 above ED threshold");
2367 Simulator::Schedule(delay,
2370 "Reception of a 20 MHz signal that occupies the fourth subchannel of "
2371 "S80 below ED threshold");
2389 Simulator::Schedule(delay,
2392 "Reception of a 20 MHz signal that occupies the fourth subchannel of "
2393 "S80 above ED threshold");
2420 Simulator::Schedule(delay,
2423 "Reception of a 40 MHz signal that occupies the first and second "
2424 "subchannels of S80 below ED threshold");
2442 Simulator::Schedule(delay,
2445 "Reception of a 40 MHz signal that occupies the first and second "
2446 "subchannels of S80 above ED threshold");
2473 Simulator::Schedule(delay,
2476 "Reception of a 40 MHz signal that occupies the third and fourth "
2477 "subchannels of S80 below ED threshold");
2495 Simulator::Schedule(delay,
2498 "Reception of a 40 MHz signal that occupies the third and fourth "
2499 "subchannels of S80 above ED threshold");
2526 Simulator::Schedule(delay,
2529 "Reception of a 80 MHz signal that occupies S80 below ED threshold");
2547 Simulator::Schedule(delay,
2550 "Reception of a 80 MHz signal that occupies S80 above ED threshold");
2577 Simulator::Schedule(
2581 "Reception of a 160 MHz signal that occupies the whole band below ED threshold");
2599 Simulator::Schedule(
2603 "Reception of a 160 MHz signal that occupies the whole band above ED threshold");
2630 Simulator::Schedule(delay,
2633 "Reception of a 20 MHz signal that occupies S80 followed by the "
2634 "reception of another 20 MHz signal that occupies P20");
2677 Simulator::Schedule(delay,
2680 "Reception of a signal that occupies S80 followed by the reception of "
2681 "another signal that occupies S40");
2722 Simulator::Schedule(delay,
2725 "Reception of a signal that occupies S80 followed by the reception of "
2726 "another signal that occupies S20");
2767 Simulator::Schedule(
2771 "Reception of a 40 MHz HE PPDU that occupies S40 below CCA sensitivity threshold");
2788 Simulator::Schedule(
2792 "Reception of a 80 MHz HE PPDU that occupies S80 above CCA sensitivity threshold");
2819 Simulator::Schedule(delay,
2822 "Reception of a 20 MHz signal that generates a per20bitmap parameter "
2823 "change when previous CCA indication reports IDLE");
2850 Simulator::Schedule(
2854 "Reception of a 20 MHz signal that generates a per20bitmap parameter change when "
2855 "previous CCA indication reports BUSY for the primary channel");
2915 Simulator::Destroy();
2928 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 NotifyRxEndError() override
We have received the last bit of a packet for which NotifyRxStart was invoked first and,...
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,...
void NotifyTxStart(Time duration, double txPowerDbm) override
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
Wifi Phy Threshold Test base class.
std::size_t m_numSignalGenerators
The number of non-wifi signals generators needed for the test.
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.
void SendHeSuPpdu(double txPowerDbm, uint16_t frequency, uint16_t bandwidth)
Send an HE SU PPDU.
void StartSignal(Ptr< WaveformGenerator > signalGenerator, double txPowerDbm, uint16_t frequency, uint16_t 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.
uint16_t m_frequency
Operating frequency in MHz.
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.
WifiPhyCcaIndicationTest()
uint16_t m_channelWidth
Operating channel width in MHz.
Wi-Fi PHY CCA Test Suite.
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.
double m_CcaSensitivityDbm
The current CCA sensitivity threshold for signals that occupy the primary 20 MHz channel (in dBm)
Ptr< SpectrumWifiPhy > m_phy
The spectrum PHY.
Ptr< ObssPdAlgorithm > m_obssPdAlgorithm
The OBSS-PD algorithm.
Ptr< HtPpdu > CreateDummyHtPpdu(uint16_t bandwidth, const WifiPhyOperatingChannel &channel)
Create a HT PPDU.
Ptr< VhtPpdu > CreateDummyVhtPpdu(uint16_t bandwidth, const WifiPhyOperatingChannel &channel)
Create a VHT PPDU.
void VerifyCcaThreshold(const Ptr< PhyEntity > phy, const Ptr< const WifiPpdu > ppdu, WifiChannelListType channelType, double expectedCcaThresholdDbm)
Function to verify the CCA threshold that is being reported by a given PHY entity upon reception of a...
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 (in ...
void RunOne()
Run tests for given CCA attributes.
Ptr< VhtConfiguration > m_vhtConfiguration
The VHT configuration.
double m_CcaEdThresholdDbm
The current CCA-ED threshold for a 20 MHz subchannel (in dBm)
void DoRun() override
Implementation to actually run this TestCase.
Ptr< HePpdu > CreateDummyHePpdu(uint16_t bandwidth, const WifiPhyOperatingChannel &channel)
Create a HE PPDU.
Ptr< OfdmPpdu > CreateDummyNonHtPpdu(const WifiPhyOperatingChannel &channel)
Create a non-HT PPDU.
double m_obssPdLevel
The current OBSS-PD level (in dBm)
WifiPhyCcaThresholdsTest()
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
void GetAttribute(std::string name, AttributeValue &value) const
Get the value of an attribute, raising fatal errors if unsuccessful.
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
void Dispose()
Dispose of this Object.
void SetObssPdLevel(double level)
virtual void ConnectWifiNetDevice(const Ptr< WifiNetDevice > device)
Connect the WifiNetDevice and setup eventual callbacks.
Hold objects of type Ptr<T>.
void SetDevice(const Ptr< WifiNetDevice > device) override
Sets the device this PHY is associated with.
void AddChannel(const Ptr< SpectrumChannel > channel, const FrequencyRange &freqRange=WHOLE_WIFI_SPECTRUM)
Attach a SpectrumChannel to use for a given frequency range.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Simulation virtual time values and global simulation resolution.
std::tuple< double, double, double > SecondaryCcaSensitivityThresholds
Tuple identifying CCA sensitivity thresholds for secondary channels.
void SetSecondaryCcaSensitivityThresholds(const SecondaryCcaSensitivityThresholds &thresholds)
Sets the CCA sensitivity thresholds for PPDUs that do not occupy the primary channel.
void SetVhtConfiguration(Ptr< VhtConfiguration > vhtConfiguration)
void SetStandard(WifiStandard standard)
Set the Wifi standard.
void SetPhy(const Ptr< WifiPhy > phy)
virtual void SetInterferenceHelper(const Ptr< InterferenceHelper > helper)
Sets the interference helper.
void Send(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
This function is a wrapper for the Send variant that accepts a WifiConstPsduMap as first argument.
void SetCcaEdThreshold(double threshold)
Sets the CCA energy detection threshold (dBm).
void SetErrorRateModel(const Ptr< ErrorRateModel > model)
Sets the error rate model.
virtual void ConfigureStandard(WifiStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
void RegisterListener(const std::shared_ptr< WifiPhyListener > &listener)
void SetOperatingChannel(const ChannelTuple &channelTuple)
If the standard for this object has not been set yet, store the given channel settings.
void SetCcaSensitivityThreshold(double threshold)
Sets the CCA sensitivity threshold (dBm).
Ptr< PhyEntity > GetPhyEntity(WifiModulationClass modulation) const
Get the supported PHY entity corresponding to the modulation class.
void SetTxPowerEnd(double end)
Sets the maximum available transmission power level (dBm).
void SetPreambleDetectionModel(const Ptr< PreambleDetectionModel > preambleDetectionModel)
Sets the preamble detection model.
std::tuple< uint8_t, uint16_t, WifiPhyBand, uint8_t > ChannelTuple
Tuple identifying an operating channel.
const WifiPhyOperatingChannel & GetOperatingChannel() const
Get a const reference to the operating channel.
void SetTxPowerStart(double start)
Sets the minimum available transmission power level (dBm).
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
receive notifications about PHY events.
Class that keeps track of all information about the current PHY operating channel.
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.
Time Now()
create an ns3::Time instance which contains the current simulation time.
#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.
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_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.
std::vector< BandInfo > Bands
Container of BandInfo.
double DbmToW(double dBm)
Convert from dBm to Watts.
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
uint16_t centerFreq
center frequency to use in MHz
Time startTime
time at which transmission will be started
uint16_t bandwidth
bandwidth to use in MHz
double power
transmit power to use in dBm
structure that holds information to generate signals
uint16_t centerFreq
center frequency to use in MHz
double power
transmit power to use in dBm
uint16_t bandwidth
bandwidth to use in MHz
Time startTime
time at which transmission will be started
Time duration
the duration of the transmission
The building block of a SpectrumModel.
double fc
center frequency
double fl
lower limit of subband
double fh
upper limit of subband
constexpr uint32_t P40_CENTER_FREQUENCY
constexpr uint32_t P20_CENTER_FREQUENCY
const std::map< uint16_t, Time > PpduDurations
static WifiPhyCcaTestSuite WifiPhyCcaTestSuite
the test suite
constexpr uint32_t P160_CENTER_FREQUENCY
constexpr uint32_t P80_CENTER_FREQUENCY
constexpr uint32_t S40_CENTER_FREQUENCY
constexpr uint32_t S80_CENTER_FREQUENCY
constexpr uint32_t S20_CENTER_FREQUENCY
WifiPhyState
The state of the PHY layer.
@ CCA_BUSY
The PHY layer has sense the medium busy through the CCA mechanism.
@ RX
The PHY layer is receiving a packet.
@ IDLE
The PHY layer is IDLE.