Dear Experts,
Need some help in creating forwarded attribute in Java. I’ve specified the rootAttribute Property for the attribute but still the value of the root attribute is not getting reflected.
Below is the code snippet:
@Attribute(name="FwdAttr")
@AttributeProperties(rootAttribute="tango://lmc:10000/test/dev/1/RootAttr")
private float[] fwdAttr = new float[3];
public org.tango.server.attribute.AttributeValue getFwdAttr() throws DevFailed {
org.tango.server.attribute.AttributeValue attributeValue = new org.tango.server.attribute.AttributeValue();
attributeValue.setValue(fwdAttr);
return attributeValue;
}
If getFwdAttr() method is commented, INIT_ERROR is thrown.
However, I’m able to create Forwarded attributes dynamically using
dynamicManager.addAttribute(new ForwardedAttribute(...))
Is the dynamic creation only supported mechanism to create Forwarded Attributes in Java?
In the section 7.8.1 of the TANGO Control Manual 9.1, it is stated that “If you subscribe to event(s) on a forwarded attribute, the subscription is forwarded to the root attribute. When the event is received by the forwarded attribute, the attribute name in the event data is modified to reflect the forwarded attribute name and the event is pushed to the original client(s).”
I want to log a message when an event raised by the root attribute is received by the forwarded attribute, i.e I want to log a message before the modification of attribute name in the event data at the device server exposing forwarded attribute. Please provide your thoughts on this.
Vatsal Trivedi