41 explicit Sensor(std::unique_ptr<SensorInterface> impl);
47 const rclcpp_lifecycle::State & initialize(
49 rclcpp::node_interfaces::NodeClockInterface::SharedPtr clock_interface);
51 const rclcpp_lifecycle::State & configure();
53 const rclcpp_lifecycle::State & cleanup();
55 const rclcpp_lifecycle::State & shutdown();
57 const rclcpp_lifecycle::State & activate();
59 const rclcpp_lifecycle::State & deactivate();
61 const rclcpp_lifecycle::State & error();
63 std::vector<StateInterface::ConstSharedPtr> export_state_interfaces();
65 std::string get_name()
const;
67 std::string get_group_name()
const;
69 const rclcpp_lifecycle::State & get_lifecycle_state()
const;
71 const rclcpp::Time & get_last_read_time()
const;
73 return_type read(
const rclcpp::Time & time,
const rclcpp::Duration & period);
75 return_type write(
const rclcpp::Time &,
const rclcpp::Duration &) {
return return_type::OK; }
77 std::recursive_mutex & get_mutex();
80 std::unique_ptr<SensorInterface> impl_;
81 mutable std::recursive_mutex sensors_mutex_;
83 rclcpp::Time last_read_cycle_time_;