| | 1 | {{{ |
| | 2 | # |
| | 3 | # Define a prototype |
| | 4 | # |
| | 5 | require 'handler/prototype' |
| | 6 | require 'handler/filter' |
| | 7 | require 'handler/appDefinition' |
| | 8 | |
| | 9 | p = Prototype.create("test:proto:itgcbrsender") |
| | 10 | p.name = "ITG Sender" |
| | 11 | p.description = "Nodes which send a stream of packets" |
| | 12 | p.defProperty('meter', 'one way delay or RTT', 'owdm') |
| | 13 | p.defProperty('protocol', 'Protocol to use', 'udp') |
| | 14 | p.defProperty('destinationHost', 'Host to send packets to') |
| | 15 | #p.defProperty('sender_port', 'Host to send packets to') |
| | 16 | p.defProperty('constsize', 'Size of packets', 1000) |
| | 17 | p.defProperty('constrate', 'Number of bits per second', 1000) |
| | 18 | p.defProperty('duration', 'Time for sending (millisec)', 1000) |
| | 19 | p.defProperty('gen_delay', 'Generation delay (millisec)', 10000) |
| | 20 | #p.defProperty('recv_logfile', 'Recv log') |
| | 21 | p.defProperty('recv_port', 'Receiver_port', 8000) |
| | 22 | |
| | 23 | itgs = p.addApplication(:itgs, "test:app:itgs") |
| | 24 | itgs.bindProperty('m','meter') |
| | 25 | itgs.bindProperty('T','protocol') |
| | 26 | itgs.bindProperty('a', 'destinationHost') |
| | 27 | itgs.bindProperty('c', 'constsize') |
| | 28 | itgs.bindProperty('C', 'constrate') |
| | 29 | itgs.bindProperty('t', 'duration') |
| | 30 | itgs.bindProperty('d', 'gen_delay') |
| | 31 | #itgs.bindProperty('l', 'logfile') |
| | 32 | #itgs.bindProperty('x', 'recv_logfile') |
| | 33 | itgs.bindProperty('r', 'recv_port') |
| | 34 | |
| | 35 | itgs.addMeasurement('senderport', Filter::TIME, |
| | 36 | {Filter::SAMPLE_SIZE => 1}, |
| | 37 | [ |
| | 38 | ['stream_no'], |
| | 39 | ['pkt_seqno'], |
| | 40 | ['pkt_size', Filter::SUM], |
| | 41 | ['gen_timestamp'], |
| | 42 | ['tx_timestamp'] |
| | 43 | ] |
| | 44 | ) |
| | 45 | |
| | 46 | if $0 == __FILE__ |
| | 47 | p.to_xml.write($stdout, 2) |
| | 48 | # |
| | 49 | # Define a prototype |
| | 50 | # |
| | 51 | require 'handler/prototype' |
| | 52 | require 'handler/filter' |
| | 53 | require 'handler/appDefinition' |
| | 54 | |
| | 55 | p = Prototype.create("test:proto:itgcbrsender") |
| | 56 | p.name = "ITG Sender" |
| | 57 | p.description = "Nodes which send a stream of packets" |
| | 58 | p.defProperty('meter', 'one way delay or RTT', 'owdm') |
| | 59 | p.defProperty('protocol', 'Protocol to use', 'udp') |
| | 60 | p.defProperty('destinationHost', 'Host to send packets to') |
| | 61 | #p.defProperty('sender_port', 'Host to send packets to') |
| | 62 | p.defProperty('constsize', 'Size of packets', 1000) |
| | 63 | p.defProperty('constrate', 'Number of bits per second', 1000) |
| | 64 | p.defProperty('duration', 'Time for sending (millisec)', 1000) |
| | 65 | p.defProperty('gen_delay', 'Generation delay (millisec)', 10000) |
| | 66 | #p.defProperty('recv_logfile', 'Recv log') |
| | 67 | p.defProperty('recv_port', 'Receiver_port', 8000) |
| | 68 | |
| | 69 | itgs = p.addApplication(:itgs, "test:app:itgs") |
| | 70 | itgs.bindProperty('m','meter') |
| | 71 | itgs.bindProperty('T','protocol') |
| | 72 | itgs.bindProperty('a', 'destinationHost') |
| | 73 | itgs.bindProperty('c', 'constsize') |
| | 74 | itgs.bindProperty('C', 'constrate') |
| | 75 | itgs.bindProperty('t', 'duration') |
| | 76 | itgs.bindProperty('d', 'gen_delay') |
| | 77 | #itgs.bindProperty('l', 'logfile') |
| | 78 | #itgs.bindProperty('x', 'recv_logfile') |
| | 79 | itgs.bindProperty('r', 'recv_port') |
| | 80 | |
| | 81 | itgs.addMeasurement('senderport', Filter::TIME, |
| | 82 | {Filter::SAMPLE_SIZE => 1}, |
| | 83 | [ |
| | 84 | ['stream_no'], |
| | 85 | ['pkt_seqno'], |
| | 86 | ['pkt_size', Filter::SUM], |
| | 87 | ['gen_timestamp'], |
| | 88 | ['tx_timestamp'] |
| | 89 | ] |
| | 90 | ) |
| | 91 | |
| | 92 | if $0 == __FILE__ |
| | 93 | p.to_xml.write($stdout, 2) |
| | 94 | # |
| | 95 | # Define a prototype |
| | 96 | # |
| | 97 | require 'handler/prototype' |
| | 98 | require 'handler/filter' |
| | 99 | require 'handler/appDefinition' |
| | 100 | |
| | 101 | p = Prototype.create("test:proto:itgcbrsender") |
| | 102 | p.name = "ITG Sender" |
| | 103 | p.description = "Nodes which send a stream of packets" |
| | 104 | p.defProperty('meter', 'one way delay or RTT', 'owdm') |
| | 105 | p.defProperty('protocol', 'Protocol to use', 'udp') |
| | 106 | p.defProperty('destinationHost', 'Host to send packets to') |
| | 107 | #p.defProperty('sender_port', 'Host to send packets to') |
| | 108 | p.defProperty('constsize', 'Size of packets', 1000) |
| | 109 | p.defProperty('constrate', 'Number of bits per second', 1000) |
| | 110 | p.defProperty('duration', 'Time for sending (millisec)', 1000) |
| | 111 | p.defProperty('gen_delay', 'Generation delay (millisec)', 10000) |
| | 112 | #p.defProperty('recv_logfile', 'Recv log') |
| | 113 | p.defProperty('recv_port', 'Receiver_port', 8000) |
| | 114 | |
| | 115 | itgs = p.addApplication(:itgs, "test:app:itgs") |
| | 116 | itgs.bindProperty('m','meter') |
| | 117 | itgs.bindProperty('T','protocol') |
| | 118 | itgs.bindProperty('a', 'destinationHost') |
| | 119 | itgs.bindProperty('c', 'constsize') |
| | 120 | itgs.bindProperty('C', 'constrate') |
| | 121 | itgs.bindProperty('t', 'duration') |
| | 122 | itgs.bindProperty('d', 'gen_delay') |
| | 123 | #itgs.bindProperty('l', 'logfile') |
| | 124 | #itgs.bindProperty('x', 'recv_logfile') |
| | 125 | itgs.bindProperty('r', 'recv_port') |
| | 126 | |
| | 127 | |
| | 128 | if $0 == __FILE__ |
| | 129 | p.to_xml.write($stdout, 2) |
| | 130 | puts |
| | 131 | end |
| | 132 | |
| | 133 | |
| | 134 | }}} |