This **wifiext** module provides WLAN extension interfaces for non-universal products.
> **NOTE**
>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
The APIs described in this document are used only for non-universal products, such as routers.
| boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md).
| **Type**| **Description**|
| -------- | -------- |
| 2701000 | Operation failed.|
## wifiext.getSupportedPowerModel
...
...
@@ -59,10 +60,17 @@ Obtains the supported power models. This API uses a promise to return the result
**Return value**
| Type| Description|
| -------- | -------- |
| Promise<Array<[PowerModel](#powermodel)>> | Promise used to return the power models obtained.|
| Type| Description|
| -------- | -------- |
| Promise<Array<[PowerModel](#powermodel)>> | Promise used to return the power models obtained.|
**Error codes**
For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md).
| **Type**| **Description**|
| -------- | -------- |
| 2701000 | Operation failed.|
## PowerModel
...
...
@@ -89,10 +97,17 @@ Obtains the supported power models. This API uses an asynchronous callback to re
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<Array<[PowerModel](#powermodel)>> | Yes| Callback invoked to return the result. If the operation is successful, **err** is 0 and **data** is the power models obtained. If **err** is not **0**, an error has occurred.|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<Array<[PowerModel](#powermodel)>> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the power models obtained. If **err** is not **0**, an error has occurred.|
**Error codes**
For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md).
| **Type**| **Description**|
| -------- | -------- |
| 2701000 | Operation failed.|
## wifiext.getPowerModel
...
...
@@ -106,10 +121,17 @@ Obtains the power model. This API uses a promise to return the result.
**Return value**
| Type| Description|
| -------- | -------- |
| Promise<[PowerModel](#powermodel)> | Promise used to return the power model obtained.|
| Type| Description|
| -------- | -------- |
| Promise<[PowerModel](#powermodel)> | Promise used to return the power models obtained.|
**Error codes**
For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md).
| **Type**| **Description**|
| -------- | -------- |
| 2701000 | Operation failed.|
## wifiext.getPowerModel
...
...
@@ -123,16 +145,23 @@ Obtains the power model. This API uses an asynchronous callback to return the re
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<[PowerModel](#powermodel)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the power model obtained. If **err** is not **0**, an error has occurred.|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<[PowerModel](#powermodel)> | Yes| Callback invoked to return the result. If the operation is successful, **err** is **0** and **data** is the power model obtained. If **err** is not **0**, an error has occurred.|
**Error codes**
For details about the error codes, see [Wi-Fi Error Codes](../errorcodes/errorcode-wifi.md).