Add limited support for ISL LOS anycast

This commit is contained in:
Tim Schubert 2020-07-17 12:49:50 +02:00
parent c2d69b4d03
commit 4628af9511
2 changed files with 16 additions and 3 deletions

View file

@ -67,8 +67,21 @@ IslMockChannel::TransmitStart (
if (dst == nullptr) if (dst == nullptr)
{ {
NS_LOG_LOGIC ("destination address " << destAddr << " unknown on channel"); if (src->IsBroadcast () || src->IsMulticast ())
return false; // try to deliver to every node in LOS
{
for (size_t i = 0; i < GetNDevices (); i ++)
{
if (i == srcId) continue;
Deliver (p, src, GetDevice (i), txTime);
}
return true;
}
else
{
NS_LOG_LOGIC ("destination address " << destAddr << " unknown on channel");
return false;
}
} }
else else
{ {

View file

@ -64,7 +64,7 @@ LeoMockChannel::TransmitStart (Ptr<const Packet> p,
} }
return Deliver (p, srcDev, it->second, txTime); return Deliver (p, srcDev, it->second, txTime);
} }
else else if (srcDev->IsBroadcast () || srcDev->IsMulticast ())
// space to ground delivers to everything within the beam // space to ground delivers to everything within the beam
{ {
DeviceIndex::iterator it = m_groundDevices.find (dst); DeviceIndex::iterator it = m_groundDevices.find (dst);