From f8cfb3bcae240c33b1ff49ace90057acb13931ec Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Tue, 18 Jun 2013 23:04:41 +1000 Subject: [PATCH 01/44] New code set-out Code is set out clearer and comments are slightly simplified. --- doc/tutorials/TUTORIAL_00.mkd | 128 ++++++++++++++++++---------------- doc/tutorials/tutorial00.rb | 117 +++++++++++++++++-------------- 2 files changed, 132 insertions(+), 113 deletions(-) diff --git a/doc/tutorials/TUTORIAL_00.mkd b/doc/tutorials/TUTORIAL_00.mkd index c7ab21fb..f1189581 100644 --- a/doc/tutorials/TUTORIAL_00.mkd +++ b/doc/tutorials/TUTORIAL_00.mkd @@ -138,67 +138,75 @@ OMF Experiment Description Language (OEDL). The ED describing this simple “Hello World” experiment is {file:doc/tutorials/tutorial00.rb tutorial00.rb}. It is composed of 3 distinct parts, described in the following listing and subsections below. - # A. Define an OMF Application Definition for the ping-oml2 application - # The OMF entities are using this definition to know where to find the - # application, what are its configurable parameters, and what are the - # OML2 measurement points that it provides. - # This ping-oml2 application will be known by OMF entities as 'ping_oml2' - # - defApplication('ping_oml2') do |app| - app.description = 'Simple Definition for the ping-oml2 application' - # Define the path to the binary executable for this application - app.binary_path = '/usr/bin/ping-oml2' - # Define the configurable parameters for this application - # For example if target is set to foo.com and count is set to 2, then the - # application will be started with the command line: - # /usr/bin/ping-oml2 -a foo.com -c 2 - app.defProperty('target', 'Address to ping', '-a', {:type => :string}) - app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer}) - # Define the OML2 measurement point that this application provides. - # Here we have only one measurement point (MP) named 'ping'. Each measurement - # sample from this MP will be composed of a 4-tuples (addr,ttl,rtt,rtt_unit) - app.defMeasurement('ping') do |m| +#Welcome to your first ruby OML2 application +#This OML2 application is designed to ping a specified host and collect the output it recieves in a sq3 database + +#Section 1 +#Define oml2 application file-paths +#Define experiment parameters and measurement points + +defApplication('ping_oml2') do |app| + + #Application description and binary path + app.description = 'Simple definition of ping-oml2 application' + app.binary_path = '/usr/bin/ping-oml2' + + #Configurable parameters of Experiment + app.defProperty('target', 'Address to ping', '-a', {:type => :string}) + app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer}) + + + #DISABLED-Define measurement points that application will output + app.defMeasurement('ping') do |m| m.defMetric('dest_addr',:string) m.defMetric('ttl',:uint32) m.defMetric('rtt',:double) m.defMetric('rtt_unit',:string) - end - end - - # B. Define a group of resources which will run the ping-oml2 application - # Here we define only one group (Sender), which has only one resource in it - # (omf6.nicta.node8) - # - defGroup('Sender', 'omf6.nicta.node8') do |g| - # Associate the application ping_oml2 defined above to each resources - # in this group - g.addApplication("ping_oml2") do |app| - # Configure the parameters for the ping_oml2 application - app.setProperty('target', 'www.nicta.com.au') - app.setProperty('count', 3) - # Request the ping_oml2 application to collect measurement samples - # from the 'ping' measuremnt point (as defined above), and send them - # to an OML2 collection point - app.measure('ping', :samples => 1) - end - end - - # C. Define the sequence of tasks to perform when the event - # "all resources are up and all applications are install" is being triggered - # - onEvent(:ALL_UP_AND_INSTALLED) do |event| - # Print some information message - info "This is my first OMF experiment" - # Start all the Applications associated to all the Groups - allGroups.startApplications - # Wait for 5 sec - wait 5 - # Stop all the Applications associated to all the Groups - allGroups.stopApplications - # Tell the Experiment Controller to terminate the experiment now - Experiment.done + end - +end + +#Section 2 +#Define recources and nodes used by oml2 application + +#Create the group 'Sender' with specified nodes +defGroup('Sender', 'omf.nicta.node9') do |g| + + #Associate oml2 application to group (?) + g.addApplication("ping_oml2") do |app| + + #Configure target of application (Ping target) + app.setProperty('target', 'www.nicta.com.au') + + #Configure amount of times to ping host + app.setProperty('count', 3) + + #Request application to collect measurement point output data + app.measure('ping', :samples => 1) + + end +end + +#Section 3 +#Execution of application + +onEvent(:ALL_UP_AND_INSTALLED) do |event| + + # Print information message on commandline + info "Initializing first OMF experiment event" + + # Start all the Applications associated to all the Group + allGroups.startApplications + + # Wait for 5 sec (allowing time for 3 pings) + after 5 + + # Stop all the Applications associated to all the Groups + allGroups.stopApplications + + # Tell the Experiment Controller to terminate the experiment now + Experiment.done +end ### 3a) Application Definition OMF entities need to learn about the applications that will be used in the @@ -208,7 +216,7 @@ information is provided in the block of instructions defined between the 'do' and 'end' markers following the 'defApplication' commands: defApplication('ping_oml2') do |app| - app.description = 'Simple Definition for the ping-oml2 application' + app.description = 'Simple definition of ping-oml2 application' ... end @@ -256,10 +264,10 @@ In this example, we define a single group named 'Sender', which contains a single resource 'omf6.nicta.node8'. > **IMPORTANT** When running this experiment using your own resource and testbed -please change 'omf6.nicta.node8' in the ED to the actual name of your +please change 'omf.nicta.node9' in the ED to the actual name of your own resource. - defGroup('Sender', 'omf6.nicta.node8') do |g| + defGroup('Sender', 'omf.nicta.node9') do |g| ... end @@ -329,7 +337,7 @@ The set of consecutive tasks that we define are: - wait for 5 seconds - stop all the applications associated with all the groups - info "This is my first OMF experiment" + info "Initializing first OMF experiment event" allGroups.startApplications wait 5 allGroups.stopApplications diff --git a/doc/tutorials/tutorial00.rb b/doc/tutorials/tutorial00.rb index 03b0062a..f47510af 100644 --- a/doc/tutorials/tutorial00.rb +++ b/doc/tutorials/tutorial00.rb @@ -1,60 +1,71 @@ -# 1. Define an OMF Application Definition for the ping-oml2 application -# The OMF entities are using this definition to know where to find the -# application, what are its configurable parameters, and what are the -# OML2 measurement points that it provides. -# This ping-oml2 application will be known by OMF entities as 'ping_oml2' -# +#Welcome to your first ruby OML2 application +#This OML2 application is designed to ping a specified host and collect the output it recieves in a sq3 database + +#Section 1 +#Define oml2 application file-paths +#Define experiment parameters and measurement points + defApplication('ping_oml2') do |app| - app.description = 'Simple Definition for the ping-oml2 application' - # Define the path to the binary executable for this application - app.binary_path = '/usr/bin/ping-oml2' - # Define the configurable parameters for this application - # For example if target is set to foo.com and count is set to 2, then the - # application will be started with the command line: - # /usr/bin/ping-oml2 -a foo.com -c 2 - app.defProperty('target', 'Address to ping', '-a', {:type => :string}) - app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer}) - # Define the OML2 measurement point that this application provides. - # Here we have only one measurement point (MP) named 'ping'. Each measurement - # sample from this MP will be composed of a 4-tuples (addr,ttl,rtt,rtt_unit) - app.defMeasurement('ping') do |m| - m.defMetric('dest_addr',:string) - m.defMetric('ttl',:uint32) - m.defMetric('rtt',:double) - m.defMetric('rtt_unit',:string) - end + + #Application description and binary path + app.description = 'Simple definition of ping-oml2 application' + app.binary_path = '/usr/bin/ping-oml2' + + #Configurable parameters of Experiment + app.defProperty('target', 'Address to ping', '-a', {:type => :string}) + app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer}) + + + #DISABLED-Define measurement points that application will output + app.defMeasurement('ping') do |m| + m.defMetric('dest_addr',:string) + m.defMetric('ttl',:uint32) + m.defMetric('rtt',:double) + m.defMetric('rtt_unit',:string) + + end end -# 2. Define a group of resources which will run the ping-oml2 application -# Here we define only one group (Sender), which has only one resource in it -# (omf6.nicta.node8) -# -defGroup('Sender', 'omf6dev.node8') do |g| - # Associate the application ping_oml2 defined above to each resources - # in this group - g.addApplication("ping_oml2") do |app| - # Configure the parameters for the ping_oml2 application - app.setProperty('target', 'www.nicta.com.au') - app.setProperty('count', 3) - # Request the ping_oml2 application to collect measurement samples - # from the 'ping' measuremnt point (as defined above), and send them - # to an OML2 collection point - app.measure('ping', :samples => 1) - end +#Section 2 +#Define recources and nodes used by oml2 application + +#Create the group 'Sender' with specified nodes +defGroup('Sender', 'omf.nicta.node9') do |g| + + #Associate oml2 application to group (?) + g.addApplication("ping_oml2") do |app| + + #Configure target of application (Ping target) + app.setProperty('target', 'www.nicta.com.au') + + #Configure amount of times to ping host + app.setProperty('count', 3) + + #Request application to collect measurement point output data + app.measure('ping', :samples => 1) + + end end -# 3. Define the sequence of tasks to perform when the event -# "all resources are up and all applications are install" is being triggered -# +#Section 3 +#Execution of application + onEvent(:ALL_UP_AND_INSTALLED) do |event| - # Print some information message - info "This is my first OMF experiment" - # Start all the Applications associated to all the Groups - allGroups.startApplications - # Wait for 5 sec - wait 5 - # Stop all the Applications associated to all the Groups - allGroups.stopApplications - # Tell the Experiment Controller to terminate the experiment now - Experiment.done + + # Print information message on commandline + info "Initializing first OMF experiment event" + + # Start all the Applications associated to all the Group + allGroups.startApplications + + # Wait for 5 sec (allowing time for 3 pings) + after 5 + + # Stop all the Applications associated to all the Groups + allGroups.stopApplications + + # Tell the Experiment Controller to terminate the experiment now + Experiment.done end + + From ad3af968f771cf73cf29936c2eeed86dce1e5c19 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Tue, 18 Jun 2013 23:15:42 +1000 Subject: [PATCH 02/44] Ruby Syntax highlighting Added markdown feature that highlights ruby syntax --- doc/tutorials/TUTORIAL_00.mkd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/tutorials/TUTORIAL_00.mkd b/doc/tutorials/TUTORIAL_00.mkd index f1189581..3d73a90b 100644 --- a/doc/tutorials/TUTORIAL_00.mkd +++ b/doc/tutorials/TUTORIAL_00.mkd @@ -138,6 +138,7 @@ OMF Experiment Description Language (OEDL). The ED describing this simple “Hello World” experiment is {file:doc/tutorials/tutorial00.rb tutorial00.rb}. It is composed of 3 distinct parts, described in the following listing and subsections below. +```ruby #Welcome to your first ruby OML2 application #This OML2 application is designed to ping a specified host and collect the output it recieves in a sq3 database @@ -207,6 +208,9 @@ onEvent(:ALL_UP_AND_INSTALLED) do |event| # Tell the Experiment Controller to terminate the experiment now Experiment.done end +``` + + ### 3a) Application Definition OMF entities need to learn about the applications that will be used in the From 77cf049503c5de742ae52973c7f47f7c33931aea Mon Sep 17 00:00:00 2001 From: Mitch Musarra Date: Wed, 19 Jun 2013 10:29:06 +1000 Subject: [PATCH 03/44] Removed DISABLED --- doc/tutorials/tutorial00.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorials/tutorial00.rb b/doc/tutorials/tutorial00.rb index f47510af..042b01b5 100644 --- a/doc/tutorials/tutorial00.rb +++ b/doc/tutorials/tutorial00.rb @@ -16,7 +16,7 @@ app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer}) - #DISABLED-Define measurement points that application will output + #Define measurement points that application will output app.defMeasurement('ping') do |m| m.defMetric('dest_addr',:string) m.defMetric('ttl',:uint32) From ff5da43429b7c5853461d42e2bacd107f2f4ec0f Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Wed, 19 Jun 2013 11:53:05 +1000 Subject: [PATCH 04/44] Nicer code and spelling mistakes Code is layed out nicer and easier to read and understand by a potential experimenter + Very minor changes to actual code to prevent WARN errors + Fixed spelling errors and sentences --- doc/tutorials/TUTORIAL_00.mkd | 6 +- doc/tutorials/TUTORIAL_01.mkd | 201 +++++++++++++++++++--------------- doc/tutorials/tutorial00.rb | 6 +- doc/tutorials/tutorial01.rb | 182 +++++++++++++++++------------- 4 files changed, 224 insertions(+), 171 deletions(-) diff --git a/doc/tutorials/TUTORIAL_00.mkd b/doc/tutorials/TUTORIAL_00.mkd index 3d73a90b..54984a94 100644 --- a/doc/tutorials/TUTORIAL_00.mkd +++ b/doc/tutorials/TUTORIAL_00.mkd @@ -171,7 +171,7 @@ end #Define recources and nodes used by oml2 application #Create the group 'Sender' with specified nodes -defGroup('Sender', 'omf.nicta.node9') do |g| +defGroup('Sender', 'omf.nicta.node8') do |g| #Associate oml2 application to group (?) g.addApplication("ping_oml2") do |app| @@ -268,10 +268,10 @@ In this example, we define a single group named 'Sender', which contains a single resource 'omf6.nicta.node8'. > **IMPORTANT** When running this experiment using your own resource and testbed -please change 'omf.nicta.node9' in the ED to the actual name of your +please change 'omf.nicta.node8' in the ED to the actual name of your own resource. - defGroup('Sender', 'omf.nicta.node9') do |g| + defGroup('Sender', 'omf.nicta.node8') do |g| ... end diff --git a/doc/tutorials/TUTORIAL_01.mkd b/doc/tutorials/TUTORIAL_01.mkd index fbf67b04..ca398f14 100644 --- a/doc/tutorials/TUTORIAL_01.mkd +++ b/doc/tutorials/TUTORIAL_01.mkd @@ -120,98 +120,125 @@ OMF Experiment Description Language (OEDL), which is based on Ruby syntax. The ED describing this simple “Hello World” wireless experiment is {file:doc/tutorials/tutorial01.rb tutorial01.rb}: - defApplication('otr2') do |a| +```ruby +#Welcome to 'Hello World' Wireless +#This script creates a simple wireless networking experiment + + +#Section 1 +#Define oml2 application file-paths +#Define experiment parameters and measurement points + +defApplication('otr2') do |a| + + + #Application description and binary path + a.binary_path = "/usr/bin/otr2" + a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + + #Define configurable parameters of otr2 + a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defMeasurement('udp_in') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + end +end + + +defApplication('otg2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otg2" + a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + + #Define configurable parameters of otg2 + a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) + a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) + a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) + a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + + #Define measurement points that application will output + a.defMeasurement('udp_out') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + + end +end - a.binary_path = "/usr/bin/otr2" - a.description = < :string, :dynamic => false}) - a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) - a.defMeasurement('udp_in') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) - end - end - defApplication('otg2') do |a| - - a.binary_path = "/usr/bin/otg2" - a.description = < :string, :dynamic => false}) - a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) - a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) - a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) - a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) - a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) - a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) - a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) - a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) - a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) - a.defMeasurement('udp_out') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) - end - end - defGroup('Sender', "omf.nicta.node36") do |node| - node.addApplication("otg2") do |app| - app.setProperty('udp_local_host', '192.168.0.2') - app.setProperty('udp_dst_host', '192.168.0.3') - app.setProperty('udp_dst_port', 3000) - app.measure('udp_out', :interval => 3) - end - node.net.w0.mode = "adhoc" - node.net.w0.type = 'g' - node.net.w0.channel = "6" - node.net.w0.essid = "helloworld" - node.net.w0.ip = "192.168.0.2/24" - end +#Section 2 +#Define resources and nodes used by application - defGroup('Receiver', "omf.nicta.node37") do |node| - node.addApplication("otr2") do |app| - app.setProperty('udp_local_host', '192.168.0.3') - app.setProperty('udp_local_port', 3000) - app.measure('udp_in', :interval => 3) - end - node.net.w0.mode = "adhoc" - node.net.w0.type = 'g' - node.net.w0.channel = "6" - node.net.w0.essid = "helloworld" - node.net.w0.ip = "192.168.0.3/24" - end +#Define configuration of wireless 'sender' +defGroup('Sender', "omf.nicta.node36") do |node| + node.addApplication("otg2") do |app| + app.setProperty('udp_local_host', '192.168.0.2') + app.setProperty('udp_dst_host', '192.168.0.3') + app.setProperty('udp_dst_port', 3000) + app.measure('udp_out', :interval => 3) + end + + node.net.w0.mode = "adhoc" + node.net.w0.type = 'g' + node.net.w0.channel = "6" + node.net.w0.essid = "Hello World!" + node.net.w0.ip = "192.168.0.2/24" +end + + +#Define configuration of wireless 'reciever' +defGroup('Receiver', "omf.nicta.node37") do |node| + node.addApplication("otr2") do |app| + app.setProperty('udp_local_host', '192.168.0.3') + app.setProperty('udp_local_port', 3000) + app.measure('udp_in', :interval => 3) + end + + node.net.w0.mode = "adhoc" + node.net.w0.type = 'g' + node.net.w0.channel = "6" + node.net.w0.essid = "Hello World!" + node.net.w0.ip = "192.168.0.3/24" +end - onEvent(:ALL_UP_AND_INSTALLED) do |event| - info "This is my first OMF experiment" - after 10 do - allGroups.startApplications - info "All my Applications are started now..." - end - after 40 do - allGroups.stopApplications - info "All my Applications are stopped now." - Experiment.done - end - end + + + +#Section 3 +#Execution of application events + +onEvent(:ALL_UP_AND_INSTALLED) do |event| + info "Starting WiFi OMF6 Experiment events" + + after 10 do + allGroups.startApplications + info "All Applications have started..." + + end + after 40 do + allGroups.stopApplications + info "Applications are stopping... Experiment Complete." + Experiment.done + end +end``` ### 3a) Application Definition diff --git a/doc/tutorials/tutorial00.rb b/doc/tutorials/tutorial00.rb index 042b01b5..95229e19 100644 --- a/doc/tutorials/tutorial00.rb +++ b/doc/tutorials/tutorial00.rb @@ -27,10 +27,10 @@ end #Section 2 -#Define recources and nodes used by oml2 application +#Define resources and nodes used by oml2 application #Create the group 'Sender' with specified nodes -defGroup('Sender', 'omf.nicta.node9') do |g| +defGroup('Sender', 'omf.nicta.node8') do |g| #Associate oml2 application to group (?) g.addApplication("ping_oml2") do |app| @@ -48,7 +48,7 @@ end #Section 3 -#Execution of application +#Execution of application events onEvent(:ALL_UP_AND_INSTALLED) do |event| diff --git a/doc/tutorials/tutorial01.rb b/doc/tutorials/tutorial01.rb index 804fb72e..ad0f3167 100644 --- a/doc/tutorials/tutorial01.rb +++ b/doc/tutorials/tutorial01.rb @@ -1,92 +1,118 @@ -defApplication('otr2') do |a| +#Welcome to 'Hello World' Wireless +#This script creates a simple wireless networking experiment + - a.binary_path = "/usr/bin/otr2" - a.description = < :string, :dynamic => false}) - a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) - a.defMeasurement('udp_in') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) - end +#Section 1 +#Define oml2 application file-paths +#Define experiment parameters and measurement points + +defApplication('otr2') do |a| + + + #Application description and binary path + a.binary_path = "/usr/bin/otr2" + a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + + #Define configurable parameters of otr2 + a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defMeasurement('udp_in') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + end end -defApplication('otg2') do |a| - a.binary_path = "/usr/bin/otg2" - a.description = < :string, :dynamic => false}) - a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) - a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) - a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) - a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) - a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) - a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) - a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) - a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) - a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) - a.defMeasurement('udp_out') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) - end +defApplication('otg2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otg2" + a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + + #Define configurable parameters of otg2 + a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) + a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) + a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) + a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + + #Define measurement points that application will output + a.defMeasurement('udp_out') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + + end end + + +#Section 2 +#Define resources and nodes used by application + +#Define configuration of wireless 'sender' defGroup('Sender', "omf.nicta.node36") do |node| - node.addApplication("otg2") do |app| - app.setProperty('udp_local_host', '192.168.0.2') - app.setProperty('udp_dst_host', '192.168.0.3') - app.setProperty('udp_dst_port', 3000) - app.measure('udp_out', :interval => 3) - end - node.net.w0.mode = "adhoc" - node.net.w0.type = 'g' - node.net.w0.channel = "6" - node.net.w0.essid = "helloworld" - node.net.w0.ip = "192.168.0.2/24" + node.addApplication("otg2") do |app| + app.setProperty('udp_local_host', '192.168.0.2') + app.setProperty('udp_dst_host', '192.168.0.3') + app.setProperty('udp_dst_port', 3000) + app.measure('udp_out', :interval => 3) + end + + node.net.w0.mode = "adhoc" + node.net.w0.type = 'g' + node.net.w0.channel = "6" + node.net.w0.essid = "Hello World!" + node.net.w0.ip = "192.168.0.2/24" end + +#Define configuration of wireless 'reciever' defGroup('Receiver', "omf.nicta.node37") do |node| - node.addApplication("otr2") do |app| - app.setProperty('udp_local_host', '192.168.0.3') - app.setProperty('udp_local_port', 3000) - app.measure('udp_in', :interval => 3) - end - node.net.w0.mode = "adhoc" - node.net.w0.type = 'g' - node.net.w0.channel = "6" - node.net.w0.essid = "helloworld" - node.net.w0.ip = "192.168.0.3/24" + node.addApplication("otr2") do |app| + app.setProperty('udp_local_host', '192.168.0.3') + app.setProperty('udp_local_port', 3000) + app.measure('udp_in', :interval => 3) + end + + node.net.w0.mode = "adhoc" + node.net.w0.type = 'g' + node.net.w0.channel = "6" + node.net.w0.essid = "Hello World!" + node.net.w0.ip = "192.168.0.3/24" end + + + +#Section 3 +#Execution of application events + onEvent(:ALL_UP_AND_INSTALLED) do |event| - info "This is my first OMF experiment" - after 10 do - allGroups.startApplications - info "All my Applications are started now..." - end - after 40 do - allGroups.stopApplications - info "All my Applications are stopped now." - Experiment.done - end + info "Starting WiFi OMF6 Experiment events" + + after 10 do + allGroups.startApplications + info "All Applications have started..." + + end + after 40 do + allGroups.stopApplications + info "Applications are stopping... Experiment Complete." + Experiment.done + end end From 7c6293b8fb94e8d52b10fe308d30adb84a863587 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Wed, 19 Jun 2013 11:55:13 +1000 Subject: [PATCH 05/44] Fixed markdown formatting problem --- doc/tutorials/TUTORIAL_01.mkd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/tutorials/TUTORIAL_01.mkd b/doc/tutorials/TUTORIAL_01.mkd index ca398f14..6b4c4a93 100644 --- a/doc/tutorials/TUTORIAL_01.mkd +++ b/doc/tutorials/TUTORIAL_01.mkd @@ -238,7 +238,9 @@ onEvent(:ALL_UP_AND_INSTALLED) do |event| info "Applications are stopping... Experiment Complete." Experiment.done end -end``` +end + +``` ### 3a) Application Definition From fa0e162abba8d0c32114f4a0f500b1ddef5edae1 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Wed, 19 Jun 2013 14:37:32 +1000 Subject: [PATCH 06/44] Changed comments Comments are more relevant to code --- doc/tutorials/TUTORIAL_02.draft | 57 +++++++++++------ doc/tutorials/tutorial01.rb | 4 +- doc/tutorials/tutorial02.rb | 108 ++++++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+), 21 deletions(-) create mode 100644 doc/tutorials/tutorial02.rb diff --git a/doc/tutorials/TUTORIAL_02.draft b/doc/tutorials/TUTORIAL_02.draft index 3b956401..3d86fb22 100644 --- a/doc/tutorials/TUTORIAL_02.draft +++ b/doc/tutorials/TUTORIAL_02.draft @@ -116,37 +116,54 @@ experiment. An ED is written using the The ED describing this simple “Hello World” experiment is (download it here: attachment:hello-world.rb): - - defGroup('Sender', "omf.nicta.node2") do |node| - node.addApplication("test:app:otg2") do |app| +```ruby + +#Welcome to 'Hello World' Wired +#This script creates a simple wired networking experiment + + +#Section 1 +#Define otg2 application +#Define experiment parameters of 'Sender' and measurement points +defGroup('Sender', "omf.nicta.node9") do |node| + node.addApplication("test:app:otg2") do |app| app.setProperty('udp:local_host', '192.168.0.2') app.setProperty('udp:dst_host', '192.168.0.3') app.setProperty('udp:dst_port', 3000) app.measure('udp_out', :samples => 1) - end - node.net.e0.ip = "192.168.0.2" end + node.net.e0.ip = "192.168.0.2" +end - defGroup('Receiver', "omf.nicta.node3") do |node| - node.addApplication("test:app:otr2") do |app| + +#Section 2 +#Define otr2 application +#Define experiment parameters of 'Reciever' and measurement points +defGroup('Receiver', "omf.nicta.node10") do |node| + node.addApplication("test:app:otr2") do |app| app.setProperty('udp:local_host', '192.168.0.3') app.setProperty('udp:local_port', 3000) app.measure('udp_in', :samples => 1) - end - node.net.e0.ip = "192.168.0.3" end + node.net.e0.ip = "192.168.0.3" +end + + +#Section 3 +#Execution of application events +onEvent(:ALL_UP_AND_INSTALLED) do |event| + info "Starting OMF6 Experiment events" + after 10 + allGroups.startApplications + info "All Applications have started..." + after 30 + allGroups.stopApplications + info "Applications are stopping... Experiment Complete." + Experiment.done +end + +``` - onEvent(:ALL_UP_AND_INSTALLED) do |event| - info "This is my first OMF experiment" - wait 10 - allGroups.startApplications - info "All my Applications are started now..." - wait 30 - allGroups.stopApplications - info "All my Applications are stopped now." - Experiment.done - end - ### 3.1 Resource Description and Configuration (Line 1 to 26) diff --git a/doc/tutorials/tutorial01.rb b/doc/tutorials/tutorial01.rb index ad0f3167..ad5bf2d6 100644 --- a/doc/tutorials/tutorial01.rb +++ b/doc/tutorials/tutorial01.rb @@ -3,7 +3,7 @@ #Section 1 -#Define oml2 application file-paths +#Define otr2 application file-paths #Define experiment parameters and measurement points defApplication('otr2') do |a| @@ -27,6 +27,8 @@ end +#Define otg2 application file-paths +#Define experiment parameters and measurement points defApplication('otg2') do |a| #Application description and binary path diff --git a/doc/tutorials/tutorial02.rb b/doc/tutorials/tutorial02.rb new file mode 100644 index 00000000..b102327e --- /dev/null +++ b/doc/tutorials/tutorial02.rb @@ -0,0 +1,108 @@ +#Welcome to 'Hello World' Wired +#This script creates a simple wired networking experiment + + +#Section 1 +#Define otg2 application +#Define experiment parameters and measurement points +defApplication('otg2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otg2" + a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + + #Define configurable parameters of otg2 + a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) + a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) + a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) + a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + + #Define measurement points that application will output + a.defMeasurement('udp_out') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + + end +end + + +#Define otr2 application file-paths +#Define experiment parameters and measurement points +defApplication('otr2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otr2" + a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + + #Define configurable parameters of otr2 + a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defMeasurement('udp_in') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + + end +end + + + +#Section 2 +#Define recources and nodes used by application + +#Define configuration of wired 'sender' +defGroup('Sender', "omf.nicta.node9") do |node| + node.addApplication("otg2") do |app| + app.setProperty('udp_local_host', '192.168.0.2') + app.setProperty('udp_dst_host', '192.168.0.3') + app.setProperty('udp_dst_port', 3000) + app.measure('udp_out', :samples => 1) + end + + node.net.e0.ip = "192.168.0.2/24" +end + + +#Define configuration of wired 'reciever' +defGroup('Receiver', "omf.nicta.node10") do |node| + node.addApplication("otr2") do |app| + app.setProperty('udp_local_host', '192.168.0.3') + app.setProperty('udp_local_port', 3000) + app.measure('udp_in', :samples => 1) + end + + node.net.e0.ip = "192.168.0.3/24" +end + + +#Section 3 +#Execution of application events +onEvent(:ALL_UP_AND_INSTALLED) do |event| + info "Starting OMF6 Experiment events" + + + after 10 + allGroups.startApplications + info "All Applications have started..." + end + + after 30 + allGroups.stopApplications + info "Applications are stopping... Experiment Complete." + Experiment.done + + From 803297944d312b87d22f7840f758b4f57d21e26b Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Wed, 19 Jun 2013 14:42:55 +1000 Subject: [PATCH 07/44] Adapted experiment to OMF6 --- doc/tutorials/TUTORIAL_02.draft | 107 +++++++++++++++++++++++++------- 1 file changed, 85 insertions(+), 22 deletions(-) diff --git a/doc/tutorials/TUTORIAL_02.draft b/doc/tutorials/TUTORIAL_02.draft index 3d86fb22..6f64a6a6 100644 --- a/doc/tutorials/TUTORIAL_02.draft +++ b/doc/tutorials/TUTORIAL_02.draft @@ -124,28 +124,88 @@ here: attachment:hello-world.rb): #Section 1 #Define otg2 application -#Define experiment parameters of 'Sender' and measurement points -defGroup('Sender', "omf.nicta.node9") do |node| - node.addApplication("test:app:otg2") do |app| - app.setProperty('udp:local_host', '192.168.0.2') - app.setProperty('udp:dst_host', '192.168.0.3') - app.setProperty('udp:dst_port', 3000) - app.measure('udp_out', :samples => 1) +#Define experiment parameters and measurement points +defApplication('otg2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otg2" + a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + + #Define configurable parameters of otg2 + a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) + a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) + a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) + a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + + #Define measurement points that application will output + a.defMeasurement('udp_out') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + + end +end + + +#Define otr2 application file-paths +#Define experiment parameters and measurement points +defApplication('otr2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otr2" + a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + + #Define configurable parameters of otr2 + a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defMeasurement('udp_in') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + end - node.net.e0.ip = "192.168.0.2" end + #Section 2 -#Define otr2 application -#Define experiment parameters of 'Reciever' and measurement points +#Define recources and nodes used by application + +#Define configuration of wired 'sender' +defGroup('Sender', "omf.nicta.node9") do |node| + node.addApplication("otg2") do |app| + app.setProperty('udp_local_host', '192.168.0.2') + app.setProperty('udp_dst_host', '192.168.0.3') + app.setProperty('udp_dst_port', 3000) + app.measure('udp_out', :samples => 1) + end + + node.net.e0.ip = "192.168.0.2/24" +end + + +#Define configuration of wired 'reciever' defGroup('Receiver', "omf.nicta.node10") do |node| - node.addApplication("test:app:otr2") do |app| - app.setProperty('udp:local_host', '192.168.0.3') - app.setProperty('udp:local_port', 3000) - app.measure('udp_in', :samples => 1) - end - node.net.e0.ip = "192.168.0.3" + node.addApplication("otr2") do |app| + app.setProperty('udp_local_host', '192.168.0.3') + app.setProperty('udp_local_port', 3000) + app.measure('udp_in', :samples => 1) + end + + node.net.e0.ip = "192.168.0.3/24" end @@ -153,14 +213,17 @@ end #Execution of application events onEvent(:ALL_UP_AND_INSTALLED) do |event| info "Starting OMF6 Experiment events" + + after 10 - allGroups.startApplications - info "All Applications have started..." + allGroups.startApplications + info "All Applications have started..." + end + after 30 - allGroups.stopApplications - info "Applications are stopping... Experiment Complete." - Experiment.done -end + allGroups.stopApplications + info "Applications are stopping... Experiment Complete." + Experiment.done ``` From 8b2ddb78d61565c96e04509b30f7faa098333414 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Wed, 19 Jun 2013 15:01:49 +1000 Subject: [PATCH 08/44] Fixed some description mistakes Fixed some description mistakes and replicated to tutorial files + created new tutorial ruby file --- doc/tutorials/TUTORIAL_01.mkd | 9 +++--- doc/tutorials/TUTORIAL_02.draft | 4 +-- doc/tutorials/tutorial01.rb | 4 +-- doc/tutorials/tutorial02.rb | 4 +-- doc/tutorials/tutorial03.rb | 57 +++++++++++++++++++++++++++++++++ 5 files changed, 68 insertions(+), 10 deletions(-) create mode 100644 doc/tutorials/tutorial03.rb diff --git a/doc/tutorials/TUTORIAL_01.mkd b/doc/tutorials/TUTORIAL_01.mkd index 6b4c4a93..21c27e53 100644 --- a/doc/tutorials/TUTORIAL_01.mkd +++ b/doc/tutorials/TUTORIAL_01.mkd @@ -126,7 +126,7 @@ The ED describing this simple “Hello World” wireless experiment is {file:doc #Section 1 -#Define oml2 application file-paths +#Define otr2 application file-paths #Define experiment parameters and measurement points defApplication('otr2') do |a| @@ -134,7 +134,7 @@ defApplication('otr2') do |a| #Application description and binary path a.binary_path = "/usr/bin/otr2" - a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + a.description = "otr is a configurable traffic sink that recieves packet streams" #Define configurable parameters of otr2 a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) @@ -150,11 +150,13 @@ defApplication('otr2') do |a| end +#Define otg2 application file-paths +#Define experiment parameters and measurement points defApplication('otg2') do |a| #Application description and binary path a.binary_path = "/usr/bin/otg2" - a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + a.description = "otg is a configurable traffic generator that sends packet streams" #Define configurable parameters of otg2 a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) @@ -239,7 +241,6 @@ onEvent(:ALL_UP_AND_INSTALLED) do |event| Experiment.done end end - ``` diff --git a/doc/tutorials/TUTORIAL_02.draft b/doc/tutorials/TUTORIAL_02.draft index 6f64a6a6..3e5e96fc 100644 --- a/doc/tutorials/TUTORIAL_02.draft +++ b/doc/tutorials/TUTORIAL_02.draft @@ -129,7 +129,7 @@ defApplication('otg2') do |a| #Application description and binary path a.binary_path = "/usr/bin/otg2" - a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + a.description = "otg is a configurable traffic generator that sends packet streams" #Define configurable parameters of otg2 a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) @@ -163,7 +163,7 @@ defApplication('otr2') do |a| #Application description and binary path a.binary_path = "/usr/bin/otr2" - a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + a.description = "otr is a configurable traffic sink that recieves packet streams" #Define configurable parameters of otr2 a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) diff --git a/doc/tutorials/tutorial01.rb b/doc/tutorials/tutorial01.rb index ad5bf2d6..768320f2 100644 --- a/doc/tutorials/tutorial01.rb +++ b/doc/tutorials/tutorial01.rb @@ -11,7 +11,7 @@ #Application description and binary path a.binary_path = "/usr/bin/otr2" - a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + a.description = "otr is a configurable traffic sink that recieves packet streams" #Define configurable parameters of otr2 a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) @@ -33,7 +33,7 @@ #Application description and binary path a.binary_path = "/usr/bin/otg2" - a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + a.description = "otg is a configurable traffic generator that sends packet streams" #Define configurable parameters of otg2 a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) diff --git a/doc/tutorials/tutorial02.rb b/doc/tutorials/tutorial02.rb index b102327e..e66f1522 100644 --- a/doc/tutorials/tutorial02.rb +++ b/doc/tutorials/tutorial02.rb @@ -9,7 +9,7 @@ #Application description and binary path a.binary_path = "/usr/bin/otg2" - a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + a.description = "otg is a configurable traffic generator that sends packet streams" #Define configurable parameters of otg2 a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) @@ -43,7 +43,7 @@ #Application description and binary path a.binary_path = "/usr/bin/otr2" - a.description = "OTG is a configurable traffic generator. It contains generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. This version 2 is compatible with OMLv2" + a.description = "otr is a configurable traffic sink that recieves packet streams" #Define configurable parameters of otr2 a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) diff --git a/doc/tutorials/tutorial03.rb b/doc/tutorials/tutorial03.rb new file mode 100644 index 00000000..8d23919c --- /dev/null +++ b/doc/tutorials/tutorial03.rb @@ -0,0 +1,57 @@ +defProperty('theSender', 'omf.nicta.node9', "ID of sender node") +defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node") +defProperty('packetsize', 128, "Packet size (byte) from the sender node") +defProperty('bitrate', 2048, "Bitrate (bit/s) from the sender node") +defProperty('runtime', 40, "Time in second for the experiment is to run") +defProperty('wifiType', "g", "The type of WIFI to use in this experiment") +defProperty('channel', '6', "The WIFI channel to use in this experiment") +defProperty('netid', "example2", "The ESSID to use in this experiment") + +defGroup('Sender',property.theSender) do |node| + node.addApplication("test:app:otg2") do |app| + app.setProperty('udp:local_host', '192.168.0.2') + app.setProperty('udp:dst_host', '192.168.0.3') + app.setProperty('udp:dst_port', 3000) + app.setProperty('cbr:size', property.packetsize) + app.setProperty('cbr:rate', property.bitrate * 2) + app.measure('udp_out', :samples => 1) + end + node.net.w0.mode = "adhoc" + node.net.w0.type = property.wifiType + node.net.w0.channel = property.channel + node.net.w0.essid = "foo"+property.netid + node.net.w0.ip = "192.168.0.2" +end + +defGroup('Receiver',property.theReceiver) do |node| + node.addApplication("test:app:otr2") do |app| + app.setProperty('udp:local_host', '192.168.0.3') + app.setProperty('udp:local_port', 3000) + app.measure('udp_in', :samples => 1) + end + node.net.w0.mode = "adhoc" + node.net.w0.type = property.wifiType + node.net.w0.channel = property.channel + node.net.w0.essid = "foo"+property.netid + node.net.w0.ip = "192.168.0.3" +end + +onEvent(:ALL_UP_AND_INSTALLED) do |event| + info "This is my first OMF experiment" + wait 10 + allGroups.startApplications + info "All my Applications are started now..." + wait property.runtime / 4 + property.packetsize = 256 + wait property.runtime / 4 + property.packetsize = 512 + wait property.runtime / 4 + property.packetsize = 1024 + wait property.runtime / 4 + allGroups.stopApplications + info "All my Applications are stopped now." + Experiment.done +end + + + From ac30b1ac03ea5af88c79e196b0e143d1502d2d30 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Wed, 19 Jun 2013 15:04:24 +1000 Subject: [PATCH 09/44] Changes all tutorial file-formats to markdown --- doc/tutorials/{TUTORIAL_02.draft => TUTORIAL_02.mkd} | 0 doc/tutorials/{TUTORIAL_03.draft => TUTORIAL_03.mkd} | 0 doc/tutorials/{TUTORIAL_04.draft => TUTORIAL_04.mkd} | 0 doc/tutorials/{TUTORIAL_05.draft => TUTORIAL_05.mkd} | 0 doc/tutorials/{TUTORIAL_06.draft => TUTORIAL_06.mkd} | 0 doc/tutorials/{TUTORIAL_07.draft => TUTORIAL_07.mkd} | 0 doc/tutorials/{TUTORIAL_08.draft => TUTORIAL_08.mkd} | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename doc/tutorials/{TUTORIAL_02.draft => TUTORIAL_02.mkd} (100%) rename doc/tutorials/{TUTORIAL_03.draft => TUTORIAL_03.mkd} (100%) rename doc/tutorials/{TUTORIAL_04.draft => TUTORIAL_04.mkd} (100%) rename doc/tutorials/{TUTORIAL_05.draft => TUTORIAL_05.mkd} (100%) rename doc/tutorials/{TUTORIAL_06.draft => TUTORIAL_06.mkd} (100%) rename doc/tutorials/{TUTORIAL_07.draft => TUTORIAL_07.mkd} (100%) rename doc/tutorials/{TUTORIAL_08.draft => TUTORIAL_08.mkd} (100%) diff --git a/doc/tutorials/TUTORIAL_02.draft b/doc/tutorials/TUTORIAL_02.mkd similarity index 100% rename from doc/tutorials/TUTORIAL_02.draft rename to doc/tutorials/TUTORIAL_02.mkd diff --git a/doc/tutorials/TUTORIAL_03.draft b/doc/tutorials/TUTORIAL_03.mkd similarity index 100% rename from doc/tutorials/TUTORIAL_03.draft rename to doc/tutorials/TUTORIAL_03.mkd diff --git a/doc/tutorials/TUTORIAL_04.draft b/doc/tutorials/TUTORIAL_04.mkd similarity index 100% rename from doc/tutorials/TUTORIAL_04.draft rename to doc/tutorials/TUTORIAL_04.mkd diff --git a/doc/tutorials/TUTORIAL_05.draft b/doc/tutorials/TUTORIAL_05.mkd similarity index 100% rename from doc/tutorials/TUTORIAL_05.draft rename to doc/tutorials/TUTORIAL_05.mkd diff --git a/doc/tutorials/TUTORIAL_06.draft b/doc/tutorials/TUTORIAL_06.mkd similarity index 100% rename from doc/tutorials/TUTORIAL_06.draft rename to doc/tutorials/TUTORIAL_06.mkd diff --git a/doc/tutorials/TUTORIAL_07.draft b/doc/tutorials/TUTORIAL_07.mkd similarity index 100% rename from doc/tutorials/TUTORIAL_07.draft rename to doc/tutorials/TUTORIAL_07.mkd diff --git a/doc/tutorials/TUTORIAL_08.draft b/doc/tutorials/TUTORIAL_08.mkd similarity index 100% rename from doc/tutorials/TUTORIAL_08.draft rename to doc/tutorials/TUTORIAL_08.mkd From 4ac574b69b312e2814a160047a954e3af03cb971 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Wed, 19 Jun 2013 17:09:36 +1000 Subject: [PATCH 10/44] changed node8 to node9 --- doc/tutorials/tutorial00.rb | 2 +- doc/tutorials/tutorial03.rb | 163 +++++++++++++++++++++++--------- doc/tutorials/tutorial03copy.rb | 76 +++++++++++++++ 3 files changed, 195 insertions(+), 46 deletions(-) create mode 100644 doc/tutorials/tutorial03copy.rb diff --git a/doc/tutorials/tutorial00.rb b/doc/tutorials/tutorial00.rb index 95229e19..7425ce34 100644 --- a/doc/tutorials/tutorial00.rb +++ b/doc/tutorials/tutorial00.rb @@ -30,7 +30,7 @@ #Define resources and nodes used by oml2 application #Create the group 'Sender' with specified nodes -defGroup('Sender', 'omf.nicta.node8') do |g| +defGroup('Sender', 'omf.nicta.node9') do |g| #Associate oml2 application to group (?) g.addApplication("ping_oml2") do |app| diff --git a/doc/tutorials/tutorial03.rb b/doc/tutorials/tutorial03.rb index 8d23919c..d6e67468 100644 --- a/doc/tutorials/tutorial03.rb +++ b/doc/tutorials/tutorial03.rb @@ -1,57 +1,130 @@ -defProperty('theSender', 'omf.nicta.node9', "ID of sender node") -defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node") -defProperty('packetsize', 128, "Packet size (byte) from the sender node") -defProperty('bitrate', 2048, "Bitrate (bit/s) from the sender node") -defProperty('runtime', 40, "Time in second for the experiment is to run") -defProperty('wifiType', "g", "The type of WIFI to use in this experiment") -defProperty('channel', '6', "The WIFI channel to use in this experiment") -defProperty('netid', "example2", "The ESSID to use in this experiment") - -defGroup('Sender',property.theSender) do |node| - node.addApplication("test:app:otg2") do |app| - app.setProperty('udp:local_host', '192.168.0.2') - app.setProperty('udp:dst_host', '192.168.0.3') - app.setProperty('udp:dst_port', 3000) - app.setProperty('cbr:size', property.packetsize) - app.setProperty('cbr:rate', property.bitrate * 2) - app.measure('udp_out', :samples => 1) +#Welcome to 'Hello World' Wireless +#This script creates a simple wireless networking experiment + + +#Section 1 +#Define otr2 application file-paths +#Define experiment parameters and measurement points + +defApplication('otr2') do |a| + + + #Application description and binary path + a.binary_path = "/usr/bin/otr2" + a.description = "otr is a configurable traffic sink that recieves packet streams" + + #Define configurable parameters of otr2 + a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defMeasurement('udp_in') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) end +end + + +#Define otg2 application file-paths +#Define experiment parameters and measurement points +defApplication('otg2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otg2" + a.description = "otg is a configurable traffic generator that sends packet streams" + + #Define configurable parameters of otg2 + a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) + a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) + a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) + a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + + #Define measurement points that application will output + a.defMeasurement('udp_out') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + + end +end + + + +#Section 2 +#Define resources and nodes used by application + +#Define configuration of wireless 'sender' +defGroup('Sender', "omf.nicta.node36") do |node| + node.addApplication("otg2") do |app| + app.setProperty('udp_local_host', '192.168.0.2') + app.setProperty('udp_dst_host', '192.168.0.3') + app.setProperty('udp_dst_port', 3000) + app.measure('udp_out', :interval => 3) + end + node.net.w0.mode = "adhoc" - node.net.w0.type = property.wifiType - node.net.w0.channel = property.channel - node.net.w0.essid = "foo"+property.netid - node.net.w0.ip = "192.168.0.2" + node.net.w0.type = 'g' + node.net.w0.channel = "6" + node.net.w0.essid = "Hello World!" + node.net.w0.ip = "192.168.0.2/24" end -defGroup('Receiver',property.theReceiver) do |node| - node.addApplication("test:app:otr2") do |app| - app.setProperty('udp:local_host', '192.168.0.3') - app.setProperty('udp:local_port', 3000) - app.measure('udp_in', :samples => 1) + +#Define configuration of wireless 'reciever' +defGroup('Receiver', "omf.nicta.node37") do |node| + node.addApplication("otr2") do |app| + app.setProperty('udp_local_host', '192.168.0.3') + app.setProperty('udp_local_port', 3000) + app.measure('udp_in', :interval => 3) end + node.net.w0.mode = "adhoc" - node.net.w0.type = property.wifiType - node.net.w0.channel = property.channel - node.net.w0.essid = "foo"+property.netid - node.net.w0.ip = "192.168.0.3" + node.net.w0.type = 'g' + node.net.w0.channel = "6" + node.net.w0.essid = "Hello World!" + node.net.w0.ip = "192.168.0.3/24" end + + + +#Section 3 +#Execution of application events + onEvent(:ALL_UP_AND_INSTALLED) do |event| - info "This is my first OMF experiment" - wait 10 - allGroups.startApplications - info "All my Applications are started now..." - wait property.runtime / 4 - property.packetsize = 256 - wait property.runtime / 4 - property.packetsize = 512 - wait property.runtime / 4 - property.packetsize = 1024 - wait property.runtime / 4 - allGroups.stopApplications - info "All my Applications are stopped now." - Experiment.done + info "Starting WiFi OMF6 Experiment events" + + after 10 do + allGroups.startApplications + info "All Applications have started..." + + wait property.runtime / 4 + property.packetsize = 256 + wait property.runtime / 4 + property.packetsize = 512 + wait property.runtime / 4 + property.packetsize = 1024 + wait property.runtime / 4 + + end + after 40 do + allGroups.stopApplications + info "Applications are stopping... Experiment Complete." + Experiment.done + end end - diff --git a/doc/tutorials/tutorial03copy.rb b/doc/tutorials/tutorial03copy.rb new file mode 100644 index 00000000..045d227e --- /dev/null +++ b/doc/tutorials/tutorial03copy.rb @@ -0,0 +1,76 @@ +defApplication('otr2') do |a| + + + #Application description and binary path + a.binary_path = "/usr/bin/otr2" + a.description = "otr is a configurable traffic sink that recieves packet streams" +end + + +defApplication('otg2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otg2" + a.description = "otg is a configurable traffic generator that sends packet streams" + +end + + + +defProperty('theSender', 'omf.nicta.node9', "ID of sender node") +defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node") +defProperty('packetsize', 128, "Packet size (byte) from the sender node") +defProperty('bitrate', 2048, "Bitrate (bit/s) from the sender node") +defProperty('runtime', 40, "Time in second for the experiment is to run") +defProperty('wifiType', "g", "The type of WIFI to use in this experiment") +defProperty('channel', '6', "The WIFI channel to use in this experiment") +defProperty('netid', "Hello World! Experiment in Progress", "The ESSID to use in this experiment") + +defGroup('Sender',property.theSender) do |node| + node.addApplication("otg2") do |app| + app.setProperty('udp_local_host', '192.168.0.2') + app.setProperty('udp_dst_host', '192.168.0.3') + app.setProperty('udp_dst_port', 3000) + app.setProperty('cbr_size', property.packetsize) + app.setProperty('cbr_rate', property.bitrate * 2) + app.measure('udp_out', :samples => 1) + end + node.net.w0.mode = "adhoc" + node.net.w0.type = property.wifiType + node.net.w0.channel = property.channel + node.net.w0.essid = "foo"+property.netid + node.net.w0.ip = "192.168.0.2/24" +end + +defGroup('Receiver',property.theReceiver) do |node| + node.addApplication("otr2") do |app| + app.setProperty('udp:local_host', '192.168.0.3') + app.setProperty('udp:local_port', 3000) + app.measure('udp_in', :samples => 1) + end + node.net.w0.mode = "adhoc" + node.net.w0.type = property.wifiType + node.net.w0.channel = property.channel + node.net.w0.essid = "foo"+property.netid + node.net.w0.ip = "192.168.0.3/24" +end + +onEvent(:ALL_UP_AND_INSTALLED) do |event| + info "This is my first OMF experiment" + wait 10 + allGroups.startApplications + info "All my Applications are started now..." + wait property.runtime / 4 + property.packetsize = 256 + wait property.runtime / 4 + property.packetsize = 512 + wait property.runtime / 4 + property.packetsize = 1024 + wait property.runtime / 4 + allGroups.stopApplications + info "All my Applications are stopped now." + Experiment.done +end + + + From a49fc7478d24ff9f9cbe201ae4655421599e5aeb Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Wed, 19 Jun 2013 21:49:45 +1000 Subject: [PATCH 11/44] Renamed tutorial files --- .../{TUTORIAL_00.mkd => Experiment01.mkd} | 30 ++++++------- .../{TUTORIAL_01.mkd => Experiment02.mkd} | 4 +- .../{TUTORIAL_03.mkd => Experiment03.mkd} | 0 .../{TUTORIAL_04.mkd => Experiment04.mkd} | 0 .../{TUTORIAL_05.mkd => Experiment05.mkd} | 0 .../{TUTORIAL_06.mkd => Experiment06.mkd} | 0 .../{TUTORIAL_07.mkd => Experiment07.mkd} | 0 .../{TUTORIAL_08.mkd => Experiment08.mkd} | 0 .../{TUTORIALS.mkd => Experiments.mkd} | 0 .../{tutorial00.rb => experiment01.rb} | 2 +- .../{tutorial01.rb => experiment02.rb} | 0 .../{tutorial03.rb => experiment03.rb} | 0 ...{tutorial03copy.rb => experiment03copy.rb} | 0 doc/tutorials/experiment04.rb | 44 +++++++++++++++++++ doc/tutorials/{ => forget}/TUTORIAL_02.mkd | 0 doc/tutorials/{ => forget}/tutorial02.rb | 0 16 files changed, 62 insertions(+), 18 deletions(-) rename doc/tutorials/{TUTORIAL_00.mkd => Experiment01.mkd} (96%) rename doc/tutorials/{TUTORIAL_01.mkd => Experiment02.mkd} (99%) rename doc/tutorials/{TUTORIAL_03.mkd => Experiment03.mkd} (100%) rename doc/tutorials/{TUTORIAL_04.mkd => Experiment04.mkd} (100%) rename doc/tutorials/{TUTORIAL_05.mkd => Experiment05.mkd} (100%) rename doc/tutorials/{TUTORIAL_06.mkd => Experiment06.mkd} (100%) rename doc/tutorials/{TUTORIAL_07.mkd => Experiment07.mkd} (100%) rename doc/tutorials/{TUTORIAL_08.mkd => Experiment08.mkd} (100%) rename doc/tutorials/{TUTORIALS.mkd => Experiments.mkd} (100%) rename doc/tutorials/{tutorial00.rb => experiment01.rb} (97%) rename doc/tutorials/{tutorial01.rb => experiment02.rb} (100%) rename doc/tutorials/{tutorial03.rb => experiment03.rb} (100%) rename doc/tutorials/{tutorial03copy.rb => experiment03copy.rb} (100%) create mode 100644 doc/tutorials/experiment04.rb rename doc/tutorials/{ => forget}/TUTORIAL_02.mkd (100%) rename doc/tutorials/{ => forget}/tutorial02.rb (100%) diff --git a/doc/tutorials/TUTORIAL_00.mkd b/doc/tutorials/Experiment01.mkd similarity index 96% rename from doc/tutorials/TUTORIAL_00.mkd rename to doc/tutorials/Experiment01.mkd index 54984a94..3b1a2f5d 100644 --- a/doc/tutorials/TUTORIAL_00.mkd +++ b/doc/tutorials/Experiment01.mkd @@ -27,7 +27,7 @@ Description Language **Files** The experiment description (aka script) is: -{file:doc/tutorials/tutorial00.rb tutorial00.rb} +{file:doc/tutorials/experiment01.rb experiment01.rb} **Experiment Scenario** @@ -135,7 +135,7 @@ of the resources involved in an experiment and the sets of actions to perform in order to realize that experiment. An ED is written using the OMF Experiment Description Language (OEDL). -The ED describing this simple “Hello World” experiment is {file:doc/tutorials/tutorial00.rb tutorial00.rb}. It is composed of 3 distinct +The ED describing this simple “Hello World” experiment is {file:doc/tutorials/experiment01.rb experiment01.rb}. It is composed of 3 distinct parts, described in the following listing and subsections below. ```ruby @@ -265,7 +265,7 @@ Groups. A named Group can be itself viewed as a resource holding other resources. A given resource can belong to many groups at the same time, and a group itself may be part of another group. In this example, we define a single group named 'Sender', which contains a -single resource 'omf6.nicta.node8'. +single resource 'omf.nicta.node8'. > **IMPORTANT** When running this experiment using your own resource and testbed please change 'omf.nicta.node8' in the ED to the actual name of your @@ -368,9 +368,9 @@ section 2, and that you have the EC software installed on your own computer, then to run your experiment you have to: - save its description in a file on your computer, thus either - - cut-and-paste the above ED listing into a new file named 'tutorial00.rb' + - cut-and-paste the above ED listing into a new file named 'experiment01.rb' - download the ED directly: -{file:doc/tutorials/tutorial00.rb tutorial00.rb} +{file:doc/tutorials/experiment01.rb experiment01.rb} - open a terminal and navigate to the folder/directory where you saved that file - start the EC software and tell it to execute the experiment described in your ED file, using the command line: @@ -406,9 +406,9 @@ similar to this: INFO Object: Connected INFO Object: Start experiment: 2013-03-14T03:48:48Z INFO OmfEc: Subscribed to 856de74b-6cf7-4de7-aaad-6c842eea209a - INFO OmfEc: Subscribed to omf6.nicta.node8 - INFO OmfEc: Config omf6.nicta.node8 to join Sender - INFO OmfEc: Newly discovered resource >> omf6dev.node8 + INFO OmfEc: Subscribed to omf.nicta.node8 + INFO OmfEc: Config omf.nicta.node8 to join Sender + INFO OmfEc: Newly discovered resource >> omfdev.node8 INFO OmfEc: Event triggered: 'ALL_UP' INFO OmfEc: Subscribed to 856de74b-6cf7-4de7-aaad-6c842eea209a_application INFO OmfEc: Resource xmpp://bd9c68d5-1469-41a0-9a33-4bdba501f7b0@norbit.npc.nicta.com.au created @@ -433,8 +433,8 @@ similar to this: The above screen output was optained when running the EC on the NICTA testbed, with the experiment described in -{file:doc/tutorials/tutorial00.rb tutorial00.rb} -and using the resource named 'omf6.nicta.node8' +{file:doc/tutorials/experiment01.rb experiment01.rb} +and using the resource named 'omf.nicta.node8' ### 4c) What does that screen output mean? @@ -447,17 +447,17 @@ this experiment (ID, xmpp server used, resource used,...): INFO Object: Connected INFO Object: Start experiment: 2013-03-14T03:48:48Z ... - INFO OmfEc: Subscribed to omf6.nicta.node8 - INFO OmfEc: Config omf6.nicta.node8 to join Sender + INFO OmfEc: Subscribed to omf.nicta.node8 + INFO OmfEc: Config omf.nicta.node8 to join Sender - It also provides us some feedback about its communication with the xmpp server and other OMF entities: ... INFO OmfEc: Subscribed to 856de74b-6cf7-4de7-aaad-6c842eea209a - INFO OmfEc: Subscribed to omf6.nicta.node8 + INFO OmfEc: Subscribed to omf.nicta.node8 ... - INFO OmfEc: Newly discovered resource >> omf6dev.node8 + INFO OmfEc: Newly discovered resource >> omfdev.node8 ... INFO OmfEc: Subscribed to 856de74b-6cf7-4de7-aaad-6c842eea209a_application ... @@ -545,7 +545,7 @@ use that tool, please refer to the [omf_web documentation] 6. What should I do next? ------------------------- -We will soon release more tutorials on how to use all the features of OMF6 +We will soon release more tutorials on how to use all the features of omf from the experimenter's perspective. In the meantime, you may have a look at the OMF 5.4 documentation, which diff --git a/doc/tutorials/TUTORIAL_01.mkd b/doc/tutorials/Experiment02.mkd similarity index 99% rename from doc/tutorials/TUTORIAL_01.mkd rename to doc/tutorials/Experiment02.mkd index 21c27e53..83b91674 100644 --- a/doc/tutorials/TUTORIAL_01.mkd +++ b/doc/tutorials/Experiment02.mkd @@ -27,7 +27,7 @@ Description Language **Files** The experiment description (aka OEDL script) is: -{file:doc/tutorials/tutorial01.rb tutorial01.rb} +{file:doc/tutorials/experiment02.rb experiment02.rb} **Experiment Scenario** @@ -118,7 +118,7 @@ of the resources involved in an experiment and the sets of actions to perform in order to execute that experiment. An ED is written using the OMF Experiment Description Language (OEDL), which is based on Ruby syntax. -The ED describing this simple “Hello World” wireless experiment is {file:doc/tutorials/tutorial01.rb tutorial01.rb}: +The ED describing this simple “Hello World” wireless experiment is {file:doc/tutorials/experiment02.rb experiment02.rb}: ```ruby #Welcome to 'Hello World' Wireless diff --git a/doc/tutorials/TUTORIAL_03.mkd b/doc/tutorials/Experiment03.mkd similarity index 100% rename from doc/tutorials/TUTORIAL_03.mkd rename to doc/tutorials/Experiment03.mkd diff --git a/doc/tutorials/TUTORIAL_04.mkd b/doc/tutorials/Experiment04.mkd similarity index 100% rename from doc/tutorials/TUTORIAL_04.mkd rename to doc/tutorials/Experiment04.mkd diff --git a/doc/tutorials/TUTORIAL_05.mkd b/doc/tutorials/Experiment05.mkd similarity index 100% rename from doc/tutorials/TUTORIAL_05.mkd rename to doc/tutorials/Experiment05.mkd diff --git a/doc/tutorials/TUTORIAL_06.mkd b/doc/tutorials/Experiment06.mkd similarity index 100% rename from doc/tutorials/TUTORIAL_06.mkd rename to doc/tutorials/Experiment06.mkd diff --git a/doc/tutorials/TUTORIAL_07.mkd b/doc/tutorials/Experiment07.mkd similarity index 100% rename from doc/tutorials/TUTORIAL_07.mkd rename to doc/tutorials/Experiment07.mkd diff --git a/doc/tutorials/TUTORIAL_08.mkd b/doc/tutorials/Experiment08.mkd similarity index 100% rename from doc/tutorials/TUTORIAL_08.mkd rename to doc/tutorials/Experiment08.mkd diff --git a/doc/tutorials/TUTORIALS.mkd b/doc/tutorials/Experiments.mkd similarity index 100% rename from doc/tutorials/TUTORIALS.mkd rename to doc/tutorials/Experiments.mkd diff --git a/doc/tutorials/tutorial00.rb b/doc/tutorials/experiment01.rb similarity index 97% rename from doc/tutorials/tutorial00.rb rename to doc/tutorials/experiment01.rb index 7425ce34..95229e19 100644 --- a/doc/tutorials/tutorial00.rb +++ b/doc/tutorials/experiment01.rb @@ -30,7 +30,7 @@ #Define resources and nodes used by oml2 application #Create the group 'Sender' with specified nodes -defGroup('Sender', 'omf.nicta.node9') do |g| +defGroup('Sender', 'omf.nicta.node8') do |g| #Associate oml2 application to group (?) g.addApplication("ping_oml2") do |app| diff --git a/doc/tutorials/tutorial01.rb b/doc/tutorials/experiment02.rb similarity index 100% rename from doc/tutorials/tutorial01.rb rename to doc/tutorials/experiment02.rb diff --git a/doc/tutorials/tutorial03.rb b/doc/tutorials/experiment03.rb similarity index 100% rename from doc/tutorials/tutorial03.rb rename to doc/tutorials/experiment03.rb diff --git a/doc/tutorials/tutorial03copy.rb b/doc/tutorials/experiment03copy.rb similarity index 100% rename from doc/tutorials/tutorial03copy.rb rename to doc/tutorials/experiment03copy.rb diff --git a/doc/tutorials/experiment04.rb b/doc/tutorials/experiment04.rb new file mode 100644 index 00000000..63a0a9a2 --- /dev/null +++ b/doc/tutorials/experiment04.rb @@ -0,0 +1,44 @@ +defGroup('Sender', "omf.nicta.node9") do |node| + defApplication('otg2') do |a| + a.binary_path = "/usr/bin/otg2" + a.description = "otg is a configurable traffic generator that sends packet streams" + app.setProperty('udp_local_host', '%net.w0.ip%') + app.setProperty('udp_dst_host', '192.168.255.255') + app.setProperty('udp_broadcast', 1) + app.setProperty('udp_dst_port', 3000) + app.measure('udp_out', :samples => 1) + end +end + +defGroup('Receiver', "omf.nicta.node10") do |node| + defApplication('otr2') do |a| + a.binary_path = "/usr/bin/otr2" + a.description = "otr is a configurable traffic sink that recieves packet streams" + app.setProperty('udp_local_host', '192.168.255.255') + app.setProperty('udp_local_port', 3000) + app.measure('udp_in', :samples => 1) + end +end + +allGroups.net.w0 do |interface| + interface.mode = "adhoc" + interface.type = 'g' + interface.channel = "6" + interface.essid = "helloworld-tutorial04" + interface.ip = "192.168.0.%index%" +end + +onEvent(:ALL_UP_AND_INSTALLED) do |event| + wait 10 + group("Receiver").startApplications + wait 5 + group("Sender").startApplications + wait 30 + group("Sender").stopApplications + wait 5 + group("Receiver").stopApplications + Experiment.done +end + + + diff --git a/doc/tutorials/TUTORIAL_02.mkd b/doc/tutorials/forget/TUTORIAL_02.mkd similarity index 100% rename from doc/tutorials/TUTORIAL_02.mkd rename to doc/tutorials/forget/TUTORIAL_02.mkd diff --git a/doc/tutorials/tutorial02.rb b/doc/tutorials/forget/tutorial02.rb similarity index 100% rename from doc/tutorials/tutorial02.rb rename to doc/tutorials/forget/tutorial02.rb From c9c89081fcbccfe18089ac3d85c058913aa7492c Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Wed, 19 Jun 2013 21:58:20 +1000 Subject: [PATCH 12/44] Changed filename --- doc/tutorials/{Experiments.mkd => Experiment_Index.mkd} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/tutorials/{Experiments.mkd => Experiment_Index.mkd} (100%) diff --git a/doc/tutorials/Experiments.mkd b/doc/tutorials/Experiment_Index.mkd similarity index 100% rename from doc/tutorials/Experiments.mkd rename to doc/tutorials/Experiment_Index.mkd From 9c0886644ab458cb0eec8c05d692ef2286991ff1 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Wed, 19 Jun 2013 22:22:28 +1000 Subject: [PATCH 13/44] Introduced new markdown feature --- doc/tutorials/Experiment01.mkd | 4 +++- doc/tutorials/Experiment02.mkd | 3 ++- doc/tutorials/Experiment03.mkd | 4 ++++ doc/tutorials/Experiment04.mkd | 4 ++++ doc/tutorials/Experiment05.mkd | 3 +++ doc/tutorials/Experiment06.mkd | 3 +++ doc/tutorials/Experiment07.mkd | 3 +++ doc/tutorials/Experiment08.mkd | 3 +++ 8 files changed, 25 insertions(+), 2 deletions(-) diff --git a/doc/tutorials/Experiment01.mkd b/doc/tutorials/Experiment01.mkd index 3b1a2f5d..1fc34cf7 100644 --- a/doc/tutorials/Experiment01.mkd +++ b/doc/tutorials/Experiment01.mkd @@ -1,4 +1,6 @@ -# Tutorial 00 +TUTORIAL +# Experiment 01 + 1. "Hello World" Tutorial --------------------------- diff --git a/doc/tutorials/Experiment02.mkd b/doc/tutorials/Experiment02.mkd index 83b91674..b0c6e323 100644 --- a/doc/tutorials/Experiment02.mkd +++ b/doc/tutorials/Experiment02.mkd @@ -1,4 +1,5 @@ -# Tutorial 01 +TUTORIAL +# Experiment 02 1. “Hello World” - Wireless --------------------------- diff --git a/doc/tutorials/Experiment03.mkd b/doc/tutorials/Experiment03.mkd index 147cf787..586852c1 100644 --- a/doc/tutorials/Experiment03.mkd +++ b/doc/tutorials/Experiment03.mkd @@ -1,3 +1,7 @@ +TUTORIAL +# Experiment 03 + + How to pass parameters to your experiment and change them at run-time ===================================================================== diff --git a/doc/tutorials/Experiment04.mkd b/doc/tutorials/Experiment04.mkd index 775f6dfe..464ea997 100644 --- a/doc/tutorials/Experiment04.mkd +++ b/doc/tutorials/Experiment04.mkd @@ -1,3 +1,7 @@ +TUTORIAL +# Experiment 04 + + How to configure or address all resources within a defined group, and use simple substitutions ============================================================================================== diff --git a/doc/tutorials/Experiment05.mkd b/doc/tutorials/Experiment05.mkd index 6eb29c89..53f71c52 100644 --- a/doc/tutorials/Experiment05.mkd +++ b/doc/tutorials/Experiment05.mkd @@ -1,3 +1,6 @@ +TUTORIAL +# Experiment 05 + How to use your own or a 3rd party application with OMF ======================================================= diff --git a/doc/tutorials/Experiment06.mkd b/doc/tutorials/Experiment06.mkd index 418fc833..f1a0286c 100644 --- a/doc/tutorials/Experiment06.mkd +++ b/doc/tutorials/Experiment06.mkd @@ -1,3 +1,6 @@ +TUTORIAL +# Experiment 06 + How to use Filters to customise your Measurement Collection =========================================================== diff --git a/doc/tutorials/Experiment07.mkd b/doc/tutorials/Experiment07.mkd index ee145fd6..416d46a1 100644 --- a/doc/tutorials/Experiment07.mkd +++ b/doc/tutorials/Experiment07.mkd @@ -1,3 +1,6 @@ +TUTORIAL +# Experiment 07 + How to use OMF Prototypes to specify your Application ===================================================== diff --git a/doc/tutorials/Experiment08.mkd b/doc/tutorials/Experiment08.mkd index cf2a5f8f..56605977 100644 --- a/doc/tutorials/Experiment08.mkd +++ b/doc/tutorials/Experiment08.mkd @@ -1,3 +1,6 @@ +TUTORIAL +# Experiment 08 + The Conference Room Tutorial ============================ From baf2aa653a83b4af39f6316819e33c5b49c89e56 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 10:51:47 +1000 Subject: [PATCH 14/44] Converted experiment 3 from OMF5 to OMF6. Still some errors. + Added references to 'ED' in comments rather than 'OML2 Application' --- doc/tutorials/experiment01.rb | 2 +- doc/tutorials/experiment03.rb | 191 ++++++++++++++++-------------- doc/tutorials/experiment03copy.rb | 76 ------------ 3 files changed, 103 insertions(+), 166 deletions(-) delete mode 100644 doc/tutorials/experiment03copy.rb diff --git a/doc/tutorials/experiment01.rb b/doc/tutorials/experiment01.rb index 95229e19..8d497e17 100644 --- a/doc/tutorials/experiment01.rb +++ b/doc/tutorials/experiment01.rb @@ -1,4 +1,4 @@ -#Welcome to your first ruby OML2 application +#Welcome to your first Experiment Description #This OML2 application is designed to ping a specified host and collect the output it recieves in a sq3 database #Section 1 diff --git a/doc/tutorials/experiment03.rb b/doc/tutorials/experiment03.rb index d6e67468..48c76634 100644 --- a/doc/tutorials/experiment03.rb +++ b/doc/tutorials/experiment03.rb @@ -1,130 +1,143 @@ -#Welcome to 'Hello World' Wireless -#This script creates a simple wireless networking experiment - +#Welcome to the Dynamic Properties ED +#This ED allows the experimenter to pass parameters to the experiment and change them at run-time +############################################################################################### +############################################################################################### #Section 1 -#Define otr2 application file-paths +#Define application file-paths #Define experiment parameters and measurement points -defApplication('otr2') do |a| - +defApplication('otg2') do |app| #Application description and binary path - a.binary_path = "/usr/bin/otr2" - a.description = "otr is a configurable traffic sink that recieves packet streams" + app.description = 'otg2 is a configurable traffic generator' + app.binary_path = '/usr/bin/otg2' - #Define configurable parameters of otr2 - a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) - a.defMeasurement('udp_in') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) + #Configurable parameters of Experiment + app.defProperty('target', 'Address to ping', '-a', {:type => :string}) + app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer}) + + + #Define measurement points that application will output + app.defMeasurement('ping') do |m| + m.defMetric('dest_addr',:string) + m.defMetric('ttl',:uint32) + m.defMetric('rtt',:double) + m.defMetric('rtt_unit',:string) + end end -#Define otg2 application file-paths -#Define experiment parameters and measurement points -defApplication('otg2') do |a| +defApplication('otr2') do |app| - #Application description and binary path - a.binary_path = "/usr/bin/otg2" - a.description = "otg is a configurable traffic generator that sends packet streams" + #Application description and binary path + app.description = 'otr2 is a configurable traffic reciever' + app.binary_path = '/usr/bin/otr2' - #Define configurable parameters of otg2 - a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) - a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) - a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) - a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) - a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) - a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) - a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) - a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) - a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) - a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + #Configurable parameters of Experiment + app.defProperty('target', 'Address to ping', '-a', {:type => :string}) + app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer}) - #Define measurement points that application will output - a.defMeasurement('udp_out') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) + + #Define measurement points that application will output + app.defMeasurement('ping') do |m| + m.defMetric('dest_addr',:string) + m.defMetric('ttl',:uint32) + m.defMetric('rtt',:double) + m.defMetric('rtt_unit',:string) end end - - +############################################################################################### +############################################################################################### +#Define dynamic properties + +defProperty('theSender', 'omf.nicta.node9', "ID of sender node") +defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node") +defProperty('packetsize', 128, "Packet size (byte) from the sender node") +defProperty('bitrate', 2048, "Bitrate (bit/s) from the sender node") +defProperty('runtime', 40, "Time in second for the experiment is to run") +defProperty('wifiType', "g", "The type of WIFI to use in this experiment") +defProperty('channel', '6', "The WIFI channel to use in this experiment") +defProperty('netid', "example2", "The ESSID to use in this experiment") + +############################################################################################### +############################################################################################### #Section 2 -#Define resources and nodes used by application +#Define resources and nodes used by oml2 application -#Define configuration of wireless 'sender' -defGroup('Sender', "omf.nicta.node36") do |node| - node.addApplication("otg2") do |app| +#Create the group 'Sender' associated to dynamic property +defGroup('Sender',property.theSender) do |node| + + #Associate oml2 application to group (?) + g.addApplication("otg2") do |app| + + #Configure aplication app.setProperty('udp_local_host', '192.168.0.2') app.setProperty('udp_dst_host', '192.168.0.3') app.setProperty('udp_dst_port', 3000) - app.measure('udp_out', :interval => 3) - end - + app.setProperty('cbr_size', property.packetsize) + app.setProperty('cbr_rate', property.bitrate * 2) + + #Request application to collect measurement point output data + app.measure('udp_out', :samples => 1) + + end node.net.w0.mode = "adhoc" - node.net.w0.type = 'g' - node.net.w0.channel = "6" - node.net.w0.essid = "Hello World!" + node.net.w0.type = property.wifiType + node.net.w0.channel = property.channel + node.net.w0.essid = "foo"+property.netid node.net.w0.ip = "192.168.0.2/24" end - -#Define configuration of wireless 'reciever' -defGroup('Receiver', "omf.nicta.node37") do |node| - node.addApplication("otr2") do |app| +#Create the group 'Reciever' associated to dynamic property +defGroup('Reciever',property.theReceiver) do |node| + + #Associate oml2 application to group (?) + g.addApplication("otg2") do |app| + + #Configure application app.setProperty('udp_local_host', '192.168.0.3') app.setProperty('udp_local_port', 3000) - app.measure('udp_in', :interval => 3) - end - + + #Request application to collect measurement point output data + app.measure('udp_in', :samples => 1) + + end node.net.w0.mode = "adhoc" - node.net.w0.type = 'g' - node.net.w0.channel = "6" - node.net.w0.essid = "Hello World!" + node.net.w0.type = property.wifiType + node.net.w0.channel = property.channel + node.net.w0.essid = "foo"+property.netid node.net.w0.ip = "192.168.0.3/24" end - - -#Section 3 +############################################################################################### +############################################################################################### +#Section 3 #Execution of application events onEvent(:ALL_UP_AND_INSTALLED) do |event| - info "Starting WiFi OMF6 Experiment events" - after 10 do - allGroups.startApplications - info "All Applications have started..." - - wait property.runtime / 4 - property.packetsize = 256 - wait property.runtime / 4 - property.packetsize = 512 - wait property.runtime / 4 - property.packetsize = 1024 - wait property.runtime / 4 - - end - after 40 do - allGroups.stopApplications - info "Applications are stopping... Experiment Complete." - Experiment.done - end + info "Starting dynamic properties ED..." + wait 10 + + allGroups.startApplications + info "Applications have started..." + + wait property.runtime / 4 + property.packetsize = 256 + wait property.runtime / 4 + property.packetsize = 512 + wait property.runtime / 4 + property.packetsize = 1024 + wait property.runtime / 4 + + allGroups.stopApplications + info "Applications are stopping... Experiment complete." + Experiment.done end diff --git a/doc/tutorials/experiment03copy.rb b/doc/tutorials/experiment03copy.rb deleted file mode 100644 index 045d227e..00000000 --- a/doc/tutorials/experiment03copy.rb +++ /dev/null @@ -1,76 +0,0 @@ -defApplication('otr2') do |a| - - - #Application description and binary path - a.binary_path = "/usr/bin/otr2" - a.description = "otr is a configurable traffic sink that recieves packet streams" -end - - -defApplication('otg2') do |a| - - #Application description and binary path - a.binary_path = "/usr/bin/otg2" - a.description = "otg is a configurable traffic generator that sends packet streams" - -end - - - -defProperty('theSender', 'omf.nicta.node9', "ID of sender node") -defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node") -defProperty('packetsize', 128, "Packet size (byte) from the sender node") -defProperty('bitrate', 2048, "Bitrate (bit/s) from the sender node") -defProperty('runtime', 40, "Time in second for the experiment is to run") -defProperty('wifiType', "g", "The type of WIFI to use in this experiment") -defProperty('channel', '6', "The WIFI channel to use in this experiment") -defProperty('netid', "Hello World! Experiment in Progress", "The ESSID to use in this experiment") - -defGroup('Sender',property.theSender) do |node| - node.addApplication("otg2") do |app| - app.setProperty('udp_local_host', '192.168.0.2') - app.setProperty('udp_dst_host', '192.168.0.3') - app.setProperty('udp_dst_port', 3000) - app.setProperty('cbr_size', property.packetsize) - app.setProperty('cbr_rate', property.bitrate * 2) - app.measure('udp_out', :samples => 1) - end - node.net.w0.mode = "adhoc" - node.net.w0.type = property.wifiType - node.net.w0.channel = property.channel - node.net.w0.essid = "foo"+property.netid - node.net.w0.ip = "192.168.0.2/24" -end - -defGroup('Receiver',property.theReceiver) do |node| - node.addApplication("otr2") do |app| - app.setProperty('udp:local_host', '192.168.0.3') - app.setProperty('udp:local_port', 3000) - app.measure('udp_in', :samples => 1) - end - node.net.w0.mode = "adhoc" - node.net.w0.type = property.wifiType - node.net.w0.channel = property.channel - node.net.w0.essid = "foo"+property.netid - node.net.w0.ip = "192.168.0.3/24" -end - -onEvent(:ALL_UP_AND_INSTALLED) do |event| - info "This is my first OMF experiment" - wait 10 - allGroups.startApplications - info "All my Applications are started now..." - wait property.runtime / 4 - property.packetsize = 256 - wait property.runtime / 4 - property.packetsize = 512 - wait property.runtime / 4 - property.packetsize = 1024 - wait property.runtime / 4 - allGroups.stopApplications - info "All my Applications are stopped now." - Experiment.done -end - - - From 41005386e7e98babff2506603141e65e0552e0fc Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 10:54:43 +1000 Subject: [PATCH 15/44] Addressed error messages Changed 'g.application' to 'node.application' to work with new code style --- doc/tutorials/experiment03.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/tutorials/experiment03.rb b/doc/tutorials/experiment03.rb index 48c76634..c778c745 100644 --- a/doc/tutorials/experiment03.rb +++ b/doc/tutorials/experiment03.rb @@ -72,7 +72,7 @@ defGroup('Sender',property.theSender) do |node| #Associate oml2 application to group (?) - g.addApplication("otg2") do |app| + node.addApplication("otg2") do |app| #Configure aplication app.setProperty('udp_local_host', '192.168.0.2') @@ -96,7 +96,7 @@ defGroup('Reciever',property.theReceiver) do |node| #Associate oml2 application to group (?) - g.addApplication("otg2") do |app| + node.addApplication("otg2") do |app| #Configure application app.setProperty('udp_local_host', '192.168.0.3') From af8b8e8b95ca2b95afc45bd0c7456bf6f52211e3 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 11:05:16 +1000 Subject: [PATCH 16/44] Fixed bugs. Still errors in code. Syntax OK --- doc/tutorials/experiment03.rb | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/doc/tutorials/experiment03.rb b/doc/tutorials/experiment03.rb index c778c745..6390a797 100644 --- a/doc/tutorials/experiment03.rb +++ b/doc/tutorials/experiment03.rb @@ -14,16 +14,14 @@ app.binary_path = '/usr/bin/otg2' #Configurable parameters of Experiment - app.defProperty('target', 'Address to ping', '-a', {:type => :string}) - app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer}) - + a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) #Define measurement points that application will output - app.defMeasurement('ping') do |m| - m.defMetric('dest_addr',:string) - m.defMetric('ttl',:uint32) - m.defMetric('rtt',:double) - m.defMetric('rtt_unit',:string) + end end @@ -36,23 +34,20 @@ app.binary_path = '/usr/bin/otr2' #Configurable parameters of Experiment - app.defProperty('target', 'Address to ping', '-a', {:type => :string}) - app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer}) + a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defMeasurement('udp_in') do |m| #Define measurement points that application will output - app.defMeasurement('ping') do |m| - m.defMetric('dest_addr',:string) - m.defMetric('ttl',:uint32) - m.defMetric('rtt',:double) - m.defMetric('rtt_unit',:string) + end end ############################################################################################### ############################################################################################### -#Define dynamic properties +#Define dynamic properties to be changed by experimenter defProperty('theSender', 'omf.nicta.node9', "ID of sender node") defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node") @@ -71,7 +66,7 @@ #Create the group 'Sender' associated to dynamic property defGroup('Sender',property.theSender) do |node| - #Associate oml2 application to group (?) + #Associate application to group (?) node.addApplication("otg2") do |app| #Configure aplication @@ -95,8 +90,8 @@ #Create the group 'Reciever' associated to dynamic property defGroup('Reciever',property.theReceiver) do |node| - #Associate oml2 application to group (?) - node.addApplication("otg2") do |app| + #Associate application to group (?) + node.addApplication("otr2") do |app| #Configure application app.setProperty('udp_local_host', '192.168.0.3') From 17b42015a54e4016287d2e355a2c8bd87a8e6c8a Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 11:07:18 +1000 Subject: [PATCH 17/44] Fixed syntax error at lines 26 and 45 --- doc/tutorials/experiment03.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/tutorials/experiment03.rb b/doc/tutorials/experiment03.rb index 6390a797..5092770e 100644 --- a/doc/tutorials/experiment03.rb +++ b/doc/tutorials/experiment03.rb @@ -23,7 +23,7 @@ #Define measurement points that application will output - end + #end end @@ -42,7 +42,7 @@ #Define measurement points that application will output - end + #end end ############################################################################################### From f45898d579c795bb4383eb029e798c8dd117c3cd Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 11:20:04 +1000 Subject: [PATCH 18/44] Errors stilll present ERROR Object: undefined local variable or method `a' for main:Object ERROR Object: ex3.rb:17:in `block in ' --- doc/tutorials/experiment03.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/tutorials/experiment03.rb b/doc/tutorials/experiment03.rb index 5092770e..0cf6b743 100644 --- a/doc/tutorials/experiment03.rb +++ b/doc/tutorials/experiment03.rb @@ -21,9 +21,10 @@ a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) #Define measurement points that application will output - + a.defMeasurement('udp_out') do |m| + - #end + end end @@ -36,13 +37,13 @@ #Configurable parameters of Experiment a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) - a.defMeasurement('udp_in') do |m| #Define measurement points that application will output + a.defMeasurement('udp_in') do |m| - #end + end end ############################################################################################### @@ -61,7 +62,7 @@ ############################################################################################### ############################################################################################### #Section 2 -#Define resources and nodes used by oml2 application +#Define resources and nodes used by application #Create the group 'Sender' associated to dynamic property defGroup('Sender',property.theSender) do |node| @@ -133,6 +134,4 @@ allGroups.stopApplications info "Applications are stopping... Experiment complete." Experiment.done -end - - +end \ No newline at end of file From 3da060ccf106b070dd68b72d62b0abb713a257b7 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 11:47:57 +1000 Subject: [PATCH 19/44] Solved errors Correctly changed 'a' to 'app.' to associate with |app| group --- doc/tutorials/experiment03.rb | 26 +++++++++++++------------- doc/tutorials/experiment04.rb | 14 +++++++------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/tutorials/experiment03.rb b/doc/tutorials/experiment03.rb index 0cf6b743..63591848 100644 --- a/doc/tutorials/experiment03.rb +++ b/doc/tutorials/experiment03.rb @@ -14,14 +14,14 @@ app.binary_path = '/usr/bin/otg2' #Configurable parameters of Experiment - a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) - a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) - a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + app.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + app.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + app.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) #Define measurement points that application will output - a.defMeasurement('udp_out') do |m| + app.defMeasurement('udp_out') do |m| end @@ -35,12 +35,12 @@ app.binary_path = '/usr/bin/otr2' #Configurable parameters of Experiment - a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + app.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) #Define measurement points that application will output - a.defMeasurement('udp_in') do |m| + app.defMeasurement('udp_in') do |m| end @@ -123,13 +123,13 @@ allGroups.startApplications info "Applications have started..." - wait property.runtime / 4 + after property.runtime / 4 property.packetsize = 256 - wait property.runtime / 4 + after property.runtime / 4 *2 property.packetsize = 512 - wait property.runtime / 4 + after property.runtime / 4 *3 property.packetsize = 1024 - wait property.runtime / 4 + after property.runtime allGroups.stopApplications info "Applications are stopping... Experiment complete." diff --git a/doc/tutorials/experiment04.rb b/doc/tutorials/experiment04.rb index 63a0a9a2..72775d6b 100644 --- a/doc/tutorials/experiment04.rb +++ b/doc/tutorials/experiment04.rb @@ -1,7 +1,7 @@ defGroup('Sender', "omf.nicta.node9") do |node| - defApplication('otg2') do |a| - a.binary_path = "/usr/bin/otg2" - a.description = "otg is a configurable traffic generator that sends packet streams" + defApplication('otg2') do |app| + app.binary_path = "/usr/bin/otg2" + app.description = "otg is a configurable traffic generator that sends packet streams" app.setProperty('udp_local_host', '%net.w0.ip%') app.setProperty('udp_dst_host', '192.168.255.255') app.setProperty('udp_broadcast', 1) @@ -10,10 +10,10 @@ end end -defGroup('Receiver', "omf.nicta.node10") do |node| - defApplication('otr2') do |a| - a.binary_path = "/usr/bin/otr2" - a.description = "otr is a configurable traffic sink that recieves packet streams" +defGroup('Receiver', "omf.nicta.node10,omf.nicta.node11") do |node| + defApplication('otr2') do |app| + app.binary_path = "/usr/bin/otr2" + app.description = "otr is a configurable traffic sink that recieves packet streams" app.setProperty('udp_local_host', '192.168.255.255') app.setProperty('udp_local_port', 3000) app.measure('udp_in', :samples => 1) From a90bfe2e67e75b868c00a4f3cd415084d69edbf6 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 12:03:00 +1000 Subject: [PATCH 20/44] Defined properties and measurements + Changed groups to |app| --- doc/tutorials/experiment02.rb | 1 - doc/tutorials/experiment04.rb | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/doc/tutorials/experiment02.rb b/doc/tutorials/experiment02.rb index 768320f2..5cb2bd51 100644 --- a/doc/tutorials/experiment02.rb +++ b/doc/tutorials/experiment02.rb @@ -103,7 +103,6 @@ #Section 3 #Execution of application events - onEvent(:ALL_UP_AND_INSTALLED) do |event| info "Starting WiFi OMF6 Experiment events" diff --git a/doc/tutorials/experiment04.rb b/doc/tutorials/experiment04.rb index 72775d6b..0579581c 100644 --- a/doc/tutorials/experiment04.rb +++ b/doc/tutorials/experiment04.rb @@ -2,6 +2,21 @@ defApplication('otg2') do |app| app.binary_path = "/usr/bin/otg2" app.description = "otg is a configurable traffic generator that sends packet streams" + + #Define properties + app.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + app.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + app.defMeasurement('udp_out') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + + #Set Properties app.setProperty('udp_local_host', '%net.w0.ip%') app.setProperty('udp_dst_host', '192.168.255.255') app.setProperty('udp_broadcast', 1) @@ -9,11 +24,24 @@ app.measure('udp_out', :samples => 1) end end + defGroup('Receiver', "omf.nicta.node10,omf.nicta.node11") do |node| defApplication('otr2') do |app| app.binary_path = "/usr/bin/otr2" app.description = "otr is a configurable traffic sink that recieves packet streams" + + app.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + app.defMeasurement('udp_in') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + + app.setProperty('udp_local_host', '192.168.255.255') app.setProperty('udp_local_port', 3000) app.measure('udp_in', :samples => 1) From a640c11e3735bed9420dc06935c6e9a2f7353341 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 12:31:15 +1000 Subject: [PATCH 21/44] Changed some comments --- doc/tutorials/experiment04.rb | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/doc/tutorials/experiment04.rb b/doc/tutorials/experiment04.rb index 0579581c..abf92ed1 100644 --- a/doc/tutorials/experiment04.rb +++ b/doc/tutorials/experiment04.rb @@ -1,3 +1,6 @@ +#Welcome Experiment 04: Substitution +#This ED allows then experimenter to configure or address all resources within a defined group using simple substitutions + defGroup('Sender', "omf.nicta.node9") do |node| defApplication('otg2') do |app| app.binary_path = "/usr/bin/otg2" @@ -15,6 +18,7 @@ m.defMetric('pkt_length',:long) m.defMetric('dst_host',:string) m.defMetric('dst_port',:long) + end #Set Properties app.setProperty('udp_local_host', '%net.w0.ip%') @@ -31,6 +35,7 @@ app.binary_path = "/usr/bin/otr2" app.description = "otr is a configurable traffic sink that recieves packet streams" + #Define properties app.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) app.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) app.defMeasurement('udp_in') do |m| @@ -40,8 +45,9 @@ m.defMetric('pkt_length',:long) m.defMetric('dst_host',:string) m.defMetric('dst_port',:long) + end - + #Set properties app.setProperty('udp_local_host', '192.168.255.255') app.setProperty('udp_local_port', 3000) app.measure('udp_in', :samples => 1) @@ -52,21 +58,19 @@ interface.mode = "adhoc" interface.type = 'g' interface.channel = "6" - interface.essid = "helloworld-tutorial04" + interface.essid = "helloworld-experiment04" interface.ip = "192.168.0.%index%" end onEvent(:ALL_UP_AND_INSTALLED) do |event| - wait 10 + after 10 group("Receiver").startApplications - wait 5 + after 5 group("Sender").startApplications - wait 30 + after 30 group("Sender").stopApplications - wait 5 + after 5 group("Receiver").stopApplications Experiment.done + end - - - From e697367fb5fad6b07da43ea4e75922c85a1d1a13 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 12:42:12 +1000 Subject: [PATCH 22/44] Changed syntax of experiment04 --- doc/tutorials/experiment04.rb | 104 ++++++++++++++++++++-------------- 1 file changed, 60 insertions(+), 44 deletions(-) diff --git a/doc/tutorials/experiment04.rb b/doc/tutorials/experiment04.rb index abf92ed1..f5cf0189 100644 --- a/doc/tutorials/experiment04.rb +++ b/doc/tutorials/experiment04.rb @@ -1,26 +1,60 @@ -#Welcome Experiment 04: Substitution -#This ED allows then experimenter to configure or address all resources within a defined group using simple substitutions +defApplication('otr2') do |a| + + + #Application description and binary path + a.binary_path = "/usr/bin/otr2" + a.description = "otr is a configurable traffic sink that recieves packet streams" + + #Define configurable parameters of otr2 + a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defMeasurement('udp_in') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + end +end -defGroup('Sender', "omf.nicta.node9") do |node| - defApplication('otg2') do |app| - app.binary_path = "/usr/bin/otg2" - app.description = "otg is a configurable traffic generator that sends packet streams" - - #Define properties - app.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) - app.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) - app.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) - app.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) - app.defMeasurement('udp_out') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) - end + +#Define otg2 application file-paths +#Define experiment parameters and measurement points +defApplication('otg2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otg2" + a.description = "otg is a configurable traffic generator that sends packet streams" + + #Define configurable parameters of otg2 + a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) + a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) + a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) + a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + + #Define measurement points that application will output + a.defMeasurement('udp_out') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) - #Set Properties + end +end + +defGroup('Sender', "omf.nicta.node9") do |node| + node.addApplication("otg2") do |app| app.setProperty('udp_local_host', '%net.w0.ip%') app.setProperty('udp_dst_host', '192.168.255.255') app.setProperty('udp_broadcast', 1) @@ -28,26 +62,9 @@ app.measure('udp_out', :samples => 1) end end - defGroup('Receiver', "omf.nicta.node10,omf.nicta.node11") do |node| - defApplication('otr2') do |app| - app.binary_path = "/usr/bin/otr2" - app.description = "otr is a configurable traffic sink that recieves packet streams" - - #Define properties - app.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) - app.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) - app.defMeasurement('udp_in') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) - end - - #Set properties + node.addApplication("otr2") do |app| app.setProperty('udp_local_host', '192.168.255.255') app.setProperty('udp_local_port', 3000) app.measure('udp_in', :samples => 1) @@ -58,19 +75,18 @@ interface.mode = "adhoc" interface.type = 'g' interface.channel = "6" - interface.essid = "helloworld-experiment04" + interface.essid = "helloworld" interface.ip = "192.168.0.%index%" end onEvent(:ALL_UP_AND_INSTALLED) do |event| after 10 group("Receiver").startApplications - after 5 + after 15 group("Sender").startApplications - after 30 + after 45 group("Sender").stopApplications - after 5 + after 50 group("Receiver").stopApplications Experiment.done - end From 1cdae5854f19c915e7907856a8f3660e3c4fbfb8 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 13:55:01 +1000 Subject: [PATCH 23/44] Theoretically working code (w/ one exception) Exception of 'allGroups.net.w0' 'net' option not implemented in OMF6 --- doc/tutorials/experiment04.rb | 59 ++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/doc/tutorials/experiment04.rb b/doc/tutorials/experiment04.rb index f5cf0189..c311206b 100644 --- a/doc/tutorials/experiment04.rb +++ b/doc/tutorials/experiment04.rb @@ -1,14 +1,19 @@ -defApplication('otr2') do |a| - +#Welcome to Experiment 04 +#This script allows experimenters to configure or address all resources within a defined group ane use simple substitutions + +#Section 1 +#Define otr2 application file-paths +#Define experiment parameters and measurement points +defApplication('otr2') do |app| #Application description and binary path - a.binary_path = "/usr/bin/otr2" - a.description = "otr is a configurable traffic sink that recieves packet streams" + app.binary_path = "/usr/bin/otr2" + app.description = "otr is a configurable traffic sink that recieves packet streams" #Define configurable parameters of otr2 - a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) - a.defMeasurement('udp_in') do |m| + app.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + app.defMeasurement('udp_in') do |m| m.defMetric('ts',:float) m.defMetric('flow_id',:long) m.defMetric('seq_no',:long) @@ -18,31 +23,30 @@ end end - #Define otg2 application file-paths #Define experiment parameters and measurement points -defApplication('otg2') do |a| +defApplication('otg2') do |app| #Application description and binary path - a.binary_path = "/usr/bin/otg2" - a.description = "otg is a configurable traffic generator that sends packet streams" + app.binary_path = "/usr/bin/otg2" + app.description = "otg is a configurable traffic generator that sends packet streams" #Define configurable parameters of otg2 - a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) - a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) - a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) - a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) - a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) - a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) - a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) - a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) - a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) - a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + app.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) + app.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + app.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + app.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) + app.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + app.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + app.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) + app.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) + app.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) + app.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) #Define measurement points that application will output - a.defMeasurement('udp_out') do |m| + app.defMeasurement('udp_out') do |m| m.defMetric('ts',:float) m.defMetric('flow_id',:long) m.defMetric('seq_no',:long) @@ -53,6 +57,8 @@ end end +#Section 2 +#Define resources and nodes used by application defGroup('Sender', "omf.nicta.node9") do |node| node.addApplication("otg2") do |app| app.setProperty('udp_local_host', '%net.w0.ip%') @@ -71,14 +77,17 @@ end end +#Currently not working in OMF6 allGroups.net.w0 do |interface| interface.mode = "adhoc" interface.type = 'g' interface.channel = "6" - interface.essid = "helloworld" + interface.essid = "Hello World! Experiment04" interface.ip = "192.168.0.%index%" end +#Section 3 +#Execution of application events onEvent(:ALL_UP_AND_INSTALLED) do |event| after 10 group("Receiver").startApplications From e54e4e52dbd0b0a1ffc35b74382f98adb7b2469d Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 14:05:40 +1000 Subject: [PATCH 24/44] Adapted syntax highlighting code to yard --- doc/tutorials/Experiment01.mkd | 121 +++++++++---------- doc/tutorials/Experiment02.mkd | 213 ++++++++++++++++----------------- 2 files changed, 167 insertions(+), 167 deletions(-) diff --git a/doc/tutorials/Experiment01.mkd b/doc/tutorials/Experiment01.mkd index 1fc34cf7..f481cf51 100644 --- a/doc/tutorials/Experiment01.mkd +++ b/doc/tutorials/Experiment01.mkd @@ -140,77 +140,78 @@ OMF Experiment Description Language (OEDL). The ED describing this simple “Hello World” experiment is {file:doc/tutorials/experiment01.rb experiment01.rb}. It is composed of 3 distinct parts, described in the following listing and subsections below. -```ruby -#Welcome to your first ruby OML2 application -#This OML2 application is designed to ping a specified host and collect the output it recieves in a sq3 database - -#Section 1 -#Define oml2 application file-paths -#Define experiment parameters and measurement points - -defApplication('ping_oml2') do |app| - - #Application description and binary path - app.description = 'Simple definition of ping-oml2 application' - app.binary_path = '/usr/bin/ping-oml2' - - #Configurable parameters of Experiment - app.defProperty('target', 'Address to ping', '-a', {:type => :string}) - app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer}) - - - #DISABLED-Define measurement points that application will output - app.defMeasurement('ping') do |m| - m.defMetric('dest_addr',:string) - m.defMetric('ttl',:uint32) - m.defMetric('rtt',:double) - m.defMetric('rtt_unit',:string) - + + #Welcome to your first ruby OML2 application + #This OML2 application is designed to ping a specified host and collect the output it recieves in a sq3 database + + #Section 1 + #Define oml2 application file-paths + #Define experiment parameters and measurement points + + defApplication('ping_oml2') do |app| + + #Application description and binary path + app.description = 'Simple definition of ping-oml2 application' + app.binary_path = '/usr/bin/ping-oml2' + + #Configurable parameters of Experiment + app.defProperty('target', 'Address to ping', '-a', {:type => :string}) + app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer}) + + + #DISABLED-Define measurement points that application will output + app.defMeasurement('ping') do |m| + m.defMetric('dest_addr',:string) + m.defMetric('ttl',:uint32) + m.defMetric('rtt',:double) + m.defMetric('rtt_unit',:string) + end -end - -#Section 2 -#Define recources and nodes used by oml2 application - -#Create the group 'Sender' with specified nodes -defGroup('Sender', 'omf.nicta.node8') do |g| - - #Associate oml2 application to group (?) - g.addApplication("ping_oml2") do |app| - - #Configure target of application (Ping target) - app.setProperty('target', 'www.nicta.com.au') - - #Configure amount of times to ping host - app.setProperty('count', 3) - - #Request application to collect measurement point output data - app.measure('ping', :samples => 1) - - end -end - -#Section 3 -#Execution of application - -onEvent(:ALL_UP_AND_INSTALLED) do |event| - + end + + #Section 2 + #Define recources and nodes used by oml2 application + + #Create the group 'Sender' with specified nodes + defGroup('Sender', 'omf.nicta.node8') do |g| + + #Associate oml2 application to group (?) + g.addApplication("ping_oml2") do |app| + + #Configure target of application (Ping target) + app.setProperty('target', 'www.nicta.com.au') + + #Configure amount of times to ping host + app.setProperty('count', 3) + + #Request application to collect measurement point output data + app.measure('ping', :samples => 1) + + end + end + + #Section 3 + #Execution of application + + onEvent(:ALL_UP_AND_INSTALLED) do |event| + # Print information message on commandline info "Initializing first OMF experiment event" - + # Start all the Applications associated to all the Group allGroups.startApplications - + # Wait for 5 sec (allowing time for 3 pings) after 5 - + # Stop all the Applications associated to all the Groups allGroups.stopApplications - + # Tell the Experiment Controller to terminate the experiment now Experiment.done -end -``` + end + + ### 3a) Application Definition diff --git a/doc/tutorials/Experiment02.mkd b/doc/tutorials/Experiment02.mkd index b0c6e323..6094f6ad 100644 --- a/doc/tutorials/Experiment02.mkd +++ b/doc/tutorials/Experiment02.mkd @@ -121,129 +121,128 @@ OMF Experiment Description Language (OEDL), which is based on Ruby syntax. The ED describing this simple “Hello World” wireless experiment is {file:doc/tutorials/experiment02.rb experiment02.rb}: -```ruby -#Welcome to 'Hello World' Wireless -#This script creates a simple wireless networking experiment - - -#Section 1 -#Define otr2 application file-paths -#Define experiment parameters and measurement points - -defApplication('otr2') do |a| - - - #Application description and binary path - a.binary_path = "/usr/bin/otr2" - a.description = "otr is a configurable traffic sink that recieves packet streams" - - #Define configurable parameters of otr2 - a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) - a.defMeasurement('udp_in') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) + + #Welcome to 'Hello World' Wireless + #This script creates a simple wireless networking experiment + + + #Section 1 + #Define otr2 application file-paths + #Define experiment parameters and measurement points + + defApplication('otr2') do |a| + + + #Application description and binary path + a.binary_path = "/usr/bin/otr2" + a.description = "otr is a configurable traffic sink that recieves packet streams" + + #Define configurable parameters of otr2 + a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defMeasurement('udp_in') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + end end -end - - -#Define otg2 application file-paths -#Define experiment parameters and measurement points -defApplication('otg2') do |a| - - #Application description and binary path - a.binary_path = "/usr/bin/otg2" - a.description = "otg is a configurable traffic generator that sends packet streams" - - #Define configurable parameters of otg2 - a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) - a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) - a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) - a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) - a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) - a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) - a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) - a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) - a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) - a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) - - #Define measurement points that application will output - a.defMeasurement('udp_out') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) + + + #Define otg2 application file-paths + #Define experiment parameters and measurement points + defApplication('otg2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otg2" + a.description = "otg is a configurable traffic generator that sends packet streams" + #Define configurable parameters of otg2 + a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) + a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) + a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) + a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + + #Define measurement points that application will output + a.defMeasurement('udp_out') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + + end end -end -#Section 2 -#Define resources and nodes used by application + #Section 2 + #Define resources and nodes used by application -#Define configuration of wireless 'sender' -defGroup('Sender', "omf.nicta.node36") do |node| - node.addApplication("otg2") do |app| - app.setProperty('udp_local_host', '192.168.0.2') - app.setProperty('udp_dst_host', '192.168.0.3') - app.setProperty('udp_dst_port', 3000) - app.measure('udp_out', :interval => 3) + #Define configuration of wireless 'sender' + defGroup('Sender', "omf.nicta.node36") do |node| + node.addApplication("otg2") do |app| + app.setProperty('udp_local_host', '192.168.0.2') + app.setProperty('udp_dst_host', '192.168.0.3') + app.setProperty('udp_dst_port', 3000) + app.measure('udp_out', :interval => 3) + end + + node.net.w0.mode = "adhoc" + node.net.w0.type = 'g' + node.net.w0.channel = "6" + node.net.w0.essid = "Hello World!" + node.net.w0.ip = "192.168.0.2/24" end - - node.net.w0.mode = "adhoc" - node.net.w0.type = 'g' - node.net.w0.channel = "6" - node.net.w0.essid = "Hello World!" - node.net.w0.ip = "192.168.0.2/24" -end - - -#Define configuration of wireless 'reciever' -defGroup('Receiver', "omf.nicta.node37") do |node| - node.addApplication("otr2") do |app| - app.setProperty('udp_local_host', '192.168.0.3') - app.setProperty('udp_local_port', 3000) - app.measure('udp_in', :interval => 3) + + + #Define configuration of wireless 'reciever' + defGroup('Receiver', "omf.nicta.node37") do |node| + node.addApplication("otr2") do |app| + app.setProperty('udp_local_host', '192.168.0.3') + app.setProperty('udp_local_port', 3000) + app.measure('udp_in', :interval => 3) + end + + node.net.w0.mode = "adhoc" + node.net.w0.type = 'g' + node.net.w0.channel = "6" + node.net.w0.essid = "Hello World!" + node.net.w0.ip = "192.168.0.3/24" end - - node.net.w0.mode = "adhoc" - node.net.w0.type = 'g' - node.net.w0.channel = "6" - node.net.w0.essid = "Hello World!" - node.net.w0.ip = "192.168.0.3/24" -end -#Section 3 -#Execution of application events + #Section 3 + #Execution of application events -onEvent(:ALL_UP_AND_INSTALLED) do |event| - info "Starting WiFi OMF6 Experiment events" - - after 10 do - allGroups.startApplications - info "All Applications have started..." + onEvent(:ALL_UP_AND_INSTALLED) do |event| + info "Starting WiFi OMF6 Experiment events" + after 10 do + allGroups.startApplications + info "All Applications have started..." + + end + after 40 do + allGroups.stopApplications + info "Applications are stopping... Experiment Complete." + Experiment.done + end end - after 40 do - allGroups.stopApplications - info "Applications are stopping... Experiment Complete." - Experiment.done - end -end -``` - + ### 3a) Application Definition From 3ecdaa2eeeae9d71f33c2d699d69e299d6bbab3b Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 14:32:29 +1000 Subject: [PATCH 25/44] Largely converted experiment05 to OMF6 Changed application definition to work with OMF6 + Addressed some errors: 14:29:01 WARN OmfEc: [DEPRECATION] 'path=' is deprecated. Please use 'binary_path=' instead. 14:29:01 WARN OmfEc: [DEPRECATION] 'version' is deprecated and not supported. Please do not use it. 14:29:01 WARN OmfEc: [DEPRECATION] 'shortDescription=' is deprecated. Please use 'description=' instead. --- doc/tutorials/experiment05.rb | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 doc/tutorials/experiment05.rb diff --git a/doc/tutorials/experiment05.rb b/doc/tutorials/experiment05.rb new file mode 100644 index 00000000..f576d890 --- /dev/null +++ b/doc/tutorials/experiment05.rb @@ -0,0 +1,40 @@ +#Welcome to Experiment 05 +#This ED will allow the experimenter to install a 3rd party application on specified nodes +#The otg2 application will be used as an example in this ED + +#Section 1 +#Define the file path of application +#Define experiment parameters and measurement points + +defApplication('otg2') do |app| + + app.binary_path = "/usr/bin/otg2" + app.appPackage = "http://extant.me/dev/path/to/archive.tar" + app.description = "Programmable traffic generator v2" + app.description = "OTG is a configurable traffic generator." + + # Define the properties that can be configured for this application + # syntax: defProperty(name = :mandatory, description = nil, parameter = nil, options = {}) + app.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) + app.defProperty('udp:broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + app.defProperty('udp:dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + app.defProperty('udp:dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + app.defProperty('udp:local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + app.defProperty('udp:local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) + app.defProperty("cbr:size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + app.defProperty("cbr:rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + app.defProperty("exp:size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) + app.defProperty("exp:rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) + app.defProperty("exp:ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) + app.defProperty("exp:offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + + # Define the Measurement Points and associated metrics that are available for this application + app.defMeasurement('udp_out') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + end +end From 8ea74a34292dbc4f4d2a98c66923d2243b37844b Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 14:43:24 +1000 Subject: [PATCH 26/44] Breifly adapted to OMF6 Replaced 'wait' with 'after' Changed 'addApplication' definitions Specified a subnet mask on IP addresses (24) Changed to nodes 9 and 10 --- doc/tutorials/experiment06.rb | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 doc/tutorials/experiment06.rb diff --git a/doc/tutorials/experiment06.rb b/doc/tutorials/experiment06.rb new file mode 100644 index 00000000..8422714a --- /dev/null +++ b/doc/tutorials/experiment06.rb @@ -0,0 +1,52 @@ +#Welcome to Experiment 06 +#This ED will allow the experimenter to create a filter to customise measurements collected + + +defProperty('theSender', 'omf.nicta.node9', "ID of sender node") +defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node") +defProperty('packetsize', 256, "Packet size (byte) from the sender node") +defProperty('runtime', 30, "Time in second for the experiment is to run") + + +defGroup('Sender',property.theSender) do |node| + node.addApplication("otg2") do |app| + app.setProperty('udp_local_host', '192.168.0.2') + app.setProperty('udp_dst_host', '192.168.0.3') + app.setProperty('udp_dst_port', 3000) + app.setProperty('cbr_size', property.packetsize) + app.measure('udp_out', :samples => 3) do |mp| + mp.filter('seq_no', 'avg') + end + end + node.net.w0.mode = "adhoc" + node.net.w0.type = 'g' + node.net.w0.channel = "6" + node.net.w0.essid = "Hello World! Experiment06" + node.net.w0.ip = "192.168.0.2/24" +end + +defGroup('Receiver',property.theReceiver) do |node| + node.addApplication("otr2") do |app| + app.setProperty('udp_local_host', '192.168.0.3') + app.setProperty('udp_local_port', 3000) + app.measure('udp_in', :samples => 2) do |mp| + mp.filter('pkt_length', 'sum') + mp.filter('seq_no', 'avg') + end + end + node.net.w0.mode = "adhoc" + node.net.w0.type = 'g' + node.net.w0.channel = "6" + node.net.w0.essid = "Hello World! Experiment06" + node.net.w0.ip = "192.168.0.3/24" +end + +onEvent(:ALL_UP_AND_INSTALLED) do |event| + after 10 + allGroups.startApplications + wait property.runtime / 2 + property.packetsize = 512 + wait property.runtime / 2 + allGroups.stopApplications + Experiment.done +end \ No newline at end of file From 496f71d0bf9ba8a5686c05e64e43019234a9a54a Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 14:55:50 +1000 Subject: [PATCH 27/44] Theoretically working ED with small errors ERROR OmfCommon: Exception 'undefined method `call' for nil:NilClass' --- doc/tutorials/experiment06.rb | 71 ++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 2 deletions(-) diff --git a/doc/tutorials/experiment06.rb b/doc/tutorials/experiment06.rb index 8422714a..61ba91ed 100644 --- a/doc/tutorials/experiment06.rb +++ b/doc/tutorials/experiment06.rb @@ -1,6 +1,65 @@ #Welcome to Experiment 06 #This ED will allow the experimenter to create a filter to customise measurements collected +#Section 1 +#Define otr2 application file-paths +#Define experiment parameters and measurement points +defApplication('otr2') do |a| + + + #Application description and binary path + a.binary_path = "/usr/bin/otr2" + a.description = "otr is a configurable traffic sink that recieves packet streams" + + #Define configurable parameters of otr2 + a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defMeasurement('udp_in') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + end +end + +#Define otg2 application file-paths +#Define experiment parameters and measurement points +defApplication('otg2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otg2" + a.description = "otg is a configurable traffic generator that sends packet streams" + + #Define configurable parameters of otg2 + a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) + a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) + a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) + a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + + #Define measurement points that application will output + a.defMeasurement('udp_out') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + + end +end + +#Section 2 +#Define resources and nodes used by application defProperty('theSender', 'omf.nicta.node9', "ID of sender node") defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node") @@ -41,12 +100,20 @@ node.net.w0.ip = "192.168.0.3/24" end +#Section 3 +#Execution of application events onEvent(:ALL_UP_AND_INSTALLED) do |event| + info "Starting experiment events..." + after 10 allGroups.startApplications - wait property.runtime / 2 + info "All Applications have started..." + + after property.runtime / 2 property.packetsize = 512 - wait property.runtime / 2 + after property.runtime / 2 + allGroups.stopApplications + info "Applications are stopping... Experiment Complete." Experiment.done end \ No newline at end of file From 7b56fb8bb2297e72b204781420d1107ddb859b96 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 15:27:35 +1000 Subject: [PATCH 28/44] Briefly converted to OMF6 with errors ERROR Object: undefined method `addPrototype' Prototype experiment appears to be unsuported unless definition of 'Protoype' is avaliable --- doc/tutorials/experiment07.rb | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 doc/tutorials/experiment07.rb diff --git a/doc/tutorials/experiment07.rb b/doc/tutorials/experiment07.rb new file mode 100644 index 00000000..9d91e845 --- /dev/null +++ b/doc/tutorials/experiment07.rb @@ -0,0 +1,54 @@ +#Welcome to Experiment 07 +#This ED will allow the experimenter to use OMF Prototypes to specify the Application +#A Prototype is a specialized version of your applicationwith preset parameters and measurement collection points + +defGroup('CBR_Sender', "omf.nicta.node0") do |node| + options = { 'localHost' => '%net.w0.ip%', + 'destinationHost' => '192.168.255.255', + 'packetSize' => 256 } + node.addPrototype("cbr_generator", options) +end + +defGroup('EXPO_Sender', "omf.nicta.node9") do |node| + options = { 'localHost' => '%net.w0.ip%', + 'destinationHost' => '192.168.255.255', + 'packetSize' => 1024 } + node.addPrototype("expo_generator", options) +end + +defGroup('Receiver', "omf.nicta.node10") do |node| + node.addApplication("otr2") do |app| + app.setProperty('udp_local_host', '192.168.255.255') + app.setProperty('udp_local_port', 3000) + app.measure('udp_in', :samples => 1) + end +end + +#Currently not working +allGroups.net.w0 do |interface| + interface.mode = "adhoc" + interface.type = 'g' + interface.channel = "6" + interface.essid = "Hello World! Experiment07" + interface.ip = "192.168.0.%index%" +end + +onEvent(:ALL_UP_AND_INSTALLED) do |event| + after 10 + info "Starting the Receiver" + group("Receiver").startApplications + info "Starting the EXPO-traffic Sender" + group("EXPO_Sender").startApplications + after 50 + info "Stopping the EXPO-traffic Sender" + group("EXPO_Sender").stopApplications + after 55 + info "Starting the CBR-traffic Sender" + group("CBR_Sender").startApplications + after 95 + info "Now stopping all everything" + #allGroups.stopApplications + group("CBR_Sender").stopApplications + group("Receiver").stopApplications + Experiment.done +end \ No newline at end of file From 60b04fff0516d000863bd9c3f5382a07699230ca Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 15:38:21 +1000 Subject: [PATCH 29/44] Briefly adapted experiment for OMF6 --- doc/tutorials/experiment08.rb | 79 +++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 doc/tutorials/experiment08.rb diff --git a/doc/tutorials/experiment08.rb b/doc/tutorials/experiment08.rb new file mode 100644 index 00000000..a9cb1f78 --- /dev/null +++ b/doc/tutorials/experiment08.rb @@ -0,0 +1,79 @@ +#Welcome to Experiment 08: THE CONFERENCE ROOM + +defProperty('hrnPrefix', "omf.nicta.node", "Prefix to use for the HRN of resources") +defProperty('resources', "[1,2,3,4,5,8,9,10,11,12,13]", "List of IDs for the resources to use as senders") +defProperty('receiver', "6", "ID for the resource to use as a receiver") +defProperty('groupSize', 4, "Number of resources to put in each group of senders") +defProperty('rate', 300, 'Bits per second sent from senders') +defProperty('packetSize', 256, 'Byte size of packets sent from senders') +defProperty('wifiType', "g", "The type of WIFI to use in this experiment") +defProperty('channel', '6', "The WIFI channel to use in this experiment") +defProperty('netid', "confroom", "The ESSID to use in this experiment") +defProperty('stepDuration', 60, "The duration of each step of this conf-room") + +# Define the Receiver +defGroup('Receiver', "#{property.hrnPrefix}#{property.receiver}") do |node| + node.addApplication("otr2") do |app| + app.setProperty('udp_local_host', '%net.w0.ip%') + app.setProperty('udp_local_port', 3000) + app.measure('udp_in', :samples => 1) + end + node.net.w0.mode = "master" + node.net.w0.type = property.wifiType + node.net.w0.channel = property.channel + node.net.w0.essid = property.netid + node.net.w0.ip = "192.168.0.254" +end + +# Define each Sender groups +groupList = [] +res = eval(property.resources.value) +groupNumber = res.size >= property.groupSize ? (res.size.to_f / property.groupSize.value.to_f).ceil : 1 +(1..groupNumber).each do |i| + list = [] + (1..property.groupSize).each do |j| popped = res.pop ; list << popped if !popped.nil? end + senderNames = list.collect do |id| "#{property.hrnPrefix}#{id}" end + senders = senderNames.join(',') + + info "Group Sender #{i}: '#{senders}'" + groupList << "Sender#{i}" + defGroup("Sender#{i}", senders) do |node| + node.addApplication("otg2") do |app| + app.setProperty('udp_local_host', '%net.w0.ip%') + app.setProperty('udp_dst_host', '192.168.0.254') + app.setProperty('udp_dst_port', 3000) + app.setProperty('cbr_size', property.packetSize) + app.setProperty('cbr_rate', property.rate) + app.measure('udp_out', :samples => 1) + end + node.net.w0.mode = "managed" + node.net.w0.type = property.wifiType + node.net.w0.channel = property.channel + node.net.w0.essid = property.netid + node.net.w0.ip = "192.168.0.%index%" + end +end + +onEvent(:ALL_UP_AND_INSTALLED) do |event| + info "Initializing the Conference Room..." + + after 10 + group('Receiver').startApplications + info "The Conference Room has started..." + + after 20 + (1..groupNumber).each do |i| + group("Sender#{i}").startApplications + after property.stepDuration + end + (1..groupNumber).each do |i| + group("Sender#{i}").stopApplications + after property.stepDuration + end + group('Receiver').stopApplications + info "Applications are stopping... Conference Room experiment Complete." + Experiment.done +end + + + From ca39d7a9842a922be221841c4b9bbec4a0400e3b Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 16:05:21 +1000 Subject: [PATCH 30/44] Theoretically working experiment ERROR OmfCommon: Exception 'undefined method `call' for nil:NilClass' --- doc/tutorials/experiment01.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/tutorials/experiment01.rb b/doc/tutorials/experiment01.rb index 8d497e17..ac464af7 100644 --- a/doc/tutorials/experiment01.rb +++ b/doc/tutorials/experiment01.rb @@ -1,5 +1,5 @@ -#Welcome to your first Experiment Description -#This OML2 application is designed to ping a specified host and collect the output it recieves in a sq3 database +#Welcome to Experiment 01 +#This ED allows experimenters to ping a specified host and collect the output it recieves as measurement points #Section 1 #Define oml2 application file-paths @@ -30,13 +30,13 @@ #Define resources and nodes used by oml2 application #Create the group 'Sender' with specified nodes -defGroup('Sender', 'omf.nicta.node8') do |g| +defGroup('Sender', 'omf.nicta.node9') do |g| #Associate oml2 application to group (?) g.addApplication("ping_oml2") do |app| #Configure target of application (Ping target) - app.setProperty('target', 'www.nicta.com.au') + app.setProperty('target', 'www.extant.me') #Configure amount of times to ping host app.setProperty('count', 3) From 2429909577090d35ce0cdb71c15e8f7aec5591f1 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 16:12:26 +1000 Subject: [PATCH 31/44] Theoretically working experiment otg2 errors: ERROR Server URI '' seems to be empty ERROR Error parsing server destination URI ''; failed to create stream for this destination --- doc/tutorials/experiment02.rb | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/doc/tutorials/experiment02.rb b/doc/tutorials/experiment02.rb index 5cb2bd51..07854647 100644 --- a/doc/tutorials/experiment02.rb +++ b/doc/tutorials/experiment02.rb @@ -1,4 +1,4 @@ -#Welcome to 'Hello World' Wireless +#Welcome to experiment 02: 'Hello World' Wireless #This script creates a simple wireless networking experiment @@ -8,7 +8,6 @@ defApplication('otr2') do |a| - #Application description and binary path a.binary_path = "/usr/bin/otr2" a.description = "otr is a configurable traffic sink that recieves packet streams" @@ -26,7 +25,6 @@ end end - #Define otg2 application file-paths #Define experiment parameters and measurement points defApplication('otg2') do |a| @@ -61,13 +59,11 @@ end end - - #Section 2 #Define resources and nodes used by application #Define configuration of wireless 'sender' -defGroup('Sender', "omf.nicta.node36") do |node| +defGroup('Sender', "omf.nicta.node9") do |node| node.addApplication("otg2") do |app| app.setProperty('udp_local_host', '192.168.0.2') app.setProperty('udp_dst_host', '192.168.0.3') @@ -82,9 +78,8 @@ node.net.w0.ip = "192.168.0.2/24" end - #Define configuration of wireless 'reciever' -defGroup('Receiver', "omf.nicta.node37") do |node| +defGroup('Receiver', "omf.nicta.node10") do |node| node.addApplication("otr2") do |app| app.setProperty('udp_local_host', '192.168.0.3') app.setProperty('udp_local_port', 3000) @@ -94,13 +89,10 @@ node.net.w0.mode = "adhoc" node.net.w0.type = 'g' node.net.w0.channel = "6" - node.net.w0.essid = "Hello World!" + node.net.w0.essid = "Hello World! Experiment02" node.net.w0.ip = "192.168.0.3/24" end - - - #Section 3 #Execution of application events onEvent(:ALL_UP_AND_INSTALLED) do |event| @@ -116,4 +108,4 @@ info "Applications are stopping... Experiment Complete." Experiment.done end -end +end \ No newline at end of file From 19e5d96ba4a91a8ff4a3a8ea733b01e3bbbd43b9 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 16:20:12 +1000 Subject: [PATCH 32/44] Theoretically working experiment Reverted to 'wait' to stop experiment. ERROR OmfCommon: Exception 'undefined method `call' for nil:NilClass' --- doc/tutorials/experiment03.rb | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/doc/tutorials/experiment03.rb b/doc/tutorials/experiment03.rb index 63591848..55816408 100644 --- a/doc/tutorials/experiment03.rb +++ b/doc/tutorials/experiment03.rb @@ -22,12 +22,10 @@ #Define measurement points that application will output app.defMeasurement('udp_out') do |m| - end end - defApplication('otr2') do |app| #Application description and binary path @@ -37,15 +35,12 @@ #Configurable parameters of Experiment app.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) app.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) - #Define measurement points that application will output app.defMeasurement('udp_in') do |m| - end end - ############################################################################################### ############################################################################################### #Define dynamic properties to be changed by experimenter @@ -108,8 +103,6 @@ node.net.w0.essid = "foo"+property.netid node.net.w0.ip = "192.168.0.3/24" end - - ############################################################################################### ############################################################################################### #Section 3 @@ -123,13 +116,13 @@ allGroups.startApplications info "Applications have started..." - after property.runtime / 4 + wait property.runtime / 4 property.packetsize = 256 - after property.runtime / 4 *2 + wait property.runtime / 4 *2 property.packetsize = 512 - after property.runtime / 4 *3 + wait property.runtime / 4 *3 property.packetsize = 1024 - after property.runtime + wait property.runtime allGroups.stopApplications info "Applications are stopping... Experiment complete." From c524bd5a6e4a111c47c3e6433bea6cdb473a23a5 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 16:23:47 +1000 Subject: [PATCH 33/44] Mostly working code 'NET' Option #Not implemented in OMF6 - New syntax required for experiment to work --- doc/tutorials/experiment04.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorials/experiment04.rb b/doc/tutorials/experiment04.rb index c311206b..7b474d42 100644 --- a/doc/tutorials/experiment04.rb +++ b/doc/tutorials/experiment04.rb @@ -77,7 +77,7 @@ end end -#Currently not working in OMF6 +#Not implemented in OMF6 - New syntax required for experiment to work allGroups.net.w0 do |interface| interface.mode = "adhoc" interface.type = 'g' From f96101181db9f07a721847c733fccd97f563d34d Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 16:28:47 +1000 Subject: [PATCH 34/44] Requires some revision for experiment to work Method of specifying nodes and further adapting code to OMF6 --- doc/tutorials/experiment05.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/tutorials/experiment05.rb b/doc/tutorials/experiment05.rb index f576d890..291e48a1 100644 --- a/doc/tutorials/experiment05.rb +++ b/doc/tutorials/experiment05.rb @@ -13,8 +13,8 @@ app.description = "Programmable traffic generator v2" app.description = "OTG is a configurable traffic generator." - # Define the properties that can be configured for this application - # syntax: defProperty(name = :mandatory, description = nil, parameter = nil, options = {}) + #Define the properties that can be configured for this application + #syntax: defProperty(name = :mandatory, description = nil, parameter = nil, options = {}) app.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) app.defProperty('udp:broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) app.defProperty('udp:dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) @@ -28,7 +28,7 @@ app.defProperty("exp:ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) app.defProperty("exp:offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) - # Define the Measurement Points and associated metrics that are available for this application + #Define the Measurement Points and associated metrics that are available for this application app.defMeasurement('udp_out') do |m| m.defMetric('ts',:float) m.defMetric('flow_id',:long) From e8f3537213fe45b122ff2153bc4c6cc3f4cf1ccd Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 16:31:05 +1000 Subject: [PATCH 35/44] Theoretically working experiment ERROR OmfCommon: Exception 'undefined method `call' for nil:NilClass' --- doc/tutorials/experiment06.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/doc/tutorials/experiment06.rb b/doc/tutorials/experiment06.rb index 61ba91ed..7b0deac1 100644 --- a/doc/tutorials/experiment06.rb +++ b/doc/tutorials/experiment06.rb @@ -6,7 +6,6 @@ defApplication('otr2') do |a| - #Application description and binary path a.binary_path = "/usr/bin/otr2" a.description = "otr is a configurable traffic sink that recieves packet streams" @@ -60,13 +59,11 @@ #Section 2 #Define resources and nodes used by application - defProperty('theSender', 'omf.nicta.node9', "ID of sender node") defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node") defProperty('packetsize', 256, "Packet size (byte) from the sender node") defProperty('runtime', 30, "Time in second for the experiment is to run") - defGroup('Sender',property.theSender) do |node| node.addApplication("otg2") do |app| app.setProperty('udp_local_host', '192.168.0.2') From d2c9ba76e6c97fd8c12eaac7dd4f994ce0c48f7c Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 16:33:19 +1000 Subject: [PATCH 36/44] Requires revision for experiment to work properly `addPrototype' Must be defined ERROR OmfCommon: Exception 'undefined method `call' for nil:NilClass' --- doc/tutorials/experiment07.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorials/experiment07.rb b/doc/tutorials/experiment07.rb index 9d91e845..86e85f52 100644 --- a/doc/tutorials/experiment07.rb +++ b/doc/tutorials/experiment07.rb @@ -2,7 +2,7 @@ #This ED will allow the experimenter to use OMF Prototypes to specify the Application #A Prototype is a specialized version of your applicationwith preset parameters and measurement collection points -defGroup('CBR_Sender', "omf.nicta.node0") do |node| +defGroup('CBR_Sender', "omf.nicta.node9") do |node| options = { 'localHost' => '%net.w0.ip%', 'destinationHost' => '192.168.255.255', 'packetSize' => 256 } From 08d69cf57f6db6834a13ffc89fc1d0358d27d5d3 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 16:39:44 +1000 Subject: [PATCH 37/44] Theoretically working with some revisions required 'node.net ' #Currently not working - new syntax required for experiment to work --- doc/tutorials/experiment08.rb | 66 +++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/doc/tutorials/experiment08.rb b/doc/tutorials/experiment08.rb index a9cb1f78..ad69712e 100644 --- a/doc/tutorials/experiment08.rb +++ b/doc/tutorials/experiment08.rb @@ -1,5 +1,63 @@ #Welcome to Experiment 08: THE CONFERENCE ROOM +#Section 1 +#Define otr2 application file-paths +#Define experiment parameters and measurement points +defApplication('otr2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otr2" + a.description = "otr is a configurable traffic sink that recieves packet streams" + + #Define configurable parameters of otr2 + a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defMeasurement('udp_in') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + end +end + +#Define otg2 application file-paths +#Define experiment parameters and measurement points +defApplication('otg2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otg2" + a.description = "otg is a configurable traffic generator that sends packet streams" + + #Define configurable parameters of otg2 + a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) + a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) + a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) + a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + + #Define measurement points that application will output + a.defMeasurement('udp_out') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + + end +end + +#Section 2 +#Define resources and nodes used by application defProperty('hrnPrefix', "omf.nicta.node", "Prefix to use for the HRN of resources") defProperty('resources', "[1,2,3,4,5,8,9,10,11,12,13]", "List of IDs for the resources to use as senders") defProperty('receiver', "6", "ID for the resource to use as a receiver") @@ -11,7 +69,7 @@ defProperty('netid', "confroom", "The ESSID to use in this experiment") defProperty('stepDuration', 60, "The duration of each step of this conf-room") -# Define the Receiver +#Define the Receiver defGroup('Receiver', "#{property.hrnPrefix}#{property.receiver}") do |node| node.addApplication("otr2") do |app| app.setProperty('udp_local_host', '%net.w0.ip%') @@ -25,7 +83,7 @@ node.net.w0.ip = "192.168.0.254" end -# Define each Sender groups +#Define each Sender groups groupList = [] res = eval(property.resources.value) groupNumber = res.size >= property.groupSize ? (res.size.to_f / property.groupSize.value.to_f).ceil : 1 @@ -46,6 +104,8 @@ app.setProperty('cbr_rate', property.rate) app.measure('udp_out', :samples => 1) end + + #Currently not working - new syntax required for experiment to work node.net.w0.mode = "managed" node.net.w0.type = property.wifiType node.net.w0.channel = property.channel @@ -54,6 +114,8 @@ end end +#Section 3 +#Execution of application events onEvent(:ALL_UP_AND_INSTALLED) do |event| info "Initializing the Conference Room..." From 2200d63d423fd0783dcc045f7812f33feab03e28 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 17:26:53 +1000 Subject: [PATCH 38/44] Introducing new experiment code to tutorials mkd --- .gitignore | 2 +- doc/tutorials/Experiment01.mkd | 128 +++++++++--------- doc/tutorials/Experiment02.mkd | 52 +++----- doc/tutorials/Experiment03.mkd | 229 ++++++++++++++++++--------------- doc/tutorials/Experiment04.mkd | 120 +++++++++++++---- doc/tutorials/Experiment05.mkd | 74 ++++++----- doc/tutorials/Experiment06.mkd | 139 +++++++++++++++----- doc/tutorials/experiment01.rb | 3 +- doc/tutorials/experiment02.rb | 1 - 9 files changed, 449 insertions(+), 299 deletions(-) diff --git a/.gitignore b/.gitignore index 7107f11d..7cd566dd 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,4 @@ tags **/coverage documentation -omf_common/example/auth +omf_common/example/auth \ No newline at end of file diff --git a/doc/tutorials/Experiment01.mkd b/doc/tutorials/Experiment01.mkd index f481cf51..d05b53d1 100644 --- a/doc/tutorials/Experiment01.mkd +++ b/doc/tutorials/Experiment01.mkd @@ -140,77 +140,79 @@ OMF Experiment Description Language (OEDL). The ED describing this simple “Hello World” experiment is {file:doc/tutorials/experiment01.rb experiment01.rb}. It is composed of 3 distinct parts, described in the following listing and subsections below. + - #Welcome to your first ruby OML2 application - #This OML2 application is designed to ping a specified host and collect the output it recieves in a sq3 database + #Welcome to Experiment 01 + #This ED allows experimenters to ping a specified host and collect the output it recieves as measurement points #Section 1 #Define oml2 application file-paths #Define experiment parameters and measurement points defApplication('ping_oml2') do |app| - - #Application description and binary path - app.description = 'Simple definition of ping-oml2 application' - app.binary_path = '/usr/bin/ping-oml2' - - #Configurable parameters of Experiment - app.defProperty('target', 'Address to ping', '-a', {:type => :string}) - app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer}) - - - #DISABLED-Define measurement points that application will output - app.defMeasurement('ping') do |m| - m.defMetric('dest_addr',:string) - m.defMetric('ttl',:uint32) - m.defMetric('rtt',:double) - m.defMetric('rtt_unit',:string) - - end + + #Application description and binary path + app.description = 'Simple definition of ping-oml2 application' + app.binary_path = '/usr/bin/ping-oml2' + + #Configurable parameters of Experiment + app.defProperty('target', 'Address to ping', '-a', {:type => :string}) + app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer}) + + + #Define measurement points that application will output + app.defMeasurement('ping') do |m| + m.defMetric('dest_addr',:string) + m.defMetric('ttl',:uint32) + m.defMetric('rtt',:double) + m.defMetric('rtt_unit',:string) + + end end #Section 2 - #Define recources and nodes used by oml2 application + #Define resources and nodes used by oml2 application #Create the group 'Sender' with specified nodes - defGroup('Sender', 'omf.nicta.node8') do |g| - - #Associate oml2 application to group (?) - g.addApplication("ping_oml2") do |app| - - #Configure target of application (Ping target) - app.setProperty('target', 'www.nicta.com.au') - - #Configure amount of times to ping host - app.setProperty('count', 3) - - #Request application to collect measurement point output data - app.measure('ping', :samples => 1) - - end + defGroup('Sender', 'omf.nicta.node9') do |g| + + #Associate oml2 application to group (?) + g.addApplication("ping_oml2") do |app| + + #Configure target of application (Ping target) + app.setProperty('target', 'www.nicta.com.au') + + #Configure amount of times to ping host + app.setProperty('count', 3) + + #Request application to collect measurement point output data + app.measure('ping', :samples => 1) + + end end #Section 3 - #Execution of application + #Execution of application events onEvent(:ALL_UP_AND_INSTALLED) do |event| - - # Print information message on commandline - info "Initializing first OMF experiment event" - - # Start all the Applications associated to all the Group - allGroups.startApplications - - # Wait for 5 sec (allowing time for 3 pings) - after 5 - - # Stop all the Applications associated to all the Groups - allGroups.stopApplications - - # Tell the Experiment Controller to terminate the experiment now - Experiment.done + + # Print information message on commandline + info "Initializing first OMF experiment event" + + # Start all the Applications associated to all the Group + allGroups.startApplications + + # Wait for 5 sec (allowing time for 3 pings) + after 5 + + # Stop all the Applications associated to all the Groups + allGroups.stopApplications + + # Tell the Experiment Controller to terminate the experiment now + Experiment.done end + @@ -268,13 +270,13 @@ Groups. A named Group can be itself viewed as a resource holding other resources. A given resource can belong to many groups at the same time, and a group itself may be part of another group. In this example, we define a single group named 'Sender', which contains a -single resource 'omf.nicta.node8'. +single resource 'omf.nicta.node9'. > **IMPORTANT** When running this experiment using your own resource and testbed -please change 'omf.nicta.node8' in the ED to the actual name of your +please change 'omf.nicta.node9' in the ED to the actual name of your own resource. - defGroup('Sender', 'omf.nicta.node8') do |g| + defGroup('Sender', 'omf.nicta.node9') do |g| ... end @@ -409,9 +411,9 @@ similar to this: INFO Object: Connected INFO Object: Start experiment: 2013-03-14T03:48:48Z INFO OmfEc: Subscribed to 856de74b-6cf7-4de7-aaad-6c842eea209a - INFO OmfEc: Subscribed to omf.nicta.node8 - INFO OmfEc: Config omf.nicta.node8 to join Sender - INFO OmfEc: Newly discovered resource >> omfdev.node8 + INFO OmfEc: Subscribed to omf.nicta.node9 + INFO OmfEc: Config omf.nicta.node9 to join Sender + INFO OmfEc: Newly discovered resource >> omfdev.node9 INFO OmfEc: Event triggered: 'ALL_UP' INFO OmfEc: Subscribed to 856de74b-6cf7-4de7-aaad-6c842eea209a_application INFO OmfEc: Resource xmpp://bd9c68d5-1469-41a0-9a33-4bdba501f7b0@norbit.npc.nicta.com.au created @@ -437,7 +439,7 @@ similar to this: The above screen output was optained when running the EC on the NICTA testbed, with the experiment described in {file:doc/tutorials/experiment01.rb experiment01.rb} -and using the resource named 'omf.nicta.node8' +and using the resource named 'omf.nicta.node9' ### 4c) What does that screen output mean? @@ -450,17 +452,17 @@ this experiment (ID, xmpp server used, resource used,...): INFO Object: Connected INFO Object: Start experiment: 2013-03-14T03:48:48Z ... - INFO OmfEc: Subscribed to omf.nicta.node8 - INFO OmfEc: Config omf.nicta.node8 to join Sender + INFO OmfEc: Subscribed to omf.nicta.node9 + INFO OmfEc: Config omf.nicta.node9 to join Sender - It also provides us some feedback about its communication with the xmpp server and other OMF entities: ... INFO OmfEc: Subscribed to 856de74b-6cf7-4de7-aaad-6c842eea209a - INFO OmfEc: Subscribed to omf.nicta.node8 + INFO OmfEc: Subscribed to omf.nicta.node9 ... - INFO OmfEc: Newly discovered resource >> omfdev.node8 + INFO OmfEc: Newly discovered resource >> omfdev.node9 ... INFO OmfEc: Subscribed to 856de74b-6cf7-4de7-aaad-6c842eea209a_application ... diff --git a/doc/tutorials/Experiment02.mkd b/doc/tutorials/Experiment02.mkd index 6094f6ad..6431728d 100644 --- a/doc/tutorials/Experiment02.mkd +++ b/doc/tutorials/Experiment02.mkd @@ -122,17 +122,15 @@ OMF Experiment Description Language (OEDL), which is based on Ruby syntax. The ED describing this simple “Hello World” wireless experiment is {file:doc/tutorials/experiment02.rb experiment02.rb}: - #Welcome to 'Hello World' Wireless + #Welcome to experiment 02: 'Hello World' Wireless #This script creates a simple wireless networking experiment - #Section 1 #Define otr2 application file-paths #Define experiment parameters and measurement points defApplication('otr2') do |a| - #Application description and binary path a.binary_path = "/usr/bin/otr2" a.description = "otr is a configurable traffic sink that recieves packet streams" @@ -150,7 +148,6 @@ The ED describing this simple “Hello World” wireless experiment is {file:doc end end - #Define otg2 application file-paths #Define experiment parameters and measurement points defApplication('otg2') do |a| @@ -185,13 +182,11 @@ The ED describing this simple “Hello World” wireless experiment is {file:doc end end - - #Section 2 #Define resources and nodes used by application #Define configuration of wireless 'sender' - defGroup('Sender', "omf.nicta.node36") do |node| + defGroup('Sender', "omf.nicta.node9") do |node| node.addApplication("otg2") do |app| app.setProperty('udp_local_host', '192.168.0.2') app.setProperty('udp_dst_host', '192.168.0.3') @@ -206,9 +201,8 @@ The ED describing this simple “Hello World” wireless experiment is {file:doc node.net.w0.ip = "192.168.0.2/24" end - #Define configuration of wireless 'reciever' - defGroup('Receiver', "omf.nicta.node37") do |node| + defGroup('Receiver', "omf.nicta.node10") do |node| node.addApplication("otr2") do |app| app.setProperty('udp_local_host', '192.168.0.3') app.setProperty('udp_local_port', 3000) @@ -218,16 +212,12 @@ The ED describing this simple “Hello World” wireless experiment is {file:doc node.net.w0.mode = "adhoc" node.net.w0.type = 'g' node.net.w0.channel = "6" - node.net.w0.essid = "Hello World!" + node.net.w0.essid = "Hello World! Experiment02" node.net.w0.ip = "192.168.0.3/24" end - - - #Section 3 #Execution of application events - onEvent(:ALL_UP_AND_INSTALLED) do |event| info "Starting WiFi OMF6 Experiment events" @@ -241,8 +231,8 @@ The ED describing this simple “Hello World” wireless experiment is {file:doc info "Applications are stopping... Experiment Complete." Experiment.done end - end - + end + ### 3a) Application Definition @@ -303,10 +293,10 @@ In this example, we define a two group named 'Sender' and 'Receiver', which cont single resource each. > **IMPORTANT** When running this experiment using your own resources and testbed -please change `omf.nicta.node36` and `omf.nicta.node37` in the ED to the actual name of your +please change `omf.nicta.node9` and `omf.nicta.node10` in the ED to the actual name of your own resource. - defGroup('Sender', 'omf.nicta.node36') do |g| + defGroup('Sender', 'omf.nicta.node9') do |g| #... end @@ -460,13 +450,13 @@ similar to this: 18:15:35 INFO Object: Connected 18:15:35 INFO Object: Start experiment: 2013-04-18T08:15:35Z 18:15:35 INFO OmfEc: Subscribed to b08025bb-6021-401b-bb55-c80c8a4fc99a - 18:15:35 INFO OmfEc: Subscribed to omf.nicta.node36 - 18:15:35 INFO OmfEc: Config omf.nicta.node36 to join Sender + 18:15:35 INFO OmfEc: Subscribed to omf.nicta.node9 + 18:15:35 INFO OmfEc: Config omf.nicta.node9 to join Sender 18:15:35 INFO OmfEc: Subscribed to 062ed093-c11e-4039-8b4c-35d007aabc4e - 18:15:35 INFO OmfEc: Subscribed to omf.nicta.node37 - 18:15:35 INFO OmfEc: Config omf.nicta.node37 to join Receiver - 18:15:35 INFO OmfEc: Newly discovered resource >> omf.nicta.node36 - 18:15:35 INFO OmfEc: Newly discovered resource >> omf.nicta.node37 + 18:15:35 INFO OmfEc: Subscribed to omf.nicta.node10 + 18:15:35 INFO OmfEc: Config omf.nicta.node10 to join Receiver + 18:15:35 INFO OmfEc: Newly discovered resource >> omf.nicta.node9 + 18:15:35 INFO OmfEc: Newly discovered resource >> omf.nicta.node10 18:15:35 INFO OmfEc: Event triggered: 'ALL_UP' 18:15:35 INFO OmfEc: Subscribed to b08025bb-6021-401b-bb55-c80c8a4fc99a_wlan 18:15:35 INFO OmfEc: Subscribed to b08025bb-6021-401b-bb55-c80c8a4fc99a_application @@ -496,7 +486,7 @@ similar to this: The above screen output was obtained when running the EC on the NICTA testbed, with the experiment described in {file:doc/tutorials/tutorial01.rb tutorial01.rb} -and using the resources named 'omf.nicta.node36' and 'omf.nicta.node37'. +and using the resources named 'omf.nicta.node9' and 'omf.nicta.node10'. ### 4c) What does that screen output mean? @@ -509,21 +499,21 @@ this experiment (Experiment ID, XMPP server used, resources used,...): 18:15:35 INFO Object: Connected 18:15:35 INFO Object: Start experiment: 2013-04-18T08:15:35Z ... - 18:15:35 INFO OmfEc: Subscribed to omf.nicta.node36 - 18:15:35 INFO OmfEc: Config omf.nicta.node36 to join Sender + 18:15:35 INFO OmfEc: Subscribed to omf.nicta.node9 + 18:15:35 INFO OmfEc: Config omf.nicta.node9 to join Sender - It also provides us some feedback about its communication with the XMPP server and other OMF entities: ... 18:15:35 INFO OmfEc: Subscribed to b08025bb-6021-401b-bb55-c80c8a4fc99a - 18:15:35 INFO OmfEc: Subscribed to omf.nicta.node36 + 18:15:35 INFO OmfEc: Subscribed to omf.nicta.node9 ... 18:15:35 INFO OmfEc: Subscribed to 062ed093-c11e-4039-8b4c-35d007aabc4e - 18:15:35 INFO OmfEc: Subscribed to omf.nicta.node37 + 18:15:35 INFO OmfEc: Subscribed to omf.nicta.node10 ... - 18:15:35 INFO OmfEc: Newly discovered resource >> omf.nicta.node36 - 18:15:35 INFO OmfEc: Newly discovered resource >> omf.nicta.node37 + 18:15:35 INFO OmfEc: Newly discovered resource >> omf.nicta.node9 + 18:15:35 INFO OmfEc: Newly discovered resource >> omf.nicta.node10 ... 18:15:35 INFO OmfEc: Subscribed to b08025bb-6021-401b-bb55-c80c8a4fc99a_wlan 18:15:35 INFO OmfEc: Subscribed to b08025bb-6021-401b-bb55-c80c8a4fc99a_application diff --git a/doc/tutorials/Experiment03.mkd b/doc/tutorials/Experiment03.mkd index 586852c1..57d486ed 100644 --- a/doc/tutorials/Experiment03.mkd +++ b/doc/tutorials/Experiment03.mkd @@ -44,8 +44,55 @@ How to pass parameters to your experiment and change them at run-time The Experiment Description (ED) describing this simple experiment is: - defProperty('theSender', 'omf.nicta.node1', "ID of sender node") - defProperty('theReceiver', 'omf.nicta.node2', "ID of receiver node") + #Welcome to the Dynamic Properties ED + #This ED allows the experimenter to pass parameters to the experiment and change them at run-time + + ############################################################################################### + ############################################################################################### + #Section 1 + #Define application file-paths + #Define experiment parameters and measurement points + + defApplication('otg2') do |app| + + #Application description and binary path + app.description = 'otg2 is a configurable traffic generator' + app.binary_path = '/usr/bin/otg2' + + #Configurable parameters of Experiment + app.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + app.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + app.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + + #Define measurement points that application will output + app.defMeasurement('udp_out') do |m| + + end + end + + defApplication('otr2') do |app| + + #Application description and binary path + app.description = 'otr2 is a configurable traffic reciever' + app.binary_path = '/usr/bin/otr2' + + #Configurable parameters of Experiment + app.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + + #Define measurement points that application will output + app.defMeasurement('udp_in') do |m| + + end + end + ############################################################################################### + ############################################################################################### + #Define dynamic properties to be changed by experimenter + + defProperty('theSender', 'omf.nicta.node9', "ID of sender node") + defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node") defProperty('packetsize', 128, "Packet size (byte) from the sender node") defProperty('bitrate', 2048, "Bitrate (bit/s) from the sender node") defProperty('runtime', 40, "Time in second for the experiment is to run") @@ -53,50 +100,79 @@ The Experiment Description (ED) describing this simple experiment is: defProperty('channel', '6', "The WIFI channel to use in this experiment") defProperty('netid', "example2", "The ESSID to use in this experiment") + ############################################################################################### + ############################################################################################### + #Section 2 + #Define resources and nodes used by application + + #Create the group 'Sender' associated to dynamic property defGroup('Sender',property.theSender) do |node| - node.addApplication("test:app:otg2") do |app| - app.setProperty('udp:local_host', '192.168.0.2') - app.setProperty('udp:dst_host', '192.168.0.3') - app.setProperty('udp:dst_port', 3000) - app.setProperty('cbr:size', property.packetsize) - app.setProperty('cbr:rate', property.bitrate * 2) - app.measure('udp_out', :samples => 1) - end - node.net.w0.mode = "adhoc" - node.net.w0.type = property.wifiType - node.net.w0.channel = property.channel - node.net.w0.essid = "foo"+property.netid - node.net.w0.ip = "192.168.0.2" + + #Associate application to group (?) + node.addApplication("otg2") do |app| + + #Configure aplication + app.setProperty('udp_local_host', '192.168.0.2') + app.setProperty('udp_dst_host', '192.168.0.3') + app.setProperty('udp_dst_port', 3000) + app.setProperty('cbr_size', property.packetsize) + app.setProperty('cbr_rate', property.bitrate * 2) + + #Request application to collect measurement point output data + app.measure('udp_out', :samples => 1) + + end + node.net.w0.mode = "adhoc" + node.net.w0.type = property.wifiType + node.net.w0.channel = property.channel + node.net.w0.essid = "foo"+property.netid + node.net.w0.ip = "192.168.0.2/24" end - defGroup('Receiver',property.theReceiver) do |node| - node.addApplication("test:app:otr2") do |app| - app.setProperty('udp:local_host', '192.168.0.3') - app.setProperty('udp:local_port', 3000) - app.measure('udp_in', :samples => 1) - end - node.net.w0.mode = "adhoc" - node.net.w0.type = property.wifiType - node.net.w0.channel = property.channel - node.net.w0.essid = "foo"+property.netid - node.net.w0.ip = "192.168.0.3" + #Create the group 'Reciever' associated to dynamic property + defGroup('Reciever',property.theReceiver) do |node| + + #Associate application to group (?) + node.addApplication("otr2") do |app| + + #Configure application + app.setProperty('udp_local_host', '192.168.0.3') + app.setProperty('udp_local_port', 3000) + + #Request application to collect measurement point output data + app.measure('udp_in', :samples => 1) + + end + node.net.w0.mode = "adhoc" + node.net.w0.type = property.wifiType + node.net.w0.channel = property.channel + node.net.w0.essid = "foo"+property.netid + node.net.w0.ip = "192.168.0.3/24" end + ############################################################################################### + ############################################################################################### + #Section 3 + #Execution of application events onEvent(:ALL_UP_AND_INSTALLED) do |event| - info "This is my first OMF experiment" - wait 10 - allGroups.startApplications - info "All my Applications are started now..." - wait property.runtime / 4 - property.packetsize = 256 - wait property.runtime / 4 - property.packetsize = 512 - wait property.runtime / 4 - property.packetsize = 1024 - wait property.runtime / 4 - allGroups.stopApplications - info "All my Applications are stopped now." - Experiment.done + + info "Starting dynamic properties ED..." + wait 10 + + allGroups.startApplications + info "Applications have started..." + + wait property.runtime / 4 + property.packetsize = 256 + wait property.runtime / 4 *2 + property.packetsize = 512 + wait property.runtime / 4 *3 + property.packetsize = 1024 + wait property.runtime + + allGroups.stopApplications + info "Applications are stopping... Experiment complete." + Experiment.done end @@ -116,61 +192,6 @@ This ED is available for download here: attachment:dynamic-properties.rb World” - etc… -\* **Line 10-24**: we use these Experiment Properties in our definition -and configuration of the `Sender` group. These lines show you multiple -examples on how to use Experiment Properties. For example:\ -**\* we use the syntax: `property.name` to access the value of the -property called `name` \ -**\* we use the same syntax to assign an Experiment Property to an -application parameter (e.g. Line 15)\ -**\* we use operations with Experiment Properties as arguments\ -****\* Line 22: the addition of a property to a string returns this -string concatenated with the string representation of that property.\ -****\* Line 16: arithmetic operations involving a properties and an -integer/float are allowed . -\ -** **Line 39-54**: we dynamically change the value of the `packetsize` -property during the execution of the experiment.\ -**\* Line 44: we let the experiment run for a quarter of the time with -the initial “packetsize” value\ -**\* Line 45: we change the value of the “packetsize” property\ -**\* Line 46: we let the experiment run for another quarter of the time\ -**\* etc… - -- **How does the dynamic update of a property work?** - - First you assign an Experiment Property to an application - parameters (line 15) - - Later, when you change the value of that property (line 45), a - string line is sent to the Standard-In input of that application - - Here for example, line 45 triggers the string line “cbr:size - 256” to be written to the Standard-In input of the application - otg2 used by the “Sender” group - - Prerequisites for this to work: - - Your application (otg2 in this example) needs to be able to - received and interprets strings on its Standard-In input, - while it is running. This should be easy to implement in - your own applications. - - This mechanism **only** works when you assign directly the - Experiment Property as the application parameter as in Line - 15! - - If you use an operation as part of this assignment (e.g.line - 16), then your application parameter will be assigned the - resulting value of that operation. Thus, any change in the - used Experiment Property **will not** result in a dynamic - application parameter change - - for example, calling `property.bitrate = 1024` in the - tasks declaration (line 39-54) will not result in the - dynamic update of the application’s bitrate parameter. - -- **Important** - - There are a few reserved names that are used by the EC or Ruby, - and which **cannot** be used to name Experiment Properties - - A list of these names can be found on [[ReservedKeywords|the - reserved names and keywords list]]. - -- **Finally…** Please refer to the [[BasicTutorialStage0-5-4|basic - “Hello World” tutorial]] if you do not understand the remaining - lines of the above ED. 5. Running the experiment ------------------------- @@ -190,7 +211,7 @@ the properties (as defined in line 1-8):\ \* if you want to pass your own initial values to some of the experiment’s properties via the command line:\ - omf- exec dynamic_properties.rb -- --theSender omf.nicta.node36 --theReceiver omf.nicta.node37 + omf- exec dynamic_properties.rb -- --theSender omf.nicta.node9 --theReceiver omf.nicta.node10 # OR @@ -214,26 +235,26 @@ experiment’s properties via the command line:\ INFO property.resetTries: resetTries = 1 (Fixnum) INFO Experiment: load system:exp:eventlib INFO Experiment: load dynamic-properties.rb - INFO property.theSender: theSender = "omf.nicta.node36" (String) - INFO property.theReceiver: theReceiver = "omf.nicta.node37" (String) + INFO property.theSender: theSender = "omf.nicta.node9" (String) + INFO property.theReceiver: theReceiver = "omf.nicta.node10" (String) INFO property.packetsize: packetsize = 128 (Fixnum) INFO property.bitrate: bitrate = 2048 (Fixnum) INFO property.runtime: runtime = 40 (Fixnum) INFO property.wifiType: wifiType = "g" (String) INFO property.channel: channel = "6" (String) INFO property.netid: netid = "example2" (String) - INFO Topology: Loading topology 'omf.nicta.node36'. - INFO Topology: Loading topology 'omf.nicta.node37'. + INFO Topology: Loading topology 'omf.nicta.node9'. + INFO Topology: Loading topology 'omf.nicta.node10'. INFO Experiment: Switching ON resources which are OFF - INFO omf.nicta.node36: Device 'net/w0' reported Not-Associated + INFO omf.nicta.node9: Device 'net/w0' reported Not-Associated INFO ALL_UP_AND_INSTALLED: Event triggered. Starting the associated tasks. INFO exp: This is my first OMF experiment INFO exp: Request from Experiment Script: Wait for 10s.... - INFO omf.nicta.node37: Device 'net/w0' reported Not-Associated - INFO omf.nicta.node36: Device 'net/w0' reported 46:32:28:8A:DA:DD + INFO omf.nicta.node10: Device 'net/w0' reported Not-Associated + INFO omf.nicta.node9: Device 'net/w0' reported 46:32:28:8A:DA:DD INFO exp: All my Applications are started now... INFO exp: Request from Experiment Script: Wait for 10s.... - INFO omf.nicta.node37: Device 'net/w0' reported 46:32:28:8A:DA:DD + INFO omf.nicta.node10: Device 'net/w0' reported 46:32:28:8A:DA:DD INFO property.packetsize: packetsize = 256 (Fixnum) INFO exp: Request from Experiment Script: Wait for 10s.... INFO property.packetsize: packetsize = 512 (Fixnum) diff --git a/doc/tutorials/Experiment04.mkd b/doc/tutorials/Experiment04.mkd index 464ea997..33317e31 100644 --- a/doc/tutorials/Experiment04.mkd +++ b/doc/tutorials/Experiment04.mkd @@ -40,42 +40,106 @@ The Experiment Description (ED) describing this simple experiment is (download it here: attachment:using-groups.rb): - defGroup('Sender', "omf.nicta.node2") do |node| - node.addApplication("test:app:otg2") do |app| - app.setProperty('udp:local_host', '%net.w0.ip%') - app.setProperty('udp:dst_host', '192.168.255.255') - app.setProperty('udp:broadcast', 1) - app.setProperty('udp:dst_port', 3000) - app.measure('udp_out', :samples => 1) - end + #Welcome to Experiment 04 + #This script allows experimenters to configure or address all resources within a defined group ane use simple substitutions + + #Section 1 + #Define otr2 application file-paths + #Define experiment parameters and measurement points + defApplication('otr2') do |app| + + #Application description and binary path + app.binary_path = "/usr/bin/otr2" + app.description = "otr is a configurable traffic sink that recieves packet streams" + + #Define configurable parameters of otr2 + app.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + app.defMeasurement('udp_in') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + end end - defGroup('Receiver', "omf.nicta.node3") do |node| - node.addApplication("test:app:otr2") do |app| - app.setProperty('udp:local_host', '192.168.255.255') - app.setProperty('udp:local_port', 3000) - app.measure('udp_in', :samples => 1) - end + #Define otg2 application file-paths + #Define experiment parameters and measurement points + defApplication('otg2') do |app| + + #Application description and binary path + app.binary_path = "/usr/bin/otg2" + app.description = "otg is a configurable traffic generator that sends packet streams" + + #Define configurable parameters of otg2 + app.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) + app.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + app.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + app.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + app.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) + app.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + app.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + app.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) + app.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) + app.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) + app.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + + #Define measurement points that application will output + app.defMeasurement('udp_out') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + + end end + #Section 2 + #Define resources and nodes used by application + defGroup('Sender', "omf.nicta.node9") do |node| + node.addApplication("otg2") do |app| + app.setProperty('udp_local_host', '%net.w0.ip%') + app.setProperty('udp_dst_host', '192.168.255.255') + app.setProperty('udp_broadcast', 1) + app.setProperty('udp_dst_port', 3000) + app.measure('udp_out', :samples => 1) + end + end + + defGroup('Receiver', "omf.nicta.node10,omf.nicta.node11") do |node| + node.addApplication("otr2") do |app| + app.setProperty('udp_local_host', '192.168.255.255') + app.setProperty('udp_local_port', 3000) + app.measure('udp_in', :samples => 1) + end + end + + #Not implemented in OMF6 - New syntax required for experiment to work allGroups.net.w0 do |interface| - interface.mode = "adhoc" - interface.type = 'g' - interface.channel = "6" - interface.essid = "helloworld" - interface.ip = "192.168.0.%index%" + interface.mode = "adhoc" + interface.type = 'g' + interface.channel = "6" + interface.essid = "Hello World! Experiment04" + interface.ip = "192.168.0.%index%" end + #Section 3 + #Execution of application events onEvent(:ALL_UP_AND_INSTALLED) do |event| - wait 10 - group("Receiver").startApplications - wait 5 - group("Sender").startApplications - wait 30 - group("Sender").stopApplications - wait 5 - group("Receiver").stopApplications - Experiment.done + after 10 + group("Receiver").startApplications + after 15 + group("Sender").startApplications + after 45 + group("Sender").stopApplications + after 50 + group("Receiver").stopApplications + Experiment.done end diff --git a/doc/tutorials/Experiment05.mkd b/doc/tutorials/Experiment05.mkd index 53f71c52..35cdfc5d 100644 --- a/doc/tutorials/Experiment05.mkd +++ b/doc/tutorials/Experiment05.mkd @@ -47,41 +47,45 @@ How to use your own or a 3rd party application with OMF - defApplication('test:app:otg2', 'otg2') do |a| - - a.path = "/usr/bin/otg2" - app.appPackage = "/home/myUsername/myArchive.tar" - a.version(1, 1, 3) - a.shortDescription = "Programmable traffic generator v2" - a.description = "OTG is a configurable traffic generator." - - # Define the properties that can be configured for this application - # - # syntax: defProperty(name = :mandatory, description = nil, parameter = nil, options = {}) - # - a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) - a.defProperty('udp:broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) - a.defProperty('udp:dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) - a.defProperty('udp:dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) - a.defProperty('udp:local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) - a.defProperty('udp:local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) - a.defProperty("cbr:size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) - a.defProperty("cbr:rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) - a.defProperty("exp:size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) - a.defProperty("exp:rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) - a.defProperty("exp:ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) - a.defProperty("exp:offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) - - # Define the Measurement Points and associated metrics that are available for this application - # - a.defMeasurement('udp_out') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) - end + #Welcome to Experiment 05 + #This ED will allow the experimenter to install a 3rd party application on specified nodes + #The otg2 application will be used as an example in this ED + + #Section 1 + #Define the file path of application + #Define experiment parameters and measurement points + + defApplication('otg2') do |app| + + app.binary_path = "/usr/bin/otg2" + app.appPackage = "http://extant.me/dev/path/to/archive.tar" + app.description = "Programmable traffic generator v2" + app.description = "OTG is a configurable traffic generator." + + #Define the properties that can be configured for this application + #syntax: defProperty(name = :mandatory, description = nil, parameter = nil, options = {}) + app.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) + app.defProperty('udp:broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + app.defProperty('udp:dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + app.defProperty('udp:dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + app.defProperty('udp:local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + app.defProperty('udp:local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) + app.defProperty("cbr:size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + app.defProperty("cbr:rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + app.defProperty("exp:size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) + app.defProperty("exp:rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) + app.defProperty("exp:ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) + app.defProperty("exp:offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + + #Define the Measurement Points and associated metrics that are available for this application + app.defMeasurement('udp_out') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + end end diff --git a/doc/tutorials/Experiment06.mkd b/doc/tutorials/Experiment06.mkd index f1a0286c..770664ce 100644 --- a/doc/tutorials/Experiment06.mkd +++ b/doc/tutorials/Experiment06.mkd @@ -54,54 +54,123 @@ The Experiment Description (ED) describing this simple experiment is (download it here: attachment:using-filters.rb): - defProperty('theSender', 'omf.nicta.node1', "ID of sender node") - defProperty('theReceiver', 'omf.nicta.node2', "ID of receiver node") + #Welcome to Experiment 06 + #This ED will allow the experimenter to create a filter to customise measurements collected + #Section 1 + #Define otr2 application file-paths + #Define experiment parameters and measurement points + + defApplication('otr2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otr2" + a.description = "otr is a configurable traffic sink that recieves packet streams" + + #Define configurable parameters of otr2 + a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defMeasurement('udp_in') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + end + end + + #Define otg2 application file-paths + #Define experiment parameters and measurement points + defApplication('otg2') do |a| + + #Application description and binary path + a.binary_path = "/usr/bin/otg2" + a.description = "otg is a configurable traffic generator that sends packet streams" + + #Define configurable parameters of otg2 + a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) + a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) + a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) + a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) + a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) + a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) + a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) + a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) + a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) + a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) + + #Define measurement points that application will output + a.defMeasurement('udp_out') do |m| + m.defMetric('ts',:float) + m.defMetric('flow_id',:long) + m.defMetric('seq_no',:long) + m.defMetric('pkt_length',:long) + m.defMetric('dst_host',:string) + m.defMetric('dst_port',:long) + + end + end + + #Section 2 + #Define resources and nodes used by application + defProperty('theSender', 'omf.nicta.node9', "ID of sender node") + defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node") defProperty('packetsize', 256, "Packet size (byte) from the sender node") defProperty('runtime', 30, "Time in second for the experiment is to run") defGroup('Sender',property.theSender) do |node| - node.addApplication("test:app:otg2") do |app| - app.setProperty('udp:local_host', '192.168.0.2') - app.setProperty('udp:dst_host', '192.168.0.3') - app.setProperty('udp:dst_port', 3000) - app.setProperty('cbr:size', property.packetsize) - app.measure('udp_out', :samples => 3) do |mp| - mp.filter('seq_no', 'avg') + node.addApplication("otg2") do |app| + app.setProperty('udp_local_host', '192.168.0.2') + app.setProperty('udp_dst_host', '192.168.0.3') + app.setProperty('udp_dst_port', 3000) + app.setProperty('cbr_size', property.packetsize) + app.measure('udp_out', :samples => 3) do |mp| + mp.filter('seq_no', 'avg') + end end - end - node.net.w0.mode = "adhoc" - node.net.w0.type = 'g' - node.net.w0.channel = "6" - node.net.w0.essid = "helloworld" - node.net.w0.ip = "192.168.0.2" + node.net.w0.mode = "adhoc" + node.net.w0.type = 'g' + node.net.w0.channel = "6" + node.net.w0.essid = "Hello World! Experiment06" + node.net.w0.ip = "192.168.0.2/24" end defGroup('Receiver',property.theReceiver) do |node| - node.addApplication("test:app:otr2") do |app| - app.setProperty('udp:local_host', '192.168.0.3') - app.setProperty('udp:local_port', 3000) - app.measure('udp_in', :samples => 2) do |mp| - mp.filter('pkt_length', 'sum') - mp.filter('seq_no', 'avg') + node.addApplication("otr2") do |app| + app.setProperty('udp_local_host', '192.168.0.3') + app.setProperty('udp_local_port', 3000) + app.measure('udp_in', :samples => 2) do |mp| + mp.filter('pkt_length', 'sum') + mp.filter('seq_no', 'avg') + end end - end - node.net.w0.mode = "adhoc" - node.net.w0.type = 'g' - node.net.w0.channel = "6" - node.net.w0.essid = "helloworld" - node.net.w0.ip = "192.168.0.3" + node.net.w0.mode = "adhoc" + node.net.w0.type = 'g' + node.net.w0.channel = "6" + node.net.w0.essid = "Hello World! Experiment06" + node.net.w0.ip = "192.168.0.3/24" end + #Section 3 + #Execution of application events onEvent(:ALL_UP_AND_INSTALLED) do |event| - wait 10 - allGroups.startApplications - wait property.runtime / 2 - property.packetsize = 512 - wait property.runtime / 2 - allGroups.stopApplications - Experiment.done + info "Starting experiment events..." + + after 10 + allGroups.startApplications + info "All Applications have started..." + + after property.runtime / 2 + property.packetsize = 512 + after property.runtime / 2 + + allGroups.stopApplications + info "Applications are stopping... Experiment Complete." + Experiment.done end - + The Experiment Description (ED) describing this simple experiment is (download it here: attachment:using-filters.rb): diff --git a/doc/tutorials/experiment01.rb b/doc/tutorials/experiment01.rb index ac464af7..4769b7b4 100644 --- a/doc/tutorials/experiment01.rb +++ b/doc/tutorials/experiment01.rb @@ -1,6 +1,7 @@ #Welcome to Experiment 01 #This ED allows experimenters to ping a specified host and collect the output it recieves as measurement points + #Section 1 #Define oml2 application file-paths #Define experiment parameters and measurement points @@ -36,7 +37,7 @@ g.addApplication("ping_oml2") do |app| #Configure target of application (Ping target) - app.setProperty('target', 'www.extant.me') + app.setProperty('target', 'www.nicta.com.au') #Configure amount of times to ping host app.setProperty('count', 3) diff --git a/doc/tutorials/experiment02.rb b/doc/tutorials/experiment02.rb index 07854647..a916fba5 100644 --- a/doc/tutorials/experiment02.rb +++ b/doc/tutorials/experiment02.rb @@ -1,7 +1,6 @@ #Welcome to experiment 02: 'Hello World' Wireless #This script creates a simple wireless networking experiment - #Section 1 #Define otr2 application file-paths #Define experiment parameters and measurement points From b34b2ab12d90aa23298506b31a45b6e8bbaa128b Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 17:35:53 +1000 Subject: [PATCH 39/44] Markdown Editing --- doc/tutorials/Experiment01.mkd | 123 ++++++++--------- doc/tutorials/Experiment02.mkd | 211 ++++++++++++++-------------- doc/tutorials/Experiment03.mkd | 243 +++++++++++++++++---------------- doc/tutorials/Experiment04.mkd | 195 +++++++++++++------------- doc/tutorials/Experiment05.mkd | 83 +++++------ doc/tutorials/Experiment06.mkd | 223 +++++++++++++++--------------- 6 files changed, 542 insertions(+), 536 deletions(-) diff --git a/doc/tutorials/Experiment01.mkd b/doc/tutorials/Experiment01.mkd index d05b53d1..a3912a15 100644 --- a/doc/tutorials/Experiment01.mkd +++ b/doc/tutorials/Experiment01.mkd @@ -141,78 +141,79 @@ The ED describing this simple “Hello World” experiment is {file:doc/tutorial parts, described in the following listing and subsections below. - - #Welcome to Experiment 01 - #This ED allows experimenters to ping a specified host and collect the output it recieves as measurement points +
    
