Interface PVULongArray

  • All Superinterfaces:
    PVArray, PVField, PVNumberArray, PVScalarArray, Serializable, SerializableArray
    All Known Implementing Classes:
    BasePVULongArray

    public interface PVULongArray
    extends PVNumberArray
    Get/put a long array. Since Java does not support unsigned the actual arguments are signed. Code that calls methods of the class is responsible for integer overflow problems. The caller must be prepared to get/put the array in chunks. The return argument is always the number of elements that were transfered. It may be less than the number requested.
    Author:
    mrk
    • Method Detail

      • get

        int get​(int offset,
                int length,
                LongArrayData data)
        Get values from a PVLongArray and put them into long[]to.
        Parameters:
        offset - the offset to the first element to get
        length - the maximum number of elements to transfer
        data - the class containing the data and an offset into the data. Get sets these values. The caller must do the actual data transfer.
        Returns:
        the number of elements that can be transfered. This is always less than or equal to length. If the value is less then length then get should be called again. If the return value is greater than 0 then data.data is a reference to the array and data.offset is the offset into the array.
      • get

        org.epics.util.array.ArrayULong get()
        Returns an unmodifiable view of the data.
        Specified by:
        get in interface PVNumberArray
        Returns:
        an unmodifiable view of the data
      • put

        int put​(int offset,
                int length,
                long[] from,
                int fromOffset)
        Put values into a PVLongArray from long[]from.
        Parameters:
        offset - the offset to the first element to put
        length - the maximum number of elements to transfer
        from - the array from which to get the data
        fromOffset - the offset into from
        Returns:
        the number of elements transfered. This is always less than or equal to length. If the value is less than the length then put should be called again.
        Throws:
        IllegalStateException - if the field is not mutable
      • shareData

        void shareData​(long[] from)
        Share the data from caller. The capacity and length are taken from the array and this array is made immutable. This should only be used to share immutable data.
        Parameters:
        from - the data to share