Class: Lxi::NetFinder

Inherits:
Object
  • Object
show all
Includes:
FFI
Defined in:
lib/lxi/net_finder.rb

Instance Method Summary collapse

Instance Method Details

#initObject



7
8
9
10
# File 'lib/lxi/net_finder.rb', line 7

def init
  @devices = []
  Lxi.init_session
end

#search(type = :vxi11, timeout: 1000) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/lxi/net_finder.rb', line 12

def search(type = :vxi11, timeout: 1000)
  if type == :vxi11
    search_vxi11(timeout)
  elsif type == :mdns
    search_mdns(timeout)
  else
    raise Error, 'Invalid search type'
  end
end