Class ProfileDevice
- All Implemented Interfaces:
Comparable
,ElementType
,DataListener
- Direct Known Subclasses:
WireHarp
,WireScanner
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
- Since:
- Mar 21, 2014
- Author:
- Christopher K. Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enumeration of the projection angles used to produce the profile data.static enum
Enumeration of the gain constants for theProfileDevice
amplifier gain values.static interface
Interface exposed by data structures containing formatted data acquired from profile diagnostic devices.static interface
Interface for the generic description of the domain of profile data.static enum
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 enum
Enumeration of the various motion states.static enum
Enumeration of the available triggering events for the data acquisition. -
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ProfileDevice
(String strId) Constructor for ProfileDevice.protected
ProfileDevice
(String strId, ChannelFactory channelFactory) Primary Constructor for ProfileDevice. -
Method Summary
Modifier and TypeMethodDescription<T extends ParameterSet>
TacquireConfig
(Class<T> clsType) Retrieves a given set of configuration parameter values.<T extends SignalSet>
TacquireData
(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.createMonitor
(XalPvDescriptor.IPvDescriptor pvdFld, IEventSinkValue snkEvents, int... mskEvtType) Setup a value monitor on the given process variable (i.e., using its handle).boolean
testConnection
(Class<?> clsScada, double dblTmOut) Test the connections in all the channels of the given parameter set for this accelerator device.boolean
testConnection
(Collection<ScadaFieldDescriptor> setFds, double dblTmOut) Test the connections in all the channels of the given parameter set for this accelerator device.Methods inherited from class xal.smf.AcceleratorNode
addBucket, batchConnectAllHandles, batchConnectAllHandlesAndWait, channelSuite, clear, compareTo, dataLabel, findChannel, getAccelerator, getAccessibleProperties, getAccessibleProperties, getAlign, getAllChannels, getAndConnectChannel, getAndConnectChannelSetAndReadback, getAper, getBucket, getBuckets, getChannel, getDefaultHandles, getDesignPropertyValue, getEId, getHandles, getId, getLength, getLivePropertyChannels, getLivePropertyValue, getParent, getPId, getPitchAngle, getPosition, getPrimaryAncestor, getProperties, getReadbackHandles, getRollAngle, getSDisplay, getSetHandle, getSoftType, getStatus, getTwiss, getType, getValid, getXOffset, getYawAngle, getYOffset, getZOffset, hasBucket, hasParent, isChannelSettable, isKindOf, isMagnet, lazilyGetAndConnect, removeFromParent, setAccelerator, setAlign, setAper, setDesignPropertyValue, setLength, setLivePropertyValue, setParent, setPitchAngle, setPosition, setRollAngle, setSDisplay, setStatus, setTwiss, setValid, setValueAndVerify, setXOffset, setYawAngle, setYOffset, setZOffset, toString, update, write, writeAttributes, writeStatus
-
Constructor Details
-
ProfileDevice
Primary Constructor for ProfileDevice.- Parameters:
strId
-channelFactory
- factory for generating channels- Since:
- Mar 21, 2014
-
ProfileDevice
Constructor for ProfileDevice.- Parameters:
strId
-- Since:
- Mar 21, 2014
-
-
Method Details
-
acquireConfig
public <T extends ParameterSet> T acquireConfig(Class<T> clsType) throws ConnectionException, GetException, BadStructException Retrieves a given set of configuration parameter values. The values are returned in a new instance of the data structure type provided in the argument. (Note that all configuration parameters are contained in data structures derived from the base classParameterSet
.)- Type Parameters:
T
- type parameter of the parameter set requested- Parameters:
clsType
- class type of the parameter set requested- Returns:
- set of configuration parameters for this device
- Throws:
BadStructException
- 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 value- Since:
- Nov 15, 2011
- See Also:
-
acquireData
public <T extends SignalSet> T acquireData(Class<T> clsType) throws ConnectionException, GetException, BadStructException Acquires the current measurement data from the wire scanner data buffers. The type of data set is determined by the class type parameterT
given to this method. (Note that all data sets are data structured derived from the base classData
.)- Type Parameters:
T
- specific type of data set being requested- Parameters:
clsType
- class type of data being requested- Returns:
- measurement data set currently available on this wire scanner data buffers
- Throws:
BadStructException
- 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 buffers- Since:
- Nov 15, 2011
- See Also:
-
Data
-
createMonitor
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 intEvtType. Any combination of the following event types can be specified with a logical OR operation:
Monitor.VALUE
- fire upon PV value change
Monitor.LOG
-
Monitor.ALARM
- fire upon PV alarm value
The default value (i.e., no argument) isMonitor.VALUE
.- Parameters:
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})- Returns:
- A new monitor on the given process variable
- Throws:
NoSuchChannelException
- if the handle does not identify any process variable of this accelerator nodeConnectionException
- channel is not connectedMonitorException
- general monitor failure
-
configureHardware
Set all the hardware parameter values associated with the given data set.- Parameters:
datPvFlds
- set of new hardware values- Throws:
ConnectionException
- unable to connect PV channelPutException
- general exception setting values- Since:
- Dec 17, 2009
-
testConnection
public boolean testConnection(Class<?> clsScada, double dblTmOut) throws BadStructException, BadChannelException Test the connections in all the channels of the given parameter set for this accelerator device. The test will wait up to the given length of time before declaring failure.- Parameters:
clsScada
- type of a SCADA data structuredblTmOut
- time out before test fails (in seconds)- Returns:
true
if all connections were successful,false
if not all connection were made within given time- Throws:
BadStructException
- the given class is not a SCADA data structureBadChannelException
- An unbound channel handle within a field descriptor- Since:
- Feb 4, 2011
-
testConnection
public boolean testConnection(Collection<ScadaFieldDescriptor> setFds, double dblTmOut) throws BadChannelException Test the connections in all the channels of the given parameter set for this accelerator device. The test will wait up to the given length of time before declaring failure.- Parameters:
setFds
- set of field descriptors containing channel handlesdblTmOut
- time out before test fails (in seconds)- Returns:
true
if all connections were successful,false
if not all connection were made within given time- Throws:
BadChannelException
- An unbound channel handle within a field descriptor- Since:
- Feb 4, 2011
-