15 #ifndef HARDWARE_INTERFACE__HANDLE_HPP_
16 #define HARDWARE_INTERFACE__HANDLE_HPP_
21 #include "hardware_interface/macros.hpp"
22 #include "hardware_interface/visibility_control.h"
31 const std::string & name,
const std::string & interface_name,
double * value_ptr =
nullptr)
32 : name_(name), interface_name_(interface_name), value_ptr_(value_ptr)
37 : interface_name_(interface_name), value_ptr_(
nullptr)
42 : interface_name_(interface_name), value_ptr_(
nullptr)
57 inline operator bool()
const {
return value_ptr_ !=
nullptr; }
59 const std::string & get_name()
const {
return name_; }
61 const std::string & get_interface_name()
const {
return interface_name_; }
63 const std::string get_full_name()
const {
return name_ +
"/" + interface_name_; }
65 double get_value()
const
67 THROW_ON_NULLPTR(value_ptr_);
73 std::string interface_name_;
81 const std::string & name,
const std::string & interface_name,
double * value_ptr =
nullptr)
100 void set_value(
double value)
102 THROW_ON_NULLPTR(this->value_ptr_);
103 *this->value_ptr_ = value;
114 using ReadOnlyHandle::ReadOnlyHandle;
130 using ReadWriteHandle::ReadWriteHandle;
Definition: handle.hpp:118
CommandInterface(const CommandInterface &other)=delete
CommandInterface copy constructor is actively deleted.
A handle used to get and set a value on a given interface.
Definition: handle.hpp:28
Definition: handle.hpp:78
Definition: handle.hpp:108
Definition: actuator.hpp:29