def [](key)
      if key.instance_of?(0.class)
        @slave.send("read_#{@type}", key, 1)
      elsif key.instance_of?(Range)
        @slave.send("read_#{@type}s", key.first, key.count)
      else
        raise ModBus::Errors::ProxyException, "Invalid argument, must be integer or range. Was #{key.class}"
      end
    end
def [](key)
      if key.instance_of?(0.class)
        @slave.send("read_#{@type}", key, 1)
      elsif key.instance_of?(Range)
        @slave.send("read_#{@type}s", key.first, key.count)
      else
        raise ModBus::Errors::ProxyException, "Invalid argument, must be integer or range. Was #{key.class}"
      end
    end
Initialize a proxy for a slave and a type of operation
 Read single or multiple values from a modbus slave depending on whether a Fixnum or a Range was given.
 Note that in the case of multiples, a pluralized version of the method is sent to the slave