Class SignalSet
- All Implemented Interfaces:
DataListener
- Direct Known Subclasses:
WireHarp.DataFit
,WireHarp.DataRaw
,WireScanner.DataFit
,WireScanner.DataLiveArr
,WireScanner.DataLivePt
,WireScanner.DataRaw
,WireScanner.Trace
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
annotation.
WireScanner.ASignal
Ported from XAL on Jul 15, 2014.
· Jonathan M. Freed
- Since:
- Nov 13, 2009
- Version:
- Mar 05, 2013
- Author:
- Christopher K. Allen
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Create a new, uninitializedSignalSet
object initialize with values fetched from the given device.protected
SignalSet
(ProfileDevice smfDev) Create a newSignalSet
object initializing it with values acquired from the given device.protected
SignalSet
(DataAdaptor daSrc) Creates a new instance ofSignalSet
and initialize the signal data from the given data source. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Averages all the signals in the signal set using the given averaging factor.Label used for parameter set identification.getDia()
static List<ScadaFieldDescriptor>
getFieldDescriptorList
(Class<? extends SignalSet> clsData) Returns the set of field descriptors for (field, channel) pairs used by the givenSignalSet
-derived class.Returns the set of all SCADA field descriptors describing the data acquisition channels.getHor()
getSignal
(ProfileDevice.ANGLE angle) Returns the signal object of this set corresponding to the give profile angle.getVer()
void
loadHardwareValues
(ProfileDevice smfDev) Populate the fields of this data set by acquiring the current values of the signal process variables of the given device.void
setSignal
(ProfileDevice.ANGLE angle, Signal signal) Sets the signal for the given measurement angle to the given signal object.toString()
Write out a text description of the data structure field values.void
update
(DataAdaptor daptSrc) Load the contents of this data set from the persistent store behind theDataListener
interface.void
write
(DataAdaptor adaptor) Write out the contents of this measurement data set to the given data store.
-
Field Details
-
hor
The horizontal measurement signal -
ver
The vertical measurement signal -
dia
The diagonal measurement signal
-
-
Constructor Details
-
SignalSet
Create a new, uninitializedSignalSet
object initialize with values fetched from the given device.- Throws:
ScadaAnnotationException
- this class is not annotated withASignal.ASet
, or the annotation is corrupt- Since:
- Jan 31, 2013
-
SignalSet
protected SignalSet(ProfileDevice smfDev) throws ScadaAnnotationException, ConnectionException, GetException, BadStructException Create a newSignalSet
object initializing it with values acquired from the given device.- Parameters:
smfDev
- data acquisition device- Throws:
ScadaAnnotationException
- theASignal.ASet
annotations are incompleteConnectionException
- unable to connect to a parameter read back channelGetException
- general CA GET exception while fetch field valueBadStructException
- the DAQ data structure and DAQ channels are incompatible, bad definition- Since:
- Jan 31, 2013
-
SignalSet
Creates a new instance ofSignalSet
and initialize the signal data from the given data source.- Parameters:
daSrc
- data source using theDataAdaptor
interface- Throws:
IllegalAccessException
- if an underlyingSignal
field is inaccessible.IllegalArgumentException
- general field incompatibility exception- Since:
- Feb 12, 2013
-
-
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 given
SignalSet
-derived class. The given signal set must be annotated with the annotationASignal.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 whichSignalSet
has default values.- Parameters:
clsData
- theSignalSet
-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
- theASignal.ASet
annotation was missing- Since:
- Sep 27, 2011
-
getHor
-
getVer
-
getDia
-
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 byASignal.ASet
theSignal
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
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
Sets the signal for the given measurement angle to the given signal object.- Parameters:
angle
- measurement angle of the modified signalsignal
- 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/incompatibleConnectionException
- unable to connect to a descriptor read back channelGetException
- unable to get PV value from channel access or- Since:
- Dec 18, 2009
-
average
Averages all the signals in the signal set using the given averaging factor. SeeSignal
for additional information.Signal.average(Signal, double)
- Parameters:
setCombine
- signal set to average into this onedblWtFac
- averaging magnitude λ ∈ [0,1]- Throws:
IllegalArgumentException
- the provided signal is not the same size as this signal- Since:
- May 1, 2014
-
dataLabel
Label used for parameter set identification.- Specified by:
dataLabel
in interfaceDataListener
- Returns:
- a tag that identifies the receiver's type
- Since:
- Mar 4, 2010
- See Also:
-
update
Load the contents of this data set from the persistent store behind theDataListener
interface.- Specified by:
update
in interfaceDataListener
- Parameters:
daptSrc
- data source- Throws:
MissingResourceException
- a data field was missing from the data sourceBadStructException
- data structure fields are ill-defined/incompatible- Since:
- Mar 4, 2010
- See Also:
-
write
Write out the contents of this measurement data set to the given data store.- Specified by:
write
in interfaceDataListener
- Parameters:
adaptor
- data store exposingDataListener
interface- Since:
- Mar 4, 2010
- See Also:
-
toString
Write out a text description of the data structure field values.
-