Package xal.smf.impl.profile
Class SignalAttrs
java.lang.Object
xal.smf.scada.ScadaRecord
xal.smf.impl.profile.SignalAttrs
- All Implemented Interfaces:
Cloneable
,DataListener
Quantitative properties of a signal.
Ported from XAL on Jul 15, 2014.
· Jonathan M. Freed
- Since:
- Feb 19, 2010
- Author:
- Christopher K. Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enumeration of the signal properties data fields.Nested classes/interfaces inherited from class xal.smf.scada.ScadaRecord
ScadaRecord.IFieldDescriptor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionCreates a new, uninitialized instance ofSignalAttrs
which is not connected to any hardware.protected
SignalAttrs
(List<ScadaFieldDescriptor> lstPfdSet) Create a newSignalAttrs
object.protected
SignalAttrs
(List<ScadaFieldDescriptor> lstPfdSet, AcceleratorNode ws) Create a new, initializedSignalAttrs
object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
average
(SignalAttrs sigAcq, double dblWtFac) Performs an averaging operation with the givenSignalAttrs
object using the given weighting factor.static SignalAttrs
createConnectedSignal
(ASignalAttrs annAttrs) Creates a new instance of theSignal
class which is connected to a given device whose signal fields are described in the given annotation.Label used for parameter set identification.void
update
(DataAdaptor daptSrc) Loads the data structure from the given data source while respecting the various data format versions.Methods inherited from class xal.smf.scada.ScadaRecord
clone, getFieldDescriptor, getFieldDescriptorMap, getFieldDescriptors, loadHardwareValues, setFieldFromPV, setHardwareValues, setPvFromField, toString, write
-
Constructor Details
-
SignalAttrs
public SignalAttrs()Creates a new, uninitialized instance ofSignalAttrs
which is not connected to any hardware.- Since:
- Mar 21, 2013
-
SignalAttrs
Create a newSignalAttrs
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, initializedSignalAttrs
object. Data field values are taken immediately from the diagnostic devices.- Parameters:
lstPfdSet
- field descriptors for this data setws
- hardware device to acquire data- Throws:
IllegalArgumentException
- general field incompatibility exceptionConnectionException
- unable to connect to a parameter read back channelGetException
- general CA GET exception while fetch field value- Since:
- Feb 25, 2010
-
-
Method Details
-
createConnectedSignal
Creates a new instance of theSignal
class which is connected to a given device whose signal fields are described in the given annotation. When created here, theSignal
object becomes a fully functional
and can automatically acquire data from the connected device.ScadaRecord
- 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
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 insigAcq
.NOTES:
· The standard deviation is weighted vectorially.
- Parameters:
sigAcq
- signal u to average into this one vdblWtFac
- 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
Label used for parameter set identification.- Returns:
- a tag that identifies the receiver's type
- Since:
- Mar 4, 2010
- See Also:
-
update
Loads the data structure from the given data source while respecting the various data format versions.- Specified by:
update
in interfaceDataListener
- Overrides:
update
in classScadaRecord
- Parameters:
daptSrc
- The adaptor from which to update the data- Throws:
MissingResourceException
- a data field was missing from the data sourceBadStructException
- data structure fields are ill-defined/incompatible- Since:
- Oct 15, 2014
- See Also:
-