Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetermineHardwareStatus ¶
func DetermineHardwareStatus(ctx context.Context, fullChargeCapacity float64, fullChargeCapacityDesigned float64) tlw.HardwareState
DetermineHardwareStatus determines the battery hardwareState based on the charging capacity of the DUT's battery.
The logic for determining hardware state based on:
if capacity >= 70% then NORMAL if capacity >= 40% then ACCEPTABLE if capacity < 40% then NEED_REPLACEMENT
func ReadBatteryInfo ¶
ReadBatteryInfo reads battery related information from the powerSupplyInfo struct in the power package and assign value to each of the field for the batteryInfo struct. returns an error when it cannot read related battery information.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.