ska-sa / tango-simlib

Generic data-driven device simulator generation for PyTango
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Generate simulation data for SPECTRUM/IMAGE attributes #159

Open kmadisa opened 2 years ago

kmadisa commented 2 years ago

The GaussianSlewLimited quantity class only generated simulation values 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 katleho.madisa47@gmail.com

Screenshots or code snippets (if appropriate): N/A

Definition of Done Checklist

SKA-JIRA: 442