Changes between Initial Version and Version 1 of Documentation/OtherApps/DITG/ExpScript


Ignore:
Timestamp:
Sep 5, 2006, 9:57:13 PM (18 years ago)
Author:
Surya Satyavolu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/OtherApps/DITG/ExpScript

    v1 v1  
     1{{{
     2############# Tutorial1 ##################################
     3# This script defines the experiment
     4# that has one sender and one receiver
     5# Sender, Receiver - 802.11g
     6# UDP flow offered load = 1 Mbps
     7# Receiver reports throughput, packet loss,avg. delay and jitter
     8# Traffic Generator is D-ITG
     9############################################################
     10
     11Experiment.name = "tutorial-itg"
     12Experiment.project = "orbit:tutorial"
     13
     14#
     15# Define nodes used in experiment
     16###########################################
     17# Receiver definition and configuration
     18##########################################
     19
     20defNodes('receiver', [1,2]) {|node|
     21  node.image = nil  # assume the right image to be on disk
     22  node.prototype("test:proto:itgreceiver", {
     23    'logfile' => "/tmp/res"
     24    }
     25)
     26  node.net.w0.ip = "%192.168.%x.%y"
     27  node.net.w0.mode = "master"
     28  node.net.w0.type = 'b'
     29  node.net.w0.essid = "helloworld"
     30}
     31###########################################
     32# Decoder definition and configuration
     33# Note that we need a decoder to extract
     34# information from the binary file and print
     35###########################################
     36defNodes('decoder' , [1,2]) {|node|
     37  node.image = nil  # assume the right image to be on disk
     38  node.prototype("test:proto:itgdecoder", {
     39    'logfile' => "/tmp/res",
     40    'tput_report_interval' => 1000,
     41    'delay_report_interval' => 1000,
     42    'loss_report_interval' => 1000,
     43    'jitter_report_interval' => 1000
     44    }
     45)
     46}
     47# Sender definition and configuration
     48###########################################
     49defNodes('sender', [1,1]) {|node|
     50  node.image = nil  # assume the right image to be on disk
     51  # use prototype "sender"
     52  # and set it's property "destinationHost" to
     53  # the receiver node
     54  # and bind the remaining properties to the
     55  # experiment property space
     56  node.prototype("test:proto:itgcbrsender", {
     57    'destinationHost' => '192.168.1.2',
     58    'meter' => 'owdm',          #One way delay
     59    'protocol' => 'udp',        #UDP client
     60    'constsize' => 1024,        #Const payload size (bytes)
     61    'constrate' => 10,         #packets per second
     62    'duration' => 60000,        #Expt duration (msec)
     63    'gen_delay' => 10000,
     64    'recv_port' => 8000
     65  })
     66  node.net.w0.ip = "%192.168.%x.%y"
     67  node.net.w0.mode = "managed"
     68  node.net.w0.type = 'b'
     69  node.net.w0.essid = "helloworld"
     70
     71}
     72
     73###########################################
     74#  When nodeAgents have reported "OK" to
     75# the nodeHandler start the application
     76###########################################
     77whenAllInstalled() {
     78
     79  wait 20
     80  NodeSet['receiver'].startApplications
     81  ###Need to separate receiver and sender start
     82  # Receiver opens a TCP port for sending control
     83  # information, sender binds to that port. Sleep is
     84  # to ensure that receiver is definitely up before
     85  # the sender
     86  wait 20
     87  ###
     88  NodeSet['sender'].startApplications
     89
     90
     91  wait 300
     92  NodeSet['decoder'].startApplications
     93 wait 10
     94###########################################
     95# Shutdown nodes
     96###########################################
     97 Experiment.done
     98
     99}
     100
     101
     102}}}