-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read and write Spectrum/Image attribute problem #157
Comments
Thanks @liujin001 for raising these issues.
I tried to think of a use case for using the
Yes, I think it would be best not to allow writing to the |
…es that are python primitive types (float in this case) which are appropriate for attributes with a SCALAR data format. This is a problem for the attrbiutes with more complex data formats, SPECTRUM/IMAGE. When reading an attribute, the quantity returns a primitive type which PyTango is not expecting, therefore resulting in the error, 'Wrong Python type for attribute... Expected a sequence'. This change here allows us to cater for the complex data formats. The method next_val now generates the simulation data according to the data format, given by the meta dictionary. Resolves #157 Signed-off-by: Katleho Madisa <[email protected]>
…LAR. It is implied to be 1. I have set default values for the max_dim_x and max_dim_y properties, respectively, when the are not provided. Resolves #157 Signed-off-by: Katleho Madisa <[email protected]>
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?The text was updated successfully, but these errors were encountered: