There's nothing that allows that currently.  It's something we've talked about, but haven't actually found a need for (generally if you're doing this kind of thing Python works fine, with C bindings if some part of it needs to be faster).<div>

<br></div><div>There are a couple options for implementing it, but I think the one I'd go with is a .msg parser in C++ that could introspect directly on the serialized data.  The other option is to create a reflection system and have every message package create a .so that can be dynamically loaded so that the generated message itself can be created at runtime.  Neither option is a small amount of work, but as long as you only need read support the first is probably easier.  The second requires modifying the message generators and automatically generating that .so for every message package, in addition to the reflection system itself (which could be pulled from elsewhere).</div>

<div><br></div><div>Josh<br><br><div class="gmail_quote">On Fri, Nov 5, 2010 at 5:32 PM, Tim Niemueller <span dir="ltr"><<a href="mailto:niemueller@kbsg.rwth-aachen.de">niemueller@kbsg.rwth-aachen.de</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello ROS users.<br>
<br>
For an application I'm writing I need message introspection. This means<br>
given the name and type of a topic (from a config or user input), I want<br>
to open it in a generic way, i.e. similar to how rosbag record does it.<br>
But instead of requiring only the binary blob for storage, I would like<br>
to be able to iterate over the message in a key/value pair fashion.<br>
To get a good efficiency out of it, I would like to do this with C++.<br>
Does someone know a way to achieve this? I looked through the code but I<br>
couldn't see anything that would allow this, so I hope I'm just missing<br>
something. Can someone point me into the right direction?<br>
<br>
I know this is easy with Python and Lua, and I'm doing that for now, but<br>
I would like to have the option to do this in C++ when the need for<br>
extra performance arises.<br>
<br>
Thanks for your time,<br>
        Tim<br>
<br>
--<br>
AllemaniACs RoboCup Team            KBSG - Knowledge-Based Systems Group<br>
========================================================================<br>
<a href="http://robocup.rwth-aachen.de" target="_blank">http://robocup.rwth-aachen.de</a>                     RWTH Aachen University<br>
<a href="http://www.kbsg.rwth-aachen.de" target="_blank">http://www.kbsg.rwth-aachen.de</a>                           Ahornstrasse 55<br>
<a href="http://www.fawkesrobotics.org" target="_blank">http://www.fawkesrobotics.org</a>                             D-52056 Aachen<br>
Currently at:<br>
Carnegie Mellon University, Intel Research Pittsburgh, Personal Robotics<br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</blockquote></div><br></div>