OLD | NEW |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2009 CTTC | 3 * Copyright (c) 2009 CTTC |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 * This class implements a gaussian interference model, i.e., all | 42 * This class implements a gaussian interference model, i.e., all |
43 * incoming signals are added to the total interference. | 43 * incoming signals are added to the total interference. |
44 * | 44 * |
45 */ | 45 */ |
46 class LteInterference : public Object | 46 class LteInterference : public Object |
47 { | 47 { |
48 public: | 48 public: |
49 LteInterference (); | 49 LteInterference (); |
50 virtual ~LteInterference (); | 50 virtual ~LteInterference (); |
51 | 51 |
52 // inherited from Object | 52 /** |
| 53 * \brief Get the type ID. |
| 54 * \return the object TypeId |
| 55 */ |
53 static TypeId GetTypeId (void); | 56 static TypeId GetTypeId (void); |
54 virtual void DoDispose (); | 57 virtual void DoDispose (); |
55 | 58 |
56 /** | 59 /** |
57 * Add a LteChunkProcessor that will use the time-vs-frequency SINR | 60 * Add a LteChunkProcessor that will use the time-vs-frequency SINR |
58 * calculated by this LteInterference instance. Note that all the | 61 * calculated by this LteInterference instance. Note that all the |
59 * added LteChunkProcessors will work in parallel. | 62 * added LteChunkProcessors will work in parallel. |
60 * | 63 * |
61 * @param p | 64 * @param p |
62 */ | 65 */ |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 111 |
109 | 112 |
110 /** | 113 /** |
111 * | 114 * |
112 * @param noisePsd the Noise Power Spectral Density in power units | 115 * @param noisePsd the Noise Power Spectral Density in power units |
113 * (Watt, Pascal...) per Hz. | 116 * (Watt, Pascal...) per Hz. |
114 */ | 117 */ |
115 void SetNoisePowerSpectralDensity (Ptr<const SpectrumValue> noisePsd); | 118 void SetNoisePowerSpectralDensity (Ptr<const SpectrumValue> noisePsd); |
116 | 119 |
117 private: | 120 private: |
| 121 /** |
| 122 * Considitionally evaluate chunk |
| 123 */ |
118 void ConditionallyEvaluateChunk (); | 124 void ConditionallyEvaluateChunk (); |
| 125 /** |
| 126 * Add signal function |
| 127 * |
| 128 * @param spd the power spectral density of the new signal |
| 129 */ |
119 void DoAddSignal (Ptr<const SpectrumValue> spd); | 130 void DoAddSignal (Ptr<const SpectrumValue> spd); |
| 131 /** |
| 132 * Subtract signal |
| 133 * |
| 134 * @param spd the power spectral density of the new signal |
| 135 * @param signalId the signal ID |
| 136 */ |
120 void DoSubtractSignal (Ptr<const SpectrumValue> spd, uint32_t signalId); | 137 void DoSubtractSignal (Ptr<const SpectrumValue> spd, uint32_t signalId); |
121 | 138 |
122 | 139 |
123 | 140 |
124 bool m_receiving; | 141 bool m_receiving; ///< are we receiving? |
125 | 142 |
126 Ptr<SpectrumValue> m_rxSignal; /**< stores the power spectral density of | 143 Ptr<SpectrumValue> m_rxSignal; /**< stores the power spectral density of |
127 * the signal whose RX is being | 144 * the signal whose RX is being |
128 * attempted | 145 * attempted |
129 */ | 146 */ |
130 | 147 |
131 Ptr<SpectrumValue> m_allSignals; /**< stores the spectral | 148 Ptr<SpectrumValue> m_allSignals; /**< stores the spectral |
132 * power density of the sum of incoming signa
ls; | 149 * power density of the sum of incoming signa
ls; |
133 * does not include noise, includes the SPD o
f the signal being RX | 150 * does not include noise, includes the SPD o
f the signal being RX |
134 */ | 151 */ |
135 | 152 |
136 Ptr<const SpectrumValue> m_noise; | 153 Ptr<const SpectrumValue> m_noise; ///< the noise value |
137 | 154 |
138 Time m_lastChangeTime; /**< the time of the last change in | 155 Time m_lastChangeTime; /**< the time of the last change in |
139 m_TotalPower */ | 156 m_TotalPower */ |
140 | 157 |
141 uint32_t m_lastSignalId; | 158 uint32_t m_lastSignalId; ///< the last signal ID |
142 uint32_t m_lastSignalIdBeforeReset; | 159 uint32_t m_lastSignalIdBeforeReset; ///< the last signal ID before reset |
143 | 160 |
144 /** all the processor instances that need to be notified whenever | 161 /** all the processor instances that need to be notified whenever |
145 a new interference chunk is calculated */ | 162 a new interference chunk is calculated */ |
146 std::list<Ptr<LteChunkProcessor> > m_rsPowerChunkProcessorList; | 163 std::list<Ptr<LteChunkProcessor> > m_rsPowerChunkProcessorList; |
147 | 164 |
148 /** all the processor instances that need to be notified whenever | 165 /** all the processor instances that need to be notified whenever |
149 a new SINR chunk is calculated */ | 166 a new SINR chunk is calculated */ |
150 std::list<Ptr<LteChunkProcessor> > m_sinrChunkProcessorList; | 167 std::list<Ptr<LteChunkProcessor> > m_sinrChunkProcessorList; |
151 | 168 |
152 /** all the processor instances that need to be notified whenever | 169 /** all the processor instances that need to be notified whenever |
153 a new interference chunk is calculated */ | 170 a new interference chunk is calculated */ |
154 std::list<Ptr<LteChunkProcessor> > m_interfChunkProcessorList; | 171 std::list<Ptr<LteChunkProcessor> > m_interfChunkProcessorList; |
155 | 172 |
156 | 173 |
157 }; | 174 }; |
158 | 175 |
159 | 176 |
160 | 177 |
161 } // namespace ns3 | 178 } // namespace ns3 |
162 | 179 |
163 | 180 |
164 | 181 |
165 | 182 |
166 | 183 |
167 #endif /* LTE_INTERFERENCE_H */ | 184 #endif /* LTE_INTERFERENCE_H */ |
OLD | NEW |