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-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:itgvoipsender")
30
- p.name = "ITG VoIP Sender"
31
- p.description = "Nodes which send a stream of packets"
32
- p.defProperty('meter', 'one way delay or RTT', 'owdm')
33
- p.defProperty('duration', 'Time for sending (millisec)', 1000)
34
- p.defProperty('protocol',' UDP or UDP_Libmac')
35
- p.defProperty('recv_port', 'Receiver_port', 8000)
36
- p.defProperty('codec', 'VoIP codec')
37
- p.defProperty('voip_control', 'VoIP control')
38
- p.defProperty('destinationHost', 'Host to send packets to')
39
-
40
- itgs = p.addApplication(:itgs, "test:app:itgs")
41
- itgs.bindProperty('t', 'duration')
42
- itgs.bindProperty('codec')
43
- itgs.bindProperty('T','protocol')
44
- itgs.bindProperty('voip_control')
45
- itgs.bindProperty('a', 'destinationHost')
46
- itgs.bindProperty('m','meter')
47
- itgs.bindProperty('r', 'recv_port')
48
-
49
- itgs.addMeasurement('senderport', Filter::SAMPLE,
50
- {Filter::SAMPLE_SIZE => 1},
51
- [
52
- ['stream_no'],
53
- ['pkt_seqno'],
54
- ['pkt_size', Filter::SUM],
55
- ['gen_timestamp'],
56
- ['tx_timestamp']
57
- ]
58
- )
59
-
60
- if $0 == __FILE__
61
- p.to_xml.write($stdout, 2)
62
- puts
63
- end
64
-
@@ -1,62 +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 containing a single
27
- # traffic listener (otl).
28
- #
29
-
30
-
31
- defPrototype("test:proto:listener2") { |p|
32
- p.name = "Listener2"
33
- p.description = "A node which listen for packets through a given interface"
34
- # List properties of prototype
35
- p.defProperty('omlServer', 'Contact details for the oml collection server', "tcp:#{OmlApp.getServerAddr}:#{OmlApp.getServerPort}")
36
- p.defProperty('id', 'ID for this oml client', "#{Experiment.ID}")
37
- p.defProperty('expId', 'ID for this experiment', "#{Experiment.ID}")
38
- p.defProperty('filter', 'The file with the filter definitions', "default")
39
- p.defProperty('interface', 'When using the default filter, listen on this given interface')
40
- p.defProperty('sourceIP', 'When using the default filter, select pkt with this Src IP')
41
- #p.defProperty('destinationIP', 'When using the default filter, select pkt with this Dst IP')
42
-
43
- # Define applications to be installed on this type of node,
44
- # bind the application properties to the prototype properties,
45
- # and finally, define what measurements should be collected
46
- # for each application.
47
- #
48
- p.addApplication(:otl2, "test:app:otl2") {|otl|
49
- otl.bindProperty('oml-server', 'omlServer')
50
- otl.bindProperty('oml-id', 'id')
51
- otl.bindProperty('oml-exp-id', 'expId')
52
- otl.bindProperty('pcap', 'filter')
53
- otl.bindProperty('pcap-if', 'interface')
54
- otl.bindProperty('pcap-ip-src', 'sourceIP')
55
- #otl.bindProperty('pcap-ip-dst', 'destinationIP')
56
- }
57
- }
58
-
59
- if $0 == __FILE__
60
- p.to_xml.write($stdout, 2)
61
- puts
62
- end
@@ -1,47 +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 containing a No Operation task
27
- #
28
-
29
-
30
- defPrototype("test:proto:nop") { |p|
31
- p.name = "NOP"
32
- p.description = "A node which does nothing"
33
- # List properties of prototype
34
-
35
- # Define applications to be installed on this type of node,
36
- # bind the application properties to the prototype properties,
37
- # and finally, define what measurements should be collected
38
- # for each application.
39
- #
40
- p.addApplication(:nop, "test:app:nop") {|nop|
41
- }
42
- }
43
-
44
- if $0 == __FILE__
45
- p.to_xml.write($stdout, 2)
46
- puts
47
- end
@@ -1,48 +0,0 @@
1
- #
2
- # Copyright (c) 2006-2008 National ICT Australia (NICTA), Australia
3
- #
4
- # Copyright (c) 2004-2008 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
- defPrototype("test:proto:probelink") { |p|
30
-
31
- p.name = "ProbeLink"
32
- p.description = "Get some characteristics of the wireless interface using the wlanconfig list command"
33
-
34
- # Define some properties for this prototype
35
- #
36
- p.defProperty('omlServer', 'Contact details for the oml collection server', "tcp:#{OmlApp.getServerAddr}:#{OmlApp.getServerPort}")
37
- p.defProperty('id', 'ID for this oml client', "/tmp/#{Experiment.ID}")
38
- p.defProperty('expId', 'ID for this experiment', "/tmp/#{Experiment.ID}")
39
-
40
- # Set the OML application definition to use
41
- #
42
- p.addApplication(:wlanconfig_oml2, "test:app:wlanconfig_oml2") { |wlan|
43
- wlan.bindProperty('oml-server', 'omlServer')
44
- wlan.bindProperty('oml-id', 'id')
45
- wlan.bindProperty('oml-exp-id', 'expId')
46
- }
47
-
48
- }
@@ -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:raw_receiver")
30
- p.name = "RAW Receiver"
31
- p.description = "Nodes which receive packets"
32
- p.defProperty('protocol', 'Protocol to use', 'udp')
33
- p.defProperty('rxdev', 'rx dev interface')
34
- p.defProperty('dstfilter', 'dst ip address as filter')
35
-
36
- otr= p.addApplication('otr', "test:app:otr")
37
- otr.bindProperty('protocol')
38
- otr.bindProperty('rxdev')
39
- otr.bindProperty('dstfilter')
40
-
41
- otr.addMeasurement('receiverport',Filter::TIME,
42
- {Filter::SAMPLE_SIZE => 1},
43
- [
44
- ['pkt_seqno'],
45
- ['flow_no'],
46
- ['rcvd_pkt_size', Filter::SUM],
47
- ['rx_timestamp'],
48
- ['rssi'],
49
- ['xmitrate']
50
- ]
51
- )
52
-
53
- otr.addMeasurement('flow', Filter::SAMPLE,
54
- {Filter::SAMPLE_SIZE => 1},
55
- [
56
- ['flow_no'],
57
- ['sender_port']
58
- ]
59
- )
60
-
61
- if $0 == __FILE__
62
- p.to_xml.write($stdout, 2)
63
- puts
64
- end
@@ -1,48 +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
- # This is an OMF Prototype definition
26
- # This prototype contains a single UDP traffic sink, which uses the
27
- # existing modified application otr2_mp.
28
- # Note: the application 'otr2_mp' was contributed by a student and is not
29
- # officially supported by the OMF/OML team
30
- #
31
- defPrototype("test:proto:receiver2_mp") do |p|
32
-
33
- p.name = "Receiver2-Multipah"
34
- p.description = "Nodes which receive packets from multiple paths"
35
- # List properties of prototype
36
- p.defProperty('sink', 'Task to perform on received packets', 'udpmi')
37
- p.defProperty('localHost', 'Host that generate the packets')
38
- p.defProperty('debugLevel', 'Level of debug messages to output', 0)
39
-
40
- # Define applications to be installed on this type of node,
41
- # bind the application properties to the prototype properties.
42
- #
43
- p.addApplication("test:app:otr2_mp") do |otr|
44
- otr.bindProperty('sink')
45
- otr.bindProperty('udpmi:local_host', 'localHost')
46
- otr.bindProperty('debug-level', 'debugLevel')
47
- end
48
- end
@@ -1,54 +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
- # This is an OMF Prototype definition
26
- # This prototype contains a single UDP traffic generator, which uses the
27
- # existing modified application otg2_mp.
28
- # Note: the application 'otg2_mp' was contributed by a student and is not
29
- # officially supported by the OMF/OML team
30
- #
31
- defPrototype("test:proto:sender2_mp") do |p|
32
- p.name = "Sender2-Multipath"
33
- p.description = "A node which transmit a stream of packets over multiple paths"
34
- # List properties of prototype
35
- p.defProperty('protocol', 'Protocol to use', 'udpm')
36
- p.defProperty('generator', 'Generator to use', 'cbr')
37
- p.defProperty('localHost', 'Host that generate the packets')
38
- p.defProperty('destinationHost', 'Host to send packets to')
39
- p.defProperty('debugLevel', 'Level of debug messages to output', 0)
40
- p.defProperty('disjointPath', 'Flag to use (or not) disjoint paths', 1)
41
-
42
-
43
- # Define applications to be installed on this type of node,
44
- # bind the application properties to the prototype properties.
45
- #
46
- p.addApplication("test:app:otg2_mp") {|otg|
47
- otg.bindProperty('protocol')
48
- otg.bindProperty('generator')
49
- otg.bindProperty('udpm:local_host', 'localHost')
50
- otg.bindProperty('udpm:dst_host', 'destinationHost')
51
- otg.bindProperty('debug-level', 'debugLevel')
52
- otg.bindProperty('udpm:disjoint', 'disjointPath')
53
- end
54
- end
@@ -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
- # This is an OMF Prototype definition
30
- # This prototype contains a single UDP traffic receiver, which uses the
31
- # existing application otr2.
32
- # It allows OMF entities to use and instrument this traffic receiver
33
- #
34
- defPrototype("test:proto:udp_receiver") do |p|
35
- p.name = "UDP_Receiver"
36
- p.description = "Nodes which receive UDP packets"
37
-
38
- # Define the properties (and their default values) that can be configured
39
- # for this prototype
40
- #
41
- p.defProperty('localHost', 'Host that generate the packets', 'localhost')
42
- p.defProperty('localPort', 'Host that generate the packets', 3000)
43
-
44
- # Define the application to be installed on this type of node,
45
- # bind the application properties to the prototype properties,
46
- # and finally, define what measurements should be collected
47
- # for each application.
48
- #
49
- p.addApplication("test:app:otr2") do |otr|
50
-
51
- otr.bindProperty('udp:local_host', 'localHost')
52
- otr.bindProperty('udp:local_port', 'localPort')
53
- otr.measure('udp_in', :samples => 1)
54
- end
55
- end
@@ -1,61 +0,0 @@
1
- #
2
- # Copyright (c) 2006-2010 National ICT Australia (NICTA), Australia
3
- #
4
- # Copyright (c) 2004-2010 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
- # This is an OMF Prototype definition
27
- # This prototype contains a single UDP traffic generator, which uses the
28
- # existing application otg2.
29
- # It allows OMF entities to use and instrument this traffic generator
30
- #
31
- defPrototype("test:proto:udp_sender") do |p|
32
- p.name = "UDP_Sender"
33
- p.description = "A node which transmit unicast CBR UDP packets"
34
-
35
- # Define the properties (and their default values) that can be configured
36
- # for this prototype
37
- #
38
- p.defProperty('destinationHost', 'Host to send packets to')
39
- p.defProperty('destinationPort', 'Host to send packets to',3000)
40
- p.defProperty('localHost', 'Host that generate the packets', 'localhost')
41
- p.defProperty('localPort', 'Host that generate the packets',3000)
42
- p.defProperty('packetSize', 'Size of packets [bytes]', 512)
43
- p.defProperty('rate', 'Number of bits per second [bps]', 4096)
44
- p.defProperty('broadcast', 'Allow broadcast', 0)
45
-
46
- # Define the application to be installed on this type of node,
47
- # bind the application properties to the prototype properties,
48
- # and finally, define what measurements should be collected
49
- # for each application.
50
- #
51
- p.addApplication("test:app:otg2") do |otg|
52
- otg.bindProperty('udp:broadcast', 'broadcast')
53
- otg.bindProperty('udp:dst_host', 'destinationHost')
54
- otg.bindProperty('udp:dst_port', 'destinationPort')
55
- otg.bindProperty('udp:local_host', 'localHost')
56
- otg.bindProperty('udp:local_port', 'localPort')
57
- otg.bindProperty('cbr:size', 'packetSize')
58
- otg.bindProperty('cbr:rate', 'rate')
59
- otg.measure('udp_out', :samples => 1)
60
- end
61
- end