OLD | NEW |
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. |
11 * | 11 * |
12 * You should have received a copy of the GNU General Public License | 12 * You should have received a copy of the GNU General Public License |
13 * along with this program; if not, write to the Free Software | 13 * along with this program; if not, write to the Free Software |
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
15 * | 15 * |
16 * Authors: Sébastien Deronne <sebastien.deronne@gmail.com> | 16 * Authors: Sébastien Deronne <sebastien.deronne@gmail.com> |
17 */ | 17 */ |
18 | 18 |
19 // This example is used to validate NIST and YANS error rate models for VHT rate
s. | 19 // This example is used to validate NIST and YANS error rate models for VHT rate
s. |
20 // | 20 // |
21 // It outputs plots of the Frame Success Rate versus the Signal-to-noise ratio f
or | 21 // It outputs plots of the Frame Success Rate versus the Signal-to-noise ratio f
or |
22 // both NIST and YANS error rate models and for every HE MCS value. | 22 // both NIST and YANS error rate models and for every HE MCS value. |
23 | 23 |
| 24 #include "ns3/gnuplot.h" |
24 #include "ns3/core-module.h" | 25 #include "ns3/core-module.h" |
25 #include "ns3/yans-error-rate-model.h" | 26 #include "ns3/yans-error-rate-model.h" |
26 #include "ns3/nist-error-rate-model.h" | 27 #include "ns3/nist-error-rate-model.h" |
27 #include "ns3/gnuplot.h" | 28 #include "ns3/wifi-tx-vector.h" |
28 | |
29 #include <fstream> | |
30 #include <vector> | |
31 #include <cmath> | |
32 | 29 |
33 using namespace ns3; | 30 using namespace ns3; |
34 | 31 |
35 int main (int argc, char *argv[]) | 32 int main (int argc, char *argv[]) |
36 { | 33 { |
37 uint32_t FrameSize = 1500; //bytes | 34 uint32_t FrameSize = 1500; //bytes |
38 std::ofstream yansfile ("yans-frame-success-rate-ax.plt"); | 35 std::ofstream yansfile ("yans-frame-success-rate-ax.plt"); |
39 std::ofstream nistfile ("nist-frame-success-rate-ax.plt"); | 36 std::ofstream nistfile ("nist-frame-success-rate-ax.plt"); |
40 std::vector <std::string> modes; | 37 std::vector <std::string> modes; |
41 | 38 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 set style line 8 linewidth 5\n\ | 122 set style line 8 linewidth 5\n\ |
126 set style line 9 linewidth 5\n\ | 123 set style line 9 linewidth 5\n\ |
127 set style line 10 linewidth 5\n\ | 124 set style line 10 linewidth 5\n\ |
128 set style line 11 linewidth 5\n\ | 125 set style line 11 linewidth 5\n\ |
129 set style increment user"
); | 126 set style increment user"
); |
130 | 127 |
131 nistplot.GenerateOutput (nistfile); | 128 nistplot.GenerateOutput (nistfile); |
132 nistfile.close (); | 129 nistfile.close (); |
133 } | 130 } |
134 | 131 |
OLD | NEW |