[Tango-cs-bug-info] [tango-cs:bugs] #800 DevShort attributes present wrong behaviour with the event changes

0 views
Skip to first unread message

tango-cs...@lists.sourceforge.net

unread,
Jun 15, 2016, 5:40:42 AM6/15/16
to Tango-cs...@lists.sf.net

[bugs:#800] DevShort attributes present wrong behaviour with the event changes

Status: open
Labels: change events
Created: Wed Jun 15, 2016 09:39 AM UTC by Carlos Falcon
Last Updated: Wed Jun 15, 2016 09:39 AM UTC
Owner: nobody

If you configure the TangoTest 'ushort_scalar' attribute to react to change events:
It can be configure with absolute or relative changes (to 1) with polling period to 3 s.

You receive the change events + some periodic events (at the same frecuency of the polling period).

  • Whith Tango8.1.2+Patches/PyTango8.1.3
Name =  sys/tg_test/1 ; event type = change ; has_value = True ; time =  2016-06-15 08:20:49
Name =  sys/tg_test/1 ; event type = change ; has_value = True ; time =  2016-06-15 08:20:50
Name =  sys/tg_test/1 ; event type = change ; has_value = True ; time =  2016-06-15 08:20:59
Name =  sys/tg_test/1 ; event type = change ; has_value = True ; time =  2016-06-15 08:21:02
Name =  sys/tg_test/1 ; event type = change ; has_value = True ; time =  2016-06-15 08:21:05
Name =  sys/tg_test/1 ; event type = change ; has_value = True ; time =  2016-06-15 08:21:08
Name =  sys/tg_test/1 ; event type = change ; has_value = True ; time =  2016-06-15 08:21:11

  • Tango9.2.1/PyTango9.2.0
Name =  sys/tg_test/1 ; event type = change ; has_value = True ; time =  2016-06-15 08:55:21
Name =  sys/tg_test/1 ; event type = change ; has_value = True ; time =  2016-06-15 08:55:23
Name =  sys/tg_test/1 ; event type = change ; has_value = True ; time =  2016-06-15 08:55:26
Name =  sys/tg_test/1 ; event type = change ; has_value = True ; time =  2016-06-15 08:55:29
Name =  sys/tg_test/1 ; event type = change ; has_value = True ; time =  2016-06-15 08:55:32

You can reproduce the error with this code:

import PyTango
from time import gmtime, strftime, sleep
import sys

device = 'sys/tg_test/1'
attr = 'ushort_scalar'

def cb(*args, **kargs):
    e_data = args[0]
    attr_value = getattr(e_data, 'attr_value')
    print 'Name = ', d.name(), '; event type =',e_data.event,  '; has_value =', hasattr(attr_value, 'value'), '; time = ', strftime("%Y-%m-%d %H:%M:%S", gmtime())

d = PyTango.DeviceProxy(device)
id = d.subscribe_event(attr, PyTango.EventType.CHANGE_EVENT, cb)

d.write_attribute(attr, 3)
d.write_attribute(attr, 5)

Sent from sourceforge.net because Tango-cs...@lists.sf.net is subscribed to https://sourceforge.net/p/tango-cs/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/tango-cs/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.

message-footer.txt

tango-cs...@lists.sourceforge.net

unread,
Jun 16, 2016, 5:18:40 AM6/16/16
to Tango-cs...@lists.sf.net

Sorry, we did not notice that this attribute change every some time, so please reject this bug.

message-footer.txt

tango-cs...@lists.sourceforge.net

unread,
Jun 16, 2016, 5:27:01 AM6/16/16
to Tango-cs...@lists.sf.net

I tried with a cpp client and it also happens. But this doesn't seem to be a bug: the attribute value is really changing.

Attachments:


[bugs:#800] DevShort attributes present wrong behaviour with the event changes

Status: open
Labels: change events
Created: Wed Jun 15, 2016 09:39 AM UTC by Carlos Falcon

Last Updated: Thu Jun 16, 2016 09:17 AM UTC
Owner: nobody

message-footer.txt
Reply all
Reply to author
Forward
0 new messages