Hello all,
I have a question regarding the device attribute list on the server side.
I use a PyTango DS and only dynamic attributes (created with dyn_attr()
of the DeviceClass).
When I get the list of attributes (using <Device_Impl>.get_device_attr()
) it is empty during server initialization but when called at runtime it returns attributes added to other devices of this class. Note that during the server initialization we also add attributes to the devices of this class.
You can use this example DS to reproduce this issue by following these steps (do not follow the steps from the repository):
In one console (here the lines starting from “remove device attribute: attr1” appears after executing the code in the second console)
tango_admin --add-server DeviceServer/test PoolDevice test/pooldevice/1 tango_admin --add-server DeviceServer/test MyDevice test/mydevice/1
tango_admin --add-server DeviceServer/test MyDevice test/mydevice/2
python3 DeviceServer.py test -v4
remove class attr: attr2
Ready to accept request
Ready to accept request
remove device attribute: attr1
remove device attribute: attr2
remove class attr: attr2
remove device attribute: attr3
In another python console (after starting the server:
import tango
pool = tango.DeviceProxy("test/pooldevice/1")
pool.CreateDevice(["MyDevice", "test/mydevice/3"])
You can find me on Slack to clarify any doubt about this question.
Many thanks,
Zibi