Class SystemMonitorNode

Inheritance Relationships

Base Type

  • public rclcpp::Node

Class Documentation

class SystemMonitorNode : public rclcpp::Node

Public Functions

SystemMonitorNode(const std::string &node_name, FilesystemInterface::SharedPtr filesystem, const rclcpp::NodeOptions &options = rclcpp::NodeOptions())

Protected Functions

SystemStatus GetSystemStatus() const

Retrieves the system parameters and generate system status object describing the current system state.

Returns:

The system status.

std::vector<float> GetCoresUsages() const
float GetCPUMeanUsage(const std::vector<float> &usages) const
float GetCPUTemperature() const
float GetRAMUsage() const
float GetDiskUsage() const
husarion_ugv_msgs::msg::SystemStatus SystemStatusToMessage(const SystemStatus &status)

Converts a SystemStatus object to a SystemStatus message.

This function takes a SystemStatus object and converts it into a SystemStatus message. The resulting message can be used to publish the system status over a ROS topic.

Parameters:

status – The SystemStatus object to be converted.

Returns:

The converted SystemStatus message.