DiamondLightSource / DiamondLightSource/cothread

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

Open
#19 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
13
Forks
11
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.