Skip to content

Conversation

romainreignier
Copy link
Contributor

This should close #456

This is my first contribution to ros2_rust and I am not sure about the return code handling and safety comment.
Any feedback is welcomed.

@romainreignier romainreignier force-pushed the feature/add_get_subscription_count branch from ba8e6ac to e76157f Compare February 4, 2025 00:55
@romainreignier romainreignier requested a review from jhdcs February 4, 2025 01:05
@jhdcs
Copy link
Collaborator

jhdcs commented Feb 4, 2025

Looking good so far! I did think of one other thing that should probably be added. In the bottom of the file, there is a test_publishers unit test. Would you be able to add a test for your code to it? Since there aren't any subscribers created in the test, we should expect a count of 0, but this is good practice to include anyways.

Sorry for the extra task there, wish I had thought of it before...

@romainreignier romainreignier force-pushed the feature/add_get_subscription_count branch from e76157f to 11128b9 Compare February 4, 2025 17:40
@romainreignier
Copy link
Contributor Author

Thanks for the suggestion, I have added the tests.

@romainreignier romainreignier force-pushed the feature/add_get_subscription_count branch from 11128b9 to 3e04892 Compare February 4, 2025 17:50
@romainreignier
Copy link
Contributor Author

Sorry, I had missed a publisher to test. I have tried to add a to each topic and it works as well.

@romainreignier romainreignier force-pushed the feature/add_get_subscription_count branch from 3e04892 to 5e162f2 Compare February 4, 2025 17:51
@jhdcs
Copy link
Collaborator

jhdcs commented Feb 4, 2025

Confirmed that this works on my setup. Thank you very much for your contribution!

@jhdcs jhdcs merged commit 94f76e5 into ros2-rust:main Feb 4, 2025
6 checks passed
romainreignier added a commit to romainreignier/ros2_rust that referenced this pull request Mar 27, 2025
Co-authored-by: Romain Reignier <romain.reignier@exail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_subscription_count() missing for Publisher

2 participants