add forwarded attribute dynamically

Dear all,

a simple question on dynamical attributes. Is is possible in Tango 9 C++ to add a forwarded attribute dynamically?

Following the HowTo for standard attributes I did something like:


//Create the fw attr 
Tango::FwdAttr* attr= new Tango::FwdAttr(attname, root_prop);

//Set the default properties
Tango::UserDefaultFwdAttrProp attr_prop;
attr->set_default_properties(attr_prop);

//Not Memorized
dyn_float_attr_data.insert(make_pair(attname, 0.0));

//Add the attribute
add_attribute(attr);

The attribute is inserted among the standard attributes and the root_prop is not set in Jive.
If I'm not wrong there is no specialized function for add_attribute() for forwarded attr. Do you have suggestions?

Many thanks for your help,

Simone
****************************************************************
Simone Riggi
INAF, Osservatorio Astrofisico di Catania
Via S. Sofia 78
95123, Catania - Italy
phone: +39 095 7332 extension 282
e-mail: simone.riggi@gmail.com,
sriggi@oact.inaf.it
skype: simone.riggi
****************************************************************
Hi Simone,

Sorry but dynamic forwarded attribute are not supported yet.

Regards

Emmanuel
Dear Emmanuel,

many thanks for reply.
Sorry if I add another question on forwarded attributes. I have a class with inherited forwarded attributes from a parent class. Why do I get the following error in Jive Monitor panel only for inherited attributes?

The device is in ALARM state
Forwarded attribute XXX is not correctly configured! Root attribute name <path>
You can update it using the Jive tool

By the way, the inherited forwarded attribute values are correctly displayed.
Do I have to configure inherited forwarded attribute in some particular way?

Many thanks for your help,

Regards,

Simone
****************************************************************
Simone Riggi
INAF, Osservatorio Astrofisico di Catania
Via S. Sofia 78
95123, Catania - Italy
phone: +39 095 7332 extension 282
e-mail: simone.riggi@gmail.com,
sriggi@oact.inaf.it
skype: simone.riggi
****************************************************************
Hi Simone,

A forwarded attribute (let's say attUp) belonging to a device (let's say dev1) forwards all its requests to another attribute (let's say attDown) belonging to to another device (dev2).
In order to forward all its requests, the forwarded attribute needs to know what is dev2 and attDown. This is what we called the
"Root attribute". Therefore, to have a running forwarded attribute, you need to set the forwarded attribute property "__root_att"
to dev2/attDown. Jive allows you to do this.
From the error message you have, I have the feeling that this property is missing

Regards

Emmanuel
 
Register or login to create to post a reply.