mirror of
https://github.com/openharmony/powermgr_battery_manager.git
synced 2026-07-01 06:42:05 -04:00
d39f970e373fc84ed73779cfe11715a1d10a8917
- Rename ohos-battery-manager to ohos-batteryManager (camelCase) - Remove help subcommand, add --help flag per spec - Update config.json with standard fields (executablePath, inputSchema/outputSchema) - Add standard envelope outputSchema (type/status/data/errCode/errMsg/suggestion) - Change error status from "failed" to "error" to match spec enum definition - Remove deprecated config fields ($schema/timeout/events/argumentMapping) - Update BUILD.gn: add nlohmann_json_static dep - Update bundle.json: add json component - Update tests and docs to reflect all changes Co-Authored-By: Agent Change-Id: Idb1ee3c09a3b6bfc7f624ec5552358c2e243e7e4 Signed-off-by: wangyantian <wangyantian@huawei.com>
Battery Manager
Introduction
The Battery Manager module provides the following functions:
- Obtaining battery information
- Obtaining the battery charging status and the battery state of charge (SoC)
- Power off charging
Figure 1 Architecture of the Battery Manager module
Directory Structure
base/powermgr/battery_manager
├── figures # Architecture
├── frameworks # Framework layer
│ ├── napi # NAPI layer
│ └── native # Native layer
├── interfaces # API layer
│ └── inner_api # Internal APIs
├── sa_profile # SA profile
└── 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
Repositories Involved
powermgr_battery_manager
Description
Languages
C++
99.5%
C
0.5%
