rticommunity / rticommunity/rticonnextdds-examples

[BUG] flat_data_latency c++11 incorrect behavior

Open
#629 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug unconfirmed
Dominant language
Python
Stars
148
Forks
153
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in CameraImage_publisher.cxx and reproduce the c++11 flat_data_latency example with the publisher and subscriber commands listed in the issue, checking all four mode occurrences. Done means the publisher sends the final timestamp=0 sample for both --sample_count and --exec_time, and the subscriber help identifies -ds for --display_sample and -d for --domain.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
distributed-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.