LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * This program is free software; you can redistribute it and/or modify | 3 * This program is free software; you can redistribute it and/or modify |
4 * it under the terms of the GNU General Public License version 2 as | 4 * it under the terms of the GNU General Public License version 2 as |
5 * published by the Free Software Foundation; | 5 * published by the Free Software Foundation; |
6 * | 6 * |
7 * This program is distributed in the hope that it will be useful, | 7 * This program is distributed in the hope that it will be useful, |
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 * GNU General Public License for more details. | 10 * GNU General Public License for more details. |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 YansWavePhyHelper::Default (void) | 126 YansWavePhyHelper::Default (void) |
127 { | 127 { |
128 YansWavePhyHelper helper; | 128 YansWavePhyHelper helper; |
129 helper.SetErrorRateModel ("ns3::NistErrorRateModel"); | 129 helper.SetErrorRateModel ("ns3::NistErrorRateModel"); |
130 return helper; | 130 return helper; |
131 } | 131 } |
132 | 132 |
133 void | 133 void |
134 YansWavePhyHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bo
ol promiscuous, bool explicitFilename) | 134 YansWavePhyHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bo
ol promiscuous, bool explicitFilename) |
135 { | 135 { |
136 NS_UNUSED(promiscuous); | 136 NS_UNUSED (promiscuous); |
137 // | 137 // |
138 // All of the Pcap enable functions vector through here including the ones | 138 // All of the Pcap enable functions vector through here including the ones |
139 // that are wandering through all of devices on perhaps all of the nodes in | 139 // that are wandering through all of devices on perhaps all of the nodes in |
140 // the system. We can only deal with devices of type WaveNetDevice. | 140 // the system. We can only deal with devices of type WaveNetDevice. |
141 // | 141 // |
142 Ptr<WaveNetDevice> device = nd->GetObject<WaveNetDevice> (); | 142 Ptr<WaveNetDevice> device = nd->GetObject<WaveNetDevice> (); |
143 if (device == 0) | 143 if (device == 0) |
144 { | 144 { |
145 NS_LOG_INFO ("YansWavePhyHelper::EnablePcapInternal(): Device " << &device
<< " not of type ns3::WaveNetDevice"); | 145 NS_LOG_INFO ("YansWavePhyHelper::EnablePcapInternal(): Device " << &device
<< " not of type ns3::WaveNetDevice"); |
146 return; | 146 return; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 | 382 |
383 device->SetChannelManager (CreateObject<ChannelManager> ()); | 383 device->SetChannelManager (CreateObject<ChannelManager> ()); |
384 device->SetChannelCoordinator (CreateObject<ChannelCoordinator> ()); | 384 device->SetChannelCoordinator (CreateObject<ChannelCoordinator> ()); |
385 device->SetVsaManager (CreateObject<VsaManager> ()); | 385 device->SetVsaManager (CreateObject<VsaManager> ()); |
386 device->SetChannelScheduler (m_channelScheduler.Create<ChannelScheduler> (
)); | 386 device->SetChannelScheduler (m_channelScheduler.Create<ChannelScheduler> (
)); |
387 | 387 |
388 for (uint32_t j = 0; j != m_physNumber; ++j) | 388 for (uint32_t j = 0; j != m_physNumber; ++j) |
389 { | 389 { |
390 Ptr<WifiPhy> phy = phyHelper.Create (node, device); | 390 Ptr<WifiPhy> phy = phyHelper.Create (node, device); |
391 phy->ConfigureStandard (WIFI_PHY_STANDARD_80211_10MHZ); | 391 phy->ConfigureStandard (WIFI_PHY_STANDARD_80211_10MHZ); |
392 phy->SetChannelNumber (static_cast<uint8_t>(ChannelManager::GetCch ())
); | 392 phy->SetChannelNumber (static_cast<uint8_t> (ChannelManager::GetCch ()
)); |
393 device->AddPhy (phy); | 393 device->AddPhy (phy); |
394 } | 394 } |
395 | 395 |
396 for (std::vector<uint32_t>::const_iterator k = m_macsForChannelNumber.begi
n (); | 396 for (std::vector<uint32_t>::const_iterator k = m_macsForChannelNumber.begi
n (); |
397 k != m_macsForChannelNumber.end (); ++k) | 397 k != m_macsForChannelNumber.end (); ++k) |
398 { | 398 { |
399 Ptr<WifiMac> wifiMac = macHelper.Create (); | 399 Ptr<WifiMac> wifiMac = macHelper.Create (); |
400 Ptr<OcbWifiMac> ocbMac = DynamicCast<OcbWifiMac> (wifiMac); | 400 Ptr<OcbWifiMac> ocbMac = DynamicCast<OcbWifiMac> (wifiMac); |
401 // we use WaveMacLow to replace original MacLow | 401 // we use WaveMacLow to replace original MacLow |
402 ocbMac->EnableForWave (device); | 402 ocbMac->EnableForWave (device); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 | 494 |
495 rmac->GetAttribute ("BK_EdcaTxopN", ptr); | 495 rmac->GetAttribute ("BK_EdcaTxopN", ptr); |
496 Ptr<EdcaTxopN> bk_edcaTxopN = ptr.Get<EdcaTxopN> (); | 496 Ptr<EdcaTxopN> bk_edcaTxopN = ptr.Get<EdcaTxopN> (); |
497 currentStream += bk_edcaTxopN->AssignStreams (currentStream); | 497 currentStream += bk_edcaTxopN->AssignStreams (currentStream); |
498 } | 498 } |
499 } | 499 } |
500 } | 500 } |
501 return (currentStream - stream); | 501 return (currentStream - stream); |
502 } | 502 } |
503 } // namespace ns3 | 503 } // namespace ns3 |
LEFT | RIGHT |