20 #include "ns3/packet.h" 
   22 #include "ns3/packet-burst.h" 
   23 #include "ns3/spectrum-wifi-helper.h" 
   24 #include "ns3/wifi-spectrum-value-helper.h" 
   25 #include "ns3/spectrum-wifi-phy.h" 
   26 #include "ns3/interference-helper.h" 
   27 #include "ns3/nist-error-rate-model.h" 
   28 #include "ns3/wifi-mac-header.h" 
   29 #include "ns3/wifi-mac-trailer.h" 
   30 #include "ns3/wifi-phy-tag.h" 
   31 #include "ns3/wifi-phy-standard.h" 
   32 #include "ns3/wifi-spectrum-signal-parameters.h" 
   47   virtual void DoSetup (
void);
 
   50   void SendSignal (
double txPowerWatts);
 
   51   void SpectrumWifiPhyReceiver (
bool rxSucceeded);
 
   54   virtual void DoRun (
void);
 
   58   : 
TestCase (
"SpectrumWifiPhy test case receives one packet"),
 
   75   WifiMode mode = WifiPhy::GetOfdmRate6Mbps ();
 
   87   hdr.SetDuration (txDuration);
 
   95   txParams->
psd = txPowerSpectrum;
 
  124   m_phy = CreateObject<SpectrumWifiPhy> ();
 
  139   double txPowerWatts = 0.010;
 
  148   Simulator::Destroy ();
 
  213   virtual void DoRun (
void);
 
  237   double txPowerWatts = 0.010;
 
  246   Simulator::Destroy ();
 
static SpectrumWifiPhyTestSuite spectrumWifiPhyTestSuite
 
uint32_t m_notifyMaybeCcaBusyStart
 
Simulation virtual time values and global simulation resolution. 
 
HT OFDM PHY for the 5 GHz band (clause 20) 
 
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
 
void SpectrumWifiPhyReceiver(bool rxSucceeded)
 
void StartRx(Ptr< SpectrumSignalParameters > rxParams)
Input method for delivering a signal from the spectrum channel and low-level Phy interface to this Sp...
 
void AddPacketTag(const Tag &tag) const 
Add a packet tag. 
 
virtual void DoSetup(void)
Implementation to do any local setup required for this TestCase. 
 
virtual void NotifySleep(void)
Notify listeners that we went to sleep. 
 
uint32_t m_notifyRxEndError
 
virtual ~SpectrumWifiPhyListenerTest()
 
uint32_t GetSize(void) const 
Returns the the size in bytes of the packet (including the zero-filled initial payload). 
 
static const uint32_t FREQUENCY
 
virtual void NotifyMaybeCcaBusyStart(Time duration)
 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
 
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
 
virtual ~TestPhyListener()
 
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission. 
 
The MPDU is not part of an A-MPDU. 
 
void SendSignal(double txPowerWatts)
 
virtual void NotifyWakeup(void)
Notify listeners that we woke up. 
 
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite. 
 
receive notifications about phy events. 
 
SpectrumWifiPhyBasicTest()
 
Ptr< SpectrumSignalParameters > MakeSignal(double txPowerWatts)
 
virtual void NotifySwitchingStart(Time duration)
 
#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. 
 
SpectrumWifiPhyTestSuite()
 
virtual void NotifyRxStart(Time duration)
 
Time CalculateTxDuration(uint32_t size, WifiTxVector txVector, enum WifiPreamble preamble, double frequency)
 
Ptr< SpectrumPhy > txPhy
The SpectrumPhy instance that is making the transmission. 
 
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
 
virtual uint32_t GetFrequency(void) const 
 
void SetPacketReceivedCallback(RxCallback callback)
Set the packet received callback (invoked at the end of a frame reception), to notify whether the fra...
 
virtual void DoSetup(void)
Implementation to do any local setup required for this TestCase. 
 
TestPhyListener * m_listener
 
virtual void RegisterListener(WifiPhyListener *listener)
 
virtual ~SpectrumWifiPhyBasicTest()
 
virtual void NotifyRxEndError(void)
We have received the last bit of a packet for which NotifyRxStart was invoked first and...
 
virtual void SetChannelNumber(uint16_t id)
Set channel number. 
 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
 
virtual void NotifyRxEndOk(void)
We have received the last bit of a packet for which NotifyRxStart was invoked first and...
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
static const uint32_t CHANNEL_WIDTH
 
void AddTrailer(const Trailer &trailer)
Add trailer to this packet. 
 
void SetCcaMode1Threshold(double threshold)
Sets the CCA threshold (dBm). 
 
Ptr< Packet > packet
The packet being transmitted with this signal. 
 
Ptr< SpectrumWifiPhy > m_phy
 
virtual void ConfigureStandard(enum WifiPhyStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard. 
 
Ptr< SpectrumValue > psd
The Power Spectral Density of the waveform, in linear units. 
 
Time Seconds(double value)
Construct a Time in the indicated unit. 
 
SpectrumWifiPhyListenerTest()
 
virtual void SetFrequency(uint32_t freq)
 
TestPhyListener(void)
Create a test PhyListener. 
 
Tag for WifiTxVector and WifiPreamble information to be embedded in outgoing transmissions as a Packe...
 
Time duration
The duration of the packet transmission. 
 
static const uint16_t CHANNEL_NUMBER
 
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit. 
 
virtual void NotifyTxStart(Time duration, double txPowerDbm)
 
void AddHeader(const Header &header)
Add header to this packet. 
 
Implements the IEEE 802.11 MAC trailer. 
 
virtual uint32_t GetSerializedSize(void) const 
 
mpduType
This enumeration defines the type of an MPDU. 
 
void SetErrorRateModel(Ptr< ErrorRateModel > rate)
Sets the error rate model.