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

Introducing message port handling to blocks and graphs #254

Merged
merged 17 commits into from
Jan 31, 2024

Conversation

ivan-cukic
Copy link
Contributor

@ivan-cukic ivan-cukic commented Jan 25, 2024

  • 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;

@ivan-cukic ivan-cukic force-pushed the ivan/messages-port-v3 branch from d93c67a to 371762b Compare January 25, 2024 11:19
@ivan-cukic ivan-cukic force-pushed the ivan/messages-port-v3 branch from 371762b to 84033f8 Compare January 25, 2024 11:20
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 25, 2024 11:21 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 25, 2024 11:21 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic linked an issue Jan 25, 2024 that may be closed by this pull request
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 07:57 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 07:57 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 07:57 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 07:57 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic force-pushed the ivan/messages-port-v3 branch from d131d0d to 3be2d4d Compare January 31, 2024 08:12
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 08:12 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 08:12 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 08:12 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 08:12 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 08:12 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 08:12 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic force-pushed the ivan/messages-port-v3 branch from 3be2d4d to 41fb1b6 Compare January 31, 2024 08:26
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 08:26 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 08:26 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 08:26 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 08:26 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 08:26 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 08:26 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic force-pushed the ivan/messages-port-v3 branch from 41fb1b6 to 38fde91 Compare January 31, 2024 09:15
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 09:15 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 09:15 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 09:15 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 09:15 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 09:15 — with GitHub Actions Inactive
@ivan-cukic ivan-cukic temporarily deployed to configure coverage January 31, 2024 09:15 — with GitHub Actions Inactive
Copy link

sonarcloud bot commented Jan 31, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

49.4% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

Copy link
Member

@RalphSteinhagen RalphSteinhagen left a 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!

@RalphSteinhagen RalphSteinhagen merged commit fb8b080 into main Jan 31, 2024
7 of 8 checks passed
@RalphSteinhagen RalphSteinhagen deleted the ivan/messages-port-v3 branch January 31, 2024 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: QA-Accepted/Merged (∞)
Development

Successfully merging this pull request may close these issues.

[5pt,8pt] Enable MESSAGE passing/ports
3 participants