Package xal.smf.impl

Class Electrostatic

java.lang.Object
xal.smf.AcceleratorNode
xal.smf.impl.Electrostatic
All Implemented Interfaces:
Comparable, ElementType, DataListener
Direct Known Subclasses:
EDipole, EQuad

public class Electrostatic extends AcceleratorNode
  • Field Details

    • TYPE

      public static final String TYPE
      standard type for instances of this class
      See Also:
    • NO_ORIENTATION

      public static final int NO_ORIENTATION
      See Also:
    • HORIZONTAL

      public static final int HORIZONTAL
      See Also:
    • VERTICAL

      public static final int VERTICAL
      See Also:
    • bucMagnet

      protected MagnetBucket bucMagnet
      The container for the magnet information
    • useFieldReadback

      protected boolean useFieldReadback
      indicates whether to use the actual field readback or the field setting in the getField() method
    • FIELD_RB_HANDLE

      public static final String FIELD_RB_HANDLE
      field readback handle
      See Also:
    • field

      public final AccessibleProperty field
    • mainSupplyId

      protected String mainSupplyId
      the ID of this magnet's main power supply
  • Constructor Details

    • Electrostatic

      public Electrostatic(String strId, ChannelFactory channelFactory)
      Primary Constructor
    • Electrostatic

      public Electrostatic(String strId)
      Constructor
  • Method Details

    • getMagBucket

      public MagnetBucket getMagBucket()
      Returns:
      the attribute bucket containing the machine multipole fields
    • addBucket

      public void addBucket(AttributeBucket buc)
      Override AcceleratorNode implementation to check for a MultipoleBucket
      Overrides:
      addBucket in class AcceleratorNode
    • setMagBucket

      public void setMagBucket(MagnetBucket buc)
      Set the attribute bucket containing the machine magnet info
    • getType

      public String getType()
      Description copied from class: AcceleratorNode
      Derived class must furnish a unique type id
      Specified by:
      getType in class AcceleratorNode
    • getDesignField

      public double getDesignField()
      get the design field for the magnet (T for dipole, T/m for quad, etc.)
    • getEffLength

      public double getEffLength()
      get the effective magnetic length (m)
    • getDfltField

      public double getDfltField()
      get the default magnetic field
    • getField

      public double getField() throws GetException
      Get the field in this electromagnet via ca.
      Returns:
      the field 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 possible trim supply contributions. 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
    • getFieldReadback

      public double getFieldReadback() throws GetException
      Get the field in this electromagnet via ca.
      Returns:
      the readback field in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
      Throws:
      GetException
    • getFieldSetting

      public double getFieldSetting() throws GetException
      Get the value to which the main power 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
    • getMainSupply

      public MagnetMainSupply getMainSupply()
      Get the main power supply for this magnet.
      Returns:
      The main power supply for this magnet
    • getPolarity

      public double getPolarity()
      get magnet polarity
    • toFieldFromCA

      public final double toFieldFromCA(double rawValue)
      Convert the raw channel access value to get the field.
      Parameters:
      rawValue - the raw channel value
      Returns:
      the magnetic field in T/m^(n-1)
    • toCAFromField

      public final double toCAFromField(double field)
      Convert the field value to a channel access value.
      Parameters:
      field - the magnetic field in T/m^(n-1)
      Returns:
      the channel access value
    • writePowerSupplies

      protected void writePowerSupplies(DataAdaptor powerSupplyAdaptor)
      Write data to the power supply data adaptor. Put the information about the main power supply into the data adaptor.
      Parameters:
      powerSupplyAdaptor - The data sink for the power supply information
    • getOrientation

      public int getOrientation()
      Get the orientation of the magnet as defined by MagnetType. The orientation of the quad is determined by its type: QH or QV
      Returns:
      One of HORIZONTAL or VERTICAL
    • isHorizontal

      public boolean isHorizontal()
    • isVertical

      public boolean isVertical()