gov.sns.xal.smf
Class TimingCenter

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

public class TimingCenter
extends java.lang.Object
implements DataListener

TimingCenter holds the timing channels for the accelerator.


Field Summary
protected  ChannelSuite _channelSuite
          channel suite associated with this node
static java.lang.String BEAM_ON_EVENT_COUNT_HANDLE
          beam on event counter
static java.lang.String BEAM_ON_EVENT_HANDLE
          beam on event
static java.lang.String COUNT_HANDLE
          readback while triggered beam pulses are counting down
static java.lang.String COUNTDOWN_HANDLE
          specify how many beam pulse(s)
static java.lang.String DATA_LABEL
           
static java.lang.String DIAGNOSTIC_DEMAND_EVENT_COUNT_HANDLE
          diagnostic demand event counter
static java.lang.String DIAGNOSTIC_DEMAND_EVENT_HANDLE
          diagnostic demand event
static java.lang.String FAST_DIAGNOSTIC_EVENT_COUNT_HANDLE
          fast (6 Hz) diagnostic event counter
static java.lang.String FAST_DIAGNOSTIC_EVENT_HANDLE
          fast (6 Hz) diagnostic event
static java.lang.String MODE_HANDLE
          beam trigger mode PV: 0=Continuous, 1=Single-shot
static java.lang.String REP_RATE_HANDLE
          readback of overall rep rate
static java.lang.String RING_FREQUENCY_HANDLE
          readback of the ring frequency in MHz
static java.lang.String SLOW_DIAGNOSTIC_EVENT_COUNT_HANDLE
          slow (1 Hz) diagnostic event counter
static java.lang.String SLOW_DIAGNOSTIC_EVENT_HANDLE
          slow (1 Hz) diagnostic event
static java.lang.String TRIGGER_HANDLE
          beam trigger PV: 0=Trigger, 1=Counting
 
Constructor Summary
TimingCenter()
          Create an empty TimingCenter
 
Method Summary
 java.lang.String dataLabel()
          dataLabel() provides the name used to identify the class in an external data source.
 Channel getAndConnectChannel(java.lang.String handle)
          Get the channel corresponding to the specified handle and connect it.
 Channel getChannel(java.lang.String chanHandle)
          this method returns the Channel object of this timing center, associated with the specified channel handle.
 ChannelSuite getChannelSuite()
          Get this timing center's channel suite
static TimingCenter getDefaultTimingCenter()
          Get the default TimingCenter corresponding to the user's default main optics source
 java.util.Collection getHandles()
          accessor to channel suite handles
 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

_channelSuite

protected ChannelSuite _channelSuite
channel suite associated with this node


TRIGGER_HANDLE

public static final java.lang.String TRIGGER_HANDLE
beam trigger PV: 0=Trigger, 1=Counting

See Also:
Constant Field Values

MODE_HANDLE

public static final java.lang.String MODE_HANDLE
beam trigger mode PV: 0=Continuous, 1=Single-shot

See Also:
Constant Field Values

COUNTDOWN_HANDLE

public static final java.lang.String COUNTDOWN_HANDLE
specify how many beam pulse(s)

See Also:
Constant Field Values

COUNT_HANDLE

public static final java.lang.String COUNT_HANDLE
readback while triggered beam pulses are counting down

See Also:
Constant Field Values

REP_RATE_HANDLE

public static final java.lang.String REP_RATE_HANDLE
readback of overall rep rate

See Also:
Constant Field Values

BEAM_ON_EVENT_HANDLE

public static final java.lang.String BEAM_ON_EVENT_HANDLE
beam on event

See Also:
Constant Field Values

BEAM_ON_EVENT_COUNT_HANDLE

public static final java.lang.String BEAM_ON_EVENT_COUNT_HANDLE
beam on event counter

See Also:
Constant Field Values

DIAGNOSTIC_DEMAND_EVENT_HANDLE

public static final java.lang.String DIAGNOSTIC_DEMAND_EVENT_HANDLE
diagnostic demand event

See Also:
Constant Field Values

DIAGNOSTIC_DEMAND_EVENT_COUNT_HANDLE

public static final java.lang.String DIAGNOSTIC_DEMAND_EVENT_COUNT_HANDLE
diagnostic demand event counter

See Also:
Constant Field Values

SLOW_DIAGNOSTIC_EVENT_HANDLE

public static final java.lang.String SLOW_DIAGNOSTIC_EVENT_HANDLE
slow (1 Hz) diagnostic event

See Also:
Constant Field Values

SLOW_DIAGNOSTIC_EVENT_COUNT_HANDLE

public static final java.lang.String SLOW_DIAGNOSTIC_EVENT_COUNT_HANDLE
slow (1 Hz) diagnostic event counter

See Also:
Constant Field Values

FAST_DIAGNOSTIC_EVENT_HANDLE

public static final java.lang.String FAST_DIAGNOSTIC_EVENT_HANDLE
fast (6 Hz) diagnostic event

See Also:
Constant Field Values

FAST_DIAGNOSTIC_EVENT_COUNT_HANDLE

public static final java.lang.String FAST_DIAGNOSTIC_EVENT_COUNT_HANDLE
fast (6 Hz) diagnostic event counter

See Also:
Constant Field Values

RING_FREQUENCY_HANDLE

public static final java.lang.String RING_FREQUENCY_HANDLE
readback of the ring frequency in MHz

See Also:
Constant Field Values
Constructor Detail

TimingCenter

public TimingCenter()
Create an empty TimingCenter

Method Detail

getDefaultTimingCenter

public static TimingCenter getDefaultTimingCenter()
                                           throws ExceptionWrapper
Get the default TimingCenter corresponding to the user's default main optics source

Returns:
the default TimingCenter or null if no default has been specified
Throws:
ExceptionWrapper - if an exception occurs while parsing the data source

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

getChannelSuite

public ChannelSuite getChannelSuite()
Get this timing center's channel suite

Returns:
this timing center's channel suite

getHandles

public java.util.Collection getHandles()
accessor to channel suite handles


getChannel

public Channel getChannel(java.lang.String chanHandle)
                   throws NoSuchChannelException
this method returns the Channel object of this timing center, associated with the specified channel handle. Note - xal interacts with EPICS via Channel objects.

Parameters:
chanHandle - The handle to the desired channel stored in the channel suite
NoSuchChannelException

getAndConnectChannel

public Channel getAndConnectChannel(java.lang.String handle)
                             throws NoSuchChannelException,
                                    ConnectionException
Get the channel corresponding to the specified handle and connect it.

Parameters:
handle - The handle for the channel to get.
Returns:
The channel associated with this node and the specified handle or null if there is no match.
Throws:
NoSuchChannelException - if no such channel as specified by the handle is associated with this node.
ConnectionException - if the channel cannot be connected