-
Notifications
You must be signed in to change notification settings - Fork 428
Added starting of resources into CM and RM #240
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c904c43
Added starting of resources into CM and RM
destogl 898ed8d
adapt controller manager test
Karsten1987 c94428d
Add Base Implementation and extend hardware interfaces with get_name
destogl 98f3675
Components return names and status now; Moved base_interface; added t…
destogl 03e76fc
Update hardware_interface/include/hardware_interface/components/base_…
destogl 7ebee07
Update hardware_interface/src/resource_manager.cpp
destogl 59c5aba
Updated to the comments
destogl d648c10
Correct all issues after rebasing.
destogl a7d7a25
Update test_robot_hardware package to use constants and BaseInterface
destogl 01dc008
shorter
bmagyar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
hardware_interface/include/hardware_interface/components/base_interface.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| // Copyright 2020 ros2_control Development Team | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| #ifndef HARDWARE_INTERFACE__COMPONENTS__BASE_INTERFACE_HPP_ | ||
| #define HARDWARE_INTERFACE__COMPONENTS__BASE_INTERFACE_HPP_ | ||
|
|
||
| #include <string> | ||
|
|
||
| #include "hardware_interface/hardware_info.hpp" | ||
| #include "hardware_interface/types/hardware_interface_return_values.hpp" | ||
| #include "hardware_interface/types/hardware_interface_status_values.hpp" | ||
|
|
||
| namespace hardware_interface | ||
| { | ||
| namespace components | ||
| { | ||
|
|
||
| template<class InterfaceType> | ||
| class BaseInterface : public InterfaceType | ||
| { | ||
| public: | ||
| return_type configure(const HardwareInfo & info) override | ||
| { | ||
| info_ = info; | ||
| status_ = status::CONFIGURED; | ||
| return return_type::OK; | ||
| } | ||
|
|
||
| return_type configure_default(const HardwareInfo & info) | ||
| { | ||
| return BaseInterface<InterfaceType>::configure(info); | ||
| } | ||
|
|
||
| std::string get_name() const final | ||
| { | ||
| return info_.name; | ||
| } | ||
|
|
||
| status get_status() const final | ||
| { | ||
| return status_; | ||
| } | ||
|
|
||
| protected: | ||
| HardwareInfo info_; | ||
| status status_; | ||
| }; | ||
|
|
||
| } // namespace components | ||
| } // namespace hardware_interface | ||
|
|
||
| #endif // HARDWARE_INTERFACE__COMPONENTS__BASE_INTERFACE_HPP_ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I rename
info_tohardware_info_? This is used in all child classes so that it could be more explicit for users.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah