code: public BitVector readCoils(int unitId, int ref, int count) throws ModbusException {
          checkTransaction();
          if (readCoilsRequest == null) {
              readCoilsRequest = new ReadCoilsRequest();
          }
          readCoilsRequest.setUnitID(unitId);
          readCoilsRequest.setReference(ref);
          readCoilsRequest.setBitCount(count);
          transaction.setRequest(readCoilsRequest);
          transaction.execute();
          BitVector bv = ((ReadCoilsResponse) getAndCheckResponse()).getCoils();
          bv.forceSize(count);
          return bv;
      }
docs: Reads a given number of coil states from the slave.
  
  Note that the number of bits in the bit vector will be
  forced to the number originally requested.
  
  @param unitId the slave unit id.
  @param ref    the offset of the coil to start reading from.
  @param count  the number of coil states to be read.
  
  @return a <tt>BitVector</tt> instance holding the
  received coil states.
  
  @throws ModbusException if an I/O error, a slave exception or
  a transaction error occurs.