+#Welcome to Experiment 01
+#This ED allows experimenters to ping a specified host and collect the output it recieves as measurement points
 
-    #Section 1
-    #Define oml2 application file-paths
-    #Define experiment parameters and measurement points
+#Section 1
+#Define oml2 application file-paths
+#Define experiment parameters and measurement points
 
-    defApplication('ping_oml2') do |app|
-        
-        #Application description and binary path
-        app.description = 'Simple definition of ping-oml2 application'
-        app.binary_path = '/usr/bin/ping-oml2'
-        
-        #Configurable parameters of Experiment
-        app.defProperty('target', 'Address to ping', '-a', {:type => :string})
-        app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer})
-        
+defApplication('ping_oml2') do |app|
+    
+    #Application description and binary path
+    app.description = 'Simple definition of ping-oml2 application'
+    app.binary_path = '/usr/bin/ping-oml2'
+    
+    #Configurable parameters of Experiment
+    app.defProperty('target', 'Address to ping', '-a', {:type => :string})
+    app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer})
+    
+    
+    #Define measurement points that application will output
+    app.defMeasurement('ping') do |m|
+        m.defMetric('dest_addr',:string)
+        m.defMetric('ttl',:uint32)
+        m.defMetric('rtt',:double)
+        m.defMetric('rtt_unit',:string)
         
