Changes between Initial Version and Version 1 of Documentation/OtherApps/Iperf/IperfSender


Ignore:
Timestamp:
Sep 5, 2006, 9:42:10 PM (18 years ago)
Author:
Surya Satyavolu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/OtherApps/Iperf/IperfSender

    v1 v1  
     1{{{
     2
     3# Create an application representation from scratch
     4#
     5require 'handler/appDefinition'
     6
     7a = AppDefinition.create('test:app:iperfs')
     8a.name = "iperfs"
     9a.version(0, 0, 1)
     10a.shortDescription = "Iperf traffic generator"
     11a.description = <<TEXT
     12Iperf is a traffic generator for TCP and UDP traffic. It contains generators
     13producing various forms of packet streams and port for sending
     14these packets via various transports, such as TCP and UDP.
     15TEXT
     16
     17# addProperty(name, description, mnemonic, type, isDynamic = false, constraints = nil)
     18a.addProperty('udp', 'Use UDP, otherwise TCP by default', nil, String, false)
     19a.addProperty('client', 'Run as client', nil, String, false)
     20a.addProperty('port', 'Sender port number', nil, Integer, false)
     21a.addProperty('window', 'TCP Send Window Size', nil, Integer, false)
     22a.addProperty('len', "Payload length (bytes)", nil, Integer, false)
     23a.addProperty('bandwidth', "Offered load for UDP", nil, Integer, false)
     24a.addProperty('time', "Duration of traffic generation(secs)", nil, Integer, false)
     25a.addProperty('parallel', "Number of parallel flows", nil, Integer, false)
     26
     27a.path = "/usr/bin/iperf"
     28
     29if $0 == __FILE__
     30  require 'stringio'
     31  require 'rexml/document'
     32  include REXML
     33   
     34  sio = StringIO.new()
     35  a.to_xml.write(sio, 2)
     36  sio.rewind
     37  puts sio.read
     38 
     39  sio.rewind
     40  doc = Document.new(sio)
     41  t = AppDefinition.from_xml(doc.root)
     42
     43
     44}}}