40class HardwareComponent final
43 HardwareComponent() =
default;
45 explicit HardwareComponent(std::unique_ptr<HardwareComponentInterface> impl);
47 explicit HardwareComponent(HardwareComponent && other)
noexcept;
51 HardwareComponent(
const HardwareComponent & other) =
delete;
53 HardwareComponent & operator=(
const HardwareComponent & other) =
delete;
55 HardwareComponent & operator=(HardwareComponent && other) =
delete;
57 const rclcpp_lifecycle::State & initialize(
60 const rclcpp_lifecycle::State & configure();
62 const rclcpp_lifecycle::State & cleanup();
64 const rclcpp_lifecycle::State & shutdown();
66 const rclcpp_lifecycle::State & activate();
68 const rclcpp_lifecycle::State & deactivate();
70 const rclcpp_lifecycle::State & error();
72 std::vector<StateInterface::ConstSharedPtr> export_state_interfaces();
74 std::vector<CommandInterface::SharedPtr> export_command_interfaces();
76 return_type prepare_command_mode_switch(
77 const std::vector<std::string> & start_interfaces,
78 const std::vector<std::string> & stop_interfaces);
80 return_type perform_command_mode_switch(
81 const std::vector<std::string> & start_interfaces,
82 const std::vector<std::string> & stop_interfaces);
84 const std::string & get_name()
const;
86 const std::string & get_group_name()
const;
88 const rclcpp_lifecycle::State & get_lifecycle_state()
const;
90 uint8_t get_lifecycle_id()
const;
92 const rclcpp::Time & get_last_read_time()
const;
94 const rclcpp::Time & get_last_write_time()
const;
100 return_type read(
const rclcpp::Time & time,
const rclcpp::Duration & period);
102 return_type write(
const rclcpp::Time & time,
const rclcpp::Duration & period);
104 std::recursive_mutex & get_mutex();
107 std::unique_ptr<HardwareComponentInterface> impl_;
108 mutable std::recursive_mutex component_mutex_;
110 rclcpp::Time last_read_cycle_time_;
112 rclcpp::Time last_write_cycle_time_;