omf_ec 6.0.0.pre.3 → 6.0.0.pre.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. data/Rakefile +1 -0
  2. data/bin/omf_ec +264 -0
  3. data/example/engine_oedl.rb +52 -0
  4. data/example/engine_test.rb +90 -0
  5. data/example/test_exp/test00.rb +12 -0
  6. data/example/test_exp/test01.rb +22 -0
  7. data/example/test_exp/test02.rb +30 -0
  8. data/{exp_repo/test/exp → example/test_exp}/test03.rb +2 -42
  9. data/{exp_repo/test/exp → example/test_exp}/test04.rb +2 -2
  10. data/{exp_repo/test/exp → example/test_exp}/test05.rb +4 -4
  11. data/{exp_repo/test/exp → example/test_exp}/test06.rb +6 -6
  12. data/example/test_exp/test07.rb +65 -0
  13. data/lib/omf_ec/app_definition.rb +57 -0
  14. data/lib/omf_ec/backward/app_definition.rb +35 -0
  15. data/lib/omf_ec/backward/core_ext/array.rb +19 -0
  16. data/lib/omf_ec/backward/default_events.rb +71 -0
  17. data/lib/omf_ec/backward/dsl.rb +83 -0
  18. data/lib/omf_ec/backward/exp/testbed.rb +47 -0
  19. data/lib/omf_ec/backward/group.rb +72 -0
  20. data/lib/omf_ec/context/app_context.rb +54 -0
  21. data/lib/omf_ec/context/def_app_context.rb +6 -0
  22. data/lib/omf_ec/context/group_context.rb +88 -0
  23. data/lib/omf_ec/context/net_context.rb +46 -0
  24. data/lib/omf_ec/context.rb +10 -0
  25. data/lib/omf_ec/dsl.rb +159 -0
  26. data/lib/omf_ec/experiment.rb +71 -0
  27. data/lib/omf_ec/group.rb +158 -0
  28. data/lib/omf_ec/version.rb +1 -1
  29. data/lib/omf_ec.rb +34 -1
  30. data/omf_ec.gemspec +2 -3
  31. data/test/omf_ec/context_spec.rb +19 -0
  32. data/test/omf_ec/group_spec.rb +14 -0
  33. data/test/test_helper.rb +19 -0
  34. metadata +44 -89
  35. data/bin/omf +0 -147
  36. data/bin/omf_pre +0 -76
  37. data/bin/omf_test +0 -161
  38. data/example/net_devices.rb +0 -75
  39. data/exp_repo/system/exp/eventlib.rb +0 -96
  40. data/exp_repo/system/exp/imageNode.rb +0 -283
  41. data/exp_repo/system/exp/reset.rb +0 -21
  42. data/exp_repo/system/exp/saveNode.rb +0 -99
  43. data/exp_repo/system/exp/stat.rb +0 -49
  44. data/exp_repo/system/exp/stdlib.rb +0 -122
  45. data/exp_repo/system/exp/tell.rb +0 -53
  46. data/exp_repo/system/exp/testlib.rb +0 -12
  47. data/exp_repo/system/exp/winlib.rb +0 -154
  48. data/exp_repo/system/topo/active.rb +0 -9
  49. data/exp_repo/system/topo/all.rb +0 -10
  50. data/exp_repo/system/topo/circle.rb +0 -23
  51. data/exp_repo/test/app/aodvd.rb +0 -73
  52. data/exp_repo/test/app/appDef1.rb +0 -102
  53. data/exp_repo/test/app/athstats.rb +0 -76
  54. data/exp_repo/test/app/echo.rb +0 -36
  55. data/exp_repo/test/app/gennyReceiverAppDef.rb +0 -100
  56. data/exp_repo/test/app/gennySenderAppDef.rb +0 -106
  57. data/exp_repo/test/app/itgdec.rb +0 -79
  58. data/exp_repo/test/app/itgr.rb +0 -77
  59. data/exp_repo/test/app/itgs.rb +0 -105
  60. data/exp_repo/test/app/nop.rb +0 -36
  61. data/exp_repo/test/app/otg2.rb +0 -68
  62. data/exp_repo/test/app/otg2_mp.rb +0 -56
  63. data/exp_repo/test/app/otr2.rb +0 -56
  64. data/exp_repo/test/app/otr2_mp.rb +0 -51
  65. data/exp_repo/test/app/trace_oml2.rb +0 -62
  66. data/exp_repo/test/app/wlanconfig_oml2.rb +0 -42
  67. data/exp_repo/test/exp/conf-room-demo.rb +0 -118
  68. data/exp_repo/test/exp/planetlab.rb +0 -82
  69. data/exp_repo/test/exp/test01.rb +0 -42
  70. data/exp_repo/test/exp/test02.rb +0 -60
  71. data/exp_repo/test/exp/tutorial/hello-world-wired.rb +0 -79
  72. data/exp_repo/test/exp/tutorial/hello-world-wireless.rb +0 -87
  73. data/exp_repo/test/exp/tutorial/using-filters.rb +0 -69
  74. data/exp_repo/test/exp/tutorial/using-groups.rb +0 -64
  75. data/exp_repo/test/exp/tutorial/using-properties.rb +0 -93
  76. data/exp_repo/test/exp/tutorial/using-prototypes.rb +0 -111
  77. data/exp_repo/test/proto/aodvrouter.rb +0 -55
  78. data/exp_repo/test/proto/driverqueryapp.rb +0 -59
  79. data/exp_repo/test/proto/forwarder.rb +0 -73
  80. data/exp_repo/test/proto/itgcbrsender.rb +0 -70
  81. data/exp_repo/test/proto/itgdecoder.rb +0 -64
  82. data/exp_repo/test/proto/itgreceiver.rb +0 -55
  83. data/exp_repo/test/proto/itgvoipsender.rb +0 -64
  84. data/exp_repo/test/proto/listener2.rb +0 -62
  85. data/exp_repo/test/proto/nop.rb +0 -47
  86. data/exp_repo/test/proto/probelink.rb +0 -48
  87. data/exp_repo/test/proto/raw_receiver.rb +0 -64
  88. data/exp_repo/test/proto/receiver2_mp.rb +0 -48
  89. data/exp_repo/test/proto/sender2_mp.rb +0 -54
  90. data/exp_repo/test/proto/udp_receiver.rb +0 -55
  91. data/exp_repo/test/proto/udp_sender.rb +0 -61
