Changes between Initial Version and Version 1 of Documentation/OtherApps/DITG/ITGReceiver


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

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/OtherApps/DITG/ITGReceiver

    v1 v1  
     1{{{
     2#
     3# Create an application representation from scratch
     4#
     5require 'handler/appDefinition'
     6
     7a = AppDefinition.create('test:app:itgr')
     8a.name = "itgr"
     9a.version(0, 0, 1)
     10a.shortDescription = "D-ITG Receiver"
     11a.description = <<TEXT
     12D-ITG 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)
     18#Flow options
     19a.addProperty('l', 'Log file', ?l, String, false)
     20
     21a.addMeasurement("receiverport", nil, [
     22    ['flow_no', 'int'],
     23    ['min_delay', Float],
     24    ['max_delay', Float],
     25    ['avg_delay', Float],
     26    ['avg_jitter', Float],
     27    ['delay_stdev', Float],
     28    ['avg_throughput', Float],
     29    ['packet_loss', Float]
     30 ])
     31
     32a.path = "/usr/local/bin/ITGRecv"
     33
     34if $0 == __FILE__
     35  require 'stringio'
     36  require 'rexml/document'
     37  include REXML
     38   
     39  sio = StringIO.new()
     40  a.to_xml.write(sio, 2)
     41  sio.rewind
     42  puts sio.read
     43 
     44  sio.rewind
     45  doc = Document.new(sio)
     46  t = AppDefinition.from_xml(doc.root)
     47  puts
     48  puts "-------------------------"
     49  puts
     50  t.to_xml.write($stdout, 2)
     51 
     52end
     53
     54
     55}}}