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

Derive from concrete YARP classes instead of providing custom implementation #162

Closed
PeterBowman opened this issue Jan 6, 2018 · 7 comments

Comments

@PeterBowman
Copy link
Member

YARP's fakeMotionControl device inherits from several ImplementX concrete classes, e.g. ImplementVelocityControl2, a ready-to-use implementation of IVelocityControl2. See inheritance diagram in fakeMotionControl's docs. I wonder if we could use this in our CAN devices to spare a few lines of code.

@jgvictores
Copy link
Member

Blocking #171

@PeterBowman
Copy link
Member Author

Note to self: take a look at http://www.yarp.it/classyarp_1_1dev_1_1ControlBoardHelper.html (perhaps for internal use only).

@PeterBowman PeterBowman self-assigned this Sep 12, 2018
@jgvictores
Copy link
Member

Does not really block #171

@PeterBowman
Copy link
Member Author

This WIP led to robotology/yarp#1867, another PR is coming.

@jgvictores
Copy link
Member

Blocks #171.

@PeterBowman
Copy link
Member Author

Might render invalid due to #211.

@PeterBowman
Copy link
Member Author

For instance, if we take a look at ImplementControlLimits.h, there are two interfaces:

  • StubImplControlLimitsRaw: targets a Raw device, provides a stub implementation that prints an error notice and returns false. The only place I could use these interfaces is CuiAbsolute, leaving here my abandoned commit for future reference: cc80172. Superseded by Clean CAN raw subdevice interfaces #211.

  • ImplementControlLimits: comprises an cpp counterpart (ImplementControlLimits.cpp) that performs basic mapping and call forwarding to raw devices assuming a correct initialization. Could be implemented in:

The CanBusControlboard thing could be revisited in the future if #209 cannot be done. Closing for now as WONTFIX.

@PeterBowman PeterBowman closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants