fr.esrf.tangoatk.core
Interface IAttribute

All Superinterfaces:
IEntity, IRefreshee, java.io.Serializable, fr.esrf.TangoDs.TangoConst
All Known Subinterfaces:
IBooleanImage, IBooleanScalar, IBooleanSpectrum, IDevStateScalar, IDevStateSpectrum, IEnumScalar, INumber, INumberImage, INumberScalar, INumberSpectrum, IRawImage, IScalarAttribute, IStringImage, IStringScalar, IStringSpectrum
All Known Implementing Classes:
AAttribute, ANumber, BooleanImage, BooleanScalar, BooleanSpectrum, DevStateScalar, DevStateSpectrum, EnumScalar, InvalidAttribute, NumberImage, NumberScalar, NumberSpectrum, RawImage, StringImage, StringScalar, StringSpectrum

public interface IAttribute
extends IEntity

IAttribute is the top interface for all attributes. It defines the standard behaviour for the attributes. All attributes at this level are images, eg their data is represented as an array in two dimensions.


Field Summary
static java.lang.String ALARM
           
static java.lang.String CHANGING
           
static java.lang.String INVALID
           
static java.lang.String OK
           
static java.lang.String UNKNOWN
           
static java.lang.String VALID
           
static java.lang.String WARNING
           
 
Fields inherited from interface fr.esrf.TangoDs.TangoConst
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, 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, 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_FLOAT, Tango_DEV_INT, Tango_DEV_LONG, Tango_DEV_LONG64, 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
 
Method Summary
 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 dispatch(fr.esrf.TangoApi.DeviceAttribute attValue)
          Method used by optimized AttributePolledList (one read per device)
 void dispatchError(fr.esrf.Tango.DevFailed e)
          Method used by optimized AttributePolledList (one read per device)
 fr.esrf.TangoApi.DeviceAttribute getAttribute()
          getAttribute returns the lowlevel attribute of this attribute.
 java.lang.String getDescription()
          getDescription returns the description of this attribute.
 java.lang.String getDisplayUnit()
          getDisplayUnit returns the display unit of this attribute
 double getDisplayUnitFactor()
          getDisplayUnitFactor returns the DisplayUnit Multiplication factor of this attribute.
 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 getMaxXDimension()
          getMaxXDimension returns the max x-dimension of the attribute
 int getMaxYDimension()
          getMaxYDimension returns the max y-dimension of the attribute
 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.
 fr.esrf.Tango.AttrDataFormat getTangoDataFormat()
          getTangoDataFormat returns the data format of this attribute.
 int getTangoDataType()
          getTangoDataType returns the type of this attribute.
 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.
 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
 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().
 void removeSetErrorListener(ISetErrorListener l)
          Removes a setErrorListener.
 void removeStateListener(IAttributeStateListener l)
          removeStateListener removes a listener to state-changes for this attribute.
 void setDescription(java.lang.String desc)
          setDescription sets the description of this attribute
 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 n)
          setProperty
 void setProperty(java.lang.String name, java.lang.Number n, boolean editable)
          setProperty
 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
 
Methods inherited from interface fr.esrf.tangoatk.core.IEntity
addErrorListener, getAlias, getDevice, getListenerList, getName, getNameSansDevice, getProperty, getPropertyMap, isExpert, isOperator, removeErrorListener, setAlias, storeConfig
 
Methods inherited from interface fr.esrf.tangoatk.core.IRefreshee
refresh
 

Field Detail

OK

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

UNKNOWN

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

VALID

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

INVALID

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

ALARM

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

WARNING

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

CHANGING

static final java.lang.String CHANGING
See Also:
Constant Field Values
Method Detail

getFormat

java.lang.String getFormat()
getFormat returns the human readable representation of the format of this attribute. To obtain the numeric code of the format, please consult getPropertyMap("format");

Returns:
a String value

getUnit

java.lang.String getUnit()
getUnit returns the unit of this attribute.

Returns:
a String value

getDisplayUnit

java.lang.String getDisplayUnit()
getDisplayUnit returns the display unit of this attribute

Returns:
a String value

getDisplayUnitFactor

double getDisplayUnitFactor()
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.

Returns:
a 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".

getStandardUnit

java.lang.String getStandardUnit()
getStandardUnit returns the standard unit of this attribute

Returns:
a String value

getStandardUnitFactor

