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

expose spec for dynamically generated messages #75

Merged
merged 1 commit into from
Mar 2, 2017

Conversation

dirk-thomas
Copy link
Member

Required for ros/ros_comm#1006.

@ros/ros_team Please review.

@dirk-thomas
Copy link
Member Author

@ros-pull-request-builder retest this please

@@ -190,6 +190,7 @@ def generate_dynamic(core_type, msg_cat):
messages[t] = getattr(mod, _gen_dyn_name(pkg, s_type))
except AttributeError:
raise MsgGenerationException("cannot retrieve message class for %s/%s: %s"%(pkg, s_type, _gen_dyn_name(pkg, s_type)))
messages[t]._spec = specs[t]
Copy link
Member

Choose a reason for hiding this comment

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

could you point me to where the _spec slot/attribute is defined ? I can't find it in the generated python modules or the genpy.Message class. Is it equivalent to _full_text in the generated classes?

Copy link
Member Author

Choose a reason for hiding this comment

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

The instance is a generated class. It doesn't have that attribute before. _full_text contains the plain text of the message, _spec contains the parsed MsgSpec instance for the message.

Copy link
Member

Choose a reason for hiding this comment

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

ok that explains what I couldn't find it in the generated code then. Thanks for clarifying 👍

@dirk-thomas
Copy link
Member Author

@ros/ros_team Please review.

@wjwwood
Copy link
Member

wjwwood commented Mar 2, 2017

Isn't @mikaelarguedas already reviewing it?

@dirk-thomas
Copy link
Member Author

I am still waiting for an approval on this.

Copy link
Member

@mikaelarguedas mikaelarguedas left a comment

Choose a reason for hiding this comment

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

Oh sorry for not approving explicitely. It does look good to me.

@dirk-thomas dirk-thomas merged commit 264b501 into kinetic-devel Mar 2, 2017
@dirk-thomas dirk-thomas deleted the expose_spec_for_dyn_gen_msgs branch March 2, 2017 19:32
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.

None yet

3 participants