-        #Define measurement points that application will output
-        app.defMeasurement('ping') do |m|
-            m.defMetric('dest_addr',:string)
-            m.defMetric('ttl',:uint32)
-            m.defMetric('rtt',:double)
-            m.defMetric('rtt_unit',:string)
-            
-        end
     end
+end
 
-    #Section 2
-    #Define resources and nodes used by oml2 application
+#Section 2
+#Define resources and nodes used by oml2 application
 
-    #Create the group 'Sender' with specified nodes
-    defGroup('Sender', 'omf.nicta.node9') do |g|
-        
-        #Associate oml2 application to group (?)
-        g.addApplication("ping_oml2") do |app|
-            
-            #Configure target of application (Ping target)
-            app.setProperty('target', 'www.nicta.com.au')
-            
-            #Configure amount of times to ping host
-            app.setProperty('count', 3)
-            
-            #Request application to collect measurement point output data
-            app.measure('ping', :samples => 1)
-            
-        end
-    end
-
-    #Section  3
-    #Execution of application events
-
-    onEvent(:ALL_UP_AND_INSTALLED) do |event|
-        
-        # Print information message on commandline
-        info "Initializing first OMF experiment event"
+#Create the group 'Sender' with specified nodes
+defGroup('Sender', 'omf.nicta.node9') do |g|
+    
+    #Associate oml2 application to group (?)
+    g.addApplication("ping_oml2") do |app|
         
