26 #ifndef SPECTRUM_WIFI_PHY_H
27 #define SPECTRUM_WIFI_PHY_H
29 #include "ns3/antenna-model.h"
32 #include "ns3/spectrum-channel.h"
33 #include "ns3/spectrum-interference.h"
Ptr< SpectrumValue > GetTxPowerSpectralDensity(uint32_t centerFrequency, uint32_t channelWidth, double txPowerW) const
Simulation virtual time values and global simulation resolution.
virtual bool DoChannelSwitch(uint16_t id)
The default implementation does nothing and returns true.
TracedCallback< bool, uint32_t, double, Time > m_signalCb
Smart pointer class similar to boost::intrusive_ptr.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void StartReceivePacket(Ptr< Packet > packet, WifiTxVector txVector, WifiPreamble preamble, enum mpduType mpdutype, Ptr< InterferenceHelper::Event > event)
Starting receiving the payload of a packet (i.e.
virtual void SetReceiveErrorCallback(WifiPhy::RxErrorCallback callback)
void StartRx(Ptr< SpectrumSignalParameters > rxParams)
Input method for delivering a signal from the spectrum channel and low-level Phy interface to this Sp...
void SetChannel(Ptr< SpectrumChannel > channel)
Set the SpectrumChannel this SpectrumWifiPhy is to be connected to.
Forward calls to a chain of Callback.
void SetAntenna(Ptr< AntennaModel > antenna)
static TypeId GetTypeId(void)
bool m_disableWifiReception
forces this Phy to fail to sync on any signal
virtual Ptr< WifiChannel > GetChannel(void) const
Return the WifiChannel this WifiPhy is connected to.
Ptr< const SpectrumModel > GetRxSpectrumModel() const
Ptr< WifiSpectrumPhyInterface > GetSpectrumPhy(void) const
virtual void UnregisterListener(WifiPhyListener *listener)
virtual void SetSleepMode(void)
Put in sleep mode.
void(* SignalArrivalCallback)(bool signalType, uint32_t senderNodeId, double rxPower, Time duration)
Callback invoked when the Phy model starts to process a signal.
virtual void DoInitialize(void)
Initialize() implementation.
Ptr< SpectrumChannel > m_channel
SpectrumChannel that this SpectrumWifiPhy is connected to.
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
std::vector< uint16_t > GetOperationalChannelList(void) const
Return a list of channels to which it may be possible to roam By default, this method will return the...
Callback< void, bool > RxCallback
Callback invoked at the end of a frame reception, to notify whether the frame was received successful...
Ptr< AntennaModel > GetRxAntenna(void) const
Get the antenna model used for reception.
receive notifications about phy events.
virtual void DoDispose(void)
Destructor implementation.
void SetPacketReceivedCallback(RxCallback callback)
Set the packet received callback (invoked at the end of a frame reception), to notify whether the fra...
802.11 PHY layer modelThis PHY implements a spectrum-aware enhancement of the 802.11 SpectrumWifiPhy model.
virtual void RegisterListener(WifiPhyListener *listener)
Ptr< const SpectrumModel > m_rxSpectrumModel
void AddOperationalChannel(uint16_t channelNumber)
Add a channel number to the list of operational channels.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void SetReceiveOkCallback(WifiPhy::RxOkCallback callback)
void EndReceive(Ptr< Packet > packet, enum WifiPreamble preamble, enum mpduType mpdutype, Ptr< InterferenceHelper::Event > event)
The last bit of the packet has arrived.
virtual void SendPacket(Ptr< const Packet > packet, WifiTxVector txVector, enum WifiPreamble preamble)
Ptr< AntennaModel > m_antenna
void ClearOperationalChannelList(void)
Clear the list of operational channels.
Ptr< WifiSpectrumPhyInterface > m_wifiSpectrumPhyInterface
std::vector< uint16_t > m_operationalChannelList
List of possible channels.
void SwitchMaybeToCcaBusy(void)
Check if Phy state should move to CCA busy state based on current state of interference tracker...
virtual ~SpectrumWifiPhy()
virtual void ResumeFromSleep(void)
Resume from sleep mode.
a unique identifier for an interface.
void CreateWifiSpectrumPhyInterface(Ptr< NetDevice > device)
Method to encapsulate the creation of the WifiSpectrumPhyInterface object (used to bind the WifiSpect...
mpduType
This enumeration defines the type of an MPDU.
virtual bool DoFrequencySwitch(uint32_t frequency)
The default implementation does nothing and returns true.