1 | defProperty('res1', "node1-1.outdoor.orbit-lab.org", "ID of node 1")
|
---|
2 | defProperty('res2', "node1-2.outdoor.orbit-lab.org", "ID of node 2")
|
---|
3 |
|
---|
4 | defProperty('firstMCS', "http://cons-wm-01:5052/wimaxrf/mcsProfile?dl=13","Set MCS to profile 13 - QPSK (CTC) 1/2 ")
|
---|
5 | defProperty('secondMCS',"http://cons-wm-01:5052/wimaxrf/mcsProfile?dl=16","Set MCS to profile 16 - 16-QAM (CTC) 1/2")
|
---|
6 | defProperty('thirdMCS', "http://cons-wm-01:5052/wimaxrf/mcsProfile?dl=21","Set MCS to profile 21 - 64-QAM (CTC) 5/6")
|
---|
7 |
|
---|
8 | defGroup('first_node', property.res1) do |node|
|
---|
9 | node.net.x0.profile = '51'
|
---|
10 | node.net.x0.ip = "10.41.14.%y%"
|
---|
11 | node.net.x0.netmask = "255.255.0.0"
|
---|
12 |
|
---|
13 | node.addApplication("test:app:wimaxcu_app") do |app|
|
---|
14 | app.measure('status_link')
|
---|
15 | end
|
---|
16 | node.addApplication("test:app:iperf") do |app|
|
---|
17 | app.setProperty('udp', true)
|
---|
18 | app.setProperty('server', true)
|
---|
19 | app.setProperty('port', 23456)
|
---|
20 | app.setProperty('interval', "1")
|
---|
21 | app.setProperty('bind', "10.41.14.%y%")
|
---|
22 | app.measure('UDP_Rich_Info', :samples =>1)
|
---|
23 | end
|
---|
24 | end
|
---|
25 |
|
---|
26 | defGroup('second_node', property.res2) do |node|
|
---|
27 | node.net.x0.profile = '51'
|
---|
28 | node.net.x0.ip = "10.41.14.%y%"
|
---|
29 | node.net.x0.netmask = "255.255.0.0"
|
---|
30 |
|
---|
31 | node.addApplication("test:app:wimaxcu_app") do |app|
|
---|
32 | app.measure('status_link')
|
---|
33 | end
|
---|
34 | node.addApplication("test:app:iperf") do |app|
|
---|
35 | app.setProperty('udp', true)
|
---|
36 | app.setProperty('server', true)
|
---|
37 | app.setProperty('port', 23456)
|
---|
38 | app.setProperty('interval', "1")
|
---|
39 | app.setProperty('bind', "10.41.14.%y%")
|
---|
40 | app.measure('UDP_Rich_Info', :samples =>1)
|
---|
41 | end
|
---|
42 | end
|
---|
43 |
|
---|
44 |
|
---|
45 | onEvent(:ALL_UP_AND_INSTALLED) do |event|
|
---|
46 | wait 10
|
---|
47 | system("/usr/bin/wget -qO- #{property.firstMCS}")
|
---|
48 | wait 10
|
---|
49 | allGroups.startApplications
|
---|
50 | wait 50
|
---|
51 | system("/usr/bin/wget -qO- #{property.secondMCS}")
|
---|
52 | wait 50
|
---|
53 | system("/usr/bin/wget -qO- #{property.thirdMCS}")
|
---|
54 | wait 50
|
---|
55 | system("/usr/bin/wget -qO- #{property.firstMCS}")
|
---|
56 | wait 5
|
---|
57 | allGroups.stopApplications
|
---|
58 | Experiment.done
|
---|
59 | end
|
---|
60 |
|
---|
61 | addTab(:defaults)
|
---|
62 | addTab(:graph2) do |tab|
|
---|
63 | opts = { :postfix => %{This graph shows the Received Signal Strength (RSSI) on the WiMAX link.}, :updateEvery => 1 }
|
---|
64 | tab.addGraph("WiMAX Downlink RSSI (dBm)", opts) do |g|
|
---|
65 | data = Hash.new
|
---|
66 | index = 1
|
---|
67 | mpIn = ms('status_link')
|
---|
68 | mpIn.project(:oml_ts_server, :oml_sender_id, :rssi).each do |sample|
|
---|
69 | time, src, rssi = sample.tuple
|
---|
70 | if data[src].nil?
|
---|
71 | data[src] = [index,[]]
|
---|
72 | index += 1
|
---|
73 | end
|
---|
74 | data[src][1] << [time, rssi]
|
---|
75 | end
|
---|
76 | data.each do |src,value|
|
---|
77 | g.addLine(value[1], :label => "#{value[0]}")
|
---|
78 | end
|
---|
79 | end
|
---|
80 | opts = { :postfix => %{This graph shows the Carrier-to-Interference+Noise Ratio (CINR) on the WiMAX link.}, :updateEvery => 1 }
|
---|
81 | tab.addGraph("WiMAX Downlink CINR (dB)", opts) do |g|
|
---|
82 | data = Hash.new
|
---|
83 | index = 1
|
---|
84 | mpIn = ms('status_link')
|
---|
85 | mpIn.project(:oml_ts_server, :oml_sender_id, :cinr).each do |sample|
|
---|
86 | time, src, rssi = sample.tuple
|
---|
87 | if data[src].nil?
|
---|
88 | data[src] = [index,[]]
|
---|
89 | index += 1
|
---|
90 | end
|
---|
91 | data[src][1] << [time, rssi]
|
---|
92 | end
|
---|
93 | data.each do |src,value|
|
---|
94 | g.addLine(value[1], :label => "#{value[0]}")
|
---|
95 | end
|
---|
96 | end
|
---|
97 | opts = { :postfix => %{This graph shows the UDP Packet Loss Ratio measured by iperf.}, :updateEvery => 1 }
|
---|
98 | tab.addGraph("UDP packet loss (%)", opts) do |g|
|
---|
99 | data = Hash.new
|
---|
100 | index = 1
|
---|
101 | mpIn = ms('UDP_Rich_Info')
|
---|
102 | mpIn.project(:oml_ts_server, :oml_sender_id, :PLR).each do |sample|
|
---|
103 | time, src, plr = sample.tuple
|
---|
104 | if plr > 100
|
---|
105 | plr = 0
|
---|
106 | end
|
---|
107 | if data[src].nil?
|
---|
108 | data[src] = [index,[]]
|
---|
109 | index += 1
|
---|
110 | end
|
---|
111 | data[src][1] << [time, plr]
|
---|
112 | end
|
---|
113 | data.each do |src,value|
|
---|
114 | g.addLine(value[1], :label => "#{value[0]}")
|
---|
115 | end
|
---|
116 | end
|
---|
117 | opts = { :postfix => %{This graph shows throughput measured by iperf.}, :updateEvery => 1 }
|
---|
118 | tab.addGraph("UDP throughput (bytes)", opts) do |g|
|
---|
119 | data = Hash.new
|
---|
120 | index = 1
|
---|
121 | mpIn = ms('UDP_Rich_Info')
|
---|
122 | mpIn.project(:oml_ts_server, :oml_sender_id, :Bandwidth).each do |sample|
|
---|
123 | time, src, bw = sample.tuple
|
---|
124 | if data[src].nil?
|
---|
125 | data[src] = [index,[]]
|
---|
126 | index += 1
|
---|
127 | end
|
---|
128 | data[src][1] << [time, bw]
|
---|
129 | end
|
---|
130 | data.each do |src,value|
|
---|
131 | g.addLine(value[1], :label => "#{value[0]}")
|
---|
132 | end
|
---|
133 | end
|
---|
134 | end
|
---|
135 |
|
---|