TANGO Java API
( TangORB-7.3.3.jar)

fr.esrf.TangoDs
Class Attribute

java.lang.Object
  extended by fr.esrf.TangoDs.Attribute
All Implemented Interfaces:
TangoConst
Direct Known Subclasses:
WAttribute

public class Attribute
extends java.lang.Object
implements TangoConst

This class represents a Tango attribute.

Version:
$Revision: 1.6 $
Author:
$Author: pascal_verdier $

Field Summary
 
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
 
Constructor Summary
Attribute(java.util.Vector prop_list, Attr tmp_attr, java.lang.String dev_name)
          Create a new Attribute object.
 
Method Summary
 boolean check_alarm()
          Check if the attribute read value is below/above the larm level.
 int get_assoc_ind()
          Get index of the associated writable attribute
 java.lang.String get_assoc_name()
          Get name of the associated writable attribute
 AttrDataFormat get_data_format()
          Get attribute data format
 int get_data_size()
          Get attribute data format
 int get_data_type()
          Get attribute data type
 TimeVal get_date()
           
 java.lang.String get_name()
          Get attribute name
 void get_properties(AttributeConfig conf)
          Get attribute properties.
 AttrQuality get_quality()
          Get attribute data quality
 TimeVal get_when()
          Get attribute date
 AttrWriteType get_writable()
          Get the attribute write type
 boolean is_alarmed()
          Check if the attribute has an alarm value defined.
 boolean is_max_alarm()
          Check if the attribute is in maximum alarm condition .
 boolean is_min_alarm()
          Check if the attribute is in minimum alarm condition .
 boolean is_writ_associated()
          Check if the attribute has an associated writable attribute.
 void set_assoc_ind(int val)
          Set index of the associated writable attribute
 void set_date(TimeVal date)
           
 void set_quality(AttrQuality qua)
          Set attribute data quality
 void set_value(boolean p_data)
          Set internal attribute value (for boolean attribute data type).
 void set_value(boolean[] p_data, int x)
          Set internal attribute value (for boolean attribute data type).
 void set_value(boolean[] p_data, int x, int y)
          Set internal attribute value (for Tango_DevBoolean attribute data type).
 void set_value(DevEncoded p_data)
          Set internal attribute value (for DevEncoded attribute data type).
 void set_value(DevEncoded[] p_data, int x, int y)
          Set internal attribute value (for Tango_DevEncoded attribute data type).
 void set_value(DevState p_data)
          Set internal attribute value (for DevState attribute data type).
 void set_value(DevState[] p_data, int x)
          Set internal attribute value (for DevState attribute data type).
 void set_value(DevState[] p_data, int x, int y)
          Set internal attribute value (for Tango_DevState attribute data type).
 void set_value(double p_data)
          Set internal attribute value (for double attribute data type).
 void set_value(double[] p_data, int x)
          Set internal attribute value (for double attribute data type).
 void set_value(double[] p_data, int x, int y)
          Set internal attribute value (for Tango_DevDouble attribute data type).
 void set_value(float[] p_data, int x, int y)
          Set internal attribute value (for Tango_DevFloat attribute data type).
 void set_value(int p_data)
          Set internal attribute value (for int attribute data type).
 void set_value(int[] p_data, int x)
          Set internal attribute value (for int attribute data type).
 void set_value(int[] p_data, int x, int y)
          Set internal attribute value (for Tango_DevLong attribute data type).
 void set_value(long p_data)
          Set internal attribute value (for int attribute data type).
 void set_value(long[] p_data, int x)
          Set internal attribute value (for int attribute data type).
 void set_value(long[] p_data, int x, int y)
          Set internal attribute value (for Tango_DevLong64 attribute data type).
 void set_value(short p_data)
          Set internal attribute value (for short attribute data type).
 void set_value(short[] p_data, int x)
          Set internal attribute value (for short attribute data type).
 void set_value(short[] p_data, int x, int y)
          Set internal attribute value (for Tango_DevShort attribute data type).
 void set_value(java.lang.String p_data)
          Set internal attribute value (for String attribute data type).
 void set_value(java.lang.String[] p_data, int x)
          Set internal attribute value (for String attribute data type).
 void set_value(java.lang.String[] p_data, int x, int y)
          Set internal attribute value (for Tango_DevString attribute data type).
 java.lang.String toString()
          Returns a string representation of this attribute.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Attribute

