yat4tango: support for enum dyn attributes?

Dear all,

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)?

Thanks again,

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,

do you know why enum dynamic attributes are not supported in yat4tango?

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 smile

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.

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)?
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.

Cheers,
N.
Edited 7 years ago
BTW, did you noticed that the yat4tango::DynamicInterfaceManager is not fully compatible with the code generated by POGO?

To summarize, let's say that - each time you (re)generate your code using POGO - you will have to comment a couple of calls in <MyDevice>Class:.cpp:

void <MyDevice>Class::device_factory(const Tango::DevVarStringArray *devlist_ptr)
{
    …
    // erase_dynamic_attributes(devlist_ptr, …);
    …
    // dev->add_dynamic_attributes();
    …
}

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').
Edited 7 years ago
Dear Nicholas,

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.

Many thanks again for your help,

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.