wangyantian df5041b022 fix: unify all error output to OutputError JSON format
- Add OutputFallbackError for cJSON alloc failure (no cJSON dependency)
- Replace PrintUsage + CLI_ERROR with OutputError in HandleCommand
- Replace CLI_ERROR with OutputError in PrintSubcommandHelp for unknown cmd
- Remove CLI_ERROR calls before OutputError in Cmd functions (dedup)
- Remove unused PrintUsage function and CLI_ERROR macro

Co-Authored-By: Agent
Change-Id: Ia2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1
Signed-off-by: wangyantian <wangyantian@huawei.com>
2026-05-07 18:08:28 +08:00
2023-07-21 15:15:33 +08:00
2022-01-11 18:23:52 -08:00
2025-11-17 13:56:07 +08:00
2026-04-14 17:42:22 +08:00
2026-03-04 11:12:20 +08:00
2026-02-25 16:46:41 +08:00
2022-08-30 14:19:25 +08:00
2021-06-02 02:19:06 +08:00
2021-10-20 15:13:26 +08:00
2023-12-27 17:15:41 +08:00
2023-03-09 14:21:38 +08:00

Battery Manager

Introduction

The Battery Manager module provides the following functions:

  1. Obtaining battery information
  2. Obtaining the battery charging status and the battery state of charge (SoC)
  3. 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

Power Management Subsystem

powermgr_power_manager

powermgr_display_manager

powermgr_battery_manager

powermgr_thermal_manager

powermgr_battery_statistics

powermgr_battery_lite

powermgr_powermgr_lite

S
Description
暂无描述
Readme 12 MiB
Languages
C++ 99.5%
C 0.5%