Skip to content

Commit

Permalink
Allow waveform.set() to be called before iocInit()
Browse files Browse the repository at this point in the history
With CGP-182 (944e072), waveform.set() was modified to use the dtype
attribute, which is only created after softioc.iocInit() is called.

This change adds a default for dtype, preventing this issue.
  • Loading branch information
MJGaughran committed Aug 9, 2021
1 parent a9d7201 commit 503f4a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions softioc/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ class WaveformBase(ProcessDeviceSupportCore):
# NELM Length of allocated array in number of elements
# NORD Currently reported length of array (0 <= NORD <= NELM)
_fields_ = ['UDF', 'FTVL', 'BPTR', 'NELM', 'NORD']
dtype = None

def init_record(self, record):
self.dtype = DbfCodeToNumpy[record.FTVL]
Expand Down

0 comments on commit 503f4a0

Please sign in to comment.