Package xal.smf
Class ChannelSuite
java.lang.Object
xal.smf.ChannelSuite
- All Implemented Interfaces:
DataListener
Manage the mapping of handles to signals and channels for a node. A signal is
the unique PV name used for accessing EPICS records. A handle is a high level
name used to access a PV in a specific context. For example a channel suite
instance typically represents a suite of PVs associated with a particular
element. Consider a BPM element. It has several PVs associated with it. The
handles are labels common to all BPMs such as "xAvg", "yAvg", ... The handle
is used to access a particular PV when applied to an element. So for example
"xAvg" applied to BPM 1 of the MEBT refers to the specific PV
"MEBT_Diag:BPM01:xAvg". Thus a handle is to a ChannelSuite instance much like
an instance variable is to an instance of a class.
- Author:
- tap
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of ChannelSuite using the default channel factoryChannelSuite
(ChannelFactory channelFactory) Primary constructor for creating an instance of channel suite -
Method Summary
Modifier and TypeMethodDescriptiondataLabel() provides the name used to identify the class in an external data source.getChannel
(String handle) Get the channel corresponding to the specified handle.get the channel factoryfinal Collection<String>
Get all of the handles managed by the is channel suite.final String
Get the channel signal corresponding to the handle.final ValueTransform
getTransform
(String handle) Get the transform associated with the specified handle.final boolean
See if this channel suite manages the specified handle.protected boolean
See if this channel suite manages the specified signal.boolean
isSettable
(String handle) Determine whether the handle's corresponding PV is settable.final boolean
Determine whether the handle's corresponding PV is valid.void
putChannel
(String handle, String signal, boolean settable) Convenience method to programmatically add or replace a channel corresponding to the specified handle with valid set to true and no transformvoid
putChannel
(String handle, String signal, boolean settable, String transformKey) Convenience method to programmatically add or replace a channel corresponding to the specified handle with valid set to truevoid
putChannel
(String handle, String signal, boolean settable, String transformKey, boolean valid) Programmatically add or replace a channel corresponding to the specified handlevoid
putTransform
(String name, ValueTransform transform) Programmatically assign a transform for the specified namevoid
setChannelFactory
(ChannelFactory channelFactory) set a new channel factory and clears the old channel mapvoid
setSettable
(String handle, boolean settable) Set settable property for the PV associated with the handle.void
update
(DataAdaptor adaptor) Update the data based on the information provided by the data provider.void
write
(DataAdaptor adaptor) Write data to the data adaptor for storage.
-
Field Details
-
DATA_LABEL
- See Also:
-
-
Constructor Details
-
ChannelSuite
public ChannelSuite()Creates a new instance of ChannelSuite using the default channel factory -
ChannelSuite
Primary constructor for creating an instance of channel suite- Parameters:
channelFactory
- channel factory (or null for default factory) for generating channels
-
-
Method Details
-
getChannelFactory
get the channel factory -
setChannelFactory
set a new channel factory and clears the old channel map -
dataLabel
dataLabel() provides the name used to identify the class in an external data source.- Specified by:
dataLabel
in interfaceDataListener
- Returns:
- a tag that identifies the receiver's type
-
update
Update the data based on the information provided by the data provider.- Specified by:
update
in interfaceDataListener
- Parameters:
adaptor
- The adaptor from which to update the data
-
write
Write data to the data adaptor for storage.- Specified by:
write
in interfaceDataListener
- Parameters:
adaptor
- The adaptor to which the receiver's data is written
-
putChannel
public void putChannel(String handle, String signal, boolean settable, String transformKey, boolean valid) Programmatically add or replace a channel corresponding to the specified handle- Parameters:
handle
- The handle referring to the signalsignal
- PV signal associated with the handlesettable
- indicates whether the channel is settabletransformKey
- Key of the signal's transformationvalid
- specifies whether the channel is marked valid
-
putChannel
Convenience method to programmatically add or replace a channel corresponding to the specified handle with valid set to true- Parameters:
handle
- The handle referring to the signalsignal
- PV signal associated with the handlesettable
- indicates whether the channel is settabletransformKey
- Key of the signal's transformation
-
putChannel
Convenience method to programmatically add or replace a channel corresponding to the specified handle with valid set to true and no transform- Parameters:
handle
- The handle referring to the signalsignal
- PV signal associated with the handlesettable
- indicates whether the channel is settable
-
putTransform
Programmatically assign a transform for the specified name- Parameters:
name
- key for associating the transformtransform
- the value transform
-
hasSignal
See if this channel suite manages the specified signal.- Parameters:
signal
- The PV signal to check for availability.- Returns:
- true if the PV signal is available and false if not.
-
hasHandle
See if this channel suite manages the specified handle.- Parameters:
handle
- The handle to check for availability.- Returns:
- true if the handle is available and false if not.
-
getHandles
Get all of the handles managed by the is channel suite.- Returns:
- The handles managed by this channel suite.
-
getSignal
Get the channel signal corresponding to the handle.- Parameters:
handle
- The handle for which to get the PV signal name.- Returns:
- Get the PV signal name associated with the specified handle or null if it is not found.
-
getTransform
Get the transform associated with the specified handle.- Parameters:
handle
- The handle for which to get the transform.- Returns:
- The transform for the specified handle.
-
isValid
Determine whether the handle's corresponding PV is valid.- Parameters:
handle
- The handle for which to get the validity.- Returns:
- validity state of the PV or false if there is no entry for the handle
-
isSettable
Determine whether the handle's corresponding PV is settable.- Parameters:
handle
- The handle for which to get the attribute.- Returns:
- set parameter of the PV or false if there is no entry for the handle
-
setSettable
Set settable property for the PV associated with the handle.- Parameters:
handle
- The handle for which to set the settable property.settable
- Set parameter.
-
getChannel
Get the channel corresponding to the specified handle.- Parameters:
handle
- The handle for which to get the associated Channel.- Returns:
- The channel associated with the specified handle.
-