class Attribute

This class represents a Tango attribute

Inheritance:


Public

Constructors
Attribute(vector &prop_list, Attr &tmp_attr, string &dev_name)
Create a new Attribute object
Destructor
virtual ~Attribute()
The attribute desctructor
Check attribute methods
bool is_writ_associated()
Check if the attribute has an associated writable attribute
bool is_min_alarm()
Check if the attribute is in minimum alarm condition
bool is_max_alarm()
Check if the attribute is in maximum alarm condition
bool is_alarmed()
Check if the attribute has an alarm value defined
bool check_alarm()
Check if the attribute read value is below/above the larm level
Get/Set object members.
Tango::AttrWriteType get_writable()
Get the attribute writable type (RO/WO/RW)
string& get_name()
Get attribute name
long get_data_type()
Get attribute data type
Tango::AttrDataFormat get_data_format()
Get attribute data format
string& get_assoc_name()
Get name of the associated writable attribute
long get_assoc_ind()
Get index of the associated writable attribute
void set_assoc_ind(long val)
Set index of the associated writable attribute
Tango::TimeVal& get_when()
Get attribute date
Tango::AttrQuality& get_quality()
Get attribute data quality
void set_quality(Tango::AttrQuality val)
Set attribute data quality
long get_data_size()
Get attribute data size
long get_x()
Get attribute data size in x dimension
long get_y()
Get attribute data size in y dimension
void get_properties(Tango::AttributeConfig &)
Get attribute properties
Set attribute value methods.
void set_value(Tango::DevShort *p_data, long x = 1, long y = 0)
Set internal attribute value (for Tango::DevShort attribute data type)
void set_value(Tango::DevLong *p_data, long x = 1, long y = 0)
Set internal attribute value (for Tango::DevLong attribute data type)
void set_value(Tango::DevDouble *p_data, long x = 1, long y = 0)
Set internal attribute value (for Tango::DevDouble attribute data type)
void set_value(Tango::DevString *p_data, long x = 1, long y = 0)
Set internal attribute value (for Tango::DevString attribute data type)

Protected

Class data members
bool value_flag
A flag set to true if the attribute value has been updated
Tango::TimeVal when
The date when attribute was read
bool date
Flag set to true if the date must be set
Tango::AttrQuality quality
The attribute quality factor
string name
The attribute name
Tango::AttrWriteType writable
The attribute writable flag
long data_type
The attribute data type
Tango::AttrDataFormat data_format
The attribute data format
long max_x
The attribute maximum x dimension
long max_y
The attribute maximum y dimension
string label
The attribute label
string description
The attribute description
string unit
The attribute unit
string standard_unit
The attribute standard unit
string display_unit
The attribute display unit
string format
The attribute format
string writable_attr_name
The name of the associated writable attribute
string min_alarm_str
The attribute minimum alarm level
string max_alarm_str
The attribute maximun alarm level
string min_value_str
The attribute minimum value
string max_value_str
The attribute maximum value
long assoc_ind
Index in the main attribute vector of the associated writable attribute (if any)
Tango::Attr_CheckVal min_alarm
The attribute minimum alarm in binary format
Tango::Attr_CheckVal max_alarm
The attribute miaaximum alarm in binary format
Tango::Attr_CheckVal min_value
The attribute minimum value in binary format
Tango::Attr_CheckVal max_value
The attribute maximum value in binary format
Tango::Attr_Value value
The attribute value
long data_size
The attribute data size
bool check_min_alarm
Flag set to true if a minimum alarm is defined
bool check_max_alarm
Flag set to true if a maximum alarm is defined
bool check_min_value
Flag set to true if a minimum value is defined
bool check_max_value
Flag set to true if a maximum alarm is defined
bool min_alarm_on
Flag set to true if the read value is below the alarm level
bool max_alarm_on
Flag set to true if the read value is above the alarm level

Documentation

This class represents a Tango attribute.
Constructors
Miscellaneous constructors

Attribute(vector &prop_list, Attr &tmp_attr, string &dev_name)
Create a new Attribute object.
Parameters:
prop_list - The attribute properties list. Each property is an object of the AttrProperty class
tmp_attr - Temporary attribute object built from user parameters
dev_name - The device name

Destructor
Only one desctructor is defined for this class

virtual ~Attribute()
The attribute desctructor

Check attribute methods
Miscellaneous method returning boolean flag accorrding to attribute state

bool 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

bool 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).

bool 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).

bool 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.

bool check_alarm()
Check if the attribute read value is below/above the larm level.
Throws:
DevFailed If no alarm level is defined. Click here to read DevFailed exception specification
Returns:
A boolean set to true if the attribute is in alarm condition.

Get/Set object members.
These methods allows the external world to get/set DeviceImpl instance data members

Tango::AttrWriteType get_writable()
Get the attribute writable type (RO/WO/RW).
Returns:
The attribute write type.

string& get_name()
Get attribute name
Returns:
The attribute name

long get_data_type()
Get attribute data type
Returns:
The attribute data type

