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 ());
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
void AddInterferenceChunkProcessor(Ptr< LteSinrChunkProcessor > p)
virtual ~LteInterference()
#define NS_ASSERT(condition)
#define NS_LOG_COMPONENT_DEFINE(name)
Ptr< const SpectrumValue > m_noise
virtual void DoDispose(void)
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
void AddSinrChunkProcessor(Ptr< LteSinrChunkProcessor > p)
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)
uint32_t m_lastSignalIdBeforeReset
void StartRx(Ptr< const SpectrumValue > rxPsd)
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
void AddRsPowerChunkProcessor(Ptr< LteSinrChunkProcessor > p)
#define NS_LOG_DEBUG(msg)
void AddSignal(Ptr< const SpectrumValue > spd, const Time duration)
double Sum(const SpectrumValue &x)
Ptr< SpectrumValue > m_rxSignal
std::list< Ptr< LteSinrChunkProcessor > > m_rsPowerChunkProcessorList
std::list< Ptr< LteSinrChunkProcessor > > m_sinrChunkProcessorList
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