1 | require 'net/http'
|
---|
2 | require 'uri'
|
---|
3 |
|
---|
4 | Experiment.name = "nhtest"
|
---|
5 | Experiment.project = "nhtest"
|
---|
6 |
|
---|
7 | defProperty('rate', 300, 'Bits per second sent from sender')
|
---|
8 | defProperty('packetSize', 256, 'Size of packets sent from sender')
|
---|
9 |
|
---|
10 | defNodes('ap1', [4,5]) {|node|
|
---|
11 | node.prototype("test:proto:receiver" , {
|
---|
12 | 'protocol' => 'udp'
|
---|
13 | })
|
---|
14 | node.net.w0.mode = "master"
|
---|
15 | node.net.w0.essid = "group1"
|
---|
16 | node.net.w0.type = 'a'
|
---|
17 | node.net.w0.channel = "36"
|
---|
18 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
19 | }
|
---|
20 |
|
---|
21 | defNodes('ap2', [4,10]) {|node|
|
---|
22 | node.prototype("test:proto:receiver" , {
|
---|
23 | 'protocol' => 'udp'
|
---|
24 | })
|
---|
25 | node.net.w0.mode = "master"
|
---|
26 | node.net.w0.essid = "group2"
|
---|
27 | node.net.w0.type = 'a'
|
---|
28 | node.net.w0.channel = "40"
|
---|
29 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
30 | }
|
---|
31 |
|
---|
32 | defNodes('ap3', [4,15]) {|node|
|
---|
33 | node.prototype("test:proto:receiver" , {
|
---|
34 | 'protocol' => 'udp'
|
---|
35 | })
|
---|
36 | node.net.w0.mode = "master"
|
---|
37 | node.net.w0.essid = "group3"
|
---|
38 | node.net.w0.type = 'a'
|
---|
39 | node.net.w0.channel = "44"
|
---|
40 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
41 | }
|
---|
42 |
|
---|
43 | defNodes('ap4', [5,7]) {|node|
|
---|
44 | node.prototype("test:proto:receiver" , {
|
---|
45 | 'protocol' => 'udp'
|
---|
46 | })
|
---|
47 | node.net.w0.mode = "master"
|
---|
48 | node.net.w0.essid = "group4"
|
---|
49 | node.net.w0.type = 'a'
|
---|
50 | node.net.w0.channel = "48"
|
---|
51 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
52 | }
|
---|
53 |
|
---|
54 | defNodes('ap5', [5,11]) {|node|
|
---|
55 | node.prototype("test:proto:receiver" , {
|
---|
56 | 'protocol' => 'udp'
|
---|
57 | })
|
---|
58 | node.net.w0.mode = "master"
|
---|
59 | node.net.w0.essid = "group5"
|
---|
60 | node.net.w0.type = 'a'
|
---|
61 | node.net.w0.channel = "52"
|
---|
62 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
63 | }
|
---|
64 |
|
---|
65 | defNodes('ap6', [5,12]) {|node|
|
---|
66 | node.prototype("test:proto:receiver" , {
|
---|
67 | 'protocol' => 'udp'
|
---|
68 | })
|
---|
69 | node.net.w0.mode = "master"
|
---|
70 | node.net.w0.essid = "group6"
|
---|
71 | node.net.w0.type = 'a'
|
---|
72 | node.net.w0.channel = "56"
|
---|
73 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
74 | }
|
---|
75 |
|
---|
76 | defNodes('ap7', [5,15]) {|node|
|
---|
77 | node.prototype("test:proto:receiver" , {
|
---|
78 | 'protocol' => 'udp'
|
---|
79 | })
|
---|
80 | node.net.w0.mode = "master"
|
---|
81 | node.net.w0.essid = "group7"
|
---|
82 | node.net.w0.type = 'a'
|
---|
83 | node.net.w0.channel = "60"
|
---|
84 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
85 | }
|
---|
86 |
|
---|
87 | defNodes('ap8', [5,18]) {|node|
|
---|
88 | node.prototype("test:proto:receiver" , {
|
---|
89 | 'protocol' => 'udp'
|
---|
90 | })
|
---|
91 | node.net.w0.mode = "master"
|
---|
92 | node.net.w0.essid = "group8"
|
---|
93 | node.net.w0.type = 'a'
|
---|
94 | node.net.w0.channel = "64"
|
---|
95 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
96 | }
|
---|
97 |
|
---|
98 | defNodes('ap9', [6,5]) {|node|
|
---|
99 | node.prototype("test:proto:receiver" , {
|
---|
100 | 'protocol' => 'udp'
|
---|
101 | })
|
---|
102 | node.net.w0.mode = "master"
|
---|
103 | node.net.w0.essid = "group9"
|
---|
104 | node.net.w0.type = 'a'
|
---|
105 | node.net.w0.channel = "149"
|
---|
106 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
107 | }
|
---|
108 |
|
---|
109 | defNodes('ap10', [6,7]) {|node|
|
---|
110 | node.prototype("test:proto:receiver" , {
|
---|
111 | 'protocol' => 'udp'
|
---|
112 | })
|
---|
113 | node.net.w0.mode = "master"
|
---|
114 | node.net.w0.essid = "group10"
|
---|
115 | node.net.w0.type = 'a'
|
---|
116 | node.net.w0.channel = "153"
|
---|
117 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
118 | }
|
---|
119 |
|
---|
120 | defNodes('sender1', [[4,4],[4,7],[4,9],[4,12],[4,14],[4,18],[6,6],[6,8],[6,10]]) {|node|
|
---|
121 | node.prototype("test:proto:sender", {
|
---|
122 | 'destinationHost' => '192.168.4.5',
|
---|
123 | 'packetSize' => 1024,
|
---|
124 | 'rate' => 300,
|
---|
125 | 'protocol' => 'udp'
|
---|
126 | })
|
---|
127 | node.net.w0.mode = "managed"
|
---|
128 | node.net.w0.essid = "group1"
|
---|
129 | node.net.w0.type = 'a'
|
---|
130 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
131 | }
|
---|
132 |
|
---|
133 | defNodes('sender2', [[6,13],[6,15],[6,18],[7,4],[7,6],[7,8],[7,10],[7,11],[7,13]]) {|node|
|
---|
134 | node.prototype("test:proto:sender", {
|
---|
135 | 'destinationHost' => '192.168.4.10',
|
---|
136 | 'packetSize' => 1024,
|
---|
137 | 'rate' => 300,
|
---|
138 | 'protocol' => 'udp'
|
---|
139 | })
|
---|
140 | node.net.w0.mode = "managed"
|
---|
141 | node.net.w0.essid = "group2"
|
---|
142 | node.net.w0.type = 'a'
|
---|
143 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
144 | }
|
---|
145 |
|
---|
146 | defNodes('sender3', [[7,14],[7,17],[8,9],[8,15],[8,17],[9,6],[9,8],[10,4],[10,6]]) {|node|
|
---|
147 | node.prototype("test:proto:sender", {
|
---|
148 | 'destinationHost' => '192.168.4.15',
|
---|
149 | 'packetSize' => 1024,
|
---|
150 | 'rate' => 300,
|
---|
151 | 'protocol' => 'udp'
|
---|
152 | })
|
---|
153 | node.net.w0.mode = "managed"
|
---|
154 | node.net.w0.essid = "group3"
|
---|
155 | node.net.w0.type = 'a'
|
---|
156 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
157 | }
|
---|
158 |
|
---|
159 | defNodes('sender4', [[10,8],[10,11],[10,16],[13,5],[13,7],[13,10],[13,11],[13,14],[13,16]]) {|node|
|
---|
160 | node.prototype("test:proto:sender", {
|
---|
161 | 'destinationHost' => '192.168.5.7',
|
---|
162 | 'packetSize' => 1024,
|
---|
163 | 'rate' => 300,
|
---|
164 | 'protocol' => 'udp'
|
---|
165 | })
|
---|
166 | node.net.w0.mode = "managed"
|
---|
167 | node.net.w0.essid = "group4"
|
---|
168 | node.net.w0.type = 'a'
|
---|
169 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
170 | }
|
---|
171 |
|
---|
172 | defNodes('sender5', [[13,17],[14,4],[14,6],[14,8],[14,9],[14,14],[14,17],[14,18],[15,4]]) {|node|
|
---|
173 | node.prototype("test:proto:sender", {
|
---|
174 | 'destinationHost' => '192.168.5.11',
|
---|
175 | 'packetSize' => 1024,
|
---|
176 | 'rate' => 300,
|
---|
177 | 'protocol' => 'udp'
|
---|
178 | })
|
---|
179 | node.net.w0.mode = "managed"
|
---|
180 | node.net.w0.essid = "group5"
|
---|
181 | node.net.w0.type = 'a'
|
---|
182 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
183 | }
|
---|
184 |
|
---|
185 | defNodes('sender6', [[15,6],[15,9],[15,10],[15,13],[15,17],[5,16],[5,17],[8,4],[8,5]]) {|node|
|
---|
186 | node.prototype("test:proto:sender", {
|
---|
187 | 'destinationHost' => '192.168.5.12',
|
---|
188 | 'packetSize' => 1024,
|
---|
189 | 'rate' => 300,
|
---|
190 | 'protocol' => 'udp'
|
---|
191 | })
|
---|
192 | node.net.w0.mode = "managed"
|
---|
193 | node.net.w0.essid = "group6"
|
---|
194 | node.net.w0.type = 'a'
|
---|
195 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
196 | }
|
---|
197 |
|
---|
198 | defNodes('sender7', [[7,9],[8,11],[8,12],[7,12],[7,15],[7,18],[8,8],[8,16],[8,18]]) {|node|
|
---|
199 | node.prototype("test:proto:sender", {
|
---|
200 | 'destinationHost' => '192.168.5.15',
|
---|
201 | 'packetSize' => 1024,
|
---|
202 | 'rate' => 300,
|
---|
203 | 'protocol' => 'udp'
|
---|
204 | })
|
---|
205 | node.net.w0.mode = "managed"
|
---|
206 | node.net.w0.essid = "group7"
|
---|
207 | node.net.w0.type = 'a'
|
---|
208 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
209 | }
|
---|
210 |
|
---|
211 | defNodes('sender8', [[10,7],[9,9],[11,4],[11,6],[11,7],[9,12],[11,16],[12,6],[13,4]]) {|node|
|
---|
212 | node.prototype("test:proto:sender", {
|
---|
213 | 'destinationHost' => '192.168.5.18',
|
---|
214 | 'packetSize' => 1024,
|
---|
215 | 'rate' => 300,
|
---|
216 | 'protocol' => 'udp'
|
---|
217 | })
|
---|
218 | node.net.w0.mode = "managed"
|
---|
219 | node.net.w0.essid = "group8"
|
---|
220 | node.net.w0.type = 'a'
|
---|
221 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
222 | }
|
---|
223 |
|
---|
224 | defNodes('sender9', [[13,8],[13,13],[12,14],[13,15],[13,18],[14,5],[13,6],[12,8],[14,10]]) {|node|
|
---|
225 | node.prototype("test:proto:sender", {
|
---|
226 | 'destinationHost' => '192.168.6.5',
|
---|
227 | 'packetSize' => 1024,
|
---|
228 | 'rate' => 300,
|
---|
229 | 'protocol' => 'udp'
|
---|
230 | })
|
---|
231 | node.net.w0.mode = "managed"
|
---|
232 | node.net.w0.essid = "group9"
|
---|
233 | node.net.w0.type = 'a'
|
---|
234 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
235 | }
|
---|
236 |
|
---|
237 | defNodes('sender10', [[15,14],[14,16],[14,15],[16,4],[15,5],[15,8],[15,11],[16,12],[15,16]]) {|node|
|
---|
238 | node.prototype("test:proto:sender", {
|
---|
239 | 'destinationHost' => '192.168.6.7',
|
---|
240 | 'packetSize' => 1024,
|
---|
241 | 'rate' => 300,
|
---|
242 | 'protocol' => 'udp'
|
---|
243 | })
|
---|
244 | node.net.w0.mode = "managed"
|
---|
245 | node.net.w0.essid = "group10"
|
---|
246 | node.net.w0.type = 'a'
|
---|
247 | node.net.w0.ip = "%192.168.%x.%y"
|
---|
248 | }
|
---|
249 |
|
---|
250 | whenAllInstalled() {|node|
|
---|
251 | # Wait for associations to complete (Replace with more clever ssh-based mechanism).
|
---|
252 | wait 30
|
---|
253 |
|
---|
254 | allNodes.startApplications
|
---|
255 | wait 120
|
---|
256 |
|
---|
257 | Experiment.done
|
---|
258 | }
|
---|
259 |
|
---|