Package xal.smf.impl

Class TrimmedQuadrupole

All Implemented Interfaces:
Comparable, ElementType, MagnetType, TrimmedMagnet, DataListener

public class TrimmedQuadrupole extends Quadrupole implements TrimmedMagnet
TrimmedQuadrupole is a subclass of Quadrupole that has a trim power supply in addition to a main power supply.
Author:
tap
  • Field Details

  • Constructor Details

    • TrimmedQuadrupole

      public TrimmedQuadrupole(String strID, ChannelFactory channelFactory)
      Constructor
      Parameters:
      strID - this magnet's unique node ID
      channelFactory - factory for generating this node's channels
    • TrimmedQuadrupole

      public TrimmedQuadrupole(String strID)
      Constructor
      Parameters:
      strID - this magnet's unique node ID
  • Method Details

    • updatePowerSupplies

      protected void updatePowerSupplies(DataAdaptor powerSupplyAdaptor)
      Update data from the power supply data adaptor.
      Overrides:
      updatePowerSupplies in class Electromagnet
      Parameters:
      powerSupplyAdaptor - The data provider of power supply information.
    • writePowerSupplies

      protected void writePowerSupplies(DataAdaptor powerSupplyAdaptor)
      Write data to the power supply data adaptor.
      Overrides:
      writePowerSupplies in class Electromagnet
      Parameters:
      powerSupplyAdaptor - The data sink for the power supply information
    • getHandles

      public Collection<String> getHandles()
      Get the channel handles. Overrides the default method to add handles from the trim power supply.
      Overrides:
      getHandles in class Electromagnet
      Returns:
      The channel handles associated with this node
    • findChannel

      public Channel findChannel(String handle)
      Find the channel for the specified handle checking the trim supply if the channel suite or main supply does not contain the handle
      Overrides:
      findChannel in class Electromagnet
      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.
    • isChannelSettable

      public boolean isChannelSettable(String handle)
      Overrides:
      isChannelSettable in class Electromagnet
    • getTrimSupply

      public MagnetTrimSupply getTrimSupply()
      Get the trim power supply for this magnet.
      Specified by:
      getTrimSupply in interface TrimmedMagnet
      Returns:
      The trim power supply for this magnet
    • setTrimField

      public void setTrimField(double newField) throws PutException
      Set the trim power supply field contribution in the magnet. If cycle enable is true then the magnet is cycled before the field is set to the specified value.
      Parameters:
      newField - is the new field level in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
      Throws:
      PutException
    • getTrimFieldSetting

      public double getTrimFieldSetting() throws GetException
      Get the value to which the trim supply's field contribution is set. Note that this is not the readback.
      Returns:
      the field setting in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
      Throws:
      GetException
    • getTotalFieldSetting

      public double getTotalFieldSetting() throws GetException
      Get the value to which the field is set including both the main supply and trim supply contributions. Note that this is not the readback.
      Overrides:
      getTotalFieldSetting in class Electromagnet
      Returns:
      the field setting in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
      Throws:
      GetException
    • getTrimCurrent

      public double getTrimCurrent() throws GetException
      Get the trim power supply current in this electromagnet via ca (A)
      Throws:
      GetException
    • setTrimCurrent

      public void setTrimCurrent(double newCurrent) throws PutException
      set the trim power supply current in the magnet (A)
      Parameters:
      newCurrent - is the new current (A)
      Throws:
      PutException
    • getOrientation

      public int getOrientation()
      Get the orientation of the magnet as defined by MagnetType. The orientation of the quad is determined by its type: QTH or QTV
      Specified by:
      getOrientation in interface MagnetType
      Overrides:
      getOrientation in class Quadrupole
      Returns:
      One of HORIZONTAL or VERTICAL