wiki:Documentation/OtherApps/DITG/ITGDecoder
#
# Define a prototype
#
require 'handler/prototype'
require 'handler/filter'
require 'handler/appDefinition'

p = Prototype.create("test:proto:itgdecoder")
p.name = "ITG Decoder"
p.description = "Decodes output and prints results"
p.defProperty('logfile', 'Logfile')
p.defProperty('tput_report_interval', 'Report interval for throughput')
p.defProperty('delay_report_interval', 'Report interval for Delay')
p.defProperty('jitter_report_interval', 'Report interval for Jitter')
p.defProperty('loss_report_interval', 'Report interval for Packet loss')

itgd = p.addApplication('itgdec', "test:app:itgdec")
itgd.bindProperty('logfile')
itgd.bindProperty('d', 'delay_report_interval')
itgd.bindProperty('j', 'jitter_report_interval')
itgd.bindProperty('b', 'tput_report_interval')
itgd.bindProperty('p', 'loss_report_interval')

itgd.addMeasurement('decoderport',  Filter::SAMPLE, 
  {Filter::SAMPLE_SIZE => 1},
  [
    ['flow_no'],
    ['src_port'],
    ['dst_port'],
    ['throughput'],
    ['jitter'],
    ['delay'],
    ['pkt_loss'],
    ['rssi'],
    ['rate']
  ]
)

if $0 == __FILE__
  p.to_xml.write($stdout, 2)
  puts
end

Last modified 18 years ago Last modified on Sep 5, 2006, 9:55:17 PM
Note: See TracWiki for help on using the wiki.