public abstract class ProfileDevice extends AcceleratorNode
This class presents the common behavior of profile data acquisition devices. It also provides some tools for managing the device and its connections. For example, testing batch acquisition of data and configuration channels, along with some common enumerations.
Child classes can define their own specific behavior using the component-based classes
ParameterSet
and SignalSet
. They allow the profile device to
define configuration parameters and measurement data acquisition channels.
Derived classes must define the AcceleratorNode
method,
since this class has no device type of its own. It simply represents the common behavior
of profile data acquisition devices.
AcceleratorNode.getType()
Ported from XAL on Jul 15, 2014.
· Jonathan M. Freed
Modifier and Type | Class and Description |
---|---|
static class |
ProfileDevice.ANGLE
Enumeration of the projection angles used to produce the profile data.
|
static class |
ProfileDevice.GAIN
Enumeration of the gain constants for the
ProfileDevice amplifier gain values. |
static interface |
ProfileDevice.IProfileData
Interface exposed by data structures containing formatted data acquired from profile
diagnostic devices.
|
static interface |
ProfileDevice.IProfileDomain
Interface for the generic description of the domain of profile data.
|
static class |
ProfileDevice.MACROPULSE
Sections of the beam used by the analysis parameter selection
methods for setting which part of the acquired beam is used for
computing the sample values.
|
static class |
ProfileDevice.MVTVAL
Enumeration of the various motion states.
|
static class |
ProfileDevice.TRGEVT
Enumeration of the available triggering events
for the data acquisition.
|
channelSuite, m_bolIsSoft, m_bolStatus, m_bolValid, m_bucAlign, m_bucAper, m_bucTwiss, m_dblLen, m_dblPos, m_dblS, m_mapAttrs, m_objAccel, m_seqParent, m_strEId, m_strId, m_strPId
Constructor and Description |
---|
ProfileDevice(java.lang.String strId)
Constructor for ProfileDevice.
|
Modifier and Type | Method and Description |
---|---|
<T extends ParameterSet> |
acquireConfig(java.lang.Class<T> clsType)
Retrieves a given set of configuration parameter values.
|
<T extends SignalSet> |
acquireData(java.lang.Class<T> clsType)
Acquires the current measurement data from the wire scanner data buffers.
|
void |
configureHardware(ParameterSet datPvFlds)
Set all the hardware parameter values associated
with the given data set.
|
Monitor |
createMonitor(XalPvDescriptor.IPvDescriptor pvdFld,
IEventSinkValue snkEvents,
int... mskEvtType)
Setup a value monitor on the given process variable (i.e.,
using its handle).
|
boolean |
testConnection(java.lang.Class<?> clsScada,
double dblTmOut)
Test the connections in all the channels of the given parameter set for this
accelerator device.
|
boolean |
testConnection(java.util.Collection<ScadaFieldDescriptor> setFds,
double dblTmOut)
Test the connections in all the channels of the given parameter set for this
accelerator device.
|
addBucket, channelSuite, clear, dataLabel, findChannel, getAccelerator, getAlign, getAndConnectChannel, getAper, getBucket, getBuckets, getChannel, getDesignPropertyValue, getEId, getHandles, getId, getLength, getLivePropertyChannels, getLivePropertyValue, getParent, getPId, getPitchAngle, getPosition, getPrimaryAncestor, getRollAngle, getSDisplay, getSoftType, getStatus, getTwiss, getType, getValid, getXOffset, getYawAngle, getYOffset, getZOffset, hasBucket, hasParent, isKindOf, isMagnet, lazilyGetAndConnect, removeFromParent, setAccelerator, setAlign, setAper, setLength, setParent, setPitchAngle, setPosition, setRollAngle, setSDisplay, setStatus, setTwiss, setValid, setXOffset, setYawAngle, setYOffset, setZOffset, toString, update, write
public ProfileDevice(java.lang.String strId)
strId
- public <T extends ParameterSet> T acquireConfig(java.lang.Class<T> clsType) throws ConnectionException, GetException, BadStructException
ParameterSet
.)T
- type parameter of the parameter set requestedclsType
- class type of the parameter set requestedBadStructException
- the DAQ data structure and DAQ channels are incompatible or could not be constructedConnectionException
- unable to connect to a parameter readback channelGetException
- general CA GET exception while reading a parameter valueParameterSet
public <T extends SignalSet> T acquireData(java.lang.Class<T> clsType) throws ConnectionException, GetException, BadStructException
T
given to this method. (Note that all data sets are data structured derived from the
base class Data
.)T
- specific type of data set being requestedclsType
- class type of data being requestedBadStructException
- the DAQ data structure and DAQ channels are incompatible or could not be constructedConnectionException
- unable to connect to a data buffer channelGetException
- general CA GET exception while reading data buffersData
public Monitor createMonitor(XalPvDescriptor.IPvDescriptor pvdFld, IEventSinkValue snkEvents, int... mskEvtType) throws ConnectionException, MonitorException, NoSuchChannelException
Setup a value monitor on the given process variable (i.e.,
using its handle). The monitor events are
sent to the IEventSink
object provided.
One can specify the event type which fires the monitor using
the argument
Monitor.VALUE
- fire upon PV value change
Monitor.LOG
-
Monitor.ALARM
- fire upon PV alarm value
The default value (i.e., no argument) is Monitor.VALUE
.
pvdFld
- handle enumeration for process variablesnkEvents
- interface to data sinkmskEvtType
- code specifying when the monitor is fired
(or'ed combination of {Monitor.VALUE, Monitor.LOG, Monitor.ALARM})gov.sns.xal.smf.NoSuchChannelException
- if the handle does not identify any
process variable of this accelerator nodegov.sns.ca.ConnectionException
- channel is not connectedgov.sns.ca.MonitorException
- general monitor failureConnectionException
MonitorException
NoSuchChannelException
public void configureHardware(ParameterSet datPvFlds) throws PutException, ConnectionException
datPvFlds
- set of new hardware valuesConnectionException
- unable to connect PV channelPutException
- general exception setting valuespublic boolean testConnection(java.lang.Class<?> clsScada, double dblTmOut) throws BadStructException, BadChannelException
clsScada
- type of a SCADA data structuredblTmOut
- time out before test fails (in seconds)true
if all connections were successful,
false
if not all connection were made within given timeBadStructException
- the given class is not a SCADA data structureBadChannelException
- An unbound channel handle within a field descriptorBadChannelException
public boolean testConnection(java.util.Collection<ScadaFieldDescriptor> setFds, double dblTmOut) throws BadChannelException
setFds
- set of field descriptors containing channel handlesdblTmOut
- time out before test fails (in seconds)true
if all connections were successful,
false
if not all connection were made within given timeBadChannelException
- An unbound channel handle within a field descriptor