Changes between Version 32 and Version 33 of Tutorials/a0Basic/Tutorial2


Ignore:
Timestamp:
Feb 13, 2013, 3:57:39 AM (11 years ago)
Author:
ssugrim
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/a0Basic/Tutorial2

    v32 v33  
    66== 1. Developing a Script for an Experiment ==
    77
    8 As explained in the previous [wiki:NodeHandler/Testbed overview] page, to run an experiment on the testbed a user needs to first describe the experiment in a ''script''. This ''script'' is then passed on to a '''Node Handler''', which will use it to run and control the experiment execution. This process is illustrated in figure 1.
     8This tutorial presents a simple example, which shows you all the basic steps to quickly develop, run, and access the result of an experiment with OMF. Subsequent tutorials will build on this one to show you how to use other OMF features.
     9
     10If you are a new OMF users, you may want to read the short [http://mytestbed.net/projects/omf/wiki/An_Introduction_to_OMF OMF System Overview] and/or [http://mytestbed.net/projects/omf/wiki/UsageOverview the Experiment Life-cycle Overview]. To run an experiment on the ORBIT testbed, in addtion to all the steps from [wiki:Documentation/GettingStarted getting started], a user needs to first describe the experiment in a ''script''. This ''script/experiment description'' is then passed on to a '''Experiment Controller''', which will use it to run and control the experiment execution. This process is illustrated in figure 1.
    911
    1012This script contains the experiment configuration and scenario.  More precisely, it includes:
     
    1719[[Image(OMF-User-View.png)]]
    1820[[BR]]Figure 1. Execution of an Experiment from a User's point-of-view
    19 [[BR]]
    20 [[BR]]
    21 [[BR]]
     21
    2222== 2. "Hello World" experiment ==
    2323
     
    3131#
    3232defProperty('duration', 60, "Duration of the experiment")
    33 defProperty('graph', false, "Display graph or not")
    3433
    3534baseTopo = Topology['system:topo:imaged']
     
    8079  Experiment.done
    8180end
    82 
    83 if property.graph.value
    84   addTab(:defaults)
    85   addTab(:graph2) do |tab|
    86     opts = { :postfix => %{This graph shows the Sequence Number from the UDP traffic.}, :updateEvery => 1 }
    87     tab.addGraph("Sequence_Number", opts) do |g|
    88       dataOut = Array.new
    89       dataIn = Array.new
    90       mpOut = ms('udp_out')
    91       mpIn = ms('udp_in')
    92       mpOut.project(:oml_ts_server, :seq_no).each do |sample|
    93         dataOut << sample.tuple
    94       end
    95       mpIn.project(:oml_ts_server, :seq_no).each do |sample|
    96         dataIn << sample.tuple
    97       end
    98       g.addLine(dataOut, :label => "Sender (outgoing UDP)")
    99       g.addLine(dataIn, :label => "Receiver (incoming UDP)")
    100     end
    101   end
    102 end
    103 }}}
    104 
    105 [[BR]]
    106 [[BR]]
     81}}}
     82
    10783== 3. Understanding the "Hello World" script ==
    10884