Open liujin001 opened 2 years ago
Thanks @liujin001 for raising these issues.
Now tango-simlib can support SPECTRUM and IMAGE attribute addition correctly. but read and write attribute value have some problems.
- In Spectrum_SimDD.json file, if we change
doubleSpectrum
attribute's "quantity_simulation_type" from "ConstantQuantity" to "GaussianSlewLimited" (with mean, std_dev, max_slew_rate, min_bound, max_bound set), then we can not readdoubleSpectrum
attribute of simulator device, the exception description is:Wrong Python type for attribute doubleSpectrum of type DevDouble. Expected a sequence
;
I tried to think of a use case for using the GaussianSlewLimited
simulation type for the SPECTRUM
attributes but didn't think it would be needed. But it should be possible to generate the values in a list for that.
Would you want each value generated as part of the list be unique?
- If we set value for the attribute of SPECTRUM and IMAGE data format through sim control device's attribute (by attribute_name and last_val), then the simulator device's attribute of SPECTRUM and IMAGE data format can not read, the exception description is: Wrong Python type for attribute XXX of type DevDouble. Expected a sequence. This may be caused by that last_val is SCALAR format forever, we can only write a scalar value to it. May solution is that if the data format of attribute set by attribute_name is SPECTRUM or IMAGE, we should disable write last_val attribute of sim control device?
Yes, I think it would be best not to allow writing to the last_val
attribute for now.
Now tango-simlib can support SPECTRUM and IMAGE attribute addition correctly. but read and write attribute value have some problems.
doubleSpectrum
attribute's "quantity_simulation_type" from "ConstantQuantity" to "GaussianSlewLimited" (with mean, std_dev, max_slew_rate, min_bound, max_bound set), then we can not readdoubleSpectrum
attribute of simulator device, the exception description is:Wrong Python type for attribute doubleSpectrum of type DevDouble. Expected a sequence
;attribute_name
andlast_val
), then the simulator device's attribute of SPECTRUM and IMAGE data format can not read, the exception description is:Wrong Python type for attribute XXX of type DevDouble. Expected a sequence
. This may be caused by thatlast_val
is SCALAR format forever, we can only write a scalar value to it. May solution is that if the data format of attribute set byattribute_name
is SPECTRUM or IMAGE, we should disable writelast_val
attribute of sim control device?