Skip to content

No way to get raw bytes for .EGU and similar fields #19

Open

Description

@Araneidae

This is related to issue #18: after the fix applied there we get:

>>> caget ('LI-RF-AMPL-01:KLY:T1.EGU')
'�C'

as expected, but invoking datatype=DBR_CHAR_BYTES fails thus:

>>> caget ('LI-RF-AMPL-01:KLY:T1.EGU', datatype=DBR_CHAR_BYTES)
...
cothread.catools.ca_nothing: LI-RF-AMPL-01:KLY:T1.EGU: No reasonable data conversion between client and server types

What is going on here is that DBR_CHAR_BYTES retrieves the underlying PV as a DBR_CHAR array, and we rely on the IOC automatically converting strings (type DBR_STRING) to character arrays. Unfortunately it seems that the IOC doesn't do this for .EGU, and possibly other fields.

Activity

  1. Araneidae commented on Feb 19, 2020

    @Araneidae
    CollaboratorAuthor

    This can probably be fixed by changing the behaviour of DBR_CHAR_BYTES and its allies, by first checking the underlying record datatype and treating DBR_STRING separately.

  2. self-assigned this
    on Feb 19, 2020
  3. removed their assignment
    on Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions