Changes between Version 3 and Version 4 of Old/Documentation/OTG/ScriptsRepository/ExpUDP3colocatedto1


Ignore:
Timestamp:
Sep 30, 2005, 4:01:00 AM (19 years ago)
Author:
zhibinwu
Comment:

Legend:

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

    v3 v4  
    1010defNodes('sender1', [1,2]) {|node|
    1111  node.image = nil  # assume the right image to be on disk
    12   node.prototype("test:proto:sender", {
    13     'destinationHost' => '192.168.1.1',
    14     'packetSize' => 1024,
    15     'port' => 3001,
    16     'rate' => 300,
    17     'protocol' => 'udp'
    18   })
    19   node.prototype("test:proto:sender", {
    20     'destinationHost' => '192.168.1.1',
    21     'packetSize' => 1024,
    22     'port' => 3002,
    23     'rate' => 300,
    24     'protocol' => 'udp'
    25   })
    26   node.prototype("test:proto:sender", {
    27     'destinationHost' => '192.168.1.1',
    28     'packetSize' => 1024,
    29     'port' => 3003,
    30     'rate' => 300,
    31     'protocol' => 'udp'
    32   })
    33   node.net.w0.mode = "master"
    34 }
     12    node.prototype("test:proto:colocate_sender", {
     13     'destinationHost' => '192.168.1.1',
     14     'packetSize' => 1024,
     15     'port1' => 3001,
     16     'port2' => 3002,
     17     'port3' => 3004,
     18     'rate' => 300,
     19     'protocol' => 'udp'
     20            })
     21        node.net.w0.mode = "master"
     22    }
    3523
    36 defNodes('receiver', [1,1]) {|node|
    37   node.image = nil  # assume the right image to be on disk
    38   node.prototype("test:proto:receiver" , {
    39     'protocol' => 'udp'
    40   })
    41   node.net.w0.mode = "managed"
    42 }
     24 defNodes('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   }
    4331
    44 allNodes.net.w0 { |w|
     32 allNodes.net.w0 { |w|
    4533  w.type = 'b'
    4634  w.essid = "helloworld"
    4735  w.ip = "%192.168.%x.%y"
    48 }
     36 }
    4937
    50 #
    51 # Now, start the application
    52 #
    53 whenAllInstalled() {|node|
    54   wait 30
     38  #
     39  # Now, start the application
     40  #
     41                                  whenAllInstalled() {|node|
     42                                        wait 30
     43                                 allNodes.startApplications
     44                                         wait 60
     45       Experiment.done
    5546
    56   allNodes.startApplications
    57   wait 40
     47 }
    5848
    59   Experiment.done
    60 
    61 }
    6249}}}