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

Allow provider specs to contain remapping rules #36

Merged
merged 1 commit into from Nov 9, 2013
Merged

Conversation

wjwwood
Copy link
Member

@wjwwood wjwwood commented Nov 9, 2013

This was proposed as a solution to the providers which need to rename things in order to satisfy semantic interface names.

See: #22

@wjwwood
Copy link
Member Author

wjwwood commented Nov 8, 2013

Example from @bit-pirate:

%YAML 1.1
---
name: kobuki_led
spec_version: 1
spec_type: provider
description: "Implements the LED capability for Kobuki's default LED, i.e. LED 1."
implements: kobuki_capabilities/LED
depends_on:
    'kobuki_capabilities/KobukiBringup':
        provider: 'kobuki_capabilities/kobuki_bringup'
remappings:
  topics:
    'led': '/mobile_base/commands/led1'

@wjwwood
Copy link
Member Author

wjwwood commented Nov 8, 2013

@bit-pirate, so there is a remappings section already for each remapping in the depends_on section, see this test provider:

https://github.com/osrf/capabilities/blob/master/test/unit/specs/providers/navigation_nav_stack.yaml#L10

Could this do what you want?

@bit-pirate
Copy link
Contributor

For TB this would work, since most things will depend on the BringUp capability.

However, I would prefer to make the remapping parameter generally available (not tied to depends_on). Does anything speak against this?

@wjwwood
Copy link
Member Author

wjwwood commented Nov 9, 2013

I don't think so, I will add the option for a remappings section independent of the depends_on section.

In that case do we need the optional remappings section for the depends_on section too?

@bit-pirate
Copy link
Contributor

In that case do we need the optional remappings section for the depends_on section too?

I'd say no.

remappings are now specified at the provider level
@wjwwood
Copy link
Member Author

wjwwood commented Nov 9, 2013

Upgraded to a pull request.

@bit-pirate for review

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling fe171b3 on issue_36 into da4d263 on master.

@bit-pirate
Copy link
Contributor

Works like a charm. I have already implemented it in the app manager. Please merge it at your convenience.

wjwwood added a commit that referenced this pull request Nov 9, 2013
Allow provider specs to contain remapping rules
@wjwwood wjwwood merged commit 4764d73 into master Nov 9, 2013
@wjwwood wjwwood deleted the issue_36 branch November 9, 2013 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants