LEFT | RIGHT |
(no file at all) | |
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) 2005,2006 INRIA | 3 * Copyright (c) 2005,2006 INRIA |
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 Ptr<YansWifiPhy> tx = CreateObject<YansWifiPhy> (); | 109 Ptr<YansWifiPhy> tx = CreateObject<YansWifiPhy> (); |
110 Ptr<YansWifiPhy> rx = CreateObject<YansWifiPhy> (); | 110 Ptr<YansWifiPhy> rx = CreateObject<YansWifiPhy> (); |
111 Ptr<ErrorRateModel> error = CreateObject<YansErrorRateModel> (); | 111 Ptr<ErrorRateModel> error = CreateObject<YansErrorRateModel> (); |
112 tx->SetErrorRateModel (error); | 112 tx->SetErrorRateModel (error); |
113 rx->SetErrorRateModel (error); | 113 rx->SetErrorRateModel (error); |
114 tx->SetChannel (channel); | 114 tx->SetChannel (channel); |
115 rx->SetChannel (channel); | 115 rx->SetChannel (channel); |
116 tx->SetMobility (posTx); | 116 tx->SetMobility (posTx); |
117 rx->SetMobility (posRx); | 117 rx->SetMobility (posRx); |
118 | 118 |
119 | 119 rx->SetReceiveOkCallback (MakeCallback (&PsrExperiment::Receive, this)); |
120 | 120 |
121 for (uint32_t i = 0; i < m_input.nPackets; ++i) | 121 for (uint32_t i = 0; i < m_input.nPackets; ++i) |
122 { | 122 { |
123 Simulator::Schedule (Seconds (i), &PsrExperiment::Send, this); | 123 Simulator::Schedule (Seconds (i), &PsrExperiment::Send, this); |
124 } | 124 } |
125 m_tx = tx; | 125 m_tx = tx; |
126 Simulator::Run (); | 126 Simulator::Run (); |
127 return m_output; | 127 return m_output; |
128 } | 128 } |
129 | 129 |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 { | 446 { |
447 PrintPsrVsDistance (argc, argv); | 447 PrintPsrVsDistance (argc, argv); |
448 } | 448 } |
449 else if (type == "PsrVsCollisionInterval") | 449 else if (type == "PsrVsCollisionInterval") |
450 { | 450 { |
451 PrintPsrVsCollisionInterval (argc, argv); | 451 PrintPsrVsCollisionInterval (argc, argv); |
452 } | 452 } |
453 | 453 |
454 return 0; | 454 return 0; |
455 } | 455 } |
LEFT | RIGHT |