public abstract class AcceleratorNode extends java.lang.Object implements ElementType, DataListener
Modifier and Type | Field and Description |
---|---|
protected ChannelSuite |
channelSuite
channel suite associated with this node
|
protected boolean |
m_bolIsSoft
Indicator if this node is a "softNode" copy
|
protected boolean |
m_bolStatus
Indicator as to whether the Accelerator Node is functional
|
protected boolean |
m_bolValid
Indicator as to whether accelerator node is valid
|
protected AlignmentBucket |
m_bucAlign
alignment attribute bucket for node
|
protected ApertureBucket |
m_bucAper
aperture parameters for node
|
protected TwissBucket |
m_bucTwiss
twiss parameter bucket for node
|
protected double |
m_dblLen
length of node
|
protected double |
m_dblPos
position of node
|
protected double |
m_dblS
"s" position for global display
|
protected java.util.Map<java.lang.String,AttributeBucket> |
m_mapAttrs
all attribute buckets for node
|
protected Accelerator |
m_objAccel
the associated Accelerator object
|
protected AcceleratorSeq |
m_seqParent
parent sequence object
|
protected java.lang.String |
m_strEId
engineering identifier
|
protected java.lang.String |
m_strId
node identifier
|
protected java.lang.String |
m_strPId
physics identifier
|
Constructor and Description |
---|
AcceleratorNode(java.lang.String strId)
base constructor for an Accelector Node
|
Modifier and Type | Method and Description |
---|---|
void |
addBucket(AttributeBucket buc)
General attribute buckets support
|
ChannelSuite |
channelSuite()
channel suite accessor
|
void |
clear()
remove this node from the accelerator hieracrhcy
|
java.lang.String |
dataLabel()
implement DataListener interface
|
Channel |
findChannel(java.lang.String handle)
Attempt to find a channel for the given handle.
|
Accelerator |
getAccelerator()
return the top level accelerator that this node belongs to
|
AlignmentBucket |
getAlign()
returns the bucket containing the alignment parameters
- see attr.AlignBucket
|
Channel |
getAndConnectChannel(java.lang.String handle)
Get the channel corresponding to the specified handle and connect it.
|
ApertureBucket |
getAper()
returns the bucket containing the Aperture parameters
- see attr.ApertureBucket
|
AttributeBucket |
getBucket(java.lang.String type) |
java.util.Collection<AttributeBucket> |
getBuckets() |
Channel |
getChannel(java.lang.String chanHandle)
this method returns the Channel object of this node, associated with
a prescibed PV name.
|
double |
getDesignPropertyValue(java.lang.String propertyName)
Get the design value for the specified property
|
java.lang.String |
getEId()
return the engineering ID of this node
|
java.util.Collection<java.lang.String> |
getHandles()
accessor to channel suite handles
|
java.lang.String |
getId()
return the ID of this node
|
double |
getLength()
return the physical length of this node (m)
|
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()
|
AcceleratorSeq |
getParent()
return the parent sequence that this node belongs to
|
java.lang.String |
getPId()
return the physics ID of this node
|
double |
getPitchAngle()
returns device pitch angle in degrees
|
double |
getPosition()
return the position of this node, along the reference orbit
within its sequence (m)
|
AcceleratorSeq |
getPrimaryAncestor()
get the primary ancestor sequence that is a direct child of the accelerator
|
double |
getRollAngle()
returns device roll angle in degrees
|
double |
getSDisplay()
return global "s" display coordinate
|
java.lang.String |
getSoftType()
Derived class may furnish a unique software type
|
boolean |
getStatus()
Runtime indication of accelerator component operation
|
TwissBucket |
getTwiss()
returns the bucket containing the twiss parameters
- see attr.TwissBucket
|
abstract java.lang.String |
getType()
Derived class must furnish a unique type id
|
boolean |
getValid()
Runtime indication of the validatity of component operation
|
double |
getXOffset()
returns device x offset
|
double |
getYawAngle()
returns device yaw angle in degrees
|
double |
getYOffset()
returns device y offset
|
double |
getZOffset()
returns device z offset
|
boolean |
hasBucket(AttributeBucket bucket) |
boolean |
hasParent()
Indicates if the node has a parent set
|
boolean |
isKindOf(java.lang.String compType)
Determine if a node is of the specified type.
|
boolean |
isMagnet()
Determine if the node is a magnet.
|
Channel |
lazilyGetAndConnect(java.lang.String chanHandle,
Channel channel)
A method to make an EPICS ca connection for a given PV name
The channel connection is initiated, and no extra work is
done, if the channel connection already exists
|
protected void |
removeFromParent()
remove this node from its immediate parent sequence
|
protected void |
setAccelerator(Accelerator accel)
set the top level accelerator for this node
|
void |
setAlign(AlignmentBucket buc)
sets the bucket containing the twiss parameters
- see attr.TwissBucket
|
void |
setAper(ApertureBucket buc)
sets the bucket containing the Aperture parameters
- see attr.ApertureBucket
|
void |
setLength(double length)
set the length of this accelerator node
|
protected void |
setParent(AcceleratorSeq parent)
define the parent sequence for this node
|
void |
setPitchAngle(double angle)
set device pitch angle
|
void |
setPosition(double position)
set the position of this accelerator node within its parent sequence
|
void |
setRollAngle(double angle)
set device roll angle
|
void |
setSDisplay(double dblS)
set "s" coordinate
|
void |
setStatus(boolean bolStatus)
Runtime indication of accelerator operation
|
void |
setTwiss(TwissBucket buc)
sets the bucket containing the alignment parameters
- see attr.AlignBucket
|
void |
setValid(boolean bolValid)
Runtime indication of the validatity of component operation
|
void |
setXOffset(double offset)
set device x offset
|
void |
setYawAngle(double angle)
set device yaw angle
|
void |
setYOffset(double offset)
set device y offset
|
void |
setZOffset(double offset)
set device z offset
|
java.lang.String |
toString()
Returns the identifier string of the node.
|
void |
update(DataAdaptor adaptor)
implement DataListener interface
|
void |
write(DataAdaptor adaptor)
implement DataListener interface
|
protected java.lang.String m_strId
protected java.lang.String m_strPId
protected java.lang.String m_strEId
protected double m_dblPos
protected double m_dblLen
protected AcceleratorSeq m_seqParent
protected Accelerator m_objAccel
protected java.util.Map<java.lang.String,AttributeBucket> m_mapAttrs
protected AlignmentBucket m_bucAlign
protected TwissBucket m_bucTwiss
protected ApertureBucket m_bucAper
protected boolean m_bolStatus
protected boolean m_bolValid
protected double m_dblS
protected boolean m_bolIsSoft
protected ChannelSuite channelSuite
public AcceleratorNode(java.lang.String strId)
strId
- the string ID for this nodepublic abstract java.lang.String getType()
public java.lang.String getSoftType()
public java.lang.String dataLabel()
dataLabel
in interface DataListener
public void update(DataAdaptor adaptor) throws java.lang.NumberFormatException
update
in interface DataListener
adaptor
- The adaptor from which to update the datajava.lang.NumberFormatException
public void write(DataAdaptor adaptor)
write
in interface DataListener
adaptor
- The adaptor to which the receiver's data is writtenpublic Channel findChannel(java.lang.String handle)
handle
- the handle for which to find an associated channelpublic Channel getChannel(java.lang.String chanHandle) throws NoSuchChannelException
chanHandle
- The handle to the epics channel in stored in the channel suiteNoSuchChannelException
public Channel getAndConnectChannel(java.lang.String handle) throws NoSuchChannelException, ConnectionException
handle
- The handle for the channel to get.NoSuchChannelException
- if no such channel as specified by the handle is associated with this node.ConnectionException
- if the channel cannot be connectedpublic Channel lazilyGetAndConnect(java.lang.String chanHandle, Channel channel) throws ConnectionException, NoSuchChannelException
public double getDesignPropertyValue(java.lang.String propertyName)
public double getLivePropertyValue(java.lang.String propertyName, double[] channelValues)
public Channel[] getLivePropertyChannels(java.lang.String propertyName)
public java.lang.String getId()
public java.lang.String getEId()
public java.lang.String getPId()
public double getLength()
public double getPosition()
public double getSDisplay()
public Accelerator getAccelerator()
public AcceleratorSeq getParent()
public AcceleratorSeq getPrimaryAncestor()
public boolean hasParent()
public boolean getStatus()
public boolean getValid()
public void setPosition(double position)
public void setLength(double length)
public void setSDisplay(double dblS)
dblS
- s coordinatepublic void setStatus(boolean bolStatus)
bolStatus
- true(up and running)
false(down)public void setValid(boolean bolValid)
bolValid
- true(valid operation)
false(questionable operation)public void addBucket(AttributeBucket buc)
public java.util.Collection<AttributeBucket> getBuckets()
public AttributeBucket getBucket(java.lang.String type)
public boolean hasBucket(AttributeBucket bucket)
public TwissBucket getTwiss()
public AlignmentBucket getAlign()
public double getPitchAngle()
public double getYawAngle()
public double getRollAngle()
public double getXOffset()
public double getYOffset()
public double getZOffset()
public ApertureBucket getAper()
public void setAlign(AlignmentBucket buc)
public void setTwiss(TwissBucket buc)
public void setAper(ApertureBucket buc)
public void setPitchAngle(double angle)
angle
- pitch angle in degreepublic void setYawAngle(double angle)
angle
- yaw angle in degreepublic void setRollAngle(double angle)
angle
- roll angle in degreepublic void setXOffset(double offset)
offset
- x offsetpublic void setYOffset(double offset)
offset
- y offsetpublic void setZOffset(double offset)
offset
- z offsetpublic void clear()
protected void removeFromParent()
protected void setParent(AcceleratorSeq parent)
protected void setAccelerator(Accelerator accel)
public ChannelSuite channelSuite()
public java.util.Collection<java.lang.String> getHandles()
public boolean isKindOf(java.lang.String compType)
isKindOf
in interface ElementType
compType
- The type against which to compare.public boolean isMagnet()
isMagnet
in interface ElementType
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
,
getId()