QoS policies PreviousNext
Data Distribution Service (DDS) Forum > DDS Technical Forum >
Message/Author
Next message sonia  posted on Wednesday, September 30, 2009 - 08:17 am
All the QoS policies has been defined in DDS ..now my query is....when an external application suppose client or server use the DDS to interact with each other.
While implementing this functionality , we create instance of external app in Publisher class of DDS.So where would the QoS policies be defined for that instance??
I mean in Publisher class or in External application?? I have confusion regarding this.
Next message Angelo Corsaro  posted on Wednesday, September 30, 2009 - 09:09 am
Hello Sonia,

First of all let me point out that in DDS there are neither clients nor servers. DDS is based on a peer-to-peer model in which every application can be either a publisher or a subscriber or both.

Going to your question regarding QoS, you should ensure that each of your DDS applications sets the proper QoS for DomainParticipant (if needed) and then depending on whether you'll be publishing or subscribing topics to Publisher/Writer and Subscriber/Reader. I left topic out of the list because you can take two approaches, (1) you can define Topic QoS in all application using them but in such a way that they are all consistent (otherwise you'll get an error), (2) you can have a specific configuration application that set-ups all the topics for your system and then leverage discovery for finding out about these topics from other apps.

The approach (1) is easier to use but requires more discipline, approach (2) perhaps be overshooting if you are a DDS beginner.

In any case, if you look at some of the link I sent you yesterday you'll find either code or slides that explain what these steps are.


Cheers,
Angelo
Next message Anonymous posted on Monday, April 19, 2010 - 09:41 am
Can anybody tell me how to use UserDataQosPolicy? How to get the pointer to for builtin topic?
Next message gruhita sudhakar parab  posted on Tuesday, April 20, 2010 - 05:27 am
In case of UserDataQosPolicy the data is sent using builtin topic. How to read the message sent at the receiver side? Can builtin subscriber used to read the data sent using userDataQosPolicy? then how to attach datareader to that subscriber as there is no API provoded to get the pointer for builtin topic.
Next message Erik Hendriks  posted on Tuesday, April 20, 2010 - 12:54 pm
You can obtain the DataReaders for the builtin topics through the builtin subscriber. Use the lookup_datareader operation for this purpose and pass it the name of the topic you want to obtain the reader for, e.g. "DCPSTopic" for the reader that accesses the DCPTopic topics.
Next message gruhita sudhakar parab  posted on Thursday, April 29, 2010 - 06:53 am
In case of UserDataQosPolicy, I have used Builtin subscriber and lookup_datareader as datreader for "DCPCTopic" to receive data . Problem i am facing is while typecasting this datareader in userDefined datareader (fooDataReader) as DDS::DataReader class does not have take API. it returns null pointer after typecasting. What can be the problem? I get proper pointer for lookup_datareader for "DCPCTopic".

Kindly suggest some solution..
Next message Erik Hendriks  posted on Thursday, April 29, 2010 - 09:32 am
Hi Gruhita,

Indeed you will need to cast the Builtin DataReader for DCPSTopic into its typed representative, just like you will need to do for DataReaders you just created using the create_datareader operation on the subscriber.
Since the type of the "DCPSTopic" builtin topic is "TopicBuiltinTopicData", you will need to cast its DataReader into a "TopicBuiltinTopicDataDataReader" before you can access its read and take operations.

I don't know which DDS implementation you are using and in which language, but I guess most DDS implementations allow you to use the normal cast operators to downcast this builtin datareader into its proper subtype. I know for sure that OpenSplice DDS allows you to do that.

Regards,
Erik.
Next message gruhita sudhakar parab  posted on Thursday, April 29, 2010 - 12:08 pm
Thank you for your reply.As per my understanding Data to be sent has to be added to value field of UserDataQos structure. Is it correct? If yes then at receiver side which structure should be used to receive the data.

