Setting value of dynamic attributes on initialization
|
|
---|---|
Hi all, I have written a PyTango DS which creates a list of boolean dynamic attributes for a DIO DAQ device. I am currently struggling with the situation, that all writable attributes are initialized as True and that this value is also not written to the DAQ which means, that the DO are actually all False, while Jive indicates a True after startup. So my question is, how can I set the value of a dynamic attribute on initializaton? Many thanks in advance! Daniel |
|
|
---|---|
Hi, Daniel I am not sure I correctly understand your quiestion. Why don`t you just call read function by yourself after add_attribute method? E.g.
Or did I undestand something wrong? |
|
|
---|---|
Hi, Daniel If you want the real DO value to be available after attribute creation, use set_write_value() function. Something like during attribute creation procedure: attr = attribute(name="dyn_attr_name", ..other_pars) self.add_attribute(attr) v = read_real_attribute value() self.dyn_attr_name.set_write_value(v) |