|
222 |
NS_ASSERT (originalTxPowerSpectrum); |
222 |
NS_ASSERT (originalTxPowerSpectrum); |
223 |
|
223 |
|
224 |
|
224 |
|
225 |
Ptr<MobilityModel> txMobility = txPhy->GetMobility ()->GetObject<MobilityModel> (); |
225 |
Ptr<MobilityModel> txMobility = txPhy->GetMobility (); |
226 |
SpectrumModelUid_t txSpectrumModelUid = originalTxPowerSpectrum->GetSpectrumModelUid (); |
226 |
SpectrumModelUid_t txSpectrumModelUid = originalTxPowerSpectrum->GetSpectrumModelUid (); |
227 |
NS_LOG_LOGIC (" txSpectrumModelUid " << txSpectrumModelUid); |
227 |
NS_LOG_LOGIC (" txSpectrumModelUid " << txSpectrumModelUid); |
228 |
|
228 |
|
|
268 |
Ptr <SpectrumValue> rxPowerSpectrum = convertedTxPowerSpectrum->Copy (); |
268 |
Ptr <SpectrumValue> rxPowerSpectrum = convertedTxPowerSpectrum->Copy (); |
269 |
Time delay = MicroSeconds (0); |
269 |
Time delay = MicroSeconds (0); |
270 |
|
270 |
|
271 |
Ptr<MobilityModel> receiverMobility = (*rxPhyIterator)->GetMobility ()->GetObject<MobilityModel> (); |
271 |
Ptr<MobilityModel> receiverMobility = (*rxPhyIterator)->GetMobility (); |
272 |
|
272 |
|
273 |
if (txMobility && receiverMobility) |
273 |
if (txMobility && receiverMobility) |
274 |
{ |
274 |
{ |
|
296 |
} |
296 |
} |
297 |
|
297 |
|
298 |
Ptr<PacketBurst> pktBurstCopy = p->Copy (); |
298 |
Ptr<PacketBurst> pktBurstCopy = p->Copy (); |
299 |
Ptr<Object> netDevObj = (*rxPhyIterator)->GetDevice (); |
299 |
Ptr<NetDevice> netDev = (*rxPhyIterator)->GetDevice (); |
300 |
if (netDevObj) |
300 |
if (netDev) |
301 |
{ |
301 |
{ |
302 |
// the receiver has a NetDevice, so we expect that it is attached to a Node |
302 |
// the receiver has a NetDevice, so we expect that it is attached to a Node |
303 |
uint32_t dstNode = netDevObj->GetObject<NetDevice> ()->GetNode ()->GetId (); |
303 |
uint32_t dstNode = netDev->GetNode ()->GetId (); |
304 |
Simulator::ScheduleWithContext (dstNode, delay, &MultiModelSpectrumChannel::StartRx, this, |
304 |
Simulator::ScheduleWithContext (dstNode, delay, &MultiModelSpectrumChannel::StartRx, this, |
305 |
pktBurstCopy, rxPowerSpectrum, st, duration, *rxPhyIterator); |
305 |
pktBurstCopy, rxPowerSpectrum, st, duration, *rxPhyIterator); |
306 |
} |
306 |
} |
|
337 |
Ptr<NetDevice> |
337 |
Ptr<NetDevice> |
338 |
MultiModelSpectrumChannel::GetDevice (uint32_t i) const |
338 |
MultiModelSpectrumChannel::GetDevice (uint32_t i) const |
339 |
{ |
339 |
{ |
340 |
return m_phyVector.at (i)->GetDevice ()->GetObject<NetDevice> (); |
340 |
return m_phyVector.at (i)->GetDevice (); |
341 |
} |
341 |
} |
342 |
|
342 |
|
343 |
|
343 |
|