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 
35 
36 
37 class LteChunkProcessor;
38 
39 
40 
46 class LteInterference : public Object
47 {
48 public:
49  LteInterference ();
50  virtual ~LteInterference ();
51 
56  static TypeId GetTypeId (void);
57  virtual void DoDispose ();
58 
67 
76 
85 
91  void StartRx (Ptr<const SpectrumValue> rxPsd);
92 
93 
99  void EndRx ();
100 
101 
110  void AddSignal (Ptr<const SpectrumValue> spd, const Time duration);
111 
112 
119 
120 private:
137  void DoSubtractSignal (Ptr<const SpectrumValue> spd, uint32_t signalId);
138 
139 
140 
141  bool m_receiving;
142 
154 
158  uint32_t m_lastSignalId;
160 
163  std::list<Ptr<LteChunkProcessor> > m_rsPowerChunkProcessorList;
164 
167  std::list<Ptr<LteChunkProcessor> > m_sinrChunkProcessorList;
168 
171  std::list<Ptr<LteChunkProcessor> > m_interfChunkProcessorList;
172 
173 
174 };
175 
176 
177 
178 } // namespace ns3
179 
180 
181 
182 
183 
184 #endif /* LTE_INTERFERENCE_H */
Time m_lastChangeTime
the time of the last change in m_TotalPower
bool m_receiving
are we receiving?
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
Ptr< const SpectrumValue > m_noise
the noise value
virtual void DoDispose()
Destructor implementation.
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 ...
This class implements a gaussian interference model, i.e., all incoming signals are added to the tota...
void DoSubtractSignal(Ptr< const SpectrumValue > spd, uint32_t signalId)
Subtract signal.
static TypeId GetTypeId(void)
Get the type ID.
std::list< Ptr< LteChunkProcessor > > m_rsPowerChunkProcessorList
all the processor instances that need to be notified whenever a new interference chunk is calculated ...
void ConditionallyEvaluateChunk()
Considitionally evaluate chunk.
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)
Add signal function.
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
the last signal ID before reset
void StartRx(Ptr< const SpectrumValue > rxPsd)
notify that the PHY is starting a RX attempt
void AddSignal(Ptr< const SpectrumValue > spd, const Time duration)
notify that a new signal is being perceived in the medium.
Ptr< SpectrumValue > m_rxSignal
stores the power spectral density of the signal whose RX is being attempted
A base class which provides memory management and object aggregation.
Definition: object.h:87
a unique identifier for an interface.
Definition: type-id.h:58
Ptr< SpectrumValue > m_allSignals
stores the spectral power density of the sum of incoming signals; does not include noise...
uint32_t m_lastSignalId
the last signal ID