DeviceBatteryResourceMetricCollector

public class DeviceBatteryResourceMetricCollector
extends Object implements IResourceMetricCollector

java.lang.Object
   ↳ com.android.tradefed.monitoring.collector.DeviceBatteryResourceMetricCollector


This collector collects device battery metrics. It issues adb shell commands and parse the response, the metrics include status, health, level, scale and temperature.

Summary

Constants

float BATTERY_TEMP_DENOMINATOR

Fields

public static final String BATTERY_CMD

public static final Pattern BATTERY_PATTERN

public static final String BATTERY_RESOURCE_NAME

public static final String FIELD_GROUP

public static final String TEMPERATURE

public static final String VALUE_GROUP

Public constructors

DeviceBatteryResourceMetricCollector()

Public methods

getDeviceResourceMetrics(DeviceDescriptor descriptor, IDeviceManager deviceManager)

Gets device battery state.

Constants

BATTERY_TEMP_DENOMINATOR

public static final float BATTERY_TEMP_DENOMINATOR

Constant Value: 10.0

Fields

BATTERY_CMD

public static final String BATTERY_CMD

BATTERY_PATTERN

public static final Pattern BATTERY_PATTERN

BATTERY_RESOURCE_NAME

public static final String BATTERY_RESOURCE_NAME

FIELD_GROUP

public static final String FIELD_GROUP

TEMPERATURE

public static final String TEMPERATURE

VALUE_GROUP

public static final String VALUE_GROUP

Public constructors

DeviceBatteryResourceMetricCollector

public DeviceBatteryResourceMetricCollector ()

Public methods

getDeviceResourceMetrics

public  getDeviceResourceMetrics (DeviceDescriptor descriptor, 
                IDeviceManager deviceManager)

Gets device battery state.

Parameters
descriptor DeviceDescriptor: the DeviceDescriptor about the metricizing device.

deviceManager IDeviceManager: the IDeviceManager instance.

Returns
a ERROR(/Collection) of device Resource.