diff --git a/documentation/new-notes/PR-558.md b/documentation/new-notes/PR-558.md index 477558b9d..0c2d7cba6 100644 --- a/documentation/new-notes/PR-558.md +++ b/documentation/new-notes/PR-558.md @@ -1,24 +1,23 @@ -### New ```atInit``` IOC Shell Command Added +### New `atInit` IOC Shell Command Added -The pull request ```PR #558``` introduces a new IOC shell command `atInit` to EPICS Base, which allows users to schedule arbitrary commands to be executed automatically after the IOC initialization phase (`iocInit`). +This release incorporates [PR #558](https://github.com/epics-base/epics-base/pull/558) which added a new IOC shell command `atInit`. This command allows startup scripts to schedule arbitrary commands to be executed automatically after the IOC initialization phase (`iocInit`). -The module allows you to write better-structured ioc shell files to include in your startup scripts without tracking where iocInit is located (and how IOC is deployed) e.g.: -- to achieve the best maintainability, +`atInit` allows you to write better-structured IOC shell files to include in your startup scripts without tracking where `iocInit` is located (and how IOC is deployed) e.g.: +- to achieve the best maintainability (e.g. encapsulation of the context into one file), - to improve writing boot sequences, -- to improve IOC startup flexibility and scripting capabilities. +- to improve IOC startup flexibility and scripting capabilities, +- it replaces the community [`afterInit`](https://github.com/paulscherrerinstitute/iocsh_utilities/blob/master/afterInit.c) and [`doAfterIocInit`](https://github.com/epics-modules/std/blob/master/stdApp/src/delayCmd.cpp) IOC shell commands, +- community usage examples: + - [`pf4filters.iocsh`](https://github.com/epics-modules/optics/blob/master/opticsApp/iocsh/pf4filters.iocsh) - enable/disable with a single comment ([full description](https://github.com/epics-base/epics-base/pull/558#issuecomment-2430057167)) + - [ALS-U autosave managment](https://github.com/epics-base/epics-base/pull/558#issuecomment-2430447220) #### Features - Define commands that run after IOC initialization completes. -- Overwrites ```autosave``` to ensure proper configuration of the required PV. +- Executes following `iocInit` and `autosave` initialization (important for proper PV configuration). - Supports any valid IOC shell command as an argument. - Example usages: - `atInit "dbpf "` - `atInit "date"` - -#### Testing - -- Unit tests have been added to verify: - - Registration and execution of commands scheduled with `atInit`. - - Proper handling of empty or invalid commands without crashing the IOC. - - Execution order and environment variable effects. + - `atInit "dbpf $(P)EvtClkSource-Sel 'Upstream (fanout)'"` + - `atInit "dbpf $(P)Enable-Sel Enabled"`