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 */
This class implements a gaussian interference model, i.e., all incoming signals are added to the tota...
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
static TypeId GetTypeId(void)
Get the type ID.
virtual void DoDispose()
Destructor implementation.
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.
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:88
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
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:1244
Every class exported by the ns3 library is enclosed in the ns3 namespace.