def read_discrete_inputs(addr, ninputs)
      query("\x2" + addr.to_word + ninputs.to_word).unpack_bits[0..ninputs-1]
    end
def read_discrete_inputs(addr, ninputs)
      query("\x2" + addr.to_word + ninputs.to_word).unpack_bits[0..ninputs-1]
    end
Read discrete inputs

 @example
  read_discrete_inputs(addr, ninputs) => [1, 0, ..]

 @param [Integer] addr address first input
 @param[Integer] ninputs number inputs
 @return [Array] inputs