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

Abstract base class for checking Service Server/Client existence. Handles node iteration, name parsing, and self-exclusion logic. More...

#include <service_server_check_base.hpp>

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

Protected Member Functions

void set_config (const std::string service_name, const uint32_t timeout_ms, size_t expected_count=1)
 
virtual void prepare_check (rclcpp::Node::SharedPtr node) override=0
 Prepares the check before execution.
 
virtual bool check_entity_in_node (rclcpp::Node::SharedPtr node, const std::string &node_name, const std::string &node_ns)=0
 
virtual std::string get_target_type () const =0
 
- Protected Member Functions inherited from system_health_check::base::SystemCheckBase
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.
 

Protected Attributes

std::string service_name_
 
uint32_t timeout_ms_ = 1000
 
size_t expected_count_ = 1
 

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

Abstract base class for checking Service Server/Client existence. Handles node iteration, name parsing, and self-exclusion logic.

Member Function Documentation

◆ check_entity_in_node()

virtual bool system_health_check::base::ServiceGraphCheckBase::check_entity_in_node ( rclcpp::Node::SharedPtr  node,
const std::string &  node_name,
const std::string &  node_ns 
)
protectedpure virtual

◆ get_target_type()

virtual std::string system_health_check::base::ServiceGraphCheckBase::get_target_type ( ) const
protectedpure virtual

◆ prepare_check()

virtual void system_health_check::base::ServiceGraphCheckBase::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::ServiceGraphCheckBase::set_config ( const std::string  service_name,
const uint32_t  timeout_ms,
size_t  expected_count = 1 
)
inlineprotected

Member Data Documentation

◆ expected_count_

size_t system_health_check::base::ServiceGraphCheckBase::expected_count_ = 1
protected

◆ service_name_

std::string system_health_check::base::ServiceGraphCheckBase::service_name_
protected

◆ timeout_ms_

uint32_t system_health_check::base::ServiceGraphCheckBase::timeout_ms_ = 1000
protected

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