{"action":"created","issue":{"url":"https://api.github.com/repos/ros2/rmw/issues/35","labels_url":"https://api.github.com/repos/ros2/rmw/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/ros2/rmw/issues/35/comments","events_url":"https://api.github.com/repos/ros2/rmw/issues/35/events","html_url":"https://github.com/ros2/rmw/pull/35","id":102911273,"number":35,"title":"add support for publisher gid's in rmw","user":{"login":"wjwwood","id":100427,"avatar_url":"https://avatars.githubusercontent.com/u/100427?v=3","gravatar_id":"","url":"https://api.github.com/users/wjwwood","html_url":"https://github.com/wjwwood","followers_url":"https://api.github.com/users/wjwwood/followers","following_url":"https://api.github.com/users/wjwwood/following{/other_user}","gists_url":"https://api.github.com/users/wjwwood/gists{/gist_id}","starred_url":"https://api.github.com/users/wjwwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjwwood/subscriptions","organizations_url":"https://api.github.com/users/wjwwood/orgs","repos_url":"https://api.github.com/users/wjwwood/repos","events_url":"https://api.github.com/users/wjwwood/events{/privacy}","received_events_url":"https://api.github.com/users/wjwwood/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ros2/rmw/labels/in%20progress","name":"in progress","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-24T23:16:32Z","updated_at":"2015-08-24T23:28:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ros2/rmw/pulls/35","html_url":"https://github.com/ros2/rmw/pull/35","diff_url":"https://github.com/ros2/rmw/pull/35.diff","patch_url":"https://github.com/ros2/rmw/pull/35.patch"},"body":"I am opening this pull request, but it is only part of what is needed for ros2/ros2#91.\r\n\r\nBasically it introduces the notion of a GID for publishers in rmw, encapsulated in the `rmw_gid_t`. The `rmw_gid_t` contains only an opaque void pointer, which the implementation can use to compare the GID's in an implementation specific way. You can get the GID of a `rmw_publisher_t` with `rmw_create_gid_from_publisher` and you can get a GID for the sending publisher via `rmw_take_with_gid`. And then you can compare GID's with `rmw_compare_gids_equal`.\r\n\r\nLater I can use this to compare the GID of the sender for incoming inter process messages with publishers which are connected via intra process as well and filter those out.\r\n\r\nOther ideas for usage and for testing:\r\n\r\n- One subscriber is receiving messages from multiple publishers, figure out how many messages have come from each publisher in the subscription callback.\r\n- One publisher and subscription in the same node, you could use this to self filter, ignoring messages from the local publisher.\r\n\r\nPlease review these changes to the API. I've got an implementation for OpenSplice and I'm starting on Connext/Connext Dynamic. Maybe we can parallelize on those implementations.\r\n\r\nConnects to ros2/ros2#91"},"comment":{"url":"https://api.github.com/repos/ros2/rmw/issues/comments/134413000","html_url":"https://github.com/ros2/rmw/pull/35#issuecomment-134413000","issue_url":"https://api.github.com/repos/ros2/rmw/issues/35","id":134413000,"user":{"login":"dirk-thomas","id":1335366,"avatar_url":"https://avatars.githubusercontent.com/u/1335366?v=3","gravatar_id":"","url":"https://api.github.com/users/dirk-thomas","html_url":"https://github.com/dirk-thomas","followers_url":"https://api.github.com/users/dirk-thomas/followers","following_url":"https://api.github.com/users/dirk-thomas/following{/other_user}","gists_url":"https://api.github.com/users/dirk-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/dirk-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirk-thomas/subscriptions","organizations_url":"https://api.github.com/users/dirk-thomas/orgs","repos_url":"https://api.github.com/users/dirk-thomas/repos","events_url":"https://api.github.com/users/dirk-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/dirk-thomas/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T23:28:43Z","updated_at":"2015-08-24T23:28:43Z","body":"The `destroy_publisher` function could do that cleanup. The life time of a gid is anyway closely tied to the publisher it identifies."}}