public abstract class AAttribute extends java.lang.Object implements IAttribute, fr.esrf.TangoApi.events.ITangoPeriodicListener, fr.esrf.TangoApi.events.ITangoChangeListener, fr.esrf.TangoApi.events.ITangoAttConfigListener
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
alias |
protected boolean |
attPropertiesLoaded |
protected fr.esrf.TangoApi.DeviceAttribute |
attribute |
protected long |
changeCount |
protected fr.esrf.TangoApi.AttributeInfoEx |
config |
protected long |
configCount |
protected Device |
device |
protected java.lang.String |
error |
protected fr.esrf.Tango.DevFailed |
eventError |
protected int |
eventType |
protected java.lang.String |
name |
protected java.lang.String |
nameSansDevice |
protected long |
periodicCount |
protected EventSupport |
propChanges |
protected PropertyStorage |
propertyStorage |
protected long |
refreshCount |
protected boolean |
skippingRefresh |
protected java.lang.String |
state |
protected AtkTimer |
timer |
protected long |
timeStamp |
ALARM, CHANGING, INVALID, OK, UNKNOWN, VALID, WARNING
ACCESS_READ, ACCESS_SERVICE, ACCESS_WRITE, ARCHIVE_EVENT, ATT_CONF_EVENT, Attr_AdmName, Attr_Description, Attr_Name, Attr_State, Attr_Status, Attr_Unknown, ATTRIBUTE, BY_CLASS, BY_DEVICE, BY_PROCESS, CHANGE_EVENT, COMMAND, CONTROL_SYSTEM, DATA_READY_EVENT, DEFAULT_LOCK_VALIDITY, eventNames, INTERFACE_CHANGE, LOGGING_CONSOLE_TARGET, LOGGING_CONSOLE_TARGET_ID, LOGGING_DEBUG, LOGGING_DEF_RFT, LOGGING_DEVICE_TARGET, LOGGING_DEVICE_TARGET_ID, LOGGING_ERROR, LOGGING_FATAL, LOGGING_FILE_TARGET, LOGGING_FILE_TARGET_ID, LOGGING_INFO, LOGGING_LEVELS, LOGGING_MAX_RFT, LOGGING_MIN_RFT, LOGGING_OFF, LOGGING_SEPARATOR, LOGGING_UNKNOWN_TARGET_ID, LOGGING_WARN, NO_SYNC, NOT_STATELESS, NotANumber, Op_BlackBox, Op_Command, Op_Command_2, Op_Command_inout, Op_Command_inout_2, Op_Command_inout_history_2, Op_Command_list, Op_Command_list_2, Op_Get_Attr_Config, Op_Get_Attr_Config_2, Op_Info, Op_Ping, Op_Read_Attr, Op_Read_Attr_2, Op_Read_Attr_history_2, Op_Set_Attr_Config, Op_Unknown, Op_Write_Attr, PERIODIC_EVENT, PIPE_EVENT, QUALITY_EVENT, Req_Attribute, Req_Operation, Req_Unknown, SERVICE_PROP_NAME, STATELESS, Tango_AllAttr, Tango_AllAttr_3, Tango_AlrmValueNotSpec, Tango_AssocWritNotSpec, Tango_AttrDataFormatName, Tango_CLNT_TIMEOUT, Tango_CmdArgTypeName, Tango_CONST_DEV_STRING, Tango_DbObjName, Tango_DEFAULT_POLL_OLD_FACTOR, Tango_DEFAULT_TIMEOUT, Tango_DEFAULT_TIMEOUT_SEC, Tango_DefaultBlackBoxDepth, Tango_DefaultDocUrl, Tango_DefaultPollRingDepth, Tango_DefaultWritableProp, Tango_DELTA_T, Tango_DescNotSet, Tango_DescNotSpec, Tango_DEV_BOOLEAN, Tango_DEV_CHAR, Tango_DEV_DOUBLE, Tango_DEV_ENCODED, Tango_DEV_ENUM, Tango_DEV_FLOAT, Tango_DEV_INT, Tango_DEV_LONG, Tango_DEV_LONG64, Tango_DEV_PIPE_BLOB, Tango_DEV_SHORT, Tango_DEV_STATE, Tango_DEV_STRING, Tango_DEV_UCHAR, Tango_DEV_ULONG, Tango_DEV_ULONG64, Tango_DEV_USHORT, Tango_DEV_VOID, Tango_DevStateName, Tango_DEVVAR_CHARARRAY, Tango_DEVVAR_DOUBLEARRAY, Tango_DEVVAR_DOUBLESTRINGARRAY, Tango_DEVVAR_FLOATARRAY, Tango_DEVVAR_LONG64ARRAY, Tango_DEVVAR_LONGARRAY, Tango_DEVVAR_LONGSTRINGARRAY, Tango_DEVVAR_SHORTARRAY, Tango_DEVVAR_STRINGARRAY, Tango_DEVVAR_ULONG64ARRAY, Tango_DEVVAR_ULONGARRAY, Tango_DEVVAR_USHORTARRAY, Tango_DevVersion, Tango_DISCARD_THRESHOLD, Tango_DispUnitNotSpec, Tango_DSDeviceDomain, Tango_EXPERT_ATTR, Tango_EXPERT_CMD, Tango_FormatNotSpec, Tango_InitialOutput, Tango_LabelNotSpec, TANGO_LOG_PATH, Tango_MAX_TRANSFER_SIZE, Tango_MaxServerNameLength, Tango_MIN_POLL_PERIOD, Tango_OPERATOR_ATTR, Tango_OPERATOR_CMD, Tango_POLL_ADD_OBJ, Tango_POLL_ATTR, Tango_POLL_CMD, Tango_POLL_REM_DEV, Tango_POLL_REM_OBJ, Tango_POLL_START, Tango_POLL_STOP, Tango_POLL_UPD_PERIOD, Tango_PollAttribute, Tango_PollCommand, Tango_QualityName, Tango_REL_1, Tango_REL_2, Tango_ResNotDefined, Tango_StdUnitNotSpec, Tango_SysProperty, Tango_TG_IMP_MINOR_DEVFAILED, Tango_TG_IMP_MINOR_NON_DEVFAILED, Tango_TG_IMP_MINOR_TO, Tango_TgLibVers, Tango_UnitNotSpec, USER_EVENT
Modifier | Constructor and Description |
---|---|
protected |
AAttribute() |
Modifier and Type | Method and Description |
---|---|
void |
addErrorListener(IErrorListener l)
An
IErrorListener is an object that listens to
error property changes from this object. |
void |
addSetErrorListener(ISetErrorListener l)
An
ISetErrorListener is an object that listens to
setting error property changes from this sttribute. |
void |
addStateListener(IAttributeStateListener l)
addStateListener adds a listener to state-changes
for this attribute. |
boolean |
areAttPropertiesLoaded()
areAttPropertiesLoaded returns true if the some ATK specific attribute properties have already
been loaded from the Tango DB. |
void |
attConfig(fr.esrf.TangoApi.events.TangoAttConfigEvent evt) |
protected void |
checkDimensions(boolean[][] o) |
protected void |
checkDimensions(double[][] o) |
protected void |
checkDimensions(java.lang.Object[][] o) |
protected void |
connectionlessInit(Device d,
java.lang.String name,
boolean doEvent) |
abstract void |
dispatch(fr.esrf.TangoApi.DeviceAttribute attValue)
Method used by optimized AttributePolledList (one read per device)
|
abstract void |
dispatchError(fr.esrf.Tango.DevFailed e)
Method used by optimized AttributePolledList (one read per device)
|
static java.lang.String[] |
flatten(java.lang.String[][] src) |
void |
freeInternalData() |
java.lang.String |
getAlias() |
fr.esrf.TangoApi.DeviceAttribute |
getAttribute() |
long |
getChangeCount() |
long |
getConfigCount() |
java.lang.String |
getDescription()
getDescription returns the description of this attribute. |
Device |
getDevice()
getDevice returns the device this IEntity belongs to. |
fr.esrf.TangoApi.DeviceAttribute |
getDeviceAttribute() |
java.lang.String |
getDisplayUnit()
getDisplayUnit returns the display unit of this attribute |
double |
getDisplayUnitFactor()
getDisplayUnitFactor returns the DisplayUnit Multiplication factor of this attribute. |
int |
getEventType() |
java.lang.String |
getFormat()
getFormat returns the human readable representation
of the format of this attribute. |
int |
getHeight()
getHeight alias for getYDimension() |
java.lang.String |
getLabel()
getLabel returns the label of this attribute. |
int |
getLevel() |
AtkEventListenerList |
getListenerList() |
int |
getMaxXDimension()
getMaxXDimension returns the max x-dimension of the
attribute |
int |
getMaxYDimension()
getMaxYDimension returns the max y-dimension of the
attribute |
java.lang.String |
getName()
Gets the name of this
IEntity |
java.lang.String |
getNameSansDevice() |
long |
getPeriodicCount() |
EventSupport |
getPropChanges() |
Property |
getProperty(java.lang.String name)
getProperty returns property with the name given in the
first parameter. |
java.util.Map |
getPropertyMap()
getPropertyMap returns a Map containing this entitys
properties. |
static java.lang.String[] |
getPropertyNames() |
PropertyStorage |
getPropertyStorage() |
long |
getRefreshCount() |
java.lang.String |
getStandardUnit()
getStandardUnit returns the standard unit of this attribute |
double |
getStandardUnitFactor()
getStandardUnitFactor returns the standard unit of this attribute. |
java.lang.String |
getState()
getState returns a human-readable representation of
the state. |
java.lang.String |
getSubscriptionError()
Returns a string that describe the error which occurs during event subscription.
|
int |
getTangoDataType() |
java.lang.String |
getType()
getType returns a human-readable representaion of the
type of this attribute. |
java.lang.String |
getUnit()
getUnit returns the unit of this attribute. |
java.lang.String |
getVersion() |
int |
getWidth()
getWidth alias for getXDimension() |
int |
getXDimension()
getXDimension returns the actual x-dimension of the
attribute. |
int |
getYDimension()
getYDimension returns the actual y-dimension of the
attribute |
boolean |
hasEvents()
hasEvents returns true if the attribute is refreshed by event system |
protected void |
init(Device d,
java.lang.String name,
fr.esrf.TangoApi.AttributeInfoEx config,
boolean doEvent) |
boolean |
isExpert() |
boolean |
isOperator() |
boolean |
isSkippingRefresh() |
boolean |
isWritable()
isWritable returns true if this attribute is writable |
void |
loadAttProperties()
Method used by some attribute viewers to force the reading of some specific at setModel().
|
protected void |
readAttError(java.lang.String s,
java.lang.Throwable t) |
protected fr.esrf.TangoApi.DeviceDataHistory[] |
readAttHistoryFromNetwork() |
protected fr.esrf.TangoApi.DeviceAttribute |
readDeviceValueFromNetwork() |
protected fr.esrf.TangoApi.DeviceAttribute |
readValueFromNetwork() |
protected void |
reconnectAtt() |
void |
removeErrorListener(IErrorListener l)
Removes the given
IErrorListener from this objects
list of errorlisteners. |
void |
removeSetErrorListener(ISetErrorListener l)
Removes a setErrorListener.
|
void |
removeStateListener(IAttributeStateListener l)
removeStateListener removes a listener to state-changes
for this attribute. |
protected void |
serializeInit() |
void |
setAlias(java.lang.String alias) |
protected void |
setAttError(java.lang.String s,
java.lang.Throwable t) |
protected void |
setConfiguration(fr.esrf.TangoApi.AttributeInfoEx c) |
void |
setDescription(java.lang.String desc)
setDescription sets the description of this attribute |
void |
setDevice(Device d) |
void |
setLabel(java.lang.String label)
setLabel sets the label of this attribute |
void |
setName(java.lang.String s)
setName sets the name of this attribute. |
void |
setProperty(java.lang.String name,
java.lang.Number value)
setProperty |
void |
setProperty(java.lang.String name,
java.lang.Number value,
boolean editable)
setProperty |
void |
setPropertyStorage(PropertyStorage propertyStorage) |
void |
setSkippingRefresh(boolean b)
Setting this property to true means that the attribute should
not read nor distribute new values when its refresh is called
|
protected void |
setState() |
protected void |
setState(fr.esrf.TangoApi.DeviceAttribute da) |
protected void |
setState(java.lang.String s) |
void |
storeConfig() |
java.lang.String |
toString() |
protected void |
writeAtt() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
refresh
protected transient fr.esrf.TangoApi.AttributeInfoEx config
protected PropertyStorage propertyStorage
protected EventSupport propChanges
protected Device device
protected fr.esrf.TangoApi.DeviceAttribute attribute
protected java.lang.String error
protected java.lang.String nameSansDevice
protected java.lang.String name
protected transient AtkTimer timer
protected java.lang.String state
protected long timeStamp
protected boolean skippingRefresh
protected java.lang.String alias
protected long refreshCount
protected long changeCount
protected long periodicCount
protected long configCount
protected int eventType
protected fr.esrf.Tango.DevFailed eventError
protected boolean attPropertiesLoaded
public java.lang.String getVersion()
protected void serializeInit() throws java.io.IOException
java.io.IOException
protected void init(Device d, java.lang.String name, fr.esrf.TangoApi.AttributeInfoEx config, boolean doEvent)
protected void connectionlessInit(Device d, java.lang.String name, boolean doEvent)
protected void reconnectAtt()
public void attConfig(fr.esrf.TangoApi.events.TangoAttConfigEvent evt)
attConfig
in interface fr.esrf.TangoApi.events.ITangoAttConfigListener
public boolean hasEvents()
IAttribute
hasEvents
returns true if the attribute is refreshed by event systemhasEvents
in interface IAttribute
public long getRefreshCount()
public long getChangeCount()
public int getEventType()
public long getPeriodicCount()
public long getConfigCount()
public java.lang.String getSubscriptionError()
public fr.esrf.TangoApi.DeviceAttribute getDeviceAttribute()
public java.lang.String toString()
toString
in class java.lang.Object
public EventSupport getPropChanges()
public java.lang.String getType()
IAttribute
getType
returns a human-readable representaion of the
type of this attribute.getType
in interface IAttribute
String
valuepublic int getTangoDataType()
public void storeConfig()
storeConfig
in interface IEntity
public java.lang.String getFormat()
IAttribute
getFormat
returns the human readable representation
of the format of this attribute. To obtain the numeric code of the
format, please consult getPropertyMap("format");getFormat
in interface IAttribute
String
valuepublic void addErrorListener(IErrorListener l)
IEntity
IErrorListener
is an object that listens to
error property changes from this object.addErrorListener
in interface IEntity
l
- an IErrorListener
valuepublic void removeErrorListener(IErrorListener l)
IEntity
IErrorListener
from this objects
list of errorlisteners.removeErrorListener
in interface IEntity
l
- an IErrorListener
valuepublic void addSetErrorListener(ISetErrorListener l)
IAttribute
ISetErrorListener
is an object that listens to
setting error property changes from this sttribute.addSetErrorListener
in interface IAttribute
l
- an ISetErrorListener
valuepublic void removeSetErrorListener(ISetErrorListener l)
IAttribute
ISetErrorListener
is an object that listens to
setting error property changes from this attribute.removeSetErrorListener
in interface IAttribute
l
- an ISetErrorListener
valuepublic void addStateListener(IAttributeStateListener l)
IAttribute
addStateListener
adds a listener to state-changes
for this attribute.addStateListener
in interface IAttribute
l
- an IAttributeStateListener
valuepublic void removeStateListener(IAttributeStateListener l)
IAttribute
removeStateListener
removes a listener to state-changes
for this attribute.removeStateListener
in interface IAttribute
l
- an IAttributeStateListener
valuepublic void setDevice(Device d)
public Device getDevice()
IEntity
getDevice
returns the device this IEntity belongs to.protected void readAttError(java.lang.String s, java.lang.Throwable t)
protected void setAttError(java.lang.String s, java.lang.Throwable t)
public java.lang.String getUnit()
IAttribute
getUnit
returns the unit of this attribute.getUnit
in interface IAttribute
String
valuepublic java.lang.String getStandardUnit()
IAttribute
getStandardUnit
returns the standard unit of this attributegetStandardUnit
in interface IAttribute
String
valuepublic double getStandardUnitFactor()
IAttribute
getStandardUnitFactor
returns the standard unit of this attribute.
The standard unit is the value which must be multiplied with the
value of the attribute to obtain the value in a unit conforming to
the standard metric system.getStandardUnitFactor
in interface IAttribute
double
valuepublic java.lang.String getDisplayUnit()
IAttribute
getDisplayUnit
returns the display unit of this attributegetDisplayUnit
in interface IAttribute
String
valuepublic double getDisplayUnitFactor()
IAttribute
getDisplayUnitFactor
returns the DisplayUnit Multiplication factor of this attribute.
The display unit factor is the value which must be multiplied with the
value of the attribute (returned by the device server) to obtain the value
which should be displayed (the value converted into display unit).
All the Number Change Events inside ATK and the Viewers use the value converted into
the display unit.getDisplayUnitFactor
in interface IAttribute
double
value
returns 1.0 if the attribute property "display_unit" is not defined or has an invalid value
returns the value defined by the attribute property "display_unit".public java.lang.String getLabel()
IAttribute
getLabel
returns the label of this attribute.getLabel
in interface IAttribute
String
valuepublic void setLabel(java.lang.String label)
IAttribute
setLabel
sets the label of this attributesetLabel
in interface IAttribute
label
- a String
valuepublic void setName(java.lang.String s)
IAttribute
setName
sets the name of this attribute.setName
in interface IAttribute
s
- a String
valuepublic void setDescription(java.lang.String desc)
IAttribute
setDescription
sets the description of this attributesetDescription
in interface IAttribute
desc
- a String
valuepublic java.lang.String getDescription()
IAttribute
getDescription
returns the description of this attribute.getDescription
in interface IAttribute
String
valuepublic int getLevel()
public boolean isOperator()
isOperator
in interface IEntity
protected void setConfiguration(fr.esrf.TangoApi.AttributeInfoEx c)
public static java.lang.String[] getPropertyNames()
public java.lang.String getName()
IEntity
IEntity
public java.lang.String getNameSansDevice()
getNameSansDevice
in interface IEntity
public boolean isWritable()
IAttribute
isWritable
returns true if this attribute is writableisWritable
in interface IAttribute
boolean
valueprotected final fr.esrf.TangoApi.DeviceAttribute readValueFromNetwork() throws fr.esrf.Tango.DevFailed
fr.esrf.Tango.DevFailed
protected final fr.esrf.TangoApi.DeviceAttribute readDeviceValueFromNetwork() throws fr.esrf.Tango.DevFailed
fr.esrf.Tango.DevFailed
public abstract void dispatch(fr.esrf.TangoApi.DeviceAttribute attValue)
attValue
- Attribute valuepublic abstract void dispatchError(fr.esrf.Tango.DevFailed e)
e
- Attribute arrorprotected void setState() throws fr.esrf.Tango.DevFailed
fr.esrf.Tango.DevFailed
protected void setState(fr.esrf.TangoApi.DeviceAttribute da) throws fr.esrf.Tango.DevFailed
fr.esrf.Tango.DevFailed
public fr.esrf.TangoApi.DeviceAttribute getAttribute()
protected void setState(java.lang.String s)
public java.lang.String getState()
IAttribute
getState
returns a human-readable representation of
the state.getState
in interface IAttribute
String
valueprotected void writeAtt() throws fr.esrf.Tango.DevFailed
fr.esrf.Tango.DevFailed
public int getMaxXDimension()
IAttribute
getMaxXDimension
returns the max x-dimension of the
attributegetMaxXDimension
in interface IAttribute
int
valuepublic int getMaxYDimension()
IAttribute
getMaxYDimension
returns the max y-dimension of the
attributegetMaxYDimension
in interface IAttribute
int
valuepublic int getYDimension()
IAttribute
getYDimension
returns the actual y-dimension of the
attributegetYDimension
in interface IAttribute
int
valuepublic int getHeight()
IAttribute
getHeight
alias for getYDimension()getHeight
in interface IAttribute
int
valuepublic int getXDimension()
IAttribute
getXDimension
returns the actual x-dimension of the
attribute.getXDimension
in interface IAttribute
int
valuepublic int getWidth()
IAttribute
getWidth
alias for getXDimension()getWidth
in interface IAttribute
int
valuepublic void setSkippingRefresh(boolean b)
IAttribute
setSkippingRefresh
in interface IAttribute
public boolean isSkippingRefresh()
isSkippingRefresh
in interface IAttribute
protected void checkDimensions(java.lang.Object[][] o)
protected void checkDimensions(double[][] o)
protected void checkDimensions(boolean[][] o)
public static java.lang.String[] flatten(java.lang.String[][] src)
protected final fr.esrf.TangoApi.DeviceDataHistory[] readAttHistoryFromNetwork() throws fr.esrf.Tango.DevFailed
fr.esrf.Tango.DevFailed
public AtkEventListenerList getListenerList()
getListenerList
in interface IEntity
public void freeInternalData()
public Property getProperty(java.lang.String name)
getProperty
returns property with the name given in the
first parameter.getProperty
in interface IEntity
name
- a String
valueProperty
valuepublic java.util.Map getPropertyMap()
getPropertyMap
returns a Map containing this entitys
properties.getPropertyMap
in interface IEntity
Map
valuepublic void setProperty(java.lang.String name, java.lang.Number value)
setProperty
setProperty
in interface IAttribute
name
- a String
value containing the name of the
propertyn
- a Number
value containing the numeric value of
the propertypublic void setProperty(java.lang.String name, java.lang.Number value, boolean editable)
setProperty
setProperty
in interface IAttribute
name
- a String
value containing the name of the
propertyn
- a Number
value containing the value of the
propertyeditable
- a boolean
value which decides if the property
is editable or not.public PropertyStorage getPropertyStorage()
public void setPropertyStorage(PropertyStorage propertyStorage)
public boolean areAttPropertiesLoaded()
IAttribute
areAttPropertiesLoaded
returns true if the some ATK specific attribute properties have already
been loaded from the Tango DB. One example for these ATK specific attribute properties is : OpenCloseInverted for a DevStateScalar
attributeareAttPropertiesLoaded
in interface IAttribute
public void loadAttProperties()
IAttribute
loadAttProperties
in interface IAttribute