You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found most of the missing pieces from the 3.2 -> 4.* change that broke this:
The mapping between types changed rather a lot. The old NumpyCharCodeToDbr mapping was replaced by NumpyDtypeToDbf (and other bits). Adding this mapping: 'bytes32': 'STRING' means we can initialize a Waveform of the given form without error, but caget'ing it doesn't work right.
The second major change is WaveformBase._write_value. Previously there was a call to numpy.require() using a saved dtype (inferred earlier in the initialisation process) that was set to "S40" i.e. an EPICS string. That conversion step just doesn't exist anymore. Hacking it by just adding this line at the beginning of the method: value = numpy.require(value, dtype=numpy.dtype('S40')) makes everything almost work:
I haven't yet worked out why elements 1 and 2 are now empty. And I'm not sure what the proper fix of the _write_value method is, but it's nearly there.
Activity
Araneidae commentedon Aug 24, 2022
Interesting regression. Do you feel like bisecting it? Unfortunately 3.2 is quite a long way back, it may be simpler to reimplement the functionality!
I didn't realise that arrays of strings actually worked.
AlexanderWells-diamond commentedon Aug 24, 2022
I'm investigating it now. There has been a large amount of changes in this area unfortunately. I'll see what I can do.
AlexanderWells-diamond commentedon Aug 24, 2022
I've found most of the missing pieces from the 3.2 -> 4.* change that broke this:
The mapping between types changed rather a lot. The old
NumpyCharCodeToDbrmapping was replaced byNumpyDtypeToDbf(and other bits). Adding this mapping:'bytes32': 'STRING'means we can initialize a Waveform of the given form without error, butcaget'ing it doesn't work right.The second major change is
WaveformBase._write_value. Previously there was a call tonumpy.require()using a saveddtype(inferred earlier in the initialisation process) that was set to "S40" i.e. an EPICS string. That conversion step just doesn't exist anymore. Hacking it by just adding this line at the beginning of the method:value = numpy.require(value, dtype=numpy.dtype('S40'))makes everything almost work:I haven't yet worked out why elements 1 and 2 are now empty. And I'm not sure what the proper fix of the
_write_valuemethod is, but it's nearly there.