# # Define a prototype # require 'handler/prototype' require 'handler/filter' require 'handler/appDefinition' p = Prototype.create("test:proto:iperfudpreceiver") p.name = "Iperf UDP Receiver" p.description = "Nodes which receive packets" p.defProperty('use_udp', 'Protocol to use') p.defProperty('server', 'Client/Server') #p.defProperty('port', 'Port to listen on') p.defProperty('time', 'Duration of experiment (seconds)', 10) p.defProperty('len', 'Payload length', 512) p.defProperty('report_interval', 'Interval between bandwidth reports', 1) iperfr = p.addApplication('iperfr', "test:app:iperfr") iperfr.bindProperty('udp') iperfr.bindProperty('server') #iperfr.bindProperty('port','port') iperfr.bindProperty('time') iperfr.bindProperty('len') iperfr.bindProperty('interval','report_interval') iperfr.addMeasurement('receiverport', Filter::SAMPLE, {Filter::SAMPLE_SIZE => 1}, [ ['flow_no'], ['throughput'], ['jitter'], ['packet_loss'] ] ) if $0 == __FILE__ p.to_xml.write($stdout, 2) puts end
Last modified
18 years ago
Last modified on Sep 5, 2006, 9:44:42 PM
Note:
See TracWiki
for help on using the wiki.