Usage of UserData Qos Policy for DataReader

5 posts / 0 new
Last post
Offline
Last seen: 4 years 3 weeks ago
Joined: 11/03/2020
Posts: 2
Usage of UserData Qos Policy for DataReader

Hello All,

I am trying to use the UserData QoS Policy of DataReader.

For that I have done the following changes:

1) Creation of Subscriber and DataReader of DDS_Builtintopic_Subscription type (Topic name is "DCPSSubscription")

2) Using the Example Builtin topics application for Subcribing to this "DCPSSubscription" topic

3) When a DataReader is created in the domain, I am able to receive the notification that a node has joined.

4) When a DatReader is Deleted in the daomain, I am able to receive the notification  that a node has been stopped.

 

Ques: I have a system with two builtintopics Reader running within a domain.

         I am able to receive the notification of joining and stopping the node in both these Builtintopic subscriber, but not able to receive the updated userData Qos on both. When a DataReader             changes its QoS policy i.e userdata values, than the updated qos should also be broacasted and other builtintopic Subscrober should receive that updated userdata.

         Any help in this will be highly Appreciated.

Reference link: https://community.rti.com/static/documentation/connext-dds/5.2.3/doc/manuals/connext_dds/html_files/RTI_ConnextDDS_CoreLibraries_UsersManual/Content/UsersManual/USER_DATA_QosPolicy.htm#sending_2410472787_645457

Howard's picture
Offline
Last seen: 4 days 2 hours ago
Joined: 11/29/2012
Posts: 608

Hi Ajmal,

So, how are you changing/setting the UserData QoS on the datareader?

 

Offline
Last seen: 4 years 3 weeks ago
Joined: 11/03/2020
Posts: 2

Hi Howard,

Thanks for responding to my post.

Time to time, I am calling DDS_DataReader_get_qos, changing user data QoS and calling DDS_DataReader_set_qos by passing updated QoS. When I do this, the built-in subscriber on my side is receiving this same update. But built in subscriber on other side is not receiving updated.
Howard's picture
Offline
Last seen: 4 days 2 hours ago
Joined: 11/29/2012
Posts: 608

How big is the user data that you're trying to set/send?  The default length is 256 bytes. 

Howard's picture
Offline
Last seen: 4 days 2 hours ago
Joined: 11/29/2012
Posts: 608

Also, if you used the Builtin Topic example from community.rti.com as the basis for your own code to subscribe to the builtin topics, you need to change the datareader() take to take ANY_VIEW_STATE...it's currently only going to provide samples of data of newly created datareaders/writers/participants

change

    retcode = builtin_reader->take(
        data_seq,
        info_seq,
        DDS_LENGTH_UNLIMITED,
        DDS_ANY_SAMPLE_STATE,
        DDS_NEW_VIEW_STATE,
        DDS_ANY_INSTANCE_STATE);

to

    retcode = builtin_reader->take(
        data_seq,
        info_seq,
        DDS_LENGTH_UNLIMITED,
        DDS_ANY_SAMPLE_STATE,
        DDS_ANY_VIEW_STATE,
        DDS_ANY_INSTANCE_STATE);