25 #include <ns3/simulator.h>
34 : m_receiving (false),
36 m_lastSignalIdBeforeReset (0)
100 (*m_rxSignal) += (*rxPsd);
111 NS_LOG_INFO (
"EndRx was already evaluated or RX was aborted");
157 (*m_allSignals) += (*spd);
166 if (deltaSignalId > 0)
168 (*m_allSignals) -= (*spd);
172 NS_LOG_INFO (
"ignoring signal scheduled for subtraction before last reset");
190 SpectrumValue interf = (*m_allSignals) - (*m_rxSignal) + (*m_noise);
196 (*it)->EvaluateChunk (sinr, duration);
200 (*it)->EvaluateChunk (interf, duration);
218 m_allSignals = Create<SpectrumValue> (noisePsd->GetSpectrumModel ());
Time m_lastChangeTime
the time of the last change in m_TotalPower
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
virtual ~LteInterference()
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< const SpectrumValue > m_noise
virtual void DoDispose()
Destructor implementation.
virtual void DoDispose(void)
Destructor implementation.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
void AddSinrChunkProcessor(Ptr< LteChunkProcessor > p)
Add a LteChunkProcessor that will use the time-vs-frequency SINR calculated by this LteInterference i...
std::list< Ptr< LteChunkProcessor > > m_sinrChunkProcessorList
all the processor instances that need to be notified whenever a new SINR chunk is calculated ...
void AddRsPowerChunkProcessor(Ptr< LteChunkProcessor > p)
Add a LteChunkProcessor that will use the time-vs-frequency power calculated by this LteInterference ...
void DoSubtractSignal(Ptr< const SpectrumValue > spd, uint32_t signalId)
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
static TypeId GetTypeId(void)
std::list< Ptr< LteChunkProcessor > > m_rsPowerChunkProcessorList
all the processor instances that need to be notified whenever a new interference chunk is calculated ...
void ConditionallyEvaluateChunk()
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void AddInterferenceChunkProcessor(Ptr< LteChunkProcessor > p)
Add a LteChunkProcessor that will use the time-vs-frequency interference calculated by this LteInterf...
void SetNoisePowerSpectralDensity(Ptr< const SpectrumValue > noisePsd)
void DoAddSignal(Ptr< const SpectrumValue > spd)
std::list< Ptr< LteChunkProcessor > > m_interfChunkProcessorList
all the processor instances that need to be notified whenever a new interference chunk is calculated ...
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
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
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
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
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...