From 7273d6378d98568c8b1e9e47fc12537a060ecbc5 Mon Sep 17 00:00:00 2001 From: shawn_he Date: Sat, 28 Jan 2023 16:11:12 +0800 Subject: [PATCH] update doc Signed-off-by: shawn_he --- .../figures/IPC_RPC_communication.PNG | Bin 0 -> 13543 bytes en/application-dev/device/usb-guidelines.md | 58 ++++++------ .../reference/apis/js-apis-inputevent.md | 2 + .../reference/apis/js-apis-inputmonitor.md | 3 +- .../reference/apis/js-apis-keycode.md | 2 + .../reference/apis/js-apis-keyevent.md | 6 ++ .../reference/apis/js-apis-mouseevent.md | 10 +++ .../reference/apis/js-apis-power.md | 5 +- .../reference/apis/js-apis-runninglock.md | 7 ++ .../reference/apis/js-apis-sim.md | 40 ++++----- .../reference/apis/js-apis-thermal.md | 3 + .../reference/apis/js-apis-touchevent.md | 10 +++ .../reference/apis/js-apis-usb-deprecated.md | 10 +-- .../reference/apis/js-apis-usb.md | 10 +-- .../subsystems/subsys-dfx-hisysevent-tool.md | 84 ++++++++++++------ 15 files changed, 160 insertions(+), 90 deletions(-) create mode 100644 en/application-dev/connectivity/figures/IPC_RPC_communication.PNG diff --git a/en/application-dev/connectivity/figures/IPC_RPC_communication.PNG b/en/application-dev/connectivity/figures/IPC_RPC_communication.PNG new file mode 100644 index 0000000000000000000000000000000000000000..63f193ade7b3932279295641a5612bc5720befef GIT binary patch literal 13543 zcmdtJcT|(zyCxhEY0?x>loBi;ML@cAq)L+-P(qOxkxoE*2}PPxeMO{6FVX@?N$61! zBOoPoh!6qky@VDL=HZ<=XPq-^e)D~2&HOcguvpp8uFt*qzOU=P?&posV{JzI8}uL$ zh*9T}h6xBn$pQjVJfWoqN+{>M*nxi(-X_{=psIeZ72pSz<3odoAkgRJOQ&`hf!}nV zkDhviKuq7x|0q(0nK(fpsSq8Fhh_mb8`GCOxkj_McF=A$(f4|HE=9WQJiD%tz8%`l zoD=c()w;Pz14T!STe-}o^tRqA^|)Ve&8B}r=>)g0TtS92rv9mY%NS*}K4VbZC9F7i zH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en/application-dev/device/usb-guidelines.md b/en/application-dev/device/usb-guidelines.md index 14a7901232..64eee37cf1 100644 --- a/en/application-dev/device/usb-guidelines.md +++ b/en/application-dev/device/usb-guidelines.md @@ -20,13 +20,13 @@ The following table lists the USB APIs currently available. For details, see the | getDevices(): Array> | Obtains the list of USB devices connected to the USB host. If no USB device is connected, an empty list is returned. | | setConfiguration(pipe: USBDevicePipe, config: USBConfig): number | Sets the USB device configuration. | | setInterface(pipe: USBDevicePipe, iface: USBInterface): number | Sets a USB interface. | -| claimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): number | Claims a USB interface. | -| bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, timeout?: number): Promise\ | Performs bulk transfer. | +| claimInterface(pipe: USBDevicePipe, iface: USBInterface, force ?: boolean): number | Claims a USB interface. | +| bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, timeout ?: number): Promise\ | Performs bulk transfer. | | closePipe(pipe: USBDevicePipe): number | Closes a USB device pipe. | | releaseInterface(pipe: USBDevicePipe, iface: USBInterface): number | Releases a USB interface. | | getFileDescriptor(pipe: USBDevicePipe): number | Obtains the file descriptor. | | getRawDescriptor(pipe: USBDevicePipe): Uint8Array | Obtains the raw USB descriptor. | -| controlTransfer(pipe: USBDevicePipe, contrlparam: USBControlParams, timeout?: number): Promise\ | Performs control transfer. | +| controlTransfer(pipe: USBDevicePipe, contrlparam: USBControlParams, timeout ?: number): Promise\ | Performs control transfer. | ## How to Develop @@ -51,7 +51,7 @@ You can set a USB device as the USB host to connect to other USB devices for dat vendorId: 7531, productId: 2, clazz: 9, - subclass: 0, + subClass: 0, protocol: 1, devAddress: 1, busNum: 1, @@ -68,7 +68,7 @@ You can set a USB device as the USB host to connect to other USB devices for dat id: 0, protocol: 0, clazz: 9, - subclass: 0, + subClass: 0, alternateSetting: 0, name: "1-1", endpoints: [ @@ -108,7 +108,7 @@ You can set a USB device as the USB host to connect to other USB devices for dat ```js // Open the device, and obtain the USB device pipe for data transfer. - let pipe = usb.connectDevice(deviceList[0]); + let interface1 = deviceList[0].configs[0].interfaces[0]; /* Claim the corresponding interface from deviceList. interface1 must be one present in the device configuration. @@ -123,28 +123,30 @@ You can set a USB device as the USB host to connect to other USB devices for dat Read data. Select the corresponding RX endpoint from deviceList for data transfer. (endpoint.direction == 0x80); dataUint8Array indicates the data to read. The data type is Uint8Array. */ - - usb.bulkTransfer(pipe, inEndpoint, dataUint8Array, 15000).then(dataLength => { - if (dataLength >= 0) { - console.info("usb readData result Length : " + dataLength); - let resultStr = this.ab2str(dataUint8Array); // Convert uint8 data into a string. - console.info("usb readData buffer : " + resultStr); - } else { - console.info("usb readData failed : " + dataLength); - } - }).catch(error => { - console.info("usb readData error : " + JSON.stringify(error)); - }); - // Send data. Select the corresponding TX endpoint from deviceList for data transfer. (endpoint.direction == 0) - usb.bulkTransfer(pipe, endpoint, dataUint8Array, 15000).then(dataLength => { - if (dataLength >= 0) { - console.info("usb writeData result write length : " + dataLength); - } else { - console.info("writeData failed"); - } - }).catch(error => { - console.info("usb writeData error : " + JSON.stringify(error)); - }); + let inEndpoint = interface1.endpoints[2]; + let outEndpoint = interface1.endpoints[1]; + let dataUint8Array = new Uint8Array(1024); + usb.bulkTransfer(pipe, inEndpoint, dataUint8Array, 15000).then(dataLength => { + if (dataLength >= 0) { + console.info("usb readData result Length : " + dataLength); + let resultStr = this.ab2str(dataUint8Array); // Convert uint8 data into a string. + console.info("usb readData buffer : " + resultStr); + } else { + console.info("usb readData failed : " + dataLength); + } + }).catch(error => { + console.info("usb readData error : " + JSON.stringify(error)); + }); + // Send data. Select the corresponding TX endpoint from deviceList for data transfer. (endpoint.direction == 0) + usb.bulkTransfer(pipe, outEndpoint, dataUint8Array, 15000).then(dataLength => { + if (dataLength >= 0) { + console.info("usb writeData result write length : " + dataLength); + } else { + console.info("writeData failed"); + } + }).catch(error => { + console.info("usb writeData error : " + JSON.stringify(error)); + }); ``` 5. Release the USB interface, and close the USB device. diff --git a/en/application-dev/reference/apis/js-apis-inputevent.md b/en/application-dev/reference/apis/js-apis-inputevent.md index d2d55fa57e..d018dd4d9f 100644 --- a/en/application-dev/reference/apis/js-apis-inputevent.md +++ b/en/application-dev/reference/apis/js-apis-inputevent.md @@ -13,6 +13,8 @@ import InputEvent from '@ohos.multimodalInput.inputEvent'; ## InputEvent +Defines an input event. + **System capability**: SystemCapability.MultimodalInput.Input.Core **Parameters** diff --git a/en/application-dev/reference/apis/js-apis-inputmonitor.md b/en/application-dev/reference/apis/js-apis-inputmonitor.md index 304fa76946..d6514f4279 100644 --- a/en/application-dev/reference/apis/js-apis-inputmonitor.md +++ b/en/application-dev/reference/apis/js-apis-inputmonitor.md @@ -203,9 +203,8 @@ try { inputMonitor.on("touch", touchEvent => { if (touchEvent.touches.length == 3) {// Three fingers are pressed. return true; - } else { - return false; } + return false; }); } catch (error) { console.log(`Monitor on failed, error: ${JSON.stringify(error, [`code`, `message`])}`); diff --git a/en/application-dev/reference/apis/js-apis-keycode.md b/en/application-dev/reference/apis/js-apis-keycode.md index e697759426..77aa1fe743 100644 --- a/en/application-dev/reference/apis/js-apis-keycode.md +++ b/en/application-dev/reference/apis/js-apis-keycode.md @@ -14,6 +14,8 @@ import {KeyCode} from '@ohos.multimodalInput.keyCode'; ## KeyCode +Enumerates keycodes. + **System capability**: SystemCapability.MultimodalInput.Input.Core | Name | Value | Description | diff --git a/en/application-dev/reference/apis/js-apis-keyevent.md b/en/application-dev/reference/apis/js-apis-keyevent.md index 32c18a5585..75b857b9fb 100644 --- a/en/application-dev/reference/apis/js-apis-keyevent.md +++ b/en/application-dev/reference/apis/js-apis-keyevent.md @@ -13,6 +13,8 @@ import {Action, Key, KeyEvent} from '@ohos.multimodalInput.keyEvent'; ## Action +Defines a key action. + **System capability**: SystemCapability.MultimodalInput.Input.Core | Name | Value | Description | @@ -23,6 +25,8 @@ import {Action, Key, KeyEvent} from '@ohos.multimodalInput.keyEvent'; ## Key +Defines a key. + **System capability**: SystemCapability.MultimodalInput.Input.Core | Name | Type| Readable| Writable| Description | @@ -33,6 +37,8 @@ import {Action, Key, KeyEvent} from '@ohos.multimodalInput.keyEvent'; ## KeyEvent +Defines a key event. + **System capability**: SystemCapability.MultimodalInput.Input.Core | Name | Type| Readable| Writable| Description | diff --git a/en/application-dev/reference/apis/js-apis-mouseevent.md b/en/application-dev/reference/apis/js-apis-mouseevent.md index 92935d6f31..6ed09f828c 100644 --- a/en/application-dev/reference/apis/js-apis-mouseevent.md +++ b/en/application-dev/reference/apis/js-apis-mouseevent.md @@ -13,6 +13,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp ## Action +Defines a mouse action. + **System capability**: SystemCapability.MultimodalInput.Input.Core | Name | Value| Description | @@ -28,6 +30,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp ## Button +Enumerates mouse actions. + **System capability**: SystemCapability.MultimodalInput.Input.Core | Name | Value | Description | @@ -43,6 +47,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp ## Axis +Enumerates mouse axis types. + **System capability**: SystemCapability.MultimodalInput.Input.Core | Name | Value | Description | @@ -54,6 +60,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp ## AxisValue +Defines a mouse axis type and value. + **System capability**: SystemCapability.MultimodalInput.Input.Core | Name | Type | Readable | Writable | Description | @@ -64,6 +72,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp ## MouseEvent +Defines a mouse event. + **System capability**: SystemCapability.MultimodalInput.Input.Core | Name | Type | Readable | Writable | Description | diff --git a/en/application-dev/reference/apis/js-apis-power.md b/en/application-dev/reference/apis/js-apis-power.md index 4dc07d4419..625f189f87 100644 --- a/en/application-dev/reference/apis/js-apis-power.md +++ b/en/application-dev/reference/apis/js-apis-power.md @@ -87,7 +87,7 @@ try { isActive(): boolean -Checks whether the current device is active. In the active state, the screen is on if the device has a screen and the device is not in sleep state if the device does not have a screen. +Checks whether the current device is active. **System capability:** SystemCapability.PowerManager.PowerManager.Core @@ -292,6 +292,7 @@ power.setPowerMode(power.DevicePowerMode.MODE_PERFORMANCE) rebootDevice(reason: string): void +> NOTE
> This API is deprecated since API version 9. You are advised to use [power.reboot](#powerreboot9) instead. Reboots the system. @@ -316,6 +317,7 @@ power.rebootDevice('reboot_test'); isScreenOn(callback: AsyncCallback<boolean>): void +> NOTE
> This API is deprecated since API version 9. You are advised to use [power.isActive](#powerisactive9) instead. Checks the screen status of the current device. This API uses an asynchronous callback to return the result. @@ -344,6 +346,7 @@ power.isScreenOn((err, data) => { isScreenOn(): Promise<boolean> +> NOTE
> This API is deprecated since API version 9. You are advised to use [power.isActive](#powerisactive9) instead. Checks the screen status of the current device. This API uses a promise to return the result. diff --git a/en/application-dev/reference/apis/js-apis-runninglock.md b/en/application-dev/reference/apis/js-apis-runninglock.md index ee70e09ca8..bddad259f7 100644 --- a/en/application-dev/reference/apis/js-apis-runninglock.md +++ b/en/application-dev/reference/apis/js-apis-runninglock.md @@ -135,6 +135,7 @@ runningLock.create('running_lock_test', runningLock.RunningLockType.BACKGROUND) isRunningLockTypeSupported(type: RunningLockType, callback: AsyncCallback<boolean>): void +> NOTE
> This API is deprecated since API version 9. You are advised to use [runningLock.isSupported](#runninglockissupported9) instead. Checks whether a specified type of **RunningLock** is supported. This API uses an asynchronous callback to return the result. @@ -164,6 +165,7 @@ runningLock.isRunningLockTypeSupported(runningLock.RunningLockType.BACKGROUND, ( isRunningLockTypeSupported(type: RunningLockType): Promise<boolean> +> NOTE
> This API is deprecated since API version 9. You are advised to use [runningLock.isSupported](#runninglockissupported9) instead. Checks whether a specified type of **RunningLock** is supported. This API uses a promise to return the result. @@ -198,6 +200,7 @@ runningLock.isRunningLockTypeSupported(runningLock.RunningLockType.BACKGROUND) createRunningLock(name: string, type: RunningLockType, callback: AsyncCallback<RunningLock>): void +> NOTE
> This API is deprecated since API version 9. You are advised to use [runningLock.create](#runninglockcreate9) instead. Creates a **RunningLock** object. @@ -230,6 +233,7 @@ runningLock.createRunningLock('running_lock_test', runningLock.RunningLockType.B createRunningLock(name: string, type: RunningLockType): Promise<RunningLock> +> NOTE
> This API is deprecated since API version 9. You are advised to use [runningLock.create](#runninglockcreate9) instead. Creates a **RunningLock** object. @@ -389,6 +393,7 @@ runningLock.create('running_lock_test', runningLock.RunningLockType.BACKGROUND) lock(timeout: number): void +> NOTE
> This API is deprecated since API version 9. You are advised to use [RunningLock.hold](#hold9) instead. Locks and holds a **RunningLock** object. @@ -420,6 +425,7 @@ runningLock.createRunningLock('running_lock_test', runningLock.RunningLockType.B unlock(): void +> NOTE
> This API is deprecated since API version 9. You are advised to use [RunningLock.unhold](#unhold9) instead. Releases a **RunningLock** object. @@ -445,6 +451,7 @@ runningLock.createRunningLock('running_lock_test', runningLock.RunningLockType.B isUsed(): boolean +> NOTE
> This API is deprecated since API version 9. You are advised to use [RunningLock.isHolding](#isholding9) instead. Checks the hold status of the **Runninglock** object. diff --git a/en/application-dev/reference/apis/js-apis-sim.md b/en/application-dev/reference/apis/js-apis-sim.md index eb88ca8c05..0c0243c3db 100644 --- a/en/application-dev/reference/apis/js-apis-sim.md +++ b/en/application-dev/reference/apis/js-apis-sim.md @@ -687,7 +687,7 @@ promise.then(data => { }); ``` -## sim.**setShowName**8+ +## sim.setShowName8+ setShowName\(slotId: number, name: string, callback: AsyncCallback\): void @@ -716,7 +716,7 @@ sim.setShowName(0, name, (err, data) => { }); ``` -## sim.**setShowName**8+ +## sim.setShowName8+ setShowName\(slotId: number, name: string\): Promise\ @@ -753,7 +753,7 @@ promise.then(data => { }); ``` -## sim.**getShowName**8+ +## sim.getShowName8+ getShowName(slotId: number, callback: AsyncCallback): void @@ -781,7 +781,7 @@ sim.getShowName(0, (err, data) => { ``` -## sim.**getShowName**8+ +## sim.getShowName8+ getShowName(slotId: number): Promise @@ -816,7 +816,7 @@ promise.then(data => { }); ``` -## sim.**setShowNumber**8+ +## sim.setShowNumber8+ setShowNumber\(slotId: number, number: string, callback: AsyncCallback\): void @@ -846,7 +846,7 @@ sim.setShowNumber(0, number, (err, data) => { ``` -## sim.**setShowNumber**8+ +## sim.setShowNumber8+ setShowNumber\(slotId: number, number: string\): Promise\ @@ -883,7 +883,7 @@ promise.then(data => { }); ``` -## sim.**getShowNumber**8+ +## sim.getShowNumber8+ getShowNumber(slotId: number, callback: AsyncCallback): void @@ -911,7 +911,7 @@ sim.getShowNumber(0, (err, data) => { ``` -## sim.**getShowNumber**8+ +## sim.getShowNumber8+ getShowNumber(slotId: number): Promise @@ -946,7 +946,7 @@ promise.then(data => { }); ``` -## sim.**activateSim**8+ +## sim.activateSim8+ activateSim(slotId: number, callback: AsyncCallback): void @@ -974,7 +974,7 @@ sim.activateSim(0, (err, data) => { ``` -## sim.**activateSim**8+ +## sim.activateSim8+ activateSim(slotId: number): Promise\ @@ -1009,7 +1009,7 @@ promise.then(data => { }); ``` -## sim.**deactivateSim**8+ +## sim.deactivateSim8+ deactivateSim(slotId: number, callback: AsyncCallback): void @@ -1037,7 +1037,7 @@ sim.deactivateSim(0, (err, data) => { ``` -## sim.**deactivateSim**8+ +## sim.deactivateSim8+ deactivateSim(slotId: number): Promise\ @@ -1346,7 +1346,7 @@ promise.then(data => { }); ``` -## sim.**unlockPin**7+ +## sim.unlockPin7+ unlockPin(slotId: number, pin: string, callback: AsyncCallback): void @@ -1376,7 +1376,7 @@ sim.unlockPin(0, pin, (err, data) => { ``` -## sim.**unlockPin**7+ +## sim.unlockPin7+ unlockPin(slotId: number, pin: string): Promise<LockStatusResponse\> @@ -1413,7 +1413,7 @@ promise.then(data => { }); ``` -## sim.**unlockPuk**7+ +## sim.unlockPuk7+ unlockPuk(slotId: number, newPin: string, puk: string ,callback: AsyncCallback): void @@ -1445,7 +1445,7 @@ sim.unlockPuk(0, newPin, puk, (err, data) => { ``` -## sim.**unlockPuk**7+ +## sim.unlockPuk7+ unlockPuk(slotId: number, newPin: string, puk: string): Promise<LockStatusResponse\> @@ -1484,7 +1484,7 @@ promise.then(data => { }); ``` -## sim.**unlockPin**28+ +## sim.unlockPin28+ unlockPin2(slotId: number, pin2: string, callback: AsyncCallback): void @@ -1514,7 +1514,7 @@ sim.unlockPin2(0, pin2, (err, data) => { ``` -## sim.**unlockPin**28+ +## sim.unlockPin28+ unlockPin2(slotId: number, pin2: string): Promise<LockStatusResponse\> @@ -1551,7 +1551,7 @@ promise.then(data => { }); ``` -## sim.**unlockPuk**28+ +## sim.unlockPuk28+ unlockPuk2(slotId: number, newPin2: string, puk2: string, callback: AsyncCallback): void @@ -1583,7 +1583,7 @@ sim.unlockPuk2(0, newPin2, puk2, (err, data) => { ``` -## sim.**unlockPuk2**8+ +## sim.unlockPuk28+ unlockPuk2(slotId: number, newPin2: string, puk2: string): Promise<LockStatusResponse\> diff --git a/en/application-dev/reference/apis/js-apis-thermal.md b/en/application-dev/reference/apis/js-apis-thermal.md index 514e7062cd..5291826d6f 100644 --- a/en/application-dev/reference/apis/js-apis-thermal.md +++ b/en/application-dev/reference/apis/js-apis-thermal.md @@ -118,6 +118,7 @@ try { subscribeThermalLevel(callback: AsyncCallback<ThermalLevel>): void +> NOTE
> This API is deprecated since API version 9. You are advised to use [thermal.registerThermalLevelCallback](#thermalregisterthermallevelcallback9) instead. Subscribes to thermal level changes. @@ -142,6 +143,7 @@ thermal.subscribeThermalLevel((level) => { unsubscribeThermalLevel(callback?: AsyncCallback\): void +> NOTE
> This API is deprecated since API version 9. You are advised to use [thermal.unregisterThermalLevelCallback](#thermalunregisterthermallevelcallback9) instead. Unsubscribes from thermal level changes. @@ -166,6 +168,7 @@ thermal.unsubscribeThermalLevel(() => { getThermalLevel(): ThermalLevel +> NOTE
> This API is deprecated since API version 9. You are advised to use [thermal.getLevel](#thermalgetlevel9) instead. Obtains the current thermal level. diff --git a/en/application-dev/reference/apis/js-apis-touchevent.md b/en/application-dev/reference/apis/js-apis-touchevent.md index ae49b428e0..e66c1569fb 100644 --- a/en/application-dev/reference/apis/js-apis-touchevent.md +++ b/en/application-dev/reference/apis/js-apis-touchevent.md @@ -13,6 +13,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput ## Action +Enumerates touch actions. + **System capability**: SystemCapability.MultimodalInput.Input.Core | Name | Value | Description | @@ -24,6 +26,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput ## ToolType +Enumerates tool types. + **System capability**: SystemCapability.MultimodalInput.Input.Core | Name | Value | Description | @@ -39,6 +43,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput ## SourceType +Enumerates source types. + **System capability**: SystemCapability.MultimodalInput.Input.Core | Name | Value | Description | @@ -49,6 +55,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput ## Touch +Defines a touch action. + **System capability**: SystemCapability.MultimodalInput.Input.Core | Name| Type| Readable| Writable| Description| @@ -74,6 +82,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput ## TouchEvent +Defines a touch event. + **System capability**: SystemCapability.MultimodalInput.Input.Core | Name| Type| Readable| Writable| Description| diff --git a/en/application-dev/reference/apis/js-apis-usb-deprecated.md b/en/application-dev/reference/apis/js-apis-usb-deprecated.md index 68a127a08b..95eb105b0a 100644 --- a/en/application-dev/reference/apis/js-apis-usb-deprecated.md +++ b/en/application-dev/reference/apis/js-apis-usb-deprecated.md @@ -43,7 +43,7 @@ console.log(`devicesList = ${JSON.stringify(devicesList)}`); vendorId: 7531, productId: 2, clazz: 9, - subclass: 0, + subClass: 0, protocol: 1, devAddress: 1, busNum: 1, @@ -60,7 +60,7 @@ console.log(`devicesList = ${JSON.stringify(devicesList)}`); id: 0, protocol: 0, clazz: 9, - subclass: 0, + subClass: 0, alternateSetting: 0, name: "1-1", endpoints: [ @@ -171,7 +171,7 @@ usb.requestRight(devicesName).then((ret) => { ## usb.claimInterface -claimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): number +claimInterface(pipe: USBDevicePipe, iface: USBInterface, force ?: boolean): number Claims a USB interface. @@ -348,7 +348,7 @@ let ret = usb.getFileDescriptor(devicepipe); ## usb.controlTransfer -controlTransfer(pipe: USBDevicePipe, controlparam: USBControlParams, timeout?: number): Promise<number> +controlTransfer(pipe: USBDevicePipe, controlparam: USBControlParams, timeout ?: number): Promise<number> Performs control transfer. @@ -380,7 +380,7 @@ usb.controlTransfer(devicepipe, USBControlParams).then((ret) => { ## usb.bulkTransfer -bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, timeout?: number): Promise<number> +bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, timeout ?: number): Promise<number> Performs bulk transfer. diff --git a/en/application-dev/reference/apis/js-apis-usb.md b/en/application-dev/reference/apis/js-apis-usb.md index 9035d2d040..358b80bf5b 100644 --- a/en/application-dev/reference/apis/js-apis-usb.md +++ b/en/application-dev/reference/apis/js-apis-usb.md @@ -42,7 +42,7 @@ console.log(`devicesList = ${JSON.stringify(devicesList)}`); vendorId: 7531, productId: 2, clazz: 9, - subclass: 0, + subClass: 0, protocol: 1, devAddress: 1, busNum: 1, @@ -59,7 +59,7 @@ console.log(`devicesList = ${JSON.stringify(devicesList)}`); id: 0, protocol: 0, clazz: 9, - subclass: 0, + subClass: 0, alternateSetting: 0, name: "1-1", endpoints: [ @@ -252,7 +252,7 @@ if (usb.addRight(bundleName, devicesName) { ## usb.claimInterface -claimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): number +claimInterface(pipe: USBDevicePipe, iface: USBInterface, force ?: boolean): number Claims a USB interface. @@ -429,7 +429,7 @@ let ret = usb.getFileDescriptor(devicepipe); ## usb.controlTransfer -controlTransfer(pipe: USBDevicePipe, controlparam: USBControlParams, timeout?: number): Promise<number> +controlTransfer(pipe: USBDevicePipe, controlparam: USBControlParams, timeout ?: number): Promise<number> Performs control transfer. @@ -461,7 +461,7 @@ usb.controlTransfer(devicepipe, USBControlParams).then((ret) => { ## usb.bulkTransfer -bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, timeout?: number): Promise<number> +bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, timeout ?: number): Promise<number> Performs bulk transfer. diff --git a/en/device-dev/subsystems/subsys-dfx-hisysevent-tool.md b/en/device-dev/subsystems/subsys-dfx-hisysevent-tool.md index cb0f8cead6..1369bb7bc6 100644 --- a/en/device-dev/subsystems/subsys-dfx-hisysevent-tool.md +++ b/en/device-dev/subsystems/subsys-dfx-hisysevent-tool.md @@ -9,7 +9,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** - Command for subscribing to real-time system events: - ``` + ```shell hisysevent -r ``` @@ -21,7 +21,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** - Command for enabling the debugging mode: - ``` + ```shell hisysevent -r -d ``` @@ -29,11 +29,11 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** | Option| Description| | -------- | -------- | - | -d | Subscription to real-time system events in debugging mode.| + | -d | Subscribes to real-time system events in debugging mode.| - Command for subscribing to real-time system events by event tag: - ``` + ```shell hisysevent -r -t [-c [WHOLE_WORD|PREFIX|REGULAR]] ``` @@ -42,12 +42,12 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** | Option| Description| | -------- | -------- | | -t | Event tag used to filter subscribed real-time system events.| - | -c | Matching rule for event tags. The option can be **WHOLE_WORD**, **PREFIX**, or **REGULAR**.| + | -c | Matching rule for event tags. The options can be **WHOLE_WORD**, **PREFIX**, or **REGULAR**.| Example: - ``` - # hisysevent -r -t "STA" -c PREFIX + ```shell + # hisysevent -r -t "STA" -c PREFIX {"domain_":"RELIABILITY","name_":"APP_FREEZE","type_":1,"time_":1501963670809,"pid_":1505,"uid_":10002,"FAULT_TYPE":"4","MODULE":"com.ohos.screenlock","REASON":"NO_DRAW","SUMMARY":"SUMMARY:\n","LOG_PATH":"/data/log/faultlog/faultlogger/appfreeze-com.ohos.screenlock-10002-20170805200750","HAPPEN_TIME":1501963670809,"VERSION":"1.0.0","level_":"CRITICAL","tag_":"STABILITY","id_":"4973863135535405472","info_":""} # hisysevent -r -t "STAw{0,6}" -c REGULAR {"domain_":"RELIABILITY","name_":"APP_FREEZE","type_":1,"time_":1501963793206,"pid_":1505,"uid_":10002,"FAULT_TYPE":"4","MODULE":"com.ohos.screenlock","REASON":"NO_DRAW","SUMMARY":"SUMMARY:\n","LOG_PATH":"/data/log/faultlog/faultlogger/appfreeze-com.ohos.screenlock-10002-20170805200953","HAPPEN_TIME":1501963793206,"VERSION":"1.0.0","level_":"CRITICAL","tag_":"STABILITY","id_":"16367997008075110557","info_":""} @@ -57,7 +57,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** - Command for subscribing to real-time system events by event domain and event name: - ``` + ```shell hisysevent -r -o -n [-c [WHOLE_WORD|PREFIX|REGULAR]] ``` @@ -67,11 +67,11 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** | -------- | -------- | | -o | Event domain used to filter subscribed real-time system events.| | -n | Event name used to filter subscribed real-time system events.| - | -c | Matching rule for event domains and event names. The option can be **WHOLE_WORD**, PREFIX, or **REGULAR**.| + | -c | Matching rule for event domains and event names. The options can be **WHOLE_WORD**, PREFIX, or **REGULAR**.| Example: - ``` + ```shell # hisysevent -r -o "RELIABILITY" -n "APP_FREEZE" {"domain_":"RELIABILITY","name_":"APP_FREEZE","type_":1,"time_":1501963989773,"pid_":1505,"uid_":10002,"FAULT_TYPE":"4","MODULE":"com.ohos.screenlock","REASON":"NO_DRAW","SUMMARY":"SUMMARY:\n","LOG_PATH":"/data/log/faultlog/faultlogger/appfreeze-com.ohos.screenlock-10002-20170805201309","HAPPEN_TIME":1501963989773,"VERSION":"1.0.0","level_":"CRITICAL","tag_":"STABILITY","id_":"16367997008075110557","info_":""} # hisysevent -r -o "RELIABI\w{0,8}" -n "APP_FREEZE" -c REGULAR @@ -85,7 +85,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** - Command for subscribing to real-time system events by event type: - ``` + ```shell hisysevent -r -g [FAULT|STATISTIC|SECURITY|BEHAVIOR] ``` @@ -97,7 +97,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** Example: - ``` + ```shell # hisysevent -r -o "RELIABILITY" -n "APP_FREEZE" -g FAULT {"domain_":"RELIABILITY","name_":"APP_FREEZE","type_":1,"time_":1501963989773,"pid_":1505,"uid_":10002,"FAULT_TYPE":"4","MODULE":"com.ohos.screenlock","REASON":"NO_DRAW","SUMMARY":"SUMMARY:\n","LOG_PATH":"/data/log/faultlog/faultlogger/appfreeze-com.ohos.screenlock-10002-20170805201309","HAPPEN_TIME":1501963989773,"VERSION":"1.0.0","level_":"CRITICAL","tag_":"STABILITY","id_":"16367997008075110557","info_":""} # hisysevent -r -o "POWER\w{0,8}" -n "POWER_RUNNINGLOCK" -c REGULAR -g STATISTIC @@ -108,11 +108,12 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** {"domain_":"MULTIMODALINPUT","name_":"Z_ORDER_WINDOW_CHANGE","type_":4,"time_":1667549852735,"tz_":"+0000","pid_":2577,"tid_":2588,"uid_":6696,"OLD_ZORDER_FIRST_WINDOWID":-1,"NEW_ZORDER_FIRST_WINDOWID":2,"OLD_ZORDER_FIRST_WINDOWPID":-1,"NEW_ZORDER_FIRST_WINDOWPID":1458,"MSG":"The ZorderFirstWindow changing succeeded","level_":"MINOR","tag_":"PowerStats","id_":"16847308118559691400","info_":""} ``` + ## Querying Historical System Events - Command for querying historical system events: - ``` + ```shell hisysevent -l ``` @@ -124,7 +125,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** - Command for querying historical system events within the specified period of time: - ``` + ```shell hisysevent -l -s -e ``` @@ -132,21 +133,46 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** | Option| Description| | -------- | -------- | - | -s | Start time for querying historical system events. Only system events generated after the start time are returned.| - | -e | End time for querying historical system events. Only system events generated before the end time are returned.| + | -s | Original start timestamp for querying historical system events. Only system events generated after the start time are returned.| + | -e | Original end timestamp for querying historical system events. Only system events generated before the end time are returned.| Example: - ``` + ```shell # hisysevent -l -s 1501964222980 -e 1501964222996 {"domain_":"RELIABILITY","name_":"APP_FREEZE","type_":1,"time_":1501964222980,"pid_":1505,"uid_":10002,"FAULT_TYPE":"4","MODULE":"com.ohos.screenlock","REASON":"NO_DRAW","SUMMARY":"SUMMARY:\n","LOG_PATH":"/data/log/faultlog/faultlogger/appfreeze-com.ohos.screenlock-10002-20170805201702","HAPPEN_TIME":1501964222980,"VERSION":"1.0.0","level_":"CRITICAL","tag_":"STABILITY","id_":"10435592800188571430","info_":""} {"domain_":"GRAPHIC","name_":"NO_DRAW","type_":1,"time_":1501964222980,"tz_":"+0000","pid_":1505,"tid_":1585,"uid_":10002,"PID":1505,"UID":10002,"ABILITY_NAME":"","MSG":"It took 1957104259905ns to draw, UI took 0ns to draw, RSRenderThread took 8962625ns to draw, RSRenderThread dropped 0 UI Frames","level_":"MINOR","id_":"1708287249901948387","info_":"isResolved,eventId:0"} {"domain_":"RELIABILITY","name_":"APP_FREEZE","type_":1,"time_":1501964222994,"tz_":"+0000","pid_":623,"tid_":1445,"uid_":1201,"SUB_EVENT_TYPE":"NO_DRAW","EVENT_TIME":"20170805201702","MODULE":"NO_DRAW","PNAME":"NO_DRAW","REASON":"NO_DRAW","DIAG_INFO":"","STACK":"SUMMARY:\n","HIVIEW_LOG_FILE_PATHS":["/data/log/faultlog/faultlogger/appfreeze-NO_DRAW-10002-20170805201702"],"DOMAIN":"GRAPHIC","STRING_ID":"NO_DRAW","PID":1505,"UID":10002,"PACKAGE_NAME":"NO_DRAW","PROCESS_NAME":"","MSG":"It took 1956945826265ns to draw, UI took 0ns to draw, RSRenderThread took 9863293ns to draw, RSRenderThread dropped 0 UI Frames\n","level_":"CRITICAL","tag_":"STABILITY","id_":"10448522101019619655","info_":""} ``` -- Command for setting the maximum number of historical events that can be queried: +- Command for querying historical system events within the specified period of time: + ```shell + hisysevent -l -S -E ``` + + Description of command options: + + | Option| Description| + | -------- | -------- | + | -S | Original start timestamp for querying historical system events. Only system events generated after the start time are returned.| + | -E | Original end timestamp for querying historical system events. Only system events generated after the start time are returned.| + + Example: + + ```shell + # hisysevent -l -S "2023-01-05 14:12:50" -E "2023-01-05 14:12:51" + {"domain_":"GRAPHIC","name_":"JANK_FRAME_SKIP","type_":1,"time_":1672899170022,"tz_":"+0800","pid_":1499,"tid_":1573,"uid_":20010037,"PID":1499,"UID":20010037,"ABILITY_NAME":"com.ohos.launcher","MSG":"It took 587948726ns to draw, UI took 483016382ns to draw, RSRenderThread took 96616051ns to draw, RSRenderThread dropped 0 UI Frames","level_":"MINOR","id_":"11351278822867091090","info_":"","seq_":307} + {"domain_":"AAFWK","name_":"START_ABILITY_ERROR","type_":1,"time_":1672899170108,"tz_":"+0800","pid_":550,"tid_":1127,"uid_":5523,"USER_ID":-1,"BUNDLE_NAME":"com.ohos.wallpaper","MODULE_NAME":"","ABILITY_NAME":"WallpaperExtAbility","ERROR_CODE":2097152,"level_":"MINOR","tag_":"ability","id_":"53589395004188308060","info_":"","seq_":313} + {"domain_":"GRAPHIC","name_":"JANK_FRAME_SKIP","type_":1,"time_":1672899170305,"tz_":"+0800","pid_":1293,"tid_":1632,"uid_":10006,"PID":1293,"UID":10006,"ABILITY_NAME":"com.ohos.systemui","MSG":"It took 309597490ns to draw, UI took 92364718ns to draw, RSRenderThread took 205874105ns to draw, RSRenderThread dropped 1 UI Frames","level_":"MINOR","id_":"14843220972178010722","info_":"","seq_":314} + {"domain_":"GRAPHIC","name_":"JANK_FRAME_SKIP","type_":1,"time_":1672899170350,"tz_":"+0800","pid_":1293,"tid_":1632,"uid_":10006,"PID":1293,"UID":10006,"ABILITY_NAME":"com.ohos.systemui","MSG":"It took 259782859ns to draw, UI took 33909753ns to draw, RSRenderThread took 44849879ns to draw, RSRenderThread dropped 5 UI Frames","level_":"MINOR","id_":"66610006717219916560","info_":"","seq_":315} + {"domain_":"AAFWK","name_":"CONNECT_SERVICE_ERROR","type_":1,"time_":1672899170733,"tz_":"+0800","pid_":550,"tid_":1127,"uid_":5523,"USER_ID":100,"BUNDLE_NAME":"com.ohos.wallpaper","MODULE_NAME":"","ABILITY_NAME":"WallpaperExtAbility","ERROR_CODE":2097152,"level_":"MINOR","tag_":"ability","id_":"10040008376311927188","info_":"","seq_":317} + {"domain_":"COMMONEVENT","name_":"PUBLISH","type_":2,"time_":1672899170063,"tz_":"+0800","pid_":550,"tid_":937,"uid_":5523,"USER_ID":-1,"PUBLISHER_BUNDLE_NAME":"","PID":0,"UID":1101,"EVENT_NAME":"usual.event.SCREEN_ON","level_":"MINOR","id_":"80996758983032931610","info_":"","seq_":308} + ``` + +- Command for setting the maximum number of historical events that can be queried: + + ```shell hisysevent -l -m ``` @@ -158,14 +184,14 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** Example: - ``` + ```shell # hisysevent -l -s 1501964222980 -e 1501964222996 -m 1 {"domain_":"RELIABILITY","name_":"APP_FREEZE","type_":1,"time_":1501964222980,"pid_":1505,"uid_":10002,"FAULT_TYPE":"4","MODULE":"com.ohos.screenlock","REASON":"NO_DRAW","SUMMARY":"SUMMARY:\n","LOG_PATH":"/data/log/faultlog/faultlogger/appfreeze-com.ohos.screenlock-10002-20170805201702","HAPPEN_TIME":1501964222980,"VERSION":"1.0.0","level_":"CRITICAL","tag_":"STABILITY","id_":"10435592800188571430","info_":""} ``` - Command for querying historical system events by event domain and event name: - ``` + ```shell hisysevent -l -o -n [-c WHOLE_WORD] ``` @@ -173,24 +199,24 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** | Option| Description| | -------- | -------- | - | -o | Domain based on which historical system events are queried.| - | -n | Name based on which historical system events are queried.| + | -o | Event domain based on which historical system events are queried.| + | -n | Event name based on which historical system events are queried.| | -c | Rule for matching the domain and name of historical system events. The option can only be **WHOLE_WORD**.| Example: - ``` + ```shell # hisysevent -l -n "APP_FREEZE" {"domain_":"RELIABILITY","name_":"APP_FREEZE","type_":1,"time_":1501963989773,"pid_":1505,"uid_":10002,"FAULT_TYPE":"4","MODULE":"com.ohos.screenlock","REASON":"NO_DRAW","SUMMARY":"SUMMARY:\n","LOG_PATH":"/data/log/faultlog/faultlogger/appfreeze-com.ohos.screenlock-10002-20170805201309","HAPPEN_TIME":1501963989773,"VERSION":"1.0.0","level_":"CRITICAL","tag_":"STABILITY","id_":"16367997008075110557","info_":""} - # hisysevent -r -o "RELIABILITY" + # hisysevent -l -o "RELIABILITY" {"domain_":"RELIABILITY","name_":"APP_FREEZE","type_":1,"time_":1501963989773,"pid_":1505,"uid_":10002,"FAULT_TYPE":"4","MODULE":"com.ohos.screenlock","REASON":"NO_DRAW","SUMMARY":"SUMMARY:\n","LOG_PATH":"/data/log/faultlog/faultlogger/appfreeze-com.ohos.screenlock-10002-20170805201544","HAPPEN_TIME":1501963989773,"VERSION":"1.0.0","level_":"CRITICAL","tag_":"STABILITY","id_":"13456525196455104060","info_":""} - # hisysevent -r -o "RELIABILITY" -n "APP_FREEZE" -c WHOLE_WORD + # hisysevent -l -o "RELIABILITY" -n "APP_FREEZE" -c WHOLE_WORD {"domain_":"RELIABILITY","name_":"APP_FREEZE","type_":1,"time_":1501963989773,"pid_":1505,"uid_":10002,"FAULT_TYPE":"4","MODULE":"com.ohos.screenlock","REASON":"NO_DRAW","SUMMARY":"SUMMARY:\n","LOG_PATH":"/data/log/faultlog/faultlogger/appfreeze-com.ohos.screenlock-10002-20170805201633","HAPPEN_TIME":1501963989773,"VERSION":"1.0.0","level_":"CRITICAL","tag_":"STABILITY","id_":"12675246910904037271","info_":""} ``` - Command for querying historical system events by event type: - ``` + ```shell hisysevent -l -g [FAULT|STATISTIC|SECURITY|BEHAVIOR] ``` @@ -202,7 +228,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** Example: - ``` + ```shell # hisysevent -l -o "RELIABILITY" -g FAULT {"domain_":"RELIABILITY","name_":"APP_FREEZE","type_":1,"time_":1501963989773,"pid_":1505,"uid_":10002,"FAULT_TYPE":"4","MODULE":"com.ohos.screenlock","REASON":"NO_DRAW","SUMMARY":"SUMMARY:\n","LOG_PATH":"/data/log/faultlog/faultlogger/appfreeze-com.ohos.screenlock-10002-20170805201309","HAPPEN_TIME":1501963989773,"VERSION":"1.0.0","level_":"CRITICAL","tag_":"STABILITY","id_":"16367997008075110557","info_":""} # hisysevent -l -n "POWER_RUNNINGLOCK" -c WHOLE_WORD -g STATISTIC @@ -217,7 +243,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** - Enabling system event validity check - ``` + ```shell hisysevent -v ``` @@ -229,7 +255,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** Example: - ``` + ```shell # hisysevent -v -l -s 1501964222980 -e 1501964222996 # The **HAPPEN_TIME** and **VERSION** fields are not configured in the YAML file for the **APP_FREEZE** event that belongs to the **RELIABILITY** domain. Therefore, the two fields are highlighted in red. {"domain_":"RELIABILITY","name_":"APP_FREEZE","type_":1,"time_":1501964222980,"pid_":1505,"uid_":10002,"FAULT_TYPE":"4","MODULE":"com.ohos.screenlock","REASON":"NO_DRAW","SUMMARY":"SUMMARY:\n","LOG_PATH":"/data/log/faultlog/faultlogger/appfreeze-com.ohos.screenlock-10002-20170805201702","HAPPEN_TIME":1501964222980,"VERSION":"1.0.0","level_":"CRITICAL","tag_":"STABILITY","id_":"10435592800188571430","info_":""} -- GitLab