|
|
| 74 |
m_delay = delay; |
74 |
m_delay = delay; |
| 75 |
} |
75 |
} |
| 76 |
|
76 |
|
| 77 |
void |
77 |
uint32_t |
| 78 |
YansWifiChannel::Send (Ptr<YansWifiPhy> sender, Ptr<const Packet> packet, double txPowerDbm, |
78 |
YansWifiChannel::Send (Ptr<YansWifiPhy> sender, Ptr<const Packet> packet, double txPowerDbm, |
| 79 |
WifiMode wifiMode, WifiPreamble preamble) const |
79 |
WifiMode wifiMode, WifiPreamble preamble) const |
| 80 |
{ |
80 |
{ |
| 81 |
Ptr<MobilityModel> senderMobility = sender->GetMobility ()->GetObject<MobilityModel> (); |
81 |
Ptr<MobilityModel> senderMobility = sender->GetMobility ()->GetObject<MobilityModel> (); |
| 82 |
NS_ASSERT (senderMobility != 0); |
82 |
NS_ASSERT (senderMobility != 0); |
| 83 |
uint32_t j = 0; |
83 |
uint32_t j = 0; |
|
|
84 |
uint32_t nReceivers = 0; |
| 84 |
for (PhyList::const_iterator i = m_phyList.begin (); i != m_phyList.end (); i++, j++) |
85 |
for (PhyList::const_iterator i = m_phyList.begin (); i != m_phyList.end (); i++, j++) |
| 85 |
{ |
86 |
{ |
| 86 |
if (sender != (*i)) |
87 |
if (sender != (*i)) |
|
|
| 107 |
{ |
108 |
{ |
| 108 |
dstNode = dstNetDevice->GetObject<NetDevice> ()->GetNode ()->GetId (); |
109 |
dstNode = dstNetDevice->GetObject<NetDevice> ()->GetNode ()->GetId (); |
| 109 |
} |
110 |
} |
|
|
111 |
nReceivers++; |
| 110 |
Simulator::ScheduleWithContext (dstNode, |
112 |
Simulator::ScheduleWithContext (dstNode, |
| 111 |
delay, &YansWifiChannel::Receive, this, |
113 |
delay, &YansWifiChannel::Receive, this, |
| 112 |
j, copy, rxPowerDbm, wifiMode, preamble); |
114 |
j, copy, rxPowerDbm, wifiMode, preamble); |
| 113 |
} |
115 |
} |
| 114 |
} |
116 |
} |
|
|
117 |
return nReceivers; |
| 115 |
} |
118 |
} |
| 116 |
|
119 |
|
| 117 |
void |
120 |
void |