Skip to content
This repository was archived by the owner on Dec 9, 2021. It is now read-only.

Refactor typesupport #15

Merged
merged 29 commits into from
Dec 5, 2018
Merged

Refactor typesupport #15

merged 29 commits into from
Dec 5, 2018

Conversation

jacobperron
Copy link
Member

Looking for early feedback. I think the EmPy templates are complete, but there is still some CMake business to do.

@jacobperron jacobperron added the in progress Actively being worked on (Kanban column) label Nov 28, 2018
@[ elif field.type.is_primitive_type()]@
dds_message.@(field.name)_[i] = ros_message.@(field.name)[i];
@[ if isinstance(member.type.basetype, BaseString)]@
dds_message.@(member.name)_[i] = ros_message.@(member.name)[i].c_str();
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure if c_str is going to work for WStrings.

Copy link
Member Author

Choose a reason for hiding this comment

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

You're probably right, unless the ROS message is using a std::wstring. How is a WString represented in the ROS message and what should we do for the conversion?

Copy link
Member

Choose a reason for hiding this comment

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

We don't have any examples / tests for that yet. The representation of WString in each language is described here: https://github.com/ros2/design/blob/gh-pages/articles/142_idl.md#type-mapping

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, since WString is described as having type std::u16string, I think the use of c_str() should work since it is a std::basic_string.

@jacobperron jacobperron changed the title Refactor cpp typesupport Refactor typesupport Nov 30, 2018
Moved header guards to top-level files.
Prepend type names to static variables.
@jacobperron jacobperron added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Dec 3, 2018
@jacobperron jacobperron self-assigned this Dec 3, 2018
@jacobperron
Copy link
Member Author

CI with idl-stage-7 branches, ros2/rosidl (hidmic/idl-stage-7), and ros2/rosidl_dds#46 (jacob/idl-stage-7):

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@dirk-thomas
Copy link
Member

Once this passes CI please (squash) merge this into idl-stage-7.

@jacobperron
Copy link
Member Author

CI with idl-stage-7 and ros2/rosidl (hidmic/idl-stage-7):

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@dirk-thomas
Copy link
Member

The idl-stage-7 branch can't compile anymore with this since the rosidl_generator_dds_idl interface is the same for Connext and OpenSplice typesupport. Therefore I am merging this...

@dirk-thomas dirk-thomas merged commit 597a914 into idl-stage-7 Dec 5, 2018
@dirk-thomas dirk-thomas removed the in review Waiting for review (Kanban column) label Dec 5, 2018
@dirk-thomas dirk-thomas deleted the jacob/idl-stage-7 branch December 5, 2018 15:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants