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
XalPvDescriptor.IPvDescriptor| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
strFldNm
Name of the data field in the SCADA data structure
|
| Constructor and Description |
|---|
ScadaFieldDescriptor(java.lang.String strFldNm,
java.lang.Class<?> clsType,
java.lang.String strHandleRb)
Create a new
ScadaFieldDescriptor object. |
ScadaFieldDescriptor(java.lang.String strFldNm,
java.lang.Class<?> clsType,
java.lang.String strHndRb,
java.lang.String strHndSet)
Create a new
ScadaFieldDescriptor object. |
ScadaFieldDescriptor(java.lang.String strFldNm,
XalPvDescriptor pvdFld)
Create a new
ScadaFieldDescriptor object built from an
existing . |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
clone()
Returns a deep copy of this object.
|
java.lang.String |
getFieldName()
Return the data field's name.
|
static ScadaFieldDescriptor |
makeFieldDescriptor(java.lang.String strName,
AScada.Field annFld)
Creates a
ScadaStruct$ScadaFieldDescriptor object
according to the specifications in the given arguments. |
static ScadaFieldDescriptor |
makeFieldDescriptor(java.lang.String strFldName,
java.lang.Class<?> clsScada)
This method returns data of the
annotation
meta data. |
static ScadaFieldDescriptor[] |
makeFieldDescriptorArray(java.lang.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.
|
static java.util.List<ScadaFieldDescriptor> |
makeFieldDescriptorList(java.lang.Class<?> clsScada)
This method returns meta-data of the
annotation
used to identify fields in data structures as Supervisory Control And Data
Acquisition (SCADA) fields. |
static ScadaFieldDescriptor[] |
makeFieldDescriptors(java.lang.Class<? extends AScada.Record> clsRec)
Creates and returns an array of
ScadaFieldDescriptor objects
each of which is described in the given annotation class
. |
java.lang.String |
toString()
Write out the contents of this field
descriptor as a string.
|
getPvType, getRbHandle, getSetHandle, isControllablepublic final java.lang.String strFldNm
public ScadaFieldDescriptor(java.lang.String strFldNm,
XalPvDescriptor pvdFld)
ScadaFieldDescriptor object built from an
existing PvDescriptor.strFldNm - the name of the data fieldpvdFld - channel access PV descriptor of data fieldpublic ScadaFieldDescriptor(java.lang.String strFldNm,
java.lang.Class<?> clsType,
java.lang.String strHandleRb)
ScadaFieldDescriptor object.strFldNm - the name of the data fieldclsType - the class type of the data fieldstrHandleRb - the handle of the read back channelpublic ScadaFieldDescriptor(java.lang.String strFldNm,
java.lang.Class<?> clsType,
java.lang.String strHndRb,
java.lang.String strHndSet)
ScadaFieldDescriptor object. This descriptor
represents a process variable that can be controlled and has a "set value"
channel.strFldNm - the name of the data fieldclsType - the class type of the data fieldstrHndRb - the handle of the read back channelstrHndSet - the handle of the set PV value channelpublic static ScadaFieldDescriptor[] makeFieldDescriptorArray(java.lang.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
then converts
the result into an array.
makeFieldDescriptorList(Class)
clsScada - class type of the SCADA data structurepublic static java.util.List<ScadaFieldDescriptor> makeFieldDescriptorList(java.lang.Class<?> clsScada)
This method returns meta-data of the 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 AScada.FieldScadaFieldDescriptor 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.
clsScada - class type which is meant to be a SCADA data structure
It must be annotated with AScadapublic static ScadaFieldDescriptor makeFieldDescriptor(java.lang.String strFldName, java.lang.Class<?> clsScada)
This method returns data of the 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 AScada.FieldScadaFieldDescriptor object.
strFldName - field name within the SCADA data structureclsScada - class type which is meant to be a SCADA data structure
It must be annotated with AScadanull 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 namepublic static ScadaFieldDescriptor makeFieldDescriptor(java.lang.String strName, AScada.Field annFld)
ScadaStruct$ScadaFieldDescriptor object
according to the specifications in the given arguments.strName - SCADA field nameannFld - SCADA field annotationpublic static ScadaFieldDescriptor[] makeFieldDescriptors(java.lang.Class<? extends AScada.Record> clsRec)
ScadaFieldDescriptor objects
each of which is described in the given annotation class
AScada.clsRec - class type annotated with the AScada.Record annotationpublic java.lang.String getFieldName()
public java.lang.String toString()
toString in class XalPvDescriptorObject.toString()protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class XalPvDescriptorjava.lang.CloneNotSupportedExceptionObject.clone()