-        # Start all the Applications associated to all the Group
-        allGroups.startApplications
+        #Configure target of application (Ping target)
+        app.setProperty('target', 'www.nicta.com.au')
         
-        # Wait for 5 sec (allowing time for 3 pings)
-        after 5
+        #Configure amount of times to ping host
+        app.setProperty('count', 3)
         
-        # Stop all the Applications associated to all the Groups
-        allGroups.stopApplications
+        #Request application to collect measurement point output data
+        app.measure('ping', :samples => 1)
         
-        # Tell the Experiment Controller to terminate the experiment now
-        Experiment.done
     end
-    
-        
+end
+
+#Section  3
+#Execution of application events
+
+onEvent(:ALL_UP_AND_INSTALLED) do |event|
+    
+    # Print information message on commandline
+    info "Initializing first OMF experiment event"
+    
+    # Start all the Applications associated to all the Group
+    allGroups.startApplications
+    
+    # Wait for 5 sec (allowing time for 3 pings)
+    after 5
+    
+    # Stop all the Applications associated to all the Groups
+    allGroups.stopApplications
+    
+    # Tell the Experiment Controller to terminate the experiment now
+    Experiment.done
+end
+
+
+ diff --git a/doc/tutorials/Experiment02.mkd b/doc/tutorials/Experiment02.mkd index 6431728d..85ff3d56 100644 --- a/doc/tutorials/Experiment02.mkd +++ b/doc/tutorials/Experiment02.mkd @@ -121,118 +121,119 @@ OMF Experiment Description Language (OEDL), which is based on Ruby syntax. The ED describing this simple “Hello World” wireless experiment is {file:doc/tutorials/experiment02.rb experiment02.rb}: - - #Welcome to experiment 02: 'Hello World' Wireless - #This script creates a simple wireless networking experiment - - #Section 1 - #Define otr2 application file-paths - #Define experiment parameters and measurement points - - defApplication('otr2') do |a| - - #Application description and binary path - a.binary_path = "/usr/bin/otr2" - a.description = "otr is a configurable traffic sink that recieves packet streams" - - #Define configurable parameters of otr2 - a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) - a.defMeasurement('udp_in') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) - end +
    
+#Welcome to experiment 02: 'Hello World' Wireless
+#This script creates a simple wireless networking experiment
+
+#Section 1
+#Define otr2 application file-paths
+#Define experiment parameters and measurement points
+
+defApplication('otr2') do |a|
+    
+    #Application description and binary path
+    a.binary_path = "/usr/bin/otr2"
+    a.description = "otr is a configurable traffic sink that recieves packet streams"
+    
+    #Define configurable parameters of otr2
+    a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false})
+    a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false})
+    a.defMeasurement('udp_in') do |m|
+        m.defMetric('ts',:float)
+        m.defMetric('flow_id',:long)
+        m.defMetric('seq_no',:long)
+        m.defMetric('pkt_length',:long)
+        m.defMetric('dst_host',:string)
+        m.defMetric('dst_port',:long)
     end
-
-    #Define otg2 application file-paths
-    #Define experiment parameters and measurement points
-    defApplication('otg2') do |a|
-        
-        #Application description and binary path
-        a.binary_path = "/usr/bin/otg2"
-        a.description = "otg is a configurable traffic generator that sends packet streams"
+end
+
+#Define otg2 application file-paths
+#Define experiment parameters and measurement points
+defApplication('otg2') do |a|
+    
+    #Application description and binary path
+    a.binary_path = "/usr/bin/otg2"
+    a.description = "otg is a configurable traffic generator that sends packet streams"
+    
+    #Define configurable parameters of otg2
+    a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false})
+    a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false})
+    a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false})
+    a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false})
+    a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false})
+    a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false})
+    a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer})
+    a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer})
+    a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer})
+    a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer})
+    a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer})
+    a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer})
+    
+    #Define measurement points that application will output
+    a.defMeasurement('udp_out') do |m|
+        m.defMetric('ts',:float)
+        m.defMetric('flow_id',:long)
+        m.defMetric('seq_no',:long)
+        m.defMetric('pkt_length',:long)
+        m.defMetric('dst_host',:string)
+        m.defMetric('dst_port',:long)
         
-        #Define configurable parameters of otg2
-        a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false})
-        a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false})
-        a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false})
-        a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false})
-        a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false})
-        a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false})
-        a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer})
-        a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer})
-        a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer})
-        a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer})
-        a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer})
-        a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer})
-        
-        #Define measurement points that application will output
-        a.defMeasurement('udp_out') do |m|
-            m.defMetric('ts',:float)
-            m.defMetric('flow_id',:long)
-            m.defMetric('seq_no',:long)
-            m.defMetric('pkt_length',:long)
-            m.defMetric('dst_host',:string)
-            m.defMetric('dst_port',:long)
-            
-        end
     end
-
-    #Section 2
-    #Define resources and nodes used by application
-
-    #Define configuration of wireless 'sender'
-    defGroup('Sender', "omf.nicta.node9") do |node|
-        node.addApplication("otg2") do |app|
-            app.setProperty('udp_local_host', '192.168.0.2')
-            app.setProperty('udp_dst_host', '192.168.0.3')
-            app.setProperty('udp_dst_port', 3000)
-            app.measure('udp_out', :interval => 3)
-        end
-        
-        node.net.w0.mode = "adhoc"
-        node.net.w0.type = 'g'
-        node.net.w0.channel = "6"
-        node.net.w0.essid = "Hello World!"
-        node.net.w0.ip = "192.168.0.2/24"
+end
+
+#Section 2
+#Define resources and nodes used by application
+
+#Define configuration of wireless 'sender'
+defGroup('Sender', "omf.nicta.node9") do |node|
+    node.addApplication("otg2") do |app|
+        app.setProperty('udp_local_host', '192.168.0.2')
+        app.setProperty('udp_dst_host', '192.168.0.3')
+        app.setProperty('udp_dst_port', 3000)
+        app.measure('udp_out', :interval => 3)
     end
-
-    #Define configuration of wireless 'reciever'
-    defGroup('Receiver', "omf.nicta.node10") do |node|
-        node.addApplication("otr2") do |app|
-            app.setProperty('udp_local_host', '192.168.0.3')
-            app.setProperty('udp_local_port', 3000)
-            app.measure('udp_in', :interval => 3)
-        end
-        
-        node.net.w0.mode = "adhoc"
-        node.net.w0.type = 'g'
-        node.net.w0.channel = "6"
-        node.net.w0.essid = "Hello World! Experiment02"
-        node.net.w0.ip = "192.168.0.3/24"
+    
+    node.net.w0.mode = "adhoc"
+    node.net.w0.type = 'g'
+    node.net.w0.channel = "6"
+    node.net.w0.essid = "Hello World!"
+    node.net.w0.ip = "192.168.0.2/24"
+end
+
+#Define configuration of wireless 'reciever'
+defGroup('Receiver', "omf.nicta.node10") do |node|
+    node.addApplication("otr2") do |app|
+        app.setProperty('udp_local_host', '192.168.0.3')
+        app.setProperty('udp_local_port', 3000)
+        app.measure('udp_in', :interval => 3)
     end
-
-    #Section 3
-    #Execution of application events
-    onEvent(:ALL_UP_AND_INSTALLED) do |event|
-        info "Starting WiFi OMF6 Experiment events"
+    
+    node.net.w0.mode = "adhoc"
+    node.net.w0.type = 'g'
+    node.net.w0.channel = "6"
+    node.net.w0.essid = "Hello World! Experiment02"
+    node.net.w0.ip = "192.168.0.3/24"
+end
+
+#Section 3
+#Execution of application events
+onEvent(:ALL_UP_AND_INSTALLED) do |event|
+    info "Starting WiFi OMF6 Experiment events"
+    
+    after 10 do
+        allGroups.startApplications
+        info "All Applications have started..."
         
-        after 10 do
-            allGroups.startApplications
-            info "All Applications have started..."
-            
-        end
-        after 40 do
-            allGroups.stopApplications
-            info "Applications are stopping... Experiment Complete."
-            Experiment.done
-        end
-    end    
+    end
+    after 40 do
+        allGroups.stopApplications
+        info "Applications are stopping... Experiment Complete."
+        Experiment.done
+    end
+end    
 
+
### 3a) Application Definition diff --git a/doc/tutorials/Experiment03.mkd b/doc/tutorials/Experiment03.mkd index 57d486ed..926060c8 100644 --- a/doc/tutorials/Experiment03.mkd +++ b/doc/tutorials/Experiment03.mkd @@ -43,138 +43,139 @@ How to pass parameters to your experiment and change them at run-time The Experiment Description (ED) describing this simple experiment is: - - #Welcome to the Dynamic Properties ED - #This ED allows the experimenter to pass parameters to the experiment and change them at run-time - - ############################################################################################### - ############################################################################################### - #Section 1 - #Define application file-paths - #Define experiment parameters and measurement points - - defApplication('otg2') do |app| - - #Application description and binary path - app.description = 'otg2 is a configurable traffic generator' - app.binary_path = '/usr/bin/otg2' - - #Configurable parameters of Experiment - app.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) - app.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) - app.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) - app.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) - app.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) +
    
+#Welcome to the Dynamic Properties ED
+#This ED allows the experimenter to pass parameters to the experiment and change them at run-time
+
+###############################################################################################
+###############################################################################################
+#Section 1
+#Define application file-paths
+#Define experiment parameters and measurement points
+
+defApplication('otg2') do |app|
+    
+    #Application description and binary path
+    app.description = 'otg2 is a configurable traffic generator'
+    app.binary_path = '/usr/bin/otg2'
+    
+    #Configurable parameters of Experiment
+    app.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false})
+    app.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false})
+    app.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false})
+    app.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer})
+    app.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer})
+    
+    #Define measurement points that application will output
+    app.defMeasurement('udp_out') do |m|
         
-        #Define measurement points that application will output
-        app.defMeasurement('udp_out') do |m|
-            
-        end
     end
+end
+
+defApplication('otr2') do |app|
+    
+    #Application description and binary path
+    app.description = 'otr2 is a configurable traffic reciever'
+    app.binary_path = '/usr/bin/otr2'
+    
+    #Configurable parameters of Experiment
+    app.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false})
+    app.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false})
+    
+    #Define measurement points that application will output
+    app.defMeasurement('udp_in') do |m|
 
-    defApplication('otr2') do |app|
+    end
+end
+###############################################################################################
+###############################################################################################
+#Define dynamic properties to be changed by experimenter
+
+defProperty('theSender', 'omf.nicta.node9', "ID of sender node")
+defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node")
+defProperty('packetsize', 128, "Packet size (byte) from the sender node")
+defProperty('bitrate', 2048, "Bitrate (bit/s) from the sender node")
+defProperty('runtime', 40, "Time in second for the experiment is to run")
+defProperty('wifiType', "g", "The type of WIFI to use in this experiment")
+defProperty('channel', '6', "The WIFI channel to use in this experiment")
+defProperty('netid', "example2", "The ESSID to use in this experiment")
+
+###############################################################################################
+###############################################################################################
+#Section 2
+#Define resources and nodes used by application
+
+#Create the group 'Sender' associated to dynamic property
+defGroup('Sender',property.theSender) do |node|
+    
+    #Associate application to group (?)
+    node.addApplication("otg2") do |app|
         
-        #Application description and binary path
-        app.description = 'otr2 is a configurable traffic reciever'
-        app.binary_path = '/usr/bin/otr2'
+        #Configure aplication
+        app.setProperty('udp_local_host', '192.168.0.2')
+        app.setProperty('udp_dst_host', '192.168.0.3')
+        app.setProperty('udp_dst_port', 3000)
+        app.setProperty('cbr_size', property.packetsize)
+        app.setProperty('cbr_rate', property.bitrate * 2)
         
-        #Configurable parameters of Experiment
-        app.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false})
-        app.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false})
+        #Request application to collect measurement point output data
+        app.measure('udp_out', :samples => 1)
         
-        #Define measurement points that application will output
-        app.defMeasurement('udp_in') do |m|
-
-        end
     end
-    ###############################################################################################
-    ###############################################################################################
-    #Define dynamic properties to be changed by experimenter
-
-    defProperty('theSender', 'omf.nicta.node9', "ID of sender node")
-    defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node")
-    defProperty('packetsize', 128, "Packet size (byte) from the sender node")
-    defProperty('bitrate', 2048, "Bitrate (bit/s) from the sender node")
-    defProperty('runtime', 40, "Time in second for the experiment is to run")
-    defProperty('wifiType', "g", "The type of WIFI to use in this experiment")
-    defProperty('channel', '6', "The WIFI channel to use in this experiment")
-    defProperty('netid', "example2", "The ESSID to use in this experiment")
-
-    ###############################################################################################
-    ###############################################################################################
-    #Section 2
-    #Define resources and nodes used by application
-
-    #Create the group 'Sender' associated to dynamic property
-    defGroup('Sender',property.theSender) do |node|
+    node.net.w0.mode = "adhoc"
+    node.net.w0.type = property.wifiType
+    node.net.w0.channel = property.channel
+    node.net.w0.essid = "foo"+property.netid
+    node.net.w0.ip = "192.168.0.2/24"
+end
+
+#Create the group 'Reciever' associated to dynamic property
+defGroup('Reciever',property.theReceiver) do |node|
+    
+    #Associate application to group (?)
+    node.addApplication("otr2") do |app|
         
-        #Associate application to group (?)
-        node.addApplication("otg2") do |app|
-            
-            #Configure aplication
-            app.setProperty('udp_local_host', '192.168.0.2')
-            app.setProperty('udp_dst_host', '192.168.0.3')
-            app.setProperty('udp_dst_port', 3000)
-            app.setProperty('cbr_size', property.packetsize)
-            app.setProperty('cbr_rate', property.bitrate * 2)
-            
-            #Request application to collect measurement point output data
-            app.measure('udp_out', :samples => 1)
-            
-        end
-        node.net.w0.mode = "adhoc"
-        node.net.w0.type = property.wifiType
-        node.net.w0.channel = property.channel
-        node.net.w0.essid = "foo"+property.netid
-        node.net.w0.ip = "192.168.0.2/24"
-    end
-
-    #Create the group 'Reciever' associated to dynamic property
-    defGroup('Reciever',property.theReceiver) do |node|
+        #Configure application
+        app.setProperty('udp_local_host', '192.168.0.3')
+        app.setProperty('udp_local_port', 3000)
         
-        #Associate application to group (?)
-        node.addApplication("otr2") do |app|
-            
-            #Configure application
-            app.setProperty('udp_local_host', '192.168.0.3')
-            app.setProperty('udp_local_port', 3000)
-            
-            #Request application to collect measurement point output data
-            app.measure('udp_in', :samples => 1)
-
-        end
-        node.net.w0.mode = "adhoc"
-        node.net.w0.type = property.wifiType
-        node.net.w0.channel = property.channel
-        node.net.w0.essid = "foo"+property.netid
-        node.net.w0.ip = "192.168.0.3/24"
-    end
-    ###############################################################################################
-    ###############################################################################################
-    #Section  3
-    #Execution of application events
+        #Request application to collect measurement point output data
+        app.measure('udp_in', :samples => 1)
 
-    onEvent(:ALL_UP_AND_INSTALLED) do |event|
-        
-        info "Starting dynamic properties ED..."
-        wait 10
-        
-        allGroups.startApplications
-        info "Applications have started..."
-        
-        wait property.runtime / 4
-        property.packetsize = 256
-        wait property.runtime / 4 *2
-        property.packetsize = 512
-        wait property.runtime / 4 *3
-        property.packetsize = 1024
-        wait property.runtime
-        
-        allGroups.stopApplications
-        info "Applications are stopping... Experiment complete."
-        Experiment.done
     end
-    
+    node.net.w0.mode = "adhoc"
+    node.net.w0.type = property.wifiType
+    node.net.w0.channel = property.channel
+    node.net.w0.essid = "foo"+property.netid
+    node.net.w0.ip = "192.168.0.3/24"
+end
+###############################################################################################
+###############################################################################################
+#Section  3
+#Execution of application events
+
+onEvent(:ALL_UP_AND_INSTALLED) do |event|
+    
+    info "Starting dynamic properties ED..."
+    wait 10
+    
+    allGroups.startApplications
+    info "Applications have started..."
+    
+    wait property.runtime / 4
+    property.packetsize = 256
+    wait property.runtime / 4 *2
+    property.packetsize = 512
+    wait property.runtime / 4 *3
+    property.packetsize = 1024
+    wait property.runtime
+    
+    allGroups.stopApplications
+    info "Applications are stopping... Experiment complete."
+    Experiment.done
+end
+
+
This ED is available for download here: attachment:dynamic-properties.rb diff --git a/doc/tutorials/Experiment04.mkd b/doc/tutorials/Experiment04.mkd index 33317e31..8a509b8b 100644 --- a/doc/tutorials/Experiment04.mkd +++ b/doc/tutorials/Experiment04.mkd @@ -39,109 +39,110 @@ How to configure or address all resources within a defined group, and use simple The Experiment Description (ED) describing this simple experiment is (download it here: attachment:using-groups.rb): - - #Welcome to Experiment 04 - #This script allows experimenters to configure or address all resources within a defined group ane use simple substitutions - - #Section 1 - #Define otr2 application file-paths - #Define experiment parameters and measurement points - defApplication('otr2') do |app| - - #Application description and binary path - app.binary_path = "/usr/bin/otr2" - app.description = "otr is a configurable traffic sink that recieves packet streams" - - #Define configurable parameters of otr2 - app.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) - app.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) - app.defMeasurement('udp_in') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) - end +
    
+#Welcome to Experiment 04
+#This script allows experimenters to configure or address all resources within a defined group ane use simple substitutions
+
+#Section 1
+#Define otr2 application file-paths
+#Define experiment parameters and measurement points
+defApplication('otr2') do |app|
+    
+    #Application description and binary path
+    app.binary_path = "/usr/bin/otr2"
+    app.description = "otr is a configurable traffic sink that recieves packet streams"
+    
+    #Define configurable parameters of otr2
+    app.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false})
+    app.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false})
+    app.defMeasurement('udp_in') do |m|
+        m.defMetric('ts',:float)
+        m.defMetric('flow_id',:long)
+        m.defMetric('seq_no',:long)
+        m.defMetric('pkt_length',:long)
+        m.defMetric('dst_host',:string)
+        m.defMetric('dst_port',:long)
     end
-
-    #Define otg2 application file-paths
-    #Define experiment parameters and measurement points
-    defApplication('otg2') do |app|
-        
-        #Application description and binary path
-        app.binary_path = "/usr/bin/otg2"
-        app.description = "otg is a configurable traffic generator that sends packet streams"
-        
-        #Define configurable parameters of otg2
-        app.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false})
-        app.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false})
-        app.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false})
-        app.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false})
-        app.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false})
-        app.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false})
-        app.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer})
-        app.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer})
-        app.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer})
-        app.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer})
-        app.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer})
-        app.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer})
+end
+
+#Define otg2 application file-paths
+#Define experiment parameters and measurement points
+defApplication('otg2') do |app|
+    
+    #Application description and binary path
+    app.binary_path = "/usr/bin/otg2"
+    app.description = "otg is a configurable traffic generator that sends packet streams"
+    
+    #Define configurable parameters of otg2
+    app.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false})
+    app.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false})
+    app.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false})
+    app.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false})
+    app.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false})
+    app.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false})
+    app.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer})
+    app.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer})
+    app.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer})
+    app.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer})
+    app.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer})
+    app.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer})
+    
+    #Define measurement points that application will output
+    app.defMeasurement('udp_out') do |m|
+        m.defMetric('ts',:float)
+        m.defMetric('flow_id',:long)
+        m.defMetric('seq_no',:long)
+        m.defMetric('pkt_length',:long)
+        m.defMetric('dst_host',:string)
+        m.defMetric('dst_port',:long)
         
-        #Define measurement points that application will output
-        app.defMeasurement('udp_out') do |m|
-            m.defMetric('ts',:float)
-            m.defMetric('flow_id',:long)
-            m.defMetric('seq_no',:long)
-            m.defMetric('pkt_length',:long)
-            m.defMetric('dst_host',:string)
-            m.defMetric('dst_port',:long)
-            
-        end
     end
-
-    #Section 2
-    #Define resources and nodes used by application
-    defGroup('Sender', "omf.nicta.node9") do |node|
-        node.addApplication("otg2") do |app|
-            app.setProperty('udp_local_host', '%net.w0.ip%')
-            app.setProperty('udp_dst_host', '192.168.255.255')
-            app.setProperty('udp_broadcast', 1)
-            app.setProperty('udp_dst_port', 3000)
-            app.measure('udp_out', :samples => 1)
-        end
-    end
-
-    defGroup('Receiver', "omf.nicta.node10,omf.nicta.node11") do |node|
-        node.addApplication("otr2") do |app|
-            app.setProperty('udp_local_host', '192.168.255.255')
-            app.setProperty('udp_local_port', 3000)
-            app.measure('udp_in', :samples => 1)
-        end
-    end
-
-    #Not implemented in OMF6 - New syntax required for experiment to work
-    allGroups.net.w0 do |interface|
-        interface.mode = "adhoc"
-        interface.type = 'g'
-        interface.channel = "6"
-        interface.essid = "Hello World! Experiment04"
-        interface.ip = "192.168.0.%index%"
+end
+
+#Section 2
+#Define resources and nodes used by application
+defGroup('Sender', "omf.nicta.node9") do |node|
+    node.addApplication("otg2") do |app|
+        app.setProperty('udp_local_host', '%net.w0.ip%')
+        app.setProperty('udp_dst_host', '192.168.255.255')
+        app.setProperty('udp_broadcast', 1)
+        app.setProperty('udp_dst_port', 3000)
+        app.measure('udp_out', :samples => 1)
     end
+end
 
-    #Section 3
-    #Execution of application events
-    onEvent(:ALL_UP_AND_INSTALLED) do |event|
-        after 10
-        group("Receiver").startApplications
-        after 15
-        group("Sender").startApplications
-        after 45
-        group("Sender").stopApplications
-        after 50
-        group("Receiver").stopApplications
-        Experiment.done
+defGroup('Receiver', "omf.nicta.node10,omf.nicta.node11") do |node|
+    node.addApplication("otr2") do |app|
+        app.setProperty('udp_local_host', '192.168.255.255')
+        app.setProperty('udp_local_port', 3000)
+        app.measure('udp_in', :samples => 1)
     end
-    
+end
+
+#Not implemented in OMF6 - New syntax required for experiment to work
+allGroups.net.w0 do |interface|
+    interface.mode = "adhoc"
+    interface.type = 'g'
+    interface.channel = "6"
+    interface.essid = "Hello World! Experiment04"
+    interface.ip = "192.168.0.%index%"
+end
+
+#Section 3
+#Execution of application events
+onEvent(:ALL_UP_AND_INSTALLED) do |event|
+    after 10
+    group("Receiver").startApplications
+    after 15
+    group("Sender").startApplications
+    after 45
+    group("Sender").stopApplications
+    after 50
+    group("Receiver").stopApplications
+    Experiment.done
+end
+
+
The Experiment Description (ED) describing this simple experiment is (download it here: attachment:using-groups.rb): diff --git a/doc/tutorials/Experiment05.mkd b/doc/tutorials/Experiment05.mkd index 35cdfc5d..da2cf30f 100644 --- a/doc/tutorials/Experiment05.mkd +++ b/doc/tutorials/Experiment05.mkd @@ -46,48 +46,49 @@ How to use your own or a 3rd party application with OMF - - #Welcome to Experiment 05 - #This ED will allow the experimenter to install a 3rd party application on specified nodes - #The otg2 application will be used as an example in this ED - - #Section 1 - #Define the file path of application - #Define experiment parameters and measurement points - - defApplication('otg2') do |app| - - app.binary_path = "/usr/bin/otg2" - app.appPackage = "http://extant.me/dev/path/to/archive.tar" - app.description = "Programmable traffic generator v2" - app.description = "OTG is a configurable traffic generator." - - #Define the properties that can be configured for this application - #syntax: defProperty(name = :mandatory, description = nil, parameter = nil, options = {}) - app.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false}) - app.defProperty('udp:broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false}) - app.defProperty('udp:dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false}) - app.defProperty('udp:dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false}) - app.defProperty('udp:local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false}) - app.defProperty('udp:local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false}) - app.defProperty("cbr:size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer}) - app.defProperty("cbr:rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer}) - app.defProperty("exp:size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer}) - app.defProperty("exp:rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer}) - app.defProperty("exp:ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer}) - app.defProperty("exp:offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer}) - - #Define the Measurement Points and associated metrics that are available for this application - app.defMeasurement('udp_out') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) - end +
    
+#Welcome to Experiment 05
+#This ED will allow the experimenter to install a 3rd party application on specified nodes
+#The otg2 application will be used as an example in this ED
+
+#Section 1
+#Define the file path of application
+#Define experiment parameters and measurement points
+
+defApplication('otg2') do |app|
+    
+    app.binary_path = "/usr/bin/otg2"
+    app.appPackage = "http://extant.me/dev/path/to/archive.tar"
+    app.description = "Programmable traffic generator v2"
+    app.description = "OTG is a configurable traffic generator."
+    
+    #Define the properties that can be configured for this application
+    #syntax: defProperty(name = :mandatory, description = nil, parameter = nil, options = {})
+    app.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false})
+    app.defProperty('udp:broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false})
+    app.defProperty('udp:dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false})
+    app.defProperty('udp:dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false})
+    app.defProperty('udp:local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false})
+    app.defProperty('udp:local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false})
+    app.defProperty("cbr:size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer})
+    app.defProperty("cbr:rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer})
+    app.defProperty("exp:size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer})
+    app.defProperty("exp:rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer})
+    app.defProperty("exp:ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer})
+    app.defProperty("exp:offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer})
+    
+    #Define the Measurement Points and associated metrics that are available for this application
+    app.defMeasurement('udp_out') do |m|
+        m.defMetric('ts',:float)
+        m.defMetric('flow_id',:long)
+        m.defMetric('seq_no',:long)
+        m.defMetric('pkt_length',:long)
+        m.defMetric('dst_host',:string)
+        m.defMetric('dst_port',:long)
     end
-    
+end
+
+
- **Line 1**: declares the URI and name for your OMF Application definition: diff --git a/doc/tutorials/Experiment06.mkd b/doc/tutorials/Experiment06.mkd index 770664ce..63a4308f 100644 --- a/doc/tutorials/Experiment06.mkd +++ b/doc/tutorials/Experiment06.mkd @@ -53,124 +53,125 @@ How to use Filters to customise your Measurement Collection The Experiment Description (ED) describing this simple experiment is (download it here: attachment:using-filters.rb): - - #Welcome to Experiment 06 - #This ED will allow the experimenter to create a filter to customise measurements collected - #Section 1 - #Define otr2 application file-paths - #Define experiment parameters and measurement points - - defApplication('otr2') do |a| - - #Application description and binary path - a.binary_path = "/usr/bin/otr2" - a.description = "otr is a configurable traffic sink that recieves packet streams" - - #Define configurable parameters of otr2 - a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false}) - a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false}) - a.defMeasurement('udp_in') do |m| - m.defMetric('ts',:float) - m.defMetric('flow_id',:long) - m.defMetric('seq_no',:long) - m.defMetric('pkt_length',:long) - m.defMetric('dst_host',:string) - m.defMetric('dst_port',:long) - end +
    
+#Welcome to Experiment 06
+#This ED will allow the experimenter to create a filter to customise measurements collected
+#Section 1
+#Define otr2 application file-paths
+#Define experiment parameters and measurement points
+
+defApplication('otr2') do |a|
+    
+    #Application description and binary path
+    a.binary_path = "/usr/bin/otr2"
+    a.description = "otr is a configurable traffic sink that recieves packet streams"
+    
+    #Define configurable parameters of otr2
+    a.defProperty('udp_local_host', 'IP address of this Destination node', '--udp:local_host', {:type => :string, :dynamic => false})
+    a.defProperty('udp_local_port', 'Receiving Port of this Destination node', '--udp:local_port', {:type => :integer, :dynamic => false})
+    a.defMeasurement('udp_in') do |m|
+        m.defMetric('ts',:float)
+        m.defMetric('flow_id',:long)
+        m.defMetric('seq_no',:long)
+        m.defMetric('pkt_length',:long)
+        m.defMetric('dst_host',:string)
+        m.defMetric('dst_port',:long)
     end
-
-    #Define otg2 application file-paths
-    #Define experiment parameters and measurement points
-    defApplication('otg2') do |a|
+end
+
+#Define otg2 application file-paths
+#Define experiment parameters and measurement points
+defApplication('otg2') do |a|
+    
+    #Application description and binary path
+    a.binary_path = "/usr/bin/otg2"
+    a.description = "otg is a configurable traffic generator that sends packet streams"
+    
+    #Define configurable parameters of otg2
+    a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false})
+    a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false})
+    a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false})
+    a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false})
+    a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false})
+    a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false})
+    a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer})
+    a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer})
+    a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer})
+    a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer})
+    a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer})
+    a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer})
+    
+    #Define measurement points that application will output
+    a.defMeasurement('udp_out') do |m|
+        m.defMetric('ts',:float)
+        m.defMetric('flow_id',:long)
+        m.defMetric('seq_no',:long)
+        m.defMetric('pkt_length',:long)
+        m.defMetric('dst_host',:string)
+        m.defMetric('dst_port',:long)
         
