-
Notifications
You must be signed in to change notification settings - Fork 13
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
Introducing message port handling to blocks and graphs #254
Conversation
ivan-cukic
commented
Jan 25, 2024
•
edited
Loading
edited
- Added a default message port pair to gr::Block with example messages for setting properties, and lifetime control of blocks;
- Additional message port pair for gr::Graph to communicate with the blocks it owns -- used for message propagation into the graph and for exporting messages outward;
- Blocks handle the messages with (optionally) type-tagged ports -- when using named ports (or another way of port type differentiation, the processMessages handlers are chosen during compile-time and there is no need to check which port a message came on during runtime);
- Messages can be targeted to a specified unique_name. The '/' is used for separating unique_name of parent graph(s) and the block. '*' (or an empty target) is used to denote a message that is meant for all blocks;
- Since messages are arbitrary property maps, some convenience functions and definitions are provided;
d93c67a
to
371762b
Compare
371762b
to
84033f8
Compare
d131d0d
to
3be2d4d
Compare
3be2d4d
to
41fb1b6
Compare
41fb1b6
to
38fde91
Compare
Quality Gate failedFailed conditions 49.4% Coverage on New Code (required ≥ 80%) See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
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.
Thanks for the tremendous amount of work! This looks good to me and we discussed most of the remaining things online and offline. Main thing is the Graph connect API defining the edges and the fan-in, fan-out, multicast mechanics that includes the port constraints for the circular buffers as part of the connection phase.
However, these should be tackled in follow-up PRs as the focus of this PR was to make the message ports usable from an UI integration point-of-view -- which it does.
Thanks again @ivan-cukic!