{{{ ################################################## # AODV with OTG # Every node has two prototypes: sender/receiver and AODV # AODV rt table logs are reported every 4 secs on the nodes to # /var/log/aodv.rtlog # These will soon be OMLized to report to the database instead ################################################## Experiment.name = "tutorial-aodv" 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:sender", { 'destinationHost' => '192.168.1.1', 'packetSize' => 1024, 'rate' => 300, 'protocol' => 'udp' }) 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:receiver" , { 'hostname' => '192.168.1.1', 'protocol' => 'udp_libmac' }) node.net.w0.mode = "managed" } defNodes('everyone',[[1,1],[1,2]]) {|node| node.image = nil node.prototype("test:proto:aodvrouter", { 'interface' => 'ath0', #Run aodvd on interface ath0 'log' => nil, #Enable logging 'routelog' => 4 #Enable routing table logging every 4 secs }) } allNodes.net.w0 { |w| w.type = 'b' w.essid = "helloworld" w.ip = "%192.168.%x.%y" } # # Now, start the application # whenAllInstalled() {|node| #First start AODV daemon on all nodes NodeSet['everyone'].startApplications wait 10 #Then start receiver and sender NodeSet['receiver'].startApplications wait 30 NodeSet['sender'].startApplications wait 180 Experiment.done } }}} == For Developers == The application definition and prototype definitions corresponding to AODV router are as follows == Application definition == {{{ # # Create an application representation from scratch # require 'handler/appDefinition' a = AppDefinition.create('test:app:aodvd') a.name = "aodvd" a.version(0, 0, 1) a.shortDescription = "AODV routing protocol" a.description = <