Sha256: 20407c61f388a06b641f83e2b154b42eea8925b67578c0255c05c0ee7db2234e

Contents?: true

Size: 972 Bytes

Versions: 51

Compression:

Stored size: 972 Bytes

Contents

# Trisul Remote Protocol TRP Demo script
# Akhil.M & Dhinesh.K (c) 2010 Unleash Networks
# Testing change 
require 'rubygems'

require './helper'
include TrisulRP::Protocol
include TrisulRP::Keys
include TrisulRP::Utils

class TestTrisulrp < Test::Unit::TestCase

	def test_cg

    target_guid = "{C51B48D4-7876-479E-B0D9-BD9EFF03CE2E}"

    TrisulRP::Protocol.connect("127.0.0.1",12001,"Demo_Client.crt","Demo_Client.key") do |conn|

    tmarr= TrisulRP::Protocol.get_available_time(conn)
    req =TrisulRP::Protocol.mk_request(TRP::Message::Command::COUNTER_GROUP_REQUEST,
         :counter_group => target_guid,
         :time_interval =>  mk_time_interval(tmarr))

    TrisulRP::Protocol.get_response(conn,req) do |resp|
          p "Counter Group = #{resp.counter_group}"
          p "Meter = #{resp.meter}"
          resp.keys.each do |key|
              p "Details = {Key=>#{key.key},Label=>#{key.label},Volume=>#{key.metric}"
          end
    end
	end

end

end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
trisulrp-3.2.43 test/test_cg.rb
trisulrp-3.2.42 test/test_cg.rb
trisulrp-3.2.41 test/test_cg.rb
trisulrp-3.2.40 test/test_cg.rb
trisulrp-3.2.39 test/test_cg.rb
trisulrp-3.2.38 test/test_cg.rb
trisulrp-3.2.37 test/test_cg.rb
trisulrp-3.2.36 test/test_cg.rb
trisulrp-3.2.35 test/test_cg.rb
trisulrp-3.2.34 test/test_cg.rb
trisulrp-3.2.32 test/test_cg.rb
trisulrp-3.2.31 test/test_cg.rb
trisulrp-3.2.27 test/test_cg.rb
trisulrp-3.2.26 test/test_cg.rb
trisulrp-3.2.16 test/test_cg.rb
trisulrp-3.2.15 test/test_cg.rb
trisulrp-3.2.14 test/test_cg.rb
trisulrp-3.2.13 test/test_cg.rb
trisulrp-3.2.9 test/test_cg.rb
trisulrp-3.2.8 test/test_cg.rb