19 #ifndef DISK_MONITOR_DISK_MONITOR_H_
20 #define DISK_MONITOR_DISK_MONITOR_H_
22 #include <pluginlib/class_list_macros.h>
25 #include <ros/package.h>
31 #include <sys/types.h>
32 #include <sys/statvfs.h>
35 #include <ff_msgs/DiskState.h>
36 #include <ff_msgs/DiskStateStamped.h>
58 PathInfo(std::string
const& path_name_in,
59 bool const check_load_high_fault_in,
60 float const high_thres_percent_in,
61 float const too_high_thres_percent_in);
71 void OnCheckTimer(ros::TimerEvent
const& event);
72 bool CheckAndPublish();
74 bool usage_high_fault_triggered_, usage_too_high_fault_triggered_;
78 ff_msgs::DiskStateStamped disk_stats_msg_;
80 int pub_queue_size_, update_freq_;
82 ros::Publisher pub_disk_stats_;
83 ros::Timer reload_params_timer_, stats_timer_;
85 std::shared_ptr<std::vector<PathInfo>> paths_info_;
86 std::string pub_topic_disk_stats_, processor_name_;
87 std::string disks_high_, disks_too_high_;
92 #endif // DISK_MONITOR_DISK_MONITOR_H_