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

[BUG] flat_data_latency c++11 incorrect behavior #629

Open
wjcoleman opened this issue Aug 28, 2023 · 1 comment
Open

[BUG] flat_data_latency c++11 incorrect behavior #629

wjcoleman opened this issue Aug 28, 2023 · 1 comment
Labels
bug Bugs or inconsistencies in the examples unconfirmed The bug was not confirmed yet

Comments

@wjcoleman
Copy link

System information

  • RTI Product: Connext Pro
  • Version: 7.1.0
  • Operating system: WSL2
  • Compiler: gcc
  • Compiler version: 9.4.0
  • Additional information:

What is the current behavior?

For flat_data_latency c++11 example, the publisher incorrectly exits the publishing while loop before sending the final timestamp=0 sample to indicate to the subscriber app that the latency test is finished.
This is applicable if using the either the --sample_count or --exec_time options for the publisher.

Steps to reproduce the issue

  1. Build the c++11 flat_data_latency example.
  2. Start the subscriber app with: -m 3
  3. Start the publisher with: -m 3 -s 10
  4. Notice that after the publisher app stops publishing data it waits for the subscriber to exit. The subscriber will continue to print "Wait for ping: timeout" messages since it does not receive the final expected sample.

*Note this is applicable for each --mode option.

Expected behavior

Publisher app should send a final sample with timestamp=0, which the subscriber waits for to indicate it should exit.

Suggested solutions

For each occurrence of count < options.sample_count in CameraImage_publisher.cxx, it should be replaced with: count <= options.sample_count. (for all 4 modes)

**unrelated:
the help message for the subscriber says the short option for --display_sample is -d. This is incorrect, -d is for --domain. -ds the short option for --display_sample.

@wjcoleman wjcoleman added bug Bugs or inconsistencies in the examples unconfirmed The bug was not confirmed yet labels Aug 28, 2023
@wjcoleman
Copy link
Author

Additionally, the --exec_time (short option -e) publisher option is not interpreted as seconds as the helptext and readme state, but rather microseconds. This should be either clarified or corrected in the application code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs or inconsistencies in the examples unconfirmed The bug was not confirmed yet
Projects
None yet
Development

No branches or pull requests

1 participant