Polling Dynamic Attributes

Hi all,

I am facing problem to poll dynamic attributes. I have generated generated dynamic attribute with polling period equal to 1000.

This is the part of code which shows the attributeConfigurations.

@Override
public AttributeConfiguration getConfiguration() throws DevFailed {
AttributeConfiguration config = new AttributeConfiguration();
config.setName(attributeName);
config.setType(String.class);
config.setFormat(AttrDataFormat.SCALAR);
config.setWritable(AttrWriteType.READ);
config.setDispLevel(DispLevel.OPERATOR);
config.setPolled(true);
config.setPollingPeriod(1000);

// Set attribute properties
AttributePropertiesImpl properties = new AttributePropertiesImpl();
config.setAttributeProperties(properties);
return config;
}


When I try to execute code, dynamic attributes generates, but its value does not get update.
On jive I am able to see polling period of those attributes equal to 1000.
But on ATK pannel dyanamic attribute does not get update.

I have attached snapshot of errors.
Let me know solution of this problem.

Regards,
Sarojini Sutar


Regards,
TCS_GMRT
Hi,
Do we have any updates?

Regards,
TCS_GMRT
Regards,
TCS_GMRT
Dear Team,

Any updates on this. We are not able to poll dynamic attributes.

Using Java: Do we have a constrain on creation of dynamic attributes. i.e when we create dynamic attributes from init_device() method they are created. But if we try to create from the main method it shows that "dynamicManager" is null.

Any help would me much appreciated …

Regards,
TCS_GMRT
Regards,
TCS_GMRT
Edited 8 months ago
Hi TCS GMRT team,

It is recommended to create dynamic attributes in init_device() method and delete them in the delete_device() method. Assuming you are trying to access dynamic manager before the call to the "ServerManager.getInstance().start()" method, dynamicManager is null is the expected behaviuor.

It would be helpful if you could create a rudimentary device server for testing the polling of dynamic attributes and see if the error could be reproduced.

If the error is still there then please attach the code for the rudimentary device server. It may be helpful in analyzing the issue.

Regards,
Vatsal Trivedi
Edited 8 months ago
Hi
You can create dynamic attributes during initDevice() or in another method of your class.
But not in main() method.
Main() does not belong to your class.
Regards
Pascal
Hi All,

The bug has been fixed by Tango expert.

Refer the below URL for the solution:
http://www.tango-controls.org/community/forum/c/development/java/dynamic-attribute-update/
Regards,
TCS_GMRT
Hi Team,

During development of Java TANGO DS, we were using an import "import fr.esrf.Tango.DevFailed;" (Tango Jar used 9.3.2). However, with the new Tango Jar JTango-9.3.4-shaded.jar, we are not able to compile. As it could not find "fr.esrf.Tango.DevFailed" class in the new Jar. Are we missing something can you please help.

Note: Attached images for additional reference.
Regards,
TCS_GMRT
Hi

I am using JTango-9.3.4-shaded.jar without problem with DevFailed.
I compiled servers and clients several times a day without problem

Regards
Pascal
Works for me as well:

Hi Team,

Sorry for the inconvenience caused. There was a problem with our setup.
Regards,
TCS_GMRT
 
Register or login to create to post a reply.