Skip to content
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

Default DISP to TRUE for all In records #74

Merged
merged 3 commits into from
Dec 14, 2021
Merged

Conversation

AlexanderWells-diamond
Copy link
Collaborator

This PR will default the DISP field to TRUE for all In record types.

PythonSoftIOC In records never perform processing, and so are never given an opportunity to access the .VAL field, even if a caput has updated it. This means that while a caget call would return the new value, a record.get() call would not which would lead to confusion.

By setting DISP=TRUE we disable caput from changing the value and thus maintaining consistency between caget and record.get() values.

Note that it is possible to use caput to change the DISP field, but if users do this it's on them. I'm not sure there's any way to stop them doing this if they really want to.

This could be a breaking change, depending how well behaved people have been with In records. @MJGaughran gave the example of an In record being used as an input to a CALC record. And of course the more general use-case of someone just doing caput to an In record, when they probably should have been using an Out record.

@codecov
Copy link

codecov bot commented Dec 14, 2021

Codecov Report

Merging #74 (0cda4cd) into master (5034531) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
+ Coverage   85.38%   85.39%   +0.01%     
==========================================
  Files          13       13              
  Lines         814      815       +1     
==========================================
+ Hits          695      696       +1     
  Misses        119      119              
Impacted Files Coverage Δ
softioc/builder.py 95.91% <100.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5034531...0cda4cd. Read the comment docs.

@Araneidae Araneidae merged commit 3866562 into master Dec 14, 2021
@Araneidae Araneidae deleted the add_disp_to_in_records branch December 14, 2021 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants