harmony 鸿蒙Power Management
Power Management
Introduction
The power management subsystem provides the following functions:
- System restarting: restarts or shuts down the system.
- System power management: manages the system power status and running lock.
- Display-related power consumption adjustment: adjusts the backlight brightness based on the ambient light and turns off the screen based on the proximity light.
- Power saving: works in low power consumption mode without compromising main functions and performance.
- Battery management: supports charging and discharging, battery and charging status monitoring (including status updating and reporting), and charging upon power-off.
- Temperature control: restricts temperature rise through application, SoC, and peripheral control when the device temperature reaches the specified limit.
- Power consumption statistics: collects statistics on the power consumption of software, hardware, and a single application.
- Battery service for mini-, small-, and standard-system devices
- Power management service for mini-, small-, and standard-system devices
Figure 1 Power management subsystem architecture
Directory Structure
/base/powermgr
├── battery_lite # Battery service for mini-, small-, and standard-system devices
├── battery_manager # Battery service
├── battery_statistics # Power consumption statistics service
├── display_manager # Display energy efficiency management service
├── power_manager # System power management service
├── powermgr_lite # Power management service for mini-, small-, and standard-system devices
└── thermal_manager # Temperature control and thermal management service
Usage
As shown in the system architecture, the power management subsystem consists of seven modules. Some modules provide external APIs or public event notifications. You can use them based on your use cases. The functions of key modules are described as follows:
- Power Manager: provides APIs to request and release the running lock, enable the power saving mode, adjust the brightness, and restart or power off the device. It also provides public events for you to observe changes of the power saving mode and power-off status.
- Battery Manager: provides APIs to query battery information. It also provides public events for you to observer changes of the battery status and charging/discharging status.
- Thermal Manager: provides APIs to query the temperature rise status of a device. It also allows you to register callbacks and public events to listen for the temperature rise status of a device.
- Battery Statistics: provides power consumption statistics on hardware and software. It allows you to query the power consumption of hardware or applications.
Repositories Involved
Power Management Subsystem
你可能感兴趣的鸿蒙文章
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