mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 10:03:58 +02:00
Add limited support for ISL LOS anycast
This commit is contained in:
parent
c2d69b4d03
commit
4628af9511
2 changed files with 16 additions and 3 deletions
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue