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


Ignore:
Timestamp:
Oct 13, 2005, 3:30:53 PM (19 years ago)
Author:
zhibinwu
Comment:

Legend:

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

    v1 v1  
     1[wiki:WikiStart Orbit] > [wiki:OTG OTG] > [wiki:OTG/ScriptsRepository Scripts Repository] > UDP/TCP with Libmac support
     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_libmac',
     27    'hostname' => '192.168.1.1'
     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 90
     43
     44 allNodes.startApplications
     45  wait 40
     46
     47  Experiment.done
     48}
     49
     50
     51}}}