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


Ignore:
Timestamp:
Sep 26, 2005, 6:09:34 PM (19 years ago)
Author:
zhibinwu
Comment:

Legend:

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

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