Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add capability to load DynamicType directly from XML #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marc-chiesa
Copy link

Takes direct output from rtiddsgen -convertToXml and allows for specifying include paths programmatically, presenting an alternative to QosProvider for getting types from files.

…gen -convertToXml and specify include paths programmatically
@@ -124,7 +124,44 @@ void init_class_defs(py::class_<DynamicType>& cls)
.def(py::self == py::self,
"Compare DynamicType objects for equality.")
.def(py::self != py::self,
"Compare DynamicType objects for inequality.");
"Compare DynamicType objects for inequality.")
.def_static(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This functionality exists in the QosProvider. Did you need to add it here for some reason?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds two things that, to the best of my knowledge, are not handled by the QosProvider public API type functions:

  • It allows for the use of a type's XML right out of rtiddsgen -convertToXml without having to first include it from a QoS file. Trying to load such an XML with QosProvider produces an error:
rti.connextdds.Error: 
 DDS_XMLStruct_initialize:!init XML struct object
  DDS_XMLStruct_newI:!init XML struct object
   RTIXMLParser_onStartTag:Parse error at line 3: Error processing tag 'struct'
  • A user can specify include search paths for XML type dependencies. This can be useful for specifying type locations relative to the script's path in code. I think there is a way to do this in QoS if you know all of the XML files and use environment variables to specify the path, but maybe there is a better way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants