wiki:GEC16Agenda/WiMAX-Tutorial/Video/03

Previous

Application Wrappers

When an OML-enabled application is run using OMF, the application itself is installed on the resource and a simple OMF application wrapper is installed on the console where the OMF Experiment Controller runs. This wrapper just gives some basic information about the application, the parameters that can be passed at the command line, and the OML measurement points that have been defined in the application.

For example, here's the wrapper for the OML-ized VLC:

defApplication('vlc', 'vlc') do |app|
 
   app.path = "/usr/local/bin/vlc" 
   app.version(2, 0, 5)
   app.shortDescription = "VLC" 
   app.description = "VLC multimedia player and streamer" 
 
   app.defProperty("input", "Stream input (e.g. file or network address)", nil, 
                   {:type => :string, :dynamic => false, :use_name => false})
   app.defProperty("sout", "Stream output", nil, 
                   {:type => :string, :dynamic => false,}) 
   app.defProperty("intf", "Main interface module", "I",
                   {:type => :string, :dynamic => false})
   app.defProperty("extraintf", "Extra interface module(s). Use --extraintf omlstats to enable OML", nil,
                   {:type => :string, :dynamic => false})
   app.defProperty("mtu", "Specifies the MTU of the network interface", nil,
                   {:type => :string, :dynamic => false})
   app.defProperty("quiet", " Deactivates all console messages", nil,
                   {:type => :boolean, :dynamic => false})
   app.defProperty("play-and-exit", "Exit VLC after playing all the items in the input stream list", nil,
                   {:type => :boolean, :dynamic => false})

   app.defMeasurement('audio') do |mp|
     mp.defMetric('i_decoded_audio_blocks',:int)
     mp.defMetric('i_played_audio_buffers',:int)
     mp.defMetric('i_lost_audio_buffers',:int)     
   end

   app.defMeasurement('video') do |mp|
     mp.defMetric('i_decoded_video_blocks',:int)
     mp.defMetric('i_played_video_frames',:int)
     mp.defMetric('i_lost_video_frames',:int)
   end


   app.defMeasurement('input') do |mp|
     mp.defMetric('i_read_packets',:int)
     mp.defMetric('i_read_bytes',:int)
     mp.defMetric('f_input_bitrate',:float)
     mp.defMetric('i_demux_read_bytes',:int)
     mp.defMetric('f_demux_bitrate',:float)
     mp.defMetric('i_demux_corrupted',:int)
     mp.defMetric('i_demux_discontinuity',:int)
   end

   app.defMeasurement('output') do |mp|
     mp.defMetric('i_sent_packets',:int)
     mp.defMetric('i_sent_bytes',:int)
     mp.defMetric('f_send_bitrate',:float)
   end
end

Next

Last modified 7 years ago Last modified on 03/20/13 14:15:39