add transmit start for leo mock channels

This commit is contained in:
Tim Schubert 2020-06-24 22:23:09 +02:00
parent aa4e5b5ef0
commit 20ad318cb9
8 changed files with 55 additions and 94 deletions

View file

@ -52,37 +52,6 @@ IslMockChannel::~IslMockChannel()
{
}
bool IslMockChannel::Deliver (
Ptr<const Packet> p,
Ptr<MockNetDevice> src,
Ptr<MockNetDevice> dst,
Time txTime)
{
NS_LOG_FUNCTION (this << p << src->GetAddress () << dst->GetAddress () << txTime);
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)
{
Simulator::ScheduleWithContext (dst->GetNode ()->GetId (),
delay,
&MockNetDevice::Receive,
dst,
p->Copy (),
src);
// Call the tx anim callback on the net device
m_txrxMock (p, src, dst, txTime, delay);
return true;
}
else
{
NS_LOG_LOGIC (dst << " unreachable from " << src);
return false;
}
}
bool
IslMockChannel::TransmitStart (
Ptr<const Packet> p,