Sha256: 6cca3895b2b582efed24ab4fdef99e9708380c2ee561cfa22c027e6e7170be09
Contents?: true
Size: 333 Bytes
Versions: 3
Compression:
Stored size: 333 Bytes
Contents
require 'prologix_gpib' require 'socket' class Scanner def search(range, timeout = 0.1) array = [] range.each do |x| s = Socket.tcp("192.168.10.#{x}", 1234, connect_timeout: timeout) s.write("++ver\r\n") array << s.gets rescue => error puts error.inspect next end array end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
prologix_gpib-0.5.3 | lan_test.rb |
prologix_gpib-0.5.2 | lan_test.rb |
prologix_gpib-0.5.0 | lan_test.rb |