|
|
| 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 |
NS_LOG_LOGIC ("Creating converters between SpectrumModelUids " << txSpectrumModel->GetUid () << " and " << rxSpectrumModelUid ); |
| 194 |
SpectrumConverter converter (txSpectrumModel, rxSpectrumModel); |
194 |
if (!txSpectrumModel->IsOrthogonal (*rxSpectrumModel)) |
| 195 |
std::pair<SpectrumConverterMap_t::iterator, bool> ret2; |
195 |
{ |
| 196 |
ret2 = txInfoIterator->second.m_spectrumConverterMap.insert (std::make_pair (rxSpectrumModelUid, converter)); |
196 |
SpectrumConverter converter (txSpectrumModel, rxSpectrumModel); |
| 197 |
NS_ASSERT (ret2.second); |
197 |
std::pair<SpectrumConverterMap_t::iterator, bool> ret2; |
|
|
198 |
ret2 = txInfoIterator->second.m_spectrumConverterMap.insert (std::make_pair (rxSpectrumModelUid, converter)); |
| 199 |
NS_ASSERT (ret2.second); |
| 200 |
} |
| 198 |
} |
201 |
} |
| 199 |
} |
202 |
} |
| 200 |
else |
203 |
else |
|
|
| 289 |
{ |
292 |
{ |
| 290 |
NS_LOG_LOGIC (" converting txPowerSpectrum SpectrumModelUids" << txSpectrumModelUid << " --> " << rxSpectrumModelUid); |
293 |
NS_LOG_LOGIC (" converting txPowerSpectrum SpectrumModelUids" << txSpectrumModelUid << " --> " << rxSpectrumModelUid); |
| 291 |
SpectrumConverterMap_t::const_iterator rxConverterIterator = txInfoIteratorerator->second.m_spectrumConverterMap.find (rxSpectrumModelUid); |
294 |
SpectrumConverterMap_t::const_iterator rxConverterIterator = txInfoIteratorerator->second.m_spectrumConverterMap.find (rxSpectrumModelUid); |
| 292 |
NS_ASSERT (rxConverterIterator != txInfoIteratorerator->second.m_spectrumConverterMap.end ()); |
295 |
if (rxConverterIterator == txInfoIteratorerator->second.m_spectrumConverterMap.end ()) |
|
|
296 |
{ |
| 297 |
// No converter means TX SpectrumModel is orthogonal RX SpectrumModel |
| 298 |
continue; |
| 299 |
} |
| 293 |
convertedTxPowerSpectrum = rxConverterIterator->second.Convert (txParams->psd); |
300 |
convertedTxPowerSpectrum = rxConverterIterator->second.Convert (txParams->psd); |
| 294 |
} |
301 |
} |
| 295 |
|
302 |
|