Can not receive with any latency budg... PreviousNext
Data Distribution Service (DDS) Forum > DDS FAQ >
Message/Author
Next message Jesen  posted on Friday, May 25, 2012 - 08:48 am
Hi guys,

I am new to DDS and I am using opensplice DDS community version. I got stuck every time when I tried to set the latency budget value of the qos. That is whatever latency value(except 0) I set, I got stuck at the reading function. Could you guys please check if you had similar problem? Any suggestion would be welcomed? Thanks in advance.
Here's the read function I have:

Read(WaitSet_var newMsgWS, ReadCondition_var newMsg, Msg* dataIn)
{
MsgSeq msgList;
SampleInfoSeq infoSeq;
bool closed = false;
ConditionSeq guardList;
guardList.length(1);
ReturnCode_t status = - 1;

while(!closed )
{
ReturnCode_t wStatus = newMsgWS->wait(guardList, DURATION_INFINITE);
if (wStatus == DDS::RETCODE_OK) {
if(guardList[0].in() == newMsg.in())
{
wStatus = msg_reader->take(msgList, infoSeq,
LENGTH_UNLIMITED, ANY_SAMPLE_STATE,
ANY_VIEW_STATE, ANY_INSTANCE_STATE);

closed = true;
*dataIn = msgList[0];
msg_reader->return_loan(msgList, infoSeq);

}

}
}
}
Next message Jesen  posted on Friday, May 25, 2012 - 09:30 am
When I debuged it, it was actually stuck at this line:
ReturnCode_t wStatus = newMsgWS->wait(guardList, DURATION_INFINITE);
Next message Hans van 't Hag  posted on Friday, May 25, 2012 - 09:55 am
Hi Jesen,

First I'd like to suggest you use the product-specific forum at forums.opensplice.org please :-)

Next, Its important to realize that latency-budget QoS is a so-called RxO policy i.e. in this case the latency-budget specified for the dataReader must be 'at least' the budget as specfied for the dataWriter otherwise the two won't communicate because of QoS mismatch.
Perhaps you didn't set the latency-budget on the reader ?

Regards
Hans
Next message Jesen  posted on Friday, May 25, 2012 - 02:36 pm
Hi Hans,

Thank you very much for your answer. Yes, I have posted at that forum as well, but it seems very slow to get any reply. I know that latency budget of reader should be equal or larger than the writer. I set them equal but no luck. I guess the problem could be:

I defined the condition of the wait set to be a new message coming in. Thus if I set the latency budget, it could be several message wrapped into one packet. Perhaps the condition could not be satisfied and it was blocked for infinite time. Do you think so and is any solution to that? Thanks
Code is attached as following:

ReturnCode_t status = - 1;
ReadCondition_var newMsg = objIec2dds.msg_reader->create_readcondition(
ANY_SAMPLE_STATE, ANY_VIEW_STATE, ANY_INSTANCE_STATE);
WaitSet_var newMsgWS = new WaitSet();
status = newMsgWS->attach_condition(newMsg.in()); // ReadCondition
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: