Common
common packages for kyubic
 
Loading...
Searching...
No Matches
system_health_check::base::LifecycleStatusCheckBase Class Referenceabstract

Base class for checking the state of a Lifecycle Node. Connects to the {node_name}/get_state service to verify the current state. More...

#include <lifecycle_stats_check_base.hpp>

+ Inheritance diagram for system_health_check::base::LifecycleStatusCheckBase:
+ Collaboration diagram for system_health_check::base::LifecycleStatusCheckBase:

Protected Member Functions

void set_config (const std::string target_node_name, const std::string expected_state, const uint32_t timeout_ms)
 Configuration for the check.
 
virtual void prepare_check (rclcpp::Node::SharedPtr node) override=0
 Prepares the check before execution.
 
virtual std::string get_unique_id () const
 Generates a unique identifier for the check instance.
 
virtual void prepare_check (rclcpp::Node::SharedPtr node)
 Prepares the check before execution.
 
virtual bool check_impl (rclcpp::Node::SharedPtr node)=0
 Actual implementation of the check logic.
 
virtual std::string report_impl (rclcpp::Node::SharedPtr node)=0
 Generates a detailed report of the check.
 

Additional Inherited Members

- Public Member Functions inherited from system_health_check::base::SystemCheckBase
virtual ~SystemCheckBase ()
 
bool check (rclcpp::Node::SharedPtr node)
 Executes the system check with caching support.
 
std::string report (rclcpp::Node::SharedPtr node)
 Generates a human-readable report of the check.
 

Detailed Description

Base class for checking the state of a Lifecycle Node. Connects to the {node_name}/get_state service to verify the current state.

Member Function Documentation

◆ prepare_check()

virtual void system_health_check::base::LifecycleStatusCheckBase::prepare_check ( rclcpp::Node::SharedPtr  node)
overrideprotectedpure virtual

Prepares the check before execution.

Parameters
nodeShared pointer to the ROS 2 node.

Derived classes can override this function to perform any necessary setup.

Reimplemented from system_health_check::base::SystemCheckBase.

◆ set_config()

void system_health_check::base::LifecycleStatusCheckBase::set_config ( const std::string  target_node_name,
const std::string  expected_state,
const uint32_t  timeout_ms 
)
inlineprotected

Configuration for the check.

Parameters
target_node_nameName of the lifecycle node (e.g., "/camera_driver")
expected_state_idID of the expected state (e.g., lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE)
timeout_msTimeout in milliseconds

The documentation for this class was generated from the following file: