wiki:Documentation/OtherApps/Iperf/IperfUDPReceiver
#
# 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 11 years ago Last modified on 09/05/06 17:44:42