Configure attribute polling on the server side
|
|
---|---|
Dear all, I have a simple question. In a python Tango device how can I configure polling for an attribute (period, turn on/off polling)? For standard attribute I can set the polling when creating them in the init_device: myattr= attribute(…, polling_period=3000, …) What should I do to set polling for State & Status attributes at initialization or if I want to reconfigure polling for some standard attributes after init_device()? Probably this question was answered in the past, so forgive me if I ask again. Many thanks, Simone
****************************************************************
Simone Riggi INAF, Osservatorio Astrofisico di Catania Via S. Sofia 78 95123, Catania - Italy phone: +39 095 7332 extension 282 e-mail: simone.riggi@gmail.com, sriggi@oact.inaf.it skype: simone.riggi **************************************************************** |
|
|
---|---|
Hi Simone, Have you got the solution to set polling for State & Status attributes at initialization in Python/PythonHL code? I am also trying to set polling for State & status command in PythonHL code. I am trying to resolve the issue posted on Tango Forum here: https://github.com/tango-controls/pogo/issues/53 Thanks. Regards, Snehal |
|
|
---|---|
Hi all, I have tested two options to solve that: First, setting polling for state is as easy as adding this line to init_device(self) method:
I will ask if it's possible to have this line added by Pogo for python classes. But, if you just want to have events for state; you can have them without polling adding these lines:
I hope these recipes solve your question, Sergi |
|
|
---|---|
Thanks for investigating and the detailed answer, Sergi! Anton. |