memorized spectrum attributes

Dear Tangoers,

I would like to persist a float spectrum attribute (modest size, e.g. <10 elements, writable) in a Tango device after device restart. This attribute represents a set of pointing model parameters for an antenna. They have a moderate variation in time (e.g. order of days more or less). I want my device to use by default the latest value written by clients after the device restart.
Do you know why memorized spectrum attrs are not supported? Lorenzo Pivetta remembers that this feature existed in the past but not why it was removed. Do you think it is possible to resume it or in alternative do you see a better way to handle my use case? E.g. use an attribute/device property instead?

Thanks for your support,

Simone
****************************************************************
Simone Riggi
INAF, Osservatorio Astrofisico di Catania
Via S. Sofia 78
95123, Catania - Italy
phone: +39 095 7332 extension 282
e-mail: simone.riggi@gmail.com,
sriggi@oact.inaf.it
skype: simone.riggi
****************************************************************
Hi Simone,

The gurus from the ESRF do not remember that this feature was ever implemented.

The reason why it is not supported is because of the fact there is nothing which limits the size of a spectrum or image attribute.
This could potentially have a big impact on the size/performances of the Tango Database.
This feature was not implemented on purpose.
If one needs such a feature, the developer must implement it himself using a device or attribute property indeed, for instance.
And this should be done for small size spectrum or image attributes.

You can easily imagine what would happen if a spectrum attribute having a dimension of 1 billion was written at very high frequency.
This could kill the performances of the Tango Database and Database server.
This feature was not implemented to avoid to make it too easy to implement such a feature which could have a big impact on the Tango Database performances.

Kind regards,
Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
Hi Simone,

A simple Tango solution is to have a String attribute (Memorized) and initialize it with the comma separated values of the pointing model parameters. This may add additional wrapping/parsing logic in your code.

Another solution is as you said; using Attribute or Device Properties.

Hope it helps.

Kind regards,
Jyotin
Dear Reynald & Jyotin,

many thanks for your answers. I will try the solutions you suggested.

Cheers,

Simone
****************************************************************
Simone Riggi
INAF, Osservatorio Astrofisico di Catania
Via S. Sofia 78
95123, Catania - Italy
phone: +39 095 7332 extension 282
e-mail: simone.riggi@gmail.com,
sriggi@oact.inaf.it
skype: simone.riggi
****************************************************************
 
Register or login to create to post a reply.