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 * Copyright (c) 2009 The Boeing Company | 3 * Copyright (c) 2009 The Boeing Company |
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 } | 84 } |
85 else | 85 else |
86 { | 86 { |
87 socket->Close (); | 87 socket->Close (); |
88 } | 88 } |
89 } | 89 } |
90 | 90 |
91 | 91 |
92 int main (int argc, char *argv[]) | 92 int main (int argc, char *argv[]) |
93 { | 93 { |
94 std::string phyMode ("wifib-1mbs"); | 94 std::string phyMode ("DsssRate1Mbps"); |
95 double rss = -80; // -dBm | 95 double rss = -80; // -dBm |
96 uint32_t packetSize = 1000; // bytes | 96 uint32_t packetSize = 1000; // bytes |
97 uint32_t numPackets = 1; | 97 uint32_t numPackets = 1; |
98 double interval = 1.0; // seconds | 98 double interval = 1.0; // seconds |
99 bool verbose = false; | 99 bool verbose = false; |
100 | 100 |
101 CommandLine cmd; | 101 CommandLine cmd; |
102 | 102 |
103 cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode); | 103 cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode); |
104 cmd.AddValue ("rss", "received signal strength", rss); | 104 cmd.AddValue ("rss", "received signal strength", rss); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 Simulator::ScheduleWithContext (source->GetNode ()->GetId (), | 190 Simulator::ScheduleWithContext (source->GetNode ()->GetId (), |
191 Seconds (1.0), &GenerateTraffic,· | 191 Seconds (1.0), &GenerateTraffic,· |
192 source, packetSize, numPackets, interPacketInt
erval); | 192 source, packetSize, numPackets, interPacketInt
erval); |
193 | 193 |
194 Simulator::Run (); | 194 Simulator::Run (); |
195 Simulator::Destroy (); | 195 Simulator::Destroy (); |
196 | 196 |
197 return 0; | 197 return 0; |
198 } | 198 } |
199 | 199 |
OLD | NEW |