This class is an adaptor between class SpectrumWifiPhy (which inherits from WifiPhy) and class SpectrumChannel (which expects objects derived from class SpectrumPhy to be connected to it). More...
#include "wifi-spectrum-phy-interface.h"
Public Types | |
using | WifiSpectrumBands = std::vector< WifiSpectrumBandInfo > |
vector of spectrum bands handled by this interface | |
Public Member Functions | |
WifiSpectrumPhyInterface (FrequencyRange freqRange) | |
Constructor. | |
Ptr< Object > | GetAntenna () const override |
Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception. | |
const WifiSpectrumBands & | GetBands () const |
Get the vector of spectrum bands handled by this interface. | |
uint16_t | GetCenterFrequency () const |
Get the center frequency in MHz of the the spectrum channel this interface is attached to. | |
Ptr< SpectrumChannel > | GetChannel () const |
Get the spectrum channel this interface is attached to. | |
uint16_t | GetChannelWidth () const |
Get the channel width in MHz covered by the spectrum channel this interface is attached to. | |
Ptr< NetDevice > | GetDevice () const override |
Get the associated NetDevice instance. | |
const FrequencyRange & | GetFrequencyRange () const |
Get the frequency range covered by the spectrum channel this interface is attached to. | |
Ptr< MobilityModel > | GetMobility () const override |
Get the associated MobilityModel instance. | |
const HePhy::RuBands & | GetRuBands () const |
Get the HE RU spectrum bands handled by this interface. | |
Ptr< const SpectrumModel > | GetRxSpectrumModel () const override |
Ptr< const SpectrumWifiPhy > | GetSpectrumWifiPhy () const |
Get SpectrumWifiPhy object. | |
void | SetBands (WifiSpectrumBands &&bands) |
Set the vector of spectrum bands handled by this interface. | |
void | SetChannel (const Ptr< SpectrumChannel > c) override |
Set the channel attached to this device. | |
void | SetDevice (const Ptr< NetDevice > d) override |
Set the associated NetDevice instance. | |
void | SetMobility (const Ptr< MobilityModel > m) override |
Set the mobility model associated with this device. | |
void | SetRuBands (HePhy::RuBands &&ruBands) |
Set the HE RU spectrum bands handled by this interface (if any) | |
void | SetRxSpectrumModel (uint32_t centerFrequency, uint16_t channelWidth, uint32_t bandBandwidth, uint16_t guardBandwidth) |
Set the RX spectrum model. | |
void | SetSpectrumWifiPhy (const Ptr< SpectrumWifiPhy > phy) |
Connect SpectrumWifiPhy object. | |
void | StartRx (Ptr< SpectrumSignalParameters > params) override |
Notify the SpectrumPhy instance of an incoming signal. | |
void | StartTx (Ptr< SpectrumSignalParameters > params) |
Start transmission over the spectrum channel. | |
![]() | |
SpectrumPhy () | |
SpectrumPhy (const SpectrumPhy &)=delete | |
~SpectrumPhy () override | |
virtual Ptr< Object > | GetAntenna () const =0 |
Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception. | |
virtual Ptr< NetDevice > | GetDevice () const =0 |
Get the associated NetDevice instance. | |
virtual Ptr< MobilityModel > | GetMobility () const =0 |
Get the associated MobilityModel instance. | |
virtual Ptr< const SpectrumModel > | GetRxSpectrumModel () const =0 |
SpectrumPhy & | operator= (const SpectrumPhy &)=delete |
virtual void | SetChannel (Ptr< SpectrumChannel > c)=0 |
Set the channel attached to this device. | |
virtual void | SetDevice (Ptr< NetDevice > d)=0 |
Set the associated NetDevice instance. | |
virtual void | SetMobility (Ptr< MobilityModel > m)=0 |
Set the mobility model associated with this device. | |
virtual void | StartRx (Ptr< SpectrumSignalParameters > params)=0 |
Notify the SpectrumPhy instance of an incoming signal. | |
![]() | |
Object () | |
Constructor. | |
~Object () override | |
Destructor. | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. | |
void | Dispose () |
Dispose of this Object. | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. | |
bool | IsInitialized () const |
Check if the object has been initialized. | |
![]() | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. | |
virtual TypeId | GetInstanceTypeId () const =0 |
Get the most derived TypeId for this Object. | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. | |
![]() | |
static TypeId | GetTypeId () |
Get the type ID. | |
![]() | |
static TypeId | GetTypeId () |
Register this type. | |
![]() | |
static TypeId | GetTypeId () |
Get the type ID. | |
Private Member Functions | |
void | DoDispose () override |
Destructor implementation. | |
Private Attributes | |
WifiSpectrumBands | m_bands |
Store all the distinct spectrum bands associated with every channels widths. | |
uint16_t | m_centerFrequency |
center frequency in MHz | |
Ptr< SpectrumChannel > | m_channel |
spectrum channel | |
uint16_t | m_channelWidth |
channel width in MHz | |
FrequencyRange | m_frequencyRange |
frequency range | |
Ptr< NetDevice > | m_netDevice |
the device | |
HePhy::RuBands | m_ruBands |
Store all the distinct spectrum bands associated with every RU. | |
Ptr< const SpectrumModel > | m_rxSpectrumModel |
receive spectrum model | |
Ptr< SpectrumWifiPhy > | m_spectrumWifiPhy |
spectrum PHY | |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | DoDispose () |
Destructor implementation. | |
virtual void | DoInitialize () |
Initialize() implementation. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. | |
![]() | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
This class is an adaptor between class SpectrumWifiPhy (which inherits from WifiPhy) and class SpectrumChannel (which expects objects derived from class SpectrumPhy to be connected to it).
Introspection did not find any typical Config paths.
The adaptor is used only in the receive direction; in the transmit direction, the class SpectrumWifiPhy constructs signal parameters and directly accesses the SpectrumChannel
No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 144 bytes (on a 64-bit architecture).
Definition at line 44 of file wifi-spectrum-phy-interface.h.
using ns3::WifiSpectrumPhyInterface::WifiSpectrumBands = std::vector<WifiSpectrumBandInfo> |
vector of spectrum bands handled by this interface
Definition at line 130 of file wifi-spectrum-phy-interface.h.
ns3::WifiSpectrumPhyInterface::WifiSpectrumPhyInterface | ( | FrequencyRange | freqRange | ) |
Constructor.
freqRange | the frequency range covered by the interface |
Definition at line 43 of file wifi-spectrum-phy-interface.cc.
References NS_LOG_FUNCTION.
|
overrideprivatevirtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 54 of file wifi-spectrum-phy-interface.cc.
References m_bands, m_channel, m_netDevice, m_ruBands, m_rxSpectrumModel, m_spectrumWifiPhy, and NS_LOG_FUNCTION.
Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception.
Note that in general and depending on each module design, there can be multiple SpectrumPhy instances per NetDevice.
Implements ns3::SpectrumPhy.
Definition at line 137 of file wifi-spectrum-phy-interface.cc.
References ns3::SpectrumWifiPhy::GetAntenna(), and m_spectrumWifiPhy.
const WifiSpectrumPhyInterface::WifiSpectrumBands & ns3::WifiSpectrumPhyInterface::GetBands | ( | ) | const |
Get the vector of spectrum bands handled by this interface.
Definition at line 167 of file wifi-spectrum-phy-interface.cc.
References m_bands.
uint16_t ns3::WifiSpectrumPhyInterface::GetCenterFrequency | ( | ) | const |
Get the center frequency in MHz of the the spectrum channel this interface is attached to.
Definition at line 149 of file wifi-spectrum-phy-interface.cc.
References m_centerFrequency.
Ptr< SpectrumChannel > ns3::WifiSpectrumPhyInterface::GetChannel | ( | ) | const |
Get the spectrum channel this interface is attached to.
Definition at line 125 of file wifi-spectrum-phy-interface.cc.
References m_channel.
uint16_t ns3::WifiSpectrumPhyInterface::GetChannelWidth | ( | ) | const |
Get the channel width in MHz covered by the spectrum channel this interface is attached to.
Definition at line 155 of file wifi-spectrum-phy-interface.cc.
References m_channelWidth.
Get the associated NetDevice instance.
Implements ns3::SpectrumPhy.
Definition at line 78 of file wifi-spectrum-phy-interface.cc.
References m_netDevice.
const FrequencyRange & ns3::WifiSpectrumPhyInterface::GetFrequencyRange | ( | ) | const |
Get the frequency range covered by the spectrum channel this interface is attached to.
Definition at line 143 of file wifi-spectrum-phy-interface.cc.
References m_frequencyRange.
|
overridevirtual |
Get the associated MobilityModel instance.
Implements ns3::SpectrumPhy.
Definition at line 84 of file wifi-spectrum-phy-interface.cc.
References ns3::WifiPhy::GetMobility(), and m_spectrumWifiPhy.
const HePhy::RuBands & ns3::WifiSpectrumPhyInterface::GetRuBands | ( | ) | const |
Get the HE RU spectrum bands handled by this interface.
Definition at line 179 of file wifi-spectrum-phy-interface.cc.
References m_ruBands.
|
overridevirtual |
Implements ns3::SpectrumPhy.
Definition at line 131 of file wifi-spectrum-phy-interface.cc.
References m_rxSpectrumModel.
Ptr< const SpectrumWifiPhy > ns3::WifiSpectrumPhyInterface::GetSpectrumWifiPhy | ( | ) | const |
Get SpectrumWifiPhy object.
Definition at line 72 of file wifi-spectrum-phy-interface.cc.
References m_spectrumWifiPhy.
Referenced by ns3::WifiBandwidthFilter::DoFilter().
|
static |
Get the type ID.
Definition at line 36 of file wifi-spectrum-phy-interface.cc.
References ns3::TypeId::SetParent().
void ns3::WifiSpectrumPhyInterface::SetBands | ( | WifiSpectrumPhyInterface::WifiSpectrumBands && | bands | ) |
Set the vector of spectrum bands handled by this interface.
bands | vector of spectrum bands |
Definition at line 161 of file wifi-spectrum-phy-interface.cc.
References m_bands.
|
overridevirtual |
Set the channel attached to this device.
c | the channel |
Implements ns3::SpectrumPhy.
Definition at line 102 of file wifi-spectrum-phy-interface.cc.
References m_channel, m_rxSpectrumModel, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Set the associated NetDevice instance.
d | the NetDevice instance |
Implements ns3::SpectrumPhy.
Definition at line 90 of file wifi-spectrum-phy-interface.cc.
References m_netDevice.
|
overridevirtual |
Set the mobility model associated with this device.
m | the mobility model |
Implements ns3::SpectrumPhy.
Definition at line 96 of file wifi-spectrum-phy-interface.cc.
References m_spectrumWifiPhy, and ns3::WifiPhy::SetMobility().
void ns3::WifiSpectrumPhyInterface::SetRuBands | ( | HePhy::RuBands && | ruBands | ) |
Set the HE RU spectrum bands handled by this interface (if any)
ruBands | the HE RU spectrum bands |
Definition at line 173 of file wifi-spectrum-phy-interface.cc.
References m_ruBands.
void ns3::WifiSpectrumPhyInterface::SetRxSpectrumModel | ( | uint32_t | centerFrequency, |
uint16_t | channelWidth, | ||
uint32_t | bandBandwidth, | ||
uint16_t | guardBandwidth | ||
) |
Set the RX spectrum model.
centerFrequency | the center frequency in MHz |
channelWidth | the channel width in MHz |
bandBandwidth | the width of each band in Hz |
guardBandwidth | the width of the guard band in MHz |
Definition at line 110 of file wifi-spectrum-phy-interface.cc.
References ns3::WifiSpectrumValueHelper::GetSpectrumModel(), m_centerFrequency, m_channelWidth, m_rxSpectrumModel, and NS_LOG_FUNCTION.
void ns3::WifiSpectrumPhyInterface::SetSpectrumWifiPhy | ( | const Ptr< SpectrumWifiPhy > | phy | ) |
Connect SpectrumWifiPhy object.
phy | SpectrumWifiPhy object to be connected to this object |
Definition at line 66 of file wifi-spectrum-phy-interface.cc.
References m_spectrumWifiPhy.
|
overridevirtual |
Notify the SpectrumPhy instance of an incoming signal.
params | the parameters of the signals being received |
Implements ns3::SpectrumPhy.
Definition at line 185 of file wifi-spectrum-phy-interface.cc.
References m_spectrumWifiPhy, and ns3::SpectrumWifiPhy::StartRx().
void ns3::WifiSpectrumPhyInterface::StartTx | ( | Ptr< SpectrumSignalParameters > | params | ) |
Start transmission over the spectrum channel.
params | the parameters of the signal to transmit |
Definition at line 191 of file wifi-spectrum-phy-interface.cc.
References ns3::SpectrumWifiPhy::GetAntenna(), m_channel, and m_spectrumWifiPhy.
|
private |
Store all the distinct spectrum bands associated with every channels widths.
Definition at line 170 of file wifi-spectrum-phy-interface.h.
Referenced by DoDispose(), GetBands(), and SetBands().
|
private |
center frequency in MHz
Definition at line 165 of file wifi-spectrum-phy-interface.h.
Referenced by GetCenterFrequency(), and SetRxSpectrumModel().
|
private |
spectrum channel
Definition at line 164 of file wifi-spectrum-phy-interface.h.
Referenced by DoDispose(), GetChannel(), SetChannel(), and StartTx().
|
private |
channel width in MHz
Definition at line 166 of file wifi-spectrum-phy-interface.h.
Referenced by GetChannelWidth(), and SetRxSpectrumModel().
|
private |
frequency range
Definition at line 161 of file wifi-spectrum-phy-interface.h.
Referenced by GetFrequencyRange().
the device
Definition at line 163 of file wifi-spectrum-phy-interface.h.
Referenced by DoDispose(), GetDevice(), and SetDevice().
|
private |
Store all the distinct spectrum bands associated with every RU.
Definition at line 171 of file wifi-spectrum-phy-interface.h.
Referenced by DoDispose(), GetRuBands(), and SetRuBands().
|
private |
receive spectrum model
Definition at line 167 of file wifi-spectrum-phy-interface.h.
Referenced by DoDispose(), GetRxSpectrumModel(), SetChannel(), and SetRxSpectrumModel().
|
private |
spectrum PHY
Definition at line 162 of file wifi-spectrum-phy-interface.h.
Referenced by DoDispose(), GetAntenna(), GetMobility(), GetSpectrumWifiPhy(), SetMobility(), SetSpectrumWifiPhy(), StartRx(), and StartTx().