A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-interference.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009 CTTC
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Nicola Baldo <nbaldo@cttc.es>
18 */
19
20#ifndef LTE_INTERFERENCE_H
21#define LTE_INTERFERENCE_H
22
23#include <ns3/nstime.h>
24#include <ns3/object.h>
25#include <ns3/packet.h>
26#include <ns3/spectrum-value.h>
27
28#include <list>
29
30namespace ns3
31{
32
33class LteChunkProcessor;
34
40class LteInterference : public Object
41{
42 public:
44 ~LteInterference() override;
45
50 static TypeId GetTypeId();
51 void DoDispose() override;
52
61
70
79
85 virtual void StartRx(Ptr<const SpectrumValue> rxPsd);
86
92 virtual void EndRx();
93
102 virtual void AddSignal(Ptr<const SpectrumValue> spd, const Time duration);
103
110
111 protected:
115 virtual void ConditionallyEvaluateChunk();
121 virtual void DoAddSignal(Ptr<const SpectrumValue> spd);
128 virtual void DoSubtractSignal(Ptr<const SpectrumValue> spd, uint32_t signalId);
129
130 bool m_receiving{false};
131
138 nullptr};
144
151
154 std::list<Ptr<LteChunkProcessor>> m_rsPowerChunkProcessorList;
155
158 std::list<Ptr<LteChunkProcessor>> m_sinrChunkProcessorList;
159
162 std::list<Ptr<LteChunkProcessor>> m_interfChunkProcessorList;
163};
164
165} // namespace ns3
166
167#endif /* LTE_INTERFERENCE_H */
This class implements a gaussian interference model, i.e., all incoming signals are added to the tota...
static TypeId GetTypeId()
Get the type ID.
virtual void DoSubtractSignal(Ptr< const SpectrumValue > spd, uint32_t signalId)
Subtract signal.
Ptr< SpectrumValue > m_rxSignal
stores the power spectral density of the signal whose RX is being attempted
bool m_receiving
are we receiving?
virtual void AddSinrChunkProcessor(Ptr< LteChunkProcessor > p)
Add a LteChunkProcessor that will use the time-vs-frequency SINR calculated by this LteInterference i...
virtual void ConditionallyEvaluateChunk()
Conditionally evaluate chunk.
virtual void SetNoisePowerSpectralDensity(Ptr< const SpectrumValue > noisePsd)
Ptr< SpectrumValue > m_allSignals
stores the spectral power density of the sum of incoming signals; does not include noise,...
virtual void EndRx()
notify that the RX attempt has ended.
uint32_t m_lastSignalIdBeforeReset
the last signal ID before reset
std::list< Ptr< LteChunkProcessor > > m_rsPowerChunkProcessorList
all the processor instances that need to be notified whenever a new interference chunk is calculated
virtual void AddSignal(Ptr< const SpectrumValue > spd, const Time duration)
notify that a new signal is being perceived in the medium.
virtual void AddInterferenceChunkProcessor(Ptr< LteChunkProcessor > p)
Add a LteChunkProcessor that will use the time-vs-frequency interference calculated by this LteInterf...
Ptr< const SpectrumValue > m_noise
the noise value
virtual void AddRsPowerChunkProcessor(Ptr< LteChunkProcessor > p)
Add a LteChunkProcessor that will use the time-vs-frequency power calculated by this LteInterference ...
Time m_lastChangeTime
the time of the last change in m_TotalPower
std::list< Ptr< LteChunkProcessor > > m_interfChunkProcessorList
all the processor instances that need to be notified whenever a new interference chunk is calculated
virtual void StartRx(Ptr< const SpectrumValue > rxPsd)
Notify that the PHY is starting a RX attempt.
void DoDispose() override
Destructor implementation.
uint32_t m_lastSignalId
the last signal ID
std::list< Ptr< LteChunkProcessor > > m_sinrChunkProcessorList
all the processor instances that need to be notified whenever a new SINR chunk is calculated
virtual void DoAddSignal(Ptr< const SpectrumValue > spd)
Add signal function.
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1336
Every class exported by the ns3 library is enclosed in the ns3 namespace.