public Attribute(java.util.Vector prop_list,
                 Attr tmp_attr,
                 java.lang.String dev_name)
          throws DevFailed
Create a new Attribute object.

Parameters:
prop_list - The attribute properties list. Each property is an object of the AttrProperty class
tmp_attr - The temporary attribute object
dev_name - The device name
Throws:
DevFailed - If the command sent to the database failed. Click here to read DevFailed exception specification
Method Detail

is_writ_associated

public boolean is_writ_associated()
Check if the attribute has an associated writable attribute. This method returns a boolean set to true if the attribute has a writable attribute associated to it.

Returns:
A boolean set to true if there is an associated writable attribute

is_alarmed

public boolean is_alarmed()
Check if the attribute has an alarm value defined. This method returns a boolean set to true if the attribute has an alarm value defined.

Returns:
A boolean set to true if there is an alarm defined.

get_properties

public void get_properties(AttributeConfig conf)
Get attribute properties. This method initialise the fields of a AttributeConfig object with the attribute properties value

Parameters:
conf - A AttributeConfig object.

set_value

public void set_value(DevState[] p_data,
                      int x,
                      int y)
               throws DevFailed
Set internal attribute value (for Tango_DevState attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data.

Parameters:
p_data - The attribute read value
x - The attribute x dimension
y - The attribuute y dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(DevEncoded[] p_data,
                      int x,
                      int y)
               throws DevFailed
Set internal attribute value (for Tango_DevEncoded attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data.

Parameters:
p_data - The attribute read value
x - The attribute x dimension
y - The attribuute y dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(boolean[] p_data,
                      int x,
                      int y)
               throws DevFailed
Set internal attribute value (for Tango_DevBoolean attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data.

Parameters:
p_data - The attribute read value
x - The attribute x dimension
y - The attribuute y dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(short[] p_data,
                      int x,
                      int y)
               throws DevFailed
Set internal attribute value (for Tango_DevShort attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data.

Parameters:
p_data - The attribute read value
x - The attribute x dimension
y - The attribuute y dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(int[] p_data,
                      int x,
                      int y)
               throws DevFailed
Set internal attribute value (for Tango_DevLong attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data.

Parameters:
p_data - The attribute read value
x - The attribute x dimension
y - The attribuute y dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(long[] p_data,
                      int x,
                      int y)
               throws DevFailed
Set internal attribute value (for Tango_DevLong64 attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data.

Parameters:
p_data - The attribute read value
x - The attribute x dimension
y - The attribuute y dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(float[] p_data,
                      int x,
                      int y)
               throws DevFailed
Set internal attribute value (for Tango_DevFloat attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data.

Parameters:
p_data - The attribute read value
x - The attribute x dimension
y - The attribuute y dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(double[] p_data,
                      int x,
                      int y)
               throws DevFailed
Set internal attribute value (for Tango_DevDouble attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data.

Parameters:
p_data - The attribute read value
x - The attribute x dimension
y - The attribuute y dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(java.lang.String[] p_data,
                      int x,
                      int y)
               throws DevFailed
Set internal attribute value (for Tango_DevString attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data.

Parameters:
p_data - The attribute read value
x - The attribute x dimension
y - The attribuute y dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(DevState p_data)
               throws DevFailed
Set internal attribute value (for DevState attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for no attribute dimension (x=1, y=0)

Parameters:
p_data - The attribute read value
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(DevEncoded p_data)
               throws DevFailed
Set internal attribute value (for DevEncoded attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for no attribute dimension (x=1, y=0)

Parameters:
p_data - The attribute read value
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(boolean p_data)
               throws DevFailed
Set internal attribute value (for boolean attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for no attribute dimension (x=1, y=0)

Parameters:
p_data - The attribute read value
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(short p_data)
               throws DevFailed
Set internal attribute value (for short attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for no attribute dimension (x=1, y=0)

Parameters:
p_data - The attribute read value
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(int p_data)
               throws DevFailed
Set internal attribute value (for int attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for no attribute dimension (x=1, y=0)

Parameters:
p_data - The attribute read value
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(long p_data)
               throws DevFailed
Set internal attribute value (for int attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for no attribute dimension (x=1, y=0)

Parameters:
p_data - The attribute read value
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(double p_data)
               throws DevFailed
Set internal attribute value (for double attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for no attribute dimension (x=1, y=0)

Parameters:
p_data - The attribute read value
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(java.lang.String p_data)
               throws DevFailed
Set internal attribute value (for String attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for no attribute dimension (x=1, y=0)

Parameters:
p_data - The attribute read value
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(DevState[] p_data,
                      int x)
               throws DevFailed
Set internal attribute value (for DevState attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for a one dimension attribute dimension (y=0)

Parameters:
p_data - The attribute read value
x - The attribute x dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(boolean[] p_data,
                      int x)
               throws DevFailed
Set internal attribute value (for boolean attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for a one dimension attribute dimension (y=0)

Parameters:
p_data - The attribute read value
x - The attribute x dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(short[] p_data,
                      int x)
               throws DevFailed
Set internal attribute value (for short attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for a one dimension attribute dimension (y=0)

Parameters:
p_data - The attribute read value
x - The attribute x dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(int[] p_data,
                      int x)
               throws DevFailed
Set internal attribute value (for int attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for a one dimension attribute dimension (y=0)

Parameters:
p_data - The attribute read value
x - The attribute x dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(long[] p_data,
                      int x)
               throws DevFailed
Set internal attribute value (for int attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for a one dimension attribute dimension (y=0)

Parameters:
p_data - The attribute read value
x - The attribute x dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(double[] p_data,
                      int x)
               throws DevFailed
Set internal attribute value (for double attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for a one dimension attribute dimension (y=0)

Parameters:
p_data - The attribute read value
x - The attribute x dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

set_value

public void set_value(java.lang.String[] p_data,
                      int x)
               throws DevFailed
Set internal attribute value (for String attribute data type). This method stores the attribute read value inside the object. This data will be returned to the caller. This method also stores the date when it is called and initilise the attribute quality to VALID data. This method must be used for a one dimension attribute dimension (y=0)

Parameters:
p_data - The attribute read value
x - The attribute x dimension
Throws:
DevFailed - If the attribute data type is not coherent. Click here to read DevFailed exception specification

check_alarm

public boolean check_alarm()
                    throws DevFailed
Check if the attribute read value is below/above the larm level.

Returns:
A boolean set to true if the attribute is in alarm condition.
Throws:
DevFailed - If no alarm level is defined. Click here to read DevFailed exception specification

toString

public java.lang.String toString()
Returns a string representation of this attribute. This method returns a string with all attribute properties name and value\\

Overrides:
toString in class java.lang.Object
Returns:
A string representation of the attribute.

get_writable

public AttrWriteType get_writable()
Get the attribute write type

Returns:
The attribute write type

get_name

public java.lang.String get_name()
Get attribute name

Returns:
The attribute name

get_assoc_name

public java.lang.String get_assoc_name()
Get name of the associated writable attribute

Returns:
The associated writable attribute name

get_data_type

public int get_data_type()
Get attribute data type

Returns:
The attribute data type

is_min_alarm

public boolean is_min_alarm()
Check if the attribute is in minimum alarm condition .

Returns:
A boolean set to true if the attribute is in alarm condition (read value below the min. alarm).

is_max_alarm

public boolean is_max_alarm()
Check if the attribute is in maximum alarm condition .

Returns:
A boolean set to true if the attribute is in alarm condition (read value above the max. alarm).

get_data_format

public AttrDataFormat get_data_format()
Get attribute data format

Returns:
The attribute data format

get_assoc_ind

public int get_assoc_ind()
Get index of the associated writable attribute

Returns:
The index in the main attribute vector of the associated writable attribute

set_assoc_ind

public void set_assoc_ind(int val)
Set index of the associated writable attribute

Parameters:
val - The new index in the main attribute vector of the associated writable attribute

get_data_size

public int get_data_size()
Get attribute data format

Returns:
The attribute data format

get_quality

public AttrQuality get_quality()
Get attribute data quality

Returns:
The attribute data quality

set_quality

public void set_quality(AttrQuality qua)
Set attribute data quality

Parameters:
qua - The new attribute data quality

get_when

public TimeVal get_when()
Get attribute date

Returns:
The attribute date

get_date

public TimeVal get_date()

set_date

public void set_date(TimeVal date)

TANGO Java API
( TangORB-7.3.3.jar)