Subscriber (C++) not receiving message from Publisher (Java)

4 posts / 0 new
Last post
Offline
Joined: 10/22/2018
Posts: 5
Subscriber (C++) not receiving message from Publisher (Java)

hi all,

I hope someone can help me with this. I have a Publisher (Java) that publishes a message. I can see the message in the topic using the RTI Admin Console but my Subscriber (C++) does not receive the message. In the RTI Admin Console -> Process -> DDS Entities -> My Data Type, I can see an X indicate a Data Type Mismatch. I'm not sure what to make of this.

Can some one please help?

here is the DataReader QoS:

<durability>
<kind>PERSISTENT_DURABILITY_QOS</kind>
<direct_communication>true</direct_communication>
</durability>
<deadline>
<period>
<sec>DURATION_INFINITE_SEC</sec>
<nanosec>DURATION_INFINITE_NSEC</nanosec>
</period>
</deadline>
<latency_budget>
<duration>
<sec>0</sec>
<nanosec>0</nanosec>
</duration>
</latency_budget>
<liveliness>
<kind>AUTOMATIC_LIVELINESS_QOS</kind>
<lease_duration>
<sec>4</sec>
<nanosec>0</nanosec>
</lease_duration>
<assertions_per_lease_duration>3</assertions_per_lease_duration>
</liveliness>
<reliability>
<kind>RELIABLE_RELIABILITY_QOS</kind>
<max_blocking_time>
<sec>0</sec>
<nanosec>100000000</nanosec>
</max_blocking_time>
<acknowledgment_kind>PROTOCOL_ACKNOWLEDGMENT_MODE</acknowledgment_kind>
</reliability>
<ownership>
<kind>SHARED_OWNERSHIP_QOS</kind>
</ownership>
<destination_order>
<kind>BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS</kind>
<source_timestamp_tolerance>
<sec>30</sec>
<nanosec>0</nanosec>
</source_timestamp_tolerance>
</destination_order>
<user_data>
<value></value>
</user_data>
<com.rti.dds.infrastructure.TimeBasedFilterQosPolicy>
<minimum_separation>
<sec>0</sec>
<nanosec>0</nanosec>
</minimum_separation>
</com.rti.dds.infrastructure.TimeBasedFilterQosPolicy>
<presentation>
<access_scope>INSTANCE_PRESENTATION_QOS</access_scope>
<coherent_access>false</coherent_access>
<ordered_access>false</ordered_access>
</presentation>
<partition>
<name>
<element>HAMS-service</element>
</name>
</partition>
<type_consistency>
<kind>ALLOW_TYPE_COERCION</kind>
</type_consistency>
<topic_data/>
<group_data/>
<property>
<value/>
</property>
<service>
<kind>NO_SERVICE_QOS</kind>
</service>
<subscription_name/>

 

And the DataWritter QoS:

<durability>
<kind>PERSISTENT_DURABILITY_QOS</kind>
<direct_communication>true</direct_communication>
</durability>
<durability_service>
<service_cleanup_delay>
<sec>0</sec>
<nanosec>0</nanosec>
</service_cleanup_delay>
<history_kind>KEEP_LAST_HISTORY_QOS</history_kind>
<history_depth>1</history_depth>
<max_samples>LENGTH_UNLIMITED</max_samples>
<max_instances>LENGTH_UNLIMITED</max_instances>
<max_samples_per_instance>LENGTH_UNLIMITED</max_samples_per_instance>
</durability_service>
<deadline>
<period>
<sec>DURATION_INFINITE_SEC</sec>
<nanosec>DURATION_INFINITE_NSEC</nanosec>
</period>
</deadline>
<latency_budget>
<duration>
<sec>0</sec>
<nanosec>0</nanosec>
</duration>
</latency_budget>
<liveliness>
<kind>AUTOMATIC_LIVELINESS_QOS</kind>
<lease_duration>
<sec>4</sec>
<nanosec>0</nanosec>
</lease_duration>
<assertions_per_lease_duration>3</assertions_per_lease_duration>
</liveliness>
<reliability>
<kind>RELIABLE_RELIABILITY_QOS</kind>
<max_blocking_time>
<sec>0</sec>
<nanosec>100000000</nanosec>
</max_blocking_time>
<acknowledgment_kind>PROTOCOL_ACKNOWLEDGMENT_MODE</acknowledgment_kind>
</reliability>
<lifespan>
<duration>
<sec>DURATION_INFINITE_SEC</sec>
<nanosec>DURATION_INFINITE_NSEC</nanosec>
</duration>
</lifespan>
<user_data>
<value></value>
</user_data>
<ownership>
<kind>SHARED_OWNERSHIP_QOS</kind>
</ownership>
<ownership_strength>
<value>0</value>
</ownership_strength>
<destination_order>
<kind>BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS</kind>
<source_timestamp_tolerance>
<sec>0</sec>
<nanosec>100000000</nanosec>
</source_timestamp_tolerance>
</destination_order>
<presentation>
<access_scope>INSTANCE_PRESENTATION_QOS</access_scope>
<coherent_access>false</coherent_access>
<ordered_access>false</ordered_access>
</presentation>
<partition>
<name>
<element>HAMS-service</element>
</name>
</partition>
<topic_data/>
<group_data/>
<property>
<value/>
</property>
<service>
<kind>NO_SERVICE_QOS</kind>
</service>
<publication_name/>

rip
rip's picture
Offline
Joined: 04/06/2012
Posts: 315

you've supplied the QoS when the error is a data type mismatch. 

those are unrelated.

post the Type definitions, not the QoS

Offline
Joined: 10/22/2018
Posts: 5

Thanks Rich.

I might use the wrong options when I generate the c++11 codes.

Question: I'm not sure when I generate C++11 codes, should I use one of these options: 

-ppOption <option>

-D <name>[=<value>]

or I don't need them if I can use the default VC\bin\vcvars32.bat? 

thanks

 

rip
rip's picture
Offline
Joined: 04/06/2012
Posts: 315

When the tools say that there is a type mismatch, then my assumption is that there is a type mismatch.

Did you use the *same* IDL file for both applications?

What were the exact command lines you issued when generating code for Java, and for C++.