Common
common packages for kyubic
 
Loading...
Searching...
No Matches
system_health_check::base::TopicStatusCheckBase< MessageT > Class Template Referenceabstract

Template class for checking topic reception. More...

#include <topic_status_check_base.hpp>

+ Inheritance diagram for system_health_check::base::TopicStatusCheckBase< MessageT >:
+ Collaboration diagram for system_health_check::base::TopicStatusCheckBase< MessageT >:

Protected Member Functions

void set_status_id (const std::string id)
 Set the status id for cache check.
 
void set_config (const std::string topic_name, const uint32_t timeout_ms)
 
virtual void prepare_check (rclcpp::Node::SharedPtr node) override=0
 Prepares the check before execution.
 
virtual bool validate (const MessageT &msg)
 Virtual function to verify message content. Defaults to "OK if received". Override in a derived class to inspect content (e.g., msg->data == true).
 
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

template<typename MessageT>
class system_health_check::base::TopicStatusCheckBase< MessageT >

Template class for checking topic reception.

Template Parameters
MessageTThe message type to check (e.g., std_msgs::msg::Bool).

Member Function Documentation

◆ prepare_check()

template<typename MessageT >
virtual void system_health_check::base::TopicStatusCheckBase< MessageT >::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()

template<typename MessageT >
void system_health_check::base::TopicStatusCheckBase< MessageT >::set_config ( const std::string  topic_name,
const uint32_t  timeout_ms 
)
inlineprotected

◆ set_status_id()

template<typename MessageT >
void system_health_check::base::TopicStatusCheckBase< MessageT >::set_status_id ( const std::string  id)
inlineprotected

Set the status id for cache check.

Parameters
idstatus id (e.g., "depth_status")

◆ validate()

template<typename MessageT >
virtual bool system_health_check::base::TopicStatusCheckBase< MessageT >::validate ( const MessageT &  msg)
inlineprotectedvirtual

Virtual function to verify message content. Defaults to "OK if received". Override in a derived class to inspect content (e.g., msg->data == true).


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