-        #Application description and binary path
-        a.binary_path = "/usr/bin/otg2"
-        a.description = "otg is a configurable traffic generator that sends packet streams"
-        
-        #Define configurable parameters of otg2
-        a.defProperty('generator', 'Type of packet generator to use (cbr or expo)', '-g', {:type => :string, :dynamic => false})
-        a.defProperty('udp_broadcast', 'Broadcast', '--udp:broadcast', {:type => :integer, :dynamic => false})
-        a.defProperty('udp_dst_host', 'IP address of the Destination', '--udp:dst_host', {:type => :string, :dynamic => false})
-        a.defProperty('udp_dst_port', 'Destination Port to send to', '--udp:dst_port', {:type => :integer, :dynamic => false})
-        a.defProperty('udp_local_host', 'IP address of this Source node', '--udp:local_host', {:type => :string, :dynamic => false})
-        a.defProperty('udp_local_port', 'Local Port of this source node', '--udp:local_port', {:type => :integer, :dynamic => false})
-        a.defProperty("cbr_size", "Size of packet [bytes]", '--cbr:size', {:dynamic => true, :type => :integer})
-        a.defProperty("cbr_rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer})
-        a.defProperty("exp_size", "Size of packet [bytes]", '--exp:size', {:dynamic => true, :type => :integer})
-        a.defProperty("exp_rate", "Data rate of the flow [kbps]", '--exp:rate', {:dynamic => true, :type => :integer})
-        a.defProperty("exp_ontime", "Average length of burst [msec]", '--exp:ontime', {:dynamic => true, :type => :integer})
-        a.defProperty("exp_offtime", "Average length of idle time [msec]", '--exp:offtime', {:dynamic => true, :type => :integer})
-        
-        #Define measurement points that application will output
-        a.defMeasurement('udp_out') do |m|
-            m.defMetric('ts',:float)
-            m.defMetric('flow_id',:long)
-            m.defMetric('seq_no',:long)
-            m.defMetric('pkt_length',:long)
-            m.defMetric('dst_host',:string)
-            m.defMetric('dst_port',:long)
-            
-        end
     end
-
-    #Section 2
-    #Define resources and nodes used by application
-    defProperty('theSender', 'omf.nicta.node9', "ID of sender node")
-    defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node")
-    defProperty('packetsize', 256, "Packet size (byte) from the sender node")
-    defProperty('runtime', 30, "Time in second for the experiment is to run")
-
-    defGroup('Sender',property.theSender) do |node|
-        node.addApplication("otg2") do |app|
-            app.setProperty('udp_local_host', '192.168.0.2')
-            app.setProperty('udp_dst_host', '192.168.0.3')
-            app.setProperty('udp_dst_port', 3000)
-            app.setProperty('cbr_size', property.packetsize)
-            app.measure('udp_out', :samples => 3) do |mp|
-                mp.filter('seq_no', 'avg')
-            end
+end
+
+#Section 2
+#Define resources and nodes used by application
+defProperty('theSender', 'omf.nicta.node9', "ID of sender node")
+defProperty('theReceiver', 'omf.nicta.node10', "ID of receiver node")
+defProperty('packetsize', 256, "Packet size (byte) from the sender node")
+defProperty('runtime', 30, "Time in second for the experiment is to run")
+
+defGroup('Sender',property.theSender) do |node|
+    node.addApplication("otg2") do |app|
+        app.setProperty('udp_local_host', '192.168.0.2')
+        app.setProperty('udp_dst_host', '192.168.0.3')
+        app.setProperty('udp_dst_port', 3000)
+        app.setProperty('cbr_size', property.packetsize)
+        app.measure('udp_out', :samples => 3) do |mp|
+            mp.filter('seq_no', 'avg')
         end
-        node.net.w0.mode = "adhoc"
-        node.net.w0.type = 'g'
-        node.net.w0.channel = "6"
-        node.net.w0.essid = "Hello World! Experiment06"
-        node.net.w0.ip = "192.168.0.2/24"
     end
-
-    defGroup('Receiver',property.theReceiver) do |node|
-        node.addApplication("otr2") do |app|
-            app.setProperty('udp_local_host', '192.168.0.3')
-            app.setProperty('udp_local_port', 3000)
-            app.measure('udp_in', :samples => 2) do |mp|
-                mp.filter('pkt_length', 'sum')
-                mp.filter('seq_no', 'avg')
-            end
+    node.net.w0.mode = "adhoc"
+    node.net.w0.type = 'g'
+    node.net.w0.channel = "6"
+    node.net.w0.essid = "Hello World! Experiment06"
+    node.net.w0.ip = "192.168.0.2/24"
+end
+
+defGroup('Receiver',property.theReceiver) do |node|
+    node.addApplication("otr2") do |app|
+        app.setProperty('udp_local_host', '192.168.0.3')
+        app.setProperty('udp_local_port', 3000)
+        app.measure('udp_in', :samples => 2) do |mp|
+            mp.filter('pkt_length', 'sum')
+            mp.filter('seq_no', 'avg')
         end
-        node.net.w0.mode = "adhoc"
-        node.net.w0.type = 'g'
-        node.net.w0.channel = "6"
-        node.net.w0.essid = "Hello World! Experiment06"
-        node.net.w0.ip = "192.168.0.3/24"
-    end
-
-    #Section 3
-    #Execution of application events
-    onEvent(:ALL_UP_AND_INSTALLED) do |event|
-        info "Starting experiment events..."
-        
-        after 10
-        allGroups.startApplications
-        info "All Applications have started..."
-        
-        after property.runtime / 2
-        property.packetsize = 512
-        after property.runtime / 2
-        
-        allGroups.stopApplications
-        info "Applications are stopping... Experiment Complete."
-        Experiment.done
     end
-        
+    node.net.w0.mode = "adhoc"
+    node.net.w0.type = 'g'
+    node.net.w0.channel = "6"
+    node.net.w0.essid = "Hello World! Experiment06"
+    node.net.w0.ip = "192.168.0.3/24"
+end
+
+#Section 3
+#Execution of application events
+onEvent(:ALL_UP_AND_INSTALLED) do |event|
+    info "Starting experiment events..."
+    
+    after 10
+    allGroups.startApplications
+    info "All Applications have started..."
+    
+    after property.runtime / 2
+    property.packetsize = 512
+    after property.runtime / 2
+    
+    allGroups.stopApplications
+    info "Applications are stopping... Experiment Complete."
+    Experiment.done
+end
+
+
Date: Thu, 20 Jun 2013 22:19:07 +1000 Subject: [PATCH 40/44] Tutorial complete and optimised for YARD --- doc/tutorials/Experiment01.mkd | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/tutorials/Experiment01.mkd b/doc/tutorials/Experiment01.mkd index a3912a15..9d5dca71 100644 --- a/doc/tutorials/Experiment01.mkd +++ b/doc/tutorials/Experiment01.mkd @@ -1,11 +1,10 @@ -TUTORIAL # Experiment 01 -1. "Hello World" Tutorial +1. "Hello World" *Experiment Tutorial* --------------------------- -This simple tutorial presents all the basic steps to develop, run, and +This simple experiment tutorial presents all the basic steps to develop, run, and access the result of an experiment with OMF 6. Subsequent tutorials will build on this one to introduce further OMF features. @@ -349,7 +348,7 @@ The set of consecutive tasks that we define are: info "Initializing first OMF experiment event" allGroups.startApplications - wait 5 + after 5 allGroups.stopApplications As OMF experiment are fully event driven, you have to explicitly tell the OMF From ff966ff368021c4fc9a40a44a005f281c21a1cb5 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 22:50:55 +1000 Subject: [PATCH 41/44] Experiment tutorial complete and optimised for yard --- ...orial01-fig1.png => experiment01-fig1.png} | Bin doc/tutorials/Experiment01.mkd | 4 +-- doc/tutorials/Experiment02.mkd | 27 +++++++++--------- 3 files changed, 15 insertions(+), 16 deletions(-) rename doc/images/{tutorial01-fig1.png => experiment01-fig1.png} (100%) diff --git a/doc/images/tutorial01-fig1.png b/doc/images/experiment01-fig1.png similarity index 100% rename from doc/images/tutorial01-fig1.png rename to doc/images/experiment01-fig1.png diff --git a/doc/tutorials/Experiment01.mkd b/doc/tutorials/Experiment01.mkd index 9d5dca71..cd371605 100644 --- a/doc/tutorials/Experiment01.mkd +++ b/doc/tutorials/Experiment01.mkd @@ -419,7 +419,7 @@ similar to this: INFO OmfEc: Resource xmpp://bd9c68d5-1469-41a0-9a33-4bdba501f7b0@norbit.npc.nicta.com.au created INFO OmfEc: Newly discovered resource >> bd9c68d5-1469-41a0-9a33-4bdba501f7b0 INFO OmfEc: Event triggered: 'ALL_UP_AND_INSTALLED' - INFO Object: This is my first OMF experiment + INFO Object: Initializing first OMF experiment event INFO Object: Request from Experiment Script: Wait for 10s.... WARN Object: Calling 'wait' or 'sleep' will block entire EC event loop. Please try 'after' or 'every' INFO OmfEc: APP_EVENT STARTED from app ping_oml2_cxt_0 - msg: env -i /usr/bin/ping-oml2 -a www.nicta.com.au -c 3 --oml-config /tmp/bd9c68d5.xml @@ -486,7 +486,7 @@ results/outputs: ... INFO OmfEc: Event triggered: 'ALL_UP_AND_INSTALLED' - INFO Object: This is my first OMF experiment + INFO Object: Initializing first OMF experiment event INFO Object: Request from Experiment Script: Wait for 10s.... WARN Object: Calling 'wait' or 'sleep' will block entire ... INFO OmfEc: APP_EVENT STARTED from app ping_oml2_cxt_0 - ... diff --git a/doc/tutorials/Experiment02.mkd b/doc/tutorials/Experiment02.mkd index 85ff3d56..02ecec7e 100644 --- a/doc/tutorials/Experiment02.mkd +++ b/doc/tutorials/Experiment02.mkd @@ -1,7 +1,6 @@ -TUTORIAL # Experiment 02 -1. “Hello World” - Wireless +1. “Hello World” Wireless *Experiment Tutorial* --------------------------- This simple tutorial presents all the basic steps to develop, run, and @@ -34,7 +33,7 @@ The experiment description (aka OEDL script) is: The following figure shows the simple experiment scenario for this tutorial: -![Figure 1. Simple experiment scenario](images/tutorial01-fig1.png) +![Figure 1. Simple experiment scenario](images/experiment01-fig1.png) - This experiment involves two resources of type PC with wireless capabilities: Node 1 and Node 2 @@ -417,13 +416,13 @@ Assuming that you have checked all the prerequisite points in the above section 2, to run your experiment you have to: - save the experiment description in a file on your computer, thus either - - cut-and-paste the above ED listing into a new file named 'tutorial01.rb' - - download the ED directly: {file:doc/tutorials/tutorial01.rb tutorial01.rb} + - cut-and-paste the above ED listing into a new file named 'experiment02.rb' + - download the ED directly: {file:doc/tutorials/experiment02.rb experiment02.rb} - open a terminal and navigate to the directory where you saved that file - start the EC software and tell it to execute the experiment described in your ED file, using the command line: - omf_ec -u xmpp://my_xmpp.com exec --oml_uri tcp:my_oml.com:port tutorial01.rb + omf_ec -u xmpp://my_xmpp.com exec --oml_uri tcp:my_oml.com:port experiment02.rb - **replace** *my_xmpp.com* with the hostname of the XMPP server that is used to communicate with the resources. This is usually provided by your testbed. @@ -435,7 +434,7 @@ and you want to use the OML2 server at 'my_oml.com with port 3003 to collect the measurements from your experiment, then you would use the command line: - omf_ec -u xmpp://my_xmpp.com exec --oml_uri tcp:my_oml.com:3003 tutorial01.rb + omf_ec -u xmpp://my_xmpp.com exec --oml_uri tcp:my_oml.com:3003 experiment02.rb If you would like to know more about the other options of the OMF EC software, please run: @@ -467,9 +466,9 @@ similar to this: 18:15:40 INFO OmfEc: Newly discovered resource >> bbfba05b-c8ed-458b-8841-c6694135e99e 18:15:42 INFO OmfEc: Newly discovered resource >> 65e5bf73-4085-4d46-b790-2c2e4b719b70 18:15:42 INFO OmfEc: Event triggered: 'ALL_UP_AND_INSTALLED' - 18:15:42 INFO Object: This is my first OMF experiment + 18:15:42 INFO Object: Starting WiFi OMF6 Experiment events 18:15:42 INFO OmfEc: Newly discovered resource >> 4b8644d3-9a45-4091-a147-651c55f4f15b - 18:15:52 INFO Object: All my Applications are started now... + 18:15:52 INFO Object: All Applications have started... 18:15:52 INFO OmfEc: APP_EVENT STARTED from app otg2_cxt_0 - msg: env -i /usr/bin/otg2 --udp:dst_host 192.168.0.3 --udp:dst_port 3000 --udp:local_host 192.168.0.2 --oml-config /tmp/65e5bf73-4085-4d46-b790-2c2e4b719b70-1366272953.xml 18:15:53 INFO OmfEc: APP_EVENT STARTED from app otr2_cxt_0 - msg: env -i /usr/bin/otr2 --udp:local_host 192.168.0.3 --udp:local_port 3000 --oml-config /tmp/bb4c0edf-7167-4c64-9cbe-c9681332749f-1366272953.xml 18:15:53 INFO OmfEc: APP_EVENT STDERR from app otr2_cxt_0 - msg: INFO OTG2 Traffic Sink 2.9.0-dirty @@ -478,7 +477,7 @@ similar to this: 18:15:54 INFO OmfEc: APP_EVENT STDERR from app otr2_cxt_0 - msg: INFO OML Client V2.9.0 [Protocol V3] Copyright 2007-2012, NICTA 18:15:56 INFO OmfEc: APP_EVENT STDERR from app otg2_cxt_0 - msg: INFO Net_stream: attempting to connect to server at tcp://norbit.npc.nicta.com.au:3003 18:15:56 INFO OmfEc: APP_EVENT STDERR from app otr2_cxt_0 - msg: INFO Net_stream: attempting to connect to server at tcp://norbit.npc.nicta.com.au:3003 - 18:16:22 INFO Object: All my Applications are stopped now. + 18:16:22 INFO Object: Applications are stopping... Experiment Complete. 18:16:22 INFO OmfEc: Exit in up to 15 seconds... 18:16:22 INFO OmfEc: APP_EVENT DONE.OK from app otr2_cxt_0 - msg: status: pid 1469 exit 0 18:16:22 INFO OmfEc: APP_EVENT DONE.OK from app otg2_cxt_0 - msg: status: pid 1705 exit 0 @@ -486,7 +485,7 @@ similar to this: 18:16:37 INFO XMPP::Communicator: Disconnecting ... The above screen output was obtained when running the EC on the NICTA testbed, -with the experiment described in {file:doc/tutorials/tutorial01.rb tutorial01.rb} +with the experiment described in {file:doc/tutorials/experiment02.rb experiment02.rb} and using the resources named 'omf.nicta.node9' and 'omf.nicta.node10'. ### 4c) What does that screen output mean? @@ -540,9 +539,9 @@ results/outputs: ... 18:15:42 INFO OmfEc: Event triggered: 'ALL_UP_AND_INSTALLED' - 18:15:42 INFO Object: This is my first OMF experiment + 18:15:42 INFO Object: Starting WiFi OMF6 Experiment events 18:15:42 INFO OmfEc: Newly discovered resource >> 4b8644d3-9a45-4091-a147-651c55f4f15b - 18:15:52 INFO Object: All my Applications are started now... + 18:15:52 INFO Object: All Applications have started... 18:15:52 INFO OmfEc: APP_EVENT STARTED from app otg2_cxt_0 - msg: env -i /usr/bin/otg2 --udp:dst_host 192.168.0.3 --udp:dst_port 3000 --udp:local_host 192.168.0.2 --oml-config /tmp/65e5bf73-4085-4d46-b790-2c2e4b719b70-1366272953.xml 18:15:53 INFO OmfEc: APP_EVENT STARTED from app otr2_cxt_0 - msg: env -i /usr/bin/otr2 --udp:local_host 192.168.0.3 --udp:local_port 3000 --oml-config /tmp/bb4c0edf-7167-4c64-9cbe-c9681332749f-1366272953.xml 18:15:53 INFO OmfEc: APP_EVENT STDERR from app otr2_cxt_0 - msg: INFO OTG2 Traffic Sink 2.9.0-dirty @@ -551,7 +550,7 @@ results/outputs: 18:15:54 INFO OmfEc: APP_EVENT STDERR from app otr2_cxt_0 - msg: INFO OML Client V2.9.0 [Protocol V3] Copyright 2007-2012, NICTA 18:15:56 INFO OmfEc: APP_EVENT STDERR from app otg2_cxt_0 - msg: INFO Net_stream: attempting to connect to server at tcp://norbit.npc.nicta.com.au:3003 18:15:56 INFO OmfEc: APP_EVENT STDERR from app otr2_cxt_0 - msg: INFO Net_stream: attempting to connect to server at tcp://norbit.npc.nicta.com.au:3003 - 18:16:22 INFO Object: All my Applications are stopped now. + 18:16:22 INFO Object: Applications are stopping... Experiment Complete. 18:16:22 INFO OmfEc: Exit in up to 15 seconds... 18:16:22 INFO OmfEc: APP_EVENT DONE.OK from app otr2_cxt_0 - msg: status: pid 1469 exit 0 18:16:22 INFO OmfEc: APP_EVENT DONE.OK from app otg2_cxt_0 - msg: status: pid 1705 exit 0 From ab1ebd6b68770fe4e0f8d3cd300c4dd8945d5406 Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 23:22:51 +1000 Subject: [PATCH 42/44] Experiment Tutorial complete and optimised for YARD --- doc/tutorials/Experiment02.mkd | 4 +- doc/tutorials/Experiment03.mkd | 233 ++++++++++++++++----------------- doc/tutorials/experiment03.rb | 2 +- 3 files changed, 118 insertions(+), 121 deletions(-) diff --git a/doc/tutorials/Experiment02.mkd b/doc/tutorials/Experiment02.mkd index 02ecec7e..e35e9015 100644 --- a/doc/tutorials/Experiment02.mkd +++ b/doc/tutorials/Experiment02.mkd @@ -1,6 +1,6 @@ # Experiment 02 -1. “Hello World” Wireless *Experiment Tutorial* +2. “Hello World” Wireless *Experiment Tutorial* --------------------------- This simple tutorial presents all the basic steps to develop, run, and @@ -108,7 +108,7 @@ This tutorial assumes the latter, i.e. you have installed an EC on your machine and will use it to orchestrate your experiment -3. Developing the “Hello World” Experiment +3. Developing the Experiment Description (ED) ------------------------------------------------------ To run an experiment with OMF, you first need to describe it into an diff --git a/doc/tutorials/Experiment03.mkd b/doc/tutorials/Experiment03.mkd index 926060c8..fcc0a753 100644 --- a/doc/tutorials/Experiment03.mkd +++ b/doc/tutorials/Experiment03.mkd @@ -1,20 +1,19 @@ -TUTORIAL # Experiment 03 -How to pass parameters to your experiment and change them at run-time -===================================================================== +3. Dynamic Properties *Experiment Tutorial* +--------------------------- -1. Prerequisites ----------------- +If you are a new OMF user (i.e. an experimenter), you may want to read +the [OMF sytem overview] +(http://omf.mytestbed.net/projects/omf/wiki/An_Introduction_to_OMF) +or the [experimenter overview] +(http://omf.mytestbed.net/projects/omf/wiki/UsageOverview) +pages -- Make sure that you understand [[An\_Introduction\_to\_OMF|how OMF - works from a user’s point of view]]. -- Make sure that you have completed and understood the - [[BasicTutorialStage0-5-4|basic “Hello World” tutorial]]. +**Objectives** -2. Goal -------- +After reading this tutorial you should be able to: - This tutorial shows you how to define and use Experiment Properties within your experiment. @@ -25,11 +24,10 @@ How to pass parameters to your experiment and change them at run-time - change values of these parameters dynamically, while your experiment is running -3. Scenario ------------ -- Here we are using the same simple scenario as in the - [[BasicTutorialStage0-5-4|basic “Hello World” tutorial]]. +**Experiment Scenario** + +- Here we are using the same simple scenario as in Experiment02. - We will modify this example, to allow us to: - define some of the attributes of this experiment as parameters, @@ -37,11 +35,68 @@ How to pass parameters to your experiment and change them at run-time - assign values to these *properties* - change these values at runtime, i.e. while the experiment is running + + +2. Prerequisites +-------------------------------------------------------------- +### 2a) Accessing/Provisioning Resources + +This tutorial assumes that you are using OMF-enabled resources with WLAN interfaces, which are +provided by either a NICTA or ORBIT testbed. This section briefly describes +the steps to reserve and provision resources on these testbeds. + +You can complete this tutorial with OMF-enabled resources which are provided +by other testbeds. In such a case, please refer to these testbeds' specific +documentation for instructions on how to reserve/provision their resources with OMF. + +Alternatively you may also decide to install OMF on your own testbed, if +so then please follow the instructions for testbed operators on our +{file:doc/INSTALLATION.mkd OMF 6 Installation Guide}. Remember to install 802.11g compatible +wireless cards (we use cards that support the ath5k or ath9k driver). + +**Accessing Resources at NICTA/ORBIT** + +- Are you using a testbed at NICTA? Please refer to the +[OMF at NICTA Getting Started page] +(http://mytestbed.net/projects/omf/wiki/OMFatNICTA) +- Are you using a testbed at ORBIT? Please refer to the +[OMF at ORBIT Getting Started page] +(http://mytestbed.net/projects/omf/wiki/OMFatWINLAB) + +**Provisioning Resources at NICTA/ORBIT** + +The current version of OMF 6 does not yet have a complete process in place +to provision a PC-type resource at NICTA or ORBIT. Such feature will be added +in the next release. Provisioning in the context of PC-type resources at NICTA +and ORBIT means having a specific user disk image loaded on the resource. + +In the meantime, please use the method described on +[the OMF 5.4 imaging page] +(http://mytestbed.net/projects/omf54/wiki/BasicTutorialStage7-5-4) +for instruction on how to provision/image resources at NICTA or ORBIT. + +Using these instructions, make sure that you load a disk image onto your resources +that contains OMF 6 (normally the latest baseline.ndz image will do). + +### 2b) Installing the Experiment Controller + + +The OMF Experiment Controller (EC) is the software that will interpret +your Experiment Description (ED) and interact with the resources to +execute it accordingly. You can either: + +- use a pre-installed EC on the consoles of any NICTA or ORBIT testbeds +- or install your own EC on your machine, by following the instructions +for users on our {file:doc/INSTALLATION.mkd OMF 6 Installation Guide} + +This tutorial assumes the latter, i.e. you have installed an EC on your +machine and will use it to orchestrate your experiment + -4. The New “Hello World” Experiment Description +3. Developing the Experiment Description (ED) ----------------------------------------------- -The Experiment Description (ED) describing this simple experiment is: +The ED describing this simple “Hello World” wireless experiment is {file:doc/tutorials/experiment02.rb experiment03.rb}:
    
 #Welcome to the Dynamic Properties ED
@@ -98,7 +153,7 @@ defProperty('bitrate', 2048, "Bitrate (bit/s) from the sender node")
 defProperty('runtime', 40, "Time in second for the experiment is to run")
 defProperty('wifiType', "g", "The type of WIFI to use in this experiment")
 defProperty('channel', '6', "The WIFI channel to use in this experiment")
-defProperty('netid', "example2", "The ESSID to use in this experiment")
+defProperty('netid', "Hello World! Experiment03", "The ESSID to use in this experiment")
 
 ###############################################################################################
 ###############################################################################################
@@ -177,51 +232,12 @@ end
 
 
-This ED is available for download here: attachment:dynamic-properties.rb -- **Line 1-8**: define 8 Experiment Properties, i.e. parameters to the - experiment, and set their default values and descriptions - - Line 1: defines a property named `theSender`, which has a - default value `omf.nicta.node1`. This parameter represents the - ID of the node to use as a sender in “Hello World”. - - Line 3: defines the `packetsize` property, which has a default - integer value `128`. It represents the packet size in bytes - which the sender in “Hello World” will use to generates its UDP - traffic. - - Line 7: we define the `channel` property, which as a default - string value `6`, i.e. the 802.11 channel to use in “Hello - World” - - etc… -5. Running the experiment +4. Running the experiment ------------------------- -### 5.1. How to run it - -Please refer to the [[BasicTutorialStage0-5-4|basic “Hello World” -tutorial]] and the [[GettingStarted|Getting Started page]] to find out -how to run an experiment with OMF. Here we assume that you have the -above ED saved in the file named `dynamic-properties.rb`. - -\* if you want to run the experiment using the default values for all -the properties (as defined in line 1-8):\ - - omf- exec dynamic-properties.rb - -\* if you want to pass your own initial values to some of the -experiment’s properties via the command line:\ - - omf- exec dynamic_properties.rb -- --theSender omf.nicta.node9 --theReceiver omf.nicta.node10 - - # OR - - omf- exec dynamic_properties.rb -- --runtime 80 --bitrate 1024 - - # ETC... - -### 5.2. What you should see on the console: - - You should see an output similar to the following: @@ -243,17 +259,17 @@ experiment’s properties via the command line:\ INFO property.runtime: runtime = 40 (Fixnum) INFO property.wifiType: wifiType = "g" (String) INFO property.channel: channel = "6" (String) - INFO property.netid: netid = "example2" (String) + INFO property.netid: netid = "Hello World! Experiment03" (String) INFO Topology: Loading topology 'omf.nicta.node9'. INFO Topology: Loading topology 'omf.nicta.node10'. INFO Experiment: Switching ON resources which are OFF INFO omf.nicta.node9: Device 'net/w0' reported Not-Associated INFO ALL_UP_AND_INSTALLED: Event triggered. Starting the associated tasks. - INFO exp: This is my first OMF experiment + INFO exp: Starting dynamic properties ED... INFO exp: Request from Experiment Script: Wait for 10s.... INFO omf.nicta.node10: Device 'net/w0' reported Not-Associated INFO omf.nicta.node9: Device 'net/w0' reported 46:32:28:8A:DA:DD - INFO exp: All my Applications are started now... + INFO exp: Applications have started... INFO exp: Request from Experiment Script: Wait for 10s.... INFO omf.nicta.node10: Device 'net/w0' reported 46:32:28:8A:DA:DD INFO property.packetsize: packetsize = 256 (Fixnum) @@ -262,7 +278,7 @@ experiment’s properties via the command line:\ INFO exp: Request from Experiment Script: Wait for 10s.... INFO property.packetsize: packetsize = 1024 (Fixnum) INFO exp: Request from Experiment Script: Wait for 10s.... - INFO exp: All my Applications are stopped now. + INFO exp: Applications are stopping... Experiment complete. INFO EXPERIMENT_DONE: Event triggered. Starting the associated tasks. INFO NodeHandler: INFO NodeHandler: Shutting down experiment, please wait... @@ -270,76 +286,57 @@ experiment’s properties via the command line:\ INFO run: Experiment default_slice-2013-03-06t16.52.50+11.00 finished after 1:3
-6. The Results +5. The Results -------------- -- Please refer to the [[BasicTutorialStage0-5-4|“Hello World” - tutorial]] to find out how to access and use your result database - - you can download an example of a database produced by this - experiment here: attachment:myDatabase - -- Following the same example as in the - [[BasicTutorialStage0-5-4|“Hello World” tutorial]], where you can - configure and run visualisation server for this experiment +During the execution of the experiment, the OTG and OTR applications +have collected some measurements, as we requested them to do, and sent them to +the OML2 server that we selected (the --oml-uri option of the EC command line). -- To create a new widget to show packet size variation, simple add - following to the config yaml file. +### How do you access the measurements? -
- \
-- name: Incoming UDP packet size \
-type: line\_chart \
-data: otg2\_udp\_out \
-mapping: \
-x: oml\_seq \
-y: pkt\_length \
-group\_by: oml\_sender\_id
+This depends on how the OML2 server which received your measurements is set up. It can be
+configured to use either a SQLite3 or a PostgreSQL database backend, moreover additional tools
+may have been put in place by your testbed operator to facilitate the access to the result database.
 
-
-
-
-- Once visualisation server started, the widget we just defined should - look like this: +For a detailed description of OML2 server's configuration modes, please +refer to [the OML2 Documentation](http://mytestbed.net/projects/oml/wiki) -![](/attachments/613/dynamic_properties.png) ![]() +Here is a short example on how you would access your data on the NICTA testbed: -- On this graph, we can see the packet size of the incoming UDP - traffic increasing in steps every 10 sec during our 40-sec - experiment. +- assuming that the OML2 server was running on the host 'my_oml.com' and was configured to use SQLite3 and stores the result databases in `/var/lib/oml2/` +- first you need to get access to a console on that host, assuming you have an account 'foo' with the password 'bar': -7. What is Next? ----------------- + ssh foo@my_oml.com # then enter the password 'bar' -Now that you know how to use Experiment Properties, you may want to read -the following basic OMF tutorials. Each one of them is introducing an -OMF feature, using the simple “Hello World” experiment as a base. You do -not need to follow them in the order suggested below. +- then you use the sqlite3 command to dump your experiment database, which +is in the file `/var/lib/oml2/your_experiment_id.sq3`. Thus assuming the experiment ID above +(2013-03-06t16.52.50+11.00): -- [[BasicTutorialStage0-5-4|How to describe and run a simple wireless - experiment]] - ([[BasicTutorialStage0-5-4|wired version]]) + sqlite3 /var/lib/oml2/2013-03-06t16.52.50+11.00.sq3 .dump -- [[BasicTutorialStage1-5-4|How to pass parameters to your experiment, - and change them at run-time]] +This will dump the database contents in SQL format to the console. For more information on SQLite3, please refer to its [documentation website] +(http://www.sqlite.org/docs.html) -- [[BasicTutorialStage2-5-3|How to configure or address all resources - within a defined group, and use simple substitutions]] +### How do I display my measurements in some nice graphs? -- [[BasicTutorialStage3-5-3|How to use your own or a 3rd party - application with OMF]] +We have a separate tool named [**omf_web**] +(https://github.com/mytestbed/omf_web) which allows you to build +some custom visualisation of the data collected within your experiment and +display them within your web browser. For more information on how to +use that tool, please refer to the [omf_web documentation] +(https://github.com/mytestbed/omf_web) -- [[BasicTutorialStage4-5-3|How to use Measurement Filters to - customise your Measurement]] - -- [[BasicTutorialStage5-5-3|How to use Prototypes to specify - particular Applications]] - -- [[BasicTutorialStage6-5-3|How to save a disk image]] - -- [[BasicTutorialStage7-5-3|How to load a disk image]] +6. What should I do next? +------------------------- -And finally, a “Conference Room” scenario which combines all of the -above features: +We will soon release more tutorials on how to use all the features of OMF6 +from the experimenter's perspective. -- [[BasicTutorialStage8-5-3|The Conference Room tutorial]] +In the meantime, you may have a look at the OMF 5.4 documentation, which +will not be completely accurate and applicable to OMF 6, but would still give you +some ideas of the OMF features available for experimenters. -* * * * * +Finally, if you have any questions on how to use OMF 6 or any problems running +this 'Hello World' wireless tutorial, please join the [OMF Mailing List] +(https://lists.nicta.com.au/wws/info/omf-user) and post your questions there. \ No newline at end of file diff --git a/doc/tutorials/experiment03.rb b/doc/tutorials/experiment03.rb index 55816408..3763cfc2 100644 --- a/doc/tutorials/experiment03.rb +++ b/doc/tutorials/experiment03.rb @@ -52,7 +52,7 @@ defProperty('runtime', 40, "Time in second for the experiment is to run") defProperty('wifiType', "g", "The type of WIFI to use in this experiment") defProperty('channel', '6', "The WIFI channel to use in this experiment") -defProperty('netid', "example2", "The ESSID to use in this experiment") +defProperty('netid', "Hello World! Experiment03", "The ESSID to use in this experiment") ############################################################################################### ############################################################################################### From c5e3ea910170b6a14a05b66d3eac0644a6fcd80b Mon Sep 17 00:00:00 2001 From: mitchmusarra Date: Thu, 20 Jun 2013 23:24:58 +1000 Subject: [PATCH 43/44] Experiment Tutorial complete --- doc/tutorials/Experiment03.mkd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/tutorials/Experiment03.mkd b/doc/tutorials/Experiment03.mkd index fcc0a753..23a271df 100644 --- a/doc/tutorials/Experiment03.mkd +++ b/doc/tutorials/Experiment03.mkd @@ -27,7 +27,7 @@ After reading this tutorial you should be able to: **Experiment Scenario** -- Here we are using the same simple scenario as in Experiment02. +- Here we are using the same simple scenario as in {file:doc/tutorials/experiment03.rb Experiment02.mkd} - We will modify this example, to allow us to: - define some of the attributes of this experiment as parameters, @@ -96,7 +96,7 @@ machine and will use it to orchestrate your experiment 3. Developing the Experiment Description (ED) ----------------------------------------------- -The ED describing this simple “Hello World” wireless experiment is {file:doc/tutorials/experiment02.rb experiment03.rb}: +The ED describing this simple “Hello World” wireless experiment is {file:doc/tutorials/experiment03.rb experiment03.rb}:
    
 #Welcome to the Dynamic Properties ED

From d69f2aadc2496e9080ab4d024be2bcb191c0bff0 Mon Sep 17 00:00:00 2001
From: mitchmusarra 
Date: Fri, 21 Jun 2013 12:36:26 +1000
Subject: [PATCH 44/44] Experiment Tutorials 1-3 Complete and optimised for
 YARD

---
 doc/tutorials/Experiment01.mkd                |  6 +++---
 ...xperiment04.mkd => Experiment04.mkd.draft} |  0
 ...xperiment05.mkd => Experiment05.mkd.draft} |  0
 ...xperiment06.mkd => Experiment06.mkd.draft} |  0
 ...xperiment07.mkd => Experiment07.mkd.draft} |  0
 ...xperiment08.mkd => Experiment08.mkd.draft} |  0
 doc/tutorials/Experiment_Index.mkd            | 19 +++++++++++++++++--
 7 files changed, 20 insertions(+), 5 deletions(-)
 rename doc/tutorials/{Experiment04.mkd => Experiment04.mkd.draft} (100%)
 rename doc/tutorials/{Experiment05.mkd => Experiment05.mkd.draft} (100%)
 rename doc/tutorials/{Experiment06.mkd => Experiment06.mkd.draft} (100%)
 rename doc/tutorials/{Experiment07.mkd => Experiment07.mkd.draft} (100%)
 rename doc/tutorials/{Experiment08.mkd => Experiment08.mkd.draft} (100%)

diff --git a/doc/tutorials/Experiment01.mkd b/doc/tutorials/Experiment01.mkd
index cd371605..5194836f 100644
--- a/doc/tutorials/Experiment01.mkd
+++ b/doc/tutorials/Experiment01.mkd
@@ -311,7 +311,7 @@ triggered
 For example, your experiment might involve 2 events:
 
 - 'when my PC node is ready' and
-- 'when my application has finished running'. You would then a
+- 'when my application has finished running'.
 
 You would then associate the following tasks to each of these events:
 
@@ -380,7 +380,7 @@ then to run your experiment you have to:
 - open a terminal and navigate to the folder/directory where you saved that file
 - start the EC software and tell it to execute the experiment described in your ED file, using the command line:
 
-        omf_ec -u xmpp://usr:pwd@my_xmpp.com exec --oml_uri tcp:srv:port tutorial00.rb
+        omf_ec -u xmpp://usr:pwd@my_xmpp.com exec --oml_uri tcp:srv:port experiment01.rb
 
   - **replace** *xmpp://usr:pwd@srv* with the credentials for your user on the
   xmpp pubsub server that is used to communicate with the resources
@@ -393,7 +393,7 @@ furthermore want to use the OML2 server with hostname 'my_oml.com at port
 3003 to collect the measurement of your experiment, then you would use the
 command:
 
-        omf_ec -u xmpp://foo:bar@my_xmpp.com exec --oml_uri tcp:my_oml.com:3003 tutorial00.rb
+        omf_ec -u xmpp://foo:bar@my_xmpp.com exec --oml_uri tcp:my_oml.com:3003 experiment01.rb
 
 If you would like to know more about the other options of the OMF EC software
 please run the commands:
diff --git a/doc/tutorials/Experiment04.mkd b/doc/tutorials/Experiment04.mkd.draft
similarity index 100%
rename from doc/tutorials/Experiment04.mkd
rename to doc/tutorials/Experiment04.mkd.draft
diff --git a/doc/tutorials/Experiment05.mkd b/doc/tutorials/Experiment05.mkd.draft
similarity index 100%
rename from doc/tutorials/Experiment05.mkd
rename to doc/tutorials/Experiment05.mkd.draft
diff --git a/doc/tutorials/Experiment06.mkd b/doc/tutorials/Experiment06.mkd.draft
similarity index 100%
rename from doc/tutorials/Experiment06.mkd
rename to doc/tutorials/Experiment06.mkd.draft
diff --git a/doc/tutorials/Experiment07.mkd b/doc/tutorials/Experiment07.mkd.draft
similarity index 100%
rename from doc/tutorials/Experiment07.mkd
rename to doc/tutorials/Experiment07.mkd.draft
diff --git a/doc/tutorials/Experiment08.mkd b/doc/tutorials/Experiment08.mkd.draft
similarity index 100%
rename from doc/tutorials/Experiment08.mkd
rename to doc/tutorials/Experiment08.mkd.draft
diff --git a/doc/tutorials/Experiment_Index.mkd b/doc/tutorials/Experiment_Index.mkd
index 31398cbe..dd35f29e 100644
--- a/doc/tutorials/Experiment_Index.mkd
+++ b/doc/tutorials/Experiment_Index.mkd
@@ -1,5 +1,20 @@
 # Tutorials
 
-{file:doc/tutorials/TUTORIAL_00.mkd Tutorial 00}
+{file:doc/tutorials/Experiment01.mkd Experiment 01}
+
+{file:doc/tutorials/Experiment02.mkd Experiment 02}
+
+{file:doc/tutorials/Experiment03.mkd Experiment 03}
+
+---------------------------
+
+*{file:doc/tutorials/Experiment04.mkd Experiment 04}*
+
+*{file:doc/tutorials/Experiment05.mkd Experiment 05}*
+
+*{file:doc/tutorials/Experiment06.mkd Experiment 06}*
+
+*{file:doc/tutorials/Experiment07.mkd Experiment 07}*
+
+*{file:doc/tutorials/Experiment08.mkd Experiment 08}*
 
-{file:doc/tutorials/TUTORIAL_01.mkd Tutorial 01}