2023-03-09 06:21:38 +00:00
|
|
|
# Battery Manager<a name="EN-US_TOPIC_0000001124094823"></a>
|
2021-06-01 10:55:41 +00:00
|
|
|
|
2021-06-01 16:03:48 +00:00
|
|
|
- [Introduction](#section11660541593)
|
|
|
|
- [Directory Structure](#section19472752217)
|
|
|
|
- [Repositories Involved](#section63151229062)
|
2021-06-01 10:55:41 +00:00
|
|
|
|
2021-06-01 16:03:48 +00:00
|
|
|
## Introduction<a name="section11660541593"></a>
|
2021-06-01 10:55:41 +00:00
|
|
|
|
2023-03-09 06:21:38 +00:00
|
|
|
The Battery Manager module provides the following functions:
|
2021-06-01 10:55:41 +00:00
|
|
|
|
2021-06-01 16:03:48 +00:00
|
|
|
1. Obtaining battery information
|
2023-03-09 06:21:38 +00:00
|
|
|
2. Obtaining the battery charging status and the battery state of charge (SoC)
|
2022-01-12 02:23:52 +00:00
|
|
|
3. Power off charging
|
2021-06-01 10:55:41 +00:00
|
|
|
|
2023-03-09 06:21:38 +00:00
|
|
|
**Figure 1** Architecture of the Battery Manager module<a name="fig106301571239"></a>
|
|
|
|
|
|
|
|
![](figures/power-management-subsystem-architecture.png "Architecture of the power management subsystem")
|
2021-06-01 10:55:41 +00:00
|
|
|
|
2021-06-01 16:03:48 +00:00
|
|
|
## Directory Structure<a name="section19472752217"></a>
|
2021-06-01 10:55:41 +00:00
|
|
|
|
2021-06-01 16:03:48 +00:00
|
|
|
```
|
|
|
|
base/powermgr/battery_manager
|
2023-03-09 06:21:38 +00:00
|
|
|
├── figures # Architecture
|
|
|
|
├── frameworks # Framework layer
|
|
|
|
│ ├── napi # NAPI layer
|
|
|
|
│ └── native # Native layer
|
|
|
|
├── interfaces # API layer
|
|
|
|
│ └── inner_api # Internal APIs
|
2021-06-01 16:03:48 +00:00
|
|
|
├── sa_profile # SA profile
|
2023-03-09 06:21:38 +00:00
|
|
|
└── services # Service layer
|
|
|
|
│ └── native # Native layer
|
|
|
|
│ └── zidl # Zidl API layer
|
|
|
|
├── test # Test cases
|
|
|
|
│ ├── fuzztest # Fuzz test
|
|
|
|
│ ├── unittest # Unit test
|
|
|
|
│ ├── systemtest # System test
|
|
|
|
│ └── utils # Test tools
|
|
|
|
└── utils # Utilities
|
2021-06-01 16:03:48 +00:00
|
|
|
```
|
2021-06-01 10:55:41 +00:00
|
|
|
|
2023-03-09 06:21:38 +00:00
|
|
|
|
|
|
|
|
2021-06-01 16:03:48 +00:00
|
|
|
## Repositories Involved<a name="section63151229062"></a>
|
2021-06-01 10:55:41 +00:00
|
|
|
|
2023-03-09 06:21:38 +00:00
|
|
|
[Power Management Subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/power-management.md)
|
2021-06-01 10:55:41 +00:00
|
|
|
|
2022-01-12 02:23:52 +00:00
|
|
|
[powermgr_power_manager](https://gitee.com/openharmony/powermgr_power_manager)
|
2021-06-01 10:55:41 +00:00
|
|
|
|
2022-01-12 02:23:52 +00:00
|
|
|
[powermgr_display_manager](https://gitee.com/openharmony/powermgr_display_manager)
|
2021-06-01 10:55:41 +00:00
|
|
|
|
2022-01-13 09:47:26 +00:00
|
|
|
**powermgr_battery_manager**
|
2022-01-12 02:23:52 +00:00
|
|
|
|
|
|
|
[powermgr_thermal_manager](https://gitee.com/openharmony/powermgr_thermal_manager)
|
|
|
|
|
|
|
|
[powermgr_battery_statistics](https://gitee.com/openharmony/powermgr_battery_statistics)
|
|
|
|
|
|
|
|
[powermgr_battery_lite](https://gitee.com/openharmony/powermgr_battery_lite)
|
|
|
|
|
|
|
|
[powermgr_powermgr_lite](https://gitee.com/openharmony/powermgr_powermgr_lite)
|