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

@ -66,10 +66,23 @@ IslMockChannel::TransmitStart (
Ptr<MockNetDevice> dst = DynamicCast<MockNetDevice> (GetDevice (destAddr)); Ptr<MockNetDevice> dst = DynamicCast<MockNetDevice> (GetDevice (destAddr));
if (dst == nullptr) if (dst == nullptr)
{
if (src->IsBroadcast () || src->IsMulticast ())
// 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"); NS_LOG_LOGIC ("destination address " << destAddr << " unknown on channel");
return false; return false;
} }
}
else else
{ {
return Deliver (p, src, dst, txTime); return Deliver (p, src, dst, txTime);

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);