-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
database: add accelerator standard PV behavior and naming. #3
Draft
henriquesimoes
wants to merge
4
commits into
main
Choose a base branch
from
accelerator
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Both the behavior and naming come from the previous implementation for the Basler acA1300-75gm used at the Sirius accelerator. This implementation was obtained from commit 967176553fe (latest one in any branch available as of now) of the following repository https://github.com/lnls-dig/basler-acA1300-75gm-epics-ioc The basleracA130075gmApp/Db/BaslerSiriusStandard.db was renamed to `accelerator.db` here. High level aliasing has not been included, since it shall be verified whether it is really useful in practice. Some records in the database use `sseq`, which is provided by the EPICS Calc module. Thus, it has been added as a dependency in the IOC.
The description has been updated to match the way the low-level database has been generated. Moreover, some minor changes in styling have been made.
From aravisGigE areaDetector module to the newest ADGenICam, naming convention for generated records have been changed. Now, they are prefixed by `GC_` to avoid conflicts in areaDetector, and the policy to shorten the name trims inner words to its first 3 chars instead of replacing the last words with a numeric identifier. Therefore, all references made in the previous high-level PV database need to be updated. In order to prevent mistakes, this has been done by a simple script ``` diff -y $previous $current | grep record > changes.txt cat changes.txt | cut -d'|' -f 1 | cut -d')' -f 3 | cut -d'"' -f 1 > prev.pv cat changes.txt | cut -d'|' -f 2 | cut -d')' -f 3 | cut -d'"' -f 1 > curr.pv paste prev.pv curr.pv | xargs -L1 \ bash -c "sed -i -e \"s|Cam1\$0|Cam1\$1|\" $standard" ``` in which - `$previous` points to the previously generated database file - `$current` points to `acA1300-75gm.db`; and - `$standard` points to `standard.db` file. Basically we generate the diff from the two auto generated DBs and generate two files for the previous and new names. This file is than concatenated line-by-line by `paste` and a substitution is performed for occurrences prefixed by Cam1. Cam1 was defined in the previous implementation as the `R` macro for the auto generated DB file. This way, we only substitute where it is indeed needed.
It is a pattern in areaDetector to use the plugins and driver names suffixed by a colon, for instance `Cam1:` instead of simply `Cam1`. Such names only impact the aliases and forward links made in the database for accelerator PV naming standard.
henriquesimoes
commented
Feb 20, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is still missing the high level aliases defined in the original repository.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Both the behavior and naming come from the previous implementation for the Basler acA1300-75gm used at the Sirius accelerator. This implementation was obtained from commit lnls-dig/basler-acA1300-75gm-epics-ioc@9671765.