# Create an application representation from scratch
require 'handler/appDefinition'

a = AppDefinition.create('test:app:iperfs') = "iperfs"
a.version(0, 0, 1)
a.shortDescription = "Iperf traffic generator"
a.description = <<TEXT
Iperf is a traffic generator for TCP and UDP traffic. It contains generators 
producing various forms of packet streams and port for sending
these packets via various transports, such as TCP and UDP.

# addProperty(name, description, mnemonic, type, isDynamic = false, constraints = nil)
a.addProperty('udp', 'Use UDP, otherwise TCP by default', nil, String, false)
a.addProperty('client', 'Run as client', nil, String, false)
a.addProperty('port', 'Sender port number', nil, Integer, false)
a.addProperty('window', 'TCP Send Window Size', nil, Integer, false)
a.addProperty('len', "Payload length (bytes)", nil, Integer, false)
a.addProperty('bandwidth', "Offered load for UDP", nil, Integer, false)
a.addProperty('time', "Duration of traffic generation(secs)", nil, Integer, false)
a.addProperty('parallel', "Number of parallel flows", nil, Integer, false)

a.path = "/usr/bin/iperf"

if $0 == __FILE__
  require 'stringio'
  require 'rexml/document'
  include REXML
  sio =
  a.to_xml.write(sio, 2)
  doc =
  t = AppDefinition.from_xml(doc.root)

Last modified 14 years ago Last modified on Sep 5, 2006, 9:42:10 PM
Note: See TracWiki for help on using the wiki.