27 Handle(
const std::string & prefix_name,
const std::string & interface_name,
double * value_ptr)
28 : prefix_name_(prefix_name), interface_name_(interface_name), value_ptr_(value_ptr)
43 inline operator bool()
const {
return value_ptr_ !=
nullptr; }
45 const std::string get_name()
const {
return prefix_name_ +
"/" + interface_name_; }
47 const std::string & get_interface_name()
const {
return interface_name_; }
49 const std::string & get_prefix_name()
const {
return prefix_name_; }
51 double get_value()
const
53 THROW_ON_NULLPTR(value_ptr_);
58 "For Transmission Handles use get_value() instead to retrieve the value. This method will be "
59 "removed by the ROS 2 Kilted Kaiju release.")]]
60 std::optional<double> get_optional()
const
69 bool set_value(
double value)
71 THROW_ON_NULLPTR(this->value_ptr_);
72 *this->value_ptr_ = value;
77 std::string prefix_name_;
78 std::string interface_name_;
79 double * value_ptr_ =
nullptr;