Version 6 (modified by 19 years ago) ( diff ) | ,
---|
Orbit > OTG > Scripts Repository > raw_receiver.rb
# # Define a prototype # require 'handler/prototype' require 'handler/filter' require 'handler/appDefinition' p = Prototype.create("test:proto:raw_receiver") p.name = "RAW Receiver" p.description = "Nodes which receive packets" p.defProperty('protocol', 'Protocol to use', 'raw') p.defProperty('rxdev', 'rx dev interface') p.defProperty('dstfilter', 'dst ip address as filter','') otr= p.addApplication('otr', "test:app:otr") otr.bindProperty('protocol') otr.bindProperty('rxdev') otr.bindProperty('dstfilter') otr.addMeasurement('receiverport',Filter::TIME, {Filter::SAMPLE_SIZE => 1}, [ ['pkt_seqno'], ['flow_no'], ['rcvd_pkt_size', Filter::SUM], ['rx_timestamp'], ['rssi'], ['xmitrate'] ] ) otr.addMeasurement('flow', Filter::SAMPLE, {Filter::SAMPLE_SIZE => 1}, [ ['flow_no'], ['sender_port'] ] ) if $0 == __FILE__ p.to_xml.write($stdout, 2) puts end
Note:
See TracWiki
for help on using the wiki.