Allow int64 datatype
Closed this issue · 2 comments
In pandablocks, SEQ:REPEATS
is a uint32, but since int64 isn't an option on softioc, we set it to an analogue out with a precision of 0. This means in ophyd async we had to allow for an epics float to be regarded as an int in this special case.
bluesky/ophyd-async#276 (comment)
I've decided that this is probably not where the fix should be, ophyd should trust the epics datatype. With this in mind, we should add functions for int64 in/out in builder.py for use in pandablocks-ioc. https://epics.anl.gov/base/R7-0/6-docs/int64outRecord.html
This is effectively asking for int64 support via the new EPICS 7 64bit record types - see issue #118 for some others we could also add while we're there
Did some debugging to narrow down exactly where our P4P error is happening:
We're expecting a different type on the value field.
initial_values[pv].type()
# returns
Type([
('value', 'd'), # HERE we should have ('value', 'I') or ('value', 'l')
('alarm', (
'S',
'alarm_t',
[
('severity', 'i'),
('status', 'i'),
('message', 's')
]
)),
('timeStamp', (
'S',
'time_t',
[
('secondsPastEpoch', 'l'),
('nanoseconds', 'i'),
('userTag', 'i')
]
)),
('display', (
'S',
'structure',
[
('limitLow', 'd'),
('limitHigh', 'd'),
('description', 's'),
('units', 's'),
('precision', 'i'),
('form', (
'S',
'enum_t',
[
('index', 'i'),
('choices', 'as')
]
))
]
)),
('control', (
'S',
'structure',
[
('limitLow', 'd'),
('limitHigh', 'd'),
('minStep', 'd')
]
)),
('valueAlarm', (
'S',
'structure',
[
('active', '?'),
('lowAlarmLimit', 'd'),
('lowWarningLimit', 'd'),
('highWarningLimit', 'd'),
('highAlarmLimit', 'd'),
('lowAlarmSeverity', 'i'),
('lowWarningSeverity', 'i'),
('highWarningSeverity', 'i'),
('highAlarmSeverity', 'i'),
('hysteresis', 'd')
]
))
], id="epics:nt/NTScalar:1.0")