do you know why enum dynamic attributes are not supported in yat4tango?
I’ve made some dirty hacks to the DynamicAttribute and Command classes, like the following (basically adding enum types):
SCALAR_CASE(Tango::DEV_ENUM, Tango::DevEnum);
[...]
case Tango::DEV_ENUM:
da = new DynamicScalarAttribute<Tango::DevEnum>(i);
break;
[...]
and so forth. I attach the modified code.
In the tests I’ve made it seems that enum attr are created correctly but I would like to understand if this is enough to add enum support.
In general do you know what is the current support and maintenance of yat+yat4tango library with respect to Tango development (I’ve found the library very useful to be included in my project)?
Yes I do! We simply spent the last 14 years writing Tango devices without native enum so there was no emergency to add enum support in log4tango
EDIT: Sorry, I forgot what I’ve done recently for the server API of LabVIEW binding! The DEV_ENUM support is already there - at least for attributes. Please check out the svn trunk (it will also contain the LONG_MAX fix :).
That said, my question is: is DEV_ENUM is currently supported as a command argument? POGO 8.2.2 (the one I’m using) doesn’t support it. I have to check that.
yat & yat4tango are heavily used here at SOLEIL. Let’s say that 90% of our devices rely on these libraries. Moreover, the LabVIEW (and Igor) binding also make use of them. So, you can count on long term support.
BTW, moving yat & yat4tango to github and (officially) support cmake is the first item of my todo list.
Crashes might occur at ‘Init’ otherwise. Particularly in case you make use of the yat4tango::InnerAppender (i.e. the class which aim is to route the device’ traces to a dynamic attribute called ‘log’).
many thanks for your answers! I will update to the latest svn version.
I didn’t try yet the enum commands since I have usually used a Short type in that cases (will check with my pogo version).
Concerning your latest post I didn’t notice a crash in these first tests maybe because I have no InnerAppender at the moment.
I had some crashes in the init device method while adding dynamic attributes (but not related to yat4tango) that I described in a recent post but I solved the problem by moving the attribute creation inside the add_dynamic_attributes() method. This is the place where I’m also adding attributes with yat4tango. By the way I will made some additional tests (e.g. removing or not dyn attributes at device shutdown) and will let you know in case of troubles.