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
The initial gathering of the `.req` files is done at container build time. Each time `ansible.sh` is executed in the Dockerfile it builds the given support module, but also symlinks all `.req` files from `ibek-support/<module>` to the `\epics\autosave` folder in the container.
96
+
97
+
These files are provided by the creator of the `ibek-support/<support_module>` module recipe. If the upstream support module includes req files that match the AreaDetector naming convention then there is no need to provide any `.req` files here.
98
+
99
+
If the support module has `.req` files with a different naming convention then one way to support this is to copy those files into the `ibek-support/<support_module>` folder and rename them appropriately. This is in keeping with the epics-containers philosophy of not requiring changes to the upstream support modules in order to support them. However, if the support module maintainer is open to adopting the defacto standard for `.req` files then that is the preferred approach.
100
+
101
+
Adding `.req` files to `ibek-support` gives us a way to supply autosave information that has historically been done out of band. DLS have a specific use for this as discussed in [](#dls_autosave).
102
+
93
103
## Runtime behaviour
94
104
95
105
All of the `.req` files supplied by support modules include the same macros as the templates that their PVs come from. Hence these need to be substituted with values that the individual IOC instance is using before passing to autosave.
96
106
97
-
In addition the multiple `.req` files from multiple support modules need to be gathered into a single file for each of the autosave phases. These are to be called `autosave_positions.sav.req` and `autosave_setting.req` and passed to the `create_monitor_set` function as we saw above.
107
+
In addition the multiple `.req` files from multiple support modules need to be gathered into a single file for each of the autosave phases. These are to be called `autosave_positions.sav.req` and `autosave_settings.req` and passed to the `create_monitor_set` function as we saw above.
98
108
99
109
Both file gathering and substitution are handled by ibek in the `start.sh` script that all epics-containers IOC instances use. The command that performs this step is:
- symlinks all `.req` files found in the support modules of the generic IOC to `\epics\autosave`
108
-
- symlinks all `.req` files found in `ibek-support` support module folders to `\epics\autosave` (overwriting provides override facility)
109
-
- symlinks all `.req` files found in `\epics\ioc\config` to `\epics\autosave` (overwriting as provides override facility)
118
+
- if the file exists then don't overwrite - allowing the `ibek-support` to provide overrides
119
+
- symlinks all `.req` files found in `\epics\ioc\config` to `\epics\autosave`
120
+
- overwriting any existing files thus providing instance overrides
110
121
- generates two substitution files
111
122
- /epics/runtime/autosave_positions.subst
112
123
- /epics/runtime/autosave_settings.subst
113
124
- runs MSI over the above substitution files, with the path pointing to `\epics\autosave`
114
125
115
126
The substitution files are copies of `/epics/runtime/ioc.subst` except that the EPICS Db template file names are replaced with autosave req file names using the naming convention described in [](#req_sources).
116
127
117
-
The MSI output is two files `autosave_positions.sav.req` and `autosave_setting.req` which are in turn passed to `create_monitor_set` in the startup script.z
128
+
The MSI output is two files `autosave_positions.sav.req` and `autosave_settings.req` which are in turn passed to `create_monitor_set` in the startup script.z
129
+
130
+
(dls_autosave)=
131
+
## Diamond Light Source Autosave Approach
132
+
133
+
134
+
At DLS we generate our .req files from comments added to the template files. This has had the unfortunate side effect of making DLS forks of support modules deviate from upstream. This does not fit well with the epics-containers philosophy of using upstream support modules without modification.
135
+
136
+
For this reason we supply a tool to extract the comment information from the internal DLS fork of the support modules and generate the `.req` files.
137
+
138
+
This tool should be used when:
139
+
- the upstream support module does not provide `.req` files in the AreaDetector style
140
+
- the DLS fork of the support module has autosave comments in the template files
141
+
- the module is DLS internal or is public but originated from DLS
142
+
143
+
The tool is called `builder2ibek` and can be installed from PyPi.
144
+
145
+
The following example was used to extract the autosave information from the `pmac` module:
0 commit comments