Jump to content
OpenSplice DDS Forum
Sign in to follow this  
kuolty

How to receive only not read samples once

Recommended Posts

kuolty   

Hi

 

I was inspecting durability example with persistent storage enabled and found that late-joined subscriber receives previously posted (saved to the persistent storage) samples each time it runs. It frustrates me because according data state we have to receive only not read samples:

        dds::sub::status::DataState ds;
        ds  << dds::sub::status::SampleState::not_read()
            << dds::sub::status::ViewState::new_view()
            << dds::sub::status::InstanceState::any();

My steps:

  1. cd $OSPL_HOME/examples/dcps/Durability/isocpp
  2. Run ./publisher persistent false false and wait 10 seconds before exit to make sure that data is stored in the persistent storage
  3. Run ./subscriber persistent false false

So, what data state I have to use to receive not read sample only once?

Share this post


Link to post
Share on other sites
kuolty   

I think it's because every time I run publisher then DDS considers that it is a new node appeared and sends historical data to him? Am I right that DDS can't distinguish data readers (nodes)? Or it is possible to assign some kind of name/id to the data reader to make it known to DDS?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×