double getStandardUnitFactor()
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.

Returns:
a double value

getAttribute

fr.esrf.TangoApi.DeviceAttribute getAttribute()
getAttribute returns the lowlevel attribute of this attribute.

Returns:
a DeviceAttribute value

getLabel

java.lang.String getLabel()
getLabel returns the label of this attribute.

Returns:
a String value

setLabel

void setLabel(java.lang.String label)
setLabel sets the label of this attribute

Parameters:
label - a String value

getState

java.lang.String getState()
getState returns a human-readable representation of the state.

Returns:
a String value

getType

java.lang.String getType()
getType returns a human-readable representaion of the type of this attribute.

Returns:
a String value

getTangoDataType

int getTangoDataType()
getTangoDataType returns the type of this attribute.

Returns:
an int value

getTangoDataFormat

fr.esrf.Tango.AttrDataFormat getTangoDataFormat()
getTangoDataFormat returns the data format of this attribute.

Returns:
an AttrDataFormat value

getDescription

java.lang.String getDescription()
getDescription returns the description of this attribute.

Returns:
a String value

setDescription

void setDescription(java.lang.String desc)
setDescription sets the description of this attribute

Parameters:
desc - a String value

setName

void setName(java.lang.String s)
setName sets the name of this attribute.

Parameters:
s - a String value

isWritable

boolean isWritable()
isWritable returns true if this attribute is writable

Returns:
a boolean value

addStateListener

void addStateListener(IAttributeStateListener l)
addStateListener adds a listener to state-changes for this attribute.

Parameters:
l - an IAttributeStateListener value

removeStateListener

void removeStateListener(IAttributeStateListener l)
removeStateListener removes a listener to state-changes for this attribute.

Parameters:
l - an IAttributeStateListener value

addSetErrorListener

void addSetErrorListener(ISetErrorListener l)
An ISetErrorListener is an object that listens to setting error property changes from this sttribute.

Parameters:
l - an ISetErrorListener value

removeSetErrorListener

void removeSetErrorListener(ISetErrorListener l)
Removes a setErrorListener. An ISetErrorListener is an object that listens to setting error property changes from this attribute.

Parameters:
l - an ISetErrorListener value

setProperty

void setProperty(java.lang.String name,
                 java.lang.Number n)
setProperty

Parameters:
name - a String value containing the name of the property
n - a Number value containing the numeric value of the property

setProperty

void setProperty(java.lang.String name,
                 java.lang.Number n,
                 boolean editable)
setProperty

Parameters:
name - a String value containing the name of the property
n - a Number value containing the value of the property
editable - a boolean value which decides if the property is editable or not.

getMaxXDimension

int getMaxXDimension()
getMaxXDimension returns the max x-dimension of the attribute

Returns:
an int value

getMaxYDimension

int getMaxYDimension()
getMaxYDimension returns the max y-dimension of the attribute

Returns:
an int value

getXDimension

int getXDimension()
getXDimension returns the actual x-dimension of the attribute.

Returns:
an int value

getYDimension

int getYDimension()
getYDimension returns the actual y-dimension of the attribute

Returns:
an int value

getHeight

int getHeight()
getHeight alias for getYDimension()

Returns:
an int value

getWidth

int getWidth()
getWidth alias for getXDimension()

Returns:
an int value

hasEvents

boolean hasEvents()
hasEvents returns true if the attribute is refreshed by event system

Returns:
true if the attribute is refreshed thanks to event system false if it is refreshed by the ATK refresher thread

setSkippingRefresh

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


isSkippingRefresh

boolean isSkippingRefresh()

dispatch

void dispatch(fr.esrf.TangoApi.DeviceAttribute attValue)
Method used by optimized AttributePolledList (one read per device)

Parameters:
attValue - Attribute value

dispatchError

void dispatchError(fr.esrf.Tango.DevFailed e)
Method used by optimized AttributePolledList (one read per device)

Parameters:
e - Attribute arror

areAttPropertiesLoaded

boolean areAttPropertiesLoaded()
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 attribute

Returns:
true if all the attribute properties have been read from the Tango DB and initialized false the ATK specific attribute properties have not been initialized yet

loadAttProperties

void loadAttProperties()
Method used by some attribute viewers to force the reading of some specific at setModel(). The viewer first tests if the ATK specific attribute properties have not been initialized yet (call to areAttPropertiesLoaded())