23
23
24
24
namespace autoware ::universe_utils
25
25
{
26
- DiagnosticInterface::DiagnosticInterface (rclcpp::Node * node, const std::string & diagnostic_name)
26
+ DiagnosticsInterface::DiagnosticsInterface (rclcpp::Node * node, const std::string & diagnostic_name)
27
27
: clock_(node->get_clock ())
28
28
{
29
29
diagnostics_pub_ =
@@ -34,7 +34,7 @@ DiagnosticInterface::DiagnosticInterface(rclcpp::Node * node, const std::string
34
34
diagnostics_status_msg_.hardware_id = node->get_name ();
35
35
}
36
36
37
- void DiagnosticInterface ::clear ()
37
+ void DiagnosticsInterface ::clear ()
38
38
{
39
39
diagnostics_status_msg_.values .clear ();
40
40
diagnostics_status_msg_.values .shrink_to_fit ();
@@ -43,7 +43,7 @@ void DiagnosticInterface::clear()
43
43
diagnostics_status_msg_.message = " " ;
44
44
}
45
45
46
- void DiagnosticInterface ::add_key_value (const diagnostic_msgs::msg::KeyValue & key_value_msg)
46
+ void DiagnosticsInterface ::add_key_value (const diagnostic_msgs::msg::KeyValue & key_value_msg)
47
47
{
48
48
auto it = std::find_if (
49
49
std::begin (diagnostics_status_msg_.values ), std::end (diagnostics_status_msg_.values ),
@@ -56,23 +56,23 @@ void DiagnosticInterface::add_key_value(const diagnostic_msgs::msg::KeyValue & k
56
56
}
57
57
}
58
58
59
- void DiagnosticInterface ::add_key_value (const std::string & key, const std::string & value)
59
+ void DiagnosticsInterface ::add_key_value (const std::string & key, const std::string & value)
60
60
{
61
61
diagnostic_msgs::msg::KeyValue key_value;
62
62
key_value.key = key;
63
63
key_value.value = value;
64
64
add_key_value (key_value);
65
65
}
66
66
67
- void DiagnosticInterface ::add_key_value (const std::string & key, bool value)
67
+ void DiagnosticsInterface ::add_key_value (const std::string & key, bool value)
68
68
{
69
69
diagnostic_msgs::msg::KeyValue key_value;
70
70
key_value.key = key;
71
71
key_value.value = value ? " True" : " False" ;
72
72
add_key_value (key_value);
73
73
}
74
74
75
- void DiagnosticInterface ::update_level_and_message (const int8_t level, const std::string & message)
75
+ void DiagnosticsInterface ::update_level_and_message (const int8_t level, const std::string & message)
76
76
{
77
77
if ((level > diagnostic_msgs::msg::DiagnosticStatus::OK)) {
78
78
if (!diagnostics_status_msg_.message .empty ()) {
@@ -85,12 +85,12 @@ void DiagnosticInterface::update_level_and_message(const int8_t level, const std
85
85
}
86
86
}
87
87
88
- void DiagnosticInterface ::publish (const rclcpp::Time & publish_time_stamp)
88
+ void DiagnosticsInterface ::publish (const rclcpp::Time & publish_time_stamp)
89
89
{
90
90
diagnostics_pub_->publish (create_diagnostics_array (publish_time_stamp));
91
91
}
92
92
93
- diagnostic_msgs::msg::DiagnosticArray DiagnosticInterface ::create_diagnostics_array (
93
+ diagnostic_msgs::msg::DiagnosticArray DiagnosticsInterface ::create_diagnostics_array (
94
94
const rclcpp::Time & publish_time_stamp) const
95
95
{
96
96
diagnostic_msgs::msg::DiagnosticArray diagnostics_msg;
0 commit comments