|
|
| 190 |
++txInfoIterator) |
190 |
++txInfoIterator) |
| 191 |
{ |
191 |
{ |
| 192 |
Ptr<const SpectrumModel> txSpectrumModel = txInfoIterator->second.m_txSpectrumModel; |
192 |
Ptr<const SpectrumModel> txSpectrumModel = txInfoIterator->second.m_txSpectrumModel; |
| 193 |
NS_LOG_LOGIC ("Creating converters between SpectrumModelUids " << txSpectrumModel->GetUid () << " and " << rxSpectrumModelUid ); |
193 |
SpectrumModelUid_t txSpectrumModelUid = txSpectrumModel->GetUid (); |
| 194 |
SpectrumConverter converter (txSpectrumModel, rxSpectrumModel); |
194 |
|
| 195 |
std::pair<SpectrumConverterMap_t::iterator, bool> ret2; |
195 |
if (rxSpectrumModelUid != txSpectrumModelUid && !txSpectrumModel->IsOrthogonal (*rxSpectrumModel)) |
| 196 |
ret2 = txInfoIterator->second.m_spectrumConverterMap.insert (std::make_pair (rxSpectrumModelUid, converter)); |
196 |
{ |
| 197 |
NS_ASSERT (ret2.second); |
197 |
NS_LOG_LOGIC ("Creating converter between SpectrumModelUid " << txSpectrumModel->GetUid () << " and " << rxSpectrumModelUid); |
|
|
198 |
SpectrumConverter converter (txSpectrumModel, rxSpectrumModel); |
| 199 |
std::pair<SpectrumConverterMap_t::iterator, bool> ret2; |
| 200 |
ret2 = txInfoIterator->second.m_spectrumConverterMap.insert (std::make_pair (rxSpectrumModelUid, converter)); |
| 201 |
NS_ASSERT (ret2.second); |
| 202 |
} |
| 198 |
} |
203 |
} |
| 199 |
} |
204 |
} |
| 200 |
else |
205 |
else |
|
|
| 231 |
Ptr<const SpectrumModel> rxSpectrumModel = rxInfoIterator->second.m_rxSpectrumModel; |
236 |
Ptr<const SpectrumModel> rxSpectrumModel = rxInfoIterator->second.m_rxSpectrumModel; |
| 232 |
SpectrumModelUid_t rxSpectrumModelUid = rxSpectrumModel->GetUid (); |
237 |
SpectrumModelUid_t rxSpectrumModelUid = rxSpectrumModel->GetUid (); |
| 233 |
|
238 |
|
| 234 |
if (rxSpectrumModelUid != txSpectrumModelUid) |
239 |
if (rxSpectrumModelUid != txSpectrumModelUid && !txSpectrumModel->IsOrthogonal (*rxSpectrumModel)) |
| 235 |
{ |
240 |
{ |
| 236 |
NS_LOG_LOGIC ("Creating converters between SpectrumModelUids " << txSpectrumModelUid << " and " << rxSpectrumModelUid ); |
241 |
NS_LOG_LOGIC ("Creating converter between SpectrumModelUid " << txSpectrumModelUid << " and " << rxSpectrumModelUid); |
| 237 |
|
242 |
|
| 238 |
SpectrumConverter converter (txSpectrumModel, rxSpectrumModel); |
243 |
SpectrumConverter converter (txSpectrumModel, rxSpectrumModel); |
| 239 |
std::pair<SpectrumConverterMap_t::iterator, bool> ret2; |
244 |
std::pair<SpectrumConverterMap_t::iterator, bool> ret2; |
|
|
| 289 |
{ |
294 |
{ |
| 290 |
NS_LOG_LOGIC (" converting txPowerSpectrum SpectrumModelUids" << txSpectrumModelUid << " --> " << rxSpectrumModelUid); |
295 |
NS_LOG_LOGIC (" converting txPowerSpectrum SpectrumModelUids" << txSpectrumModelUid << " --> " << rxSpectrumModelUid); |
| 291 |
SpectrumConverterMap_t::const_iterator rxConverterIterator = txInfoIteratorerator->second.m_spectrumConverterMap.find (rxSpectrumModelUid); |
296 |
SpectrumConverterMap_t::const_iterator rxConverterIterator = txInfoIteratorerator->second.m_spectrumConverterMap.find (rxSpectrumModelUid); |
| 292 |
NS_ASSERT (rxConverterIterator != txInfoIteratorerator->second.m_spectrumConverterMap.end ()); |
297 |
if (rxConverterIterator == txInfoIteratorerator->second.m_spectrumConverterMap.end ()) |
|
|
298 |
{ |
| 299 |
// No converter means TX SpectrumModel is orthogonal RX SpectrumModel |
| 300 |
continue; |
| 301 |
} |
| 293 |
convertedTxPowerSpectrum = rxConverterIterator->second.Convert (txParams->psd); |
302 |
convertedTxPowerSpectrum = rxConverterIterator->second.Convert (txParams->psd); |
| 294 |
} |
303 |
} |
| 295 |
|
304 |
|