25 #include <ns3/simulator.h>
35 : m_receiving (false),
37 m_lastSignalIdBeforeReset (0)
101 (*m_rxSignal) += (*rxPsd);
112 NS_LOG_INFO (
"EndRx was already evaluated or RX was aborted");
158 (*m_allSignals) += (*spd);
167 if (deltaSignalId > 0)
169 (*m_allSignals) -= (*spd);
173 NS_LOG_INFO (
"ignoring signal scheduled for subtraction before last reset");
191 SpectrumValue interf = (*m_allSignals) - (*m_rxSignal) + (*m_noise);
197 (*it)->EvaluateSinrChunk (sinr, duration);
201 (*it)->EvaluateSinrChunk (interf, duration);
205 (*it)->EvaluateSinrChunk (*
m_rxSignal, duration);
219 m_allSignals = Create<SpectrumValue> (noisePsd->GetSpectrumModel ());
Time m_lastChangeTime
the time of the last change in m_TotalPower
keep track of time values and allow control of global simulation resolution
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
std::list< Ptr< LteSinrChunkProcessor > > m_interfChunkProcessorList
all the processor instances that need to be notified whenever a new interference chunk is calculated ...
void AddInterferenceChunkProcessor(Ptr< LteSinrChunkProcessor > p)
Add a LteSinrChunkProcessor that will use the time-vs-frequency interference calculated by this LteIn...
virtual ~LteInterference()
#define NS_ASSERT(condition)
Ptr< const SpectrumValue > m_noise
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
NS_LOG_COMPONENT_DEFINE("LteInterference")
void AddSinrChunkProcessor(Ptr< LteSinrChunkProcessor > p)
Add a LteSinrChunkProcessor that will use the time-vs-frequency SINR calculated by this LteInterferen...
void DoSubtractSignal(Ptr< const SpectrumValue > spd, uint32_t signalId)
#define NS_LOG_LOGIC(msg)
static TypeId GetTypeId(void)
void ConditionallyEvaluateChunk()
void SetNoisePowerSpectralDensity(Ptr< const SpectrumValue > noisePsd)
void DoAddSignal(Ptr< const SpectrumValue > spd)
void EndRx()
notify that the RX attempt has ended.
uint32_t m_lastSignalIdBeforeReset
void StartRx(Ptr< const SpectrumValue > rxPsd)
notify that the PHY is starting a RX attempt
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
void AddRsPowerChunkProcessor(Ptr< LteSinrChunkProcessor > p)
Add a LteSinrChunkProcessor that will use the time-vs-frequency power calculated by this LteInterfere...
#define NS_LOG_DEBUG(msg)
void AddSignal(Ptr< const SpectrumValue > spd, const Time duration)
notify that a new signal is being perceived in the medium.
double Sum(const SpectrumValue &x)
Ptr< SpectrumValue > m_rxSignal
stores the power spectral density of the signal whose RX is being attempted
std::list< Ptr< LteSinrChunkProcessor > > m_rsPowerChunkProcessorList
all the processor instances that need to be notified whenever a new interference chunk is calculated ...
std::list< Ptr< LteSinrChunkProcessor > > m_sinrChunkProcessorList
all the processor instances that need to be notified whenever a new SINR chunk is calculated ...
a base class which provides memory management and object aggregation
Set of values corresponding to a given SpectrumModel.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Ptr< SpectrumValue > m_allSignals
stores the spectral power density of the sum of incoming signals; does not include noise...