| 1 | {{{ |
| 2 | # |
| 3 | # Define a prototype |
| 4 | # |
| 5 | require 'handler/prototype' |
| 6 | require 'handler/filter' |
| 7 | require 'handler/appDefinition' |
| 8 | |
| 9 | |
| 10 | p = Prototype.create("test:proto:iperftcpsender") |
| 11 | p.name = "Iperf TCP Sender" |
| 12 | p.description = "Nodes which send a stream of packets" |
| 13 | p.defProperty('client', 'Host to send packets to') |
| 14 | #p.defProperty('port', 'Port to send packets to') |
| 15 | p.defProperty('len', 'Size of packets') |
| 16 | p.defProperty('window', 'TCP window Size (bytes)', 64000) |
| 17 | p.defProperty('time', 'Experiment duration (sec)', 10) |
| 18 | |
| 19 | iperfs = p.addApplication(:iperfs, "test:app:iperfs") |
| 20 | iperfs.bindProperty('client') |
| 21 | iperfs.bindProperty('len') |
| 22 | iperfs.bindProperty('time') |
| 23 | iperfs.bindProperty('window') |
| 24 | |
| 25 | # |
| 26 | if $0 == __FILE__ |
| 27 | p.to_xml.write($stdout, 2) |
| 28 | puts |
| 29 | end |
| 30 | |
| 31 | }}} |