If u can add some sample code for same that would be very useful.
Next message Erik Hendriks  posted on Thursday, April 29, 2010 - 01:01 pm
Hi Gruhita,

I'm afraid I don't really understand your question. What exactly are you trying to do?

The UserData field on the TopicQos has no particular function: you can use it yourself has sort of a generic hook to distribute some proprietary data with the definition of each topic. You don't need to use it if all you want to do is to write some samples of a particular topic into the domain and read them somewhere else in the domain.

If for whatever reason you do want to distribute some proprietary information with the definition of your topic, you need to serialize this data into a stream, since the UserData is just an unbounded sequence of octet.

Can you give me some more background info on what you are trying to do? Which language are you using? What sort of proprietary data would you like to add to the topic definition?

Regards,
Erik.
Next message gruhita sudhakar parab  posted on Friday, April 30, 2010 - 05:38 am
Hi Erik,

I am using Opensplice DDS version 4.3 for linux. I use C++ for programming. What i want to do with UserDataQos is to add some authentication string. My question is on receiver side how to receive this information. What all step to follow.
Next message Erik Hendriks  posted on Tuesday, May 04, 2010 - 12:20 pm
Hi Gruhita,

So here is what you could do. When you create the topic, you set the topic_data of its qos to the authentication string (let's call it 'authStr' here) that you need:

TopicQos tQos;
dp->get_default_topic_qos(tQos);
DDS::ULong authStrLen = strlen(authStr);
tQos.topic_data.value.length(authStrLen + 1);
for (DDS::ULong i; i <= authStrLen; i++) {
tQos.topic_data.value[i] = authStr[i];
}

Now pass this tQos to the create_topic operation.

On the receiving side, you can monitor the all existing topics using the Builtin DataReader for the DCPSTopic builtin topic. If you read a sample from the DCPSTopic topic, you can access its user_data in the following way:

TopicBuiltinTopicDataSeq topicSeq;
topicDataReader->read(topicSeq, ...);
for (DDS::ULong i = 0; i < topicSeq.length(); i++) {
DDS::ULong authStrLen = topicSeq[i].topic_data.value.length();
DDS::String_var authStr = DDS::string_alloc();
for (DDS::ULong j = 0; j <= authStrLen; j++) {
authStr[j] = topicSeq[i].topic_data.value[j];
}
}

Hope this gives you some clue on how you could use the topic_data/user_data qospolicies.

Regards,
Erik.
Next message gruhita sudhakar parab  posted on Tuesday, May 11, 2010 - 09:48 am
Hi Erik
thanks for reply.

I had one more problem with EntityFactoryQosPolicy when i set autoenable_created_entities to 'false' then do i have to each entity individually or only enabling Participant will enable all the entities below it (datareader ,topics etc).
Next message Erik Hendriks  posted on Tuesday, May 11, 2010 - 03:39 pm
Hi Gruhita,

That probably depends on which DDS implementation you are using. If you always enable each created entity individually, it should work on all DDS implementations.

Regards,
Erik.
Next message Agent Smith  posted on Wednesday, May 26, 2010 - 03:17 pm
Hi,
I have made a small application to test the entity factory QoS but fail to see the expected results.After setting the entity_factory.autoenable_created_entities to false and preventing the enabling of the entities,I try to publish the samples.I expect no data should be recieved by the subscriber.But data is always recieved.I am attaching my application source code for your reference.Please let me know if I have missed something.
application/zipapplication
entityfactory.zip (3.4 k)
Next message nour imen  posted on Monday, May 31, 2010 - 07:56 am
Hi,
I 'm a DDS beginner, i have a question about the relationship between publisher and subscriber: i thought they are totally decoupled ie the publihser write new sample in gcd and subscriber read from gcd.so publihser and subscriber don't know each other. is it right? or publihser should know subscriber interested in his data and sends updated values?
is there example of implementation of publish/ subscribe paradigm?
thanks for help
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Post as "Anonymous"
Enable HTML code in message
Automatically activate URLs in message
Action: