Changes between Initial Version and Version 1 of Tutorials/g0WmLTE/Tutorial1


Ignore:
Timestamp:
Mar 15, 2011, 3:16:33 PM (14 years ago)
Author:
seskar
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/g0WmLTE/Tutorial1

    v1 v1  
     1= WiMAX "Hello World" Tutorial =
     2
     3This tutorial presents a simple example of using WiMAX devices that are available in ORBIT. The tutorial assumes basic understanding of OMF so, if you are not familiar with it, you may want to read the short [http://mytestbed.net/projects/omf/wiki/An_Introduction_to_OMF OMF System Overview] to familiarize yourself with the testbed control framework.
     4
     5== Experimental Scenario ==
     6
     7The experimental scenario is fairly simple: our goal is to measure RTT of basic WiMAX link (single hop).
     8
     9== Experiment Description ==
     10
     11=== Configuring WiMAX inteface ===
     12We need to connect to the basestation; will use wimaxcu userspace utility for that.
     13
     14{{{
     15defApplication('wimaxcu', 'wimaxcu') {|a|
     16   a.name = "wimaxcu"
     17     a.version(0, 0, 1)
     18     a.path = "/usr/bin/wimaxcu"
     19     a.defProperty('args', "Arguments for wimaxcu command", nil,  {:order => 1,
     20:dynamic => false, :type => :string, :use_name => false
     21}}}
     22
     23=== Assigning the WiMAX IP Address ===
     24We will use dhclient command on the node to assign the IP address to the WiMAX interface. The following code snippet is the dhclient command wrapper that is used for address assignement.
     25
     26{{{
     27defApplication('dhclient', 'dhclient') {|a|
     28   a.name = "dhclient"
     29     a.version(0, 0, 1)
     30     a.path = "/sbin/dhclient -q"
     31     a.defProperty('interface', "DHCP client interface name", nil,  {:order => 1
     32, :dynamic => false, :type => :string, :use_name => false
     33}}}
     34
     35
     36=== Ping Application ===
     37
     38Wrapper for ping application.
     39
     40{{{
     41defApplication('pingtest_app', 'pingtest') do |a|
     42  a.path = "/usr/bin/pingtest.rb"
     43  a.version(0, 0, 1)
     44  a.shortDescription = "Wrapper around Ping -c"
     45  a.description = <<TEXT
     46This is a wrapper around the ping command.
     47This application is using OML4R part of OML v2.3 or v2.4
     48TEXT
     49  a.defProperty('ip', 'Ip address to ping', 'i',
     50                {:type => :string, :dynamic => false})
     51
     52  # List the Measurement Points and associated metrics that are available
     53  # for this application
     54  #
     55  a.defMeasurement('pingtest') do |m|
     56    m.defMetric('ip',:string)
     57    m.defMetric('time',:string)
     58    m.defMetric('x',:string)
     59    m.defMetric('y',:string)
     60  end
     61end
     62}}}
     63
     64== Experiment Code ==
     65Specify the nodes involved in the experiment and declare the applications with parameters that they would be running
     66
     67{{{
     68defGroup('tester', [1,1]) do |node|
     69  node.addApplication('wimaxcu') { |app|
     70    app.setProperty('args','connect network 51')
     71  }
     72  node.addApplication('dhclient') { |app|
     73    app.setProperty('interface',"wmx0")
     74  }
     75  node.addApplication("pingtest_app") { |a|
     76    a.setProperty('ip',"10.41.0.1")
     77    a.measure('pingtest')
     78  }
     79end
     80}}}
     81
     82The actual experiment: boot the nodes. wait for 10 seconds for them to worm up and then
     83
     84{{{
     85whenAllInstalled() {|node|
     86   info "Give machines some time to warm up"
     87   wait 10
     88   allGroups.startApplications
     89   info "Colect measurements for 100 seconds"
     90   wait 100
     91   info "Finish it."
     92   Experiment.done
     93}
     94}}}