Changes between Initial Version and Version 1 of Old/Documentation/OTG/ScriptsRepository/ExpUDP2


Ignore:
Timestamp:
Oct 3, 2005, 9:36:01 PM (19 years ago)
Author:
zhibinwu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Old/Documentation/OTG/ScriptsRepository/ExpUDP2

    v1 v1  
     1[wiki:WikiStart Orbit] > [wiki:OTG OTG] > [wiki:OTG/ScriptsRepository Scripts Repository] > UDP/TCP Unicast with Expoo generator
     2
     3{{{
     4
     5Experiment.name = "tutorial-1f"
     6Experiment.project = "orbit:tutorial"
     7#
     8# Define nodes used in experiment
     9#
     10defNodes('sender', [1,2]) {|node|
     11  node.image = nil  # assume the right image to be on disk
     12
     13  node.prototype("test:proto:expoo_sender", {
     14    'destinationHost' => '192.168.1.1',
     15    'packetSize' => 1024,
     16    'rate' => 300,
     17    'ontime' => 0.2,
     18    'offtime' => 0.2,
     19    'protocol' => 'udp'
     20  })
     21  node.net.w0.mode = "master"
     22}
     23
     24defNodes('receiver', [1,1]) {|node|
     25  node.image = nil  # assume the right image to be on disk
     26  node.prototype("test:proto:receiver" , {
     27    'protocol' => 'udp'
     28  })
     29  node.net.w0.mode = "managed"
     30}
     31
     32allNodes.net.w0 { |w|
     33  w.type = 'b'
     34  w.essid = "helloworld"
     35  w.ip = "%192.168.%x.%y"
     36}
     37
     38#
     39# Now, start the application
     40#
     41whenAllInstalled() {|node|
     42  wait 30
     43
     44  allNodes.startApplications
     45  wait 40
     46
     47  Experiment.done
     48}
     49}}}