Tango::AttrDataFormat get_data_format()
Get attribute data format
Returns:
The attribute data format

string& get_assoc_name()
Get name of the associated writable attribute
Returns:
The associated writable attribute name

long get_assoc_ind()
Get index of the associated writable attribute
Returns:
The index in the main attribute vector of the associated writable attribute

void set_assoc_ind(long val)
Set index of the associated writable attribute
Parameters:
The - new index in the main attribute vector of the associated writable attribute

Tango::TimeVal& get_when()
Get attribute date
Returns:
The attribute date

Tango::AttrQuality& get_quality()
Get attribute data quality
Returns:
The attribute data quality

void set_quality(Tango::AttrQuality val)
Set attribute data quality
Parameters:
qua - The new attribute data quality

long get_data_size()
Get attribute data size
Returns:
The attribute data size

long get_x()
Get attribute data size in x dimension
Returns:
The attribute data size in x dimension. Set to 1 for scalar attribute

long get_y()
Get attribute data size in y dimension
Returns:
The attribute data size in y dimension. Set to 0 for scalar and spectrum attribute

void get_properties(Tango::AttributeConfig &)
Get attribute properties. This method initialise the fields of a AttributeConfig object with the attribute properties value
Parameters:
conf - A AttributeConfig object.

Set attribute value methods.
These methods allows the external world to set attribute object internal value

void set_value(Tango::DevShort *p_data, long x = 1, long y = 0)
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 initialise the attribute quality factor.
Throws:
DevFailed If the attribute data type is not coherent. Click here to read DevFailed exception specification
Parameters:
p_data - The attribute read value
x - The attribute x length. Default value is 1
y - The attribute y length. Default value is 0

void set_value(Tango::DevLong *p_data, long x = 1, long y = 0)
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 initialise the attribute quality factor.
Throws:
DevFailed If the attribute data type is not coherent. Click here to read DevFailed exception specification
Parameters:
p_data - The attribute read value
x - The attribute x length. Default value is 1
y - The attribute y length. Default value is 0

void set_value(Tango::DevDouble *p_data, long x = 1, long y = 0)
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 initialise the attribute quality factor.
Throws:
DevFailed If the attribute data type is not coherent. Click here to read DevFailed exception specification
Parameters:
p_data - The attribute read value
x - The attribute x length. Default value is 1
y - The attribute y length. Default value is 0

void set_value(Tango::DevString *p_data, long x = 1, long y = 0)
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 initialise the attribute quality factor.
Throws:
DevFailed If the attribute data type is not coherent. Click here to read DevFailed exception specification
Parameters:
p_data - The attribute read value
x - The attribute x length. Default value is 1
y - The attribute y length. Default value is 0

Class data members

bool value_flag
A flag set to true if the attribute value has been updated

Tango::TimeVal when
The date when attribute was read

bool date
Flag set to true if the date must be set

Tango::AttrQuality quality
The attribute quality factor

string name
The attribute name

Tango::AttrWriteType writable
The attribute writable flag

long data_type
The attribute data type. Only four types are suported. They are Tango::DevShort, Tango::DevLong, Tango::DevDouble and Tango::DevString

Tango::AttrDataFormat data_format
The attribute data format. Three data formats are supported. They are SCALAR, SPECTRUM and IMAGE

long max_x
The attribute maximum x dimension. It is needed for SPECTRUM or IMAGE data format

long max_y
The attribute maximum y dimension. It is necessary only for IMAGE data format

string label
The attribute label

string description
The attribute description

string unit
The attribute unit

string standard_unit
The attribute standard unit

string display_unit
The attribute display unit

string format
The attribute format. This string specifies how an attribute value must be printed

string writable_attr_name
The name of the associated writable attribute

string min_alarm_str
The attribute minimum alarm level

string max_alarm_str
The attribute maximun alarm level

string min_value_str
The attribute minimum value

string max_value_str
The attribute maximum value

long assoc_ind
Index in the main attribute vector of the associated writable attribute (if any)

Tango::Attr_CheckVal min_alarm
The attribute minimum alarm in binary format

Tango::Attr_CheckVal max_alarm
The attribute miaaximum alarm in binary format

Tango::Attr_CheckVal min_value
The attribute minimum value in binary format

Tango::Attr_CheckVal max_value
The attribute maximum value in binary format

Tango::Attr_Value value
The attribute value

long data_size
The attribute data size

bool check_min_alarm
Flag set to true if a minimum alarm is defined

bool check_max_alarm
Flag set to true if a maximum alarm is defined

bool check_min_value
Flag set to true if a minimum value is defined

bool check_max_value
Flag set to true if a maximum alarm is defined

bool min_alarm_on
Flag set to true if the read value is below the alarm level

bool max_alarm_on
Flag set to true if the read value is above the alarm level


Direct child classes:
WAttribute
Author:
$Author: taurel $
Version:
$Revision: 1.3 $

alphabetic index hierarchy of classes


generated by doc++