| 85 | defGroup('Source1', property.source1) do |node| |
| 86 | node.addApplication("ping_app") do |app| |
| 87 | app.setProperty('dest_addr', property.sinkaddr11) |
| 88 | app.setProperty('count', 30) |
| 89 | app.setProperty('interval', 1) |
| 90 | app.measure('myping', :samples => 1) |
| 91 | end |
| 92 | |
| 93 | node.addApplication("ping_app") do |app| |
| 94 | app.setProperty('dest_addr', property.sinkaddr12) |
| 95 | app.setProperty('count', 30) |
| 96 | app.setProperty('interval', 1) |
| 97 | app.measure('myping', :samples => 1) |
| 98 | end |
| 99 | end |
| 100 | |
| 101 | |
| 102 | defGroup('Source2', property.source2) do |node| |
| 103 | node.addApplication("ping_app") do |app| |
| 104 | app.setProperty('dest_addr', property.sinkaddr21) |
| 105 | app.setProperty('count', 30) |
| 106 | app.setProperty('interval', 1) |
| 107 | app.measure('myping', :samples => 1) |
| 108 | end |
| 109 | |
| 110 | node.addApplication("ping_app") do |app| |
| 111 | app.setProperty('dest_addr', property.sinkaddr22) |
| 112 | app.setProperty('count', 30) |
| 113 | app.setProperty('interval', 1) |
| 114 | app.measure('myping', :samples => 1) |
| 115 | end |
| 116 | |
| 117 | node.addApplication("ping_app") do |app| |
| 118 | app.setProperty('dest_addr', property.sinkaddr23) |
| 119 | app.setProperty('count', 30) |
| 120 | app.setProperty('interval', 1) |
| 121 | app.measure('myping', :samples => 1) |
| 122 | end |
| 123 | end |
| 124 | |
| 125 | defGroup('Source3', property.source3) do |node| |
| 126 | node.addApplication("ping_app") do |app| |
| 127 | app.setProperty('dest_addr', property.sinkaddr31) |
| 128 | app.setProperty('count', 30) |
| 129 | app.setProperty('interval', 1) |
| 130 | app.measure('myping', :samples => 1) |
| 131 | end |
| 132 | |
| 133 | node.addApplication("ping_app") do |app| |
| 134 | app.setProperty('dest_addr', property.sinkaddr32) |
| 135 | app.setProperty('count', 30) |
| 136 | app.setProperty('interval', 1) |
| 137 | app.measure('myping', :samples => 1) |
| 138 | end |
| 139 | |
| 140 | node.addApplication("ping_app") do |app| |
| 141 | app.setProperty('dest_addr', property.sinkaddr33) |
| 142 | app.setProperty('count', 30) |
| 143 | app.setProperty('interval', 1) |
| 144 | app.measure('myping', :samples => 1) |
| 145 | end |
| 146 | |
| 147 | node.addApplication("ping_app") do |app| |
| 148 | app.setProperty('dest_addr', property.sinkaddr34) |
| 149 | app.setProperty('count', 30) |
| 150 | app.setProperty('interval', 1) |
| 151 | app.measure('myping', :samples => 1) |
| 152 | end |
| 153 | end |
| 154 | |
| 155 | defGroup('Source4', property.source4) do |node| |
| 156 | node.addApplication("ping_app") do |app| |
| 157 | app.setProperty('dest_addr', property.sinkaddr41) |
| 158 | app.setProperty('count', 30) |
| 159 | app.setProperty('interval', 1) |
| 160 | app.measure('myping', :samples => 1) |
| 161 | end |
| 162 | |
| 163 | node.addApplication("ping_app") do |app| |
| 164 | app.setProperty('dest_addr', property.sinkaddr42) |
| 165 | app.setProperty('count', 30) |
| 166 | app.setProperty('interval', 1) |
| 167 | app.measure('myping', :samples => 1) |
| 168 | end |
| 169 | end |
| 170 | |
| 171 | defGroup('Source5', property.source5) do |node| |
| 172 | node.addApplication("ping_app") do |app| |
| 173 | app.setProperty('dest_addr', property.sinkaddr51) |
| 174 | app.setProperty('count', 30) |
| 175 | app.setProperty('interval', 1) |
| 176 | app.measure('myping', :samples => 1) |
| 177 | end |
| 178 | end |
| 179 | |
| 180 | onEvent(:ALL_UP_AND_INSTALLED) do |event| |
| 181 | info "Starting the ping" |
| 182 | allGroups.startApplications |
| 183 | wait 5 |
| 184 | info "Stopping the ping" |
| 185 | allGroups.stopApplications |
| 186 | Experiment.done |
| 187 | end |