Changes between Version 4 and Version 5 of UHTutorial


Ignore:
Timestamp:
12/20/13 02:36:44 (10 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UHTutorial

    v4 v5  
    1717
    1818
    19 == 2. OpenFlow and GIMI Tutorial ==
     19== 2. OpenFlow and GIMI Tutorial (VLC DASH) ==
     20
     21[http://groups.geni.net/geni/wiki/GENIEducation/SampleAssignments/VLCDashTutorial/Execute VLC DASH Tutorial]
     22
     23Ruby Script to run VLC
     24
     25{{{
     26defApplication('vlc', 'vlc') do |app|
     27
     28   app.binary_path = "/usr/local/bin/vlc"
     29#   app.path = "/home/cong/work/vlc-2.1.0-git/bin/vlc-static"
     30   #app.version(2, 1, 0)
     31   #app.shortDescription = "VLC"
     32   app.description = "VLC multimedia player and streamer"
     33
     34   app.defProperty("input", "Stream input (e.g. file or network address)", nil,
     35                   {:type => :string, :dynamic => false})
     36#   app.defProperty("sout", "Stream output", "--sout",
     37#                   {:type => :string, :dynamic => false})
     38   app.defProperty("intf", "Main interface module", "--intf",
     39                   {:type => :string, :dynamic => false})
     40#   app.defProperty("extraintf", "Extra interface module(s). Use --extraintf omlstats to enable OML", "--extraintf",
     41#                   {:type => :string, :dynamic => false})
     42 #  app.defProperty("mtu", "Specifies the MTU of the network interface", "--mtu",
     43#                   {:type => :string, :dynamic => false})
     44#   app.defProperty("quiet", " Deactivates all console messages", "--quiet",
     45#                   {:type => :boolean, :dynamic => false})
     46 #  app.defProperty("play-and-exit", "Exit VLC after playing all the items in the input stream list", "--play-and-exit",
     47 #                  {:type => :boolean, :dynamic => false})
     48
     49   app.defMeasurement('dashRateAdaptation') do |mp|
     50     mp.defMetric('chosenRate_bps',:int)
     51     mp.defMetric('empiricalRate_bps',:int)
     52     mp.defMetric('decisionRate_bps',:int)
     53     mp.defMetric('buffer_percent',:int)
     54   end
     55
     56   app.defMeasurement('dashDlSession') do |mp|
     57     mp.defMetric('chunkCount',:int)
     58     mp.defMetric('readSession_B',:int)
     59     mp.defMetric('readChunk_B',:int)
     60     mp.defMetric('timeSession_s',:float)
     61     mp.defMetric('timeChunk_s',:float)
     62   end
     63end
     64
     65defProperty('theOne','node7-vlcovsinsta','ID of sender node')
     66
     67#defProperty('packetsize', 128, "Packet size (byte) from the sender node")
     68#defProperty('bitrate', 2048, "Bitrate (bit/s) from the sender node")
     69#defProperty('runtime', 40, "Time in second for the experiment is to run")
     70defProperty('duration', 100, "Duration of experiment")
     71
     72defGroup('Sender',property.theOne) do |node|
     73  node.addApplication("vlc") do |app|
     74#    app.setProperty('quiet', true)
     75#    app.setProperty('play-and-exit', false)
     76    app.setProperty('intf', 'dummy')
     77#    app.setProperty('extraintf', 'omlstats')
     78    app.setProperty('input', 'http://emmy9.casa.umass.edu/DASH_BuckBunny/www-itec.uni-klu.ac.at/ftp/datasets/mmsys12/BigBuckBunny/bunny_2s_480p_only/bunny_Desktop.mpd')
     79#    app.setProperty('mtu', '1200')
     80    app.measure('dashDlSession', :samples =>1)
     81    app.measure('dashRateAdaptation', :samples =>1)
     82  end
     83end
     84
     85
     86onEvent(:ALL_UP_AND_INSTALLED) do |event|
     87    info "starting"
     88  after 5 do
     89    allGroups.startApplications
     90    info "All applications started..."
     91  end
     92  after property.duration do
     93    allGroups.stopApplications
     94    info "All applications stopped."
     95    Experiment.done
     96  end
     97end
     98
     99#defGraph 'DashRate1' do |g|
     100 # g.ms('dashRateAdaptation').select {[:oml_seq, :decisionRate_bps]}
     101  #g.caption "Dash Rate Adaptation."
     102 # g.type 'line_chart3'
     103 # g.mapping :x_axis => :oml_seq, :y_axis => :decisionRate_bps
     104 # g.xaxis :legend => 'time [s]'
     105 # g.yaxis :legend => 'Decision Rate', :ticks => {:format => 's'}
     106#end
     107
     108#defGraph 'DashRate2' do |g|
     109 # g.ms('dashRateAdaptation').select {[:oml_seq, :buffer_percent]}
     110  #g.caption "VLC Buffer Percentage."
     111  #g.type 'line_chart3'
     112  #g.mapping :x_axis => :oml_seq, :y_axis => :buffer_percent
     113  #g.xaxis :legend => 'time [s]'
     114  #g.yaxis :legend => 'Buffer Percentage ', :ticks => {:format => 's'}
     115#end
     116
     117defGraph 'DashRate3' do |g|
     118  g.ms('dashDlSession').select {[:oml_seq, :timeChunk_s]}
     119   g.caption "read Chunk."
     120   g.type 'line_chart3'
     121   g.mapping :x_axis => :oml_seq, :y_axis => :timeChunk_s
     122   g.xaxis :legend => 'time [s]'
     123   g.yaxis :legend => 'read session [bps] ', :ticks => {:format => 's'}
     124end
     125
     126}}}
    20127
    21128