Tango Core Classes Reference  9.2.5
Tango::DeviceAttributeHistory Class Reference

Fundamental type for receiving data from device attribute polling buffers. More...

#include "tango.h"

Inheritance diagram for Tango::DeviceAttributeHistory:
Collaboration diagram for Tango::DeviceAttributeHistory:

Public Member Functions

bool has_failed ()
 Check if the record was a failure. More...
 
- Public Member Functions inherited from Tango::DeviceAttribute
 DeviceAttribute ()
 Create a DeviceAttribute object. More...
 
 DeviceAttribute (string &name, short val)
 Create a DeviceAttribute object from attribute name and value for scalar attribute. More...
 
 DeviceAttribute (string &name, vector< short > &val)
 Create a DeviceAttribute object from attribute name and value for spectrum attribute. More...
 
 DeviceAttribute (string &name, vector< short > &val, int dim_x, int dim_y)
 Create a DeviceAttribute object from attribute name and value for image attribute. More...
 
void operator<< (short val)
 Insert attribute data. More...
 
void insert (const char *str, unsigned char *data, unsigned int length)
 Insert attribute data for DevEncoded attribute. More...
 
void insert (vector< short > &datum, int dim_x, int dim_y)
 Insert attribute data for image attribute (from C++ vector) More...
 
void insert (const DevVarShortArray &datum, int dim_x, int dim_y)
 Insert attribute data for image attribute (from CORBA sequence by reference) More...
 
void insert (DevVarShortArray *datum, int dim_x, int dim_y)
 Insert attribute data for image attribute (from CORBA sequence by pointer) More...
 
bool operator>> (short &data)
 Extract attribute data. More...
 
bool extract (const char *&str, unsigned char *&data, unsigned int &length)
 Extract attribute data for DevEncoded attribute. More...
 
bool extract_read (vector< string > &data)
 Extract only read part of attribute data. More...
 
bool extract_set (vector< string > &data)
 Extract only written part of attribute data. More...
 
void exceptions (bitset< numFlags > fl)
 Set exception flag. More...
 
bitset< numFlags > exceptions ()
 Get exception flag. More...
 
void reset_exceptions (except_flags fl)
 Reset one exception flag. More...
 
void set_exceptions (except_flags fl)
 Set one exception flag. More...
 
bitset< numFlags > state ()
 Get instance extraction state. More...
 
bool has_failed ()
 Check if the call failed. More...
 
const DevErrorList & get_err_stack ()
 Get the error stack. More...
 
bool is_empty ()
 Check is the instance is empty. More...
 
string & get_name ()
 Returns the name of the attribute. More...
 
void set_name (string &na)
 Set attribute name. More...
 
void set_name (const char *na)
 Set attribute name. More...
 
int get_dim_x ()
 Get attribute X dimension. More...
 
int get_dim_y ()
 Get attribute Y dimension. More...
 
int get_written_dim_x ()
 Get the attribute write X dimension. More...
 
int get_written_dim_y ()
 Get the attribute write Y dimension. More...
 
AttributeDimension get_r_dimension ()
 Get the attribute read dimensions. More...
 
AttributeDimension get_w_dimension ()
 Get the attribute write dimensions. More...
 
long get_nb_read ()
 Get the number of read value. More...
 
long get_nb_written ()
 Get the number of written value. More...
 
AttrQuality & get_quality ()
 Get attribute quality factor. More...
 
int get_type ()
 Get attribute data type. More...
 
AttrDataFormat get_data_format ()
 Get attribute data format. More...
 
TimeVal & get_date ()
 Get attribute read date. More...
 

Friends

ostream & operator<< (ostream &str, DeviceAttributeHistory &dah)
 Print a DeviceAttributeHistory instance. More...
 

Detailed Description

Fundamental type for receiving data from device attribute polling buffers.

This is the fundamental type for receiving data from device attribute polling buffers. This class inherits from the Tango::DeviceAttribute class. One instance of this class is created for each attribute result history. Within this class, you find the attribute result data or the exception parameters and a flag indicating if the attribute has failed when it was invoked by the device server polling thread. For history calls, it is not possible to returns attribute error as exception. See chapter on Advanced Features in the Tango book for all details regarding device polling.

Author
taurel
Revision
28018

Member Function Documentation

bool Tango::DeviceAttributeHistory::has_failed ( )
inline

Check if the record was a failure.

Returns a boolean set to true if the record in the polling buffer was a failure

Returns
A boolean set to true if the record was a failure

Friends And Related Function Documentation

ostream& operator<< ( ostream &  str,
DeviceAttributeHistory dah 
)
friend

Print a DeviceAttributeHistory instance.

Is an utility function to easily print the contents of a DeviceAttributeHistory object. This function knows all types which could be inserted in a DeviceAttributeHistory object and print them accordingly. It also in case the attribute returned an error.

DeviceProxy *dev = new DeviceProxy(“...”);
int hist_depth = 4;
vector<DeviceAttributeHistory> *hist;
hist = dev->attribute_history(“MyAttribute”,hist_depth);
for (int i = 0;i < hist_depth;i++)
{
cout << (*hist)[i] << endl;
}
delete hist;
Parameters
[in]strThe printing stream
[in]dahThe instance to be printed

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