Hello,
I want to subscribe a topic like
<types>
<module name="msg">
<struct name="WarningInfo_">
<member name="msg_one" type="int64"/>
<member name="msg_tow" type="int64"/>
<member name="msg_three" type="int64"/>
<member name="msg_four" type="int64"/>
</struct >
</module>
</type>
I can subscribe I can subscribe complete data that contains all members, but sometimes I need to subscribe the defect topics that missing some members. I try to use QosPolicy :
<type_consistency>
<prevent_type_widening>false</prevent_type_widening>
<kind>ALLOW_TYPE_COERCION</kind>
<ignore_member_names>true</ignore_member_names>
</type_consistency>
<msg_one type="int64">1</msg_one>
<msg_three type="int64">3</msg_three>
<msg_four type="int64">4</msg_four>
<msg_one type="int64">1</msg_one>
<msg_two type="int64">3</msg_two>
<msg_three type="int64">4</msg_three>
<msg_four type="int64">0</msg_four>
You can only do this if you define your data type to be MUTABLE Extensiblity.
Please read through this documentation and look specifically at the discuss on Mutable data types:
https://community.rti.com/static/documentation/connext-dds/6.1.0/doc/manuals/connext_dds_professional/extensible_types_guide/index.htm#extensible_types/Type_Safety_and_System_Evolution.htm%3FTocPath%3D2.%2520Type%2520Safety%2520and%2520System%2520Evolution%7C_____0
https://community.rti.com/static/documentation/connext-dds/6.1.0/doc/manuals/connext_dds_professional/extensible_types_guide/index.htm#extensible_types/Defining_Extensible_Types.htm#2.1.1_@id_Annotation%3FTocPath%3D2.%2520Type%2520Safety%2520and%2520System%2520Evolution%7C2.1%2520Defining%2520Extensible%2520Types%7C_____1
You will need to define your datatype to have mutable extensibility (and likely you'll want to use @autoid(hash), in XML, this would look like:
Hello Howard,
Your suggestion is very helpful to me.Thank you very much.
Best,
LeeLi