ros2_control - rolling
controller_interface.hpp
1 // Copyright 2017 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef CONTROLLER_INTERFACE__CONTROLLER_INTERFACE_HPP_
16 #define CONTROLLER_INTERFACE__CONTROLLER_INTERFACE_HPP_
17 
18 #include <memory>
19 #include <vector>
20 
21 #include "controller_interface/controller_interface_base.hpp"
22 #include "controller_interface/visibility_control.h"
23 #include "hardware_interface/handle.hpp"
24 
25 namespace controller_interface
26 {
28 {
29 public:
30  CONTROLLER_INTERFACE_PUBLIC
32 
33  CONTROLLER_INTERFACE_PUBLIC
34  virtual ~ControllerInterface() = default;
35 
41  CONTROLLER_INTERFACE_PUBLIC
42  bool is_chainable() const final;
43 
49  CONTROLLER_INTERFACE_PUBLIC
50  std::vector<hardware_interface::StateInterface::ConstSharedPtr> export_state_interfaces() final;
51 
57  CONTROLLER_INTERFACE_PUBLIC
58  std::vector<hardware_interface::CommandInterface::SharedPtr> export_reference_interfaces() final;
59 
65  CONTROLLER_INTERFACE_PUBLIC
66  bool set_chained_mode(bool chained_mode) final;
67 
73  CONTROLLER_INTERFACE_PUBLIC
74  bool is_in_chained_mode() const final;
75 };
76 
77 using ControllerInterfaceSharedPtr = std::shared_ptr<ControllerInterface>;
78 
79 } // namespace controller_interface
80 
81 #endif // CONTROLLER_INTERFACE__CONTROLLER_INTERFACE_HPP_
Definition: controller_interface_base.hpp:99
Definition: controller_interface.hpp:28
CONTROLLER_INTERFACE_PUBLIC std::vector< hardware_interface::CommandInterface::SharedPtr > export_reference_interfaces() final
Definition: controller_interface.cpp:32
CONTROLLER_INTERFACE_PUBLIC bool set_chained_mode(bool chained_mode) final
Definition: controller_interface.cpp:37
CONTROLLER_INTERFACE_PUBLIC bool is_chainable() const final
Definition: controller_interface.cpp:23
CONTROLLER_INTERFACE_PUBLIC bool is_in_chained_mode() const final
Definition: controller_interface.cpp:39
CONTROLLER_INTERFACE_PUBLIC std::vector< hardware_interface::StateInterface::ConstSharedPtr > export_state_interfaces() final
Definition: controller_interface.cpp:26