Class SignalSet

java.lang.Object
xal.smf.impl.profile.SignalSet
All Implemented Interfaces:
DataListener
Direct Known Subclasses:
WireHarp.DataFit, WireHarp.DataRaw, WireScanner.DataFit, WireScanner.DataLiveArr, WireScanner.DataLivePt, WireScanner.DataRaw, WireScanner.Trace

public abstract class SignalSet extends Object implements DataListener

Base class for data structures contains profile data as measured by the wire scanner (ergo the identifier SignalSet. Note that these guys are different from the other data structures in that they all have common structure. Thus I have used a different (more simple, I hope) implementation to populate them. Each derived class supplies its out (field name, PV descriptor) pairs to the constructor just as in the base class.

This class is essentially an active data structure which populates itself with the measurement data from the diagnostic hardware.

A data set composed of beam profile signals measured from each plane of the wire harp. The data from each plane is available through the class attributes of type WireScanner.Signal.

The channel handles needed to connect the Signal attributes to the wire harp device are specified in the derived classes by annotating it with the WireScanner.ASignal annotation.

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

Since:
Nov 13, 2009
Version:
Mar 05, 2013
Author:
Christopher K. Allen
  • Field Details

    • hor

      protected Signal hor
      The horizontal measurement signal
    • ver

      protected Signal ver
      The vertical measurement signal
    • dia

      protected Signal dia
      The diagonal measurement signal
  • Constructor Details

  • Method Details

    • getFieldDescriptorList

      public static List<ScadaFieldDescriptor> getFieldDescriptorList(Class<? extends SignalSet> clsData) throws ScadaAnnotationException

      Returns the set of field descriptors for (field, channel) pairs used by the givenSignalSet-derived class. The given signal set must be annotated with the annotation ASignal.ASet for the operation to succeed.

      Only the descriptors for which the SignalSet annotation has values will be returned. This, of course, includes fields for which SignalSet has default values.

      Parameters:
      clsData - the SignalSet-derived child class with ASignal.ASet annotations
      Returns:
      set of field descriptors used by the given class which are provided with non-empty values in the SignalSet annotation.
      Throws:
      ScadaAnnotationException - the ASignal.ASet annotation was missing
      Since:
      Sep 27, 2011
    • getHor

      public Signal getHor()
    • getVer

      public Signal getVer()
    • getDia

      public Signal getDia()
    • getFieldDescriptors

      public List<ScadaFieldDescriptor> getFieldDescriptors()
      Returns the set of all SCADA field descriptors describing the data acquisition channels. Since this is an active data structure these channels are used internally to populate the data fields, which is profile data taken from the hardware.

      This will work. If the child class has been annotated by ASignal.ASet the Signal attributes will be connected in the zero-argument constructor.
      Returns:
      set of all channel field descriptors used by this data structure
      Since:
      Mar 15, 2011
    • getSignal

      public Signal getSignal(ProfileDevice.ANGLE angle)
      Returns the signal object of this set corresponding to the give profile angle.
      Parameters:
      angle - measurement angle of the desired signal
      Returns:
      measurement signal corresponding to the given angle
      Since:
      Apr 23, 2014
    • setSignal

      public void setSignal(ProfileDevice.ANGLE angle, Signal signal)
      Sets the signal for the given measurement angle to the given signal object.
      Parameters:
      angle - measurement angle of the modified signal
      signal - new signal for the given measurement angle
      Since:
      Apr 23, 2014
    • loadHardwareValues

      public void loadHardwareValues(ProfileDevice smfDev) throws BadStructException, ConnectionException, GetException
      Populate the fields of this data set by acquiring the current values of the signal process variables of the given device.
      Parameters:
      smfDev - hardware device from which the signal data is acquired
      Throws:
      BadStructException - data structure fields are ill-defined/incompatible
      ConnectionException - unable to connect to a descriptor read back channel
      GetException - unable to get PV value from channel access or
      Since:
      Dec 18, 2009
    • average

      public void average(SignalSet setCombine, double dblWtFac) throws IllegalArgumentException
      Averages all the signals in the signal set using the given averaging factor. See SignalSignal.average(Signal, double) for additional information.
      Parameters:
      setCombine - signal set to average into this one
      dblWtFac - averaging magnitude λ ∈ [0,1]
      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.
      Specified by:
      dataLabel in interface DataListener
      Returns:
      a tag that identifies the receiver's type
      Since:
      Mar 4, 2010
      See Also:
    • update

      public void update(DataAdaptor daptSrc) throws MissingResourceException, BadStructException
      Load the contents of this data set from the persistent store behind the DataListener interface.
      Specified by:
      update in interface DataListener
      Parameters:
      daptSrc - data source
      Throws:
      MissingResourceException - a data field was missing from the data source
      BadStructException - data structure fields are ill-defined/incompatible
      Since:
      Mar 4, 2010
      See Also:
    • write

      public void write(DataAdaptor adaptor)
      Write out the contents of this measurement data set to the given data store.
      Specified by:
      write in interface DataListener
      Parameters:
      adaptor - data store exposing DataListener interface
      Since:
      Mar 4, 2010
      See Also:
    • toString

      public String toString()
      Write out a text description of the data structure field values.
      Overrides:
      toString in class Object
      Returns:
      string representation of the data structure values
      Since:
      Feb 5, 2010
      See Also: