qos between node.js and java servers

3 posts / 0 new
Last post
Offline
Last seen: 3 years 11 months ago
Joined: 04/22/2019
Posts: 6
qos between node.js and java servers

Hi,

we are trying to work with dds in node.js and we have a few questions:

1. We have a custom qos xml at path c:<MyPath>. How do we load the qos.xml in our main xml (which was generated from idl with the -ConverToXml flag) which is used by rti.connector?

2. When we use rtigen for example in java we use -unboundedSupport flag if we want to use (in our case) unbounded octet sequence, so it generates the .java files to work with unboundedSupport...

Does the rti.connector work with unboundedSupport? when we use the -ConverToXml flag in rtigen it doesnt seem to have any effect if we also use the -UnboundedSupport flag or not to the generated xml.. 

When we tried to publish unbounded data from Java server to node.js server, rti console showed a mismatch between the publisher (Java server) and the subscriber (node.js server).

 

Thanks in advance,

Hadar 

Offline
Last seen: 3 weeks 5 days ago
Joined: 10/22/2018
Posts: 91

Hi Hadar,

1. One way in which you could use the QoS file at C:<MyPath> is to set the environment variable NDDS_QOS_PROFILES to contain the path to your QoS file. The <include file=""/> directive within XML files can only be used to include XML files containing type definitions (not QoS).

2. Which version of rtiddsgen are you using? I have just run a test with the following type:

struct UnboundedType {
    sequence<long> seqData;
};

Here are the outputs I get both with and without the -unboundedSupport option:

rtiddsgen -convertToXml ./file.idl

<struct name= "UnboundedType">
    <member name="seqData" sequenceMaxLength="100" type="int32"/>
</struct>

 

rtiddsgen -convertToXml -unboundedSupport ./file.idl

<struct name= "UnboundedType">
    <member name="seqData" sequenceMaxLength="-1" type="int32"/>
</struct>

This test was run using rtiddsgen version 3.0.0. I ran the same test using rtiddsgen verison 2.5.2 and can confirm that in that version the -unboundedSupport flag didn't have an effect; the type in the resultant XML file was always unbounded (i.e., it had a sequenceMaxLength = -1).

If you are using rtiddsgen version 2.5.2 (shipped with Connext DDS 5.3.1) this would explain why your Java and Node.js applications cannot communicate (a type code mismatch).

Hope this helps,

Sam

Offline
Last seen: 3 weeks 5 days ago
Joined: 10/22/2018
Posts: 91

Hi Hadar,

Just to add to my above answer, if you are using Connext 6.0.0 you should be aware of the section in the migration guide regarding unbounded:Support: https://community.rti.com/static/documentation/connext-dds/6.0.0/doc/manuals/migration_guide/general.html?#unbounded-sequences-and-strings-in-xml-type-representation

Regards,
Sam