Skip to content
Snippets Groups Projects
Commit 04aedba9 authored by Anders Lindh Olsson's avatar Anders Lindh Olsson :8ball:
Browse files

E3-1373: Remove outdated documentation

parent 045949b4
No related branches found
No related tags found
1 merge request!30E3-1392: Module review fixes
# e3-autosave # e3-autosave
## Autosave settings
We try to enclose most possible autosave configuration within `autosave.iocsh`.
## Preparation of DB ## Preparation of DB
Each record in database file that needs to have values saved by `autosave` must have the one of following `info` tags. Such as Each record in database file that needs to have values saved by `autosave` must have the one of following `info` tags. Such as
...@@ -26,26 +22,3 @@ Each info tag should be matched with what one would like to use such as ...@@ -26,26 +22,3 @@ Each info tag should be matched with what one would like to use such as
* `autosaveFields_pass1`: after record initialization (Most autosave values can be restored at Pass 0 and Pass 1 using the `autosaveFields` info tag.) * `autosaveFields_pass1`: after record initialization (Most autosave values can be restored at Pass 0 and Pass 1 using the `autosaveFields` info tag.)
- `values_pass1.sav` : in `$(AS_TOP)/$(IOCNAME)/save` - `values_pass1.sav` : in `$(AS_TOP)/$(IOCNAME)/save`
- `values_pass1.req` : in `$(AS_TOP)/$(IOCNAME)/req` - `values_pass1.req` : in `$(AS_TOP)/$(IOCNAME)/req`
Please look at the example in [Autosave DB example](template/SR_test_info.db).
## How to enable it within e3
```
require autosave,5.10.0
epicsEnvSet("TOP", "$(E3_CMD_TOP)/..")
epicsEnvSet("IOCNAME", "as_test")
iocshLoad("$(autosave_DIR)/autosave.iocsh", "AS_TOP=$(TOP),IOCNAME=$(IOCNAME)")
```
## asVerify
asVerify is avaiable in `${EPICS_BASE}/bin/${EPICS_HOST_ARCH}/asVerify_VERSION`. Once e3 environment is sourced, it can be executable in that terminal. Please see its usage at https://epics.anl.gov/bcda/synApps/autosave/autoSaveRestore_R5-5.html#asVerify
## request (req) files
The req files can be used, however, one should copy all req files into `db` folder, by `TEMPLATE` variable. In order to integrate an IOC, please check [README : How to use existent req files](README_REQUEST.md). However, it is highly recommended **NOT** to use this method if possible.
How to reuse request files
===
It is highly recommended to use `info` tag instead of the seperated request files. However, this file would like to help them to use existent request files within `autosave.iocsh` within `e3-autosave` according to existent all EPICS modules' req files, own req files, or both.
## `e3-autosave`
```
require autosave,5.10.0
...
dbLoadRecords("spinnaker.db", "P=$(PREFIX),R=,PORT=$(PORT)")
...
iocshLoad("$(autosave_DIR)/autosave.iocsh", "AS_TOP=$(TOP),IOCNAME=$(IOCNAME)")
#
iocInit()
```
## `e3-ADSpinnakar`
* Use the same way to use `e3-autosave`
* Define **all** requestfile path before the first `dbLoadRecords`. It is important to open all req files, which are related with all database files. And one has to check where they are. And one has to define them all.
```
set_requestfile_path("$(ADSpinnaker_DB)", "")
set_requestfile_path("$(ADGenICam_DB)", "")
set_requestfile_path("$(ADCore_DB)", "")
set_requestfile_path("$(calc_DB)", "")
set_requestfile_path("$(busy_DB)", "")
set_requestfile_path("$(TOP)", "cmds")
```
* Create one own req file in a directory (for example, `cmds`).
```
$ more cmds/auto_settings.req
file "spinnaker_settings.req", P=$(P), R=$(R)
file "NDStdArrays_settings.req", P=$(P), R=$(R)
file "commonPlugin_settings.req", P=$(P)
```
* Add the `create_monitor_set` after `iocInit`
```
create_monitor_set("auto_settings.req", 5, "P=$(PREFIX),R=,IMAGE=$(IMAGE):")
```
* Full example for the ADSpinnaker application
```
require ADSpinnaker,2.0.0
require calc,3.7.3
require busy,1.7.2-e45eda2
require autosave,5.10.0
epicsEnvSet("TOP", "$(E3_CMD_TOP)/..")
set_requestfile_path("$(ADSpinnaker_DB)", "")
set_requestfile_path("$(ADGenICam_DB)", "")
set_requestfile_path("$(ADCore_DB)", "")
set_requestfile_path("$(calc_DB)", "")
set_requestfile_path("$(busy_DB)", "")
set_requestfile_path("$(TOP)", "cmds")
ADSpinnakerConfig("$(PORT)", "$(CAMERA_ID)", 0x1, 0)
dbLoadRecords("spinnaker.db", "P=$(PREFIX),R=,PORT=$(PORT)")
dbLoadRecords("PGR_BlackflyS_50S5C.db", "P=$(PREFIX),R=,PORT=$(PORT)")
NDStdArraysConfigure("$(IMAGE)", 5, 0, "$(PORT)", 0, 0)
dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=,PORT=$(IMAGE),ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Int16,FTVL=SHORT,NELEMENTS=$(NELEMENTS)")
iocshLoad("$(ADCore_DIR)/commPlugins.iocsh", "P=$(PREFIX),UNIT=1,PORT=$(IMAGE),QSIZE=$(QSIZE),XSIZE=$(XSIZE),YSIZE=$(YSIZE),NCHANS=$(NCHANS),CBUFFS=$(CBUFFS)")
iocshLoad("$(autosave_DIR)/autosave.iocsh", "AS_TOP=$(TOP),IOCNAME=$(IOCNAME)")
iocInit()
create_monitor_set("auto_settings.req", 5, "P=$(PREFIX),R=,IMAGE=$(IMAGE):")
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment