Package xal.smf.impl

Class Klystron

java.lang.Object
xal.smf.impl.Klystron
All Implemented Interfaces:
DataListener

public class Klystron extends Object implements DataListener
  • Field Details

  • Constructor Details

    • Klystron

      public Klystron(Accelerator anAccelerator)
      Constructor for Klystron using the same channel factory as the provided accelerator.
      Parameters:
      anAccelerator - the accelerator object this klystron belongs to
  • Method Details

    • dataLabel

      public String dataLabel()
      Description copied from interface: DataListener
      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
    • findChannel

      public Channel findChannel(String handle)
      Find the channel for the specified handle.
      Parameters:
      handle - The handle for the channel to fetch
      Returns:
      the channel if found or null if not found
    • getAndConnectChannel

      public Channel getAndConnectChannel(String handle) throws NoSuchChannelException
      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
    • getChannel

      public Channel getChannel(String handle) throws NoSuchChannelException
      Get the channel for the specified handle.
      Parameters:
      handle - The handle for the channel to fetch
      Returns:
      the channel
      Throws:
      NoSuchChannelException
    • getChannelSuite

      public ChannelSuite getChannelSuite()
      Get the channel suite.
      Returns:
      the channel suite.
    • getKlysAmp

      public double getKlysAmp() throws GetException
      Get the klystron's amplitude.
      Returns:
      klystron amplitude
      Throws:
      ConnectionException
      GetException
    • getKlysPhase

      public double getKlysPhase() throws GetException
      Get the klystron's phase.
      Returns:
      klystron phase
      Throws:
      ConnectionException
      GetException
    • getId

      public String getId()
      Get the unique power supply ID
      Returns:
      The power supply ID
    • getControlFlag

      public int[] getControlFlag()
      Get predefined control flags.
      Returns:
      control flag in integer array
    • getPowerFact

      public int[] getPowerFact()
      Get power distribution factors
      Returns:
      power distribution flags in integer array
    • getType

      public String getType()
      Get the klystron type.
      Returns:
      klystron type
    • getStatus

      public boolean getStatus()
    • setKlysAmp

      public void setKlysAmp(double newAmp) throws PutException
      Set klystron amplitude.
      Parameters:
      newAmp - new klystron amplitude
      Throws:
      ConnectionException
      PutException
    • setKlysPhase

      public void setKlysPhase(double newPhase) throws PutException
      Set klystron phase.
      Parameters:
      newPhase - new klystron phase
      Throws:
      ConnectionException
      PutException
    • setControlFlag

      public void setControlFlag(int[] cFlag)
      Set control flag.
      Parameters:
      cFlag - control flag in integer array
    • setPowerFact

      public void setPowerFact(int[] pFact)
      Set Power distribution factors.
      Parameters:
      pFact - power distribution factors in integer array
    • setStatus

      public void setStatus(boolean stat)
    • update

      public void update(DataAdaptor adaptor)
      Description copied from interface: DataListener
      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)
      Description copied from interface: DataListener
      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