Class SignalAttrs

java.lang.Object
xal.smf.scada.ScadaRecord
xal.smf.impl.profile.SignalAttrs
All Implemented Interfaces:
Cloneable, DataListener

@AScada public class SignalAttrs extends ScadaRecord
Quantitative properties of a signal.

Ported from XAL on Jul 15, 2014.
· Jonathan M. Freed

Since:
Feb 19, 2010
Author:
Christopher K. Allen
  • Constructor Details

    • SignalAttrs

      public SignalAttrs()
      Creates a new, uninitialized instance of SignalAttrs which is not connected to any hardware.
      Since:
      Mar 21, 2013
    • SignalAttrs

      protected SignalAttrs(List<ScadaFieldDescriptor> lstPfdSet)
      Create a new SignalAttrs object.
      Parameters:
      lstPfdSet - list of PV descriptors for each data field
      Since:
      Feb 23, 2010
    • SignalAttrs

      protected SignalAttrs(List<ScadaFieldDescriptor> lstPfdSet, AcceleratorNode ws) throws ConnectionException, GetException
      Create a new, initialized SignalAttrs object. Data field values are taken immediately from the diagnostic devices.
      Parameters:
      lstPfdSet - field descriptors for this data set
      ws - hardware device to acquire data
      Throws:
      IllegalArgumentException - general field incompatibility exception
      ConnectionException - unable to connect to a parameter read back channel
      GetException - general CA GET exception while fetch field value
      Since:
      Feb 25, 2010
  • Method Details

    • createConnectedSignal

      public static SignalAttrs createConnectedSignal(ASignalAttrs annAttrs)
      Creates a new instance of the Signal class which is connected to a given device whose signal fields are described in the given annotation. When created here, the Signal object becomes a fully functional ScadaRecord and can automatically acquire data from the connected device.
      Parameters:
      annAttrs - annotation class containing the meta-data describing the signal connections
      Returns:
      fully operational ScadaRecord class capable of data acquisition
      Since:
      Feb 7, 2013
    • average

      public void average(SignalAttrs sigAcq, double dblWtFac) throws IllegalArgumentException

      Performs an averaging operation with the given SignalAttrs object using the given weighting factor. The quantities within this data structure are averaged in place with that of the given signal attributes structure. Letting λ denote the provided averaging factor, which is in the interval [0,1], the new values of this structure, say v' are given by the formula

          v' = λu + (1 - λ)v

      where v is the previous value of v' and u is the new value of v in sigAcq.

      NOTES:

      · The standard deviation is weighted vectorially.

      Parameters:
      sigAcq - signal u to average into this one v
      dblWtFac - weighting factor λ ∈ [0,1] for argument u
      Throws:
      IllegalArgumentException - the provided signal is not the same size as this signal
      Since:
      May 1, 2014
    • dataLabel

      public String dataLabel()
      Label used for parameter set identification.
      Returns:
      a tag that identifies the receiver's type
      Since:
      Mar 4, 2010
      See Also:
    • update

      public void update(DataAdaptor daptSrc) throws MissingResourceException, BadStructException
      Loads the data structure from the given data source while respecting the various data format versions.
      Specified by:
      update in interface DataListener
      Overrides:
      update in class ScadaRecord
      Parameters:
      daptSrc - The adaptor from which to update the data
      Throws:
      MissingResourceException - a data field was missing from the data source
      BadStructException - data structure fields are ill-defined/incompatible
      Since:
      Oct 15, 2014
      See Also: