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;
131 double expectedCcaThresholdDbm);
151 :
TestCase(
"Wi-Fi PHY CCA thresholds test"),
152 m_CcaEdThresholdDbm{-62.0},
153 m_CcaSensitivityDbm{-82.0},
154 m_secondaryCcaSensitivityThresholds{-72.0, -72.0, -69.0},
166 return Create<WifiPsdu>(pkt, hdr);
184 return Create<HtPpdu>(psdu,
198 return Create<VhtPpdu>(psdu,
212 return Create<HePpdu>(psdu,
224 double expectedCcaThresholdDbm)
227 double actualThresholdDbm =
phy->GetCcaThreshold(ppdu, channelType);
228 NS_LOG_INFO((ppdu ==
nullptr ?
"any signal" :
"a PPDU")
229 <<
" in " << channelType <<
" channel: " << actualThresholdDbm <<
"dBm");
231 expectedCcaThresholdDbm,
233 "Actual CCA threshold for "
234 << (ppdu ==
nullptr ?
"any signal" :
"a PPDU") <<
" in "
235 << channelType <<
" channel " << actualThresholdDbm
236 <<
"dBm does not match expected threshold "
237 << expectedCcaThresholdDbm <<
"dBm");
246 m_device = CreateObject<WifiNetDevice>();
251 m_phy = Create<SpectrumWifiPhy>();
255 auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
598 Simulator::Destroy();
634 const std::vector<Time>& per20MhzDurations)
override
636 NS_LOG_FUNCTION(
this << duration << channelType << per20MhzDurations.size());
695 void DoRun()
override;
704 void SendHeSuPpdu(
double txPowerDbm, uint16_t frequency, uint16_t bandwidth);
741 const std::vector<Time>& expectedPer20MhzDurations);
803 const std::vector<TxSignalInfo>& generatedSignals,
804 const std::vector<TxPpduInfo>& generatedPpdus,
805 const std::vector<StateCheckPoint>& stateCheckpoints,
806 const std::vector<CcaCheckPoint>& ccaCheckpoints);
825 std::unique_ptr<CcaTestPhyListener>
833 :
TestCase(
"Wi-Fi PHY CCA indication test"),
834 m_numSignalGenerators(2),
847 NS_LOG_FUNCTION(
this << signalGenerator << txPowerDbm << frequency << bandwidth << duration);
850 bandInfo.
fc = frequency * 1e6;
851 bandInfo.
fl = bandInfo.
fc - ((bandwidth / 2) * 1e6);
852 bandInfo.
fh = bandInfo.
fc + ((bandwidth / 2) * 1e6);
854 bands.push_back(bandInfo);
858 *signalPsd =
DbmToW(txPowerDbm) / (bandwidth * 1e6);
862 signalGenerator->
Start();
870 signalGenerator->
Stop();
878 auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
916 currentState = state->GetState();
919 "PHY State " << currentState <<
" does not match expected state "
925 Time expectedEndTime,
927 const std::vector<Time>& expectedPer20MhzDurations)
932 <<
" does not match expected time " << expectedEndTime
937 <<
" does not match expected channel type "
940 expectedPer20MhzDurations.size(),
941 "PHY CCA-BUSY per-20 MHz durations does not match expected vector"
943 for (std::size_t i = 0; i < expectedPer20MhzDurations.size(); ++i)
946 expectedPer20MhzDurations.at(i),
947 "PHY CCA-BUSY per-20 MHz duration at index "
948 << i <<
" does not match expected duration at "
961 const std::vector<TxSignalInfo>& generatedSignals,
962 const std::vector<TxPpduInfo>& generatedPpdus,
963 const std::vector<StateCheckPoint>& stateCheckpoints,
964 const std::vector<CcaCheckPoint>& ccaCheckpoints)
966 for (
const auto& generatedPpdu : generatedPpdus)
968 Simulator::Schedule(delay + generatedPpdu.startTime,
972 generatedPpdu.centerFreq,
973 generatedPpdu.bandwidth);
976 std::size_t index = 0;
977 for (
const auto& generatedSignal : generatedSignals)
979 Simulator::Schedule(delay + generatedSignal.startTime,
983 generatedSignal.power,
984 generatedSignal.centerFreq,
985 generatedSignal.bandwidth,
986 generatedSignal.duration);
989 for (
const auto& checkpoint : ccaCheckpoints)
991 Simulator::Schedule(delay + checkpoint.timePoint,
995 checkpoint.expectedChannelListType,
996 checkpoint.expectedPer20MhzDurations);
999 for (
const auto& checkpoint : stateCheckpoints)
1001 Simulator::Schedule(delay + checkpoint.timePoint,
1004 checkpoint.expectedPhyState);
1024 Ptr<Node> rxNode = CreateObject<Node>();
1029 m_rxPhy = CreateObject<SpectrumWifiPhy>();
1039 CreateObject<ThresholdPreambleDetectionModel>();
1046 Ptr<Node> txNode = CreateObject<Node>();
1048 m_txPhy = CreateObject<SpectrumWifiPhy>();
1063 Ptr<Node> signalGeneratorNode = CreateObject<Node>();
1065 CreateObject<NonCommunicatingNetDevice>();
1067 signalGenerator->
SetDevice(signalGeneratorDev);
1068 signalGenerator->
SetChannel(spectrumChannel);
1070 signalGeneratorNode->
AddDevice(signalGeneratorDev);
1078 RngSeedManager::SetSeed(1);
1079 RngSeedManager::SetRun(1);
1080 int64_t streamNumber = 0;
1084 auto channelNum = std::get<0>(*WifiPhyOperatingChannel::FindFirst(0,
1095 std::vector<Time> expectedPer20MhzCcaBusyDurations{};
1103 Simulator::Schedule(delay,
1106 "Reception of a signal that occupies P20 below ED threshold");
1123 Simulator::Schedule(delay,
1126 "Reception of signal that occupies P20 above ED threshold");
1155 : std::vector<Time>{})}});
1161 Simulator::Schedule(delay,
1164 "Reception of two 20 MHz signals that occupies P20 below ED threshold with "
1165 "sum above ED threshold");
1196 : std::vector<Time>{})}});
1202 Simulator::Schedule(
1206 "Reception of a 20 MHz HE PPDU that occupies P20 below CCA sensitivity threshold");
1224 Simulator::Schedule(
1228 "Reception of a 20 MHz HE PPDU that occupies P20 above CCA sensitivity threshold");
1246 ? std::vector<Time>{
Seconds(0),
1256 : std::vector<Time>{})}});
1262 Simulator::Schedule(
1266 "Reception of a 40 MHz HE PPDU that occupies P20 below CCA sensitivity threshold");
1284 Simulator::Schedule(
1288 "Reception of a 40 MHz HE PPDU that occupies P40 above CCA sensitivity threshold");
1308 ? std::vector<Time>{
Seconds(0),
1318 : std::vector<Time>{})}});
1326 Simulator::Schedule(delay,
1329 "Reception of a 20 MHz signal that occupies S20 below ED threshold");
1346 Simulator::Schedule(delay,
1349 "Reception of a 20 MHz signal that occupies S20 above ED threshold");
1382 Simulator::Schedule(delay,
1385 "Reception of a 40 MHz signal that occupies P40 above ED threshold");
1418 Simulator::Schedule(delay,
1421 "Reception of a signal that occupies S20 followed by the reception of "
1422 "another signal that occupies P20");
1475 Simulator::Schedule(delay,
1478 "Reception of a signal that occupies P20 followed by the reception of "
1479 "another signal that occupies S20");
1532 Simulator::Schedule(
1536 "Reception of a 20 MHz HE PPDU that occupies S20 below CCA sensitivity threshold");
1553 Simulator::Schedule(
1557 "Reception of a 20 MHz HE PPDU that occupies S20 above CCA sensitivity threshold");
1591 Simulator::Schedule(
1595 "Reception of a 20 MHz signal that occupies S20 above ED threshold followed by a 40 "
1596 "MHz HE PPDU that occupies P40 below CCA sensitivity threshold");
1626 : std::vector<Time>{})},
1651 Simulator::Schedule(delay,
1654 "Reception of a 20 MHz signal that occupies the first subchannel of "
1655 "S40 below ED threshold");
1674 Simulator::Schedule(delay,
1677 "Reception of a 20 MHz signal that occupies the first subchannel of "
1678 "S40 above ED threshold");
1709 Simulator::Schedule(delay,
1712 "Reception of a 20 MHz signal that occupies the second subchannel of "
1713 "S40 below ED threshold");
1732 Simulator::Schedule(delay,
1735 "Reception of a 20 MHz signal that occupies the second subchannel of "
1736 "S40 above ED threshold");
1767 Simulator::Schedule(delay,
1770 "Reception of a 40 MHz signal that occupies S40 below ED threshold");
1789 Simulator::Schedule(delay,
1792 "Reception of a 20 MHz signal that occupies the second subchannel of "
1793 "S40 above ED threshold");
1824 Simulator::Schedule(delay,
1827 "Reception of a 80 MHz signal that occupies P80 above ED threshold");
1858 Simulator::Schedule(delay,
1861 "Reception of a 20 MHz signal that occupies S40 followed by the "
1862 "reception of another 20 MHz signal that occupies P20");
1913 Simulator::Schedule(delay,
1916 "Reception of a signal that occupies S40 followed by the reception of "
1917 "another signal that occupies S20");
1966 Simulator::Schedule(
1970 "Reception of a 40 MHz HE PPDU that occupies S40 below CCA sensitivity threshold");
1987 Simulator::Schedule(
1991 "Reception of a 40 MHz HE PPDU that occupies S40 above CCA sensitivity threshold");
2023 Simulator::Schedule(
2027 "Reception of a 40 MHz signal that occupies S40 above ED threshold followed by a 80 "
2028 "MHz HE PPDU that occupies P80 below CCA sensitivity threshold");
2078 Simulator::Schedule(delay,
2081 "Reception of a 80 MHz HE PPDU that occupies the 40 MHz band above CCA "
2082 "sensitivity threshold");
2106 : std::vector<Time>{
Seconds(0),
2111 : std::vector<Time>{})},
2125 : std::vector<Time>{
Seconds(0),
2130 : std::vector<Time>{})}});
2137 Simulator::Schedule(delay,
2140 "Reception of a 80 MHz HE PPDU that occupies the 40 MHz band above CCA "
2141 "sensitivity threshold");
2171 : std::vector<Time>{})},
2190 : std::vector<Time>{})}});
2196 Simulator::Schedule(
2200 "Reception of a 40 MHz HE PPDU that does not occupy the operational channel");
2220 Simulator::Schedule(delay,
2223 "Reception of a 20 MHz signal that occupies the first subchannel of "
2224 "S80 below ED threshold");
2242 Simulator::Schedule(delay,
2245 "Reception of a 20 MHz signal that occupies the first subchannel of "
2246 "S80 above ED threshold");
2273 Simulator::Schedule(delay,
2276 "Reception of a 20 MHz signal that occupies the second subchannel of "
2277 "S80 below ED threshold");
2295 Simulator::Schedule(delay,
2298 "Reception of a 20 MHz signal that occupies the second subchannel of "
2299 "S80 above ED threshold");
2326 Simulator::Schedule(delay,
2329 "Reception of a 20 MHz signal that occupies the third subchannel of "
2330 "S80 below ED threshold");
2348 Simulator::Schedule(delay,
2351 "Reception of a 20 MHz signal that occupies the third subchannel of "
2352 "S80 above ED threshold");
2379 Simulator::Schedule(delay,
2382 "Reception of a 20 MHz signal that occupies the fourth subchannel of "
2383 "S80 below ED threshold");
2401 Simulator::Schedule(delay,
2404 "Reception of a 20 MHz signal that occupies the fourth subchannel of "
2405 "S80 above ED threshold");
2432 Simulator::Schedule(delay,
2435 "Reception of a 40 MHz signal that occupies the first and second "
2436 "subchannels of S80 below ED threshold");
2454 Simulator::Schedule(delay,
2457 "Reception of a 40 MHz signal that occupies the first and second "
2458 "subchannels of S80 above ED threshold");
2485 Simulator::Schedule(delay,
2488 "Reception of a 40 MHz signal that occupies the third and fourth "
2489 "subchannels of S80 below ED threshold");
2507 Simulator::Schedule(delay,
2510 "Reception of a 40 MHz signal that occupies the third and fourth "
2511 "subchannels of S80 above ED threshold");
2538 Simulator::Schedule(delay,
2541 "Reception of a 80 MHz signal that occupies S80 below ED threshold");
2559 Simulator::Schedule(delay,
2562 "Reception of a 80 MHz signal that occupies S80 above ED threshold");
2589 Simulator::Schedule(
2593 "Reception of a 160 MHz signal that occupies the whole band below ED threshold");
2611 Simulator::Schedule(
2615 "Reception of a 160 MHz signal that occupies the whole band above ED threshold");
2642 Simulator::Schedule(delay,
2645 "Reception of a 20 MHz signal that occupies S80 followed by the "
2646 "reception of another 20 MHz signal that occupies P20");
2689 Simulator::Schedule(delay,
2692 "Reception of a signal that occupies S80 followed by the reception of "
2693 "another signal that occupies S40");
2734 Simulator::Schedule(delay,
2737 "Reception of a signal that occupies S80 followed by the reception of "
2738 "another signal that occupies S20");
2779 Simulator::Schedule(
2783 "Reception of a 40 MHz HE PPDU that occupies S40 below CCA sensitivity threshold");
2800 Simulator::Schedule(
2804 "Reception of a 80 MHz HE PPDU that occupies S80 above CCA sensitivity threshold");
2831 Simulator::Schedule(delay,
2834 "Reception of a 20 MHz signal that generates a per20bitmap parameter "
2835 "change when previous CCA indication reports IDLE");
2862 Simulator::Schedule(
2866 "Reception of a 20 MHz signal that generates a per20bitmap parameter change when "
2867 "previous CCA indication reports BUSY for the primary channel");
2927 Simulator::Destroy();
2940 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.