public abstract class Electromagnet extends Magnet
Modifier and Type | Class and Description |
---|---|
static class |
Electromagnet.Property
accessible properties
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
_useFieldReadback
indicates whether to use the actual field readback or the field setting in the getField() method
|
static java.lang.String |
FIELD_RB_HANDLE
field readback handle
|
protected java.lang.String |
mainSupplyId
the ID of this magnet's main power supply
|
static java.lang.String |
s_strType
the node type
|
leff, m_bucMagnet
channelSuite, m_bolIsSoft, m_bolStatus, m_bolValid, m_bucAlign, m_bucAper, m_bucTwiss, m_dblLen, m_dblPos, m_dblS, m_mapAttrs, m_objAccel, m_seqParent, m_strEId, m_strId, m_strPId
DIPOLE, HORIZONTAL, NO_ORIENTATION, OCT, OCTUPOLE, poles, QUAD, QUADRUPOLE, SEXT, SEXTUPOLE, SOL, SOLENOID, VERTICAL
Constructor and Description |
---|
Electromagnet(java.lang.String strId)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Channel |
findChannel(java.lang.String handle)
Find the channel for the specified handle searching the main supply if necessary.
|
double |
getCurrent()
Get the main power supply current in this electromagnet via ca (A)
|
int |
getCycleState()
Gets the cycle state of the magnet.
|
double |
getDesignPropertyValue(java.lang.String propertyName)
Get the design value for the specified property
|
double |
getField()
Get the field in this electromagnet via ca.
|
double |
getFieldInt()
Get the integrated field in this electromagnet
T-m/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
|
double |
getFieldReadback()
Get the field in this electromagnet via ca.
|
double |
getFieldSetting()
Get the value to which the main power supply's field contribution is set.
|
java.util.Collection<java.lang.String> |
getHandles()
Get the channel handles.
|
Channel[] |
getLivePropertyChannels(java.lang.String propertyName)
Get the array of channels for the specified property
|
double |
getLivePropertyValue(java.lang.String propertyName,
double[] channelValues)
Get the live property value for the corresponding array of channel values in the order given by getLivePropertyChannels()
|
MagnetMainSupply |
getMainSupply()
Get the main power supply for this magnet.
|
double |
getTotalFieldSetting()
Get the value to which the field is set including both the main supply and possible trim supply contributions.
|
boolean |
isPermanent()
Since this is an electro-magnet we override the inherited method to
advertise this characteristic.
|
double |
lowerAlarmFieldLimit()
Get the field lower settable limit of the main power supply in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
|
double |
lowerCurrentLimit()
get the main power supply current lower settable limit (A)
|
double |
lowerDisplayFieldLimit()
Get the field lower settable limit of the main power supply in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
|
double |
lowerFieldLimit()
Get the field lower settable limit of the main power supply
in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
|
double |
lowerWarningFieldLimit()
Get the field lower settable limit of the main power supply in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
|
void |
setCurrent(double newCurrent)
set the main power supply current in the magnet (A)
|
void |
setCycleEnable(boolean enable)
Set the cycle enable state of the magnet.
|
void |
setField(double newField)
Set the main power supply field contribution in the magnet.
|
void |
setUseFieldReadback(boolean useFieldReadback)
Set whether or not to use the field readback in the getField() method.
|
double |
toCAFromField(double field)
Convert the field value to a channel access value.
|
double |
toFieldFromCA(double rawValue)
Convert the raw channel access value to get the field.
|
void |
update(DataAdaptor adaptor)
Update the node with data from the provided adaptor.
|
protected void |
updatePowerSupplies(DataAdaptor powerSupplyAdaptor)
Update data from the power supply data adaptor.
|
double |
upperAlarmFieldLimit()
Get the field upper settable limit of the main power supply in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
|
double |
upperCurrentLimit()
get the main power supply current lower settable limit (A)
|
double |
upperDisplayFieldLimit()
Get the field upper settable limit of the main power supply in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
|
double |
upperFieldLimit()
Get the field upper settable limit of the main power supply
in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
|
double |
upperWarningFieldLimit()
Get the field upper settable limit of the main power supply in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
|
boolean |
useFieldReadback()
Determines whether the field readback is used in the getField() method.
|
void |
write(DataAdaptor adaptor)
Encode data from the node into the provided adaptor.
|
protected void |
writePowerSupplies(DataAdaptor powerSupplyAdaptor)
Write data to the power supply data adaptor.
|
addBucket, getDesignField, getDfltField, getEffLength, getMagBucket, getNormField, getOrientation, getPolarity, getTangField, isCorrector, isHorizontal, isMagnet, isPole, isSkew, isVertical, setDfltField, setMagBucket
channelSuite, clear, dataLabel, getAccelerator, getAlign, getAndConnectChannel, getAper, getBucket, getBuckets, getChannel, getEId, getId, getLength, getParent, getPId, getPitchAngle, getPosition, getPrimaryAncestor, getRollAngle, getSDisplay, getSoftType, getStatus, getTwiss, getType, getValid, getXOffset, getYawAngle, getYOffset, getZOffset, hasBucket, hasParent, isKindOf, lazilyGetAndConnect, removeFromParent, setAccelerator, setAlign, setAper, setLength, setParent, setPitchAngle, setPosition, setRollAngle, setSDisplay, setStatus, setTwiss, setValid, setXOffset, setYawAngle, setYOffset, setZOffset, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isKindOf
public static final java.lang.String s_strType
public static final java.lang.String FIELD_RB_HANDLE
protected boolean _useFieldReadback
protected java.lang.String mainSupplyId
public void update(DataAdaptor adaptor) throws java.lang.NumberFormatException
update
in interface DataListener
update
in class AcceleratorNode
adaptor
- The data providerjava.lang.NumberFormatException
protected void updatePowerSupplies(DataAdaptor powerSupplyAdaptor)
powerSupplyAdaptor
- The data provider of power supply information.public void write(DataAdaptor adaptor)
write
in interface DataListener
write
in class AcceleratorNode
adaptor
- The data storeprotected void writePowerSupplies(DataAdaptor powerSupplyAdaptor)
powerSupplyAdaptor
- The data sink for the power supply informationpublic void setUseFieldReadback(boolean useFieldReadback)
useFieldReadback
- true to use the field readback and false to use the field setting.public boolean useFieldReadback()
public java.util.Collection<java.lang.String> getHandles()
getHandles
in class AcceleratorNode
public Channel findChannel(java.lang.String handle)
findChannel
in class AcceleratorNode
handle
- The handle for the channel to get.public MagnetMainSupply getMainSupply()
public double getDesignPropertyValue(java.lang.String propertyName)
getDesignPropertyValue
in class AcceleratorNode
public double getLivePropertyValue(java.lang.String propertyName, double[] channelValues)
getLivePropertyValue
in class AcceleratorNode
public Channel[] getLivePropertyChannels(java.lang.String propertyName)
getLivePropertyChannels
in class AcceleratorNode
public void setCycleEnable(boolean enable) throws ConnectionException, PutException
enable
- True to enable cycling; false to disable cycling.ConnectionException
PutException
public int getCycleState() throws ConnectionException, GetException
ConnectionException
GetException
public double getField() throws ConnectionException, GetException
ConnectionException
GetException
public double getFieldReadback() throws ConnectionException, GetException
ConnectionException
GetException
public double getFieldInt() throws ConnectionException, GetException
ConnectionException
GetException
public void setField(double newField) throws ConnectionException, PutException
newField
- is the new field level in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.ConnectionException
PutException
public double getFieldSetting() throws ConnectionException, GetException
ConnectionException
GetException
public double getTotalFieldSetting() throws ConnectionException, GetException
ConnectionException
GetException
public final double toFieldFromCA(double rawValue)
rawValue
- the raw channel valuepublic final double toCAFromField(double field)
field
- the magnetic field in T/m^(n-1)public double upperFieldLimit() throws ConnectionException, GetException
ConnectionException
GetException
public double lowerFieldLimit() throws ConnectionException, GetException
ConnectionException
GetException
public double upperDisplayFieldLimit() throws ConnectionException, GetException
ConnectionException
GetException
public double lowerDisplayFieldLimit() throws ConnectionException, GetException
ConnectionException
GetException
public double upperWarningFieldLimit() throws ConnectionException, GetException
ConnectionException
GetException
public double lowerWarningFieldLimit() throws ConnectionException, GetException
ConnectionException
GetException
public double upperAlarmFieldLimit() throws ConnectionException, GetException
ConnectionException
GetException
public double lowerAlarmFieldLimit() throws ConnectionException, GetException
ConnectionException
GetException
public double getCurrent() throws ConnectionException, GetException
ConnectionException
GetException
public void setCurrent(double newCurrent) throws ConnectionException, PutException
newCurrent
- is the new current (A)ConnectionException
PutException
public double upperCurrentLimit() throws ConnectionException, GetException
ConnectionException
GetException
public double lowerCurrentLimit() throws ConnectionException, GetException
ConnectionException
GetException
public boolean isPermanent()
isPermanent
in interface MagnetType
isPermanent
in class Magnet