Skip to content

Commit 5f02a84

Browse files
committed
Add documentation for WaveformIn and downgrade Waveform to legacy
Also add WaveformIn to default exports from softioc.builder and clarify in code that Waveform is a legacy name.
1 parent ae754b2 commit 5f02a84

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

docs/reference/api.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,14 @@ All functions return a wrapped `ProcessDeviceSupportIn` or
322322

323323
.. function::
324324
Waveform(name, [value,] **fields)
325+
WaveformIn(name, [value,] **fields)
325326
WaveformOut(name, [value,] **fields)
326327
327-
Create ``waveform`` records. Depending on whether `Waveform` or
328+
Create ``waveform`` records. Depending on whether `WaveformIn` or
328329
`WaveformOut` is called the record is configured to behave as an IN or an
329330
OUT record, in particular `on_update` can only be specified when calling
330-
`WaveformOut`.
331+
`WaveformOut`. The name `Waveform` is an alias for `WaveformIn` and exists
332+
for largely historical reasons.
331333

332334
If ``value`` is specified or if an `initial_value` is specified (only one of
333335
these can be used) the value is used to initialise the waveform and to
@@ -519,7 +521,7 @@ direction is confusing) using the following `softioc.builder` methods:
519521

520522
:func:`~softioc.builder.aIn`, :func:`~softioc.builder.boolIn`,
521523
:func:`~softioc.builder.longIn`, :func:`~softioc.builder.stringIn`,
522-
:func:`~softioc.builder.mbbIn`, :func:`~softioc.builder.Waveform`.
524+
:func:`~softioc.builder.mbbIn`, :func:`~softioc.builder.WaveformIn`.
523525

524526
Create OUT records for receiving control information into the IOC using the
525527
following methods:

docs/tutorials/creating-an-ioc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ by calling any of the following PV creation functions:
119119
:func:`~softioc.builder.longIn`, :func:`~softioc.builder.longOut`,
120120
:func:`~softioc.builder.stringIn`, :func:`~softioc.builder.stringOut`,
121121
:func:`~softioc.builder.mbbIn`, :func:`~softioc.builder.mbbOut`,
122-
:func:`~softioc.builder.Waveform`, :func:`~softioc.builder.WaveformOut`.
122+
:func:`~softioc.builder.WaveformIn`, :func:`~softioc.builder.WaveformOut`.
123123

124124
These functions create, respectively, ``Python`` device bound records of the
125125
following types:

softioc/builder.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,13 @@ def _waveform(value, fields):
231231
fields['FTVL'] = NumpyDtypeToDbf[datatype.name]
232232

233233

234-
def Waveform(name, *value, **fields):
234+
def WaveformIn(name, *value, **fields):
235235
_waveform(value, fields)
236236
_set_in_defaults(fields)
237237
return PythonDevice.waveform(name, **fields)
238238

239-
WaveformIn = Waveform
239+
# Legacy name
240+
Waveform = WaveformIn
240241

241242
def WaveformOut(name, *value, **fields):
242243
_waveform(value, fields)
@@ -319,7 +320,7 @@ def UnsetDevice():
319320
'longIn', 'longOut',
320321
'stringIn', 'stringOut',
321322
'mbbIn', 'mbbOut',
322-
'Waveform', 'WaveformOut',
323+
'Waveform', 'WaveformIn', 'WaveformOut',
323324
'longStringIn', 'longStringOut',
324325
'Action',
325326
# Other builder support functions

0 commit comments

Comments
 (0)