Package xal.smf.scada

Class ScadaFieldDescriptor

java.lang.Object
xal.smf.scada.XalPvDescriptor
xal.smf.scada.ScadaFieldDescriptor

public class ScadaFieldDescriptor extends XalPvDescriptor

Maintains the (field name, field PV) pairs for the data sets formed of device PVs. For example, such data sets are supported by ScadaRecord.

ScadaFieldDescriptor objects are immutable.

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

Since:
Dec 18, 2009
Author:
Christopher K. Allen
  • Field Details

    • strFldNm

      public final String strFldNm
      Name of the data field in the SCADA data structure
  • Constructor Details

    • ScadaFieldDescriptor

      public ScadaFieldDescriptor(String strFldNm, XalPvDescriptor pvdFld)
      Create a new ScadaFieldDescriptor object built from an existing PvDescriptor.
      Parameters:
      strFldNm - the name of the data field
      pvdFld - channel access PV descriptor of data field
      Since:
      Dec 18, 2009
    • ScadaFieldDescriptor

      public ScadaFieldDescriptor(String strFldNm, Class<?> clsType, String strHandleRb)
      Create a new ScadaFieldDescriptor object.
      Parameters:
      strFldNm - the name of the data field
      clsType - the class type of the data field
      strHandleRb - the handle of the read back channel
      Since:
      Jan 13, 2010
    • ScadaFieldDescriptor

      public ScadaFieldDescriptor(String strFldNm, Class<?> clsType, String strHndRb, String strHndSet)
      Create a new ScadaFieldDescriptor object. This descriptor represents a process variable that can be controlled and has a "set value" channel.
      Parameters:
      strFldNm - the name of the data field
      clsType - the class type of the data field
      strHndRb - the handle of the read back channel
      strHndSet - the handle of the set PV value channel
      Since:
      Jan 13, 2010
  • Method Details

    • makeFieldDescriptorArray

      public static ScadaFieldDescriptor[] makeFieldDescriptorArray(Class<?> clsScada)

      This method returns the field descriptor objects for each field in the SCADA data structure, only here it is returned as an array. This is a convenience method which simply calls makeFieldDescriptorList(Class) then converts the result into an array.

      Parameters:
      clsScada - class type of the SCADA data structure
      Returns:
      an array of descriptor objects, one for each data structure field
      Since:
      Mar 1, 2011
    • makeFieldDescriptorList

      public static List<ScadaFieldDescriptor> makeFieldDescriptorList(Class<?> clsScada)

      This method returns meta-data of the AScada.Field annotation used to identify fields in data structures as Supervisory Control And Data Acquisition (SCADA) fields. The meta-data is taken from each field annotation and is used to populate a ScadaFieldDescriptor object. The sum of all annotation data for each field is returned as a list of field descriptors.

      This whole mechanism of ScadaFieldDescriptor usage is (hopefully) going to be eradicated. It is too clumsy and the Java Annotation mechanism seems more appropriate.

      Parameters:
      clsScada - class type which is meant to be a SCADA data structure It must be annotated with AScada
      Returns:
      list of field descriptors describing all the field in the data structure used for SCADA.
      Since:
      Feb 16, 2011
    • makeFieldDescriptor

      public static ScadaFieldDescriptor makeFieldDescriptor(String strFldName, Class<?> clsScada)

      This method returns data of the AScada.Field annotation meta data. The meta data is used to identify fields in data structures as Supervisory Control And Data Acquisition (SCADA) fields. The meta-data is taken the annotation around the field and entered into a new a ScadaFieldDescriptor object.

      Parameters:
      strFldName - field name within the SCADA data structure
      clsScada - class type which is meant to be a SCADA data structure It must be annotated with AScada
      Returns:
      field descriptor describing the field meta-data in the data structure or null if the field is not a SCADA type // * @throws SecurityException the given field is not public //
      Throws:
      NoSuchFieldException - there is no field of the given name
      Since:
      Mar 1, 2011
    • makeFieldDescriptor

      public static ScadaFieldDescriptor makeFieldDescriptor(String strName, AScada.Field annFld)
      Creates a ScadaStruct$ScadaFieldDescriptor object according to the specifications in the given arguments.
      Parameters:
      strName - SCADA field name
      annFld - SCADA field annotation
      Returns:
      SCADA field descriptor corresponding to the given arguments
      Since:
      Mar 3, 2011
    • makeFieldDescriptors

      public static ScadaFieldDescriptor[] makeFieldDescriptors(Class<? extends AScada.Record> clsRec)
      Creates and returns an array of ScadaFieldDescriptor objects each of which is described in the given annotation class AScada.
      Parameters:
      clsRec - class type annotated with the AScada.Record annotation
      Returns:
      array of field descriptors described in the above annotation
      Since:
      Oct 3, 2011
    • getFieldName

      public String getFieldName()
      Return the data field's name.
      Returns:
      name of the data field
      Since:
      Dec 18, 2009
    • toString

      public String toString()
      Write out the contents of this field descriptor as a string.
      Overrides:
      toString in class XalPvDescriptor
      Returns:
      description of the field descriptor
      Since:
      Mar 3, 2011
      See Also:
    • clone

      protected Object clone() throws CloneNotSupportedException
      Returns a deep copy of this object.
      Overrides:
      clone in class XalPvDescriptor
      Throws:
      CloneNotSupportedException
      Since:
      Apr 19, 2012
      See Also: