【USB】-401参数异常整改

Signed-off-by: 魏兴凯 <weixingkai@huawei.com>
This commit is contained in:
魏兴凯 2024-04-29 15:05:38 +08:00
parent 1cb6ca87eb
commit b11cae20e8

View File

@ -38,9 +38,11 @@ declare namespace usbManager {
/**
* Connects to the USB device based on the device information returned by getDevices().
*
* @param { USBDevice } device - USB device on the device list returned by getDevices().
* @param { USBDevice } device - USB device on the device list returned by getDevices(). It cannot be empty.
* @returns { Readonly<USBDevicePipe> } object for data transfer.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @throws { BusinessError } 14400001 - Permission denied. Need call requestRight to get permission.
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -50,9 +52,11 @@ declare namespace usbManager {
/**
* Checks whether the application has the permission to access the device.
*
* @param { string } deviceName - device name defined by USBDevice.name.
* @param { string } deviceName - device name defined by USBDevice.name. It cannot be empty.
* @returns { boolean } indicates if the user has the permission to access the device.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @since 9
*/
@ -62,9 +66,11 @@ declare namespace usbManager {
* Requests the permission for a given application to access the USB device.
* The system application has access to the device by default, and there is no need to call this interface to apply.
*
* @param { string } deviceName - device name defined by USBDevice.name.
* @param { string } deviceName - device name defined by USBDevice.name. It cannot be empty.
* @returns { Promise<boolean> } indicates if the device access permissions are granted.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @since 9
*/
@ -74,9 +80,11 @@ declare namespace usbManager {
* Remove the permission for a given application to access the USB device.
* The system application has access to the device by default, and calling this interface will not have any impact.
*
* @param { string } deviceName - device name defined by USBDevice.name.
* @param { string } deviceName - device name defined by USBDevice.name. It cannot be empty.
* @returns { boolean } indicates if the device access permissions are removed.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @since 9
*/
@ -86,10 +94,12 @@ declare namespace usbManager {
* Add device access permission.
* The system application has access to the device by default, and calling this interface will not have any impact.
*
* @param { string } bundleName - refers to application that require access permissions.
* @param { string } deviceName - device name defined by USBDevice.name.
* @param { string } bundleName - refers to application that require access permissions. It cannot be empty.
* @param { string } deviceName - device name defined by USBDevice.name. It cannot be empty.
* @returns { boolean } value to indicate whether the permission is granted.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @systemapi
* @since 9
@ -101,9 +111,11 @@ declare namespace usbManager {
/**
* Converts the string descriptor of a given USB function list to a numeric mask combination.
*
* @param { string } funcs - descriptor of the supported function list.
* @param { string } funcs - descriptor of the supported function list. It cannot be empty.
* @returns { number } the numeric mask combination of the function list.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @systemapi
* @since 9
@ -115,9 +127,11 @@ declare namespace usbManager {
/**
* Converts the numeric mask combination of a given USB function list to a string descriptor.
*
* @param { FunctionType } funcs - numeric mask combination of the function list.
* @param { FunctionType } funcs - numeric mask combination of the function list. The type of funcs must be number. It cannot be empty.
* @returns { string } - descriptor of the supported function list.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @systemapi
* @since 9
@ -129,9 +143,11 @@ declare namespace usbManager {
/**
* Sets the current USB function list in Device mode.
*
* @param { FunctionType } funcs - numeric mask combination of the supported function list.
* @param { FunctionType } funcs - numeric mask combination of the supported function list. It cannot be empty.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @throws { BusinessError } 14400002 - Permission denied.The HDC is disabled by the system.
* @syscap SystemCapability.USB.USBManager
* @systemapi
@ -169,9 +185,11 @@ declare namespace usbManager {
/**
* Gets the mask combination for the supported mode list of the specified USBPort.
*
* @param { number } portId
* @param { number } portId - unique ID of the port. It cannot be empty.
* @returns { PortModeType } the mask combination for the supported mode list in PortModeType.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @systemapi
* @since 9
@ -183,11 +201,13 @@ declare namespace usbManager {
/**
* Sets the role types supported by the specified USBPort, which can be powerRole (for charging) and dataRole (for data transfer).
*
* @param { number } portId - unique ID of the port.
* @param { PowerRoleType } powerRole - charging role.
* @param { DataRoleType } dataRole - data role.
* @param { number } portId - unique ID of the port. It cannot be empty.
* @param { PowerRoleType } powerRole - charging role. It cannot be empty.
* @param { DataRoleType } dataRole - data role. It cannot be empty.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @systemapi
* @since 9
@ -201,11 +221,13 @@ declare namespace usbManager {
* The system application has access to the device by default, and calling this interface will not have any impact.
*
* @permission ohos.permission.MANAGE_USB_CONFIG
* @param { string } tokenId - refers to application that require access permissions.
* @param { string } deviceName - device name defined by USBDevice.name.
* @param { string } tokenId - refers to application that require access permissions. It cannot be empty.
* @param { string } deviceName - device name defined by USBDevice.name. It cannot be empty.
* @returns { boolean } value to indicate whether the permission is granted.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 202 - Permission denied.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @throws { BusinessError } 202 - Permission denied. Normal application do not have permission to use system api.
* @syscap SystemCapability.USB.USBManager
* @systemapi
* @since 12
@ -216,10 +238,10 @@ declare namespace usbManager {
* Converts the string descriptor of a given USB function list to a numeric mask combination.
*
* @permission ohos.permission.MANAGE_USB_CONFIG
* @param { string } funcs - descriptor of the supported function list.
* @param { string } funcs - descriptor of the supported function list. It cannot be empty.
* @returns { number } the numeric mask combination of the function list.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 202 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. No parameters are required.
* @throws { BusinessError } 202 - Permission denied. Normal application do not have permission to use system api.
* @syscap SystemCapability.USB.USBManager
* @systemapi
* @since 12
@ -230,10 +252,12 @@ declare namespace usbManager {
* Converts the numeric mask combination of a given USB function list to a string descriptor.
*
* @permission ohos.permission.MANAGE_USB_CONFIG
* @param { FunctionType } funcs - numeric mask combination of the function list.
* @param { FunctionType } funcs - numeric mask combination of the function list. It cannot be empty.
* @returns { string } - descriptor of the supported function list.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 202 - Permission denied.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @throws { BusinessError } 202 - Permission denied. Normal application do not have permission to use system api.
* @syscap SystemCapability.USB.USBManager
* @systemapi
* @since 12
@ -244,10 +268,12 @@ declare namespace usbManager {
* Sets the current USB function list in Device mode.
*
* @permission ohos.permission.MANAGE_USB_CONFIG
* @param { FunctionType } funcs - numeric mask combination of the supported function list.
* @param { FunctionType } funcs - numeric mask combination of the supported function list. It cannot be empty.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 202 - Permission denied.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @throws { BusinessError } 202 - Permission denied. Normal application do not have permission to use system api.
* @syscap SystemCapability.USB.USBManager
* @systemapi
* @since 12
@ -259,7 +285,7 @@ declare namespace usbManager {
*
* @permission ohos.permission.MANAGE_USB_CONFIG
* @returns { FunctionType } the numeric mask combination for the current USB function list in FunctionType.
* @throws { BusinessError } 202 - Permission denied.
* @throws { BusinessError } 202 - Permission denied. Normal application do not have permission to use system api.
* @syscap SystemCapability.USB.USBManager
* @systemapi
* @since 12
@ -272,7 +298,7 @@ declare namespace usbManager {
*
* @permission ohos.permission.MANAGE_USB_CONFIG
* @returns { Array<USBPort> } the USBPort list.
* @throws { BusinessError } 202 - Permission denied.
* @throws { BusinessError } 202 - Permission denied. Normal application do not have permission to use system api.
* @syscap SystemCapability.USB.USBManager
* @systemapi
* @since 12
@ -283,10 +309,12 @@ declare namespace usbManager {
* Gets the mask combination for the supported mode list of the specified USBPort.
*
* @permission ohos.permission.MANAGE_USB_CONFIG
* @param { number } portId
* @param { number } portId - unique ID of the port. It cannot be empty.
* @returns { PortModeType } the mask combination for the supported mode list in PortModeType.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 202 - Permission denied.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @throws { BusinessError } 202 - Permission denied. Normal application do not have permission to use system api.
* @syscap SystemCapability.USB.USBManager
* @systemapi
* @since 12
@ -297,12 +325,14 @@ declare namespace usbManager {
* Sets the role types supported by the specified USBPort, which can be powerRole (for charging) and dataRole (for data transfer).
*
* @permission ohos.permission.MANAGE_USB_CONFIG
* @param { number } portId - unique ID of the port.
* @param { PowerRoleType } powerRole - charging role.
* @param { DataRoleType } dataRole - data role.
* @param { number } portId - unique ID of the port. It cannot be empty.
* @param { PowerRoleType } powerRole - charging role. It cannot be empty.
* @param { DataRoleType } dataRole - data role. It cannot be empty.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 202 - Permission denied.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @throws { BusinessError } 202 - Permission denied. Normal application do not have permission to use system api.
* @syscap SystemCapability.USB.USBManager
* @systemapi
* @since 12
@ -313,11 +343,13 @@ declare namespace usbManager {
/**
* Claims a USB interface.
*
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the bus number and device address.
* @param { USBInterface } iface - USB interface, which is used to determine the interface to claim.
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the bus number and device address. It cannot be empty.
* @param { USBInterface } iface - USB interface, which is used to determine the interface to claim. It cannot be empty.
* @param { boolean } [force] - optional parameter that determines whether to forcibly claim the USB interface.
* @returns { number } returns **0** if the USB interface is successfully claimed; returns an error code otherwise.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @since 9
*/
@ -326,8 +358,8 @@ declare namespace usbManager {
/**
* Releases a USB interface.
*
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the bus number and device address.
* @param { USBInterface } iface - USB interface, which is used to determine the interface to release.
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the bus number and device address. It cannot be empty.
* @param { USBInterface } iface - USB interface, which is used to determine the interface to release. It cannot be empty.
* @returns { number } returns **0** if the USB interface is successfully released; returns an error code otherwise.
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -337,10 +369,12 @@ declare namespace usbManager {
/**
* Sets the device configuration.
*
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the bus number and device address.
* @param { USBConfiguration } config - device configuration.
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the bus number and device address. It cannot be empty.
* @param { USBConfiguration } config - device configuration. It cannot be empty.
* @returns { number } returns **0** if the device configuration is successfully set; returns an error code otherwise.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @since 9
*/
@ -349,10 +383,12 @@ declare namespace usbManager {
/**
* Sets a USB interface.
*
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the bus number and device address.
* @param { USBInterface } iface - USB interface, which is used to determine the interface to set.
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the bus number and device address. It cannot be empty.
* @param { USBInterface } iface - USB interface, which is used to determine the interface to set. It cannot be empty.
* @returns { number } returns **0** if the USB interface is successfully set; return an error code otherwise.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @since 9
*/
@ -361,9 +397,11 @@ declare namespace usbManager {
/**
* Obtains the raw USB descriptor.
*
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the bus number and device address.
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the bus number and device address. It cannot be empty.
* @returns { Uint8Array } returns the raw descriptor data.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @since 9
*/
@ -372,9 +410,11 @@ declare namespace usbManager {
/**
* Obtains the file descriptor.
*
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the USB device.
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the USB device. It cannot be empty.
* @returns { number } returns the file descriptor of the USB device.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @since 9
*/
@ -383,12 +423,14 @@ declare namespace usbManager {
/**
* Performs control transfer.
*
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the USB device.
* @param { USBControlParams } controlparam - control transfer parameters.
* @param { number } [timeout] - timeout duration. This parameter is optional. The default value is **0**, indicating no timeout.
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the USB device. It cannot be empty.
* @param { USBControlParams } controlparam - control transfer parameters. It cannot be empty.
* @param { number } [timeout] - timeout duration. This parameter is optional. The default value is **0**, indicating no timeout.
* @returns { Promise<number> } returns the size of the transmitted or received data block if the control transfer is successful;
* return -1 if an exception occurs.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @since 9
*/
@ -397,13 +439,15 @@ declare namespace usbManager {
/**
* Performs bulk transfer.
*
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the USB device.
* @param { USBEndpoint } endpoint - USB endpoint, which is used to determine the USB port for data transfer.
* @param { Uint8Array } buffer - buffer for writing or reading data.
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the USB device. It cannot be empty.
* @param { USBEndpoint } endpoint - USB endpoint, which is used to determine the USB port for data transfer. It cannot be empty.
* @param { Uint8Array } buffer - buffer for writing or reading data. It cannot be empty.
* @param { number } [timeout] - timeout duration. This parameter is optional. The default value is **0**, indicating no timeout.
* @returns { Promise<number> } the size of the transmitted or received data block if the control transfer is successful;
* return -1 if an exception occurs.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @since 9
*/
@ -417,9 +461,11 @@ declare namespace usbManager {
/**
* Closes a USB device pipe.
*
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the USB device.
* @param { USBDevicePipe } pipe - device pipe, which is used to determine the USB device. It cannot be empty.
* @returns { number } returns **0** if the USB device pipe is closed successfully; return an error code otherwise.
* @throws { BusinessError } 401 - The parameter types do not match or parameter is not specified.
* @throws { BusinessError } 401 - Parameter error.Possible causes:
* <br>1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @syscap SystemCapability.USB.USBManager
* @since 9
*/
@ -434,7 +480,7 @@ declare namespace usbManager {
*/
interface USBEndpoint {
/**
* Endpoint address
* Endpoint address. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -442,7 +488,7 @@ declare namespace usbManager {
address: number;
/**
* Endpoint attributes
* Endpoint attributes. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -450,7 +496,7 @@ declare namespace usbManager {
attributes: number;
/**
* Endpoint interval
* Endpoint interval. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -458,7 +504,7 @@ declare namespace usbManager {
interval: number;
/**
* Maximum size of data packets on the endpoint
* Maximum size of data packets on the endpoint. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -466,7 +512,7 @@ declare namespace usbManager {
maxPacketSize: number;
/**
* Endpoint direction
* Endpoint direction. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -474,7 +520,7 @@ declare namespace usbManager {
direction: USBRequestDirection;
/**
* Endpoint number
* Endpoint number. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -482,7 +528,7 @@ declare namespace usbManager {
number: number;
/**
* Endpoint type
* Endpoint type. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -490,7 +536,7 @@ declare namespace usbManager {
type: number;
/**
* Unique ID defined by USBInterface.id, which indicates the interface to which the endpoint belongs
* Unique ID defined by USBInterface.id, which indicates the interface to which the endpoint belongs. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -507,7 +553,7 @@ declare namespace usbManager {
*/
interface USBInterface {
/**
* Unique ID of the USB interface
* Unique ID of the USB interface. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -515,7 +561,7 @@ declare namespace usbManager {
id: number;
/**
* Interface protocol
* Interface protocol. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -523,7 +569,7 @@ declare namespace usbManager {
protocol: number;
/**
* Device type
* Device type. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -531,7 +577,7 @@ declare namespace usbManager {
clazz: number;
/**
* Device subclass
* Device subclass. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -539,7 +585,7 @@ declare namespace usbManager {
subClass: number;
/**
* Alternation between descriptors of the same USB interface
* Alternation between descriptors of the same USB interface. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -547,7 +593,7 @@ declare namespace usbManager {
alternateSetting: number;
/**
* Interface name
* Interface name. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -555,7 +601,7 @@ declare namespace usbManager {
name: string;
/**
* USBEndpoint that belongs to the USB interface
* USBEndpoint that belongs to the USB interface. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -572,7 +618,7 @@ declare namespace usbManager {
*/
interface USBConfiguration {
/**
* Unique ID of the USB configuration
* Unique ID of the USB configuration. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -580,7 +626,7 @@ declare namespace usbManager {
id: number;
/**
* Configuration attributes
* Configuration attributes. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -588,7 +634,7 @@ declare namespace usbManager {
attributes: number;
/**
* Maximum power consumption, in mA
* Maximum power consumption, in mA. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -596,7 +642,7 @@ declare namespace usbManager {
maxPower: number;
/**
* Configuration name, which can be left empty
* Configuration name, which can be left empty. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -604,7 +650,7 @@ declare namespace usbManager {
name: string;
/**
* Support for remote wakeup
* Support for remote wakeup. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -612,7 +658,7 @@ declare namespace usbManager {
isRemoteWakeup: boolean;
/**
* Support for independent power supplies
* Support for independent power supplies. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -620,7 +666,7 @@ declare namespace usbManager {
isSelfPowered: boolean;
/**
* Supported interface attributes
* Supported interface attributes. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -637,7 +683,7 @@ declare namespace usbManager {
*/
interface USBDevice {
/**
* Bus address
* Bus address. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -645,7 +691,7 @@ declare namespace usbManager {
busNum: number;
/**
* Device address
* Device address. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -653,7 +699,7 @@ declare namespace usbManager {
devAddress: number;
/**
* Device SN
* Device SN. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -661,7 +707,7 @@ declare namespace usbManager {
serial: string;
/**
* Device name
* Device name. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -669,7 +715,7 @@ declare namespace usbManager {
name: string;
/**
* Device manufacturer
* Device manufacturer. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -677,7 +723,7 @@ declare namespace usbManager {
manufacturerName: string;
/**
* Product information
* Product information. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -685,7 +731,7 @@ declare namespace usbManager {
productName: string;
/**
* Product version
* Product version. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -693,7 +739,7 @@ declare namespace usbManager {
version: string;
/**
* Vendor ID
* Vendor ID. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -701,7 +747,7 @@ declare namespace usbManager {
vendorId: number;
/**
* Product ID
* Product ID. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -709,7 +755,7 @@ declare namespace usbManager {
productId: number;
/**
* Device class
* Device class. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -717,7 +763,7 @@ declare namespace usbManager {
clazz: number;
/**
* Device subclass
* Device subclass. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -725,7 +771,7 @@ declare namespace usbManager {
subClass: number;
/**
* Device protocol code
* Device protocol code. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -733,7 +779,7 @@ declare namespace usbManager {
protocol: number;
/**
* Device configuration descriptor information
* Device configuration descriptor information. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -750,7 +796,7 @@ declare namespace usbManager {
*/
interface USBDevicePipe {
/**
* Bus address.
* Bus address. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -758,7 +804,7 @@ declare namespace usbManager {
busNum: number;
/**
* Device address
* Device address. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -905,7 +951,7 @@ declare namespace usbManager {
*/
interface USBPortStatus {
/**
* USB mode
* USB mode. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @systemapi
@ -914,7 +960,7 @@ declare namespace usbManager {
currentMode: number;
/**
* Power role
* Power role. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @systemapi
@ -923,7 +969,7 @@ declare namespace usbManager {
currentPowerRole: number;
/**
* Data role
* Data role. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @systemapi
@ -942,7 +988,7 @@ declare namespace usbManager {
*/
interface USBPort {
/**
* Unique ID of the USB port
* Unique ID of the USB port. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @systemapi
@ -951,7 +997,7 @@ declare namespace usbManager {
id: number;
/**
* Mask combination for the supported mode list of the USB port
* Mask combination for the supported mode list of the USB port. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @systemapi
@ -960,7 +1006,7 @@ declare namespace usbManager {
supportedModes: PortModeType;
/**
* USB port role
* USB port role. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @systemapi
@ -978,7 +1024,7 @@ declare namespace usbManager {
*/
interface USBControlParams {
/**
* Request type
* Request type. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -986,7 +1032,7 @@ declare namespace usbManager {
request: number;
/**
* Request target type
* Request target type. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -994,7 +1040,7 @@ declare namespace usbManager {
target: USBRequestTargetType;
/**
* Control request type
* Control request type. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -1002,7 +1048,7 @@ declare namespace usbManager {
reqType: USBControlRequestType;
/**
* Request parameter value
* Request parameter value. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -1010,7 +1056,7 @@ declare namespace usbManager {
value: number;
/**
* Index of the parameter value
* Index of the parameter value. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9
@ -1018,7 +1064,7 @@ declare namespace usbManager {
index: number;
/**
* Data written to or read from the buffer
* Data written to or read from the buffer. It cannot be empty.
*
* @syscap SystemCapability.USB.USBManager
* @since 9