Home
last modified time | relevance | path

Searched refs:BatteryCapacityLevel (Results 1 – 17 of 17) sorted by relevance

/base/powermgr/battery_manager/test/unittest/src/
Dbattery_service_test.cpp441 EXPECT_EQ(level, BatteryCapacityLevel::LEVEL_SHUTDOWN);
445 EXPECT_EQ(level, BatteryCapacityLevel::LEVEL_CRITICAL);
449 EXPECT_EQ(level, BatteryCapacityLevel::LEVEL_WARNING);
453 EXPECT_EQ(level, BatteryCapacityLevel::LEVEL_LOW);
457 EXPECT_EQ(level, BatteryCapacityLevel::LEVEL_NORMAL);
461 EXPECT_EQ(level, BatteryCapacityLevel::LEVEL_HIGH);
465 EXPECT_EQ(level, BatteryCapacityLevel::LEVEL_FULL);
469 EXPECT_EQ(level, BatteryCapacityLevel::LEVEL_NONE);
Dbattery_srv_proxy_mock_test.cpp197 BatteryCapacityLevel batteryLevel = g_proxy->GetCapacityLevel();
198 EXPECT_TRUE(batteryLevel >= BatteryCapacityLevel::LEVEL_NONE &&
199 …batteryLevel <= BatteryCapacityLevel::LEVEL_RESERVED); // the enum value range of BatteryCapacityL…
/base/powermgr/battery_manager/services/zidl/src/
Dbattery_srv_proxy.cpp228 BatteryCapacityLevel BatterySrvProxy::GetCapacityLevel() in GetCapacityLevel()
231 RETURN_IF_WITH_RET(remote == nullptr, BatteryCapacityLevel::LEVEL_NONE); in GetCapacityLevel()
238 return BatteryCapacityLevel::LEVEL_NONE; in GetCapacityLevel()
246 return BatteryCapacityLevel::LEVEL_NONE; in GetCapacityLevel()
248 uint32_t level = static_cast<uint32_t>(BatteryCapacityLevel::LEVEL_NONE); in GetCapacityLevel()
249 READ_PARCEL_WITH_RET(reply, Uint32, level, BatteryCapacityLevel::LEVEL_NONE); in GetCapacityLevel()
250 return static_cast<BatteryCapacityLevel>(level); in GetCapacityLevel()
Dbattery_srv_stub.cpp160 BatteryCapacityLevel ret = GetCapacityLevel(); in GetBatteryCapacityLevelStub()
/base/powermgr/battery_manager/frameworks/native/src/
Dbattery_srv_client.cpp175 BatteryCapacityLevel BatterySrvClient::GetCapacityLevel() in GetCapacityLevel()
177 BatteryCapacityLevel level = BatteryCapacityLevel::LEVEL_NONE; in GetCapacityLevel()
/base/powermgr/battery_manager/frameworks/native/test/unittest/src/
Dbattery_client_test.cpp424 ASSERT_TRUE(batterylevel == OHOS::PowerMgr::BatteryCapacityLevel::LEVEL_CRITICAL);
435 ASSERT_TRUE(batterylevel == OHOS::PowerMgr::BatteryCapacityLevel::LEVEL_CRITICAL);
458 ASSERT_TRUE(batterylevel == OHOS::PowerMgr::BatteryCapacityLevel::LEVEL_LOW);
469 ASSERT_TRUE(batterylevel == OHOS::PowerMgr::BatteryCapacityLevel::LEVEL_LOW);
492 ASSERT_TRUE(batterylevel == OHOS::PowerMgr::BatteryCapacityLevel::LEVEL_NORMAL);
503 ASSERT_TRUE(batterylevel == OHOS::PowerMgr::BatteryCapacityLevel::LEVEL_NORMAL);
526 ASSERT_TRUE(batterylevel == OHOS::PowerMgr::BatteryCapacityLevel::LEVEL_HIGH);
537 ASSERT_TRUE(batterylevel == OHOS::PowerMgr::BatteryCapacityLevel::LEVEL_HIGH);
560 ASSERT_TRUE(batterylevel == OHOS::PowerMgr::BatteryCapacityLevel::LEVEL_FULL);
571 ASSERT_TRUE(batterylevel == OHOS::PowerMgr::BatteryCapacityLevel::LEVEL_FULL);
/base/powermgr/battery_manager/services/native/src/
Dbattery_service.cpp606 BatteryCapacityLevel BatteryService::GetCapacityLevel() in GetCapacityLevel()
608 BatteryCapacityLevel batteryCapacityLevel = BatteryCapacityLevel::LEVEL_NONE; in GetCapacityLevel()
611 batteryCapacityLevel = BatteryCapacityLevel::LEVEL_SHUTDOWN; in GetCapacityLevel()
614 batteryCapacityLevel = BatteryCapacityLevel::LEVEL_CRITICAL; in GetCapacityLevel()
617 batteryCapacityLevel = BatteryCapacityLevel::LEVEL_WARNING; in GetCapacityLevel()
620 batteryCapacityLevel = BatteryCapacityLevel::LEVEL_LOW; in GetCapacityLevel()
623 batteryCapacityLevel = BatteryCapacityLevel::LEVEL_NORMAL; in GetCapacityLevel()
626 batteryCapacityLevel = BatteryCapacityLevel::LEVEL_HIGH; in GetCapacityLevel()
629 batteryCapacityLevel = BatteryCapacityLevel::LEVEL_FULL; in GetCapacityLevel()
Dbattery_notify.cpp46 OHOS::PowerMgr::BatteryCapacityLevel g_lastCapacityLevel = OHOS::PowerMgr::BatteryCapacityLevel::LE…
Dbattery_dump.cpp67 BatteryCapacityLevel batteryLevel = service->GetCapacityLevel(); in GetBatteryInfo()
/base/powermgr/battery_manager/interfaces/inner_api/native/include/
Dibattery_srv.h40 virtual BatteryCapacityLevel GetCapacityLevel() = 0;
Dbattery_srv_client.h83 BatteryCapacityLevel GetCapacityLevel();
Dbattery_info.h133 enum class BatteryCapacityLevel : uint32_t { enum
/base/powermgr/battery_manager/frameworks/napi/
Dbattery_info.cpp248 napi_create_int32(env, (int32_t)BatteryCapacityLevel::LEVEL_FULL, &full); in CreateEnumLevelState()
249 napi_create_int32(env, (int32_t)BatteryCapacityLevel::LEVEL_HIGH, &high); in CreateEnumLevelState()
250 napi_create_int32(env, (int32_t)BatteryCapacityLevel::LEVEL_NORMAL, &normal); in CreateEnumLevelState()
251 napi_create_int32(env, (int32_t)BatteryCapacityLevel::LEVEL_LOW, &low); in CreateEnumLevelState()
252 napi_create_int32(env, (int32_t)BatteryCapacityLevel::LEVEL_WARNING, &warning); in CreateEnumLevelState()
253 napi_create_int32(env, (int32_t)BatteryCapacityLevel::LEVEL_CRITICAL, &critical); in CreateEnumLevelState()
254 napi_create_int32(env, (int32_t)BatteryCapacityLevel::LEVEL_SHUTDOWN, &shutdown); in CreateEnumLevelState()
/base/powermgr/battery_manager/services/zidl/include/
Dbattery_srv_proxy.h51 virtual BatteryCapacityLevel GetCapacityLevel() override;
/base/powermgr/battery_manager/test/benchmarktest/
Dbattery_benchmark_test.cpp243 ASSERT_TRUE(batterylevel >= BatteryCapacityLevel::LEVEL_NONE && in BENCHMARK_F()
244 batterylevel < BatteryCapacityLevel::LEVEL_RESERVED); in BENCHMARK_F()
/base/powermgr/battery_manager/test/systemtest/src/
Dbattery_event_system_test.cpp206 …EXPECT_EQ(capacity, static_cast<int32_t>(BatteryCapacityLevel::LEVEL_HIGH)) << "COMMON_EVENT_BATTE… in OnReceiveEvent()
589 EXPECT_EQ(g_capacityLevel, static_cast<int32_t>(BatteryCapacityLevel::LEVEL_LOW));
590 …EXPECT_TRUE(BatteryCapacityLevel::LEVEL_LOW == BatterySrvClient::GetInstance().GetCapacityLevel());
611 EXPECT_EQ(g_capacityLevel, static_cast<int32_t>(BatteryCapacityLevel::LEVEL_NORMAL));
612 …EXPECT_TRUE(BatteryCapacityLevel::LEVEL_NORMAL == BatterySrvClient::GetInstance().GetCapacityLevel…
/base/powermgr/battery_manager/services/native/include/
Dbattery_service.h73 BatteryCapacityLevel GetCapacityLevel() override;