Class MemoryProcessVariable


  • public class MemoryProcessVariable
    extends ProcessVariable
    Memory (what you write is what you get) process variable implementation. Implementation does not handle status, severity and alarms.
    • Field Detail

      • type

        protected DBRType type
        PV type.
      • value

        protected Object value
        PV value.
      • count

        protected int count
        PV count.
      • timestamp

        protected TimeStamp timestamp
        Timestamp of set value.
      • units

        protected String units
        Units (for value).
      • upperDispLimit

        protected Number upperDispLimit
        Upper display limit.
      • lowerDispLimit

        protected Number lowerDispLimit
        Lower display value.
      • upperAlarmLimit

        protected Number upperAlarmLimit
        Upper alarm limit.
      • upperWarningLimit

        protected Number upperWarningLimit
        Upper warning limit.
      • lowerWarningLimit

        protected Number lowerWarningLimit
        Lower warning limit.
      • lowerAlarmLimit

        protected Number lowerAlarmLimit
        Lower alarm limit.
      • upperCtrlLimit

        protected Number upperCtrlLimit
        Upper control limit.
      • lowerCtrlLimit

        protected Number lowerCtrlLimit
        Lower control limit.
      • precision

        protected short precision
        Precision. Used for floating decimal value to string conversion.
      • enumLabels

        protected String[] enumLabels
        Array of labels for enum type PV.
    • Constructor Detail

      • MemoryProcessVariable

        public MemoryProcessVariable​(String name,
                                     ProcessVariableEventCallback eventCallback,
                                     DBRType type,
                                     Object initialValue)
        Constructor of memory process variable.
        Parameters:
        name - name of the PV.
        eventCallback - event callback, where to report value changes if interest is true.
        type - type of the PV (of initial value).
        initialValue - initial value, array is expected.
    • Method Detail

      • getDimensionSize

        public int getDimensionSize​(int dimension)
        Description copied from class: ProcessVariable
        The method getDimensionSize(dimension) returns the maximum number of elements in a particular dimension of the hypercube as follows:
           scalar - getDimensionCount() returns 0
           
           array -  getDimensionCount() returns 1
                    getDimensionSize(0) supplies number of elements in array
                    
           plane -  getDimensionCount() returns 2
                    getDimensionSize(0) supplies number of elements in X dimension
                    getDimensionSize(1) supplies number of elements in Y dimension
                   
           cube -   getDimensionCount() returns 3
                    getDimensionSize(0) supplies number of elements in X dimension
                    getDimensionSize(1) supplies number of elements in Y dimension
                    getDimensionSize(2) supplies number of elements in Z dimension
                    
           ...
         
        The default (base) "getDimensionSize()" returns one (scalar bounds) for all dimensions.
        Overrides:
        getDimensionSize in class ProcessVariable
        Parameters:
        dimension - dimension for which to fecth its size.
        Returns:
        requested dimenstion size.
        See Also:
        ProcessVariable.getDimensionSize(int)
      • getLowerAlarmLimit

        public Number getLowerAlarmLimit()
        Get lower alarm limit.
        Returns:
        lower alarm limit, non-null.
      • setLowerAlarmLimit

        public void setLowerAlarmLimit​(Number lowerAlarmLimit)
        Set lower alarm limit.
        Parameters:
        lowerAlarmLimit - lower alarm limit, non-null.
      • getLowerCtrlLimit

        public Number getLowerCtrlLimit()
        Get lower control limit.
        Returns:
        lower control limit, non-null.
      • setLowerCtrlLimit

        public void setLowerCtrlLimit​(Number lowerCtrlLimit)
        Set lower control limit.
        Parameters:
        lowerCtrlLimit - lower control limit, non-null.
      • getLowerDispLimit

        public Number getLowerDispLimit()
        Get lower display limit.
        Returns:
        lower display limit, non-null.
      • setLowerDispLimit

        public void setLowerDispLimit​(Number lowerDispLimit)
        Set lower display limit.
        Parameters:
        lowerDispLimit - lower display limit, non-null.
      • getLowerWarningLimit

        public Number getLowerWarningLimit()
        Get lower warning limit.
        Returns:
        lower warning limit, non-null.
      • setLowerWarningLimit

        public void setLowerWarningLimit​(Number lowerWarningLimit)
        Set lower warning limit.
        Parameters:
        lowerWarningLimit - lower warning limit, non-null.
      • getUnits

        public String getUnits()
        Get units (of value).
        Returns:
        get units, non-null.
      • setUnits

        public void setUnits​(String units)
        Set units (of value).
        Parameters:
        units - get units, non-null.
      • getUpperAlarmLimit

        public Number getUpperAlarmLimit()
        Get upper alarm limit.
        Returns:
        upper alarm limit, non-null.
      • setUpperAlarmLimit

        public void setUpperAlarmLimit​(Number upperAlarmLimit)
        Set upper alarm limit.
        Parameters:
        upperAlarmLimit - upper alarm limit, non-null.
      • getUpperCtrlLimit

        public Number getUpperCtrlLimit()
        Get upper control limit.
        Returns:
        upper control limit, non-null.
      • setUpperCtrlLimit

        public void setUpperCtrlLimit​(Number upperCtrlLimit)
        Set upper control limit.
        Parameters:
        upperCtrlLimit - upper control limit, non-null.
      • getUpperDispLimit

        public Number getUpperDispLimit()
        Get upper display limit.
        Returns:
        upper display limit, non-null.
      • setUpperDispLimit

        public void setUpperDispLimit​(Number upperDispLimit)
        Set upper display limit.
        Parameters:
        upperDispLimit - upper display limit, non-null.
      • getUpperWarningLimit

        public Number getUpperWarningLimit()
        Get upper warning limit.
        Returns:
        upper warning limit, non-null.
      • setUpperWarningLimit

        public void setUpperWarningLimit​(Number upperWarningLimit)
        Set upper warning limit.
        Parameters:
        upperWarningLimit - upper warning limit, non-null.
      • getPrecision

        public short getPrecision()
        Get precision (number of digits after decimal point). Use -1 value as undefined precision.
        Returns:
        precision.
      • setPrecision

        public void setPrecision​(short precision)
        Set precision.
        Parameters:
        precision - precision to set (number of digits after decimal point).
        See Also:
        getPrecision()
      • fillInDBR

        public void fillInDBR​(DBR value)
        Set data (units, limits, ...) to DBR. Data is obtained from this class accessors.
        Parameters:
        value - DBR to fill-in.