Skip to content

Commit

Permalink
Refs 10756. Add method on DataReader.
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
  • Loading branch information
MiguelCompany committed Mar 4, 2021
1 parent 828d67c commit f34f187
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/fastdds/dds/subscriber/DataReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,15 @@ class DataReader : public DomainEntity
RTPS_DllAPI ReturnCode_t get_first_untaken_info(
SampleInfo* info);

/**
* Get the number of samples pending to be read.
* The number includes samples that may not yet be available to be read or taken by the user, due to samples
* being received out of order.
*
* @return the number of samples on the reader history that have never been read.
*/
RTPS_DllAPI uint64_t get_unread_count() const;

/**
* Get associated GUID.
*
Expand Down
5 changes: 5 additions & 0 deletions src/cpp/fastdds/subscriber/DataReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ ReturnCode_t DataReader::get_first_untaken_info(
return impl_->get_first_untaken_info(info);
}

uint64_t DataReader::get_unread_count() const
{
return impl_->get_unread_count();
}

const GUID_t& DataReader::guid()
{
return impl_->guid();
Expand Down

0 comments on commit f34f187

Please sign in to comment.