Changes between Version 4 and Version 5 of GEC16Agenda/WiMAX-Tutorial/Coop/05


Ignore:
Timestamp:
07/22/13 21:17:07 (6 years ago)
Author:
Fraida Fund
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC16Agenda/WiMAX-Tutorial/Coop/05

    v4 v5  
    2222property.nodeList.value.split(",").each do |i|
    2323  defGroup("Receiver#{i}", "#{property.hrnPrefix}#{i}") do |node|
    24 
    25 groupList = []
    26 res = eval(property.sender.value)
    27 groupNumber = res.size >= property.groupSize ? (res.size.to_f / property.groupSize.value.to_f).ceil : 1
    28 (1..groupNumber).each do |i|
    29   list = []
    30   (1..property.groupSize).each do |j| popped = res.pop ; list << popped if !popped.nil?  end
    31   senderNames = list.collect do |id| "#{property.hrnPrefix}#{id}" end
    32   senders = senderNames.join(',')
    33 
    34   info "Group Receiver #{i}: '#{senders}'"
    35   groupList << "Receiver#{i}"
    36   defGroup("Receiver#{i}", senders) do |node|
     24    # configure WiMAX interface
    3725    node.net.x0.profile = '51'
    3826    node.net.x0.ip = "128.238.38.%y%"
    3927    node.net.x0.netmask = "255.255.255.0"
     28    # configure WiFi interface
    4029    node.net.w0.mode = "adhoc"
    4130    node.net.w0.type = 'g'
     
    4433    node.net.w0.ip = "192.168.0.%y%"
    4534    node.net.w0.netmask = "255.255.255.0"
     35    # set up WiMAX logging application
    4636    node.addApplication("wmxstat_universal") do |app|
    4737      app.measure('status_link')
    4838    end
     39    # set up iperf application
    4940    node.addApplication("test:app:iperf") do |app|
    5041      app.setProperty('udp', true)
     
    5445      app.measure('UDP_Rich_Info', :samples =>1)
    5546    end
     47    # set up coopshim application
    5648    node.addApplication("coopshim") do |app|
    5749      app.setProperty('queue-length', "#{property.queue-length}")