DDS.Retcode_NoData exception

7 posts / 0 new
Last post
Offline
Last seen: 6 years 8 months ago
Joined: 09/17/2013
Posts: 10
DDS.Retcode_NoData exception

Hi folks,

 

I am struggling with one thing. The thing is that my publisher publishes some DDS topic on PC 1. My subscriber on other PC 2 in the same LAN successfully reads the published data, but the same executable of my subscriber on the same PC 1 machine does not read and gives an DDS.Retcode_NoData exception (i.e.   catch (DDS.Retcode_NoData ndex)   below). The same QOS file is on both PCs and I don’t have it in the same folder where the executables are, but rather I have it somewhere else and I refer to it through environment variable (NDDS_QOS_PROFILES = "c:\\somefolder\\ USER_QOS_PROFILES.xml").

 

internal SomeDataReturnType GetDiagnosticInfoForWI(string wiIDName)
{
    if (!HasValidSomeDataDDSSubscriber)   
        return null;

    try
    {
        ddsReaderSomeData.read(receivedSomeDataData, info_seq_SomeData,
                                DDS.ResourceLimitsQosPolicy.LENGTH_UNLIMITED,
                                DDS.SampleStateKind.ANY_SAMPLE_STATE,
                                DDS.ViewStateKind.ANY_VIEW_STATE,
                                DDS.InstanceStateKind.ANY_INSTANCE_STATE);

        for (int i = 0; i < receivedSomeDataData.length; i++)
        {
            DDS.SampleInfo info = info_seq_SomeData.get_at(i);

            SomeData di = receivedSomeDataData.get_at(i);

            if (!info.valid_data)
                continue;

            //............ something goes here

            return new SomeDataReturnType(di.di_date_time, diStrings);
        }

        return null;
    }
    catch (DDS.Retcode_NoData ndex)
    {
        //EXCEPTION HAPPENS HERE

        return null;
    }
    catch (DDS.Exception ex)
    {
        return null;
    }
    finally
    {
        ddsReaderSomeData.return_loan(receivedSomeDataData, info_seq_SomeData);
    }
}

 

Any ideas please??? I will greatly appreciate your help.

Thank you  in advance.

Tiger Galo

rose's picture
Offline
Last seen: 4 days 21 hours ago
Joined: 08/22/2011
Posts: 147

Hello Tiger Galo, 

Have you changed your enabled transports QoS?  If you have one application on P1 with shared memory and UDP enabled, and another application on P1 with only one of those transports enabled, they will not communicate.

If you have not changed your enabled transports, I would try using the rtiddsspy application on P1 to see if it can communicate with other applications in P1.

Lastly, if you have a firewall enabled on P1, you might want to try running with it turned off to see if it is blocking some traffic between the applications on the local machine.  

Thank you,

Rose

Offline
Last seen: 6 years 8 months ago
Joined: 09/17/2013
Posts: 10

Hi Rose,

Thanks for your quick reply. I didn't change the QOS file. So the full picture is the following. I had a continuous publihser on the PC1. At the beginning it was a console application for my tests only. And I had my subscriber on the same PC1 machine. After many test, since everything was OK I built a Windows Service version of my continuous publisher. Before, during all my tests my QOS was in the same directory where my bublisher and subscriber executables were. After I switched to Win Services I had to move my QOS file to some other ocation and use NDDS_QOS_PROFILES environment variable instead. So basically I didn't touch the content of the QOS file, I didn't change the subscriber, I only built a WinService publisher from my console application publisher. And now my subscriber on the other PC2 over the network can receive the published data, whereas the same subscriber on the same local PC1 machine cannot get anything, i.e. it get's an DDS.Retcode_NoData exception on the ddsReaderSomeData.read(...) call in the code snippet above.

 

Any ideas?

Thank you,

Tiger Galo

rip
rip's picture
Offline
Last seen: 4 days 20 hours ago
Joined: 04/06/2012
Posts: 322

This might be relevant:

http://community.rti.com/kb/why-doesnt-my-rti-connext-application-communicate-rti-connext-application-installed-windows


Regards,

Rip

Offline
Last seen: 6 years 8 months ago
Joined: 09/17/2013
Posts: 10

Thanks a lot Rip,

This looks the right explanation of the issue I am having. Will try the workaround for sure. Just wonder if "disabling shared memory in both applications" may somehow affect the effeciency or reliability of the programs? Can it have any negative impact one should  be aware of?

Thank you,
Tiger Galo

rip
rip's picture
Offline
Last seen: 4 days 20 hours ago
Joined: 04/06/2012
Posts: 322

DDS is designed for use over UDP.  That we supply a shared memory transport should be viewed as something that is "in addition to", ie it is a benefit of using our implementation, it is not a requirement of the specification.

There are enough use-cases that require or support turning off the shared memory transport that I don't even consider it odd.

With regards to efficiency, it depends on how highly tuned your loopback interface is and how many task/thread switches the OS needs to make before the receiving application is presented with the incoming data.  ie, "it depends".  Case dependent...

Regards,

Rip

Offline
Last seen: 6 years 8 months ago
Joined: 09/17/2013
Posts: 10

Thanks Rip,

To be honest your advise really helped me. I have it up and running again.

Thanks again,
Tiger Galo