Activating/deactivation event attribute reporting

Dear all,

is it possible to activate/de-activate the event reporting for a given attribute on a device server? What I would like to do at the end is allowing clients turn on/off event emission of some (low-level) attributes within my device server (all kinds of events or just some of them).
In general, what is the way to set on/off the event channel for an attribute? Should I unset all event-related properties (e.g. event_period, …) to stop event reporting?

Many thanks for your help,

Simone

PS: I'm using C++ Tango v9
****************************************************************
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
****************************************************************
Dear Simone,
each device server has an admin device which has a series of commands for configuring the polling for individual commands/attributes. You can find these described in Section 9.2 of the Advanced Features chapter. Basically you can switch polling on/off for individual attributes. Switching polling off for an attribute will stop all events for that attribute for all clients. If you want the stop events for only one client then you should unsubscribe the client from events for that attribute. I hope I am being clear. Let me know if not or if you need some example code.
Ciao
Andy
Andy, Simone

I would not used the admin device polling related commands to stop sending events. It's true that it's the polling thread which
fire the events but none those "manually" pushed (using push_xxx_event() method). Stopping the polling could also have
side effects like increasing the attribute response time and the load on the device server process.
Anyway as you mention, if one client does not want to receive event(s) any more, it simply has to unsubscribe using the
event_id returned by the subscribe call.
I am afraid there is no way for a client to ask a device not to fire event any more. And isn't it a bit dangerous?
A client has no way to know how many other clients are listening on the events and asking the device not to throw event
anymore could generate big trouble for the other clients.

My two cents.
Cheers

Emmanuel
Dear Manu & Andy,

many thanks for the suggestions. I agree with Manu that the safe and Tango way would be to let clients decide what and when they want to subscribe/unsubscribe to. I will forward this "Tango pattern" suggestion within the SKA development community.

Thanks again for your time,

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.