未验证 提交 3dd927cb 编写于 作者: O openharmony_ci 提交者: Gitee

!13916 翻译已完成13228+13147+13142+13501+13439+13556

Merge pull request !13916 from shawn_he/13228-b
...@@ -20,13 +20,13 @@ The following table lists the USB APIs currently available. For details, see the ...@@ -20,13 +20,13 @@ The following table lists the USB APIs currently available. For details, see the
| getDevices(): Array<Readonly\<USBDevice>> | Obtains the list of USB devices connected to the USB host. If no USB device is connected, an empty list is returned. | | getDevices(): Array<Readonly\<USBDevice>> | 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. | | setConfiguration(pipe: USBDevicePipe, config: USBConfig): number | Sets the USB device configuration. |
| setInterface(pipe: USBDevicePipe, iface: USBInterface): number | Sets a USB interface. | | setInterface(pipe: USBDevicePipe, iface: USBInterface): number | Sets a USB interface. |
| claimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): number | Claims 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\<number> | Performs bulk transfer. | | bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, timeout ?: number): Promise\<number> | Performs bulk transfer. |
| closePipe(pipe: USBDevicePipe): number | Closes a USB device pipe. | | closePipe(pipe: USBDevicePipe): number | Closes a USB device pipe. |
| releaseInterface(pipe: USBDevicePipe, iface: USBInterface): number | Releases a USB interface. | | releaseInterface(pipe: USBDevicePipe, iface: USBInterface): number | Releases a USB interface. |
| getFileDescriptor(pipe: USBDevicePipe): number | Obtains the file descriptor. | | getFileDescriptor(pipe: USBDevicePipe): number | Obtains the file descriptor. |
| getRawDescriptor(pipe: USBDevicePipe): Uint8Array | Obtains the raw USB descriptor. | | getRawDescriptor(pipe: USBDevicePipe): Uint8Array | Obtains the raw USB descriptor. |
| controlTransfer(pipe: USBDevicePipe, contrlparam: USBControlParams, timeout?: number): Promise\<number> | Performs control transfer. | | controlTransfer(pipe: USBDevicePipe, contrlparam: USBControlParams, timeout ?: number): Promise\<number> | Performs control transfer. |
## How to Develop ## 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 ...@@ -51,7 +51,7 @@ You can set a USB device as the USB host to connect to other USB devices for dat
vendorId: 7531, vendorId: 7531,
productId: 2, productId: 2,
clazz: 9, clazz: 9,
subclass: 0, subClass: 0,
protocol: 1, protocol: 1,
devAddress: 1, devAddress: 1,
busNum: 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 ...@@ -68,7 +68,7 @@ You can set a USB device as the USB host to connect to other USB devices for dat
id: 0, id: 0,
protocol: 0, protocol: 0,
clazz: 9, clazz: 9,
subclass: 0, subClass: 0,
alternateSetting: 0, alternateSetting: 0,
name: "1-1", name: "1-1",
endpoints: [ endpoints: [
...@@ -108,7 +108,7 @@ You can set a USB device as the USB host to connect to other USB devices for dat ...@@ -108,7 +108,7 @@ You can set a USB device as the USB host to connect to other USB devices for dat
```js ```js
// Open the device, and obtain the USB device pipe for data transfer. // 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. Claim the corresponding interface from deviceList.
interface1 must be one present in the device configuration. interface1 must be one present in the device configuration.
...@@ -123,7 +123,9 @@ You can set a USB device as the USB host to connect to other USB devices for dat ...@@ -123,7 +123,9 @@ 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. 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. (endpoint.direction == 0x80); dataUint8Array indicates the data to read. The data type is Uint8Array.
*/ */
let inEndpoint = interface1.endpoints[2];
let outEndpoint = interface1.endpoints[1];
let dataUint8Array = new Uint8Array(1024);
usb.bulkTransfer(pipe, inEndpoint, dataUint8Array, 15000).then(dataLength => { usb.bulkTransfer(pipe, inEndpoint, dataUint8Array, 15000).then(dataLength => {
if (dataLength >= 0) { if (dataLength >= 0) {
console.info("usb readData result Length : " + dataLength); console.info("usb readData result Length : " + dataLength);
...@@ -136,7 +138,7 @@ You can set a USB device as the USB host to connect to other USB devices for dat ...@@ -136,7 +138,7 @@ You can set a USB device as the USB host to connect to other USB devices for dat
console.info("usb readData error : " + JSON.stringify(error)); console.info("usb readData error : " + JSON.stringify(error));
}); });
// Send data. Select the corresponding TX endpoint from deviceList for data transfer. (endpoint.direction == 0) // Send data. Select the corresponding TX endpoint from deviceList for data transfer. (endpoint.direction == 0)
usb.bulkTransfer(pipe, endpoint, dataUint8Array, 15000).then(dataLength => { usb.bulkTransfer(pipe, outEndpoint, dataUint8Array, 15000).then(dataLength => {
if (dataLength >= 0) { if (dataLength >= 0) {
console.info("usb writeData result write length : " + dataLength); console.info("usb writeData result write length : " + dataLength);
} else { } else {
......
...@@ -13,6 +13,8 @@ import InputEvent from '@ohos.multimodalInput.inputEvent'; ...@@ -13,6 +13,8 @@ import InputEvent from '@ohos.multimodalInput.inputEvent';
## InputEvent ## InputEvent
Defines an input event.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
**Parameters** **Parameters**
......
...@@ -203,9 +203,8 @@ try { ...@@ -203,9 +203,8 @@ try {
inputMonitor.on("touch", touchEvent => { inputMonitor.on("touch", touchEvent => {
if (touchEvent.touches.length == 3) {// Three fingers are pressed. if (touchEvent.touches.length == 3) {// Three fingers are pressed.
return true; return true;
} else {
return false;
} }
return false;
}); });
} catch (error) { } catch (error) {
console.log(`Monitor on failed, error: ${JSON.stringify(error, [`code`, `message`])}`); console.log(`Monitor on failed, error: ${JSON.stringify(error, [`code`, `message`])}`);
......
...@@ -14,6 +14,8 @@ import {KeyCode} from '@ohos.multimodalInput.keyCode'; ...@@ -14,6 +14,8 @@ import {KeyCode} from '@ohos.multimodalInput.keyCode';
## KeyCode ## KeyCode
Enumerates keycodes.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
| Name | Value | Description | | Name | Value | Description |
......
...@@ -13,6 +13,8 @@ import {Action, Key, KeyEvent} from '@ohos.multimodalInput.keyEvent'; ...@@ -13,6 +13,8 @@ import {Action, Key, KeyEvent} from '@ohos.multimodalInput.keyEvent';
## Action ## Action
Defines a key action.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
| Name | Value | Description | | Name | Value | Description |
...@@ -23,6 +25,8 @@ import {Action, Key, KeyEvent} from '@ohos.multimodalInput.keyEvent'; ...@@ -23,6 +25,8 @@ import {Action, Key, KeyEvent} from '@ohos.multimodalInput.keyEvent';
## Key ## Key
Defines a key.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
| Name | Type| Readable| Writable| Description | | Name | Type| Readable| Writable| Description |
...@@ -33,6 +37,8 @@ import {Action, Key, KeyEvent} from '@ohos.multimodalInput.keyEvent'; ...@@ -33,6 +37,8 @@ import {Action, Key, KeyEvent} from '@ohos.multimodalInput.keyEvent';
## KeyEvent ## KeyEvent
Defines a key event.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
| Name | Type| Readable| Writable| Description | | Name | Type| Readable| Writable| Description |
......
...@@ -13,6 +13,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp ...@@ -13,6 +13,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp
## Action ## Action
Defines a mouse action.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
| Name | Value| Description | | Name | Value| Description |
...@@ -28,6 +30,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp ...@@ -28,6 +30,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp
## Button ## Button
Enumerates mouse actions.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
| Name | Value | Description | | Name | Value | Description |
...@@ -43,6 +47,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp ...@@ -43,6 +47,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp
## Axis ## Axis
Enumerates mouse axis types.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
| Name | Value | Description | | Name | Value | Description |
...@@ -54,6 +60,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp ...@@ -54,6 +60,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp
## AxisValue ## AxisValue
Defines a mouse axis type and value.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
| Name | Type | Readable | Writable | Description | | Name | Type | Readable | Writable | Description |
...@@ -64,6 +72,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp ...@@ -64,6 +72,8 @@ import { Action, Button, Axis, AxisValue, MouseEvent } from '@ohos.multimodalInp
## MouseEvent ## MouseEvent
Defines a mouse event.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
| Name | Type | Readable | Writable | Description | | Name | Type | Readable | Writable | Description |
......
...@@ -87,7 +87,7 @@ try { ...@@ -87,7 +87,7 @@ try {
isActive(): boolean 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 **System capability:** SystemCapability.PowerManager.PowerManager.Core
...@@ -292,6 +292,7 @@ power.setPowerMode(power.DevicePowerMode.MODE_PERFORMANCE) ...@@ -292,6 +292,7 @@ power.setPowerMode(power.DevicePowerMode.MODE_PERFORMANCE)
rebootDevice(reason: string): void rebootDevice(reason: string): void
> NOTE<br>
> This API is deprecated since API version 9. You are advised to use [power.reboot](#powerreboot9) instead. > This API is deprecated since API version 9. You are advised to use [power.reboot](#powerreboot9) instead.
Reboots the system. Reboots the system.
...@@ -316,6 +317,7 @@ power.rebootDevice('reboot_test'); ...@@ -316,6 +317,7 @@ power.rebootDevice('reboot_test');
isScreenOn(callback: AsyncCallback&lt;boolean&gt;): void isScreenOn(callback: AsyncCallback&lt;boolean&gt;): void
> NOTE<br>
> This API is deprecated since API version 9. You are advised to use [power.isActive](#powerisactive9) instead. > 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. 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) => { ...@@ -344,6 +346,7 @@ power.isScreenOn((err, data) => {
isScreenOn(): Promise&lt;boolean&gt; isScreenOn(): Promise&lt;boolean&gt;
> NOTE<br>
> This API is deprecated since API version 9. You are advised to use [power.isActive](#powerisactive9) instead. > 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. Checks the screen status of the current device. This API uses a promise to return the result.
......
...@@ -135,6 +135,7 @@ runningLock.create('running_lock_test', runningLock.RunningLockType.BACKGROUND) ...@@ -135,6 +135,7 @@ runningLock.create('running_lock_test', runningLock.RunningLockType.BACKGROUND)
isRunningLockTypeSupported(type: RunningLockType, callback: AsyncCallback&lt;boolean&gt;): void isRunningLockTypeSupported(type: RunningLockType, callback: AsyncCallback&lt;boolean&gt;): void
> NOTE<br>
> This API is deprecated since API version 9. You are advised to use [runningLock.isSupported](#runninglockissupported9) instead. > 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. 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, ( ...@@ -164,6 +165,7 @@ runningLock.isRunningLockTypeSupported(runningLock.RunningLockType.BACKGROUND, (
isRunningLockTypeSupported(type: RunningLockType): Promise&lt;boolean> isRunningLockTypeSupported(type: RunningLockType): Promise&lt;boolean>
> NOTE<br>
> This API is deprecated since API version 9. You are advised to use [runningLock.isSupported](#runninglockissupported9) instead. > 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. 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) ...@@ -198,6 +200,7 @@ runningLock.isRunningLockTypeSupported(runningLock.RunningLockType.BACKGROUND)
createRunningLock(name: string, type: RunningLockType, callback: AsyncCallback&lt;RunningLock&gt;): void createRunningLock(name: string, type: RunningLockType, callback: AsyncCallback&lt;RunningLock&gt;): void
> NOTE<br>
> This API is deprecated since API version 9. You are advised to use [runningLock.create](#runninglockcreate9) instead. > This API is deprecated since API version 9. You are advised to use [runningLock.create](#runninglockcreate9) instead.
Creates a **RunningLock** object. Creates a **RunningLock** object.
...@@ -230,6 +233,7 @@ runningLock.createRunningLock('running_lock_test', runningLock.RunningLockType.B ...@@ -230,6 +233,7 @@ runningLock.createRunningLock('running_lock_test', runningLock.RunningLockType.B
createRunningLock(name: string, type: RunningLockType): Promise&lt;RunningLock&gt; createRunningLock(name: string, type: RunningLockType): Promise&lt;RunningLock&gt;
> NOTE<br>
> This API is deprecated since API version 9. You are advised to use [runningLock.create](#runninglockcreate9) instead. > This API is deprecated since API version 9. You are advised to use [runningLock.create](#runninglockcreate9) instead.
Creates a **RunningLock** object. Creates a **RunningLock** object.
...@@ -389,6 +393,7 @@ runningLock.create('running_lock_test', runningLock.RunningLockType.BACKGROUND) ...@@ -389,6 +393,7 @@ runningLock.create('running_lock_test', runningLock.RunningLockType.BACKGROUND)
lock(timeout: number): void lock(timeout: number): void
> NOTE<br>
> This API is deprecated since API version 9. You are advised to use [RunningLock.hold](#hold9) instead. > This API is deprecated since API version 9. You are advised to use [RunningLock.hold](#hold9) instead.
Locks and holds a **RunningLock** object. Locks and holds a **RunningLock** object.
...@@ -420,6 +425,7 @@ runningLock.createRunningLock('running_lock_test', runningLock.RunningLockType.B ...@@ -420,6 +425,7 @@ runningLock.createRunningLock('running_lock_test', runningLock.RunningLockType.B
unlock(): void unlock(): void
> NOTE<br>
> This API is deprecated since API version 9. You are advised to use [RunningLock.unhold](#unhold9) instead. > This API is deprecated since API version 9. You are advised to use [RunningLock.unhold](#unhold9) instead.
Releases a **RunningLock** object. Releases a **RunningLock** object.
...@@ -445,6 +451,7 @@ runningLock.createRunningLock('running_lock_test', runningLock.RunningLockType.B ...@@ -445,6 +451,7 @@ runningLock.createRunningLock('running_lock_test', runningLock.RunningLockType.B
isUsed(): boolean isUsed(): boolean
> NOTE<br>
> This API is deprecated since API version 9. You are advised to use [RunningLock.isHolding](#isholding9) instead. > 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. Checks the hold status of the **Runninglock** object.
......
...@@ -687,7 +687,7 @@ promise.then(data => { ...@@ -687,7 +687,7 @@ promise.then(data => {
}); });
``` ```
## sim.**setShowName**<sup>8+</sup> ## sim.setShowName<sup>8+</sup>
setShowName\(slotId: number, name: string, callback: AsyncCallback<void\>\): void setShowName\(slotId: number, name: string, callback: AsyncCallback<void\>\): void
...@@ -716,7 +716,7 @@ sim.setShowName(0, name, (err, data) => { ...@@ -716,7 +716,7 @@ sim.setShowName(0, name, (err, data) => {
}); });
``` ```
## sim.**setShowName**<sup>8+</sup> ## sim.setShowName<sup>8+</sup>
setShowName\(slotId: number, name: string\): Promise\<void\> setShowName\(slotId: number, name: string\): Promise\<void\>
...@@ -753,7 +753,7 @@ promise.then(data => { ...@@ -753,7 +753,7 @@ promise.then(data => {
}); });
``` ```
## sim.**getShowName**<sup>8+</sup> ## sim.getShowName<sup>8+</sup>
getShowName(slotId: number, callback: AsyncCallback<string\>): void getShowName(slotId: number, callback: AsyncCallback<string\>): void
...@@ -781,7 +781,7 @@ sim.getShowName(0, (err, data) => { ...@@ -781,7 +781,7 @@ sim.getShowName(0, (err, data) => {
``` ```
## sim.**getShowName**<sup>8+</sup> ## sim.getShowName<sup>8+</sup>
getShowName(slotId: number): Promise<string\> getShowName(slotId: number): Promise<string\>
...@@ -816,7 +816,7 @@ promise.then(data => { ...@@ -816,7 +816,7 @@ promise.then(data => {
}); });
``` ```
## sim.**setShowNumber**<sup>8+</sup> ## sim.setShowNumber<sup>8+</sup>
setShowNumber\(slotId: number, number: string, callback: AsyncCallback<void\>\): void setShowNumber\(slotId: number, number: string, callback: AsyncCallback<void\>\): void
...@@ -846,7 +846,7 @@ sim.setShowNumber(0, number, (err, data) => { ...@@ -846,7 +846,7 @@ sim.setShowNumber(0, number, (err, data) => {
``` ```
## sim.**setShowNumber**<sup>8+</sup> ## sim.setShowNumber<sup>8+</sup>
setShowNumber\(slotId: number, number: string\): Promise\<void\> setShowNumber\(slotId: number, number: string\): Promise\<void\>
...@@ -883,7 +883,7 @@ promise.then(data => { ...@@ -883,7 +883,7 @@ promise.then(data => {
}); });
``` ```
## sim.**getShowNumber**<sup>8+</sup> ## sim.getShowNumber<sup>8+</sup>
getShowNumber(slotId: number, callback: AsyncCallback<string\>): void getShowNumber(slotId: number, callback: AsyncCallback<string\>): void
...@@ -911,7 +911,7 @@ sim.getShowNumber(0, (err, data) => { ...@@ -911,7 +911,7 @@ sim.getShowNumber(0, (err, data) => {
``` ```
## sim.**getShowNumber**<sup>8+</sup> ## sim.getShowNumber<sup>8+</sup>
getShowNumber(slotId: number): Promise<string\> getShowNumber(slotId: number): Promise<string\>
...@@ -946,7 +946,7 @@ promise.then(data => { ...@@ -946,7 +946,7 @@ promise.then(data => {
}); });
``` ```
## sim.**activateSim**<sup>8+</sup> ## sim.activateSim<sup>8+</sup>
activateSim(slotId: number, callback: AsyncCallback<void\>): void activateSim(slotId: number, callback: AsyncCallback<void\>): void
...@@ -974,7 +974,7 @@ sim.activateSim(0, (err, data) => { ...@@ -974,7 +974,7 @@ sim.activateSim(0, (err, data) => {
``` ```
## sim.**activateSim**<sup>8+</sup> ## sim.activateSim<sup>8+</sup>
activateSim(slotId: number): Promise\<void\> activateSim(slotId: number): Promise\<void\>
...@@ -1009,7 +1009,7 @@ promise.then(data => { ...@@ -1009,7 +1009,7 @@ promise.then(data => {
}); });
``` ```
## sim.**deactivateSim**<sup>8+</sup> ## sim.deactivateSim<sup>8+</sup>
deactivateSim(slotId: number, callback: AsyncCallback<void\>): void deactivateSim(slotId: number, callback: AsyncCallback<void\>): void
...@@ -1037,7 +1037,7 @@ sim.deactivateSim(0, (err, data) => { ...@@ -1037,7 +1037,7 @@ sim.deactivateSim(0, (err, data) => {
``` ```
## sim.**deactivateSim**<sup>8+</sup> ## sim.deactivateSim<sup>8+</sup>
deactivateSim(slotId: number): Promise\<void\> deactivateSim(slotId: number): Promise\<void\>
...@@ -1346,7 +1346,7 @@ promise.then(data => { ...@@ -1346,7 +1346,7 @@ promise.then(data => {
}); });
``` ```
## sim.**unlockPin**<sup>7+</sup> ## sim.unlockPin<sup>7+</sup>
unlockPin(slotId: number, pin: string, callback: AsyncCallback<LockStatusResponse\>): void unlockPin(slotId: number, pin: string, callback: AsyncCallback<LockStatusResponse\>): void
...@@ -1376,7 +1376,7 @@ sim.unlockPin(0, pin, (err, data) => { ...@@ -1376,7 +1376,7 @@ sim.unlockPin(0, pin, (err, data) => {
``` ```
## sim.**unlockPin**<sup>7+</sup> ## sim.unlockPin<sup>7+</sup>
unlockPin(slotId: number, pin: string): Promise&lt;LockStatusResponse\> unlockPin(slotId: number, pin: string): Promise&lt;LockStatusResponse\>
...@@ -1413,7 +1413,7 @@ promise.then(data => { ...@@ -1413,7 +1413,7 @@ promise.then(data => {
}); });
``` ```
## sim.**unlockPuk**<sup>7+</sup> ## sim.unlockPuk<sup>7+</sup>
unlockPuk(slotId: number, newPin: string, puk: string ,callback: AsyncCallback<LockStatusResponse\>): void unlockPuk(slotId: number, newPin: string, puk: string ,callback: AsyncCallback<LockStatusResponse\>): void
...@@ -1445,7 +1445,7 @@ sim.unlockPuk(0, newPin, puk, (err, data) => { ...@@ -1445,7 +1445,7 @@ sim.unlockPuk(0, newPin, puk, (err, data) => {
``` ```
## sim.**unlockPuk**<sup>7+</sup> ## sim.unlockPuk<sup>7+</sup>
unlockPuk(slotId: number, newPin: string, puk: string): Promise&lt;LockStatusResponse\> unlockPuk(slotId: number, newPin: string, puk: string): Promise&lt;LockStatusResponse\>
...@@ -1484,7 +1484,7 @@ promise.then(data => { ...@@ -1484,7 +1484,7 @@ promise.then(data => {
}); });
``` ```
## sim.**unlockPin**2<sup>8+</sup> ## sim.unlockPin2<sup>8+</sup>
unlockPin2(slotId: number, pin2: string, callback: AsyncCallback<LockStatusResponse\>): void unlockPin2(slotId: number, pin2: string, callback: AsyncCallback<LockStatusResponse\>): void
...@@ -1514,7 +1514,7 @@ sim.unlockPin2(0, pin2, (err, data) => { ...@@ -1514,7 +1514,7 @@ sim.unlockPin2(0, pin2, (err, data) => {
``` ```
## sim.**unlockPin**2<sup>8+</sup> ## sim.unlockPin2<sup>8+</sup>
unlockPin2(slotId: number, pin2: string): Promise&lt;LockStatusResponse\> unlockPin2(slotId: number, pin2: string): Promise&lt;LockStatusResponse\>
...@@ -1551,7 +1551,7 @@ promise.then(data => { ...@@ -1551,7 +1551,7 @@ promise.then(data => {
}); });
``` ```
## sim.**unlockPuk**2<sup>8+</sup> ## sim.unlockPuk2<sup>8+</sup>
unlockPuk2(slotId: number, newPin2: string, puk2: string, callback: AsyncCallback<LockStatusResponse\>): void unlockPuk2(slotId: number, newPin2: string, puk2: string, callback: AsyncCallback<LockStatusResponse\>): void
...@@ -1583,7 +1583,7 @@ sim.unlockPuk2(0, newPin2, puk2, (err, data) => { ...@@ -1583,7 +1583,7 @@ sim.unlockPuk2(0, newPin2, puk2, (err, data) => {
``` ```
## sim.**unlockPuk2**<sup>8+</sup> ## sim.unlockPuk2<sup>8+</sup>
unlockPuk2(slotId: number, newPin2: string, puk2: string): Promise&lt;LockStatusResponse\> unlockPuk2(slotId: number, newPin2: string, puk2: string): Promise&lt;LockStatusResponse\>
......
...@@ -118,6 +118,7 @@ try { ...@@ -118,6 +118,7 @@ try {
subscribeThermalLevel(callback: AsyncCallback&lt;ThermalLevel&gt;): void subscribeThermalLevel(callback: AsyncCallback&lt;ThermalLevel&gt;): void
> NOTE<br>
> This API is deprecated since API version 9. You are advised to use [thermal.registerThermalLevelCallback](#thermalregisterthermallevelcallback9) instead. > This API is deprecated since API version 9. You are advised to use [thermal.registerThermalLevelCallback](#thermalregisterthermallevelcallback9) instead.
Subscribes to thermal level changes. Subscribes to thermal level changes.
...@@ -142,6 +143,7 @@ thermal.subscribeThermalLevel((level) => { ...@@ -142,6 +143,7 @@ thermal.subscribeThermalLevel((level) => {
unsubscribeThermalLevel(callback?: AsyncCallback\<void>): void unsubscribeThermalLevel(callback?: AsyncCallback\<void>): void
> NOTE<br>
> This API is deprecated since API version 9. You are advised to use [thermal.unregisterThermalLevelCallback](#thermalunregisterthermallevelcallback9) instead. > This API is deprecated since API version 9. You are advised to use [thermal.unregisterThermalLevelCallback](#thermalunregisterthermallevelcallback9) instead.
Unsubscribes from thermal level changes. Unsubscribes from thermal level changes.
...@@ -166,6 +168,7 @@ thermal.unsubscribeThermalLevel(() => { ...@@ -166,6 +168,7 @@ thermal.unsubscribeThermalLevel(() => {
getThermalLevel(): ThermalLevel getThermalLevel(): ThermalLevel
> NOTE<br>
> This API is deprecated since API version 9. You are advised to use [thermal.getLevel](#thermalgetlevel9) instead. > This API is deprecated since API version 9. You are advised to use [thermal.getLevel](#thermalgetlevel9) instead.
Obtains the current thermal level. Obtains the current thermal level.
......
...@@ -13,6 +13,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput ...@@ -13,6 +13,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput
## Action ## Action
Enumerates touch actions.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
| Name | Value | Description | | Name | Value | Description |
...@@ -24,6 +26,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput ...@@ -24,6 +26,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput
## ToolType ## ToolType
Enumerates tool types.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
| Name | Value | Description | | Name | Value | Description |
...@@ -39,6 +43,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput ...@@ -39,6 +43,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput
## SourceType ## SourceType
Enumerates source types.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
| Name | Value | Description | | Name | Value | Description |
...@@ -49,6 +55,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput ...@@ -49,6 +55,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput
## Touch ## Touch
Defines a touch action.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
| Name| Type| Readable| Writable| Description| | Name| Type| Readable| Writable| Description|
...@@ -74,6 +82,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput ...@@ -74,6 +82,8 @@ import {Action,ToolType,SourceType,Touch,TouchEvent} from '@ohos.multimodalInput
## TouchEvent ## TouchEvent
Defines a touch event.
**System capability**: SystemCapability.MultimodalInput.Input.Core **System capability**: SystemCapability.MultimodalInput.Input.Core
| Name| Type| Readable| Writable| Description| | Name| Type| Readable| Writable| Description|
......
...@@ -43,7 +43,7 @@ console.log(`devicesList = ${JSON.stringify(devicesList)}`); ...@@ -43,7 +43,7 @@ console.log(`devicesList = ${JSON.stringify(devicesList)}`);
vendorId: 7531, vendorId: 7531,
productId: 2, productId: 2,
clazz: 9, clazz: 9,
subclass: 0, subClass: 0,
protocol: 1, protocol: 1,
devAddress: 1, devAddress: 1,
busNum: 1, busNum: 1,
...@@ -60,7 +60,7 @@ console.log(`devicesList = ${JSON.stringify(devicesList)}`); ...@@ -60,7 +60,7 @@ console.log(`devicesList = ${JSON.stringify(devicesList)}`);
id: 0, id: 0,
protocol: 0, protocol: 0,
clazz: 9, clazz: 9,
subclass: 0, subClass: 0,
alternateSetting: 0, alternateSetting: 0,
name: "1-1", name: "1-1",
endpoints: [ endpoints: [
...@@ -171,7 +171,7 @@ usb.requestRight(devicesName).then((ret) => { ...@@ -171,7 +171,7 @@ usb.requestRight(devicesName).then((ret) => {
## usb.claimInterface ## usb.claimInterface
claimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): number claimInterface(pipe: USBDevicePipe, iface: USBInterface, force ?: boolean): number
Claims a USB interface. Claims a USB interface.
...@@ -348,7 +348,7 @@ let ret = usb.getFileDescriptor(devicepipe); ...@@ -348,7 +348,7 @@ let ret = usb.getFileDescriptor(devicepipe);
## usb.controlTransfer ## usb.controlTransfer
controlTransfer(pipe: USBDevicePipe, controlparam: USBControlParams, timeout?: number): Promise&lt;number&gt; controlTransfer(pipe: USBDevicePipe, controlparam: USBControlParams, timeout ?: number): Promise&lt;number&gt;
Performs control transfer. Performs control transfer.
...@@ -380,7 +380,7 @@ usb.controlTransfer(devicepipe, USBControlParams).then((ret) => { ...@@ -380,7 +380,7 @@ usb.controlTransfer(devicepipe, USBControlParams).then((ret) => {
## usb.bulkTransfer ## usb.bulkTransfer
bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, timeout?: number): Promise&lt;number&gt; bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, timeout ?: number): Promise&lt;number&gt;
Performs bulk transfer. Performs bulk transfer.
......
...@@ -42,7 +42,7 @@ console.log(`devicesList = ${JSON.stringify(devicesList)}`); ...@@ -42,7 +42,7 @@ console.log(`devicesList = ${JSON.stringify(devicesList)}`);
vendorId: 7531, vendorId: 7531,
productId: 2, productId: 2,
clazz: 9, clazz: 9,
subclass: 0, subClass: 0,
protocol: 1, protocol: 1,
devAddress: 1, devAddress: 1,
busNum: 1, busNum: 1,
...@@ -59,7 +59,7 @@ console.log(`devicesList = ${JSON.stringify(devicesList)}`); ...@@ -59,7 +59,7 @@ console.log(`devicesList = ${JSON.stringify(devicesList)}`);
id: 0, id: 0,
protocol: 0, protocol: 0,
clazz: 9, clazz: 9,
subclass: 0, subClass: 0,
alternateSetting: 0, alternateSetting: 0,
name: "1-1", name: "1-1",
endpoints: [ endpoints: [
...@@ -252,7 +252,7 @@ if (usb.addRight(bundleName, devicesName) { ...@@ -252,7 +252,7 @@ if (usb.addRight(bundleName, devicesName) {
## usb.claimInterface ## usb.claimInterface
claimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): number claimInterface(pipe: USBDevicePipe, iface: USBInterface, force ?: boolean): number
Claims a USB interface. Claims a USB interface.
...@@ -429,7 +429,7 @@ let ret = usb.getFileDescriptor(devicepipe); ...@@ -429,7 +429,7 @@ let ret = usb.getFileDescriptor(devicepipe);
## usb.controlTransfer ## usb.controlTransfer
controlTransfer(pipe: USBDevicePipe, controlparam: USBControlParams, timeout?: number): Promise&lt;number&gt; controlTransfer(pipe: USBDevicePipe, controlparam: USBControlParams, timeout ?: number): Promise&lt;number&gt;
Performs control transfer. Performs control transfer.
...@@ -461,7 +461,7 @@ usb.controlTransfer(devicepipe, USBControlParams).then((ret) => { ...@@ -461,7 +461,7 @@ usb.controlTransfer(devicepipe, USBControlParams).then((ret) => {
## usb.bulkTransfer ## usb.bulkTransfer
bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, timeout?: number): Promise&lt;number&gt; bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, timeout ?: number): Promise&lt;number&gt;
Performs bulk transfer. Performs bulk transfer.
......
...@@ -9,7 +9,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** ...@@ -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: - Command for subscribing to real-time system events:
``` ```shell
hisysevent -r hisysevent -r
``` ```
...@@ -21,7 +21,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** ...@@ -21,7 +21,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin**
- Command for enabling the debugging mode: - Command for enabling the debugging mode:
``` ```shell
hisysevent -r -d hisysevent -r -d
``` ```
...@@ -29,11 +29,11 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** ...@@ -29,11 +29,11 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin**
| Option| Description| | 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: - Command for subscribing to real-time system events by event tag:
``` ```shell
hisysevent -r -t <tag> [-c [WHOLE_WORD|PREFIX|REGULAR]] hisysevent -r -t <tag> [-c [WHOLE_WORD|PREFIX|REGULAR]]
``` ```
...@@ -42,11 +42,11 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** ...@@ -42,11 +42,11 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin**
| Option| Description| | Option| Description|
| -------- | -------- | | -------- | -------- |
| -t | Event tag used to filter subscribed real-time system events.| | -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: Example:
``` ```shell
# hisysevent -r -t "STA" -c PREFIX # 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_":""} {"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 # hisysevent -r -t "STAw{0,6}" -c REGULAR
...@@ -57,7 +57,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** ...@@ -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: - Command for subscribing to real-time system events by event domain and event name:
``` ```shell
hisysevent -r -o <domain> -n <eventName> [-c [WHOLE_WORD|PREFIX|REGULAR]] hisysevent -r -o <domain> -n <eventName> [-c [WHOLE_WORD|PREFIX|REGULAR]]
``` ```
...@@ -67,11 +67,11 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** ...@@ -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.| | -o | Event domain used to filter subscribed real-time system events.|
| -n | Event name 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: Example:
``` ```shell
# hisysevent -r -o "RELIABILITY" -n "APP_FREEZE" # 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_":""} {"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 # 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** ...@@ -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: - Command for subscribing to real-time system events by event type:
``` ```shell
hisysevent -r -g [FAULT|STATISTIC|SECURITY|BEHAVIOR] hisysevent -r -g [FAULT|STATISTIC|SECURITY|BEHAVIOR]
``` ```
...@@ -97,7 +97,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** ...@@ -97,7 +97,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin**
Example: Example:
``` ```shell
# hisysevent -r -o "RELIABILITY" -n "APP_FREEZE" -g FAULT # 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_":""} {"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 # 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** ...@@ -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_":""} {"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 ## Querying Historical System Events
- Command for querying historical system events: - Command for querying historical system events:
``` ```shell
hisysevent -l hisysevent -l
``` ```
...@@ -124,7 +125,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** ...@@ -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: - Command for querying historical system events within the specified period of time:
``` ```shell
hisysevent -l -s <begin time> -e <end time> hisysevent -l -s <begin time> -e <end time>
``` ```
...@@ -132,21 +133,46 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** ...@@ -132,21 +133,46 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin**
| Option| Description| | Option| Description|
| -------- | -------- | | -------- | -------- |
| -s | Start time for querying historical system events. Only system events generated after the start time are returned.| | -s | Original start timestamp 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.| | -e | Original end timestamp for querying historical system events. Only system events generated before the end time are returned.|
Example: Example:
``` ```shell
# hisysevent -l -s 1501964222980 -e 1501964222996 # 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_":"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_":"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_":""} {"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 <begin time> -E <end time>
``` ```
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 <max hisysevent count> hisysevent -l -m <max hisysevent count>
``` ```
...@@ -158,14 +184,14 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** ...@@ -158,14 +184,14 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin**
Example: Example:
``` ```shell
# hisysevent -l -s 1501964222980 -e 1501964222996 -m 1 # 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_":""} {"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: - Command for querying historical system events by event domain and event name:
``` ```shell
hisysevent -l -o <domain> -n <eventName> [-c WHOLE_WORD] hisysevent -l -o <domain> -n <eventName> [-c WHOLE_WORD]
``` ```
...@@ -173,24 +199,24 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** ...@@ -173,24 +199,24 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin**
| Option| Description| | Option| Description|
| -------- | -------- | | -------- | -------- |
| -o | Domain based on which historical system events are queried.| | -o | Event domain based on which historical system events are queried.|
| -n | Name 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**.| | -c | Rule for matching the domain and name of historical system events. The option can only be **WHOLE_WORD**.|
Example: Example:
``` ```shell
# hisysevent -l -n "APP_FREEZE" # 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_":""} {"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_":""} {"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_":""} {"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: - Command for querying historical system events by event type:
``` ```shell
hisysevent -l -g [FAULT|STATISTIC|SECURITY|BEHAVIOR] hisysevent -l -g [FAULT|STATISTIC|SECURITY|BEHAVIOR]
``` ```
...@@ -202,7 +228,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** ...@@ -202,7 +228,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin**
Example: Example:
``` ```shell
# hisysevent -l -o "RELIABILITY" -g FAULT # 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_":""} {"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 # hisysevent -l -n "POWER_RUNNINGLOCK" -c WHOLE_WORD -g STATISTIC
...@@ -215,9 +241,9 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** ...@@ -215,9 +241,9 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin**
## System Event Validity Check ## System Event Validity Check
- Enabling system event validity check - Command for enabling system event validity check
``` ```shell
hisysevent -v hisysevent -v
``` ```
...@@ -229,7 +255,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin** ...@@ -229,7 +255,7 @@ The HiSysEvent tool is a command line tool preconfigured in the **/system/bin**
Example: Example:
``` ```shell
# hisysevent -v -l -s 1501964222980 -e 1501964222996 # 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. # 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_":""} {"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_":""}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册