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

[15118] Adding DataReader::get_unread_count (bool mark_as_read) #2825

Merged
merged 8 commits into from
Jul 15, 2022

Conversation

MiguelCompany
Copy link
Member

@MiguelCompany MiguelCompany commented Jul 8, 2022

Description

This PR adds an overload of DataReader::get_unread_count that receives a boolean indicating whether the unread changes should be marked as read.

This allows the application to implement a pattern where the number of newly available samples is obtained inside on_data_available().

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added.
  • Any new/modified methods have been properly documented using Doxygen.
  • Fast DDS test suite has been run locally.
  • Changes are ABI compatible.
  • Changes are API compatible.
  • Documentation builds and tests pass locally.
  • New feature has been added to the versions.md file (if applicable).
  • New feature has been documented/Current behavior is correctly described in the documentation.

Reviewer Checklist

  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
@MiguelCompany MiguelCompany added the no-aarch Skip build & test for aarch64 label Jul 8, 2022
@MiguelCompany MiguelCompany changed the title Adding DataReader::get_unread_count (bool mark_as_read) [15118] Adding DataReader::get_unread_count (bool mark_as_read) Jul 8, 2022
Copy link

@EduPonz EduPonz left a comment

Choose a reason for hiding this comment

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

The changes look good to me, although some tests would be appreciated

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
@MiguelCompany
Copy link
Member Author

@richiprosima Please test this

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
@MiguelCompany MiguelCompany marked this pull request as ready for review July 13, 2022 08:20
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
@richiware
Copy link
Member

@richiprosima please tests this

@richiware
Copy link
Member

@richiprosima please test this

@EduPonz
Copy link

EduPonz commented Jul 15, 2022

Test failures are definitely unrelated as this PR adds a new API that is not called from anywhere in the library but the specific test, which passes in all platforms.

@EduPonz EduPonz merged commit 9586068 into master Jul 15, 2022
@EduPonz EduPonz deleted the feature/get_unread_count_overload branch July 15, 2022 05:36
@EduPonz
Copy link

EduPonz commented Jul 15, 2022

@Mergifyio backport 2.6.x

mergify bot pushed a commit that referenced this pull request Jul 15, 2022
* Refs #15118. Adding overload on RTPSReader.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15118. Adding method on DataReaderHistory.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15118. Changed method on DataReaderImpl.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15118. Adding overload on DataReader.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15118. Fixed returned value on RTPSReader.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #15118. Added unit test.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs #14940. Fix error

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #14940. Improve test

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

Co-authored-by: Ricardo González Moreno <ricardo@richiware.dev>
(cherry picked from commit 9586068)
@mergify
Copy link
Contributor

mergify bot commented Jul 15, 2022

backport 2.6.x

✅ Backports have been created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-aarch Skip build & test for aarch64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants