gov.sns.xal.smf.impl
Class MagnetMainSupply

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

public class MagnetMainSupply
extends MagnetPowerSupply

MainMagnetSupply represents a power supply that is the main supply for a magnet.


Field Summary
static java.lang.String CYCLE_ENABLE_HANDLE
           
static java.lang.String FIELD_RB_HANDLE
           
static java.lang.String FIELD_SET_HANDLE
           
 
Fields inherited from class gov.sns.xal.smf.impl.MagnetPowerSupply
accelerator, channelSuite, CURRENT_RB_HANDLE, CURRENT_SET_HANDLE, CYCLE_INVALID, CYCLE_STATE_HANDLE, CYCLE_VALID, CYCLING, strId
 
Constructor Summary
MagnetMainSupply(Accelerator anAccelerator)
          Creates a new instance of MainSupply
 
Method Summary
 double getField()
          Get the field contribution from this power supply.
 java.lang.String getType()
          Get the power supply type
 double lowerFieldLimit()
          get the field lower settable limit in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
protected  void setCycleEnable(boolean enable)
          Set the cycle enable state of the magnet power supply.
 void setField(double newField)
          Set the field contribution from this power supply.
 boolean suppliesNode(AcceleratorNode node)
          Check if the electromagnet is supplied by this power supply.
 double upperFieldLimit()
          get the field upper settable limit in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
 
Methods inherited from class gov.sns.xal.smf.impl.MagnetPowerSupply
dataLabel, getAndConnectChannel, getChannel, getChannelSuite, getCurrent, getCycleState, getId, getNodes, getNodes, lowerCurrentLimit, setCurrent, update, upperCurrentLimit, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CYCLE_ENABLE_HANDLE

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

FIELD_SET_HANDLE

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

FIELD_RB_HANDLE

public static final java.lang.String FIELD_RB_HANDLE
See Also:
Constant Field Values
Constructor Detail

MagnetMainSupply

public MagnetMainSupply(Accelerator anAccelerator)
Creates a new instance of MainSupply

Method Detail

getType

public java.lang.String getType()
Get the power supply type

Specified by:
getType in class MagnetPowerSupply
Returns:
The power supply type

setCycleEnable

protected void setCycleEnable(boolean enable)
                       throws ConnectionException,
                              PutException
Set the cycle enable state of the magnet power supply. If enabled, the magnet will be cycled when the field is set.

Parameters:
enable - True to enable cycling; false to disable cycling.
ConnectionException
PutException

getField

public double getField()
                throws ConnectionException,
                       GetException
Get the field contribution from this power supply. T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.

Returns:
the field contribution
ConnectionException
GetException

setField

public void setField(double newField)
              throws ConnectionException,
                     PutException
Set the field contribution from this power supply. If cycle enable is set to true the field is cycled otherwise it is simply 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.
ConnectionException
PutException

upperFieldLimit

public double upperFieldLimit()
                       throws ConnectionException,
                              GetException
get the field upper settable limit in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.

ConnectionException
GetException

lowerFieldLimit

public double lowerFieldLimit()
                       throws ConnectionException,
                              GetException
get the field lower settable limit in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.

ConnectionException
GetException

suppliesNode

public boolean suppliesNode(AcceleratorNode node)
Check if the electromagnet is supplied by this power supply.

Specified by:
suppliesNode in class MagnetPowerSupply
Parameters:
node - The electromagnet to check
Returns:
true if the node is supplied by this supply and false otherwise