Skip to content

Commit 3e1e738

Browse files
Standardize the way numbered record names are documented
Some records are named after a fixed number of dimensions or items, and therefore can be collectively documented. To collapse its name while keeping the information of where the instance number goes, we use square brackets with the variable N. However, the way the ranges are specified is inconsistent, and how the user should interpret the brackets substitution is undocumented. Moreover, we use the variable N for this context, but there are also PVs with references to such variable name as well, making it even more confusing for a newcomer. Change that by standardizing on using angle brackets to specify the instance number, making consistently documented in the entry description. To avoid confusion with variables names, use K instead of N, and provide an example for each record of an expanded record name, in order to make sure that readers will correctly drop the brackets characters. Because NDPluginGather substitutes its instance number based on the environment variable, properly annotate it as such. In this case, the range is user-defined, and it is already documented in the description.
1 parent c046248 commit 3e1e738

File tree

3 files changed

+22
-15
lines changed

3 files changed

+22
-15
lines changed

docs/ADCore/NDArray.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,13 +465,14 @@ loading ADBase.template.
465465
* - N.A.
466466
- N.A
467467
- r/o
468-
- Size of each array dimension, extracted from the $(P)$(R)Dimensions and $(P)$(R)Dimensions_RBV
468+
- Size of each array dimension K in [0..9], extracted from the $(P)$(R)Dimensions and $(P)$(R)Dimensions_RBV
469469
waveform records. Note that these are both longin record, i.e. readonly values using
470470
subarray records. In the future longout records may be added to write to the individual
471471
values in $(P)$(R)Dimensions.
472472
- N.A.
473-
- $(P)$(R)ArraySize[N] N=0-9
474-
, (P)$(R)ArraySize[N]_RBV
473+
- $(P)$(R)ArraySize<K>, $(P)$(R)ArraySize<K>_RBV
474+
475+
E.g. $(P)$(R)ArraySize0_RBV
475476
- longin, longin
476477
* - NDArraySizeX
477478
- asynInt32

docs/ADCore/NDFileHDF5.rst

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -751,9 +751,11 @@ Parameters and Records
751751
- longout, longin
752752
* - asynInt32
753753
- r/w
754-
- Size of the N'th extra dimension, for N in [3..9]
755-
- HDF5_extraDimSize[N]
756-
- $(P)$(R)ExtraDimSize[N], $(P)$(R)ExtraDimSize[N]_RBV
754+
- Size of the K'th extra dimension, for K in [3..9]
755+
- HDF5_extraDimSize<K>
756+
- $(P)$(R)ExtraDimSize<K>, $(P)$(R)ExtraDimSize<K>_RBV
757+
758+
E.g. $(P)$(R)ExtraDimSize3_RBV
757759
- longout, longin
758760
* -
759761
-
@@ -784,9 +786,11 @@ Parameters and Records
784786
- stringout, stringin
785787
* - asynOctet
786788
- r/w
787-
- Specify the NDAttribute name for the N'th index, for N in [3..9]
788-
- HDF5_posNameDim[N]
789-
- $(P)$(R)PosNameDim[N], $(P)$(R)PosNameDim[N]_RBV
789+
- Specify the NDAttribute name for the K'th index, for K in [3..9]
790+
- HDF5_posNameDim<K>
791+
- $(P)$(R)PosNameDim<K>, $(P)$(R)PosNameDim<K>_RBV
792+
793+
E.g. $(P)$(R)PosNameDim5
790794
- stringout, stringin
791795
* -
792796
-
@@ -797,7 +801,7 @@ Parameters and Records
797801
- HDF5_posIndexDimN
798802
- $(P)$(R)PosIndexDimN, $(P)$(R)PosIndexDimN_RBV
799803
- stringout, stringin
800-
* - asynOctet
804+
* - asynOcte9
801805
- r/w
802806
- Specify the NDAttribute index for the X dimension
803807
- HDF5_posIndexDimX
@@ -811,9 +815,11 @@ Parameters and Records
811815
- stringout, stringin
812816
* - asynOctet
813817
- r/w
814-
- Specify the NDAttribute index for the N'th dimension, for N in [3..9]
815-
- HDF5_posIndexDim[N]
816-
- $(P)$(R)PosIndexDim[N], $(P)$(R)PosIndexDim[N]_RBV
818+
- Specify the NDAttribute index for the K'th dimension, for K in [3..9]
819+
- HDF5_posIndexDim<K>
820+
- $(P)$(R)PosIndexDim<K>, $(P)$(R)PosIndexDim<K>_RBV
821+
822+
E.g. $(P)$(R)PosIndexDim9_RBV
817823
- stringout, stringin
818824
* -
819825
-

docs/ADCore/NDPluginGather.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ split into 2 lines, but these are just a single name, for example
7373
There can be more than one such input port. The maximum is number is specified in
7474
the NDGatherConfigure command in the startup script.
7575
- NDARRAY_PORT
76-
- $(P)$(R)NDArrayPort_[N], (P)$(R)NDArrayPort_[N]_RBV
76+
- $(P)$(R)NDArrayPort_$(N), (P)$(R)NDArrayPort_$(N)_RBV
7777
- stringout, stringin
7878
* - NDPluginDriver |br|
7979
ArrayAddr
@@ -84,7 +84,7 @@ split into 2 lines, but these are just a single name, for example
8484
in the NDArray driver. There can be more than one such input port. The maximum is
8585
number is specified in the NDGatherConfigure command in the startup script.
8686
- NDARRAY_ADDR
87-
- $(P)$(R)NDArrayAddress_[N], $(P)$(R)NDArrayAddress_[N]_RBV
87+
- $(P)$(R)NDArrayAddress_$(N), $(P)$(R)NDArrayAddress_$(N)_RBV
8888
- longout, longin
8989

9090
Configuration

0 commit comments

Comments
 (0)