Class WireScanner
- All Implemented Interfaces:
Comparable
,ElementType
,DataListener
Wire Scanner Hardware
Represents a wire scanner diagnostic device, in particular those devices
installed at the SNS facility. This class implements the new profile device
API at SNS. The previous device API interfaced with the SMF class
.
ProfileMonitor
NOTES:
· After a command is issued to a wire scanner device the command
buffer must be cleared back to zero. This is due to a "quirk" in the current
EPICS installation where command signal echos occur in the network. To
prevent the command from being issued multiple times it is necessary to clear
the command buffer after issuing a command.
· The time between the issuing of a command and the clearing of the
command buffer is call the command latency.
· Currently the command buffer is not reset - the new controller
software appears to correct the EPICS quirk.
· This is a refactoring of the original WireScanner
class
that generalizes to the WireHarp
Ported from XAL on Jul 21, 2014. (Over-wrote old WireScanner
implementation.)
· Jonathan M. Freed
- Since:
- Mar 26, 2009 Version 1.0
- Version:
- Mar, 2010 Version 2.1, Oct, 2011 Version 2.2, Feb, 2013 Version 3.0, Mar, 2014 Version 3.1
- Author:
- Tom Pelaia, Christopher K. Allen
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
This class is a data structure for managing scan actuator configuration data parameters.static enum
Wire Scanner Commandsstatic enum
Valid arguments to commands accepting arguments.static class
A class-level representation of a wire-scanner command.static class
Data structure containing the fitted profile data available after data acquisition (i.e., the profile fit as computed by the acquisition software).static class
Data structure contain the profile data available during data acquisition in a point-by-point fashion (i.e., as the scan progress).static class
Data structure contain the profile data available during data acquisition in a point-by-point fashion (i.e., as the scan progress).static class
Data structure containing the profile data available after data acquisition (i.e., once the scan is complete).static class
Data structure containing the profile data characteristics when modelled as a Double Gaussian signal.static class
Contains device status parameters.static class
Data structure containing the profile data characteristics when modeled as a Gaussian signal.static class
Data structure containing the configuration parameters for the on-board data processing and analysis.static class
This class is a data structure for managing scan configuration parameters.static class
Data structure containing the sampling parameters for data acquisition.static class
Data structure containing the profile data characteristics when modelled as a Double Gaussian signal.static class
Data structure containing the last available raw data trace as defined by the sample rate and duration.static class
Data structure containing configuration parameters for DAQ triggering.Nested classes/interfaces inherited from class xal.smf.impl.profile.ProfileDevice
ProfileDevice.ANGLE, ProfileDevice.GAIN, ProfileDevice.IProfileData, ProfileDevice.IProfileDomain, ProfileDevice.MACROPULSE, ProfileDevice.MVTVAL, ProfileDevice.TRGEVT
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Hardware type for the WireScanner classstatic final String
handle for the horizontal sigma Gauss channelfinal AccessibleProperty
static final String
software type for the Wire Scanner classstatic final String
device typestatic final String
handle for the vertical sigma Gauss channelfinal AccessibleProperty
-
Constructor Summary
ConstructorsConstructorDescriptionWireScanner
(String nodeID) Create a newWireScanner
object.WireScanner
(String nodeID, ChannelFactory channelFactory) Primary Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
analysisParametersSelect
(ProfileDevice.MACROPULSE enmBmSct, double dblBmFrac) Changes the data processing parameters (see
) so that the on-board controller selects the beam micro-bunch section for computing measurement results.WireScanner.PrcgConfig
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).int[]
Returns the command result code(s).Derived class may furnish a unique software typegetType()
Get the device typevoid
Issue a wire scanner command with no arguments.void
runCommand
(WireScanner.CmdPck cmdPck) Issue a wire scanner command with or without arguments arguments.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.impl.profile.ProfileDevice
acquireConfig, acquireData, testConnection
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, getStatus, getTwiss, 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
-
Field Details
-
TYPE
device type- See Also:
-
SOFTWARE_TYPE
software type for the Wire Scanner class- See Also:
-
HARDWARE_TYPE
Hardware type for the WireScanner class- See Also:
-
HORIZONTAL_SIGMA_GAUSS_HANDLE
handle for the horizontal sigma Gauss channel- See Also:
-
horSigGauss
-
VERTICAL_SIGMA_GAUSS_HANDLE
handle for the vertical sigma Gauss channel- See Also:
-
vertSigGauss
-
-
Constructor Details
-
WireScanner
Primary Constructor.- Parameters:
nodeID
- unique identifier for this nodechannelFactory
- factory for generating channels for this node
-
WireScanner
Create a newWireScanner
object.- Parameters:
nodeID
-- Since:
- Jun 18, 2009
-
-
Method Details
-
getType
Get the device type- Specified by:
getType
in classAcceleratorNode
- Returns:
- The type identifier of this class
-
getSoftType
Derived class may furnish a unique software type- Overrides:
getSoftType
in classAcceleratorNode
- Returns:
- the "software type" or the driver version for the hardware.
-
runCommand
public void runCommand(WireScanner.CMD cmd) throws ConnectionException, PutException, InterruptedException Issue a wire scanner command with no arguments.- Parameters:
cmd
- wire scanner command- Throws:
ConnectionException
- unable to find channelPutException
- unable to set channel valueInterruptedException
- command buffer reset thread interrupted
-
runCommand
public void runCommand(WireScanner.CmdPck cmdPck) throws IllegalArgumentException, ConnectionException, PutException, InterruptedException Issue a wire scanner command with or without arguments arguments. The command and argument list is packed in the argument of type
Here we are packing the command-argument vector as an array of typeWireScanner2.CmdPck
double
.- Parameters:
cmdPck
- packaged wire scanner command with optional arguments- Throws:
IllegalArgumentException
- argument/command inconsistencyConnectionException
- unable to find channelPutException
- unable to set channel valueInterruptedException
- command buffer reset thread interrupted
-
getCommandResult
Returns the command result code(s). These are integer valued codes for the result of a previous issued device command. See the wire scanner documentation to interpret the particular resultant code.- Returns:
- command result array of integer codes for a command result.
- Throws:
ConnectionException
- Unable to connect to result readback channelGetException
- Unable to read result from readback channel
-
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.- Overrides:
testConnection
in classProfileDevice
- 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
-
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
.- Overrides:
createMonitor
in classProfileDevice
- 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.- Overrides:
configureHardware
in classProfileDevice
- Parameters:
datPvFlds
- set of new hardware values- Throws:
ConnectionException
- unable to connect PV channelPutException
- general exception setting values- Since:
- Dec 17, 2009
-
analysisParametersSelect
public void analysisParametersSelect(ProfileDevice.MACROPULSE enmBmSct, double dblBmFrac) throws ConnectionException, NoSuchChannelException, GetException, PutException, RejectedExecutionException Changes the data processing parameters (see
) so that the on-board controller selects the beam micro-bunch section for computing measurement results.WireScanner.PrcgConfig
- Parameters:
enmBmSct
- the part of the beam on which to focus the analysisdblBmFrac
- proportion of the current beam to be used in analysis (a value 1 is the entire macro-pulse)- Throws:
RejectedExecutionException
- (runtime exception) the machine is not in 50 μsec mode, parameter will not be changedNoSuchChannelException
- error in XAL channel handle/EPICS PV bindingConnectionException
- could not connect to data processing PVsGetException
- could not retrieve some data processing parametersPutException
- unable to set the new analysis configuration parameters- Since:
- Nov 3, 2011
-