Tango Core Classes Reference  9.3.4
Tango::Attr Class Reference

User class to create a no dimension attribute object. More...

#include "tango.h"

Inheritance diagram for Tango::Attr:

Public Member Functions

Constructors

Two constructors are defined for this class

 Attr (const char *name, long data_type, Tango::AttrWriteType w_type=Tango::READ, const char *assoc=AssocWritNotSpec)
 Constructs a newly allocated Attr object. More...
 
 Attr (const char *name, long data_type, Tango::DispLevel disp, Tango::AttrWriteType w_type=Tango::READ, const char *assoc=AssocWritNotSpec)
 Constructs a newly allocated Attr object. More...
 
 Attr (const char *name, Tango::DispLevel disp=Tango::OPERATOR)
 Constructs a newly allocated Attr object. More...
 
Destructor

Only one destructor is defined for this class

virtual ~Attr ()
 The object destructor.
 

Miscellaneous methods

void set_default_properties (UserDefaultAttrProp &prop)
 Set default attribute properties. More...
 
void set_disp_level (Tango::DispLevel level)
 Set the attribute display level. More...
 
void set_polling_period (long update)
 Set the attribute polling update period. More...
 
void set_memorized ()
 Set the attribute as memorized in database (only for scalar and writable attribute) By default the setpoint will be written to the attribute during initialisation! Use method set_memorized_init() with false as argument if you don't want this feature.
 
void set_memorized_init (bool write_on_init)
 Set the initialisation flag for memorized attributes true = the setpoint value will be written to the attribute on initialisation false = only the attribute setpoint is initialised. More...
 
void set_change_event (bool implemented, bool detect)
 Set a flag to indicate that the server fires change events manually without the polling to be started for the attribute. More...
 
bool is_change_event ()
 Check if the change event is fired manually for this attribute. More...
 
bool is_check_change_criteria ()
 Check if the change event criteria should be checked when firing the event manually. More...
 
void set_archive_event (bool implemented, bool detect)
 Set a flag to indicate that the server fires archive events manually without the polling to be started for the attribute If the detect parameter is set to true, the criteria specified for the archive event are verified and the event is only pushed if they are fulfilled. More...
 
bool is_archive_event ()
 Check if the archive event is fired manually for this attribute. More...
 
bool is_check_archive_criteria ()
 Check if the archive event criteria should be checked when firing the event manually. More...
 
void set_data_ready_event (bool implemented)
 Set a flag to indicate that the server fires data ready events. More...
 
bool is_data_ready_event ()
 Check if the data ready event is fired for this attribute. More...
 

Detailed Description

User class to create a no dimension attribute object.

Information from this class and information fetched out from the Tango database allows the Tango core software to create the Attribute object for the attribute created by the user.

$Author$ $Revision$

Constructor & Destructor Documentation

◆ Attr() [1/3]

Tango::Attr::Attr ( const char *  name,
long  data_type,
Tango::AttrWriteType  w_type = Tango::READ,
const char *  assoc = AssocWritNotSpec 
)

Constructs a newly allocated Attr object.

The attribute display level is set to OPERATOR.

Parameters
nameThe attribute name
data_typeThe attribute data type
w_typeThe attribute type (read, write, read with write ...)
assocName of the associated writable attribute. This is used only the read with write attribute

◆ Attr() [2/3]

Tango::Attr::Attr ( const char *  name,
long  data_type,
Tango::DispLevel  disp,
Tango::AttrWriteType  w_type = Tango::READ,
const char *  assoc = AssocWritNotSpec 
)

Constructs a newly allocated Attr object.

Parameters
nameThe attribute name
data_typeThe attribute data type
dispThe attribute display level
w_typeThe attribute type (read, write, read with write ...)
assocName of the associated writable attribute. This is used only the read with write attribute

◆ Attr() [3/3]

Tango::Attr::Attr ( const char *  name,
Tango::DispLevel  disp = Tango::OPERATOR 
)

Constructs a newly allocated Attr object.

Parameters
nameThe attribute name
dispThe attribute display level

Member Function Documentation

◆ is_archive_event()

bool Tango::Attr::is_archive_event ( )
inline

Check if the archive event is fired manually for this attribute.

Returns
A boolean set to true if a manual fire archive event is implemented.

◆ is_change_event()

bool Tango::Attr::is_change_event ( )
inline

Check if the change event is fired manually for this attribute.

Returns
A boolean set to true if a manual fire change event is implemented.

◆ is_check_archive_criteria()

bool Tango::Attr::is_check_archive_criteria ( )
inline

Check if the archive event criteria should be checked when firing the event manually.

Returns
A boolean set to true if a archive event criteria will be checked.

◆ is_check_change_criteria()

bool Tango::Attr::is_check_change_criteria ( )
inline

Check if the change event criteria should be checked when firing the event manually.

Returns
A boolean set to true if a change event criteria will be checked.

◆ is_data_ready_event()

bool Tango::Attr::is_data_ready_event ( )
inline

Check if the data ready event is fired for this attribute.

Returns
A boolean set to true if firing data ready event is implemented.

◆ set_archive_event()

void Tango::Attr::set_archive_event ( bool  implemented,
bool  detect 
)
inline

Set a flag to indicate that the server fires archive events manually without the polling to be started for the attribute If the detect parameter is set to true, the criteria specified for the archive event are verified and the event is only pushed if they are fulfilled.

If detect is set to false the event is fired without checking!

Parameters
implementedTrue when the server fires archive events manually.
detectTriggers the verification of the archive event properties when set to true.

◆ set_change_event()

void Tango::Attr::set_change_event ( bool  implemented,
bool  detect 
)
inline

Set a flag to indicate that the server fires change events manually without the polling to be started for the attribute.

If the detect parameter is set to true, the criteria specified for the change event are verified and the event is only pushed if they are fulfilled. If detect is set to false the event is fired without checking!

Parameters
implementedTrue when the server fires change events manually.
detectTriggers the verification of the change event properties when set to true.

◆ set_data_ready_event()

void Tango::Attr::set_data_ready_event ( bool  implemented)
inline

Set a flag to indicate that the server fires data ready events.

Parameters
implementedTrue when the server fires data ready events

◆ set_default_properties()

void Tango::Attr::set_default_properties ( UserDefaultAttrProp prop)

Set default attribute properties.

Parameters
propThe user default property class

◆ set_disp_level()

void Tango::Attr::set_disp_level ( Tango::DispLevel  level)
inline

Set the attribute display level.

Parameters
levelThe attribute display level

◆ set_memorized_init()

void Tango::Attr::set_memorized_init ( bool  write_on_init)
inline

Set the initialisation flag for memorized attributes true = the setpoint value will be written to the attribute on initialisation false = only the attribute setpoint is initialised.

No action is taken on the attribute

Parameters
write_on_initIf true the setpoint value will be written to the attribute on initialisation

◆ set_polling_period()

void Tango::Attr::set_polling_period ( long  update)
inline

Set the attribute polling update period.

Parameters
updateThe attribute polling period (in mS)

The documentation for this class was generated from the following file: