SampleInfo and write_w_params

2 posts / 0 new
Last post
GS
Offline
Last seen: 1 year 2 months ago
Joined: 03/31/2016
Posts: 23
SampleInfo and write_w_params

Hi,

I few questions regarding the relationship between the parameters in the sampleInfo struct and write_w_params (attached is the code I’m using).

  1. Is the original_publication_virtual_guid is determined in the DR?  because each time I close the subscriber and then turns it back on (as late joiner) it identifies the publisher with different original_publication_virtual_guid.
  2. Does the original_publication_virtual_sequence_number and publication_sequence_number serve different purposes? because no matter how I run the publisher and subscriber they are always identical.
  3. What is the source_guid purpose? For what it is used in the subscriber?
  4. When I use the write_w_params method (line 130 in HelloPublisher.cpp) I can see the following anomalies:
    1. When I uncomment line 119 (setting the writer_guid) the following scenario happens:

                                                               i.      Turning on publisher and subscriber à writing 3 messages à the messages appear in the subscriber with the same  original_publication_virtual_guid although I change it each time I send a new sample. In that case, how does the subscriber still keeps tracking the source of the message? Is it via IP?

                                                             ii.      Continuing the scenario above. After I shut down the publisher and turns it back on, the subscriber rejects any messages that have an original_publication_virtual_sequence_number which is lower than samples that were published in the previous cycle (before shutting down the publisher), afterwards the subscriber keeps getting messages as usual. This also happens if I don’t manually set the identity.sequence_number of the sample.

 

I will appreciate clarification of the above.

 

Thanks in advance,

Gal

AttachmentSize
File user_qos_profiles.xml2.02 KB
File hellopublisher.cpp6.09 KB
File hellosubscriber.cpp7.08 KB
Offline
Last seen: 4 weeks 7 hours ago
Joined: 02/11/2016
Posts: 143

Hey Gal,

First I'd like to ask where it is that you're changing the original_publication_virtual_guid.

Secondly, given that you're sending messages from the same writer_guid, i am not surprised that the new messages that have lower sequence numbers are rejected by the reader.

It would also make sense even if you don't manually set the sequence number because sometimes (i believe in rti dds it may even be always), the initial sequence number a writer uses can be lower than a sequence number already sent by a previous writer.

Since you are overriding the writer guid, the different writers are interpreted as the same writer by the reader.

 

Hope this helps,

Roy.