5#ifndef NR_INTERFERENCE_H
6#define NR_INTERFERENCE_H
8#include "nr-chunk-processor.h"
9#include "nr-interference-base.h"
11#include <ns3/nstime.h>
12#include <ns3/object.h>
13#include <ns3/spectrum-signal-parameters.h>
14#include <ns3/spectrum-value.h>
15#include <ns3/traced-callback.h>
16#include <ns3/vector.h>
22static constexpr uint32_t NR_LTE_SIGNALID_INCR = 0x10000000;
27class NrMimoChunkProcessor;
56 void AddSignal(Ptr<const SpectrumValue> spd, Time duration)
override;
89 void AppendEvent(Time startTime, Time endTime,
double rxPowerW);
96 void EndRx()
override;
103 virtual void AddSignalMimo(Ptr<const SpectrumSignalParameters> params,
const Time& duration);
109 virtual void StartRxMimo(Ptr<const SpectrumSignalParameters> params);
134 NrCovMat CalcOutOfCellInterfCov()
const;
142 NrCovMat CalcCurrInterfCov(Ptr<const SpectrumSignalParameters> rxSignal,
143 const NrCovMat& outOfCellInterfCov)
const;
148 void AddInterference(
NrCovMat& covMat, Ptr<const SpectrumSignalParameters> signal)
const;
155 Ptr<const SpectrumSignalParameters> rxSignal)
const;
158 std::vector<Ptr<const SpectrumSignalParameters>> m_allSignalsMimo;
161 std::vector<Ptr<const SpectrumSignalParameters>> m_rxSignalsMimo;
164 std::list<Ptr<NrMimoChunkProcessor>> m_mimoChunkProcessors;
178 NiChange(Time time,
double delta);
184 Time GetTime()
const;
190 double GetDelta()
const;
197 bool operator<(
const NiChange& o)
const;
207 typedef std::vector<NiChange> NiChanges;
219 NrInterference::NiChanges::iterator GetPosition(Time moment);
222 void ConditionallyEvaluateChunk()
override;
228 void AddNiChangeEvent(NiChange change);
The NrInterference class inherits LteInterference which implements a gaussian interference model,...
NiChanges m_niChanges
List of events in which there is some change in the energy.
NrInterference()
NrInterference constructor.
virtual void AddMimoChunkProcessor(Ptr< NrMimoChunkProcessor > cp)
Add a chunk processor for MIMO signals.
TracedCallback< double > m_rssiPerProcessedChunk
! Trace for RSSI pre processed chunk.
virtual void DoSubtractSignalMimo(Ptr< const SpectrumSignalParameters > params, uint32_t signalId)
Notify that a signals transmission is ending. This means that the signal will be removed from the lis...
bool IsChannelBusyNow(double energyW)
Checks if the sum of the energy, including the energies that start at this moment is greater than pro...
~NrInterference() override
~NrInterference
bool IsChunkProcessorSet()
void AppendEvent(Time startTime, Time endTime, double rxPowerW)
Crates events corresponding to the new energy. One event corresponds to the moment when the energy st...
void AddSignal(Ptr< const SpectrumValue > spd, Time duration) override
Time GetEnergyDuration(double energyW)
Returns the duration of the energy that is above the energy provided detection threshold.
TracedCallback< double > m_snrPerProcessedChunk
! Trace for SNR per processed chunk.
virtual void StartRxMimo(Ptr< const SpectrumSignalParameters > params)
Notify the intended receiver that a new signal is being received. This method is to be called only fo...
virtual void AddSignalMimo(Ptr< const SpectrumSignalParameters > params, const Time &duration)
Notify that a new signal is being perceived in the medium. This method is to be called for all incomi...
void DoDispose() override
DoDispose method inherited from Object.
static TypeId GetTypeId()
Get the object TypeId.
NrSinrMatrix stores the MIMO SINR matrix, with dimension rank x nRbs.