Class RuntimePV


  • public class RuntimePV
    extends java.lang.Object
    Process Variable, API for accessing life control system data.

    PVs are to be fetched from the PVPool and release to it when no longer used.

    The name of the PV is the name by which it was created. The underlying implementation might use a slightly different name.

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addListener​(org.csstudio.display.builder.runtime.pv.RuntimePVListener listener)
      Request notifications of PV updates.
      java.lang.String getName()  
      org.phoebus.pv.PV getPV()  
      boolean isReadonly()  
      org.epics.vtype.VType read()
      Read current value
      void removeListener​(org.csstudio.display.builder.runtime.pv.RuntimePVListener listener)  
      void setValue​(java.lang.Object new_value)
      Deprecated.
      Use write(Object) instead.
      java.lang.String toString()  
      void write​(java.lang.Object new_value)
      Write value, no confirmation
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns:
        PV name
      • addListener

        public void addListener​(org.csstudio.display.builder.runtime.pv.RuntimePVListener listener)
        Request notifications of PV updates.

        Note that the PV is shared via the PVPool. When updates are no longer desired, caller must removeListener(). Simply releasing the PV back to the PVPool will not automatically remove listeners!

        Parameters:
        listener - Listener that will receive value updates
        See Also:
        removeListener(RuntimePVListener)
      • removeListener

        public void removeListener​(org.csstudio.display.builder.runtime.pv.RuntimePVListener listener)
        Parameters:
        listener - Listener that will no longer receive value updates
      • read

        public org.epics.vtype.VType read()
        Read current value

        Should return the most recent value that listeners have received.

        Returns:
        Most recent value of the PV. null if no known value.
      • isReadonly

        public boolean isReadonly()
        Returns:
        true if PV is read-only
      • write

        public void write​(java.lang.Object new_value)
                   throws java.lang.Exception
        Write value, no confirmation
        Parameters:
        new_value - Value to write to the PV
        Throws:
        java.lang.Exception - on error
      • setValue

        @Deprecated
        public void setValue​(java.lang.Object new_value)
                      throws java.lang.Exception
        Deprecated.
        Use write(Object) instead.
        Legacy API that was accessed by some scripts
        Parameters:
        new_value - Value to write to the PV
        Throws:
        java.lang.Exception - If the new value cannot be set.
        See Also:
        write(Object)
      • getPV

        public org.phoebus.pv.PV getPV()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object