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 DoRun()
override;
129 double expectedCcaThresholdDbm);
149 :
TestCase(
"Wi-Fi PHY CCA thresholds test"),
150 m_CcaEdThresholdDbm{-62.0},
151 m_CcaSensitivityDbm{-82.0},
152 m_secondaryCcaSensitivityThresholds{-72.0, -72.0, -69.0},
164 return Create<WifiPsdu>(pkt, hdr);
182 return Create<HtPpdu>(psdu,
196 return Create<VhtPpdu>(psdu,
210 return Create<HePpdu>(psdu,
222 double expectedCcaThresholdDbm)
225 double actualThresholdDbm =
phy->GetCcaThreshold(ppdu, channelType);
226 NS_LOG_INFO((ppdu ==
nullptr ?
"any signal" :
"a PPDU")
227 <<
" in " << channelType <<
" channel: " << actualThresholdDbm <<
"dBm");
229 expectedCcaThresholdDbm,
231 "Actual CCA threshold for "
232 << (ppdu ==
nullptr ?
"any signal" :
"a PPDU") <<
" in "
233 << channelType <<
" channel " << actualThresholdDbm
234 <<
"dBm does not match expected threshold "
235 << expectedCcaThresholdDbm <<
"dBm");
244 m_device = CreateObject<WifiNetDevice>();
249 m_phy = Create<SpectrumWifiPhy>();
253 auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
596 Simulator::Destroy();
632 const std::vector<Time>& per20MhzDurations)
override
634 NS_LOG_FUNCTION(
this << duration << channelType << per20MhzDurations.size());
693 void DoRun()
override;
702 void SendHeSuPpdu(
double txPowerDbm, uint16_t frequency, uint16_t bandwidth);
739 const std::vector<Time>& expectedPer20MhzDurations);
801 const std::vector<TxSignalInfo>& generatedSignals,
802 const std::vector<TxPpduInfo>& generatedPpdus,
803 const std::vector<StateCheckPoint>& stateCheckpoints,
804 const std::vector<CcaCheckPoint>& ccaCheckpoints);
823 std::unique_ptr<CcaTestPhyListener>
831 :
TestCase(
"Wi-Fi PHY CCA indication test"),
832 m_numSignalGenerators(2),
845 NS_LOG_FUNCTION(
this << signalGenerator << txPowerDbm << frequency << bandwidth << duration);
848 bandInfo.
fc = frequency * 1e6;
849 bandInfo.
fl = bandInfo.
fc - ((bandwidth / 2) * 1e6);
850 bandInfo.
fh = bandInfo.
fc + ((bandwidth / 2) * 1e6);
852 bands.push_back(bandInfo);
856 *signalPsd =
DbmToW(txPowerDbm) / (bandwidth * 1e6);
860 signalGenerator->
Start();
868 signalGenerator->
Stop();
876 auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
914 currentState = state->GetState();
917 "PHY State " << currentState <<
" does not match expected state "
923 Time expectedEndTime,
925 const std::vector<Time>& expectedPer20MhzDurations)
930 <<
" does not match expected time " << expectedEndTime
935 <<
" does not match expected channel type "
938 expectedPer20MhzDurations.size(),
939 "PHY CCA-BUSY per-20 MHz durations does not match expected vector"
941 for (std::size_t i = 0; i < expectedPer20MhzDurations.size(); ++i)
944 expectedPer20MhzDurations.at(i),
945 "PHY CCA-BUSY per-20 MHz duration at index "
946 << i <<
" does not match expected duration at "
959 const std::vector<TxSignalInfo>& generatedSignals,
960 const std::vector<TxPpduInfo>& generatedPpdus,
961 const std::vector<StateCheckPoint>& stateCheckpoints,
962 const std::vector<CcaCheckPoint>& ccaCheckpoints)
964 for (
const auto& generatedPpdu : generatedPpdus)
966 Simulator::Schedule(delay + generatedPpdu.startTime,
970 generatedPpdu.centerFreq,
971 generatedPpdu.bandwidth);
974 std::size_t index = 0;
975 for (
const auto& generatedSignal : generatedSignals)
977 Simulator::Schedule(delay + generatedSignal.startTime,
981 generatedSignal.power,
982 generatedSignal.centerFreq,
983 generatedSignal.bandwidth,
984 generatedSignal.duration);
987 for (
const auto& checkpoint : ccaCheckpoints)
989 Simulator::Schedule(delay + checkpoint.timePoint,
993 checkpoint.expectedChannelListType,
994 checkpoint.expectedPer20MhzDurations);
997 for (
const auto& checkpoint : stateCheckpoints)
999 Simulator::Schedule(delay + checkpoint.timePoint,
1002 checkpoint.expectedPhyState);
1022 Ptr<Node> rxNode = CreateObject<Node>();
1027 m_rxPhy = CreateObject<SpectrumWifiPhy>();
1037 CreateObject<ThresholdPreambleDetectionModel>();
1044 Ptr<Node> txNode = CreateObject<Node>();
1046 m_txPhy = CreateObject<SpectrumWifiPhy>();
1061 Ptr<Node> signalGeneratorNode = CreateObject<Node>();
1063 CreateObject<NonCommunicatingNetDevice>();
1065 signalGenerator->
SetDevice(signalGeneratorDev);
1066 signalGenerator->
SetChannel(spectrumChannel);
1068 signalGeneratorNode->
AddDevice(signalGeneratorDev);
1076 RngSeedManager::SetSeed(1);
1077 RngSeedManager::SetRun(1);
1078 int64_t streamNumber = 0;
1082 auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
1093 std::vector<Time> expectedPer20MhzCcaBusyDurations{};
1101 Simulator::Schedule(delay,
1104 "Reception of a signal that occupies P20 below ED threshold");
1121 Simulator::Schedule(delay,
1124 "Reception of signal that occupies P20 above ED threshold");
1153 : std::vector<Time>{})}});
1159 Simulator::Schedule(delay,
1162 "Reception of two 20 MHz signals that occupies P20 below ED threshold with "
1163 "sum above ED threshold");
1194 : std::vector<Time>{})}});
1200 Simulator::Schedule(
1204 "Reception of a 20 MHz HE PPDU that occupies P20 below CCA sensitivity threshold");
1222 Simulator::Schedule(
1226 "Reception of a 20 MHz HE PPDU that occupies P20 above CCA sensitivity threshold");
1244 ? std::vector<Time>{
Seconds(0),
1254 : std::vector<Time>{})}});
1260 Simulator::Schedule(
1264 "Reception of a 40 MHz HE PPDU that occupies P20 below CCA sensitivity threshold");
1282 Simulator::Schedule(
1286 "Reception of a 40 MHz HE PPDU that occupies P40 above CCA sensitivity threshold");
1306 ? std::vector<Time>{
Seconds(0),
1316 : std::vector<Time>{})}});
1324 Simulator::Schedule(delay,
1327 "Reception of a 20 MHz signal that occupies S20 below ED threshold");
1344 Simulator::Schedule(delay,
1347 "Reception of a 20 MHz signal that occupies S20 above ED threshold");
1380 Simulator::Schedule(delay,
1383 "Reception of a 40 MHz signal that occupies P40 above ED threshold");
1416 Simulator::Schedule(delay,
1419 "Reception of a signal that occupies S20 followed by the reception of "
1420 "another signal that occupies P20");
1473 Simulator::Schedule(delay,
1476 "Reception of a signal that occupies P20 followed by the reception of "
1477 "another signal that occupies S20");
1530 Simulator::Schedule(
1534 "Reception of a 20 MHz HE PPDU that occupies S20 below CCA sensitivity threshold");
1551 Simulator::Schedule(
1555 "Reception of a 20 MHz HE PPDU that occupies S20 above CCA sensitivity threshold");
1589 Simulator::Schedule(
1593 "Reception of a 20 MHz signal that occupies S20 above ED threshold followed by a 40 "
1594 "MHz HE PPDU that occupies P40 below CCA sensitivity threshold");
1624 : std::vector<Time>{})},
1649 Simulator::Schedule(delay,
1652 "Reception of a 20 MHz signal that occupies the first subchannel of "
1653 "S40 below ED threshold");
1672 Simulator::Schedule(delay,
1675 "Reception of a 20 MHz signal that occupies the first subchannel of "
1676 "S40 above ED threshold");
1707 Simulator::Schedule(delay,
1710 "Reception of a 20 MHz signal that occupies the second subchannel of "
1711 "S40 below ED threshold");
1730 Simulator::Schedule(delay,
1733 "Reception of a 20 MHz signal that occupies the second subchannel of "
1734 "S40 above ED threshold");
1765 Simulator::Schedule(delay,
1768 "Reception of a 40 MHz signal that occupies S40 below ED threshold");
1787 Simulator::Schedule(delay,
1790 "Reception of a 20 MHz signal that occupies the second subchannel of "
1791 "S40 above ED threshold");
1822 Simulator::Schedule(delay,
1825 "Reception of a 80 MHz signal that occupies P80 above ED threshold");
1856 Simulator::Schedule(delay,
1859 "Reception of a 20 MHz signal that occupies S40 followed by the "
1860 "reception of another 20 MHz signal that occupies P20");
1911 Simulator::Schedule(delay,
1914 "Reception of a signal that occupies S40 followed by the reception of "
1915 "another signal that occupies S20");
1964 Simulator::Schedule(
1968 "Reception of a 40 MHz HE PPDU that occupies S40 below CCA sensitivity threshold");
1985 Simulator::Schedule(
1989 "Reception of a 40 MHz HE PPDU that occupies S40 above CCA sensitivity threshold");
2021 Simulator::Schedule(
2025 "Reception of a 40 MHz signal that occupies S40 above ED threshold followed by a 80 "
2026 "MHz HE PPDU that occupies P80 below CCA sensitivity threshold");
2076 Simulator::Schedule(delay,
2079 "Reception of a 80 MHz HE PPDU that occupies the 40 MHz band above CCA "
2080 "sensitivity threshold");
2104 : std::vector<Time>{
Seconds(0),
2109 : std::vector<Time>{})},
2123 : std::vector<Time>{
Seconds(0),
2128 : std::vector<Time>{})}});
2135 Simulator::Schedule(delay,
2138 "Reception of a 80 MHz HE PPDU that occupies the 40 MHz band above CCA "
2139 "sensitivity threshold");
2169 : std::vector<Time>{})},
2188 : std::vector<Time>{})}});
2194 Simulator::Schedule(
2198 "Reception of a 40 MHz HE PPDU that does not occupy the operational channel");
2218 Simulator::Schedule(delay,
2221 "Reception of a 20 MHz signal that occupies the first subchannel of "
2222 "S80 below ED threshold");
2240 Simulator::Schedule(delay,
2243 "Reception of a 20 MHz signal that occupies the first subchannel of "
2244 "S80 above ED threshold");
2271 Simulator::Schedule(delay,
2274 "Reception of a 20 MHz signal that occupies the second subchannel of "
2275 "S80 below ED threshold");
2293 Simulator::Schedule(delay,
2296 "Reception of a 20 MHz signal that occupies the second subchannel of "
2297 "S80 above ED threshold");
2324 Simulator::Schedule(delay,
2327 "Reception of a 20 MHz signal that occupies the third subchannel of "
2328 "S80 below ED threshold");
2346 Simulator::Schedule(delay,
2349 "Reception of a 20 MHz signal that occupies the third subchannel of "
2350 "S80 above ED threshold");
2377 Simulator::Schedule(delay,
2380 "Reception of a 20 MHz signal that occupies the fourth subchannel of "
2381 "S80 below ED threshold");
2399 Simulator::Schedule(delay,
2402 "Reception of a 20 MHz signal that occupies the fourth subchannel of "
2403 "S80 above ED threshold");
2430 Simulator::Schedule(delay,
2433 "Reception of a 40 MHz signal that occupies the first and second "
2434 "subchannels of S80 below ED threshold");
2452 Simulator::Schedule(delay,
2455 "Reception of a 40 MHz signal that occupies the first and second "
2456 "subchannels of S80 above ED threshold");
2483 Simulator::Schedule(delay,
2486 "Reception of a 40 MHz signal that occupies the third and fourth "
2487 "subchannels of S80 below ED threshold");
2505 Simulator::Schedule(delay,
2508 "Reception of a 40 MHz signal that occupies the third and fourth "
2509 "subchannels of S80 above ED threshold");
2536 Simulator::Schedule(delay,
2539 "Reception of a 80 MHz signal that occupies S80 below ED threshold");
2557 Simulator::Schedule(delay,
2560 "Reception of a 80 MHz signal that occupies S80 above ED threshold");
2587 Simulator::Schedule(
2591 "Reception of a 160 MHz signal that occupies the whole band below ED threshold");
2609 Simulator::Schedule(
2613 "Reception of a 160 MHz signal that occupies the whole band above ED threshold");
2640 Simulator::Schedule(delay,
2643 "Reception of a 20 MHz signal that occupies S80 followed by the "
2644 "reception of another 20 MHz signal that occupies P20");
2687 Simulator::Schedule(delay,
2690 "Reception of a signal that occupies S80 followed by the reception of "
2691 "another signal that occupies S40");
2732 Simulator::Schedule(delay,
2735 "Reception of a signal that occupies S80 followed by the reception of "
2736 "another signal that occupies S20");
2777 Simulator::Schedule(
2781 "Reception of a 40 MHz HE PPDU that occupies S40 below CCA sensitivity threshold");
2798 Simulator::Schedule(
2802 "Reception of a 80 MHz HE PPDU that occupies S80 above CCA sensitivity threshold");
2829 Simulator::Schedule(delay,
2832 "Reception of a 20 MHz signal that generates a per20bitmap parameter "
2833 "change when previous CCA indication reports IDLE");
2860 Simulator::Schedule(
2864 "Reception of a 20 MHz signal that generates a per20bitmap parameter change when "
2865 "previous CCA indication reports BUSY for the primary channel");
2925 Simulator::Destroy();
2938 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.
std::unique_ptr< CcaTestPhyListener > m_rxPhyStateListener
Listener for PHY state transitions.
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::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< OfdmPpdu > CreateDummyNonHtPpdu()
Create a non-HT PPDU.
Ptr< WifiNetDevice > m_device
The WifiNetDevice.
Ptr< HePpdu > CreateDummyHePpdu(uint16_t bandwidth)
Create a HE PPDU.
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< HtPpdu > CreateDummyHtPpdu(uint16_t bandwidth)
Create a HT PPDU.
Ptr< SpectrumWifiPhy > m_phy
The spectrum PHY.
Ptr< ObssPdAlgorithm > m_obssPdAlgorithm
The OBSS-PD algorithm.
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 ...
Ptr< VhtPpdu > CreateDummyVhtPpdu(uint16_t bandwidth)
Create a VHT PPDU.
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.
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 SetChannel(const Ptr< SpectrumChannel > channel)
Set the SpectrumChannel this SpectrumWifiPhy is to be connected to.
void CreateWifiSpectrumPhyInterface(Ptr< NetDevice > device)
Method to encapsulate the creation of the WifiSpectrumPhyInterface object (used to bind the WifiSpect...
void AddTestCase(TestCase *testCase, TestDuration 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< 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 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 SetDevice(const Ptr< WifiNetDevice > device)
Sets the device this PHY is associated with.
void SetTxPowerEnd(double end)
Sets the maximum available transmission power level (dBm).
void SetPreambleDetectionModel(const Ptr< PreambleDetectionModel > preambleDetectionModel)
Sets the preamble detection model.
void RegisterListener(WifiPhyListener *listener)
std::tuple< uint8_t, uint16_t, int, uint8_t > ChannelTuple
Tuple identifying an 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.
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.