Dynamic Attribute update
|
|
---|---|
Hi All, A Java DS has a command which creates dynamic attributes (Attribute Name: Dynamic). However, I am not able to write values to this dynamically created attribute. On Contrary if we create dynamic attributes (Attribute Name: Dynamic1) from init_device() then the value is updated. Please find the code below:
Regards,
TCS_GMRT |
|
|
---|---|
Hi TCS_GMRT team, I think the polling is enabled for the dynamic attribute. This should result in the value of the attribute getting polled at regular intervals and stored in the Cache. But somehow this is not happening for the dynamic attributes created outside of the init_device() method. To confirm, please do the following 1. Remove polling for the dynamically created attribute 2. Source for the device is set to CACHE_DEV by default. Set it to DEV. (Snapshot attached for reference). 3. Create the dynamic attribute. 4. Check if the value is getting reflected on the ATKPanel or not. I presume you enabled the polling for events. If above findings are correct then remove polling for the attributes and push the change events from the code. Please note that this is a workaround and not the solution. I'm not able to figure out the reason as to why the value of an attribute created dynamically outside the init_device() method is not getting cached. TANGO experts may be able to answer it. However, it is suggested to create dynamic attributes in the init_device() method. Regards, Vatsal Trivedi |
|
|
---|---|
Thanks Vatsal, Will try and get back.
Regards,
TCS_GMRT |
|
|
---|---|
This issue has been solved offline here is the summary of the solution. There was no problem creating dynamic attributes in the command of a Java server. On the contrary two bugs were found:
The second bug has been fixed by this PR: https://github.com/tango-controls/JTango/pull/43 The new release which fixes this problem is available here: https://bintray.com/tango-controls/maven/JTango/9.3.4 Thanks to Continuous Integration + Pascal + Igor for this prompt bug fix! |
|
|
---|---|
Thanks for the early & prompt reply. Help is much appreciated.
Regards,
TCS_GMRT |