Sha256: b8ac838e019ca5b7120dc71c750b0c26a94c6da11a93392d73a690c3000c4c49

Contents?: true

Size: 456 Bytes

Versions: 1

Compression:

Stored size: 456 Bytes

Contents

module PrologixGpib::Lan
  class Error < StandardError
  end

  DEVICE_PORT = 1234
  EOL = "\r\n"

  def initialize(ip, mode: :controller, address: 9)
    @socket = TCPSocket.new ip, DEVICE_PORT

    # open_serial_port(paths)
    # flush
    # self.mode = mode
    # self.address = address
    # self.auto = :disable
    # self.eos = 0

    yield self if block_given?
  end

  def version
    @socket.send "++ver#{EOL}", 0
    @socket.gets.chomp
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
prologix_gpib-0.5.0 lib/prologix_gpib/lan.rb