Re: RTT-Introspection and how to do it ?
Sylvain Joyeux <[email protected]> Mon, 30 Mar 2015 10:19:24 -0300
| Newsgroups | gmane.science.robotics.orocos.devel |
|---|---|
| Message-ID | <CAFENT7LJOX_r9rxnsjiGKOhpNWN8eby_A+vZfEjMsMs5Ry7XbA@mail.gmail.com> |
> /** > * Returns the connection manager of this port (if any). > * This method provides access to the internals of this port > * in order to allow connection introspection. > * @return null if no such manager is available, or the manager > * otherwise. > * @see ConnectionManager::getChannels() for a list of all > * connections of this port. > */ > virtual const internal::ConnectionManager* getManager() const = 0; This is pretty horribly bad. Giving direct access to the channels is a really really bad idea. Channel memory management is very sensitive and currently pretty horrible. I was very much hoping to clean it up (in particular, remove the bloody need for mutexes everywhere). Having it as public pretty much makes it impossible. By the way, enumerating channels is currently really really broken in that respect: i.e. doing what you aim at with getManager() while others are connecting/disconnecting will lead to big troubles. I would love to have comments from Peter on this (the original commit is from RTT2's inception). Sylvain -- Orocos-Dev mailing list [email protected] http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev