mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-09 10:31:43 +02:00
add transmit start for leo mock channels
This commit is contained in:
parent
aa4e5b5ef0
commit
20ad318cb9
8 changed files with 55 additions and 94 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue