wiki:Old/Documentation/OTG/ScriptsRepository/ExpRAW1

Orbit > OTG > Scripts Repository > RAW Socket

Experiment.name = "tutorial-1g"
Experiment.project = "orbit:tutorial"
#
# Define nodes used in experiment
#
defNodes('sender', [1,2]) {|node|
  node.image = nil  # assume the right image to be on disk
  node.prototype("test:proto:raw_sender", {
        'destinationMAC' =>'00:60:B3:AC:2B:9E',
        'txdev'=>'ath0',
        'packetSize' => 1024,
        'rate' => 300
      })
       node.net.w0.mode = "master"
}

defNodes('receiver', [1,1]) {|node|
  node.image = nil  # assume the right image to be on disk
    node.prototype("test:proto:raw_receiver" , {
        'rxdev' => 'ath0',
        'protocol' => 'raw'
      })
  node.net.w0.mode = "managed"
}

  allNodes.net.w0 { |w|
        w.type = 'b'
        w.essid = "helloworld"
        w.ip = "%192.168.%x.%y"
  }

  #
  # Now, start the application
  #
 whenAllInstalled() {|node|
      wait 30
      allNodes.startApplications
      wait 40

     Experiment.done

}


Last modified 18 years ago Last modified on Feb 27, 2006, 8:50:08 PM
Note: See TracWiki for help on using the wiki.