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

run event_based_communication on C++ #566

Closed
owny990312 opened this issue Dec 24, 2024 · 5 comments · Fixed by #567
Closed

run event_based_communication on C++ #566

owny990312 opened this issue Dec 24, 2024 · 5 comments · Fixed by #567
Labels
bug Something isn't working

Comments

@owny990312
Copy link

owny990312 commented Dec 24, 2024

when I first run ./example_cxx_event_based_communication_subscriber,
then run ./example_cxx_event_based_communication_publisher, the publisher is coredump like the following picture:

image

But when I first run example_cxx_event_based_communication_publisher
then run ./example_cxx_event_based_communication_subscriber,it works.

But In my case, it must run subscriber first.

@owny990312 owny990312 added the bug Something isn't working label Dec 24, 2024
@elfenpiff
Copy link
Contributor

@owny990312 Thanks for the bug-report - I can confirm the bug! It is only present in the C++ version of the example. I suppose it is a bug in the example itself.

@elfenpiff
Copy link
Contributor

@owny990312 the problem was that the publisher and the subscriber had inconsistent history requirements. This is fixed with #567

@owny990312
Copy link
Author

@owny990312 the problem was that the publisher and the subscriber had inconsistent history requirements. This is fixed with #567问题是出版商和订阅者的历史要求不一致。这通过 #567 解决了。

Thanks for your reply

@owny990312
Copy link
Author

owny990312 commented Dec 24, 2024

@owny990312 the problem was that the publisher and the subscriber had inconsistent history requirements. This is fixed with #567问题是出版商和订阅者的历史要求不一致。这通过 #567 解决了。

By the way, what is the function of HISTORY_SIZE? Does it store the history messages of the publisher? In other words, can a subscriber receive up to 20 history messages from the publisher?

If I don't set this value, it can work? Because In some case I never mind the history value, so I don't want to subscriber this value.But In my practice, it default to 1 not zero

elfenpiff added a commit to elfenpiff/iceoryx2 that referenced this issue Dec 24, 2024
elfenpiff added a commit that referenced this issue Dec 24, 2024
…cxx-example

[#566] Fix event based comm cxx example
@elfenpiff
Copy link
Contributor

HISTORY_SIZE determines how many previously delivered samples the publisher will send to the subscriber when the subscriber connects. In this case, the subscriber would receive up to the latest 20 samples from the publisher on connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants