Added feature to parse logic and add internal vars to fd_server and fep#106
Draft
mgaliar wants to merge 1 commit into
Draft
Added feature to parse logic and add internal vars to fd_server and fep#106mgaliar wants to merge 1 commit into
mgaliar wants to merge 1 commit into
Conversation
GhostofGoes
suggested changes
May 4, 2026
| for protocol in fd_config.protocols: | ||
| for device in protocol.devices: | ||
| for register in device.registers: | ||
| input_regs = ['analog-input', 'binary-input', 'input-register', 'discrete-input'] |
Contributor
There was a problem hiding this comment.
This should be a global and make it a set. Alternatively, could be if not register.regtype.endswith("input"):
| for protocol in fd_config.protocols: | ||
| for device in protocol.devices: | ||
| for register in device.registers: | ||
| input_regs = ['analog-input', 'binary-input', 'input-register', 'discrete-input'] |
| lhs = parts[0].strip() | ||
| mapped_lhs = output_name_to_tag.get(lhs, None) | ||
| if mapped_lhs is None: | ||
| internal_tags[lhs] = 0.0 |
Contributor
There was a problem hiding this comment.
Why is the default 0.0?
Collaborator
Author
There was a problem hiding this comment.
Because why not? Some default is needed.
Contributor
|
Presumably there's a related PR in bennu? Could you link to that from the description? |
Collaborator
Author
|
No related PR yet, but why this is draft. Technically no bennu update is needed. Bennu field device is already capable of using internal tags, we just don't leverage them in the sceptre app until now. However, potential bennu update for order of logic execution might be coming. |
This file contains hidden or 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
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.
Added feature to parse logic and add internal vars to fd_server and fep
Description
The SCEPTRE app will now parse logic and for any intermediate variables that are for inputs or outputs, it will create an internal variable and add to the field device config.
Related Issue
NA
Type of Change
Please select the type of change your pull request introduces:
Checklist
Additional Notes
NA