Introduce signal node object to abstract connections with control devices#181
Merged
Introduce signal node object to abstract connections with control devices#181
Conversation
Collaborator
Author
|
Some additional comments on ideas behind the proposal in this PR:
|
lukelowry
reviewed
Jul 15, 2025
31e075a to
4d9955d
Compare
4d9955d to
6cc26f8
Compare
fa3a42d to
1fe2b67
Compare
nkoukpaizan
approved these changes
Jul 18, 2025
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.
Description
This is a draft for implementation of signal node (bus) object.
Closes #154
@superwhiskers
Proposed changes
In this implementation signal node does not own any variable or residual. The
SignalNodeclass implements methods to set, initialize and read signal:void set(ScalarT* p_signal)method stores the pointer to a component model variable that will be shared with other components as a (control) signal. Only component that owns that variable can invoke the set function.void init(ScalarT signal)writes value ofsignalto the memory location pointed by the pointer stored in theSignalNodeinstance. Both, the component sending and the component receiving signal can initialize the signal.ScalarT read()is a const method that reads the value pointed by the pointer stored in theSignalNodeinstance.Note: When initializing the system, generators need to be initialized before governors because mechanical power sent to a generator by the governor is initialized by the generator rather than the governor.
Checklist
-Wall -Wpedantic -Wconversion -Wextra.Further comments