21 #ifndef SPECTRUM_ANALYZER_H 22 #define SPECTRUM_ANALYZER_H 25 #include <ns3/spectrum-value.h> 26 #include <ns3/mobility-model.h> 27 #include <ns3/packet.h> 28 #include <ns3/nstime.h> 29 #include <ns3/net-device.h> 30 #include <ns3/spectrum-phy.h> 31 #include <ns3/spectrum-channel.h> 90 virtual void Start ();
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
Abstract base class for Spectrum-aware PHY layers.
Ptr< NetDevice > m_netDevice
Pointer to the NetDevice using this object.
void StartRx(Ptr< SpectrumSignalParameters > params)
Notify the SpectrumPhy instance of an incoming signal.
double m_noisePowerSpectralDensity
Noise power spectral density.
Forward calls to a chain of Callback.
Ptr< AntennaModel > m_antenna
Pointer to the Antenna model.
virtual void Start()
Start the spectrum analyzer.
void SetChannel(Ptr< SpectrumChannel > c)
Set the channel attached to this device.
bool m_active
True if the analyzer is active.
Ptr< NetDevice > GetDevice() const
Get the associated NetDevice instance.
Ptr< SpectrumChannel > m_channel
Pointer to the channel to be analyzed.
virtual ~SpectrumAnalyzer()
static TypeId GetTypeId(void)
Get the type ID.
virtual void Stop()
Stop the spectrum analyzer.
void SetRxSpectrumModel(Ptr< SpectrumModel > m)
Set the spectrum model used by the SpectrumAnalyzer to represent incoming signals.
void DoDispose()
Destructor implementation.
void SetDevice(Ptr< NetDevice > d)
Set the associated NetDevice instance.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Simple SpectrumPhy implementation that averages the spectrum power density of incoming transmissions ...
void AddSignal(Ptr< const SpectrumValue > psd)
Adds a signal to the data collected.
TracedCallback< Ptr< const SpectrumValue > > m_averagePowerSpectralDensityReportTrace
TracedCallback - average power spectral density report.
Ptr< SpectrumValue > m_sumPowerSpectralDensity
Sum of the received PSD.
Ptr< SpectrumModel > m_spectrumModel
Spectrum model.
Ptr< const SpectrumModel > GetRxSpectrumModel() const
Ptr< MobilityModel > GetMobility()
Get the associated MobilityModel instance.
virtual void GenerateReport()
Generates a report of the data collected so far.
void SetMobility(Ptr< MobilityModel > m)
Set the mobility model associated with this device.
Ptr< AntennaModel > GetRxAntenna()
Get the AntennaModel used by the NetDevice for reception.
void SubtractSignal(Ptr< const SpectrumValue > psd)
Removes a signal to the data collected.
a unique identifier for an interface.
Time m_lastChangeTime
When the last update happened.
Ptr< MobilityModel > m_mobility
Pointer to the mobility model.
Ptr< SpectrumValue > m_energySpectralDensity
Energy spectral density.
void SetAntenna(Ptr< AntennaModel > a)
Set the AntennaModel to be used.
void UpdateEnergyReceivedSoFar()
Updates the data about the received Energy.
Time m_resolution
Time resolution.