A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::BleInterferenceHelper Class Reference

This class provides helper functions for Ble interference handling. More...

#include "ble-interference-helper.h"

+ Inheritance diagram for ns3::BleInterferenceHelper:
+ Collaboration diagram for ns3::BleInterferenceHelper:

Public Member Functions

 BleInterferenceHelper (Ptr< const SpectrumModel > spectrumModel)
 Constructor. More...
 
 ~BleInterferenceHelper (void)
 
bool AddSignal (Ptr< const SpectrumValue > signal)
 Add the given signal to the set of accumulated signals. More...
 
void ClearSignals (void)
 Remove all currently accumulated signals. More...
 
Ptr< SpectrumValueGetSignalPsd (void) const
 Get the sum of all accumulated signals. More...
 
Ptr< const SpectrumModelGetSpectrumModel (void) const
 Get the SpectrumModel used by the helper. More...
 
bool RemoveSignal (Ptr< const SpectrumValue > signal)
 Remove the given signal to the set of accumulated signals. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< BleInterferenceHelper >
 SimpleRefCount ()
 Constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 

Private Member Functions

 BleInterferenceHelper (BleInterferenceHelper const &)
 Copy constructor - defined and not implemented. More...
 
BleInterferenceHelperoperator= (BleInterferenceHelper const &)
 Copy constructor - defined and not implemented. More...
 

Private Attributes

bool m_dirty
 Mark m_signal as dirty, whenever a signal is added or removed. More...
 
Ptr< SpectrumValuem_signal
 The precomputed sum of all accumulated signals. More...
 
std::set< Ptr< const
SpectrumValue > > 
m_signals
 The set of accumulated signals. More...
 
Ptr< const SpectrumModelm_spectrumModel
 The helpers SpectrumModel. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ns3::SimpleRefCount< BleInterferenceHelper >
static void Cleanup (void)
 Noop. More...
 

Detailed Description

This class provides helper functions for Ble interference handling.

Definition at line 40 of file ble-interference-helper.h.

Constructor & Destructor Documentation

ns3::BleInterferenceHelper::BleInterferenceHelper ( Ptr< const SpectrumModel spectrumModel)

Constructor.

Parameters
spectrumModelSpectrum Model to be used

Definition at line 33 of file ble-interference-helper.cc.

References m_signal, and m_spectrumModel.

ns3::BleInterferenceHelper::~BleInterferenceHelper ( void  )

Definition at line 40 of file ble-interference-helper.cc.

References m_signal, m_signals, and m_spectrumModel.

ns3::BleInterferenceHelper::BleInterferenceHelper ( BleInterferenceHelper const &  )
private

Copy constructor - defined and not implemented.

Member Function Documentation

bool ns3::BleInterferenceHelper::AddSignal ( Ptr< const SpectrumValue signal)

Add the given signal to the set of accumulated signals.

Never add the same signal more than once. The SpectrumModels of the signal and the one used for instantiation of the helper have to be the same.

Parameters
signalthe signal to be added
Returns
false, if the signal was not added because the SpectrumModel of the signal does not match the one of the helper, true otherwise.

Definition at line 48 of file ble-interference-helper.cc.

References m_dirty, m_signal, m_signals, m_spectrumModel, and NS_LOG_FUNCTION.

void ns3::BleInterferenceHelper::ClearSignals ( void  )

Remove all currently accumulated signals.

Definition at line 84 of file ble-interference-helper.cc.

References m_dirty, m_signals, and NS_LOG_FUNCTION.

Ptr< SpectrumValue > ns3::BleInterferenceHelper::GetSignalPsd ( void  ) const

Get the sum of all accumulated signals.

Returns
the sum of the signals

Definition at line 92 of file ble-interference-helper.cc.

References ns3::SpectrumValue::Copy(), m_dirty, m_signal, m_signals, m_spectrumModel, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Ptr<const SpectrumModel> ns3::BleInterferenceHelper::GetSpectrumModel ( void  ) const

Get the SpectrumModel used by the helper.

Returns
the helpers SpectrumModel

Referenced by RemoveSignal().

+ Here is the caller graph for this function:

BleInterferenceHelper& ns3::BleInterferenceHelper::operator= ( BleInterferenceHelper const &  )
private

Copy constructor - defined and not implemented.

Returns
bool ns3::BleInterferenceHelper::RemoveSignal ( Ptr< const SpectrumValue signal)

Remove the given signal to the set of accumulated signals.

Parameters
signalthe signal to be removed
Returns
false, if the signal was not removed (because it was not added before), true otherwise.

Definition at line 66 of file ble-interference-helper.cc.

References GetSpectrumModel(), m_dirty, m_signals, m_spectrumModel, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Data Documentation

bool ns3::BleInterferenceHelper::m_dirty
mutableprivate

Mark m_signal as dirty, whenever a signal is added or removed.

m_signal has to be recomputed before next use.

Definition at line 121 of file ble-interference-helper.h.

Referenced by AddSignal(), ClearSignals(), GetSignalPsd(), and RemoveSignal().

Ptr<SpectrumValue> ns3::BleInterferenceHelper::m_signal
mutableprivate

The precomputed sum of all accumulated signals.

Definition at line 115 of file ble-interference-helper.h.

Referenced by AddSignal(), BleInterferenceHelper(), GetSignalPsd(), and ~BleInterferenceHelper().

std::set<Ptr<const SpectrumValue> > ns3::BleInterferenceHelper::m_signals
private

The set of accumulated signals.

Definition at line 110 of file ble-interference-helper.h.

Referenced by AddSignal(), ClearSignals(), GetSignalPsd(), RemoveSignal(), and ~BleInterferenceHelper().

Ptr<const SpectrumModel> ns3::BleInterferenceHelper::m_spectrumModel
private

The documentation for this class was generated from the following files: