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());
77 double update_interval = (
ros::Time::now() - update_time_).toSec();
78 if (update_interval < 0)
79 ROS_WARN(
"StatusItem is being updated with older data. Negative update time: %f", update_interval);
82 message_ =
status->message;
83 hw_id_ =
status->hardware_id;
96 status->name =
"/" + output_name_;
98 status->name = path +
"/" + output_name_;
101 status->message = message_;
102 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*.