Poll dynamic commands

Hello.

I've created an issue on pytango github repo about it, but had no responce from developers, so maybe here I'll get some help.
https://github.com/tango-controls/pytango/issues/256

Why I can't poll commands that were created dynamically by code?
I can execute them from "Test Device" and clients, I see them in commands list, but when I try to start polling, DServer throw an error that command not found.

Same situation for Python and C++, so I think the problem is in the DServer architecture.

Any ideas or hints?
Hi Diego,

Good catch! That's a bug, indeed!
Thank you very much for the bug report.
I created the following issue in cppTango: https://github.com/tango-controls/cppTango/issues/538

This problem can occur when the command is added with add_command() method and when the device boolean parameter passed to add_command() is set to true, which means the command is added only for this device.
The problem does not occur if the device parameter is set to false (command added to the class commands list).

When the device parameter is set to false, it seems the polling on the dynamic commands is not automatically started if the polling period was defined from POGO. This is not the expected behaviour.

Can you try using add_command() with the device parameter set to false?
So with POGO in C++, if you created a dynamic command named MyCommand, POGO will generate a method named add_MyCommand_dynamic_command(string cmdname, bool device)

Can you please try invoking this method with device parameter set to false?
e.g.:

add_MyCommand_dynamic_command("MyWonderfulCommand",false);


This should not be a problem if you have only one device exported by your device server instances or if all the devices exported by the same instance require the same dynamic commands.
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
Hello Reynald.

Thanks for help, now it works both on Python and C++ with "device_level=False".
 
Register or login to create to post a reply.