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

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?

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

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