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

[core] add/improved IsPublished/IsSubscribed logic (5.13.x) #1632

Merged
merged 4 commits into from
Jun 20, 2024

Conversation

rex-schilasky
Copy link
Contributor

@rex-schilasky rex-schilasky commented Jun 19, 2024

Description

  • additional check for CSubscriber::GetPublisherCount() using the connection state of the matching subscriber to ensure that GetPublisherCount is increased only if the matching publisher is able to send data
  • test added to test new behavior

Related issues

…IsSubscribed" (we may rename both functions to "IsConnected" in the future)

new additional check for IsPublished using the connection state of the matching subscriber (should ensure that IsPublished is flagged as true only if publisher is able to send data)
test added to test new behavior
@rex-schilasky rex-schilasky added the cherry-pick-to-NONE Don't cherry-pick these changes label Jun 19, 2024
@rex-schilasky rex-schilasky changed the title [core] add/improved IsPublished/IsSubscribed logic [core] add/improved IsPublished/IsSubscribed logic (5.13.x) Jun 20, 2024
Copy link
Contributor

@KerstinKeller KerstinKeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove IsPublished() for 5.13 and add it only for 5.14.

@@ -295,8 +295,12 @@ namespace eCAL

iter->second->ApplyLocLayerParameter(process_id, topic_id, tlayer.type(), writer_par);
}
// inform for local publisher connection
iter->second->ApplyLocPublication(process_id, topic_id, topic_info);
// we only inform the subscriber when the publisher has already recognized at least on local subscriber
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least on -> at least one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -345,8 +349,12 @@ namespace eCAL
const std::string writer_par = tlayer.par_layer().SerializeAsString();
iter->second->ApplyExtLayerParameter(host_name, tlayer.type(), writer_par);
}
// inform for external publisher connection
iter->second->ApplyExtPublication(host_name, process_id, topic_id, topic_info);
// we only inform the subscriber when the publisher has already recognized at least on external subscriber
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least on -> at least one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@rex-schilasky rex-schilasky merged commit 3923a1d into support/v5.13 Jun 20, 2024
10 of 11 checks passed
@rex-schilasky rex-schilasky deleted the hotfix/pub_sub_state_logic branch June 20, 2024 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-to-NONE Don't cherry-pick these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants