tpSystemBatteryInfo类
ExternUtils
2025-07-05
基础信息
头文件: | include <tpSystemBatteryInfo.h> |
---|---|
Cmake: | None |
发布版本: | V0.1.0 |
继承类: | |
派生类: |
Public 类型
enum SystemPowerState {
TP_SYSTEM_POWER_UNKNOWN, TP_SYSTEM_POWER_CHARGE, TP_SYSTEM_POWER_DISCHARGE,
TP_SYSTEM_POWER_FULL
}
Public 成员函数
tpSystemBatteryInfo() | ||
---|---|---|
~tpSystemBatteryInfo() | ||
getState() | 获取系统电源状态 | |
getVoltage() | 获取电池电压(暂无法测试) | |
getCurrent() | 获取电池充/放电电流(暂不支持) | |
getBatteryLevel() | 获取电池当前容量 | |
isCharging() | 是否在充电 | |
remainingCapacity() | 返回电池剩余容量(暂不支持) |
成员枚举类型说明
enum tpSystemBatteryInfo::SystemPowerState
名称 | 值 | 描述 |
---|---|---|
TP_SYSTEM_POWER_UNKNOWN | 0 | |
TP_SYSTEM_POWER_CHARGE | 1 | |
TP_SYSTEM_POWER_DISCHARGE | 2 | |
TP_SYSTEM_POWER_FULL | 3 |
成员函数说明
tpSystemBatteryInfo::tpSystemBatteryInfo()
暂无注释...
tpSystemBatteryInfo::~tpSystemBatteryInfo()
暂无注释...
tpSystemBatteryInfo::SystemPowerState tpSystemBatteryInfo::getState()
点击查看...
获取系统电源状态
返回值:
linebreak
double tpSystemBatteryInfo::getVoltage()
点击查看...
获取电池电压(暂无法测试)
返回值:
linebreak
double tpSystemBatteryInfo::getCurrent()
点击查看...
获取电池充/放电电流(暂不支持)
返回值:
linebreak
int tpSystemBatteryInfo::getBatteryLevel()
点击查看...
获取电池当前容量
返回值:
返回百分比
tpBool tpSystemBatteryInfo::isCharging()
点击查看...
是否在充电
返回值:
linebreak
int tpSystemBatteryInfo::remainingCapacity()
点击查看...
返回电池剩余容量(暂不支持)
返回值:
linebreak