mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-07-31 03:00:07 +02:00
Set mobility model for node instead of net device
This commit is contained in:
parent
f34ca7fafd
commit
6c154b6d60
5 changed files with 11 additions and 28 deletions
|
@ -117,8 +117,8 @@ MockChannel::GetDelay (Ptr<const MockNetDevice> src, Ptr<const MockNetDevice> ds
|
|||
{
|
||||
NS_LOG_DEBUG ("Get delay from " << src << " to " << dst);
|
||||
|
||||
Ptr<MobilityModel> modSrc = src->GetMobilityModel ();
|
||||
Ptr<MobilityModel> modDst = dst->GetMobilityModel ();
|
||||
Ptr<MobilityModel> modSrc = src->GetNode ()->GetObject<MobilityModel> ();
|
||||
Ptr<MobilityModel> modDst = dst->GetNode ()->GetObject<MobilityModel> ();
|
||||
|
||||
Time propagationDelay = m_propagationDelay->GetDelay (modSrc, modDst);
|
||||
|
||||
|
@ -163,7 +163,7 @@ MockChannel::Deliver (
|
|||
Time delay = GetDelay (src, dst, txTime);
|
||||
|
||||
/* Check if there is LOS between the source and destination */
|
||||
if (GetPropagationLoss ()->CalcRxPower(1, src->GetMobilityModel(), dst->GetMobilityModel()) > 0)
|
||||
if (GetPropagationLoss ()->CalcRxPower(1, src->GetNode ()->GetObject<MobilityModel> (), dst->GetNode ()->GetObject<MobilityModel> ()) > 0)
|
||||
{
|
||||
Simulator::ScheduleWithContext (dst->GetNode ()->GetId (),
|
||||
delay,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue