Interface BitSetUtil


  • public interface BitSetUtil
    Utility functions for a BitSet related to a PVStructure. Currently it only has one method.
    Author:
    mrk
    • Method Detail

      • compress

        boolean compress​(BitSet bitSet,
                         PVStructure pvStructure)
        Compress the bits in a BitSet related to a structure.

        For each structure: 1) If the bit for the structure is set then the bit for all subfields of the structure are cleared. 2) If the bit for the structure is not set but all immediate subfields have their bit set then the bit for the structure is set and the bits for all subfields are cleared.

        Note that this is a recursive algorithm.

        Channel Access can call this before sending data. It can then pass entire structures if the structure offset bit is set.

        Parameters:
        bitSet - The bitSet for pvStructure.
        pvStructure - the PVStructure relative to which the compression is performed
        Returns:
        (false,true) if (no, at least one) bit is set in bitSet.