Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case sensitivity error when subscribing to a change event #350

Open
gcerretani opened this issue Jan 30, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@gcerretani
Copy link

commented Jan 30, 2017

When I subscribe to a change event, in the first event received at the subscription time the attr_value.name value has the right case sensitivity, as it was in PyTango 8. Then, the following change events have that field lower cased.

In the PERIODIC_EVENT, that field is always lower cased. It would be nice to get the not lowered name, as in PyTango 8.

Example:

  • first event:
EventData[
     attr_name = 'tango://...:20000/satserver/lab/1/g2'
    attr_value = DeviceAttribute(data_format = tango._tango.AttrDataFormat.SCALAR, dim_x = 1, dim_y = 0, has_failed = False, is_empty = False, name = 'G2', nb_read = 1, nb_written = 1, quality = tango._tango.AttrQuality.ATTR_VALID, r_dimension = AttributeDimension(dim_x = 1, dim_y = 0), time = TimeVal(tv_nsec = 0, tv_sec = 1484308260, tv_usec = 881227), type = tango._tango.CmdArgType.DevDouble, value = 8.0, w_dim_x = 1, w_dim_y = 0, w_dimension = AttributeDimension(dim_x = 1, dim_y = 0), w_value = 0.0)
        device = SatServer(satserver/lab/1)
           err = False
        errors = ()
         event = 'change'
reception_date = TimeVal(tv_nsec = 0, tv_sec = 1484308261, tv_usec = 822368)]
  • standard event:
EventData[
     attr_name = 'tango://...:20000/satserver/lab/1/g2'
    attr_value = DeviceAttribute(data_format = tango._tango.AttrDataFormat.SCALAR, dim_x = 1, dim_y = 0, has_failed = False, is_empty = False, name = 'g2', nb_read = 1, nb_written = 1, quality = tango._tango.AttrQuality.ATTR_VALID, r_dimension = AttributeDimension(dim_x = 1, dim_y = 0), time = TimeVal(tv_nsec = 0, tv_sec = 1484308266, tv_usec = 881001), type = tango._tango.CmdArgType.DevDouble, value = 7.96219999999992, w_dim_x = 1, w_dim_y = 0, w_dimension = AttributeDimension(dim_x = 1, dim_y = 0), w_value = 7.0)
        device = SatServer(satserver/lab/1)
           err = False
        errors = ()
         event = 'change'
reception_date = TimeVal(tv_nsec = 0, tv_sec = 1484308266, tv_usec = 929997)]

The problem seems related to the C++ side of the client. More information are found in the bug #87 closed in the PyTango repository.

@bourtemb bourtemb added the bug label Feb 2, 2017

@bourtemb

This comment has been minimized.

Copy link
Member

commented Feb 2, 2017

Thank you very much for the bug report.
It seems this bug was introduced due to some changes related to the forwarded attributes in cppapi/client/zmqeventconsumer.cpp file.
(c5d7ba8#diff-b0556cfbe11b1b16f9c0b4e3ac536871 - lines 2285 and 2286 of this commit)
Commenting lines 2432 and 2433 of cppapi/client/zmqeventconsumer.cpp file in tango-9-lts latest version seems to solve the issue for simple cases but might trigger issues with forwarded attributes as the comments above these lines are suggesting.
Deeper investigations will be needed.

@bourtemb

This comment has been minimized.

Copy link
Member

commented Mar 29, 2019

This should be fixed in cppTango v9.3.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.