From 1254c6060ddccd3ec67479c33b8fdcf340f61bee Mon Sep 17 00:00:00 2001 From: Tim Schubert Date: Wed, 22 Jul 2020 15:45:09 +0200 Subject: [PATCH] Fixup channel transmission to all nodes --- model/leo-mock-channel.cc | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/model/leo-mock-channel.cc b/model/leo-mock-channel.cc index a4c4554..eeebb0d 100644 --- a/model/leo-mock-channel.cc +++ b/model/leo-mock-channel.cc @@ -73,28 +73,12 @@ LeoMockChannel::TransmitStart (Ptr p, return false; } - if (dst == srcDev->GetBroadcast () || dst == srcDev->GetMulticast (Ipv4Address ())) // mcast group ignored + // TODO deliver only to devices in the same beam + for (DeviceIndex::iterator it = dests->begin (); it != dests->end(); it ++) { - for (DeviceIndex::iterator it = dests->begin (); it != dests->end(); it ++) - { - Deliver (p, srcDev, it->second, txTime); - } - return true; - } - else - { - DeviceIndex::iterator it = dests->find (dst); - if (it == dests->end ()) - { - NS_LOG_ERROR ("unable to find destination interface: " << dst); - return false; - } - else - { - // TODO deliver only to devices in the same beam - return Deliver (p, srcDev, it->second, txTime); - } + Deliver (p, srcDev, it->second, txTime); } + return true; } int32_t