diff -r 371ccf65ecdc -r 7d4ee30fd97f examples/wimax/wimax-multicast.cc --- a/examples/wimax/wimax-multicast.cc Sat Apr 10 13:47:55 2010 -0700 +++ b/examples/wimax/wimax-multicast.cc Sun Apr 11 21:34:41 2010 +0200 @@ -150,7 +150,7 @@ BSPosition = CreateObject (); BSPosition->SetPosition (Vector (1000, 0, 0)); - dev->GetPhy ()->SetMobility (BSPosition); + bsNodes.Get (0)->AggregateObject (BSPosition); bsDevs.Add (dev); if (verbose) { @@ -169,7 +169,7 @@ ss[i] = ssDevs.Get (i)->GetObject (); ss[i]->SetModulationType (WimaxPhy::MODULATION_TYPE_QAM16_12); - ss[i]->GetPhy ()->SetMobility (SSPosition[i]); + ssNodes.Get (i)->AggregateObject (SSPosition[i]); } diff -r 371ccf65ecdc -r 7d4ee30fd97f src/devices/wimax/simple-ofdm-wimax-channel.cc --- a/src/devices/wimax/simple-ofdm-wimax-channel.cc Sat Apr 10 13:47:55 2010 -0700 +++ b/src/devices/wimax/simple-ofdm-wimax-channel.cc Sun Apr 11 21:34:41 2010 +0200 @@ -145,23 +145,19 @@ double rxPowerDbm = 0; Ptr senderMobility = 0; Ptr receiverMobility = 0; - if (phy->GetMobility ()) - { - senderMobility = phy->GetMobility ()->GetObject (); - } + senderMobility = phy->GetDevice ()->GetNode ()->GetObject (); for (std::list >::iterator iter = m_phyList.begin (); iter != m_phyList.end (); ++iter) { - double delay = 0; + Time delay = Seconds(0); if (phy != *iter) { - if ((*iter)->GetMobility ()) - { - receiverMobility = (*iter)->GetMobility ()->GetObject (); - } + double distance = 0; + receiverMobility = (*iter)->GetDevice ()->GetNode ()->GetObject (); if (receiverMobility != 0 && senderMobility != 0 && m_loss != 0) { - delay = (senderMobility->GetDistanceFrom (receiverMobility)) / 300000000LL; + distance = senderMobility->GetDistanceFrom (receiverMobility); + delay = Seconds(distance/300000000.0); rxPowerDbm = m_loss->CalcRxPower (rxPowerDbm, senderMobility, receiverMobility); } simpleOfdmSendParam * param = new simpleOfdmSendParam (fecBlock, @@ -183,7 +179,7 @@ dstNode = dstNetDevice->GetObject ()->GetNode ()->GetId (); } Simulator::ScheduleWithContext (dstNode, - Seconds (delay) + BlockTime, + delay, &SimpleOfdmWimaxChannel::EndSend, this, *iter, @@ -196,7 +192,6 @@ void SimpleOfdmWimaxChannel::EndSend (Ptr rxphy, simpleOfdmSendParam * param) { - // std::cout << "END_SEND "; rxphy->StartReceive (param->GetFecBlock (), param->GetBurstSize (), param->GetIsFirstBlock (), diff -r 371ccf65ecdc -r 7d4ee30fd97f src/devices/wimax/simple-ofdm-wimax-phy.cc --- a/src/devices/wimax/simple-ofdm-wimax-phy.cc Sat Apr 10 13:47:55 2010 -0700 +++ b/src/devices/wimax/simple-ofdm-wimax-phy.cc Sun Apr 11 21:34:41 2010 +0200 @@ -311,12 +311,7 @@ } else { - Simulator::Schedule (Seconds (0), - &SimpleOfdmWimaxPhy::StartSendFecBlock, - this, - false, - modulationType, - direction); + StartSendFecBlock(false,modulationType,direction); } } @@ -392,7 +387,7 @@ SetBlockParameters (burstSize, modulationType); m_blockTime = GetBlockTransmissionTime (modulationType); } - Simulator::Schedule (Seconds (0), + Simulator::Schedule (m_blockTime, &SimpleOfdmWimaxPhy::EndReceiveFecBlock, this, fecBlock,