Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
DeviceWifiResourceMetricCollector
public
class
DeviceWifiResourceMetricCollector
extends Object
implements
IResourceMetricCollector
java.lang.Object
|
↳ |
com.android.tradefed.monitoring.collector.DeviceWifiResourceMetricCollector
|
The collector collects current connected wifi signal strength and link speed metrics.
Summary
Fields
NOISE
public static final String NOISE
public static final String RSSI
SPEED
public static final String SPEED
SSID
public static final String SSID
WIFI_METRIC_NAME
public static final String WIFI_METRIC_NAME
WIFI_SIGNAL_CMD
public static final String WIFI_SIGNAL_CMD
WIFI_SIGNAL_PATTERN
public static final Pattern WIFI_SIGNAL_PATTERN
WIFI_STATUS_CMD
public static final String WIFI_STATUS_CMD
WIFI_STATUS_PATTERN
public static final Pattern WIFI_STATUS_PATTERN
Public constructors
DeviceWifiResourceMetricCollector
public DeviceWifiResourceMetricCollector ()
Public methods
getDeviceResourceMetrics
public getDeviceResourceMetrics (DeviceDescriptor descriptor,
IDeviceManager deviceManager)
Issues adb shell command and parses the WiFi metrics.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2022-08-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-08-03 UTC."],[],[],null,["# DeviceWifiResourceMetricCollector\n=================================\n\n\n`\npublic\n\n\nclass\nDeviceWifiResourceMetricCollector\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\nimplements\n\n`[IResourceMetricCollector](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/IResourceMetricCollector.html)`\n\n\n`\n\n|---|-----------------------------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.monitoring.collector.DeviceWifiResourceMetricCollector |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThe collector collects current connected wifi signal strength and link speed metrics.\n\nSummary\n-------\n\n| ### Fields ||\n|--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` public static final String` | [NOISE](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/DeviceWifiResourceMetricCollector.html#NOISE) |\n| ` public static final String` | [RSSI](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/DeviceWifiResourceMetricCollector.html#RSSI) |\n| ` public static final String` | [SPEED](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/DeviceWifiResourceMetricCollector.html#SPEED) |\n| ` public static final String` | [SSID](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/DeviceWifiResourceMetricCollector.html#SSID) |\n| ` public static final String` | [WIFI_METRIC_NAME](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/DeviceWifiResourceMetricCollector.html#WIFI_METRIC_NAME) |\n| ` public static final String` | [WIFI_SIGNAL_CMD](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/DeviceWifiResourceMetricCollector.html#WIFI_SIGNAL_CMD) |\n| ` public static final Pattern` | [WIFI_SIGNAL_PATTERN](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/DeviceWifiResourceMetricCollector.html#WIFI_SIGNAL_PATTERN) |\n| ` public static final String` | [WIFI_STATUS_CMD](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/DeviceWifiResourceMetricCollector.html#WIFI_STATUS_CMD) |\n| ` public static final Pattern` | [WIFI_STATUS_PATTERN](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/DeviceWifiResourceMetricCollector.html#WIFI_STATUS_PATTERN) |\n\n| ### Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[DeviceWifiResourceMetricCollector](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/DeviceWifiResourceMetricCollector.html#DeviceWifiResourceMetricCollector())`() ` |\n\n| ### Public methods ||\n|-----|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` ` | ` `[getDeviceResourceMetrics](../../../../../../../reference/tradefed/com/android/tradefed/monitoring/collector/DeviceWifiResourceMetricCollector.html#getDeviceResourceMetrics(com.android.tradefed.command.remote.DeviceDescriptor,%20com.android.tradefed.device.IDeviceManager))`(DeviceDescriptor descriptor, `[IDeviceManager](../../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceManager.html)` deviceManager) ` Issues adb shell command and parses the WiFi metrics. |\n\nFields\n------\n\n### NOISE\n\n```\npublic static final String NOISE\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### RSSI\n\n```\npublic static final String RSSI\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### SPEED\n\n```\npublic static final String SPEED\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### SSID\n\n```\npublic static final String SSID\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### WIFI_METRIC_NAME\n\n```\npublic static final String WIFI_METRIC_NAME\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### WIFI_SIGNAL_CMD\n\n```\npublic static final String WIFI_SIGNAL_CMD\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### WIFI_SIGNAL_PATTERN\n\n```\npublic static final Pattern WIFI_SIGNAL_PATTERN\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### WIFI_STATUS_CMD\n\n```\npublic static final String WIFI_STATUS_CMD\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### WIFI_STATUS_PATTERN\n\n```\npublic static final Pattern WIFI_STATUS_PATTERN\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic constructors\n-------------------\n\n### DeviceWifiResourceMetricCollector\n\n```\npublic DeviceWifiResourceMetricCollector ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### getDeviceResourceMetrics\n\n```\npublic getDeviceResourceMetrics (DeviceDescriptor descriptor, \n ../../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceManager.html deviceManager)\n```\n\nIssues adb shell command and parses the WiFi metrics.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `descriptor` | `DeviceDescriptor`: the [DeviceDescriptor](../../../../../../../reference/tradefed/com/android/tradefed/command/remote/DeviceDescriptor.html) about the metricizing device. \u003cbr /\u003e |\n| `deviceManager` | `IDeviceManager`: the [IDeviceManager](../../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceManager.html) instance. \u003cbr /\u003e |\n\n| Returns ||\n|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | a [ERROR(/Collection)](../../../../../../../) of device [Resource](../../../../../../../reference/tradefed/com/google/dualhomelab/monitoringagent/resourcemonitoring/Resource.html). \u003cbr /\u003e |"]]