The RTI Connector for Python site demonstrates defining a topic name in the connector.xml like this:
<register_type name=ShapeType" type_ref="ShapeType"/>
<topic name="Square" register_type_ref="ShapeType"/>
Is it possible to define this with a one-liner?
This does not work, but I'm wondering if there is similar syntax that is possible.
<topic name="Square" type_ref="ShapeType"/>
Thanks!
Bobby
Hello Bobby,
Unfortunately, I do not think this is feasible. The reason for this is that DomainParticipants require Types to be registered before these can be used, whether this is for Topics, DataReaders (Inputs) or DataWriters (Outputs).
This makes sense, as when you're registering a type, you're essentially associating a name with a type definition, e.g. number and type of fields, metadata annotations.
Using the
<register_type>
XML element as an example, a DomainParticipant may be interested in only registering a subset of types defined in the <types> XML element.Another possibility, is registering the same type definition (
type_ref
) with different names (name
) to distinguish identical types.Regards,
Alejandro
Ok, thanks for the help Alejandro.
Bobby