I have a pytango device server running on Raspberry Pi2 and a Taurus GUI on a windows client. I am trying to find a way to configure change event for the state attribute, but i can not find the necessary steps to do so in the documentation.
On the server side do i just need to put that line of code in the init_device method?
self.set_change_event(‘State’,True,True)
On the client side, how can i subscribe to that event using taurus libraries ?
Taurus subscribes to Tango events (ATTR_CONF_EVENT and CHANGE_EVENT) and translates them into the Taurus events of types Config and Change (see taurus.TaurusEventType).
You can subscribe to Taurus events using the addListener method of the TaurusAttribute class. You have two options to do that, using either a python function or a python object of a class defining eventReceived method.
But since you are talking about a Taurus GUI, you may be interested in the Taurus QT signals?
In this case your widgets would need to inherit from the TaurusBaseComponent class and each of the Taurus events would be translated into the QT signal.
Please see the following thread where a similar issue was raised:
Hope it helps,
Zibi
PS. You may be also interested in subscribing to the Taurus project mailing lists: