Event callback error

Dear all,

I am getting the following callback error after subscribing to some string attributes in a client:


EventConsumer::subscribe_event() exception in callback method of tango://riggi-tpt460:10000/mid_dish_0001/lmc/lmc_monitor/lmcserverntpstatus.idl5_change

Tango::ZmqEventConsumer::push_structured_event() exception in callback method of tango://riggi-tpt460:10000/mid_dish_0001/lmc/lmc_monitor/lmcserverntpstatus.idl5_change


I am able to receive other attributes on the same client using the same callback.
Does anyone know the origin of this error? Why the Tango core sometimes adds the "idl5" prefix to the event type?

Thanks very much for your help,

Simone

PS: Using Tango version v9.2.5a, zmq4.1.6, Ubuntu 16.04
****************************************************************
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 origin of this error is, as described in the error message:

"exception in callback method of tango://riggi-tpt460:10000/mid_dish_0001/lmc/lmc_monitor/lmcserverntpstatus.idl5_change"

So basically it means that when the callback (push_event(EventData *) method) is executed for this lmcserverntpstatus attribute, an exception is thrown by the callback.


sriggi
I am able to receive other attributes on the same client using the same callback.

So this means that this callback is doing something different for this lmcserverntpstatus attribute.

Thomas Braun recently added the possibility to print the exception message when possible, when an exception is thrown by the callback (https://github.com/tango-controls/cppTango/pull/431).
This will be available in the next cppTango release.


sriggi
Why the Tango core sometimes adds the "idl5" prefix to the event type?

This is to handle backwards compatibility with older Tango versions.
In previous Tango versions, less information was transmitted in the event structure. So this prefix is here to be able to know how much information is provided in the events.
For instance, at some point the data format (SCALAR/SPECTRUM/IMAGE) and data type (Tango::DevString, Tango::DevDouble…) were not transmitted in the events.
A Tango device might have some Tango 9 clients and Tango 8 clients subscribing to the same change events on the same attributes.
The Tango 8 clients will subscribe to "tango://riggi-tpt460:10000/mid_dish_0001/lmc/lmc_monitor/lmcserverntpstatus.change" event channel whereas Tango 9 clients will subscribe to "tango://riggi-tpt460:10000/mid_dish_0001/lmc/lmc_monitor/lmcserverntpstatus.idl5_change" event channel.
The device server will send events compatible with Tango 8 clients using "tango://riggi-tpt460:10000/mid_dish_0001/lmc/lmc_monitor/lmcserverntpstatus.change" event channel name and will also send events compatible with Tango 9 clients using "tango://riggi-tpt460:10000/mid_dish_0001/lmc/lmc_monitor/lmcserverntpstatus.idl5_change" event channel name.
When the callback is called, you should not see this idl5_ prefix in the event name. You see it in your example because it is coming from a cppTango core error message.
In the EventData structure given to the Tango client/callback, this prefix is not present in the name of the event.

So, to solve your issue, you need to understand why the callback is throwing an exception in your case.
Surrounding the callback code with a try/catch block and printing the exception should give you the answer.

Hoping this helps,
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.
 
Register or login to create to post a reply.