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


Ignore:
Timestamp:
Sep 29, 2005, 4:38:32 PM (19 years ago)
Author:
zhibinwu
Comment:

Legend:

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

    v1 v1  
     1[wiki:WikiStart Orbit] > [wiki:OTG OTG] > [wiki:OTG/ScriptsRepository Scripts Repository] > Start 3 UDP sessions in the same node
     2
     3{{{
     4Experiment.name = "tutorial-1d"
     5Experiment.project = "orbit:tutorial"
     6
     7#
     8# Define nodes used in experiment
     9#
     10defNodes('sender1', [1,2]) {|node|
     11  node.image = nil  # assume the right image to be on disk
     12
     13  node.prototype("test:proto:sender", {
     14    'destinationHost' => '192.168.1.1',
     15    'packetSize' => 1024,
     16    'port' => 3001,
     17    'rate' => 300,
     18    'protocol' => 'udp'
     19  })
     20  node.net.w0.mode = "master"
     21}
     22
     23defNodes('sender2', [1,2]) {|node|
     24  node.image = nil  # assume the right image to be on disk
     25
     26  node.prototype("test:proto:sender", {
     27    'destinationHost' => '192.168.1.1',
     28    'packetSize' => 1024,
     29    'port' => 3002,
     30    'rate' => 300,
     31    'protocol' => 'udp'
     32  })
     33  node.net.w0.mode = "master"
     34}
     35
     36defNodes('sender3', [1,2]) {|node|
     37  node.image = nil  # assume the right image to be on disk
     38
     39  node.prototype("test:proto:sender", {
     40    'destinationHost' => '192.168.1.1',
     41    'packetSize' => 1024,
     42    'port' => 3003,
     43    'rate' => 300,
     44    'protocol' => 'udp'
     45  })
     46  node.net.w0.mode = "master"
     47}
     48
     49defNodes('receiver', [1,1]) {|node|
     50  node.image = nil  # assume the right image to be on disk
     51  node.prototype("test:proto:receiver" , {
     52    'protocol' => 'udp'
     53  })
     54  node.net.w0.mode = "managed"
     55}
     56
     57allNodes.net.w0 { |w|
     58  w.type = 'b'
     59  w.essid = "helloworld"
     60  w.ip = "%192.168.%x.%y"
     61}
     62
     63#
     64# Now, start the application
     65#
     66whenAllInstalled() {|node|
     67  wait 30
     68
     69  allNodes.startApplications
     70  wait 40
     71
     72  Experiment.done
     73
     74
     75}}}