I've gently modified the Hello World IDL example.
I'm sending 100 near simultaneous messages and these all appear on the wire (visible on Wireshark).
Reading them however I only get the last of the packet - so instead of 100 I get about 6 - and always the last value in the packet on the wire. So batch working really well....except I'm not getting all the data.
I was assuming that in reading them perhaps "take" should return multiple values - except the length() parameter steadfastly returns a value of 1.
Any ideas what this might be?
I think I've kinda answered my own problem....the problem relates to the way the data is keyed. DDS is declaring the 20+ samples in the same packet as superseded by the last one so is discarding them.
Found the cause....not sure how to fix it - my application for DDS requires those intervening states.
The number of samples maintained per key is controlled by the HISTORY Qos Policy both on the DataWriter and the DataReader side.
By default both DataReader and DataWriter set HISTORY kind to KEEP_LAST and the corresponding HISTORY depth is to 1. This explains what you are seeing.
You can either change the depth to a larger value (e.g. 50). Or else set HISTORY kind to KEEP_ALL.
Gerardo
Thanks Gerardo - I can't currently make it work but I'll keep working on it, it's probably me doing something silly but I now have somewhere to direct my attention.
One thing that concerns me is I can't tie up the KEEP_LAST documentation in the API reference you've linked to with the values that end up in the XML QoS file. They're kinda similar but I couldn't build the QoS file from the docs, only by copying from examples.
Hello David,
When editing the XML files, are you using an XSD aware editor like Eclipse or VisualStudio. And furthermore are you making sure the schema location in the XML is pointing to the right XSD as in:
This is the same as it is done in the bundled and generated examples. If you do both things, then the editor will assist you with auto-completion and offering the different choices so it should be fairly obvious how things map...
Gerardo