A Discrete-Event Network Simulator
API
lte-interference.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009 CTTC
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Nicola Baldo <nbaldo@cttc.es>
19  */
20 
21 
22 #ifndef LTE_INTERFERENCE_H
23 #define LTE_INTERFERENCE_H
24 
25 #include <ns3/object.h>
26 #include <ns3/packet.h>
27 #include <ns3/nstime.h>
28 #include <ns3/spectrum-value.h>
29 
30 #include <list>
31 
32 namespace ns3 {
33 
34 class LteChunkProcessor;
35 
36 
42 class LteInterference : public Object
43 {
44 public:
45  LteInterference ();
46  virtual ~LteInterference ();
47 
52  static TypeId GetTypeId (void);
53  virtual void DoDispose ();
54 
63 
72 
81 
87  virtual void StartRx (Ptr<const SpectrumValue> rxPsd);
88 
94  virtual void EndRx ();
95 
104  virtual void AddSignal (Ptr<const SpectrumValue> spd, const Time duration);
105 
112 
113 protected:
117  virtual void ConditionallyEvaluateChunk ();
123  virtual void DoAddSignal (Ptr<const SpectrumValue> spd);
130  virtual void DoSubtractSignal (Ptr<const SpectrumValue> spd, uint32_t signalId);
131 
132  bool m_receiving {false};
133 
145 
150  uint32_t m_lastSignalId {0};
152 
155  std::list<Ptr<LteChunkProcessor> > m_rsPowerChunkProcessorList;
156 
159  std::list<Ptr<LteChunkProcessor> > m_sinrChunkProcessorList;
160 
163  std::list<Ptr<LteChunkProcessor> > m_interfChunkProcessorList;
164 
165 
166 };
167 
168 
169 
170 } // namespace ns3
171 
172 
173 
174 
175 
176 #endif /* LTE_INTERFERENCE_H */
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::LteInterference::ConditionallyEvaluateChunk
virtual void ConditionallyEvaluateChunk()
Conditionally evaluate chunk.
Definition: lte-interference.cc:179
ns3::LteInterference::m_lastSignalId
uint32_t m_lastSignalId
the last signal ID
Definition: lte-interference.h:150
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LteInterference
This class implements a gaussian interference model, i.e., all incoming signals are added to the tota...
Definition: lte-interference.h:43
ns3::LteInterference::AddSignal
virtual void AddSignal(Ptr< const SpectrumValue > spd, const Time duration)
notify that a new signal is being perceived in the medium.
Definition: lte-interference.cc:135
ns3::LteInterference::m_noise
Ptr< const SpectrumValue > m_noise
the noise value
Definition: lte-interference.h:144
ns3::LteInterference::AddRsPowerChunkProcessor
virtual void AddRsPowerChunkProcessor(Ptr< LteChunkProcessor > p)
Add a LteChunkProcessor that will use the time-vs-frequency power calculated by this LteInterference ...
Definition: lte-interference.cc:231
ns3::LteInterference::DoSubtractSignal
virtual void DoSubtractSignal(Ptr< const SpectrumValue > spd, uint32_t signalId)
Subtract signal.
Definition: lte-interference.cc:162
ns3::LteInterference::m_sinrChunkProcessorList
std::list< Ptr< LteChunkProcessor > > m_sinrChunkProcessorList
all the processor instances that need to be notified whenever a new SINR chunk is calculated
Definition: lte-interference.h:159
ns3::LteInterference::m_lastChangeTime
Time m_lastChangeTime
the time of the last change in m_TotalPower
Definition: lte-interference.h:146
ns3::LteInterference::m_rsPowerChunkProcessorList
std::list< Ptr< LteChunkProcessor > > m_rsPowerChunkProcessorList
all the processor instances that need to be notified whenever a new interference chunk is calculated
Definition: lte-interference.h:155
ns3::LteInterference::m_lastSignalIdBeforeReset
uint32_t m_lastSignalIdBeforeReset
the last signal ID before reset
Definition: lte-interference.h:151
ns3::LteInterference::m_interfChunkProcessorList
std::list< Ptr< LteChunkProcessor > > m_interfChunkProcessorList
all the processor instances that need to be notified whenever a new interference chunk is calculated
Definition: lte-interference.h:163
ns3::LteInterference::m_rxSignal
Ptr< SpectrumValue > m_rxSignal
stores the power spectral density of the signal whose RX is being attempted
Definition: lte-interference.h:134
ns3::LteInterference::LteInterference
LteInterference()
Definition: lte-interference.cc:33
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
ns3::Object
A base class which provides memory management and object aggregation.
Definition: object.h:88
ns3::LteInterference::AddInterferenceChunkProcessor
virtual void AddInterferenceChunkProcessor(Ptr< LteChunkProcessor > p)
Add a LteChunkProcessor that will use the time-vs-frequency interference calculated by this LteInterf...
Definition: lte-interference.cc:245
ns3::LteInterference::DoAddSignal
virtual void DoAddSignal(Ptr< const SpectrumValue > spd)
Add signal function.
Definition: lte-interference.cc:154
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::LteInterference::m_allSignals
Ptr< SpectrumValue > m_allSignals
stores the spectral power density of the sum of incoming signals; does not include noise,...
Definition: lte-interference.h:139
ns3::LteInterference::SetNoisePowerSpectralDensity
virtual void SetNoisePowerSpectralDensity(Ptr< const SpectrumValue > noisePsd)
Definition: lte-interference.cc:212
ns3::LteInterference::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: lte-interference.cc:61
ns3::LteInterference::~LteInterference
virtual ~LteInterference()
Definition: lte-interference.cc:41
ns3::LteInterference::m_receiving
bool m_receiving
are we receiving?
Definition: lte-interference.h:132
ns3::LteInterference::EndRx
virtual void EndRx()
notify that the RX attempt has ended.
Definition: lte-interference.cc:107
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
ns3::LteInterference::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition: lte-interference.cc:47
ns3::LteInterference::StartRx
virtual void StartRx(Ptr< const SpectrumValue > rxPsd)
Notify that the PHY is starting a RX attempt.
Definition: lte-interference.cc:72
ns3::LteInterference::AddSinrChunkProcessor
virtual void AddSinrChunkProcessor(Ptr< LteChunkProcessor > p)
Add a LteChunkProcessor that will use the time-vs-frequency SINR calculated by this LteInterference i...
Definition: lte-interference.cc:238