26 #ifndef SPECTRUM_WIFI_PHY_H 27 #define SPECTRUM_WIFI_PHY_H 29 #include "ns3/antenna-model.h" 30 #include "ns3/spectrum-channel.h" 31 #include "ns3/spectrum-model.h" 39 class WifiSpectrumPhyInterface;
40 struct WifiSpectrumSignalParameters;
58 friend class ::SpectrumWifiPhyFilterTest;
197 typedef std::map<WifiSpectrumBand, HeRu::RuSpec>
RuBand;
WifiSpectrumBand GetBand(uint16_t bandWidth, uint8_t bandIndex=0) override
Get the start band index and the stop band index for a given band.
std::map< uint16_t, RuBand > m_ruBands
For each channel width, store all the distinct spectrum bands associated with every RU in a channel o...
Simulation virtual time values and global simulation resolution.
TracedCallback< bool, uint32_t, double, Time > m_signalCb
Signal callback.
Smart pointer class similar to boost::intrusive_ptr.
void StartRx(Ptr< SpectrumSignalParameters > rxParams)
Input method for delivering a signal from the spectrum channel and low-level PHY interface to this Sp...
Ptr< const SpectrumModel > GetRxSpectrumModel()
Forward calls to a chain of Callback.
void DoDispose(void) override
Destructor implementation.
static TypeId GetTypeId(void)
Get the type ID.
bool m_disableWifiReception
forces this PHY to fail to sync on any signal
void StartTx(Ptr< WifiPpdu > ppdu) override
void SetAntenna(const Ptr< AntennaModel > antenna)
void(* SignalArrivalCallback)(bool signalType, uint32_t senderNodeId, double rxPower, Time duration)
Callback invoked when the PHY model starts to process a signal.
std::pair< int16_t, int16_t > SubcarrierRange
(lowest index, highest index) pair defining a subcarrier range
Ptr< SpectrumChannel > m_channel
SpectrumChannel that this SpectrumWifiPhy is connected to.
void Transmit(Ptr< WifiSpectrumSignalParameters > txParams)
This function is sending the signal to the Spectrum channel after finishing the configuration of the ...
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
double m_txMaskOuterBandMaximumRejection
The maximum rejection (in dBr) for the outer band of the transmit spectrum mask.
double m_txMaskOuterBandMinimumRejection
The minimum rejection (in dBr) for the outer band of the transmit spectrum mask.
void DoInitialize(void) override
Initialize() implementation.
std::pair< uint32_t, uint32_t > WifiSpectrumBand
typedef for a pair of start and stop sub-band indexes
802.11 PHY layer modelThis PHY implements a spectrum-aware enhancement of the 802.11 SpectrumWifiPhy model.
Ptr< const SpectrumModel > m_rxSpectrumModel
receive spectrum model
uint16_t GetGuardBandwidth(uint16_t currentChannelWidth) const override
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::map< WifiSpectrumBand, HeRu::RuSpec > RuBand
Map a spectrum band associated with an RU to the RU specification.
uint32_t GetBandBandwidth(void) const
std::tuple< double, double, double > GetTxMaskRejectionParams(void) const override
Ptr< Channel > GetChannel(void) const override
Return the Channel this WifiPhy is connected to.
Spectrum Wifi Phy Filter Test.
WifiPhyBand
Identifies the PHY band.
void UpdateInterferenceHelperBands(void)
This function is called to update the bands handled by the InterferenceHelper.
void SetFrequency(uint16_t freq) override
If the operating channel for this object has not been set yet, the given center frequency is saved an...
Ptr< AntennaModel > GetRxAntenna(void) const
Get the antenna model used for reception.
Ptr< AntennaModel > m_antenna
antenna model
void SetChannelNumber(uint8_t id) override
Set channel number.
Ptr< WifiSpectrumPhyInterface > m_wifiSpectrumPhyInterface
Spectrum PHY interface.
void ResetSpectrumModel(void)
Perform run-time spectrum model change.
double m_txMaskInnerBandMinimumRejection
The minimum rejection (in dBr) for the inner band of the transmit spectrum mask.
virtual ~SpectrumWifiPhy()
WifiSpectrumBand ConvertHeRuSubcarriers(uint16_t bandWidth, uint16_t guardBandwidth, HeRu::SubcarrierRange range, uint8_t bandIndex=0) const override
void SetChannel(const Ptr< SpectrumChannel > channel)
Set the SpectrumChannel this SpectrumWifiPhy is to be connected to.
void SetChannelWidth(uint16_t channelwidth) override
If the operating channel for this object has not been set yet, the given channel width is saved and w...
a unique identifier for an interface.
void ConfigureStandardAndBand(WifiPhyStandard standard, WifiPhyBand band) override
Configure the PHY-level parameters for different Wi-Fi standard.
void CreateWifiSpectrumPhyInterface(Ptr< NetDevice > device)
Method to encapsulate the creation of the WifiSpectrumPhyInterface object (used to bind the WifiSpect...