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 * Copyright (c) 2011 CTTC | 3 * Copyright (c) 2011 CTTC |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 channelHelper.SetChannel (m_channelType); | 151 channelHelper.SetChannel (m_channelType); |
152 channelHelper.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel"); | 152 channelHelper.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel"); |
153 Ptr<MatrixPropagationLossModel> propLoss = CreateObject<MatrixPropagationLossM
odel> ();·· | 153 Ptr<MatrixPropagationLossModel> propLoss = CreateObject<MatrixPropagationLossM
odel> ();·· |
154 propLoss->SetLoss (c.Get(0)->GetObject<MobilityModel> (), c.Get(1)->GetObject<
MobilityModel> (), lossDb, true); | 154 propLoss->SetLoss (c.Get(0)->GetObject<MobilityModel> (), c.Get(1)->GetObject<
MobilityModel> (), lossDb, true); |
155 channelHelper.AddPropagationLoss (propLoss); | 155 channelHelper.AddPropagationLoss (propLoss); |
156 Ptr<SpectrumChannel> channel = channelHelper.Create (); | 156 Ptr<SpectrumChannel> channel = channelHelper.Create (); |
157 | 157 |
158 | 158 |
159 WifiSpectrumValue5MhzFactory sf; | 159 WifiSpectrumValue5MhzFactory sf; |
160 | 160 |
161 uint32_t channelNumber = 1; | 161 uint8_t channelNumber = 1; |
162 Ptr<SpectrumValue> txPsd = sf.CreateTxPowerSpectralDensity (txPowerW, static_
cast<uint8_t>(channelNumber)); | 162 Ptr<SpectrumValue> txPsd = sf.CreateTxPowerSpectralDensity (txPowerW, channel
Number); |
163 | 163 |
164 Ptr<SpectrumValue> noisePsd = sf.CreateConstant (noisePsdValue); | 164 Ptr<SpectrumValue> noisePsd = sf.CreateConstant (noisePsdValue); |
165 | 165 |
166 AdhocAlohaNoackIdealPhyHelper deviceHelper; | 166 AdhocAlohaNoackIdealPhyHelper deviceHelper; |
167 deviceHelper.SetChannel (channel); | 167 deviceHelper.SetChannel (channel); |
168 deviceHelper.SetTxPowerSpectralDensity (txPsd); | 168 deviceHelper.SetTxPowerSpectralDensity (txPsd); |
169 deviceHelper.SetNoisePowerSpectralDensity (noisePsd); | 169 deviceHelper.SetNoisePowerSpectralDensity (noisePsd); |
170 deviceHelper.SetPhyAttribute ("Rate", DataRateValue (DataRate (phyRate))); | 170 deviceHelper.SetPhyAttribute ("Rate", DataRateValue (DataRate (phyRate))); |
171 NetDeviceContainer devices = deviceHelper.Install (c); | 171 NetDeviceContainer devices = deviceHelper.Install (c); |
172 | 172 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 AddTestCase (new SpectrumIdealPhyTestCase (snr, static_cast<uint64_t> (ach
ievableRate*0.1), true, "ns3::MultiModelSpectrumChannel"), TestCase::QUICK); | 239 AddTestCase (new SpectrumIdealPhyTestCase (snr, static_cast<uint64_t> (ach
ievableRate*0.1), true, "ns3::MultiModelSpectrumChannel"), TestCase::QUICK); |
240 AddTestCase (new SpectrumIdealPhyTestCase (snr, static_cast<uint64_t> (ach
ievableRate*0.5), true, "ns3::MultiModelSpectrumChannel"), TestCase::QUICK); | 240 AddTestCase (new SpectrumIdealPhyTestCase (snr, static_cast<uint64_t> (ach
ievableRate*0.5), true, "ns3::MultiModelSpectrumChannel"), TestCase::QUICK); |
241 AddTestCase (new SpectrumIdealPhyTestCase (snr, static_cast<uint64_t> (ach
ievableRate*0.95), true, "ns3::MultiModelSpectrumChannel"), TestCase::QUICK); | 241 AddTestCase (new SpectrumIdealPhyTestCase (snr, static_cast<uint64_t> (ach
ievableRate*0.95), true, "ns3::MultiModelSpectrumChannel"), TestCase::QUICK); |
242 AddTestCase (new SpectrumIdealPhyTestCase (snr, static_cast<uint64_t> (ach
ievableRate*1.05), false, "ns3::MultiModelSpectrumChannel"), TestCase::QUICK); | 242 AddTestCase (new SpectrumIdealPhyTestCase (snr, static_cast<uint64_t> (ach
ievableRate*1.05), false, "ns3::MultiModelSpectrumChannel"), TestCase::QUICK); |
243 AddTestCase (new SpectrumIdealPhyTestCase (snr, static_cast<uint64_t> (ach
ievableRate*2), false, "ns3::MultiModelSpectrumChannel"), TestCase::QUICK); | 243 AddTestCase (new SpectrumIdealPhyTestCase (snr, static_cast<uint64_t> (ach
ievableRate*2), false, "ns3::MultiModelSpectrumChannel"), TestCase::QUICK); |
244 AddTestCase (new SpectrumIdealPhyTestCase (snr, static_cast<uint64_t> (ach
ievableRate*4), false, "ns3::MultiModelSpectrumChannel"), TestCase::QUICK); | 244 AddTestCase (new SpectrumIdealPhyTestCase (snr, static_cast<uint64_t> (ach
ievableRate*4), false, "ns3::MultiModelSpectrumChannel"), TestCase::QUICK); |
245 } | 245 } |
246 } | 246 } |
247 | 247 |
248 static SpectrumIdealPhyTestSuite g_spectrumIdealPhyTestSuite; | 248 static SpectrumIdealPhyTestSuite g_spectrumIdealPhyTestSuite; |
LEFT | RIGHT |