wiki:Documentation/OtherApps/DITG/ITGCBRSender
#
# Define a prototype
#
require 'handler/prototype'
require 'handler/filter'
require 'handler/appDefinition'

p = Prototype.create("test:proto:itgcbrsender")
p.name = "ITG Sender"
p.description = "Nodes which send a stream of packets"
p.defProperty('meter', 'one way delay or RTT', 'owdm')
p.defProperty('protocol', 'Protocol to use', 'udp')
p.defProperty('destinationHost', 'Host to send packets to')
#p.defProperty('sender_port', 'Host to send packets to')
p.defProperty('constsize', 'Size of packets', 1000)
p.defProperty('constrate', 'Number of bits per second', 1000)
p.defProperty('duration', 'Time for sending (millisec)', 1000)
p.defProperty('gen_delay', 'Generation delay (millisec)', 10000)
#p.defProperty('recv_logfile', 'Recv log')
p.defProperty('recv_port', 'Receiver_port', 8000)

itgs = p.addApplication(:itgs, "test:app:itgs")
itgs.bindProperty('m','meter')
itgs.bindProperty('T','protocol')
itgs.bindProperty('a', 'destinationHost')
itgs.bindProperty('c', 'constsize')
itgs.bindProperty('C', 'constrate')
itgs.bindProperty('t', 'duration')
itgs.bindProperty('d', 'gen_delay')
#itgs.bindProperty('l', 'logfile')
#itgs.bindProperty('x', 'recv_logfile')
itgs.bindProperty('r', 'recv_port')

itgs.addMeasurement('senderport',  Filter::TIME, 
  {Filter::SAMPLE_SIZE => 1},
  [
    ['stream_no'],
    ['pkt_seqno'],
    ['pkt_size', Filter::SUM],
    ['gen_timestamp'],
    ['tx_timestamp']
  ]
)

if $0 == __FILE__
  p.to_xml.write($stdout, 2)
#
# Define a prototype
#
require 'handler/prototype'
require 'handler/filter'
require 'handler/appDefinition'

p = Prototype.create("test:proto:itgcbrsender")
p.name = "ITG Sender"
p.description = "Nodes which send a stream of packets"
p.defProperty('meter', 'one way delay or RTT', 'owdm')
p.defProperty('protocol', 'Protocol to use', 'udp')
p.defProperty('destinationHost', 'Host to send packets to')
#p.defProperty('sender_port', 'Host to send packets to')
p.defProperty('constsize', 'Size of packets', 1000)
p.defProperty('constrate', 'Number of bits per second', 1000)
p.defProperty('duration', 'Time for sending (millisec)', 1000)
p.defProperty('gen_delay', 'Generation delay (millisec)', 10000)
#p.defProperty('recv_logfile', 'Recv log')
p.defProperty('recv_port', 'Receiver_port', 8000)

itgs = p.addApplication(:itgs, "test:app:itgs")
itgs.bindProperty('m','meter')
itgs.bindProperty('T','protocol')
itgs.bindProperty('a', 'destinationHost')
itgs.bindProperty('c', 'constsize')
itgs.bindProperty('C', 'constrate')
itgs.bindProperty('t', 'duration')
itgs.bindProperty('d', 'gen_delay')
#itgs.bindProperty('l', 'logfile')
#itgs.bindProperty('x', 'recv_logfile')
itgs.bindProperty('r', 'recv_port')

itgs.addMeasurement('senderport',  Filter::TIME, 
  {Filter::SAMPLE_SIZE => 1},
  [
    ['stream_no'],
    ['pkt_seqno'],
    ['pkt_size', Filter::SUM],
    ['gen_timestamp'],
    ['tx_timestamp']
  ]
)

if $0 == __FILE__
  p.to_xml.write($stdout, 2)
#
# Define a prototype
#
require 'handler/prototype'
require 'handler/filter'
require 'handler/appDefinition'

p = Prototype.create("test:proto:itgcbrsender")
p.name = "ITG Sender"
p.description = "Nodes which send a stream of packets"
p.defProperty('meter', 'one way delay or RTT', 'owdm')
p.defProperty('protocol', 'Protocol to use', 'udp')
p.defProperty('destinationHost', 'Host to send packets to')
#p.defProperty('sender_port', 'Host to send packets to')
p.defProperty('constsize', 'Size of packets', 1000)
p.defProperty('constrate', 'Number of bits per second', 1000)
p.defProperty('duration', 'Time for sending (millisec)', 1000)
p.defProperty('gen_delay', 'Generation delay (millisec)', 10000)
#p.defProperty('recv_logfile', 'Recv log')
p.defProperty('recv_port', 'Receiver_port', 8000)

itgs = p.addApplication(:itgs, "test:app:itgs")
itgs.bindProperty('m','meter')
itgs.bindProperty('T','protocol')
itgs.bindProperty('a', 'destinationHost')
itgs.bindProperty('c', 'constsize')
itgs.bindProperty('C', 'constrate')
itgs.bindProperty('t', 'duration')
itgs.bindProperty('d', 'gen_delay')
#itgs.bindProperty('l', 'logfile')
#itgs.bindProperty('x', 'recv_logfile')
itgs.bindProperty('r', 'recv_port')


if $0 == __FILE__
  p.to_xml.write($stdout, 2)
  puts
end


Last modified 11 years ago Last modified on 09/05/06 17:54:17