@@ -1,64 +0,0 @@
1
- #
2
- # Copyright (c) 2006-2010 National ICT Australia (NICTA), Australia
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy
5
- # of this software and associated documentation files (the "Software"), to deal
6
- # in the Software without restriction, including without limitation the rights
7
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- # copies of the Software, and to permit persons to whom the Software is
9
- # furnished to do so, subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in
12
- # all copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- # THE SOFTWARE.
21
- #
22
- # Tutorial experiment
23
- #
24
- defProperty('res1', 'omf.nicta.node1', "ID of sender node")
25
- defProperty('res2', 'omf.nicta.node2', "ID of receiver node")
26
- defProperty('duration', 60, "Duration of the experiment")
27
-
28
- defGroup('Sender', property.res1) do |node|
29
- node.addApplication("test:app:otg2") do |app|
30
- app.setProperty('udp:local_host', '%net.w0.ip%')
31
- app.setProperty('udp:dst_host', '192.168.255.255')
32
- app.setProperty('udp:broadcast', 1)
33
- app.setProperty('udp:dst_port', 3000)
34
- app.measure('udp_out', :samples => 1)
35
- end
36
- end
37
-
38
- defGroup('Receiver', property.res2) do |node|
39
- node.addApplication("test:app:otr2") do |app|
40
- app.setProperty('udp:local_host', '192.168.255.255')
41
- app.setProperty('udp:local_port', 3000)
42
- app.measure('udp_in', :samples => 1)
43
- end
44
- end
45
-
46
- allGroups.net.w0 do |interface|
47
- interface.mode = "adhoc"
48
- interface.type = 'g'
49
- interface.channel = "6"
50
- interface.essid = "helloworld"
51
- interface.ip = "192.168.0.%index%"
52
- end
53
-
54
- onEvent(:ALL_UP_AND_INSTALLED) do |event|
55
- wait 10
56
- group("Receiver").startApplications
57
- wait 5
58
- group("Sender").startApplications
59
- wait property.duration
60
- group("Sender").stopApplications
61
- wait 5
62
- group("Receiver").stopApplications
63
- Experiment.done
64
- end
@@ -1,93 +0,0 @@
1
- #
2
- # Copyright (c) 2006-2010 National ICT Australia (NICTA), Australia
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy
5
- # of this software and associated documentation files (the "Software"), to deal
6
- # in the Software without restriction, including without limitation the rights
7
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- # copies of the Software, and to permit persons to whom the Software is
9
- # furnished to do so, subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in
12
- # all copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- # THE SOFTWARE.
21
- #
22
- # Tutorial experiment
23
- #
24
- defProperty('res1', 'omf.nicta.node1', "ID of sender node")
25
- defProperty('res2', 'omf.nicta.node2', "ID of receiver node")
26
- defProperty('packetsize', 128, "Packet size (byte) from the sender node")
27
- defProperty('bitrate', 2048, "Bitrate (bit/s) from the sender node")
28
- defProperty('runtime', 40, "Time in second for the experiment is to run")
29
- defProperty('wifiType', "g", "The type of WIFI to use in this experiment")
30
- defProperty('channel', '6', "The WIFI channel to use in this experiment")
31
- defProperty('netid', "example2", "The ESSID to use in this experiment")
32
- defProperty('graph', false, "Display graph or not")
33
-
34
- defGroup('Sender',property.res1) do |node|
35
- node.addApplication("test:app:otg2") do |app|
36
- app.setProperty('udp:local_host', '192.168.0.2')
37
- app.setProperty('udp:dst_host', '192.168.0.3')
38
- app.setProperty('udp:dst_port', 3000)
39
- app.setProperty('cbr:size', property.packetsize)
40
- app.setProperty('cbr:rate', property.bitrate * 2)
41
- app.measure('udp_out', :samples => 1)
42
- end
43
- node.net.w0.mode = "adhoc"
44
- node.net.w0.type = property.wifiType
45
- node.net.w0.channel = property.channel
46
- node.net.w0.essid = property.netid
47
- node.net.w0.ip = "192.168.0.2"
48
- end
49
-
50
- defGroup('Receiver',property.res2) do |node|
51
- node.addApplication("test:app:otr2") do |app|
52
- app.setProperty('udp:local_host', '192.168.0.3')
53
- app.setProperty('udp:local_port', 3000)
54
- app.measure('udp_in', :samples => 1)
55
- end
56
- node.net.w0.mode = "adhoc"
57
- node.net.w0.type = property.wifiType
58
- node.net.w0.channel = property.channel
59
- node.net.w0.essid = property.netid
60
- node.net.w0.ip = "192.168.0.3"
61
- end
62
-
63
- onEvent(:ALL_UP_AND_INSTALLED) do |event|
64
- info "This is my first OMF experiment"
65
- wait 10
66
- allGroups.startApplications
67
- info "All my Applications are started now..."
68
- wait property.runtime / 4
69
- property.packetsize = 256
70
- wait property.runtime / 4
71
- property.packetsize = 512
72
- wait property.runtime / 4
73
- property.packetsize = 1024
74
- wait property.runtime / 4
75
- allGroups.stopApplications
76
- info "All my Applications are stopped now."
77
- Experiment.done
78
- end
79
-
80
- if property.graph.value
81
- addTab(:defaults)
82
- addTab(:graph2) do |tab|
83
- opts = { :postfix => %{This graph shows the Packet Size of the incoming UDP traffic (byte).}, :updateEvery => 1 }
84
- tab.addGraph("Incoming UDP Packet Size", opts) do |g|
85
- dataIn = Array.new
86
- mpIn = ms('udp_in')
87
- mpIn.project(:oml_ts_server, :pkt_length).each do |sample|
88
- dataIn << sample.tuple
89
- end
90
- g.addLine(dataIn, :label => "Incoming UDP (byte)")
91
- end
92
- end
93
- end
@@ -1,111 +0,0 @@
1
- #
2
- # Copyright (c) 2006-2010 National ICT Australia (NICTA), Australia
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy
5
- # of this software and associated documentation files (the "Software"), to deal
6
- # in the Software without restriction, including without limitation the rights
7
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- # copies of the Software, and to permit persons to whom the Software is
9
- # furnished to do so, subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in
12
- # all copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- # THE SOFTWARE.
21
- #
22
- # Tutorial experiment
23
- #
24
- defProperty('res1', 'omf.nicta.node1', "ID of sender node")
25
- defProperty('res2', 'omf.nicta.node2', "ID of receiver node")
26
- defProperty('duration', 30, "Duration of the experiment")
27
- defProperty('graph', false, "Display graph or not")
28
-
29
- defGroup('CBR_Sender', property.res1) do |node|
30
- options = { 'localHost' => '%net.w0.ip%',
31
- 'destinationHost' => '192.168.255.255',
32
- 'packetSize' => 256 }
33
- node.addPrototype("test:proto:cbr_generator", options)
34
- end
35
-
36
- defGroup('EXPO_Sender', property.res1) do |node|
37
- options = { 'localHost' => '%net.w0.ip%',
38
- 'destinationHost' => '192.168.255.255',
39
- 'packetSize' => 1024 }
40
- node.addPrototype("test:proto:expo_generator", options)
41
- end
42
-
43
- defGroup('Receiver', property.res2) do |node|
44
- node.addApplication("test:app:otr2") do |app|
45
- app.setProperty('udp:local_host', '192.168.255.255')
46
- app.setProperty('udp:local_port', 3000)
47
- app.measure('udp_in', :samples => 1)
48
- end
49
- end
50
-
51
- allGroups.net.w0 do |interface|
52
- interface.mode = "adhoc"
53
- interface.type = 'g'
54
- interface.channel = "6"
55
- interface.essid = "helloworld"
56
- interface.ip = "192.168.0.%index%"
57
- end
58
-
59
- onEvent(:ALL_UP_AND_INSTALLED) do |event|
60
- wait 10
61
- info "Starting the Receiver"
62
- group("Receiver").startApplications
63
- info "Starting the EXPO-traffic Sender"
64
- group("EXPO_Sender").startApplications
65
- wait property.duration
66
- info "Stopping the EXPO-traffic Sender"
67
- group("EXPO_Sender").stopApplications
68
- wait 5
69
- info "Starting the CBR-traffic Sender"
70
- group("CBR_Sender").startApplications
71
- wait property.duration
72
- info "Now stopping all everything"
73
- #allGroups.stopApplications
74
- group("CBR_Sender").stopApplications
75
- group("Receiver").stopApplications
76
- Experiment.done
77
- end
78
-
79
-
80
- if property.graph.value
81
- addTab(:defaults)
82
- addTab(:graph2) do |tab|
83
- opts1 = { :postfix => %{This graph shows the Sequence Number from CBR and EXP UDP traffic.}, :updateEvery => 1 }
84
- tab.addGraph("Sequence Number", opts1) do |g|
85
- dataOut = Hash.new
86
- mpOut = ms('udp_out')
87
- mpOut.project(:oml_sender_id, :oml_ts_server, :seq_no).each do |sample|
88
- sender, time, seq = sample.tuple
89
- dataOut[sender] = [] if dataOut[sender] == nil
90
- dataOut[sender] << [time,seq]
91
- end
92
- dataOut.each do |source, data|
93
- g.addLine(data, :label => "#{msSenderName[source]}")
94
- end
95
- end
96
- opts2 = { :postfix => %{This graph shows the Packet Size (bytes)from CBR and EXP UDP traffic.}, :updateEvery => 1 }
97
- tab.addGraph("Packet Size", opts2) do |g|
98
- dataOut = Hash.new
99
- mpOut = ms('udp_out')
100
- mpOut.project(:oml_sender_id, :oml_ts_server, :pkt_length).each do |sample|
101
- sender, time, plength = sample.tuple
102
- dataOut[sender] = [] if dataOut[sender] == nil
103
- dataOut[sender] << [time,plength]
104
- end
105
- dataOut.each do |source, data|
106
- g.addLine(data, :label => "#{msSenderName[source]}")
107
- end
108
- end
109
- end
110
- end
111
-
@@ -1,55 +0,0 @@
1
- #
2
- # Copyright (c) 2006-2009 National ICT Australia (NICTA), Australia
3
- #
4
- # Copyright (c) 2004-2009 WINLAB, Rutgers University, USA
5
- #
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in
14
- # all copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- # THE SOFTWARE.
23
- #
24
- #
25
- #
26
- # Define a prototype
27
- #
28
-
29
- p = Prototype.create("test:proto:aodvrouter")
30
- p.name = "AODV daemon"
31
- p.description = "Nodes which receive packets"
32
- p.defProperty('interface', 'Interface to listen on')
33
- p.defProperty('log', 'Enable logging')
34
- p.defProperty('routelog', 'Enable logging')
35
-
36
- aodvd = p.addApplication('aodvd', "test:app:aodvd")
37
- aodvd.bindProperty('interface')
38
- aodvd.bindProperty('log')
39
- aodvd.bindProperty('rttable','routelog')
40
-
41
- aodvd.addMeasurement('receiverport', Filter::SAMPLE,
42
- {Filter::SAMPLE_SIZE => 1},
43
- [
44
- ['flow_no'],
45
- ['throughput'],
46
- ['jitter'],
47
- ['packet_loss']
48
- ]
49
- )
50
-
51
- if $0 == __FILE__
52
- p.to_xml.write($stdout, 2)
53
- puts
54
- end
55
-
@@ -1,59 +0,0 @@
1
- #
2
- # Copyright (c) 2006-2009 National ICT Australia (NICTA), Australia
3
- #
4
- # Copyright (c) 2004-2009 WINLAB, Rutgers University, USA
5
- #
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in
14
- # all copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- # THE SOFTWARE.
23
- #
24
- #
25
- #
26
- # Define a prototype
27
- #
28
-
29
- p = Prototype.create("test:proto:driverqueryapp")
30
- p.name = "Wireless Driver Stats"
31
- p.description = "Statistics obtained by querying the driver periodically"
32
- p.defProperty('interface', 'interface to gather stats from')
33
- p.defProperty('interval', 'How often to query the driver')
34
-
35
- athstats = p.addApplication(:athstats, "test:app:athstats")
36
- athstats.bindProperty('interface')
37
- athstats.bindProperty('interval')
38
-
39
- athstats.addMeasurement('queryport', Filter::SAMPLE,
40
- {Filter::SAMPLE_SIZE => 1},
41
- [
42
- ['succ_tx_attempts'],
43
- ['fail_xretries'],
44
- ['fail_fifoerr'],
45
- ['fail_filtered'],
46
- ['short_retries'],
47
- ['long_retries'],
48
- ['total_frames_rcvd'],
49
- ['crc_errors'],
50
- ['fifo_errors'],
51
- ['phy_errors']
52
- ]
53
- )
54
-
55
- if $0 == __FILE__
56
- p.to_xml.write($stdout, 2)
57
- puts
58
- end
59
-
@@ -1,73 +0,0 @@
1
- #
2
- # Copyright (c) 2006-2009 National ICT Australia (NICTA), Australia
3
- #
4
- # Copyright (c) 2004-2009 WINLAB, Rutgers University, USA
5
- #
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in
14
- # all copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- # THE SOFTWARE.
23
- #
24
- #
25
- #
26
- # Define a prototype
27
- #
28
- # $Id: forwarder.rb 997 2006-01-20 06:59:31Z sachin $
29
-
30
- p = Prototype.create("test:proto:forwarder")
31
- p.name = "Forwarder"
32
- p.description = "Nodes which forward packets"
33
- p.defProperty('protocol', 'Protocol to use', 'raw')
34
- p.defProperty('rxdev', 'hw interface to listen on', 'eth0')
35
- p.defProperty('txdev', 'hw interaface to send', 'eth0')
36
- p.defProperty('ipFilter', 'IP address of the destination', '12.0.0.6')
37
- p.defProperty('nextHopMAC', 'hw address of next-hop receiver', 'FF:FF:FF:FF:FF:FF')
38
-
39
- otf = p.addApplication('otf', "test:app:otf")
40
-
41
- otf.bindProperty('protocol')
42
- otf.bindProperty('rxdev')
43
- otf.bindProperty('txdev')
44
- otf.bindProperty('dstfilter','ipFilter')
45
- otf.bindProperty('dstmacaddr','nextHopMAC')
46
-
47
- otf.addMeasurement('senderport', Filter::TIME,
48
- {Filter::SAMPLE_SIZE => 1},
49
- [
50
- ['stream_no'],
51
- ['pkt_seqno'],
52
- ['pkt_size', Filter::SUM],
53
- ['gen_timestamp'],
54
- ['tx_timestamp']
55
- ]
56
- )
57
- otf.addMeasurement('otfreceiver', Filter::TIME,
58
- {Filter::SAMPLE_SIZE => 1},
59
- [
60
- ['flow_no'],
61
- ['pkt_num_rcvd'],
62
- ['rcvd_pkt_size', Filter::SUM],
63
- ['rx_timestamp', Filter::MEAN],
64
- ['rssi', Filter::MEAN],
65
- ['xmitrate']
66
- ]
67
- )
68
-
69
- if $0 == __FILE__
70
- p.to_xml.write($stdout, 2)
71
- puts
72
- end
73
-
@@ -1,70 +0,0 @@
1
- #
2
- # Copyright (c) 2006-2009 National ICT Australia (NICTA), Australia
3
- #
4
- # Copyright (c) 2004-2009 WINLAB, Rutgers University, USA
5
- #
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in
14
- # all copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- # THE SOFTWARE.
23
- #
24
- #
25
- #
26
- # Define a prototype
27
- #
28
-
29
- p = Prototype.create("test:proto:itgcbrsender")
30
- p.name = "ITG Sender"
31
- p.description = "Nodes which send a stream of packets"
32
- p.defProperty('meter', 'one way delay or RTT', 'owdm')
33
- p.defProperty('protocol', 'Protocol to use', 'udp')
34
- p.defProperty('destinationHost', 'Host to send packets to')
35
- #p.defProperty('sender_port', 'Host to send packets to')
36
- p.defProperty('constsize', 'Size of packets', 1000)
37
- p.defProperty('constrate', 'Number of bits per second', 1000)
38
- p.defProperty('duration', 'Time for sending (millisec)', 1000)
39
- p.defProperty('gen_delay', 'Generation delay (millisec)', 10000)
40
- #p.defProperty('recv_logfile', 'Recv log')
41
- p.defProperty('recv_port', 'Receiver_port', 8000)
42
-
43
- itgs = p.addApplication(:itgs, "test:app:itgs")
44
- itgs.bindProperty('m','meter')
45
- itgs.bindProperty('T','protocol')
46
- itgs.bindProperty('a', 'destinationHost')
47
- itgs.bindProperty('c', 'constsize')
48
- itgs.bindProperty('C', 'constrate')
49
- itgs.bindProperty('t', 'duration')
50
- itgs.bindProperty('d', 'gen_delay')
51
- #itgs.bindProperty('l', 'logfile')
52
- #itgs.bindProperty('x', 'recv_logfile')
53
- itgs.bindProperty('r', 'recv_port')
54
-
55
- itgs.addMeasurement('senderport', Filter::TIME,
56
- {Filter::SAMPLE_SIZE => 1},
57
- [
58
- ['stream_no'],
59
- ['pkt_seqno'],
60
- ['pkt_size', Filter::SUM],
61
- ['gen_timestamp'],
62
- ['tx_timestamp']
63
- ]
64
- )
65
-
66
- if $0 == __FILE__
67
- p.to_xml.write($stdout, 2)
68
- puts
69
- end
70
-
@@ -1,64 +0,0 @@
1
- #
2
- # Copyright (c) 2006-2009 National ICT Australia (NICTA), Australia
3
- #
4
- # Copyright (c) 2004-2009 WINLAB, Rutgers University, USA
5
- #
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in
14
- # all copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- # THE SOFTWARE.
23
- #
24
- #
25
- #
26
- # Define a prototype
27
- #
28
-
29
- p = Prototype.create("test:proto:itgdecoder")
30
- p.name = "ITG Decoder"
31
- p.description = "Decodes output and prints results"
32
- p.defProperty('logfile', 'Logfile')
33
- p.defProperty('tput_report_interval', 'Report interval for throughput')
34
- p.defProperty('delay_report_interval', 'Report interval for Delay')
35
- p.defProperty('jitter_report_interval', 'Report interval for Jitter')
36
- p.defProperty('loss_report_interval', 'Report interval for Packet loss')
37
-
38
- itgd = p.addApplication('itgdec', "test:app:itgdec")
39
- itgd.bindProperty('logfile')
40
- itgd.bindProperty('d', 'delay_report_interval')
41
- itgd.bindProperty('j', 'jitter_report_interval')
42
- itgd.bindProperty('b', 'tput_report_interval')
43
- itgd.bindProperty('p', 'loss_report_interval')
44
-
45
- itgd.addMeasurement('decoderport', Filter::SAMPLE,
46
- {Filter::SAMPLE_SIZE => 1},
47
- [
48
- ['flow_no'],
49
- ['src_port'],
50
- ['dst_port'],
51
- ['throughput'],
52
- ['jitter'],
53
- ['delay'],
54
- ['pkt_loss'],
55
- ['rssi'],
56
- ['rate']
57
- ]
58
- )
59
-
60
- if $0 == __FILE__
61
- p.to_xml.write($stdout, 2)
62
- puts
63
- end
64
-
@@ -1,55 +0,0 @@
1
- #
2
- # Copyright (c) 2006-2009 National ICT Australia (NICTA), Australia
3
- #
4
- # Copyright (c) 2004-2009 WINLAB, Rutgers University, USA
5
- #
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in
14
- # all copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- # THE SOFTWARE.
23
- #
24
- #
25
- #
26
- # Define a prototype
27
- #
28
-
29
- p = Prototype.create("test:proto:itgreceiver")
30
- p.name = "ITG Receiver"
31
- p.description = "Nodes which receive packets"
32
- p.defProperty('logfile', 'Logfile')
33
-
34
- itgr = p.addApplication('itgr', "test:app:itgr")
35
- itgr.bindProperty('l','logfile')
36
-
37
- itgr.addMeasurement('receiverport', Filter::SAMPLE,
38
- {Filter::SAMPLE_SIZE => 1},
39
- [
40
- ['flow_no'],
41
- ['min_delay'],
42
- ['max_delay'],
43
- ['avg_delay'],
44
- ['avg_jitter'],
45
- ['delay_stdev'],
46
- ['avg_throughput'],
47
- ['packet_loss'],
48
- ]
49
- )
50
-
51
- if $0 == __FILE__
52
- p.to_xml.write($stdout, 2)
53
- puts
54
- end
55
-