|
From: Yannis D. <yda...@ic...> - 2014-12-04 11:06:34
|
Hi all,
I have a strange problem using the take() function in a datareader in my
application.
take(data, si, DDS::LENGTH_UNLIMITED, DDS::ANY_SAMPLE_STATE,
DDS::ANY_VIEW_STATE, DDS::ANY_INSTANCE_STATE);
My publisher is sending about 2000 data samples, each one every 100
miliseconds.
I set a delay on my datareader of 500 miliseconds on the
"on_data_available" function in order to ensure that more than one
samples are in my datareaders cache.
I set the QoS policies on reader and writer to:
DDS::RELIABLE_RELIABILITY_QOS, DDS::KEEP_ALL_HISTORY_QOS (all other
default).
My reader reads only one sample at a time and not a sequence of samples.
So, I change a little your "Reliability" example in tests/DCPS folder by
adding the following line in SeqReaderListenerImpl.cpp:
"std::cout << "Yannis: Data length: " << messages_.length() << std::endl;"
just before the for loop:
"for (unsigned int i = 0; i < messages_.length(); ++i) {"
and run it using the flag 'take' (./run_test.pl take).
I always receive a "messages_" with length one.
Is this the correct behavior using the take() function? Shouldn't the
reader receive more than one samples?
Best regards,
Yannis
|