Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

expose spec for dynamically generated messages#75

Merged
dirk-thomas merged 1 commit intokinetic-develfrom
expose_spec_for_dyn_gen_msgs
Mar 2, 2017
Merged

expose spec for dynamically generated messages#75
dirk-thomas merged 1 commit intokinetic-develfrom
expose_spec_for_dyn_gen_msgs

Conversation

@dirk-thomas
Copy link
Copy Markdown
Member

Required for ros/ros_comm#1006.

@ros/ros_team Please review.

@dirk-thomas
Copy link
Copy Markdown
Member Author

@ros-pull-request-builder retest this please

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

@ros/ros_team Please review.

@wjwwood
Copy link
Copy Markdown
Member

wjwwood commented Mar 2, 2017

Isn't @mikaelarguedas already reviewing it?

@dirk-thomas
Copy link
Copy Markdown
Member Author

I am still waiting for an approval on this.

Copy link
Copy Markdown
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 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.

3 participants