gov.sns.xal.smf
Class ChannelSuite

java.lang.Object
  |
  +--gov.sns.xal.smf.ChannelSuite
All Implemented Interfaces:
DataListener

public class ChannelSuite
extends java.lang.Object
implements 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.


Field Summary
protected  ChannelFactory _channelFactory
           
protected  java.util.Map channelMap
           
static java.lang.String DATA_LABEL
           
protected  SignalSuite signalSuite
           
 
Constructor Summary
ChannelSuite()
          Creates a new instance of ChannelSuite
ChannelSuite(ChannelFactory channelFactory)
          Primary constructor for creating an instance of channel suite
 
Method Summary
 java.lang.String dataLabel()
          dataLabel() provides the name used to identify the class in an external data source.
 Channel getChannel(java.lang.String handle)
          Get the channel corresponding to the specified handle.
 java.util.Collection getHandles()
          Get all of the handles managed by the is channel suite.
 java.lang.String getSignal(java.lang.String handle)
          Get the channel signal corresponding to the handle.
 ValueTransform getTransform(java.lang.String handle)
          Get the transform associated with the specified handle.
 boolean hasHandle(java.lang.String handle)
          See if this channel suite manages the specified handle.
protected  boolean hasSignal(java.lang.String signal)
          See if this channel suite manages the specified signal.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_LABEL

public static final java.lang.String DATA_LABEL
See Also:
Constant Field Values

_channelFactory

protected ChannelFactory _channelFactory

signalSuite

protected SignalSuite signalSuite

channelMap

protected java.util.Map channelMap
Constructor Detail

ChannelSuite

public ChannelSuite()
Creates a new instance of ChannelSuite


ChannelSuite

public ChannelSuite(ChannelFactory channelFactory)
Primary constructor for creating an instance of channel suite

Method Detail

dataLabel

public java.lang.String dataLabel()
dataLabel() provides the name used to identify the class in an external data source.

Specified by:
dataLabel in interface DataListener
Returns:
a tag that identifies the receiver's type

update

public void update(DataAdaptor adaptor)
Update the data based on the information provided by the data provider.

Specified by:
update in interface DataListener
Parameters:
adaptor - The adaptor from which to update the data

write

public void write(DataAdaptor adaptor)
Write data to the data adaptor for storage.

Specified by:
write in interface DataListener
Parameters:
adaptor - The adaptor to which the receiver's data is written

hasSignal

protected boolean hasSignal(java.lang.String signal)
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

public final boolean hasHandle(java.lang.String handle)
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

public final java.util.Collection getHandles()
Get all of the handles managed by the is channel suite.

Returns:
The handles managed by this channel suite.

getSignal

public final java.lang.String getSignal(java.lang.String handle)
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

public final ValueTransform getTransform(java.lang.String handle)
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.

getChannel

public Channel getChannel(java.lang.String handle)
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.