Go to the documentation of this file.
46 message_ =
status->message;
47 hw_id_ =
status->hardware_id;
73 ROS_ERROR(
"Incorrect name when updating StatusItem. Expected %s, got %s",
name_.c_str(),
status->name.c_str());
78 double update_interval = (now - update_time_).toSec();
79 if (update_interval < 0)
80 ROS_WARN(
"StatusItem is being updated with older data. Negative update time: %f", update_interval);
83 message_ =
status->message;
84 hw_id_ =
status->hardware_id;
97 status->name =
"/" + output_name_;
99 status->name = path +
"/" + output_name_;
102 status->message = message_;
103 status->hardware_id = hw_id_;
boost::shared_ptr< diagnostic_msgs::DiagnosticStatus > toStatusMsg(const std::string &path, const bool stale=false) const
Prepends "path/" to name, makes item stale if "stale" true.
DiagnosticLevel valToLevel(const int val)
Converts in to DiagnosticLevel. Values: [0, 3].
DiagnosticLevel
Level of StatusItem. OK, Warn, Error, Stale.
std::string getOutputName(const std::string item_name)
Replace "/" with "" in output name, to avoid confusing robot monitor.
bool update(const diagnostic_msgs::DiagnosticStatus *status)
Must have same name as original status or it won't update.
StatusItem(const diagnostic_msgs::DiagnosticStatus *status)
Constructed from const DiagnosticStatus*.