Home
last modified time | relevance | path

Searched refs:BatteryChargeState (Results 1 – 25 of 46) sorted by relevance

12

/base/powermgr/thermal_manager/services/native/src/thermal_observer/state_machine/
Dcharger_state_collection.cpp106 case static_cast<int32_t>(BatteryChargeState::CHARGE_STATE_DISABLE): { in HandleChangerStatusCompleted()
110 case static_cast<int32_t>(BatteryChargeState::CHARGE_STATE_ENABLE): { in HandleChangerStatusCompleted()
114 case static_cast<int32_t>(BatteryChargeState::CHARGE_STATE_FULL): { in HandleChangerStatusCompleted()
118 case static_cast<int32_t>(BatteryChargeState::CHARGE_STATE_NONE): { in HandleChangerStatusCompleted()
122 case static_cast<int>(BatteryChargeState::CHARGE_STATE_BUTT): { in HandleChangerStatusCompleted()
139 BatteryChargeState chargeState = batterySrvClient.GetChargingStatus(); in DecideState()
140 if ((value == CHARGER_ON && chargeState == BatteryChargeState::CHARGE_STATE_ENABLE) || in DecideState()
141 (value == CHARGER_OFF && chargeState == BatteryChargeState::CHARGE_STATE_NONE)) { in DecideState()
/base/powermgr/battery_manager/test/unittest/src/
Dbattery_light_test.cpp81 g_light.UpdateColor(BatteryChargeState::CHARGE_STATE_ENABLE, capacity);
83 EXPECT_TRUE(g_light.UpdateColor(BatteryChargeState::CHARGE_STATE_ENABLE, capacity));
111 EXPECT_TRUE(g_light.UpdateColor(BatteryChargeState::CHARGE_STATE_ENABLE, 11));
115 EXPECT_FALSE(g_light.UpdateColor(BatteryChargeState::CHARGE_STATE_NONE, 0));
130 EXPECT_TRUE(g_light.UpdateColor(BatteryChargeState::CHARGE_STATE_ENABLE, 9));
145 EXPECT_TRUE(g_light.UpdateColor(BatteryChargeState::CHARGE_STATE_ENABLE, 89));
160 EXPECT_TRUE(g_light.UpdateColor(BatteryChargeState::CHARGE_STATE_ENABLE, 100));
176 EXPECT_TRUE(g_light.UpdateColor(BatteryChargeState::CHARGE_STATE_ENABLE, 91));
181 EXPECT_FALSE(g_light.UpdateColor(BatteryChargeState::CHARGE_STATE_ENABLE, -1));
Dbattery_notify_test.cpp51 const BatteryChargeState chargeState = BatteryChargeState::CHARGE_STATE_NONE; in SetUp()
250 const BatteryChargeState chargeState = BatteryChargeState::CHARGE_STATE_ENABLE;
264 const BatteryChargeState chargeState = BatteryChargeState::CHARGE_STATE_DISABLE;
278 const BatteryChargeState chargeState = BatteryChargeState::CHARGE_STATE_FULL;
292 const BatteryChargeState chargeState = BatteryChargeState::CHARGE_STATE_BUTT;
321 const BatteryChargeState chargeState = BatteryChargeState::CHARGE_STATE_ENABLE;
Dbattery_srv_proxy_mock_test.cpp74 BatteryChargeState chargeState = g_proxy->GetChargingStatus();
75 EXPECT_TRUE(chargeState >= BatteryChargeState::CHARGE_STATE_NONE &&
76 …chargeState <= BatteryChargeState::CHARGE_STATE_BUTT); // the enum value range of BatteryChargeSta…
Dbattery_service_test.cpp308 BatteryChargeState chargeState = g_service->GetChargingStatus();
310 …chargeState >= BatteryChargeState::CHARGE_STATE_NONE && chargeState <= BatteryChargeState::CHARGE_…
415 g_service->CalculateRemainingChargeTime(101, BatteryChargeState::CHARGE_STATE_DISABLE);
420 g_service->CalculateRemainingChargeTime(30, BatteryChargeState::CHARGE_STATE_ENABLE);
425 g_service->CalculateRemainingChargeTime(51, BatteryChargeState::CHARGE_STATE_ENABLE);
/base/powermgr/battery_lite/interfaces/kits/
Dbattery_info.h44 } BatteryChargeState; typedef
101 BatteryChargeState GetChargingStatus(void);
/base/powermgr/battery_lite/services/include/
Dibattery.h36 BatteryChargeState chargingStatus;
47 BatteryChargeState (*GetChargingStatus)();
Dbattery_device.h49 BatteryChargeState (*GetChargingStatus)(void);
/base/powermgr/battery_manager/services/native/include/
Dbattery_service.h62 BatteryChargeState GetChargingStatus() override;
88 void WakeupDevice(BatteryChargeState chargeState);
93 void CalculateRemainingChargeTime(int32_t capacity, BatteryChargeState chargeState);
94 void HandleCapacity(int32_t capacity, BatteryChargeState chargeState);
Dbattery_light.h31 bool UpdateColor(BatteryChargeState chargeState, int32_t capacity);
/base/powermgr/battery_manager/test/systemtest/src/
Dbattery_sttest.cpp106 EXPECT_TRUE(chargeState == OHOS::PowerMgr::BatteryChargeState::CHARGE_STATE_NONE);
116 EXPECT_TRUE(chargeState == OHOS::PowerMgr::BatteryChargeState::CHARGE_STATE_ENABLE ||
117 chargeState == OHOS::PowerMgr::BatteryChargeState::CHARGE_STATE_FULL);
140 EXPECT_TRUE(chargeState == OHOS::PowerMgr::BatteryChargeState::CHARGE_STATE_ENABLE);
150 EXPECT_TRUE(chargeState == OHOS::PowerMgr::BatteryChargeState::CHARGE_STATE_ENABLE ||
151 chargeState == OHOS::PowerMgr::BatteryChargeState::CHARGE_STATE_FULL);
174 EXPECT_TRUE(chargeState == OHOS::PowerMgr::BatteryChargeState::CHARGE_STATE_FULL);
184 EXPECT_TRUE(chargeState == OHOS::PowerMgr::BatteryChargeState::CHARGE_STATE_ENABLE ||
185 chargeState == OHOS::PowerMgr::BatteryChargeState::CHARGE_STATE_FULL);
208 EXPECT_TRUE(chargeState == OHOS::PowerMgr::BatteryChargeState::CHARGE_STATE_DISABLE);
[all …]
/base/powermgr/battery_manager/services/native/src/
Dbattery_light.cpp88 bool BatteryLight::UpdateColor(BatteryChargeState chargeState, int32_t capacity) in UpdateColor()
90 if ((chargeState == BatteryChargeState::CHARGE_STATE_NONE) || in UpdateColor()
91 (chargeState == BatteryChargeState::CHARGE_STATE_BUTT)) { in UpdateColor()
Dbattery_service.cpp194 batteryInfo_.SetChargeState(BatteryChargeState(event.chargeState)); in ConvertingEvent()
349 void BatteryService::HandleCapacity(int32_t capacity, BatteryChargeState chargeState) in HandleCapacity()
354 ((chargeState == BatteryChargeState::CHARGE_STATE_NONE) || in HandleCapacity()
355 (chargeState == BatteryChargeState::CHARGE_STATE_BUTT))) { in HandleCapacity()
391 BatteryChargeState BatteryService::GetChargingStatus() in GetChargingStatus()
398 V1_2::BatteryChargeState chargeState = V1_2::BatteryChargeState(0); in GetChargingStatus()
401 return BatteryChargeState(chargeState); in GetChargingStatus()
404 return BatteryChargeState(chargeState); in GetChargingStatus()
561 void BatteryService::CalculateRemainingChargeTime(int32_t capacity, BatteryChargeState chargeState) in CalculateRemainingChargeTime()
568 if (chargeState != BatteryChargeState::CHARGE_STATE_ENABLE) { in CalculateRemainingChargeTime()
[all …]
/base/powermgr/battery_manager/interfaces/inner_api/native/include/
Dbattery_info.h33 enum class BatteryChargeState : uint32_t { enum
269 void SetChargeState(const BatteryChargeState chargeState) in SetChargeState()
349 BatteryChargeState GetChargeState() const in GetChargeState()
452 BatteryChargeState chargeState_ = BatteryChargeState::CHARGE_STATE_BUTT;
Dibattery_srv.h29 virtual BatteryChargeState GetChargingStatus() = 0;
Dbattery_srv_client.h41 BatteryChargeState GetChargingStatus();
/base/powermgr/thermal_manager/test/unittest/src/
Dthermal_mock_action_test.cpp259 if (state == BatteryChargeState::CHARGE_STATE_ENABLE) {
261 } else if (state == BatteryChargeState::CHARGE_STATE_NONE) {
292 if (state == BatteryChargeState::CHARGE_STATE_ENABLE) {
294 } else if (state == BatteryChargeState::CHARGE_STATE_NONE) {
325 if (state == BatteryChargeState::CHARGE_STATE_ENABLE) {
327 } else if (state == BatteryChargeState::CHARGE_STATE_NONE) {
/base/powermgr/battery_manager/services/zidl/src/
Dbattery_srv_proxy.cpp53 BatteryChargeState BatterySrvProxy::GetChargingStatus() in GetChargingStatus()
56 RETURN_IF_WITH_RET(remote == nullptr, BatteryChargeState::CHARGE_STATE_BUTT); in GetChargingStatus()
63 return BatteryChargeState::CHARGE_STATE_BUTT; in GetChargingStatus()
71 return BatteryChargeState::CHARGE_STATE_BUTT; in GetChargingStatus()
73 uint32_t chargingState = static_cast<uint32_t>(BatteryChargeState::CHARGE_STATE_BUTT); in GetChargingStatus()
74 READ_PARCEL_WITH_RET(reply, Uint32, chargingState, BatteryChargeState::CHARGE_STATE_BUTT); in GetChargingStatus()
75 return static_cast<BatteryChargeState>(chargingState); in GetChargingStatus()
/base/powermgr/battery_lite/frameworks/js/builtin/include/
Dbattery_impl.h28 BatteryChargeState GetChargingStatusImpl(void);
/base/powermgr/battery_lite/frameworks/js/builtin/src/
Dbattery_impl.c24 BatteryChargeState GetChargingStatusImpl(void) in GetChargingStatusImpl()
/base/powermgr/battery_manager/charger/src/
Dbattery_led.cpp81 if ((chargeState == static_cast<int32_t>(BatteryChargeState::CHARGE_STATE_NONE)) || in UpdateColor()
82 … (chargeState == static_cast<int32_t>(BatteryChargeState::CHARGE_STATE_RESERVED)) || !available_) { in UpdateColor()
/base/powermgr/battery_lite/frameworks/native/include/
Dbatterymgr_intf_define.h28 BatteryChargeState (*GetChargingStatusFunc)(IUnknown *iUnknown); \
/base/powermgr/battery_manager/frameworks/native/src/
Dbattery_srv_client.cpp95 BatteryChargeState BatterySrvClient::GetChargingStatus() in GetChargingStatus()
97 BatteryChargeState chargingState = BatteryChargeState::CHARGE_STATE_BUTT; in GetChargingStatus()
/base/powermgr/battery_lite/services/src/
Dbattery_manage_feature.c57 BatteryChargeState ChargingStatusImpl(IUnknown *iUnknown) in ChargingStatusImpl()
59 BatteryChargeState chargingstate = CHARGE_STATE_BUTT; in ChargingStatusImpl()
/base/powermgr/battery_lite/frameworks/native/src/mini/
Dbattery_framework.c57 BatteryChargeState GetChargingStatus(void) in GetChargingStatus()
59 BatteryChargeState state = CHARGE_STATE_NONE; in GetChargingStatus()

12