29 int ret = std::system(
"reboot");
32 throw std::runtime_error(
"Failed to reboot system");
39 int ret = std::system(
"poweroff");
42 throw std::runtime_error(
"Failed to shut down system");
51 XR_LOG_WARN(
"Must run as root");
基于 Linux 的电源管理器实现 / Linux implementation of PowerManager
void Reset() override
复位电源管理模块 / Resets the power management module
void Shutdown() override
关闭系统电源 / Shuts down the system power
电源管理器基类 / Abstract base class for Power Manager