Late-Subscribers not receiving DDS Messages LabVIEW

3 posts / 0 new
Last post
Offline
Last seen: 5 years 2 months ago
Joined: 01/14/2019
Posts: 1
Late-Subscribers not receiving DDS Messages LabVIEW

 

My project involves using RTI DDS (v2.2.0) in multiple different LabVIEW applications, some of which are running on the same PC and some of which are running on other PCs or RTs.  My goal is to have each application keep a record of all applications that are currently communicating on the same DDS Domain.

Upon start-up, each application creates 1 complex reader and 1 complex writer (of the same type).  The application then writes once. (The type is the application's name along with a few other bits of information.)  The application's (unique) name is the "key".  Following this, each application will constantly read in a timed For Loop.

I would like for late-joining application (those that are started after others have written) to be able to read the previously-published data.  Currently, I am getting this to work in the LabVIEW development environment, but when I build my application into an executable, any "late" applications don't receive previously-written data.  (So, if App A starts running, then App B starts running, App A will see App A & App B while App B will only see App B.)

Currently, I am using QoS profiles LabVIEWLibrary:DefaultProfile for the reader and LabVIEWLibrary:ReliableProfile  for the writer. (I have also tried using BuiltinQosLibExp::Generic.KeepLastReliable.Transient for the writer, and it seemed to have similar behavior.)

Are these the wrong settings for my purposes? Or is there some other issue I am overlooking? Thank you in advance for the help!

Ismael Mendez's picture
Offline
Last seen: 2 weeks 3 days ago
Joined: 07/03/2017
Posts: 74

Hi Madeline,

I tried to reproduce your issue without success. In my case, it works fine in both cases LabVIEW, environment and standalone application. When you run your applications as standalone applications, how many applications you have running? Take into account that the LabVIEWLibrary::DefaultProfile you use in your reader only has a history depth of 1 sample. That causes a previously received sample (but not yet processed) will be overwritten by the next sample you receive. So, if your Writer sends all the previous samples you only will see in your Reader the last one. Can you try using LabVIEWLibrary::ReliableProfile in your Reader as well?

You can check the shipped QoS profiles by inspecting the file <your LabVIEW installation folder>vi.lib\RTI DDS Toolkit\RTI_LABVIEW_CONFIG.documentationONLY.xml. There you can see the property KEEP_LAST_HISTORY_QOS of different profiles.

Also, it's possible to create your own custom QoS and use in your applications. Please have a look at the Getting Started Guide Chapter 5 "Loading Quality of Service Profiles" to know how to load custom QoSs.

If this doesn't solve the issue could you please provide more details? Is the scenario the same when you test your application in the LabVIEW environment and when you use the executable application?

 

Regards

Ismael

Ismael Mendez's picture
Offline
Last seen: 2 weeks 3 days ago
Joined: 07/03/2017
Posts: 74

Hi Madeline,

I didn't mention before that durability must be set to transient local in the reader to receive previous samples.

 

Regards

Ismael