Hi all,
I have two commands Start and Stop. When I execute Start, the state is set to ON, and I want to read some data, then to wait some time (variable TimePause), and I want to do that continuously until I execute command Stop.
I have done this like below:
[i]def Start(self):
…
self.set_state(PyTango.DevState.ON)
…
def Stop(self):
…
self.set_state(PyTango.DevState.OFF)
…
def read_Data(self, attr):
…
if (self.get_state() in [PyTango.DevState.RUNNING.ON]):
DO SOMETHING
self.attr_Data_read= data i have read;
time.sleep(TimePause)
attr.set_value(self.attr_Data_read)[/i]
But, in this way, I have to wait TimePause seconds for all atributes to update their values.
How can I do this so that one atribute is updated every TimePause seconds, and other attributes update their values by polling?
I hope I was clear and that someone can help me with this.
Cheers,
O