Skip to content

Commit 9c2905c

Browse files
BilchreisPeter Braun
andauthored
spec: add parameter postfixes (#43)
* first draft: - restricted limits to scalar numeric types - consolidated explanation to avoid repetition * change `_use`postfix to `_enable` * - `_enable` postfix is now a boolean - fixed typo in issue reference - added entry in changelog * Boolean fix --------- Co-authored-by: Peter Braun <peter.braun@helmholtz-berlin.de>
1 parent 51f5ab9 commit 9c2905c

File tree

3 files changed

+61
-16
lines changed

3 files changed

+61
-16
lines changed

issues/077 predefined parameter name prefixes.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ prefixed parameters which are used instead of changeable parameter properties.
3333

3434
:note: In the below listing, ``<paramname>`` is a placeholder for the name of the relevant parameter.
3535

36-
``use_<paramname>``
37-
an Enum (1:On, 0:Off), allowing to enable or disable the effect of
36+
``<paramname>_enable``
37+
an Enum (0:Off, 1:On), allowing to enable or disable the effect of
3838
``<paramname>`` where applicable.
3939

4040
``limit_<paramname>``
@@ -67,7 +67,14 @@ Possible candidates:
6767
* keep 'target_limits' (with 's' at end in contrast to '_limit')
6868
* 'target_max' / 'target_min' in case of single limits
6969

70-
No decision on the actual values yet.
70+
Decisions made in 2023-02-14_vidconf:
71+
72+
* postfix notation is preferred
73+
* '_enable' is used instead of '_use'/'_used'/'_enabled' to en-/disable functionalities
74+
* '_limits' is removed in favor of '_min' and '_max'
75+
76+
Note: In 2023-09-26_vidconf it was suggested that '_on' might be superior to '_enable',
77+
but no formal decision was recorded. The current specification uses '_enable'.
7178

7279
In 2023-09-26_vidconf it was proposed to include ``<paramname>_check`` as a registed postfix
7380
for checking the validity of parameter ``<paramname>``.

protocol/specification/accessibles.rst

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -362,19 +362,53 @@ Coupled modules
362362
parameter with the name of the controlling module).
363363

364364

365-
Limits and offset
366-
~~~~~~~~~~~~~~~~~
367-
368-
.. parameter:: target_limits
369-
370-
In addition to the range given in the `datainfo` property of the
371-
`target` parameter, a SEC node might offer changeable limits restricting
372-
the allowed range even more. `target_limits` is structured as a
373-
:ref:`tuple <tuple>` with two numeric members indicating the lower and upper end of
374-
a valid interval for the setting of the `target` parameter. The
375-
`datainfo` property of the `target` parameter must match the members of
376-
the `datainfo` property of `target_limits`. The SEC node must reply
377-
with an error in case a given target value does not fit into the interval.
365+
Parameter postfixes
366+
~~~~~~~~~~~~~~~~~~~
367+
368+
In addition to the static ``"min"`` and ``"max"`` data properties given in the `datainfo` property of a parameter, a SEC
369+
node might offer dynamic limits restricting the allowed range even more.
370+
These limits can be specified in two mutually exclusive ways, either by
371+
individual ``<parameter_name>_min`` and/or ``<parameter_name>_max`` parameters,
372+
or by a single ``<parameter_name>_limits`` parameter.
373+
374+
.. note:: These dynamic limits are only allowed for parameters with scalar numeric datatypes.
375+
376+
.. parameter:: <parameter_name>_min
377+
378+
An individual minimum value (of the same type as ``<parameter_name>``)
379+
specifying the dynamic accepted minimum of a parameter. The SEC node must reply with
380+
an error in case a given parameter value is below this minimum.
381+
382+
.. parameter:: <parameter_name>_max
383+
384+
An individual maximum value (of the same type as ``<parameter_name>``)
385+
specifying the dynamic accepted maximum of a parameter. The SEC node must reply with
386+
an error in case a given parameter value is above this maximum.
387+
388+
.. parameter:: <parameter_name>_limits
389+
390+
A :ref:`tuple <tuple>` with two numeric members indicating the lower and
391+
upper end of a valid interval. The `datainfo` property of
392+
``<parameter_name>`` must match the members of the `datainfo` property of
393+
``<parameter_name>_limits``. The SEC node must reply with an error in case
394+
a given parameter value does not fit into the interval.
395+
396+
.. note:: ``<parameter_name>_limits`` and the pair ``<parameter_name>_min`` /
397+
``<parameter_name>_max`` are mutually exclusive and may not coexist at the same
398+
time on the same module.
399+
400+
.. parameter:: <parameter_name>_enable
401+
402+
A boolean, allowing to enable or disable the effect of ``<parameter_name>`` where applicable.
403+
404+
.. dropdown:: Related issues
405+
406+
| :issue:`073 HasLimits and HasOffset`
407+
| :issue:`077 predefined parameter name prefixes`
408+
409+
410+
Feature related parameters
411+
~~~~~~~~~~~~~~~~~~~~~~~~~~
378412

379413
.. _offset:
380414

protocol/specification/changes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ loss of functionality.
5757

5858
- Optional SECoP transport over WebSockets has been specified (:ref:`rfc-107`).
5959

60+
- Predefined parameter postfixes have been specified to allow enabling/disabling
61+
parameters and specifying dynamic limits (:issue:`077 predefined parameter name prefixes`).
62+
The previously explicitly defined `target_limits` parameter follows this `_limits` postfix pattern.
63+
6064

6165
Version 1.1
6266
-----------

0 commit comments

Comments
 (0)