diff --git a/en/application-dev/connectivity/Readme-EN.md b/en/application-dev/connectivity/Readme-EN.md index 59df854e8a37289cc9dcf55ed2f7d8110a7c84d0..c09ca21b6d0814bd1cd2cecb95b0d2896fada8c4 100755 --- a/en/application-dev/connectivity/Readme-EN.md +++ b/en/application-dev/connectivity/Readme-EN.md @@ -5,7 +5,6 @@ - [HTTP Data Request](http-request.md) - [WebSocket Connection](websocket-connection.md) - [Socket Connection](socket-connection.md) - - [Network Policy Management](net-policy-management.md) - [Network Sharing](net-sharing.md) - [Ethernet Connection](net-ethernet.md) - [Network Connection Management](net-connection-manager.md) diff --git a/en/application-dev/connectivity/net-connection-manager.md b/en/application-dev/connectivity/net-connection-manager.md index 5ee75a717882c3344612e741b2e197fa6e57509d..c443c93759caddbc5203b65022426882c0bb960b 100644 --- a/en/application-dev/connectivity/net-connection-manager.md +++ b/en/application-dev/connectivity/net-connection-manager.md @@ -39,7 +39,7 @@ For the complete list of APIs and example code, see [Network Connection Manageme | ---- | ---- | ---- | | ohos.net.connection | function getDefaultNet(callback: AsyncCallback\): void; |Creates a **NetHandle** object that contains the **netId** of the default network. This API uses an asynchronous callback to return the result.| | ohos.net.connection | function getGlobalHttpProxy10+(callback: AsyncCallback\): void;| Obtains the global HTTP proxy for the network. This API uses an asynchronous callback to return the result.| -| ohos.net.connection | function setGlobalHttpProxy10+(httpProxy: HttpProxy, callback: AsyncCallback): void;| Sets the global HTTP proxy for the network. This API uses an asynchronous callback to return the result.| +| ohos.net.connection | function setGlobalHttpProxy10+(httpProxy: HttpProxy, callback: AsyncCallback\): void;| Sets the global HTTP proxy for the network. This API uses an asynchronous callback to return the result.| | ohos.net.connection | function getAppNet9+(callback: AsyncCallback\): void;| Obtains a **NetHandle** object that contains the **netId** of the network bound to the application. This API uses an asynchronous callback to return the result.| | ohos.net.connection | function setAppNet9+(netHandle: NetHandle, callback: AsyncCallback\): void;| Binds an application to the specified network. The application can access the external network only through this network. This API uses an asynchronous callback to return the result.| | ohos.net.connection | function getDefaultNetSync9+(): NetHandle; |Obtains the default active data network in synchronous mode. You can use **getNetCapabilities** to obtain information such as the network type and capabilities.| @@ -47,7 +47,7 @@ For the complete list of APIs and example code, see [Network Connection Manageme | ohos.net.connection | function getAllNets(callback: AsyncCallback\>): void;| Obtains the list of **NetHandle** objects of the connected network. This API uses an asynchronous callback to return the result.| | ohos.net.connection | function getConnectionProperties(netHandle: NetHandle, callback: AsyncCallback\): void; |Obtains link information of the default network. This API uses an asynchronous callback to return the result.| | ohos.net.connection | function getNetCapabilities(netHandle: NetHandle, callback: AsyncCallback\): void; |Obtains the capability set of the default network. This API uses an asynchronous callback to return the result.| -| ohos.net.connection | function isDefaultNetMetered9+(callback: AsyncCallback): void; |Checks whether the data traffic usage on the current network is metered. This API uses an asynchronous callback to return the result.| +| ohos.net.connection | function isDefaultNetMetered9+(callback: AsyncCallback\): void; |Checks whether the data traffic usage on the current network is metered. This API uses an asynchronous callback to return the result.| | ohos.net.connection | function reportNetConnected(netHandle: NetHandle, callback: AsyncCallback\): void;| Reports a **netAavailable** event to NetManager. If this API is called, the application considers that its network status (ohos.net.connection.NetCap.NET_CAPABILITY_VAILDATED) is inconsistent with that of NetManager. This API uses an asynchronous callback to return the result.| | ohos.net.connection | function reportNetDisconnected(netHandle: NetHandle, callback: AsyncCallback\): void;| Reports a **netAavailable** event to NetManager. If this API is called, the application considers that its network status (ohos.net.connection.NetCap.NET_CAPABILITY_VAILDATED) is inconsistent with that of NetManager. This API uses an asynchronous callback to return the result.| | ohos.net.connection | function getAddressesByName(host: string, callback: AsyncCallback\>): void; |Obtains all IP addresses of the specified network by resolving the domain name. This API uses an asynchronous callback to return the result.| diff --git a/en/application-dev/connectivity/net-mgmt-overview.md b/en/application-dev/connectivity/net-mgmt-overview.md index 043d41768f89dd851839eae893b7ba4409395f5e..f03d7668edc9fc27ef22c4ef4d69b186f7b4c3d9 100644 --- a/en/application-dev/connectivity/net-mgmt-overview.md +++ b/en/application-dev/connectivity/net-mgmt-overview.md @@ -5,7 +5,6 @@ Network management functions include: - [HTTP data request](http-request.md): initiates a data request through HTTP. - [WebSocket connection](websocket-connection.md): establishes a bidirectional connection between the server and client through WebSocket. - [Socket connection](socket-connection.md): transmits data through Socket. -- [Network policy management](net-policy-management.md): restricts network capabilities by setting network policies, including cellular network policy, sleep/power-saving mode policy, and background network policy, and resets network policies as needed. - [Network sharing](net-sharing.md): shares a device's Internet connection with other connected devices by means of Wi-Fi hotspot, Bluetooth, and USB sharing, and queries the network sharing state and shared mobile data volume. - [Ethernet connection](net-ethernet.md): provides wired network capabilities, which allow you to set the IP address, subnet mask, gateway, and Domain Name System (DNS) server of a wired network. - [Network connection management](net-connection-manager.md): provides basic network management capabilities, including management of Wi-Fi/cellular/Ethernet connection priorities, network quality evaluation, subscription to network connection status changes, query of network connection information, and DNS resolution. diff --git a/en/application-dev/connectivity/net-policy-management.md b/en/application-dev/connectivity/net-policy-management.md deleted file mode 100644 index 6450bd671e565fdffafb7eeed499e123893a45a3..0000000000000000000000000000000000000000 --- a/en/application-dev/connectivity/net-policy-management.md +++ /dev/null @@ -1,402 +0,0 @@ -# Network Policy Management - -## Introduction - -The Network Policy Management module allows you to restrict network capabilities by setting network policies, including cellular network policy, sleep/power-saving mode policy, and background network policy, and to reset network policies as needed. - -> **NOTE** -> To maximize the application running efficiency, most API calls are called asynchronously in callback or promise mode. The following code examples use the callback mode. For details about the APIs, see [sms API Reference](../reference/apis/js-apis-net-policy.md). - -## Basic Concepts - -- Sleep mode: A mode in which the system shuts down some idle components and peripherals to enter the low-power mode and restricts some applications from accessing the network. -- Power-saving mode: A mode in which the system disables certain functions and features to save power. When this mode is enabled, the system performance deteriorates and some applications are restricted from accessing the network. -- Traffic-saving mode: A mode in which the system restricts background applications that use the metering network. It is equivalent to the background network policy. -- Cellular network: A mobile communication network. -- Metering network: A mobile network with preconfigured traffic quota, WLAN network, or Ethernet network. - -## **Constraints** - -- Programming language: C++ and JS -- System: Linux kernel -- The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. - -## When to Use - -Typical application scenarios of network policy management are as follows: - -- Managing the metering network policy: Set the metering network quota and obtain the configured metering network policy. -- Managing network access for an application in the background: Set and obtain the status of the background network restriction switch, and check whether the application indicated by the specified UID can access the network in the background. -- Managing the metering network access policy: Set and obtain the policy for the application indicated by the specified UID to access the metering network, and obtain the UIDs of the applications for which the policy is configured. -- Restoring network policies -- Checking whether an application indicated by the specified UID can access a metering or non-metering network -- Adding a UID to or removing a UID from the sleep mode allowlist, and obtaining the sleep mode allowlist -- Adding a UID to or removing a UID from the power-saving mode allowlist, and obtaining the power-saving mode allowlist -- Updating the network notification policy - -The following describes the development procedure specific to each application scenario. - -## Available APIs - -For the complete list of APIs and example code, see [Network Policy Management](../reference/apis/js-apis-net-policy.md). - -| Type| API| Description| -| ---- | ---- | ---- | -| ohos.net.policy | function setBackgroundPolicy(isAllowed: boolean, callback: AsyncCallback\): void |Sets a background network policy. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function isBackgroundAllowed(callback: AsyncCallback\): void; |Obtains the background network policy. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function setPolicyByUid(uid: number, policy: NetUidPolicy, callback: AsyncCallback\): void; |Sets an application-specific network policy by **uid**. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function getPolicyByUid(uid: number, callback: AsyncCallback\): void;| Obtains an application-specific network policy by **uid**. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function getUidsByPolicy(policy: NetUidPolicy, callback: AsyncCallback\>): void; | Obtains the UID array of applications configured with a certain application-specific network policy. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function getNetQuotaPolicies(callback: AsyncCallback\>): void; |Obtains the network quota policies. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function setNetQuotaPolicies(quotaPolicies: Array\, callback: AsyncCallback\): void; |Sets an array of network quota policies. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function restoreAllPolicies(iccid: string, callback: AsyncCallback\): void; | Restores all the policies (cellular network, background network, firewall, and application-specific network policies) for the given SIM card. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function isUidNetAllowed(uid: number, isMetered: boolean, callback: AsyncCallback\): void; | Checks whether an application is allowed to access metering or non-metering networks. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function isUidNetAllowed(uid: number, iface: string, callback: AsyncCallback\): void; | Checks whether an application is allowed to access the given network. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function setDeviceIdleAllowList(uid: number, isAllowed: boolean, callback: AsyncCallback\): void; | Sets whether to add an application to the device idle allowlist. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function getDeviceIdleAllowList(callback: AsyncCallback\>): void; | Obtains the UID array of applications that are on the device idle allowlist. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function getBackgroundPolicyByUid(uid: number, callback: AsyncCallback\): void; | Obtains the background network policies configured for the given application. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function resetPolicies(iccid: string, callback: AsyncCallback\): void; | Restores all the policies (cellular network, background network, firewall, and application-specific network policies) for the given SIM card. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function updateRemindPolicy(netType: NetBearType, iccid: string, remindType: RemindType, callback: AsyncCallback\): void; | Updates a reminder policy. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function setPowerSaveAllowList(uid: number, isAllowed: boolean, callback: AsyncCallback\): void; | Sets whether to add an application to the power-saving allowlist. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function getPowerSaveAllowList(callback: AsyncCallback\>): void; | Obtains the UID array of applications that are on the power-saving allowlist. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function on(type: "netUidPolicyChange", callback: Callback\<{ uid: number, policy: NetUidPolicy }>): void; | Subscribes to policy changes. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function off(type: "netUidPolicyChange", callback: Callback\<{ uid: number, policy: NetUidPolicy }>): void; | Unsubscribes from policy changes. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function on(type: "netUidRuleChange", callback: Callback\<{ uid: number, rule: NetUidRule }>): void; | Subscribes to rule changes. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function off(type: "netUidRuleChange", callback: Callback\<{ uid: number, rule: NetUidRule }>): void; | Unsubscribes from rule changes. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function on(type: "netMeteredIfacesChange", callback: Callback\>): void; | Subscribes to metered **iface** changes. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function off(type: "netMeteredIfacesChange", callback: Callback\>): void; | Unsubscribes from metered **iface** changes. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function on(type: "netQuotaPolicyChange", callback: Callback\>): void; | Subscribes to network quota policy changes. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function off(type: "netQuotaPolicyChange", callback: Callback\>): void; | Unsubscribes from network quota policy changes. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function on(type: "netBackgroundPolicyChange", callback: Callback\): void; | Subscribes to background network policy changes. This API uses an asynchronous callback to return the result.| -| ohos.net.policy | function off(type: "netBackgroundPolicyChange", callback: Callback\): void; | Unsubscribes from background network policy changes. This API uses an asynchronous callback to return the result.| - -## Managing the Metering Network Policy - -1. Import the **policy** namespace from **@ohos.net.policy.d.ts**. - -2. Call **setNetQuotaPolicies** to configure the metering network policy. - -3. Call **getNetQuotaPolicies** to obtain the configured metering network policy. - -```js - // Import the policy namespace. - import policy from '@ohos.net.policy'; - - addNetQuotaPolicy(){ - let param = { - // For details about the value of netType, see [NetBearType](../reference/apis/js-apis-net-connection.md#netbeartype). - netType:Number.parseInt(this.netType), - - // Integrated circuit card identifier (ICCID) of the SIM card on the metering cellular network. It is not available for an Ethernet or Wi-Fi network. - iccid:this.iccid, - - // Used together with ICCID on the metering cellular network. It is used independently on an Ethernet or Wi-Fi network. - ident:this.ident, - - // Metering start time, for example, M1, D1, and Y1. - periodDuration:this.periodDuration, - - // Set the traffic threshold for generating an alarm to an integer greater than 0. - warningBytes:Number.parseInt(this.warningBytes), - - // Set the traffic quota to an integer greater than 0. - limitBytes:Number.parseInt(this.limitBytes), - - // Specify whether the network is a metering network. The value true means a metering network and false means a non-metering network. - metered:Boolean(Number.parseInt(this.metered)),https://gitee.com/openharmony/docs/pulls/14404 - // For details about the action triggered after the traffic limit is reached, see [LimitAction](../reference/apis/js-apis-net-policy.md#limitaction). - limitAction:Number.parseInt(this.limitAction) - }; - this.netQuotaPolicyList.push(param); - }, - - // Subscribe to metered iface changes. - policy.on('netMeteredIfacesChange', (data) => { - this.log('on netMeteredIfacesChange: ' + JSON.stringify(data)); - }); - - // Subscribe to metering network policy changes. - policy.on('netQuotaPolicyChange', (data) => { - this.log('on netQuotaPolicyChange: ' + JSON.stringify(data)); - }); - - // Call setNetQuotaPolicies to configure the metering network policy. - setNetQuotaPolicies(){ - this.dialogType = DialogType.HIDE; - policy.setNetQuotaPolicies(this.netQuotaPolicyList, (err, data) => { - console.log(JSON.stringify(err)); - console.log(JSON.stringify(data)); - }); - }, - - // Call getNetQuotaPolicies to obtain the configured metering network policy. - getNetQuotaPolicies(){ - policy.getNetQuotaPolicies((err, data) => { - this.callBack(err, data); - if(data){ - this.netQuotaPolicyList = data; - } - }); - }, - - // Unsubscribe from metered iface changes. - policy.off('netMeteredIfacesChange', (data) => { - this.log('off netMeteredIfacesChange: ' + JSON.stringify(data)); - }); - - // Unsubscribe from metering network policy changes. - policy.off('netQuotaPolicyChange', (data) => { - this.log('off netQuotaPolicyChange: ' + JSON.stringify(data)); - }); -``` - -## Managing Network Access for an Application in the Background - -### How to Develop - -1. Import the **policy** namespace from **@ohos.net.policy.d.ts**. - -2. Call **setBackgroundAllowed** to enable or disable the background network restriction switch. - -3. Call **isBackgroundAllowed** to check whether the background network restriction switch is enabled or disabled. - -4. Call **getBackgroundPolicyByUid** to check whether the application indicated b the specified UID can access the network in the background. - -```js - // Import the policy namespace. - import policy from '@ohos.net.policy' - - // Subscribe to background network policy changes. - policy.on('netBackgroundPolicyChange', (data) => { - this.log('on netBackgroundPolicyChange: ' + JSON.stringify(data)); - }); - - // Call setBackgroundAllowed to enable or disable the background network restriction switch. - setBackgroundAllowed() { - policy.setBackgroundAllowed(Boolean(Number.parseInt(this.isBoolean)), (err, data) => { - console.log(JSON.stringify(err)); - console.log(JSON.stringify(data)) - }); - }, - - // Call isBackgroundAllowed to check whether the background network restriction switch is enabled or disabled. - isBackgroundAllowed() { - policy.isBackgroundAllowed((err, data) => { - console.log(JSON.stringify(err)); - console.log(JSON.stringify(data)) - }); - }, - - // Call getBackgroundPolicyByUid to check whether the application indicated b the specified UID can access the network in the background. - getBackgroundPolicyByUid() { - policy.getBackgroundPolicyByUid(Number.parseInt(this.firstParam), (err, data) => { - console.log(JSON.stringify(err)); - console.log(JSON.stringify(data)) - }); - }, - - // Unsubscribe from background network policy changes. - policy.off('netBackgroundPolicyChange', (data) => { - this.log('off netBackgroundPolicyChange: ' + JSON.stringify(data)); - }); -``` - -## Managing the Metering Network Access Policy - -### How to Develop - -1. Import the **policy** namespace from **@ohos.net.policy.d.ts**. - -2. Call **setPolicyByUid** to set whether the application indicated by the specified UID can access the network in the background. - -3. Call **getPolicyByUid** to check whether the metering network access policy for the application indicated by the specified UID. - -4. Call **getUidsByPolicy** to obtain the UIDs of the applications for which the metering network access policy is configured. - -```js - // Import the policy namespace. - import policy from '@ohos.net.policy' - - // Subscribe to policy changes of the application indicated by the specified UID. - policy.on('netUidPolicyChange', (data) => { - this.log('on netUidPolicyChange: ' + JSON.stringify(data)); - }); - - // Subscribe to rule changes of the application indicated by the specified UID. - policy.on('netUidRuleChange', (data) => { - this.log('on netUidRuleChange: ' + JSON.stringify(data)); - }); - - // Call setPolicyByUid to set whether the application indicated by the specified UID can access the network in the background. - setPolicyByUid() { - let param = { - uid: Number.parseInt(this.firstParam), policy: Number.parseInt(this.currentNetUidPolicy) - } - policy.setPolicyByUid(Number.parseInt(this.firstParam), Number.parseInt(this.currentNetUidPolicy), (err, data) => { - console.log(JSON.stringify(err)); - console.log(JSON.stringify(data)) - }); - }, - - // Call getPolicyByUid to check whether the metering network access policy for the application indicated by the specified UID. - getPolicyByUid() { - policy.getPolicyByUid(Number.parseInt(this.firstParam), (err, data) => { - console.log(JSON.stringify(err)); - console.log(JSON.stringify(data)) - }); - }, - - // Call getUidsByPolicy to obtain the UIDs of the applications for which the metering network access policy is configured. - getUidsByPolicy(){ - policy.getUidsByPolicy(Number.parseInt(this.currentNetUidPolicy), (err, data) => { - console.log(JSON.stringify(err)); - console.log(JSON.stringify(data)) - }); - }, - - // Unsubscribe from policy changes of the application indicated by the specified UID. - policy.off('netUidPolicyChange', (data) => { - this.log('off netUidPolicyChange: ' + JSON.stringify(data)); - }); - - // Unsubscribe from rule changes of the application indicated by the specified UID. - policy.off('netUidRuleChange', (data) => { - this.log('off netUidRuleChange: ' + JSON.stringify(data)); - }); - -``` - -## Restoring Network Policies - -### How to Develop - -1. Import the **policy** namespace from **@ohos.net.policy.d.ts**. - -2. Call **restoreAllPolicies** to restore all network policies. - -```js - // Import the policy namespace. - import policy from '@ohos.net.policy' - - // Call restoreAllPolicies to restore all network policies. - restoreAllPolicies(){ - policy.restoreAllPolicies(this.firstParam, (err, data) => { - console.log(JSON.stringify(err)); - console.log(JSON.stringify(data)) - }); - }, -``` - -## Checking Access to a Metering or Non-metering Network - -### How to Develop - -1. Import the **policy** namespace from **@ohos.net.policy.d.ts**. - -2. Call **isUidNetAllowed** to check whether the UID can access the metering or non-metering network. - -```js - // Import the policy namespace. - import policy from '@ohos.net.policy' - - // Call isUidNetAllowed to check whether the application indicated by the specified UID can access the metering or non-metering network. - isUidNetAllowedIsMetered(){ - let param = { - uid: Number.parseInt(this.firstParam), isMetered: Boolean(Number.parseInt(this.isBoolean)) - } - policy.isUidNetAllowed(Number.parseInt(this.firstParam), Boolean(Number.parseInt(this.isBoolean)), (err, data) => { - console.log(JSON.stringify(err)); - console.log(JSON.stringify(data)) - }); - }, -``` - -## Managing the Sleep Mode Allowlist - -### How to Develop - -1. Import the **policy** namespace from **@ohos.net.policy.d.ts**. - -2. Call **setDeviceIdleAllowList** to add a UID to or remove a UID from the sleep mode allowlist. - -3. Call **getDeviceIdleAllowList** to obtain the UIDs added to the sleep mode allowlist. - -```js - // Import the policy namespace. - import policy from '@ohos.net.policy' - - // Call setDeviceIdleAllowList to add a UID to or remove a UID from the sleep mode allowlist. - setDeviceIdleAllowList(){ - let param = { - uid: Number.parseInt(this.firstParam), isAllowed: Boolean(Number.parseInt(this.isBoolean)) - } - policy.setDeviceIdleAllowList(Number.parseInt(this.firstParam), Boolean(Number.parseInt(this.isBoolean)), (err, data) => { - console.log(JSON.stringify(err)); - console.log(JSON.stringify(data)) - }); - }, - - // Call getDeviceIdleAllowList to obtain the UIDs added to the sleep mode allowlist. - getDeviceIdleAllowList(){ - policy.getDeviceIdleAllowList((err, data) => { - console.log(JSON.stringify(err)); - console.log(JSON.stringify(data)) - }); - }, -``` - -## Managing the Power-saving Mode Allowlist - -### How to Develop - -1. Import the **policy** namespace from **@ohos.net.policy.d.ts**. -2. Call **setPowerSaveAllowList** to add a UID to or remove a UID from the power-saving mode allowlist. -3. Call **getPowerSaveAllowList** to obtain the UIDs added to the power-saving mode allowlist. - -```js - // Import the policy namespace. - import policy from '@ohos.net.policy' - - // Call setPowerSaveAllowList to add a UID to or remove a UID from the power-saving mode allowlist. - setPowerSaveAllowList(){ - let param = { - uid: Number.parseInt(this.firstParam), isAllowed: Boolean(Number.parseInt(this.isBoolean)) - } - policy.setPowerSaveAllowList(Number.parseInt(this.firstParam), Boolean(Number.parseInt(this.isBoolean)), (err, data) => { - console.log(JSON.stringify(err)); - console.log(JSON.stringify(data)) - }); - }, - - // Call getPowerSaveAllowList to obtain the UIDs added to the power-saving mode allowlist. - getPowerSaveAllowList(){ - policy.getPowerSaveAllowList((err, data) => { - console.log(JSON.stringify(err)); - console.log(JSON.stringify(data)) - }); - }, -``` - -## Updating the Network Notification Policy - -### How to Develop - -1. Import the **policy** namespace from **@ohos.net.policy.d.ts**. - -2. Call **updateRemindPolicy** to update the network notification policy. - -```js - // Import the policy namespace. - import policy from '@ohos.net.policy' - - // Call updateRemindPolicy to update the network notification policy. - updateRemindPolicy() { - let param = { - netType: Number.parseInt(this.netType), iccid: this.firstParam, remindType: this.currentRemindType - } - policy.updateRemindPolicy(Number.parseInt(this.netType), this.firstParam, Number.parseInt(this.currentRemindType), (err, data) => { - console.log(JSON.stringify(err)); - console.log(JSON.stringify(data)) - }); - }, -``` diff --git a/en/application-dev/device/usb-guidelines.md b/en/application-dev/device/usb-guidelines.md index 68c8c3de013e75d56854bf0cf0e3a71aca9eb261..ef09e1ee89940220f8b9d1936362d34ebf8bf7a6 100644 --- a/en/application-dev/device/usb-guidelines.md +++ b/en/application-dev/device/usb-guidelines.md @@ -1,156 +1,161 @@ # USB Service Development + ## When to Use In Host mode, you can obtain the list of connected USB devices, enable or disable the devices, manage device access permissions, and perform data transfer or control transfer. -## APIs + +## Available APIs The USB service provides the following functions: query of USB device list, bulk data transfer, control transfer, and access permission management. The following table lists the USB APIs currently available. For details, see the [API Reference](../reference/apis/js-apis-usbManager.md). -**Table 1** Open USB APIs +**Table 1** Open USB APIs -| API | Description | +| Name | Description | | ------------------------------------------------------------ | ------------------------------------------------------------ | -| hasRight(deviceName: string): boolean | Checks whether the user has the device access permissions. | -| requestRight(deviceName: string): Promise\ | Requests the temporary permission for a given application to access the USB device. This API uses a promise to return the result. | -| connectDevice(device: USBDevice): Readonly\ | Connects to the USB device based on the device list returned by `getDevices()`. | -| 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: USBConfiguration): 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. | -| 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, controlparam: USBControlParams, timeout ?: number): Promise<number> | Performs control transfer. | +| hasRight(deviceName: string): boolean | Checks whether the user has the device access permissions.| +| requestRight(deviceName: string): Promise<boolean> | Requests the device access permissions for the application. This API uses a promise to return the result. | +| removeRight(deviceName: string): boolean | Revokes the device access permissions of the application.| +| connectDevice(device: USBDevice): Readonly<USBDevicePipe> | Connects to the USB device based on the device information returned by `getDevices()`. | +| getDevices(): Array<Readonly<USBDevice>> | Obtains the list of USB devices connected to the host. If no device is connected, an empty list is returned. | +| setConfiguration(pipe: USBDevicePipe, config: USBConfiguration): 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<number> | 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, controlparam: USBControlParams, timeout ?: number): Promise<number> | Performs control transfer. | + ## How to Develop -You can set a USB device as the USB host to connect to other USB devices for data transfer. The development procedure is as follows: - -1. Obtain the USB device list. - - ```js - // Import the USB API package. - import usb from '@ohos.usbManager'; - // Obtain the USB device list. - let deviceList = usb.getDevices(); - /* - Example deviceList structure - [ - { - name: "1-1", - serial: "", - manufacturerName: "", - productName: "", - version: "", - vendorId: 7531, - productId: 2, - clazz: 9, - subClass: 0, - protocol: 1, - devAddress: 1, - busNum: 1, - configs: [ - { - id: 1, - attributes: 224, - isRemoteWakeup: true, - isSelfPowered: true, - maxPower: 0, - name: "1-1", - interfaces: [ - { - id: 0, - protocol: 0, - clazz: 9, - subClass: 0, - alternateSetting: 0, - name: "1-1", - endpoints: [ - { - address: 129, - attributes: 3, - interval: 12, - maxPacketSize: 4, - direction: 128, - number: 1, - type: 3, - interfaceId: 0, - } - ] - } - ] - } - ] - } - ] - */ - ``` - +You can set a USB device as a host to connect to a device for data transfer. The development procedure is as follows: + + +1. Obtain the USB device list. + + ```js + // Import the USB API package. + import usb from '@ohos.usbManager'; + // Obtain the USB device list. + let deviceList = usb.getDevices(); + /* + Example deviceList structure: + [ + { + name: "1-1", + serial: "", + manufacturerName: "", + productName: "", + version: "", + vendorId: 7531, + productId: 2, + clazz: 9, + subClass: 0, + protocol: 1, + devAddress: 1, + busNum: 1, + configs: [ + { + id: 1, + attributes: 224, + isRemoteWakeup: true, + isSelfPowered: true, + maxPower: 0, + name: "1-1", + interfaces: [ + { + id: 0, + protocol: 0, + clazz: 9, + subClass: 0, + alternateSetting: 0, + name: "1-1", + endpoints: [ + { + address: 129, + attributes: 3, + interval: 12, + maxPacketSize: 4, + direction: 128, + number: 1, + type: 3, + interfaceId: 0, + } + ] + } + ] + } + ] + } + ] + */ + ``` 2. Obtain the device operation permissions. - ```js - let deviceName = deviceList[0].name; - // Request the permissions to operate a specified device. - usb.requestRight(deviceName).then(hasRight => { - console.info("usb device request right result: " + hasRight); - }).catch(error => { - console.info("usb device request right failed : " + error); - }); - ``` + ```js + let deviceName = deviceList[0].name; + // Request the permissions to operate a specified device. + usb.requestRight(deviceName).then(hasRight => { + console.info("usb device request right result: " + hasRight); + }).catch(error => { + console.info("usb device request right failed : " + error); + }); + ``` 3. Open the device. - ```js - // Open the device, and obtain the USB device pipe for data transfer. - let interface1 = deviceList[0].configs[0].interfaces[0]; - /* - Claim the corresponding interface from deviceList. - interface1 must be one present in the device configuration. - */ - usb.claimInterface(pipe, interface1, true); - ``` + ```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. + */ + usb.claimInterface(pipe, interface1, true); + ``` 4. Perform data transfer. - ```js - /* + ```js + /* 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. - */ - 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); - } 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. - - ```js - usb.releaseInterface(pipe, interface); - usb.closePipe(pipe); - ``` \ No newline at end of file + (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 => { + if (dataLength >= 0) { + console.info("usb readData result Length : " + dataLength); + } 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. + + ```js + usb.releaseInterface(pipe, interface1); + usb.closePipe(pipe); + ``` \ No newline at end of file diff --git a/en/application-dev/internationalization/intl-guidelines.md b/en/application-dev/internationalization/intl-guidelines.md index fcac5325292b27f349f6c3dcadb627dca2dd0c03..44b69713783501cc21c0612fa2bb08390a53dcc0 100644 --- a/en/application-dev/internationalization/intl-guidelines.md +++ b/en/application-dev/internationalization/intl-guidelines.md @@ -111,7 +111,7 @@ The [i18n](../reference/apis/js-apis-i18n.md) module provides enhanced I18N capa let dateTimeFormat = new Intl.DateTimeFormat(); ``` - Alternatively, use your own locale and formatting parameters to create a **DateTimeFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [DateTimeOptions](../reference/apis/js-apis-intl.md#datetimeoptions9). + Alternatively, use your own locale and formatting parameters to create a **DateTimeFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [DateTimeOptions](../reference/apis/js-apis-intl.md#datetimeoptions6). ```js let options = {dateStyle: "full", timeStyle: "full"}; @@ -181,7 +181,7 @@ The [i18n](../reference/apis/js-apis-i18n.md) module provides enhanced I18N capa let numberFormat = new Intl.NumberFormat(); ``` - Alternatively, use your own locale and formatting parameters to create a **NumberFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [NumberOptions](../reference/apis/js-apis-intl.md#numberoptions9). + Alternatively, use your own locale and formatting parameters to create a **NumberFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [NumberOptions](../reference/apis/js-apis-intl.md#numberoptions6). ```js let options = {compactDisplay: "short", notation: "compact"}; @@ -240,7 +240,7 @@ Users in different regions have different requirements for string sorting. [Coll let collator = new Intl.Collator(); ``` - Alternatively, use your own locale and formatting parameters to create a **Collator** object. For a full list of parameters, see [CollatorOptions](../reference/apis/js-apis-intl.md#collatoroptions9). + Alternatively, use your own locale and formatting parameters to create a **Collator** object. For a full list of parameters, see [CollatorOptions](../reference/apis/js-apis-intl.md#collatoroptions8). The **sensitivity** parameter is used to specify the levels of differences that will be used for string comparison. The value **base** indicates that only characters are compared, but not the accent and capitalization. For example, 'a' != 'b', 'a' == '', 'a'=='A'. The value **accent** indicates that the accent is considered, but not the capitalization. For example, 'a' != 'b', 'a' == '', 'a'=='A'. The value **case** indicates that the capitalization is considered, but the accent. For example, 'a' != 'b', 'a' == '', 'a'=='A'. The value **variant** indicates that the accent and capitalization are considered. For example, 'a' != 'b', 'a' == '', 'a'=='A'. ```js @@ -301,7 +301,7 @@ According to grammars in certain languages, the singular or plural form of a nou let pluralRules = new Intl.PluralRules(); ``` - Alternatively, use your own locale and formatting parameters to create a **PluralRules** object. For a full list of parameters, see [PluralRulesOptions](../reference/apis/js-apis-intl.md#pluralrulesoptions9). + Alternatively, use your own locale and formatting parameters to create a **PluralRules** object. For a full list of parameters, see [PluralRulesOptions](../reference/apis/js-apis-intl.md#pluralrulesoptions8). ```js let pluralRules = new Intl.PluralRules("zh-CN", {localeMatcher: "best fit", type: "cardinal"}); @@ -349,7 +349,7 @@ According to grammars in certain languages, the singular or plural form of a nou let relativeTimeFormat = new Intl.RelativeTimeFormat(); ``` - Alternatively, use your own locale and formatting parameters to create a **RelativeTimeFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [RelativeTimeFormatInputOptions](../reference/apis/js-apis-intl.md#relativetimeformatinputoptions9). + Alternatively, use your own locale and formatting parameters to create a **RelativeTimeFormat** object. Formatting parameters are optional. For a full list of formatting parameters, see [RelativeTimeFormatInputOptions](../reference/apis/js-apis-intl.md#relativetimeformatinputoptions8). ```js let relativeTimeFormat = new Intl.RelativeTimeFormat("zh-CN", {numeric: "always", style: "long"}); @@ -384,4 +384,4 @@ According to grammars in certain languages, the singular or plural form of a nou ```js let relativeTimeFormat = new Intl.RelativeTimeFormat("zh-CN", {numeric: "always", style: "long"}); let options = relativeTimeFormat.resolvedOptions(); // options = {"locale": "zh-CN", "style": "long", "numeric": "always", "numberingSystem": "latn"} - ``` + ``` \ No newline at end of file diff --git a/en/application-dev/quick-start/figures/ci_download.png b/en/application-dev/quick-start/figures/ci_download.png new file mode 100644 index 0000000000000000000000000000000000000000..da0d306e0f95a4fa114af51ca010d9109ae7e029 Binary files /dev/null and b/en/application-dev/quick-start/figures/ci_download.png differ diff --git a/en/application-dev/quick-start/figures/compiler.png b/en/application-dev/quick-start/figures/compiler.png new file mode 100644 index 0000000000000000000000000000000000000000..3854c378fd56761952b0f6443458e4ae663b3bf2 Binary files /dev/null and b/en/application-dev/quick-start/figures/compiler.png differ diff --git a/en/application-dev/quick-start/figures/sdk-structure.png b/en/application-dev/quick-start/figures/sdk-structure.png new file mode 100644 index 0000000000000000000000000000000000000000..18a9315151bc7b184a87c2f95b23238bbefc2b82 Binary files /dev/null and b/en/application-dev/quick-start/figures/sdk-structure.png differ diff --git a/en/application-dev/quick-start/howto-migrate-cmake-with-ohosndk.md b/en/application-dev/quick-start/howto-migrate-cmake-with-ohosndk.md new file mode 100644 index 0000000000000000000000000000000000000000..ae328b3e52b577be0fd9fcefd58b0e215e3d7ca4 --- /dev/null +++ b/en/application-dev/quick-start/howto-migrate-cmake-with-ohosndk.md @@ -0,0 +1,173 @@ +# Using Native APIs (NDK) of the OHOS SDK in a CMake Project + +## What Is Native API +For details, see [Native APIs](https://gitee.com/openharmony/docs/blob/master/en/application-dev/napi/Readme-EN.md). + +## Downloading the NDK + +You download the Native API Development Kit (NDK) by downloading the OHOS SDK, where the NDK is included. To download the OHOS SDK, use any of the following modes: + +- (Recommended) Acquire source code from mirrors for an officially released version. For details, see [release notes](https://gitee.com/openharmony/docs/tree/master/en/release-notes#/openharmony/docs/blob/master/en/release-notes/OpenHarmony-v3.2-release.md). +- Download the SDK from the SDK Manager in DevEco Studio. +- Download the SDK from the [daily build](http://ci.openharmony.cn/dailys/dailybuilds), by clicking the download link to the ohos-sdk component. + ![Download from Daily Build](figures/ci_download.png) + +## Decompressing the NDK + +Place the downloaded NDK in a folder you prefer and decompress it. Below shows the directory structure after decompression. +![SDK Directory Structure](figures/sdk-structure.png) + +Configure the Linux environment as follows: (Skip this step if the NDK is downloaded from DevEco Studio.) + +1. Add the CMake tool that comes with the NDK to the environment variables. + +``` + # Open the .bashrc file. + vim ~/.bashrc + # Append the custom CMake path to the file. Save the file and exit. + export PATH=~/ohos-sdk/ohos-sdk/linux/native/build-tools/cmake/bin:$PATH + # Run the source ~/.bashrc command to make the environment variables take effect. + source ~/.bashrc +``` + +2. Check the default CMake path. + +``` + # Run the which cmake command. + which cmake + # The result should be the same as the custom path previously appended to the file. + ~/ohos-sdk/ohos-sdk/linux/native/build-tools/cmake/bin/cmake +``` + + +## Using the NDK to Compile a Native Program + +You can use the NDK to quickly develop a native program, including native dynamic libraries, static libraries, and executable files. The ArkUI application framework can call the native dynamic libraries through the NAPI framework. The following exemplifies how to use the NDK to compile a C/C++ dynamic library in a C/C++ demo project. + + +### Folders in the NDK +#### build Folder: ohos.toolchain.cmake file +The **ohos.toolchain.cmake** file contains the attributes of the CMake compilation target. Its path must be specified in the **CMAKE_TOOLCHAIN_FILE** parameter so that it can be located during CMake compilation. For details about the mandatory parameters in the **ohos.toolchain.cmake** file, see [Key Parameters in ohos.toolchain.cmake](#key-parameters-in-ohostoolchaincmake). + + +#### build-tools folder: Build Tool Provided by the NDK +``` + # Run the following command to view the CMake version: + cmake -version + # Result + cmake version 3.16.5 + + CMake suite maintained and supported by Kitware (kitware.com/cmake). +``` +#### llvm Folder: Compiler Provided by the NDK +![Compiler](figures/compiler.png) + +### Demo Project for the NDK +#### Demo Project Directory + demo + ├── CMakeLists.txt + ├── include + └── sum.h + └── src + ├── CMakeLists.txt + ├── sum.cpp + └── hello.cpp + +#### CMakeLists.txt in the demo Directory +``` + # Specify the minimum CMake version. + CMAKE_MINIMUM_REQUIRED(VERSION 3.16) + + # Set the project name, which is HELLO in this example. + PROJECT(HELLO) + + # Add a subdirectory and build the subdirectory. + ADD_SUBDIRECTORY(src bin) +``` + +#### CMakeLists.txt in the src Directory +``` + SET(LIBHELLO_SRC hello.cpp) + + # Set compilation flags. + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0") + + # Set the link parameter. The value below is only for exemplary purposes. + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--emit-relocs --verbose") + + # Add a libsum dynamic library target. If the compilation is successful, a libsum.so file is generated. + ADD_LIBRARY(sum SHARED sum.cpp) + + # Add the executable target called Hello. If the compilation is successful, a Hello executable is generated. + ADD_EXECUTABLE(Hello ${LIBHELLO_SRC}) + + # Specify the path to the include directory of the Hello target. + TARGET_INCLUDE_DIRECTORIES(Hello PUBLIC ../include) + + # Specify the name of the library to be linked to the Hello target. + TARGET_LINK_LIBRARIES(Hello PUBLIC sum) +``` + +For details about CMake, see [CMake Tutorial](https://cmake.org/cmake/help/v3.16/guide/tutorial/). + +#### Source Code +**hello.cpp** source code: + +``` + #include + #include "sum.h" + + int main(int argc,const char **argv) + { + std::cout<< "hello world!" < { componentSnapshot.get("root", (error: Error, pixmap: image.PixelMap) => { @@ -71,25 +76,29 @@ get(id: string): Promise Obtains the snapshot of a component that has been loaded. This API uses a promise to return the result. +> **NOTE** +> +> The snapshot captures content rendered in the last frame. If this API is called when the component triggers an update, the re-rendered content will not be included in the obtained snapshot. + **System capability**: SystemCapability.ArkUI.ArkUI.Full **Parameters** -| Name | Type | Mandatory| Description | -| ------- | ------------------------------------------------------- | ---- | -------------------- | -| id | string | Yes | [ID](../arkui-ts/ts-universal-attributes-component-id.md) of the target component.| +| Name | Type | Mandatory | Description | +| ---- | ------ | ---- | ---------------------------------------- | +| id | string | Yes | [ID](../arkui-ts/ts-universal-attributes-component-id.md) of the target component.| **Return value** -| Type | Description | -| ----------------------------- | -------------- | +| Type | Description | +| ----------------------------- | -------- | | Promise<image.PixelMap> | Promise used to return the result.| **Error codes** -| ID| Error Message | -| -------- | ------------------- | -| 100001 | if id is not valid. | +| ID | Error Message | +| ------ | ------------------- | +| 100001 | if id is not valid. | **Example** @@ -134,14 +143,21 @@ createFromBuilder(builder: CustomBuilder, callback: AsyncCallback **NOTE** +> +> To account for the time spent in awaiting component building and rendering, the callback of offscreen snapshots has a delay of less than 500 ms. +> +> If a component is on a time-consuming task, for example, an **\** or **\** component that is loading online images, its loading may be still in progress when this API is called. In this case, the output snapshot does not represent the component in the way it looks when the loading is successfully completed. + + **System capability**: SystemCapability.ArkUI.ArkUI.Full **Parameters** -| Name | Type | Mandatory| Description | -| -------- | ------------------------------------------------------- | ---- | -------------------- | -| builder | [CustomBuilder](../arkui-ts/ts-types.md#custombuilder8) | Yes | Builder of the custom component.| -| callback | AsyncCallback<image.PixelMap> | Yes | Callback used to return the result. | +| Name | Type | Mandatory | Description | +| -------- | ---------------------------------------- | ---- | ---------- | +| builder | [CustomBuilder](../arkui-ts/ts-types.md#custombuilder8) | Yes | Builder of the custom component.| +| callback | AsyncCallback<image.PixelMap> | Yes | Callback used to return the result.| **Example** @@ -194,25 +210,31 @@ createFromBuilder(builder: CustomBuilder): Promise Renders a custom component in the application background and outputs its snapshot. This API uses a promise to return the result. +> **NOTE** +> +> To account for the time spent in awaiting component building and rendering, the callback of offscreen snapshots has a delay of less than 500 ms. +> +> If a component is on a time-consuming task, for example, an **\** or **\** component that is loading online images, its loading may be still in progress when this API is called. In this case, the output snapshot does not represent the component in the way it looks when the loading is successfully completed. + **System capability**: SystemCapability.ArkUI.ArkUI.Full **Parameters** -| Name | Type | Mandatory| Description | -| ------- | ------------------------------------------------------- | ---- | -------------------- | -| builder | [CustomBuilder](../arkui-ts/ts-types.md#custombuilder8) | Yes | Builder of the custom component.| +| Name | Type | Mandatory | Description | +| ------- | ---------------------------------------- | ---- | ---------- | +| builder | [CustomBuilder](../arkui-ts/ts-types.md#custombuilder8) | Yes | Builder of the custom component.| **Return value** -| Type | Description | -| ----------------------------- | -------------- | +| Type | Description | +| ----------------------------- | -------- | | Promise<image.PixelMap> | Promise used to return the result.| **Error codes** -| ID| Error Message | -| -------- | ----------------------------------------- | -| 100001 | if builder is not a valid build function. | +| ID | Error Message | +| ------ | ---------------------------------------- | +| 100001 | if builder is not a valid build function. | **Example** diff --git a/en/application-dev/reference/apis/js-apis-call.md b/en/application-dev/reference/apis/js-apis-call.md index 1f90664de26360d3099d9f0870baabaad1063b23..a488a313beff34555f589b57bdea17ddbdbcc752 100644 --- a/en/application-dev/reference/apis/js-apis-call.md +++ b/en/application-dev/reference/apis/js-apis-call.md @@ -2057,7 +2057,7 @@ promise.then(data => { setCallWaiting\(slotId: number, activate: boolean, callback: AsyncCallback\\): void -Sets the call waiting switch. This API uses an asynchronous callback to return the result. +Specifies whether to enable the call waiting service. This API uses an asynchronous callback to return the result. **System API**: This is a system API. @@ -2099,7 +2099,7 @@ call.setCallWaiting(0, true, (err) => { setCallWaiting\(slotId: number, activate: boolean\): Promise\ -Sets the call waiting switch. This API uses a promise to return the result. +Specifies whether to enable the call waiting service. This API uses a promise to return the result. **System API**: This is a system API. @@ -2719,6 +2719,91 @@ call.off('mmiCodeResult', data => { }); ``` + +## call.on('audioDeviceChange')10+ + +on\(type: 'audioDeviceChange', callback: Callback\\): void + +Subscribes to audio device change events. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**Required permission**: ohos.permission.SET_TELEPHONY_STATE + +**System capability**: SystemCapability.Telephony.CallManager + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ----------------------------------------------- | ---- | --------------------------------------------------- | +| type | string | Yes | Audio device change. This field has a fixed value of **audioDeviceChange**.| +| callback | Callback<[AudioDeviceInfo](#audiodeviceinfo10)> | Yes | Callback used to return the result. | + +**Error codes** + +For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). + +| ID| Error Message | +| -------- | -------------------------------------------- | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**Example** + +```js +call.on('audioDeviceChange', data => { + console.log(`callback: data->${JSON.stringify(data)}`); +}); +``` + + +## call.off('audioDeviceChange')10+ + +off\(type: 'audioDeviceChange', callback?: Callback\\): void + +Unsubscribes from **audioDeviceChange** events. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**Required permission**: ohos.permission.SET_TELEPHONY_STATE + +**System capability**: SystemCapability.Telephony.CallManager + +**Parameters** + +| Name | Type | Mandatory | Description | +| -------- | ---------------------------------------------------------- | ---- | --------------------------------------------------- | +| type | string | Yes | Audio device change. This field has a fixed value of **audioDeviceChange**.| +| callback | Callback<[AudioDeviceInfo](#audiodeviceinfo10)> | No | Callback used to return the result. If this parameter is not set, no subscription cancellation result will be received. | + +**Error codes** + +For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). + +| ID| Error Message | +| -------- | -------------------------------------------- | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**Example** + +```js +call.off('audioDeviceChange', data => { + console.log(`callback: data->${JSON.stringify(data)}`); +}); +``` + + ## call.isNewCallAllowed8+ isNewCallAllowed\(callback: AsyncCallback\\): void @@ -3804,7 +3889,7 @@ call.updateImsCallMode(1, 1).then(() => { enableImsSwitch\(slotId: number, callback: AsyncCallback\\): void -Enables the IMS switch. This API uses an asynchronous callback to return the result. +Enables the IMS service. This API uses an asynchronous callback to return the result. **System API**: This is a system API. @@ -3845,7 +3930,7 @@ call.enableImsSwitch(0, (err) => { enableImsSwitch\(slotId: number\): Promise\ -Enables the IMS switch. This API uses a promise to return the result. +Enables the IMS service. This API uses a promise to return the result. **System API**: This is a system API. @@ -3893,7 +3978,7 @@ call.enableImsSwitch(0).then(() => { disableImsSwitch\(slotId: number, callback: AsyncCallback\\): void -Disables the IMS switch. This API uses an asynchronous callback to return the result. +Disables the IMS service. This API uses an asynchronous callback to return the result. **System API**: This is a system API. @@ -3934,7 +4019,7 @@ call.disableImsSwitch(0, (err) => { disableImsSwitch\(slotId: number\): Promise\ -Disables the IMS switch. This API uses a promise to return the result. +Disables the IMS service. This API uses a promise to return the result. **System API**: This is a system API. @@ -3982,7 +4067,7 @@ call.disableImsSwitch(0).then(() => { isImsSwitchEnabled\(slotId: number, callback: AsyncCallback\\): void -Checks whether the IMS switch is enabled. This API uses an asynchronous callback to return the result. +Checks whether the IMS service is enabled. This API uses an asynchronous callback to return the result. **System API**: This is a system API. @@ -4020,7 +4105,7 @@ call.isImsSwitchEnabled(0, (err, data) => { isImsSwitchEnabled\(slotId: number\): Promise\ -Checks whether the IMS switch is enabled. This API uses a promise to return the result. +Checks whether the IMS service is enabled. This API uses a promise to return the result. **System API**: This is a system API. @@ -4062,6 +4147,472 @@ promise.then(data => { }); ``` + +## call.closeUnfinishedUssd10+ + +closeUnfinishedUssd\(slotId: number, callback: AsyncCallback\\): void + +Cancels the unfinished USSD services. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**Required permission**: ohos.permission.SET_TELEPHONY_STATE + +**System capability**: SystemCapability.Telephony.CallManager + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------- | ------------------------- | ---- | -------------------------------------- | +| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2 | +| callback | AsyncCallback<void> | Yes | Callback used to return the result. | + +**Error codes** + +For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). + +| ID| Error Message | +| -------- | -------------------------------------------- | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**Example** + +```js +let slotId = 0; +call.closeUnfinishedUssd(slotId, (err) => { + console.log(`callback: err->${JSON.stringify(err)}`); +}); +``` + +## call.closeUnfinishedUssd10+ + +closeUnfinishedUssd\(slotId: number\): Promise\ + +Cancels the unfinished USSD services. This API uses a promise to return the result. + +**System API**: This is a system API. + +**Required permission**: ohos.permission.SET_TELEPHONY_STATE + +**System capability**: SystemCapability.Telephony.CallManager + +**Parameters** + +| Name| Type | Mandatory| Description | +| ------ | ------ | ---- | -------------------------------------- | +| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2 | + +**Return value** + +| Type | Description | +| ------------------- | --------------------------- | +| Promise<void> | Promise used to return the result. | + +**Error codes** + +For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). + +| ID| Error Message | +| -------- | -------------------------------------------- | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**Example** + +```js +let slotId = 0; +call.closeUnfinishedUssd(slotId).then(() => { + console.log(`closeUnfinishedUssd success.`); +}).catch((err) => { + console.error(`closeUnfinishedUssd fail, promise: err->${JSON.stringify(err)}`); +}); +``` + + +## call.setVoNRState10+ + +setVoNRState\(slotId: number, state: VoNRState, callback: AsyncCallback\\): void + +Sets the status of the VoNR switch. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**Required permission**: ohos.permission.SET_TELEPHONY_STATE + +**System capability**: SystemCapability.Telephony.CallManager + +**Parameters** + +| Name | Type | Mandatory| Description | +| ----------- | ----------------------------- | ---- | ---------------------------------------------------- | +| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2 | +| state | [VoNRState](#vonrstate10) | Yes | Status of the VoNR switch. | +| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. Callback used to return the result. The value **true** indicates that the operation is successful, and value **false** indicates the opposite.| + +**Error codes** + +For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). + +| ID| Error Message | +| -------- | -------------------------------------------- | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**Example** + +```js +let slotId = 0; +let state = 1; +call.setVoNRState(slotId, state, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +## call.setVoNRState10+ + +setVoNRState\(slotId: number, state: VoNRState\): Promise\ + +Sets the status of the VoNR switch. This API uses a promise to return the result. + +**System API**: This is a system API. + +**Required permission**: ohos.permission.SET_TELEPHONY_STATE + +**System capability**: SystemCapability.Telephony.CallManager + +**Parameters** + +| Name | Type | Mandatory| Description | +| ----------- | ----------------------------- | ---- | ------------------------------------------- | +| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2 | +| state | [VoNRState](#vonrstate10) | Yes | Status of the VoNR switch. | + +**Return value** + +| Type | Description | +| ---------------------- | --------------------------------------------- | +| Promise<boolean> | Promise used to return the result. | + +**Error codes** + +For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). + +| ID| Error Message | +| -------- | -------------------------------------------- | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**Example** + +```js +let slotId = 0; +let state = 1; +call.setVoNRState(slotId, state).then(() => { + console.log(`setVoNRState success, promise: data->${JSON.stringify(data)}`); +}).catch((err) => { + console.error(`setVoNRState fail, promise: err->${JSON.stringify(err)}`); +}); +``` + + +## call.getVoNRState10+ + +getVoNRState\(slotId: number, callback: AsyncCallback\\): void + +Obtains the status of the VoNR switch. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**Required permission**: ohos.permission.GET_TELEPHONY_STATE + +**System capability**: SystemCapability.Telephony.CallManager + +**Parameters** + +| Name | Type | Mandatory | Description | +| ----------- | --------------------------------------------- | ---- | ------------------------------------------------------ | +| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2 | +| callback | AsyncCallback<[VoNRState](#vonrstate10)>| Yes | Callback used to return the result. | + +**Error codes** + +For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). + +| ID| Error Message | +| -------- | -------------------------------------------- | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**Example** + +```js +let slotId = 0; +call.getVoNRState(slotId, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +## call.getVoNRState10+ + +getVoNRState\(slotId: number\): Promise\ + +Obtains the status of the VoNR switch. This API uses a promise to return the result. + +**System API**: This is a system API. + +**Required permission**: ohos.permission.GET_TELEPHONY_STATE + +**System capability**: SystemCapability.Telephony.CallManager + +**Parameters** + +| Name | Type | Mandatory| Description | +| ----------- | ----------------------------- | ---- | ------------------------------------------- | +| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2 | + +**Return value** + +| Type | Description | +| ---------------------------------------- | ------------------------------------------- | +| Promise<[VoNRState](#vonrstate10)> | Promise used to return the result. | + +**Error codes** + +For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). + +| ID| Error Message | +| -------- | -------------------------------------------- | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**Example** + +```js +let slotId = 0; +let promise = call.getVoNRState(slotId); +promise.then(data => { + console.log(`getVoNRState success, promise: data->${JSON.stringify(data)}`); +}).catch(err => { + console.error(`getVoNRState fail, promise: err->${JSON.stringify(err)}`); +}); +``` + + +## call.canSetCallTransferTime10+ + +canSetCallTransferTime\(slotId: number, callback: AsyncCallback\\): void + +Checks whether the call forwarding time can be set. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**Required permission**: ohos.permission.GET_TELEPHONY_STATE + +**System capability**: SystemCapability.Telephony.CallManager + +**Parameters** + +| Name | Type | Mandatory| Description | +| ----------- | ----------------------------- | ---- | ----------------------------------------------------- | +| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2 | +| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. Callback used to return the result. The value **true** indicates that the call forwarding time can be set, and the value **false** indicates the opposite.| + +**Error codes** + +For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). + +| ID| Error Message | +| -------- | -------------------------------------------- | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**Example** + +```js +let slotId = 0; +call.canSetCallTransferTime(slotId, (err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +## call.canSetCallTransferTime10+ + +canSetCallTransferTime\(slotId: number\): Promise\ + +Checks whether the call forwarding time can be set. This API uses a promise to return the result. + +**System API**: This is a system API. + +**Required permission**: ohos.permission.GET_TELEPHONY_STATE + +**System capability**: SystemCapability.Telephony.CallManager + +**Parameters** + +| Name | Type | Mandatory| Description | +| ----------- | ----------------------------- | ---- | ------------------------------------------- | +| slotId | number | Yes | Card slot ID.
- **0**: card slot 1
- **1**: card slot 2 | + +**Return value** + +| Type | Description | +| ---------------------- | --------------------------------------------- | +| Promise<boolean> | Promise used to return the result.| + +**Error codes** + +For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). + +| ID| Error Message | +| -------- | -------------------------------------------- | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**Example** + +```js +let slotId = 0; +call.canSetCallTransferTime(slotId).then(() => { + console.log(`canSetCallTransferTime success, promise: data->${JSON.stringify(data)}`); +}).catch((err) => { + console.error(`canSetCallTransferTime fail, promise: err->${JSON.stringify(err)}`); +}); +``` + + +## call.inputDialerSpecialCode10+ + +inputDialerSpecialCode\(inputCode: string, callback: AsyncCallback\\): void + +Performs a secret code broadcast. This API uses an asynchronous callback to return the result. + +**System API**: This is a system API. + +**Required Permissions**: ohos.permission.PLACE_CALL + +**System capability**: SystemCapability.Telephony.CallManager + +**Parameters** + +| Name | Type | Mandatory| Description | +| ----------- | ---------------------------- | ---- | ----------------------------------------- | +| inputCode | string | Yes | Secret code, for example, **2846579** (project menu).| +| callback | AsyncCallback<void> | Yes | Callback used to return the result. | + +**Error codes** + +For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). + +| ID| Error Message | +| -------- | -------------------------------------------- | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | + +**Example** + +```js +call.inputDialerSpecialCode('2846579', (err) => { + console.log(`callback: err->${JSON.stringify(err)}`); +}); +``` + +## call.inputDialerSpecialCode10+ + +inputDialerSpecialCode\(inputCode: string\): Promise\ + +Performs a secret code broadcast. This API uses a promise to return the result. + +**System API**: This is a system API. + +**Required Permissions**: ohos.permission.PLACE_CALL + +**System capability**: SystemCapability.Telephony.CallManager + +**Parameters** + +| Name | Type | Mandatory| Description | +| ----------- | ---------------------------- | ---- | ----------------------------------------- | +| inputCode | string | Yes | Secret code, for example, **2846579** (project menu).| + +**Return value** + +| Type | Description | +| ------------------- | --------------------------- | +| Promise<void> | Promise used to return the result.| + +**Error codes** + +For details about the following error codes, see [Telephony Error Codes](../../reference/errorcodes/errorcode-telephony.md). + +| ID| Error Message | +| -------- | -------------------------------------------- | +| 201 | Permission denied. | +| 202 | Non-system applications use system APIs. | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | + +**Example** + +```js +try { + call.inputDialerSpecialCode('2846579'); + console.log(`inputDialerSpecialCode success`); +} catch (error) { + console.log(`inputDialerSpecialCode fail, promise: err->${JSON.stringify(error)}`); +} +``` + + ## DialOptions Provides an option for determining whether a call is a video call. @@ -4071,23 +4622,25 @@ Provides an option for determining whether a call is a video call. | Name | Type | Mandatory| Description | | ------------------------ | ---------------------------------- | ---- | ----------------------------------------------------------------------------------------------- | | extras | boolean | No | Indication of a video call.
- **true**: video call
- **false** (default): voice call | -| accountId 8+ | number | No | Account ID.
- **0**: card slot 1
- **1**: card slot 2
| -| videoState 8+ | [VideoStateType](#videostatetype7) | No | Video state type. | -| dialScene 8+ | [DialScene](#dialscene8) | No | Dialup scenario. | -| dialType 8+ | [DialType](#dialtype8) | No | Dialup type. | +| accountId 8+ | number | No | Account ID.
- **0**: card slot 1
- **1**: card slot 2
This is a system API. | +| videoState 8+ | [VideoStateType](#videostatetype7) | No | Video state type. This is a system API. | +| dialScene 8+ | [DialScene](#dialscene8) | No | Dialup scenario. This is a system API. | +| dialType 8+ | [DialType](#dialtype8) | No | Dialup type. This is a system API. | ## DialCallOptions9+ Defines options for initiating a call. +**System API**: This is a system API. + **System capability**: SystemCapability.Telephony.CallManager -| Name | Type | Mandatory| Description | -| ------------------------ | ---------------------------------- | ---- | ------------------------------------------------------------ | -| accountId 9+ | number | No | Account ID.
- **0**: card slot 1
- **1**: card slot 2
This is a system API.| -| videoState 9+ | [VideoStateType](#videostatetype7) | No | Video state type. This is a system API. | -| dialScene 9+ | [DialScene](#dialscene8) | No | Dialup scenario. This is a system API. | -| dialType 9+ | [DialType](#dialtype8) | No | Dialup type. This is a system API. | +| Name | Type | Mandatory| Description | +| ------------------------ | ---------------------------------- | ---- | ------------------------------------------- | +| accountId 9+ | number | No | Account ID.
- **0**: card slot 1
- **1**: card slot 2
| +| videoState 9+ | [VideoStateType](#videostatetype7) | No | Video state type. | +| dialScene 9+ | [DialScene](#dialscene8) | No | Dialup scenario. | +| dialType 9+ | [DialType](#dialtype8) | No | Dialup type. | ## CallState @@ -4138,6 +4691,19 @@ Enumerates IMS call modes. | CALL_MODE_SEND_RECEIVE | 3 | Sending and receiving calls.| | CALL_MODE_VIDEO_PAUSED | 4 | Pausing video calls. | +## VoNRState10+ + +Enumerates VoNR switch states. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Telephony.CallManager + +| Name | Value | Description | +| ---------------------- | ---- | ----------------- | +| VONR_STATE_OFF | 0 | Disabled. | +| VONR_STATE_ON | 1 | Enabled. | + ## AudioDevice8+ Enumerates audio devices. @@ -4154,6 +4720,36 @@ Enumerates audio devices. | DEVICE_BLUETOOTH_SCO | 3 | Bluetooth SCO device. | | DEVICE_MIC | 4 | Microphone device| +## AudioDeviceType10+ + +Enumerates audio device types. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Telephony.CallManager + +| Name | Value | Description | +| -------------------- | ---- | ----------- | +| DEVICE_EARPIECE | 0 | Headset device. | +| DEVICE_SPEAKER | 1 | Speaker device. | +| DEVICE_WIRED_HEADSET | 2 | Wired headset device.| +| DEVICE_BLUETOOTH_SCO | 3 | Bluetooth SCO device. | + +## AudioDeviceInfo10+ + +Defines the audio device information. + +**System API**: This is a system API. + +**System capability**: SystemCapability.Telephony.CallManager + +| Name | Type | Mandatory | Description | +| --------------------------------- | ------------------------------------- | ---- | ---------------- | +| audioDeviceList 10+ | [Array\](#audiodevice8) | Yes | Audio device list. | +| currentAudioDevice 10+ | [AudioDevice](#audiodevice8) | Yes | Audio device type. | +| isMuted 10+ | boolean | Yes | Whether the audio device is muted. | + + ## CallRestrictionType8+ Enumerates call restriction types. @@ -4511,7 +5107,7 @@ Enumerates call disconnection causes. | BEARER_SERVICE_NOT_IMPLEMENTED9+ | 65 | Bearer service not implemented. | | ACM_EQUALTO_OR_GREATER_THAN_THE_MAXIMUM_VALUE9+ | 68 | ACM greater than or equal to the maximum value. | | REQUESTED_FACILITY_NOT_IMPLEMENTED9+ | 69 | Requested facility not implemented. | -| ONLY_RESTRICTED_DIGITAL_INFO_BEARER_CAPABILITY_IS_AVAILABLE9+ | 70 | Only restricted digital information capability available. | +| ONLY_RESTRICTED_DIGITAL_INFO_BEARER_CAPABILITY_IS_AVAILABLE9+ | 70 | Only restricted digital information bearer capability available. | | SERVICE_OR_OPTION_NOT_IMPLEMENTED_UNSPECIFIED9+ | 79 | Service or option not implemented, unspecified. | | INVALID_TRANSACTION_IDENTIFIER_VALUE9+ | 81 | Invalid transaction identifier value. | | USER_NOT_MEMBER_OF_CUG9+ | 87 | User not member of CUG. | diff --git a/en/application-dev/reference/apis/js-apis-i18n.md b/en/application-dev/reference/apis/js-apis-i18n.md index db85444d68f958ed8af462815a2865ddc02adc0f..fe9a116b82379a17518731accb378484eb71dfc2 100644 --- a/en/application-dev/reference/apis/js-apis-i18n.md +++ b/en/application-dev/reference/apis/js-apis-i18n.md @@ -46,7 +46,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -85,7 +85,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -116,7 +116,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -153,7 +153,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -191,7 +191,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -222,7 +222,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -257,7 +257,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -288,7 +288,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -323,7 +323,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -354,7 +354,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -389,7 +389,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -420,7 +420,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -455,7 +455,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -492,7 +492,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -530,7 +530,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -563,7 +563,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -594,7 +594,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -625,7 +625,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```js @@ -660,7 +660,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```ts @@ -691,7 +691,7 @@ For details about the error codes, see [I18N Error Codes](../errorcodes/errorcod | ID | Error Message | | ------ | ---------------------- | -| 890001 | Unspported para value. | +| 890001 | param value not valid | **Example** ```ts @@ -1737,6 +1737,35 @@ Obtains the **TimeZone** object corresponding to the specified time zone city ID let timezone = I18n.TimeZone.getTimezoneFromCity("Shanghai"); ``` +### getTimezonesByLocation10+ + +static getTimezonesByLocation(longitude: number, latitude: number): Array<TimeZone> + +Creates an array of **TimeZone** objects corresponding to the specified longitude and latitude. + +**System capability**: SystemCapability.Global.I18n + +**Parameters** + +| Name | Type | Mandatory | Description | +| --------- | ------ | ---- | ------ | +| longitude | number | Yes | Longitude. The value ranges from **-180** to **179.9**. A positive value is used for east longitude and a negative value is used for west longitude.| +| latitude | number | Yes | Latitude. The value ranges from **-90** to **89.9**. A positive value is used for north latitude and a negative value is used for south latitude.| + +**Return value** + +| Type | Description | +| -------- | ----------- | +| Array<[TimeZone](#timezone)> | Array of **TimeZone** objects.| + +**Example** + ```js + let timezoneArray = I18n.TimeZone.getTimezonesByLocation(-118.1, 34.0); + for (var i = 0; i < timezoneArray.length; i++) { + let tzId = timezoneArray[i].getID(); + } + ``` + ## Transliterator9+ diff --git a/en/application-dev/reference/apis/js-apis-intl.md b/en/application-dev/reference/apis/js-apis-intl.md index cec10d9eef5fbd50d9d81ca6a5358d57d78fdbf0..99131363c58faef8abe196d0e20e01b176a1258e 100644 --- a/en/application-dev/reference/apis/js-apis-intl.md +++ b/en/application-dev/reference/apis/js-apis-intl.md @@ -1,7 +1,6 @@ # @ohos.intl (Internationalization) -The **intl** module provides basic i18n capabilities, such as time and date formatting, number formatting, and string sorting, through the standard i18n APIs defined in ECMA 402. - + The **intl** module provides basic i18n capabilities, such as time and date formatting, number formatting, and string sorting, through the standard i18n APIs defined in ECMA 402. The [i18n](js-apis-i18n.md) module provides enhanced i18n capabilities through supplementary interfaces that are not defined in ECMA 402. It works with the intl module to provide a complete suite of i18n capabilities. > **NOTE** @@ -68,7 +67,7 @@ Creates a **Locale** object. | Name | Type | Mandatory | Description | | -------------------- | -------------------------------- | ---- | ---------------------------- | | locale | string | Yes | A string containing locale information, including the language, optional script, and region. For details about the international standards and combination modes for the language, script, and country or region, see [intl Development](../../internationalization/intl-guidelines.md#setting-locale-information).| -| options9+ | [LocaleOptions](#localeoptions9) | No | Options for creating the **Locale** object. | +| options | [LocaleOptions](#localeoptions6) | No | Options for creating the **Locale** object. | **Example** ```js @@ -160,9 +159,10 @@ Minimizes information of the **Locale** object. If the script and locale informa ``` -## LocaleOptions9+ +## LocaleOptions6+ Represents the locale options. +In API version 9, the attributes in **LocaleOptions** are optional. **System capability**: SystemCapability.Global.I18n @@ -207,7 +207,7 @@ Creates a **DateTimeOptions** object for the specified locale. | Name | Type | Mandatory | Description | | -------------------- | ------------------------------------ | ---- | ---------------------------- | | locale | string \| Array<string> | Yes | A string containing locale information, including the language, optional script, and region.| -| options9+ | [DateTimeOptions](#datetimeoptions9) | No | Options for creating a **DateTimeFormat** object. | +| options | [DateTimeOptions](#datetimeoptions6) | No | Options for creating a **DateTimeFormat** object. | **Example** ```js @@ -299,7 +299,7 @@ Obtains the formatting options for **DateTimeFormat** object. | Type | Description | | ------------------------------------ | ----------------------------- | -| [DateTimeOptions](#datetimeoptions9) | Formatting options for **DateTimeFormat** objects.| +| [DateTimeOptions](#datetimeoptions6) | Formatting options for **DateTimeFormat** objects.| **Example** ```js @@ -311,9 +311,10 @@ Obtains the formatting options for **DateTimeFormat** object. ``` -## DateTimeOptions9+ +## DateTimeOptions6+ Provides the options for the **DateTimeFormat** object. +In API version 9, the attributes in **DateTimeOptions** are optional. **System capability**: SystemCapability.Global.I18n @@ -371,7 +372,7 @@ Creates a **NumberFormat** object for the specified locale. | Name | Type | Mandatory | Description | | -------------------- | -------------------------------- | ---- | ---------------------------- | | locale | string \| Array<string> | Yes | A string containing locale information, including the language, optional script, and region.| -| options9+ | [NumberOptions](#numberoptions9) | No | Options for creating a **NumberFormat** object. | +| options | [NumberOptions](#numberoptions6) | No | Options for creating a **NumberFormat** object. | **Example** ```js @@ -421,7 +422,7 @@ Obtains the options of the **NumberFormat** object. | Type | Description | | -------------------------------- | --------------------------- | -| [NumberOptions](#numberoptions9) | Formatting options for **NumberFormat** objects.| +| [NumberOptions](#numberoptions6) | Formatting options for **NumberFormat** objects.| **Example** @@ -434,9 +435,10 @@ Obtains the options of the **NumberFormat** object. ``` -## NumberOptions9+ +## NumberOptions6+ Defines the device capability. +In API version 9, the attributes in **NumberOptions** are optional. **System capability**: SystemCapability.Global.I18n @@ -448,7 +450,7 @@ Defines the device capability. | currencyDisplay | string | Yes | Yes | Currency display mode. The value can be **symbol**, **narrowSymbol**, **code**, or **name**.| | unit | string | Yes | Yes | Unit name, for example, **meter**, **inch**, or **hectare**. | | unitDisplay | string | Yes | Yes | Unit display format. The value can be **long**, **short**, or **narrow**.| -| unitUsage | string | Yes | Yes | Unit usage scenario. The value can be any of the following: **default**, **area-land-agricult**, **area-land-commercl**, **area-land-residntl**, **length-person**, **length-person-small**, **length-rainfall**, **length-road**, **length-road-small**, **length-snowfall**, **length-vehicle**, **length-visiblty**, **length-visiblty-small**, **length-person-informal**, **length-person-small-informal**, **length-road-informal**, **speed-road-travel**, **speed-wind**, **temperature-person**, **temperature-weather**, **volume-vehicle-fuel**.| +| unitUsage8+ | string | Yes | Yes | Unit usage scenario. The value can be any of the following: **default**, **area-land-agricult**, **area-land-commercl**, **area-land-residntl**, **length-person**, **length-person-small**, **length-rainfall**, **length-road**, **length-road-small**, **length-snowfall**, **length-vehicle**, **length-visiblty**, **length-visiblty-small**, **length-person-informal**, **length-person-small-informal**, **length-road-informal**, **speed-road-travel**, **speed-wind**, **temperature-person**, **temperature-weather**, **volume-vehicle-fuel**.| | signDisplay | string | Yes | Yes | Number sign display format. The value can be **auto**, **never**, **always**, or **expectZero**.| | compactDisplay | string | Yes | Yes | Compact display format. The value can be **long** or **short**. | | notation | string | Yes | Yes | Number formatting specification. The value can be **standard**, **scientific**, **engineering**, or **compact**.| @@ -494,7 +496,7 @@ Creates a **Collator** object. | Name | Type | Mandatory | Description | | -------------------- | ------------------------------------ | ---- | ---------------------------- | | locale | string \| Array<string> | Yes | A string containing locale information, including the language, optional script, and region.| -| options9+ | [CollatorOptions](#collatoroptions9) | No | Options for creating a **Collator** object. | +| options | [CollatorOptions](#collatoroptions8) | No | Options for creating a **Collator** object. | **Example** ```js @@ -545,7 +547,7 @@ Returns properties reflecting the locale and collation options of a **Collator** | Type | Description | | ------------------------------------ | ----------------- | -| [CollatorOptions](#collatoroptions9) | Properties of the **Collator** object.| +| [CollatorOptions](#collatoroptions8) | Properties of the **Collator** object.| **Example** ```js @@ -557,9 +559,10 @@ Returns properties reflecting the locale and collation options of a **Collator** ``` -## CollatorOptions9+ +## CollatorOptions8+ Represents the properties of a **Collator** object. +In API version 9, the attributes in **CollatorOptions** are optional. **System capability**: SystemCapability.Global.I18n @@ -605,7 +608,7 @@ Creates a **PluralRules** object to obtain the singular-plural type of numbers. | Name | Type | Mandatory | Description | | -------------------- | ---------------------------------------- | ---- | ---------------------------- | | locale | string \| Array<string> | Yes | A string containing locale information, including the language, optional script, and region.| -| options9+ | [PluralRulesOptions](#pluralrulesoptions9) | No | Options for creating a **PluralRules** object. | +| options | [PluralRulesOptions](#pluralrulesoptions8) | No | Options for creating a **PluralRules** object. | **Example** ```js @@ -648,9 +651,10 @@ Obtains a string that represents the singular-plural type of the specified numbe ``` -## PluralRulesOptions9+ +## PluralRulesOptions8+ Represents the properties of a **PluralRules** object. +In API version 9, the attributes in **PluralRulesOptions** are optional. **System capability**: SystemCapability.Global.I18n @@ -696,7 +700,7 @@ Creates a **RelativeTimeFormat** object. | Name | Type | Mandatory | Description | | -------------------- | ---------------------------------------- | ---- | ---------------------------- | | locale | string \| Array<string> | Yes | A string containing locale information, including the language, optional script, and region.| -| options9+ | [RelativeTimeFormatInputOptions](#relativetimeformatinputoptions9) | No | Options for creating a **RelativeTimeFormat** object. | +| options | [RelativeTimeFormatInputOptions](#relativetimeformatinputoptions8) | No | Options for creating a **RelativeTimeFormat** object. | **Example** ```js @@ -788,9 +792,10 @@ Obtains the formatting options for **RelativeTimeFormat** objects. ``` -## RelativeTimeFormatInputOptions9+ +## RelativeTimeFormatInputOptions8+ Represents the properties of a **RelativeTimeFormat** object. +In API version 9, the attributes in **RelativeTimeFormatInputOptions** are optional. **System capability**: SystemCapability.Global.I18n diff --git a/en/application-dev/reference/apis/js-apis-loglibrary.md b/en/application-dev/reference/apis/js-apis-loglibrary.md new file mode 100644 index 0000000000000000000000000000000000000000..cbb849eab6fca14001bdd9f648fb2ce60cd8e2f1 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-loglibrary.md @@ -0,0 +1,319 @@ +# @ohos.logLibrary (Log Library) + +The **logLibrary** module provides APIs for obtaining various system maintenance and test logs. + +> **NOTE** +> +> - The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> - The APIs provided by this module are system APIs. + +## Modules to Import + +```js +import logLibrary from '@ohos.logLibrary'; +``` + +## LogEntry + +Defines a **LogEntry** object. + +**System capability**: SystemCapability.HiviewDFX.Hiview.LogLibrary + +| Name| Type| Readable| Writable| Description| +| -------- | -------- | -------- | -------- | -------- | +| name | string | Yes| No| Log file name. | +| mtime | number | Yes| No | Time of the last modification to the file. The value is the number of seconds elapsed since 00:00:00 on January 1, 1970.| +| size | number | Yes| No | File size, in bytes.| + +## logLibrary.list + +list(logType: string): LogEntry[] + +Obtains the list of log files of the specified type in synchronous mode. This API accepts objects of the string type as input parameters and returns a list log files of the specified type. + +**Required permission**: ohos.permission.READ_HIVIEW_SYSTEM + +**System capability**: SystemCapability.HiviewDFX.Hiview.LogLibrary + +**Parameters** + +| Name | Type | Mandatory| Description | +| --------- | ------------------------- | ---- | ------------------------------------------------------------ | +| logType | string | Yes| Log type, for example, **HILOG**, **FAULTLOG**, **BETACLUB**, or **REMOTELOG**.| + +**Return value** + +| Type | Description | +| ------------------- | ------------------------------------------------------------ | +| LogEntry[] | Array of log file objects.| + +**Error codes** + +For details about error codes, see [Log Library Error Codes](../errorcodes/errorcode-loglibrary.md). + +| ID| Error Message| +| ------- | ----------------------------------------------------------------- | +| 201 | Permission denied. | +| 202 | Permission denied, non-system app called system api. | +| 401 | Invalid argument.| + +**Example** + +```js +import logLibrary from '@ohos.logLibrary'; + +try { + let logObj = logLibrary.list('HILOG'); + // do something here. +} catch (error) { + console.error(`error code: ${error.code}, error msg: ${error.message}`); +} +``` + +## logLibrary.copy + +copy(logType: string, logName: string, dest: string): Promise<void> + +Copies log files of the specified type to the target application directory. This API uses a promise to return the result. + +**Required permission**: ohos.permission.READ_HIVIEW_SYSTEM + +**System capability**: SystemCapability.HiviewDFX.Hiview.LogLibrary + +**Parameters** + +| Name | Type | Mandatory| Description| +| --------- | ----------------------- | ---- | --------------- | +| logType | string | Yes| Log type, for example, **HILOG**, **FAULTLOG**, **BETACLUB**, or **REMOTELOG**.| +| logName | string | Yes | Log file name.| +| dest | string | Yes | Target directory. Enter the relative path of the directory. If this parameter is specified, log files will be saved to the **hiview/dest** folder in the application cache path, that is, **../cache/hiview/dest**. You can enter a multi-level directory.
If you leave this parameter empty, log files will be saved to the root directory, that is, the **hiview** folder in the application cache path.| + +**Return value** + +| Type | Description | +| ------------------- | ------------------------------------------------------------ | +| Promise<void> | Promise used to return the result. Depending on whether the operation is successful, you can use the **then()** or **catch()** method to process the callback.| + +**Error codes** + +For details about error codes, see [Log Library Error Codes](../errorcodes/errorcode-loglibrary.md). + +| ID| Error Message| +| -------- | ---------------------------------------------------------------- | +| 201 | Permission denied. | +| 202 | Permission denied, non-system app called system api. | +| 401 | Invalid argument.| +| 21300001 | Source file does not exists. | + +**Example** + +```js +import logLibrary from '@ohos.logLibrary'; + +try { + logLibrary.copy('HILOG', 'hiapplogcat-1.zip', '' + ).then( + (val) => { + // do something here. + } + ).catch( + (err) => { + // do something here. + } + ) +} catch (error) { + console.error(`error code: ${error.code}, error msg: ${error.message}`); +} +``` + +## logLibrary.copy + +copy(logType: string, logName: string, dest: string, callback: AsyncCallback<void>): void + +Copies log files of the specified type to the target application directory. This API uses an asynchronous callback to return the result. + +**Required permission**: ohos.permission.READ_HIVIEW_SYSTEM + +**System capability**: SystemCapability.HiviewDFX.Hiview.LogLibrary + +**Parameters** + +| Name | Type | Mandatory| Description | +| --------- | ------------------------- | ---- | ------------------------------------------------------------ | +| logType | string | Yes| Log type, for example, **HILOG**, **FAULTLOG**, **BETACLUB**, or **REMOTELOG**.| +| logName | string | Yes | Log file name.| +| dest | string | Yes | Target directory. Enter the relative path of the directory. If this parameter is specified, log files will be saved to the **hiview/dest** folder in the application cache path, that is, **../cache/hiview/dest**. You can enter a multi-level directory.
If you leave this parameter empty, log files will be saved to the root directory, that is, the **hiview** folder in the application cache path.| +| callback | AsyncCallback<void> | Yes| Callback used to process the received return value. The value **0** indicates that the operation is successful, and any other value indicates that the operation has failed.| + +**Error codes** + +For details about error codes, see [Log Library Error Codes](../errorcodes/errorcode-loglibrary.md). + +| ID| Error Message| +| ------- | ----------------------------------------------------------------- | +| 201 | Permission denied. | +| 202 | Permission denied, non-system app called system api. | +| 401 | Invalid argument.| +| 21300001 | Source file does not exists. | + +**Example** + +```js +import logLibrary from '@ohos.logLibrary'; + +try { + logLibrary.copy('HILOG', 'hiapplogcat-1.zip', 'dir1', (error, val) => { + if (val === undefined) { + // copy failed. + } else { + // copy success. + } + }); +} catch (error) { + console.error(`error code: ${error.code}, error msg: ${error.message}`); +} +``` + +## logLibrary.move + +move(logType: string, logName: string, dest: string): Promise<void> + +Moves log files of the specified type to the target application directory. This API uses a promise to return the result. + +**Required permission**: ohos.permission.WRITE_HIVIEW_SYSTEM + +**System capability**: SystemCapability.HiviewDFX.Hiview.LogLibrary + +**Parameters** + +| Name | Type | Mandatory| Description| +| --------- | ----------------------- | ---- | --------------- | +| logType | string | Yes| Log type, for example, **FAULTLOG**, **BETACLUB**, or **REMOTELOG**.| +| logName | string | Yes | Log file name.| +| dest | string | Yes | Target directory. Enter the relative path of the directory. If this parameter is specified, log files will be saved to the **hiview/dest** folder in the application cache path, that is, **../cache/hiview/dest**. You can enter a multi-level directory.
If you leave this parameter empty, log files will be saved to the root directory, that is, the **hiview** folder in the application cache path.| + +**Return value** + +| Type | Description | +| ------------------- | ------------------------------------------------------------ | +| Promise<void> | Promise used to return the result. Depending on whether the operation is successful, you can use the **then()** or **catch()** method to process the callback.| + +**Error codes** + +For details about error codes, see [Log Library Error Codes](../errorcodes/errorcode-loglibrary.md). + +| ID| Error Message| +| -------- | ---------------------------------------------------------------- | +| 201 | Permission denied. | +| 202 | Permission denied, non-system app called system api. | +| 401 | Invalid argument.| +| 21300001 | Source file does not exists. | + +**Example** + +```js +import logLibrary from '@ohos.logLibrary'; + +try { + logLibrary.move('FAULTLOG', 'fault_log_test.zip', '' + ).then( + (val) => { + // do something here. + } + ).catch( + (err) => { + // do something here. + } + ) +} catch (error) { + console.error(`error code: ${error.code}, error msg: ${error.message}`); +} +``` + +## logLibrary.move + +move(logType: string, logName: string, dest: string, callback: AsyncCallback<void>): void + +Moves log files of the specified type to the target application directory. This API uses an asynchronous callback to return the result. + +**Required permission**: ohos.permission.WRITE_HIVIEW_SYSTEM + +**System capability**: SystemCapability.HiviewDFX.Hiview.LogLibrary + +**Parameters** + +| Name | Type | Mandatory| Description | +| --------- | ------------------------- | ---- | ------------------------------------------------------------ | +| logType | string | Yes| Log type, for example, **HILOG**, **FAULTLOG**, **BETACLUB**, or **REMOTELOG**.| +| logName | string | Yes | Log file name.| +| dest | string | Yes | Target directory. Enter the relative path of the directory. If this parameter is specified, log files will be saved to the **hiview/dest** folder in the application cache path, that is, **../cache/hiview/dest**. You can enter a multi-level directory.
If you leave this parameter empty, log files will be saved to the root directory, that is, the **hiview** folder in the application cache path.| +| callback | AsyncCallback<void> | Yes| Callback used to process the received return value. The value **0** indicates that the operation is successful, and any other value indicates that the operation has failed.| + +**Error codes** + +For details about error codes, see [Log Library Error Codes](../errorcodes/errorcode-loglibrary.md). + +| ID| Error Message| +| ------- | ----------------------------------------------------------------- | +| 201 | Permission denied. | +| 202 | Permission denied, non-system app called system api. | +| 401 | Invalid argument.| +| 21300001 | Source file does not exists. | + +**Example** + +```js +import logLibrary from '@ohos.logLibrary'; + +try { + logLibrary.move('FAULTLOG', 'fault_log_test.zip', 'dir1/dir2', (error, val) => { + if (val === undefined) { + // move failed. + } else { + // move success. + } + }); +} catch (error) { + console.error(`error code: ${error.code}, error msg: ${error.message}`); +} +``` + +## logLibrary.remove + +remove(logType: string, logName: string): void + +Deletes log files of the specified type in synchronous mode. + +**Required permission**: ohos.permission.WRITE_HIVIEW_SYSTEM + +**System capability**: SystemCapability.HiviewDFX.Hiview.LogLibrary + +**Parameters** + +| Name | Type | Mandatory| Description | +| --------- | ------------------------- | ---- | ------------------------------------------------------------ | +| logType | string | Yes| Log type, for example, **FAULTLOG**, **BETACLUB**, or **REMOTELOG**.| +| logName | string | Yes | Log file name.| + +**Error codes** + +For details about error codes, see [Log Library Error Codes](../errorcodes/errorcode-loglibrary.md). + +| ID| Error Message| +| ------- | ----------------------------------------------------------------- | +| 201 | Permission denied. | +| 202 | Permission denied, non-system app called system api. | +| 401 | Invalid argument.| +| 21300001 | Source file does not exists. | + +**Example** + +```js +import logLibrary from '@ohos.logLibrary'; + +try { + logLibrary.remove('FAULTLOG', 'fault_log_test.zip'); +} catch (error) { + console.error(`error code: ${error.code}, error msg: ${error.message}`); +} +``` diff --git a/en/application-dev/reference/apis/js-apis-logs.md b/en/application-dev/reference/apis/js-apis-logs.md index b2d837bae04d378938b355d535971cf6d56e48c5..fa73f169b26bec6240b6205c2970af08f5def1f8 100644 --- a/en/application-dev/reference/apis/js-apis-logs.md +++ b/en/application-dev/reference/apis/js-apis-logs.md @@ -1,8 +1,6 @@ -# console (Log Printing) +# Console -The **console** module provides basic log printing capabilities and supports log printing by log level. - -If you want to use more advanced log printing services, for example, filtering logs by the specified ID, you are advised to use [`@ohos.hilog`](js-apis-hilog.md). +The **console** module provides a simple debugging console, which is similar to the JavaScript console provided by the browser. > **NOTE** > @@ -10,9 +8,9 @@ If you want to use more advanced log printing services, for example, filtering l ## console.debug -debug(message: string): void +debug(message: string, ...arguments: any[]): void -Prints debug-level logs. +Prints debugging information in formatted output mode. **System capability**: SystemCapability.ArkUI.ArkUI.Full @@ -20,14 +18,25 @@ Prints debug-level logs. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| message | string | Yes | Text to print.| +| message | string | Yes | Text to be printed.| +| arguments | any | No | Arguments in the message or other information to be printed.| +**Example** +```js +const number = 5; +console.debug('count: %d', number); // Print the debugging information with arguments in the message replaced. +// count: 5 +console.debug('count:', number); // Print the message and other information. +// count: 5 +console.debug('count:'); // Print the message only. +// count: +``` ## console.log -log(message: string): void +log(message: string, ...arguments: any[]): void -Prints debug-level logs. +Prints log information in formatted output mode. **System capability**: SystemCapability.ArkUI.ArkUI.Full @@ -35,14 +44,25 @@ Prints debug-level logs. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| message | string | Yes | Text to print.| +| message | string | Yes | Text to be printed.| +| arguments | any | No |Arguments in the message or other information to be printed.| +**Example** +```js +const number = 5; +console.log('count: %d', number); // Print the log information with arguments in the message replaced. +// count: 5 +console.log('count:', number); // Print the message and other information. +// count: 5 +console.log('count:'); // Print the message only. +// count: +``` ## console.info -info(message: string): void +info(message: string, ...arguments: any[]): void -Prints info-level logs. +Prints log information in formatted output mode. This API is the alias of **console.log ()**. **System capability**: SystemCapability.ArkUI.ArkUI.Full @@ -50,14 +70,25 @@ Prints info-level logs. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| message | string | Yes | Text to print.| +| message | string | Yes | Text to be printed.| +| arguments | any | No | Arguments in the message or other information to be printed.| +**Example** +```js +const number = 5; +console.info('count: %d', number); // Print the log information with arguments in the message replaced. +// count: 5 +console.info('count:', number); // Print the message and other information. +// count: 5 +console.info('count:'); // Print the message only. +// count: +``` ## console.warn -warn(message: string): void +warn(message: string, ...arguments: any[]): void -Prints warn-level logs. +Prints warning information in formatted output mode. **System capability**: SystemCapability.ArkUI.ArkUI.Full @@ -65,14 +96,25 @@ Prints warn-level logs. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| message | string | Yes | Text to print.| +| message | string | Yes | Warning information to be printed.| +| arguments | any | No | Arguments in the message or other information to be printed.| +**Example** +```js +const str = "name should be string"; +console.warn('warn: %d', str); // Print the warning information with arguments in the message replaced. +// warn: name should be string +console.warn('warn:', str); // Print the message and other information. +// warn: name should be string +console.warn('warn:'); // Print the message only. +// warn: +``` ## console.error -error(message: string): void +error(message: string, ...arguments: any[]): void -Prints error-level logs. +Prints error information in formatted output mode. **System capability**: SystemCapability.ArkUI.ArkUI.Full @@ -80,31 +122,26 @@ Prints error-level logs. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| message | string | Yes | Text to print.| +| message | string | Yes | Error information to be printed.| +| arguments | any | No | Arguments in the message or other information to be printed.| **Example** - +```js +const str = "value is not defined"; +console.error('error: %d', str); // Print the error information with arguments in the message replaced. +// error: value is not defined +console.error('error:', str); // Print the message and other information. +// error: value is not defined +console.error('error:'); // Print the message only. +// error: ``` -export default { - clickConsole(){ - var versionCode = 1; - console.info('Hello World. The current version code is ' + versionCode); - console.log(`versionCode: ${versionCode}`); - / / The following is supported since API version 6: console.log('versionCode:%d.', versionCode); - } -} -``` - -Switch to the HiLog window at the bottom of HUAWEI DevEco Studio. Specifically, select the current device and process, set the log level to Info, and enter Hello World in the search box. Logs that meet the search criteria are displayed, as shown in the following figure. - -![Printing logs](figures/printing-logs.png) ## console.assert10+ assert(value?: Object, ...arguments: Object[]): void -If **value** is false, the subsequent content will be printed. +Prints assertion information. **System capability**: SystemCapability.Utils.Lang @@ -112,24 +149,26 @@ If **value** is false, the subsequent content will be printed. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| value | Object | No | Value| -| arguments | Object | No | Prints error messages.| +| value | Object | No | Result value. If **value** is **false** or left blank, the output starting with "Assertion failed" is printed. If **value** is **true**, no information is printed.| +| arguments | Object | No | Other information to be printed when **value** is **false**. If this parameter is left blank, other information is not printed.| **Example** -``` -console.assert(true, 'does nothing'); +```js +console.assert(true, 'does nothing'); // Do not print error information as value is true. +console.assert(2% 1 == 0,'does nothing'); // Do not print error information as value is true. console.assert(false, 'console %s work', 'didn\'t'); -// Assertion console:ohos didn't work +// Assertion failed: console didn't work console.assert(); // Assertion failed ``` + ## console.count10+ count(label?: string): void -Adds a counter by the specified label name to count the number of times **console.count()** is called. The default value is **default**. +Maintains an internal counter. When this counter is invoked, its label name and the corresponding call count are printed. **System capability**: SystemCapability.Utils.Lang @@ -137,10 +176,11 @@ Adds a counter by the specified label name to count the number of times **consol | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| label | string | No | Counter label name.| +| label | string | No | Counter label name. The default value is **default**.| + **Example** -``` +```js console.count() // default: 1 console.count('default') @@ -150,7 +190,7 @@ console.count('abc') console.count('xyz') // xyz: 1 console.count('abc') -abc: 2 +// abc: 2 console.count() // default: 3 ``` @@ -159,7 +199,7 @@ console.count() countReset(label?: string): void -Resets a counter by the specified label name. The default value is **default**. +Resets a counter based on the specified label name. **System capability**: SystemCapability.Utils.Lang @@ -167,10 +207,10 @@ Resets a counter by the specified label name. The default value is **default**. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| label | string | No | Counter label name.| +| label | string | No | Counter label name. The default value is **default**.| **Example** -``` +```js console.count('abc'); // abc: 1 console.countReset('abc'); @@ -190,13 +230,24 @@ Prints content of the specified object. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| dir | Object | No | Object whose content needs to be printed.| +| dir | Object | No | Object whose content needs to be printed. If this parameter is left blank, no information is printed.| + + +**Example** +```js +let a = { foo: { bar: { baz: true } }}; +console.dir(a); +// Object: {"foo":{"bar":{"baz":true}}} + +console.dir(); // No information is printed. +``` + ## console.dirxml10+ dirxml(...arguments: Object[]): void -Calls **console.log()** and passes the received parameters to it. This API does not produce any content of the XML format. +Displays an interactive tree of the descendant elements of the specified XML element. This API is implemented by calling **console.log()** internally. It does not produce any XML elements. The usage method is the same as that of **console.log()**. **System capability**: SystemCapability.Utils.Lang @@ -204,13 +255,24 @@ Calls **console.log()** and passes the received parameters to it. This API does | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| arguments | Object | No | Information to be printed.| +| arguments | Object | Yes | Information to be printed.| + +**Example** +```js +const number = 5; +console.dirxml('count: %d', number); +// count: 5 +console.dirxml('count:', number); +// count: 5 +console.dirxml('count:'); +// count: +``` ## console.group10+ group(...arguments: Object[]): void -Creates an inline group so that subsequent lines are indented by the value specified by **groupIndentation**. +Increases the indentation of subsequent lines by two spaces. If the information to be printed is provided, the information is printed without extra indentation. **System capability**: SystemCapability.Utils.Lang @@ -220,11 +282,26 @@ If the information to be printed is provided, the information is printed without | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | | arguments | Object | No | Information to be printed.| + +**Example** +```js +console.log("outter"); +// outter +console.group(); +console.log("level 1"); +// level 1 +console.group("in level1"); +// in level1 +console.log("level 2"); +// level 2 +``` + + ## console.groupCollapsed10+ groupCollapsed(...arguments: Object[]): void -Creates a collapsed inline group. +Creates a new inline group in collapsed mode. The usage and function of this API are the same as those of **console.group()**. **System capability**: SystemCapability.Utils.Lang @@ -234,14 +311,42 @@ Creates a collapsed inline group. | ------- | ------ | ---- | ----------- | | arguments | Object | No | Information to be printed.| + +**Example** +```js +console.groupCollapsed("outter"); +// outter +console.groupCollapsed(); +console.log("level 1"); +// level 1 +console.groupCollapsed("in level1"); +// in level1 +console.log("level 2"); +// level 2 +``` + ## console.groupEnd10+ groupEnd(): void -Exits an inline group so that subsequent lines are not indented by the value specified by **groupIndentation** . +Reduces the indentation of subsequent lines by two spaces. **System capability**: SystemCapability.Utils.Lang + +**Example** +```js +console.log("outter"); +// outter +console.group(); +console.log("level 1"); +// level 1 +console.groupEnd(); +console.log("outter"); +// outter +``` + + ## console.table10+ table(tableData?: Object): void @@ -254,10 +359,10 @@ Prints data in a table. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| tableData | Object | No | Data to be printed in a table.| +| tableData | Object | No | Data to be printed in a table. If this parameter is left blank, no information is printed.| **Example** -``` +```js console.table([1, 2, 3]); // ┌─────────┬────────┐ // │ (index) │ Values │ @@ -281,7 +386,7 @@ console.table({ a: [1, 2, 3, 4, 5], b: 5, c: { e: 5 } }); time(label?: string): void -Starts a timer to track the duration of an operation. The default value is **default**. You can use **console.timeEnd()** to disable the timer and print the result. +Starts a timer to track the duration of an operation. You can use **console.timeEnd()** to close the timer and print the elapsed time (in ms). **System capability**: SystemCapability.Utils.Lang @@ -289,13 +394,18 @@ Starts a timer to track the duration of an operation. The default value is **def | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| label | string | No | Timer label.| +| label | string | No | Timer label. The default value is **default**.| + +**Example** +```js +console.time('abc'); +``` ## console.timeEnd10+ timeEnd(label?: string): void -Stops the timer started by **console.time()** and prints the result. The default value is **default**. +Stops the timer started by calling **console.time()** and prints the elapsed time (in ms). **System capability**: SystemCapability.Utils.Lang @@ -303,10 +413,10 @@ Stops the timer started by **console.time()** and prints the result. The default | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| label | string | No | Timer label.| +| label | string | No | Timer label. The default value is **default**.| **Example** -``` +```js console.time('abc'); console.timeEnd('abc'); // abc: 225.438ms @@ -316,7 +426,7 @@ console.timeEnd('abc'); timeLog(label?: string, ...arguments: Object[]): void -Prints the elapsed time and other logs for the timer started by **console.time()**. +Prints the elapsed time and other data parameters for the timer started by **console.time()**. **System capability**: SystemCapability.Utils.Lang @@ -324,14 +434,13 @@ Prints the elapsed time and other logs for the timer started by **console.time() | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| label | string | No | Timer label.| +| label | string | No | Timer label. The default value is **default**.| | arguments | Object | No | Logs to be printed.| **Example** -``` +```js console.time('timer1'); -const value = aaa (); // Return 17. -console.timeLog('timer1', value); +console.timeLog('timer1', 17); // timer1: 365.227ms 17 console.timeEnd('timer1'); // timer1: 513.22ms @@ -349,10 +458,14 @@ Creates a stack trace. | Name | Type | Mandatory | Description | | ------- | ------ | ---- | ----------- | -| arguments | Object | No | Logs to be printed.| +| arguments | Object | No | Logs to be printed. If this parameter is left blank, only stack information is printed.| **Example** -``` +```js console.trace(); +// Trace: +// xxxxxxxxxx (current stack information) console.trace("Show the trace"); +// Trace: Show the trace +// xxxxxxxxxx (current stack information) ``` diff --git a/en/application-dev/reference/apis/js-apis-net-ethernet.md b/en/application-dev/reference/apis/js-apis-net-ethernet.md index ec15531de49c13ab4b2c85b0da9eacf37400d195..eca9a04d0e42791e19a3620f6582f3d7284dc6d4 100644 --- a/en/application-dev/reference/apis/js-apis-net-ethernet.md +++ b/en/application-dev/reference/apis/js-apis-net-ethernet.md @@ -55,8 +55,7 @@ ethernet.setIfaceConfig("eth0", { route: "192.168.xx.xxx", gateway: "192.168.xx.xxx", netMask: "255.255.255.0", - dnsServers: "1.1.1.1", - domain: "2.2.2.2" + dnsServers: "1.1.1.1" }, (error) => { if (error) { console.log("setIfaceConfig callback error = " + JSON.stringify(error)); @@ -115,8 +114,7 @@ ethernet.setIfaceConfig("eth0", { route: "192.168.xx.xxx", gateway: "192.168.xx.xxx", netMask: "255.255.255.0", - dnsServers: "1.1.1.1", - domain: "2.2.2.2" + dnsServers: "1.1.1.1" }).then(() => { console.log("setIfaceConfig promise ok "); }).catch(error => { @@ -168,7 +166,6 @@ ethernet.getIfaceConfig("eth0", (error, value) => { console.log("getIfaceConfig callback gateway = " + JSON.stringify(value.gateway)); console.log("getIfaceConfig callback netMask = " + JSON.stringify(value.netMask)); console.log("getIfaceConfig callback dnsServers = " + JSON.stringify(value.dnsServers)); - console.log("getIfaceConfig callback domain = " + JSON.stringify(value.domain)); } }); ``` @@ -219,7 +216,6 @@ ethernet.getIfaceConfig("eth0").then((data) => { console.log("getIfaceConfig promise gateway = " + JSON.stringify(data.gateway)); console.log("getIfaceConfig promise netMask = " + JSON.stringify(data.netMask)); console.log("getIfaceConfig promise dnsServers = " + JSON.stringify(data.dnsServers)); - console.log("getIfaceConfig promise domain = " + JSON.stringify(data.domain)); }).catch(error => { console.log("getIfaceConfig promise error = " + JSON.stringify(error)); }); diff --git a/en/application-dev/reference/apis/js-apis-net-policy.md b/en/application-dev/reference/apis/js-apis-net-policy.md deleted file mode 100644 index cb5f1624f6a3508d25ee1019525ebac8ea9c5475..0000000000000000000000000000000000000000 --- a/en/application-dev/reference/apis/js-apis-net-policy.md +++ /dev/null @@ -1,1555 +0,0 @@ -# @ohos.net.policy (Network Policy Management) - -The **policy** module provides APIs for managing network policies, through which you can control and manage the data volume used. - -> **NOTE** -> -> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. - -## Modules to Import - -```js -import policy from '@ohos.net.policy' -``` - -## policy.setBackgroundAllowed - -setBackgroundAllowed(isAllowed: boolean, callback: AsyncCallback\): void - -Sets a background network policy. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| isAllowed | boolean | Yes | Whether applications running in the background are allowed to use mobile data.| -| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, the operation result is returned. If the operation fails, an error message is returned.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -policy.setBackgroundAllowed(Boolean(Number.parseInt(this.isBoolean)), (error) => { - console.log(JSON.stringify(error)) -}) -; -``` - -## policy.setBackgroundAllowed - -setBackgroundAllowed(isAllowed: boolean): Promise\ - -Sets a background network policy. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| isAllowed | boolean | Yes | Whether applications running in the background are allowed to use mobile data.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\ | Promise used to return the result. If the operation is successful, the operation result is returned. If the operation fails, an error message is returned.| - -**Example** - -```js -policy.setBackgroundAllowed(Boolean(Number.parseInt(this.isBoolean))).then(function (error) { - console.log(JSON.stringify(error)) -}) -``` - -## policy.isBackgroundAllowed - -isBackgroundAllowed(callback: AsyncCallback\): void - -Obtains the background network policy. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, **true** is returned, which means that applications running in the background are allowed to use mobile data. If the operation fails, an error message is returned.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -policy.isBackgroundAllowed((error, data) => { - this.callBack(error, data); - console.log(JSON.stringify(error)) - console.log(JSON.stringify(data)) -}); -``` - -## policy.isBackgroundAllowed - -isBackgroundAllowed(): Promise\; - -Obtains the background network policy. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\ | Promise used to return the result. If the operation is successful, **true** is returned, which means that applications running in the background are allowed to use mobile data. If the operation fails, an error message is returned.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -policy.isBackgroundAllowed().then(function (error, data) { - console.log(JSON.stringify(error)) - console.log(JSON.stringify(data)) -}) -``` - -## policy.setPolicyByUid - -setPolicyByUid(uid: number, policy: NetUidPolicy, callback: AsyncCallback\): void - -Sets an application-specific network policy. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| uid | number | Yes | Unique ID of the application.| -| policy | [NetUidPolicy](#netuidpolicy) | Yes| Application-specific network policy to set.| -| callback | AsyncCallback\ | Yes | Callback used to return the result. If the operation is successful, the operation result is returned. If the operation fails, an error message is returned.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -let param = { - uid: Number.parseInt(this.firstParam), policy: Number.parseInt(this.currentNetUidPolicy) -} -policy.setPolicyByUid(Number.parseInt(this.firstParam), Number.parseInt(this.currentNetUidPolicy), (error) => { - this.callBack(error); -}); -``` - -## policy.setPolicyByUid - -setPolicyByUid(uid: number, policy: NetUidPolicy): Promise\; - -Sets an application-specific network policy. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| uid | number | Yes | Unique ID of the application.| -| policy | [NetUidPolicy](#netuidpolicy) | Yes| Application-specific network policy to set.| - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\ | Promise used to return the result. If the operation is successful, the operation result is returned. If the operation fails, an error message is returned.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -let param = { - uid: Number.parseInt(this.firstParam), policy: Number.parseInt(this.currentNetUidPolicy) -} -policy.setPolicyByUid(Number.parseInt(this.firstParam), Number.parseInt(this.currentNetUidPolicy)).then(function (error) { - console.log(JSON.stringify(error)) -}) -``` - -## policy.getPolicyByUid - -getPolicyByUid(uid: number, callback: AsyncCallback\): void - -Obtains an application-specific network policy by **uid**. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| uid | number | Yes| Unique ID of the application.| -| callback | AsyncCallback\<[NetUidPolicy](#netuidpolicy)> | Yes | Callback used to return the result. If the operation is successful, the operation result is returned. If the operation fails, an error message is returned.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -policy.getPolicyByUid(Number.parseInt(this.firstParam), (error, data) => { - this.callBack(error, data); -}); -``` - -## policy.getPolicyByUid - -getPolicyByUid(uid: number): Promise\; - -Obtains an application-specific network policy by **uid**. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| uid | number | Yes| Unique ID of the application.| - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\<[NetUidPolicy](#netuidpolicy)> | Promise used to return the result. If the operation is successful, the operation result is returned. If the operation fails, an error message is returned.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -policy.getPolicyByUid(Number.parseInt(this.firstParam)).then(function (error, data) { - console.log(JSON.stringify(error)) - console.log(JSON.stringify(data)) -}) -``` - -## policy.getUidsByPolicy - -getUidsByPolicy(policy: NetUidPolicy, callback: AsyncCallback\>): void - -Obtains the UID array of applications configured with a certain application-specific network policy. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| policy | [NetUidPolicy](#netuidpolicy) | Yes| Target application-specific network policy.| -| callback | AsyncCallback\> | Yes | Callback used to return the result. If the operation is successful, the operation result is returned. If the operation fails, an error message is returned.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -policy.getUidsByPolicy(Number.parseInt(this.currentNetUidPolicy), (error, data) => { - this.callBack(error, data); -}); -``` - -## policy.getUidsByPolicy - -function getUidsByPolicy(policy: NetUidPolicy): Promise\>; - -Obtains the UID array of applications configured with a certain application-specific network policy. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| policy | [NetUidPolicy](#netuidpolicy) | Yes| Target application-specific network policy.| - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\> | Promise used to return the result. If the operation is successful, the operation result is returned. If the operation fails, an error message is returned.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -policy.getUidsByPolicy(Number.parseInt(this.firstParam)).then(function (error, data) { - console.log(JSON.stringify(error)) - console.log(JSON.stringify(data)) -}) -``` - -## policy.getNetQuotaPolicies - -getNetQuotaPolicies(callback: AsyncCallback\>): void - -Obtains the network quota policies. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| callback | AsyncCallback\> | Yes | Callback used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -policy.getNetQuotaPolicies((error, data) => { - this.callBack(error, data); -}); -``` - -## policy.getNetQuotaPolicies - -getNetQuotaPolicies(): Promise\>; - -Obtains the network quota policies. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\> | Promise used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -policy.getNetQuotaPolicies().then(function (error, data) { - console.log(JSON.stringify(error)) - console.log(JSON.stringify(data)) -}) - -``` - -## policy.setNetQuotaPolicies - -setNetQuotaPolicies(quotaPolicies: Array\, callback: AsyncCallback\): void - -Sets an array of network quota policies. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| quotaPolicies | Array\<[NetQuotaPolicy](#netquotapolicy)> | Yes| An array of network quota policies to set.| -| callback | AsyncCallback\ | Yes | Callback used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -let param = { - netType: Number.parseInt(this.netType), - iccid: this.iccid, - ident: this.ident, - periodDuration: this.periodDuration, - warningBytes: Number.parseInt(this.warningBytes), - limitBytes: Number.parseInt(this.limitBytes), - lastWarningRemind: this.lastWarningRemind, - lastLimitRemind: this.lastLimitRemind, - metered: Boolean(Number.parseInt(this.metered)), - limitAction: this.limitAction -}; -this.netQuotaPolicyList.push(param); - -policy.setNetQuotaPolicies(this.netQuotaPolicyList, (error) => { - console.log(JSON.stringify(error)) -}); -``` - -## policy.setNetQuotaPolicies - -setNetQuotaPolicies(quotaPolicies: Array\): Promise\; - -Sets an array of network quota policies. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| quotaPolicies | Array\<[NetQuotaPolicy](#netquotapolicy)> | Yes| An array of network quota policies to set.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\ | Promise used to return the result.| - -**Example** - -```js -let param = { - netType: Number.parseInt(this.netType), - iccid: this.iccid, - ident: this.ident, - periodDuration: this.periodDuration, - warningBytes: Number.parseInt(this.warningBytes), - limitBytes: Number.parseInt(this.limitBytes), - lastWarningRemind: this.lastWarningRemind, - lastLimitRemind: this.lastLimitRemind, - metered: Boolean(Number.parseInt(this.metered)), - limitAction: this.limitAction -}; -this.netQuotaPolicyList.push(param); - -policy.setNetQuotaPolicies(this.netQuotaPolicyList).then(function (error) { - console.log(JSON.stringify(error)) -}) -``` - -## policy.restoreAllPolicies - -restoreAllPolicies(iccid: string, callback: AsyncCallback\): void - -Restores all the policies (cellular network, background network, firewall, and application-specific network policies) for the given SIM card. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| iccid | string | Yes| SIM card ID.| -| callback | AsyncCallback\ | Yes | Callback used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -this.firstParam = iccid; -policy.restoreAllPolicies(this.firstParam, (error) => { - console.log(JSON.stringify(error)) -}); -``` - -## policy.restoreAllPolicies - -restoreAllPolicies(iccid: string): Promise\; - -Restores all the policies (cellular network, background network, firewall, and application-specific network policies) for the given SIM card. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| iccid | string | Yes| SIM card ID.| - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\ | Promise used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -this.firstParam = iccid; -policy.restoreAllPolicies(this.firstParam).then(function (error) { - console.log(JSON.stringify(error)) -}) -``` - -## policy.isUidNetAllowed - -isUidNetAllowed(uid: number, isMetered: boolean, callback: AsyncCallback\): void - -Checks whether an application is allowed to access metered networks. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| uid | number | Yes| Unique ID of the application.| -| isMetered | boolean | Yes| Whether the network is a metered network.| -| callback | AsyncCallback\ | Yes | Callback used to return the result. The value **true** means that the application is allowed to access metered networks, and **false** means the opposite.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -let param = { - uid: Number.parseInt(this.firstParam), isMetered: Boolean(Number.parseInt(this.isBoolean)) -} -policy.isUidNetAllowed(Number.parseInt(this.firstParam), Boolean(Number.parseInt(this.isBoolean)), (error, data) => { - this.callBack(error, data); -}); -``` - -## policy.isUidNetAllowed - -isUidNetAllowed(uid: number, isMetered: boolean): Promise\; - -Checks whether an application is allowed to access metered networks. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| uid | number | Yes| Unique ID of the application.| -| isMetered | boolean | Yes| Whether the network is a metered network.| - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\ | Promise used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -let param = { - uid: Number.parseInt(this.firstParam), isMetered: Boolean(Number.parseInt(this.isBoolean)) -} -policy.isUidNetAllowed(Number.parseInt(this.firstParam), Boolean(Number.parseInt(this.isBoolean))).then(function (error, data) { - console.log(JSON.stringify(error)) - console.log(JSON.stringify(data)) -}) -``` - -## policy.isUidNetAllowed - -isUidNetAllowed(uid: number, iface: string, callback: AsyncCallback\): void - -Checks whether an application is allowed to access the given network. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| uid | number | Yes| Unique ID of the application.| -| iface | string | Yes| Name of the target network.| -| callback | AsyncCallback\ | Yes | Callback used to return the result. The value **true** means that the application is allowed to access the given network, and **false** means the opposite.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -let param = { - uid: Number.parseInt(this.firstParam), iface: this.secondParam -} -policy.isUidNetAllowed(Number.parseInt(this.firstParam), this.secondParam, (error, data) => { - this.callBack(error, data); -}); -``` - -## policy.isUidNetAllowed - -isUidNetAllowed(uid: number, iface: string): Promise\; - -Checks whether an application is allowed to access the given network. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| uid | number | Yes| Unique ID of the application.| -| iface | string | Yes| Name of the target network.| - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\ | Promise used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -let param = { - uid: Number.parseInt(this.firstParam), iface: this.secondParam -} -policy.isUidNetAllowed(Number.parseInt(this.firstParam), this.secondParam).then(function (error, data) { - console.log(JSON.stringify(error)) - console.log(JSON.stringify(data)) -}) -``` - -## policy.setDeviceIdleAllowList - -setDeviceIdleAllowList(uid: number, isAllowed: boolean, callback: AsyncCallback\): void - -Sets whether to add an application to the device idle allowlist. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| uid | number | Yes| Unique ID of the application.| -| isAllowed | boolean | Yes| Whether to add the application to the allowlist.| -| callback | callback: AsyncCallback\ | Yes | Callback used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -let param = { - uid: Number.parseInt(this.firstParam), isAllowed: Boolean(Number.parseInt(this.isBoolean)) -} -policy.setDeviceIdleAllowList(Number.parseInt(this.firstParam), Boolean(Number.parseInt(this.isBoolean)), (error) => { - console.log(JSON.stringify(error)) -}); -``` - -## policy.setDeviceIdleAllowList - -setDeviceIdleAllowList(uid: number, isAllowed: boolean): Promise\; - -Sets whether to add an application to the device idle allowlist. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| uid | number | Yes| Unique ID of the application.| -| isAllowed | boolean | Yes| Whether to add the application to the allowlist.| - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\ | Promise used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -let param = { - uid: Number.parseInt(this.firstParam), isAllowed: Boolean(Number.parseInt(this.isBoolean)) -} -policy.setDeviceIdleAllowList(Number.parseInt(this.firstParam), Boolean(Number.parseInt(this.isBoolean))).then(function (error) { - console.log(JSON.stringify(error)) -}) -``` - -## policy.getDeviceIdleAllowList - -getDeviceIdleAllowList(callback: AsyncCallback\>): void - -Obtains the UID array of applications that are on the device idle allowlist. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| callback | AsyncCallback\> | Yes | Callback used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -policy.getDeviceIdleAllowList((error, data) => { - this.callBack(error, data); -}); -``` - -## policy.getDeviceIdleAllowList - -getDeviceIdleAllowList(): Promise\>; - -Obtains the UID array of applications that are on the device idle allowlist. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\> | Promise used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -policy.getDeviceIdleAllowList().then(function (error, data) { - console.log(JSON.stringify(error)) - console.log(JSON.stringify(data)) -}) -``` - -## policy.getBackgroundPolicyByUid - -getBackgroundPolicyByUid(uid: number, callback: AsyncCallback\): void - -Obtains the background network policies configured for the given application. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| uid | number | Yes| Unique ID of the application.| -| callback | AsyncCallback\<[NetBackgroundPolicy](#netbackgroundpolicy)> | Yes | Callback used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -this.firstParam = uid -policy.getBackgroundPolicyByUid(Number.parseInt(this.firstParam), (error, data) => { - this.callBack(error, data); -}); -``` - -## policy.getBackgroundPolicyByUid - -getBackgroundPolicyByUid(uid: number): Promise\; - -Obtains the background network policies configured for the given application. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| uid | number | Yes| Unique ID of the application.| - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\<[NetBackgroundPolicy](#netbackgroundpolicy)> | Promise used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -this.firstParam = uid -policy.getBackgroundPolicyByUid(Number.parseInt(this.firstParam)).then(function (error, data) { - console.log(JSON.stringify(error)) - console.log(JSON.stringify(data)) -}) -``` - -## policy.resetPolicies - -resetPolicies(iccid: string, callback: AsyncCallback\): void - -Restores all the policies (cellular network, background network, firewall, and application-specific network policies) for the given SIM card. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| iccid | string | Yes| SIM card ID.| -| callback | AsyncCallback\ | Yes | Callback used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -this.firstParam = iccid -policy.resetPolicies(this.firstParam, (error) => { - console.log(JSON.stringify(error)) -}); -``` - -## policy.resetPolicies - -resetPolicies(iccid: string): Promise\; - -Restores all the policies (cellular network, background network, firewall, and application-specific network policies) for the given SIM card. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| iccid | string | Yes| SIM card ID.| - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\ | Promise used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -policy.getUidsByPolicy(Number.parseInt(this.firstParam)).then(function (error, data) { - -}) -this.firstParam = iccid -policy.resetPolicies(this.firstParam).then(function (error) { - console.log(JSON.stringify(error)) -}) -``` - -## policy.updateRemindPolicy - -updateRemindPolicy(netType: NetBearType, iccid: string, remindType: RemindType, callback: AsyncCallback\): void - -Updates a reminder policy. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| netType | [NetBearType](js-apis-net-connection.md#netbeartype) | Yes| Network type.| -| iccid | string | Yes| SIM card ID.| -| remindType | [RemindType](#remindtype) | Yes| Reminder type.| -| callback | AsyncCallback\ | Yes | Callback used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -let param = { - netType: Number.parseInt(this.netType), iccid: this.firstParam, remindType: this.currentRemindType -} -policy.updateRemindPolicy(Number.parseInt(this.netType), this.firstParam, Number.parseInt(this.currentRemindType), (error) => { - console.log(JSON.stringify(error)) -}); -``` - -## policy.updateRemindPolicy - -updateRemindPolicy(netType: NetBearType, iccid: string, remindType: RemindType): Promise\; - -Updates a reminder policy. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| netType | [NetBearType](js-apis-net-connection.md#netbeartype) | Yes| Network type.| -| iccid | string | Yes| SIM card ID.| -| remindType | [RemindType](#remindtype) | Yes| Reminder type.| - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\ | Promise used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -let param = { - netType: Number.parseInt(this.netType), iccid: this.firstParam, remindType: this.currentRemindType -} -policy.updateRemindPolicy(Number.parseInt(this.netType), this.firstParam, Number.parseInt(this.currentRemindType)).then(function (error) { - console.log(JSON.stringify(error)) -}) -``` - -## policy.setPowerSaveAllowList - -setPowerSaveAllowList(uid: number, isAllowed: boolean, callback: AsyncCallback\): void - -Sets whether to add an application to the power-saving allowlist. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| uid | number | Yes| Unique ID of the application.| -| isAllowed | boolean | Yes| Whether to add the application to the allowlist.| -| callback | callback: AsyncCallback\ | Yes | Callback used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -let param = { - uid: Number.parseInt(this.firstParam), isAllowed: Boolean(Number.parseInt(this.isBoolean)) -} -policy.setPowerSaveAllowList(Number.parseInt(this.firstParam), Boolean(Number.parseInt(this.isBoolean)), (error) => { - console.log(JSON.stringify(error)) -}); -``` - -## policy.setPowerSaveAllowList - -setPowerSaveAllowList(uid: number, isAllowed: boolean): Promise\; - -Sets whether to add an application to the power-saving allowlist. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| uid | number | Yes| Unique ID of the application.| -| isAllowed | boolean | Yes| Whether to add the application to the allowlist.| - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\ | Promise used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 401 | Parameter error. | -| 2100001 | Invalid parameter value. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -let param = { - uid: Number.parseInt(this.firstParam), isAllowed: Boolean(Number.parseInt(this.isBoolean)) -} -policy.setPowerSaveAllowList(Number.parseInt(this.firstParam), Boolean(Number.parseInt(this.isBoolean))).then(function (error) { - console.log(JSON.stringify(error)) -}) -``` - -## policy.getPowerSaveAllowList - -getPowerSaveAllowList(callback: AsyncCallback\>): void - -Obtains the UID array of applications that are on the power-saving allowlist. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | --------------------------------------- | ---- | ---------- | -| callback | AsyncCallback\> | Yes | Callback used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -policy.getPowerSaveAllowList((error, data) => { - this.callBack(error, data); -}); -``` - -## policy.getPowerSaveAllowList - -getPowerSaveAllowList(): Promise\>; - -Obtains the UID array of applications that are on the device idle allowlist. This API uses a promise to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Return value** - -| Type | Description | -| --------------------------------- | ------------------------------------- | -| Promise\> | Promise used to return the result.| - -**Error codes** - -| ID| Error Message | -| ------- | -------------------------------------------- | -| 201 | Permission denied. | -| 2100002 | Operation failed. Cannot connect to service.| -| 2100003 | System internal error. | - -**Example** - -```js -policy.getPowerSaveAllowList().then(function (error, data) { - console.log(JSON.stringify(error)) - console.log(JSON.stringify(data)) -}) -``` - -## policy.on - -Functions as the handle to a network policy. - -### on('netUidPolicyChange') - -on(type: "netUidPolicyChange", callback: Callback\<{ uid: number, policy: NetUidPolicy }>): void - -Subscribes to policy changes. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | ---------------------------------- | ---- | ------------------------------------------------------------ | -| type | netUidPolicyChange | Yes| Event type. The value **netUidPolicyChange** indicates a policy change event.| -| callback | Callback\<{ uid: number, policy: [NetUidPolicy](#netuidpolicy) }> | Yes | Callback used to return the result. It is called when the registered network policy changes.| - -**Example** - -```js -policy.on('netUidPolicyChange', (data) => { - this.log('on netUidPolicyChange: ' + JSON.stringify(data)); -}) -``` - -### on('netUidRuleChange') - -on(type: "netUidRuleChange", callback: Callback\<{ uid: number, rule: NetUidRule }>): void - -Subscribes to rule changes. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | ---------------------------------- | ---- | ------------------------------------------------------------ | -| type | netUidRuleChange | Yes| Event type. The value **netUidRuleChange** indicates a rule change event.| -| callback | Callback\<{ uid: number, rule: [NetUidRule](#netuidrule) }> | Yes | Callback used to return the result. It is called when the registered rule changes.| - -**Example** - -```js -policy.on('netUidRuleChange', (data) => { - this.log('on netUidRuleChange: ' + JSON.stringify(data)); -}) -``` - -### on('netMeteredIfacesChange') - -on(type: "netMeteredIfacesChange", callback: Callback\>): void - -Subscribes to metered **iface** changes. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | ---------------------------------- | ---- | ------------------------------------------------------------ | -| type | netMeteredIfacesChange | Yes| Event type. The value **netMeteredIfacesChange** indicates a metered **iface** change event.| -| callback | Callback\> | Yes | Callback used to return the result. It is called when the registered metered **iface** changes.| - -**Example** - -```js -policy.on('netMeteredIfacesChange', (data) => { - this.log('on netMeteredIfacesChange: ' + JSON.stringify(data)); -}) -``` - -### on('netQuotaPolicyChange') - -on(type: "netQuotaPolicyChange", callback: Callback\>): void - -Subscribes to network quota policy changes. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | ---------------------------------- | ---- | ------------------------------------------------------------ | -| type | netQuotaPolicyChange | Yes| Event type. The value **netQuotaPolicyChange** indicates a network quota policy change event.| -| callback | Callback\> | Yes | Callback used to return the result. It is called when the registered network quota policy changes.| - -**Example** - -```js -policy.on('netQuotaPolicyChange', (data) => { - this.log('on netQuotaPolicyChange: ' + JSON.stringify(data)); -}) -``` - -### on('netBackgroundPolicyChange') - -on(type: "netBackgroundPolicyChange", callback: Callback\): void - -Subscribes to background network policy changes. This API uses an asynchronous callback to return the result. - -**Required permissions**: ohos.permission.CONNECTIVITY_INTERNAL - -**System capability**: SystemCapability.Communication.NetManager.Core - -**Parameters** - -| Name | Type | Mandatory| Description | -| -------- | ---------------------------------- | ---- | ------------------------------------------------------------ | -| type | netBackgroundPolicyChange | Yes| Event type. The value **netBackgroundPolicyChange** indicates a background network policy change event.| -| callback | Callback\ | Yes | Callback used to return the result. It is called when the registered background network policy changes.| - -**Example** - -```js -policy.on('netBackgroundPolicyChange', (data) => { - this.log('on netBackgroundPolicyChange: ' + JSON.stringify(data)); -}) -``` - -## NetBackgroundPolicy - -Enumerates the background network policies. - -**System capability**: SystemCapability.Communication.NetManager.Core - -| Name | Value | Description | -| ------------------------ | ---- | ---------------------- | -| NET_BACKGROUND_POLICY_NONE | 0 | Default policy.| -| NET_BACKGROUND_POLICY_ENABLE | 1 | Applications running in the background are allowed to access metered networks.| -| NET_BACKGROUND_POLICY_DISABLE | 2 | Applications running in the background are not allowed to access metered networks.| -| NET_BACKGROUND_POLICY_ALLOW_LIST | 3 | Only applications on the allowlist are allowed to access metered networks when they are running in the background.| - -## NetQuotaPolicy - -Defines a network quota policy. - -**System capability**: SystemCapability.Communication.NetManager.Core - -| Name | Type | Description | -| ----------------------- | ----------------------------------- | ------------------------------------------------------------ | -| netType | [NetBearType](js-apis-net-connection.md#netbeartype) | Network type.| -| iccid | string | Identifier of the SIM card on the metered cellular network. It is not used for Wi-Fi networks.| -| ident | string | Identifier of the SIM card on the metered cellular network. It is used for Wi-Fi networks. It is used together with **iccid**.| -| periodDuration | string | Start time of metering.| -| warningBytes | number | Data volume threshold for generating an alarm.| -| limitBytes | number | Data volume quota.| -| lastWarningRemind | string | Last time when an alarm was generated.| -| lastLimitRemind | string | Last time when the quota was exhausted.| -| metered | string | Whether the network is a metered network.| -| limitAction | [LimitAction](#limitaction) | Action to take when the data volume quota is reached.| - -## LimitAction - -Enumerates the actions that can be taken when the data volume quota is reached. - -**System capability**: SystemCapability.Communication.NetManager.Core - -| Name | Value| Description | -| ---------------------- | ----- | ------------ | -| LIMIT_ACTION_NONE | -1 | Default policy.| -| LIMIT_ACTION_DISABLE | 0 | Internet access is disabled.| -| LIMIT_ACTION_AUTO_BILL| 1 | Users will be automatically charged for the data volume they use.| - -## NetUidRule - -Enumerates the metered network rules. - -**System capability**: SystemCapability.Communication.NetManager.Core - -| Name | Value| Description | -| ---------------------- | ----- | ------------ | -| NET_RULE_NONE | 0 | Default rule.| -| NET_RULE_ALLOW_METERED_FOREGROUND | 1 | Applications running in the foreground are allowed to access metered networks.| -| NET_RULE_ALLOW_METERED | 2 | Applications are allowed to access metered networks.| -| NET_RULE_REJECT_METERED | 4 | Applications are not allowed to access metered networks.| -| NET_RULE_ALLOW_ALL | 32 | Applications are allowed to access all networks (metered or non-metered).| -| NET_RULE_REJECT_ALL | 64 | Applications are not allowed to access any networks (metered or non-metered).| - -## RemindType - -Enumerates the reminder types. - -**System capability**: SystemCapability.Communication.NetManager.Core - -| Name| Value| Description| -| ---------------------- | - | ------- | -| REMIND_TYPE_WARNING | 1 | Warning.| -| REMIND_TYPE_LIMIT | 2 | Limit.| - -## NetUidPolicy - -Enumerates the application-specific network policies. - -**System capability**: SystemCapability.Communication.NetManager.Core - -| Name | Value| Description | -| ---------------------- | ----- | ------------ | -| NET_POLICY_NONE | 0 | Default network policy.| -| NET_POLICY_ALLOW_METERED_BACKGROUND | 1 | Applications running in the background are allowed to access metered networks.| -| NET_POLICY_REJECT_METERED_BACKGROUND | 2 | Applications running in the background are not allowed to access metered networks.| diff --git a/en/application-dev/reference/apis/js-apis-rpc.md b/en/application-dev/reference/apis/js-apis-rpc.md index c4688c804e2ea21de453a25cf2ad543193f9d2ed..e444fd018a529d7c2901c25ed1b6b24630eb54d9 100644 --- a/en/application-dev/reference/apis/js-apis-rpc.md +++ b/en/application-dev/reference/apis/js-apis-rpc.md @@ -45,9 +45,9 @@ During RPC or IPC, the sender can use the **write()** method provided by **Messa ### create - static create(): MessageSequence +static create(): MessageSequence - Creates a **MessageSequence** object. This API is a static method. +Creates a **MessageSequence** object. This API is a static method. **System capability**: SystemCapability.Communication.IPC.Core @@ -6821,8 +6821,8 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode } let deathRecipient = new MyDeathRecipient(); try { - proxy.registerDeathRecippient(deathRecipient, 0); - proxy.unregisterDeathRecippient(deathRecipient, 0); + proxy.registerDeathRecipient(deathRecipient, 0); + proxy.unregisterDeathRecipient(deathRecipient, 0); } catch(error) { console.info("proxy register deathRecipient fail, errorCode " + error.code); console.info("proxy register deathRecipient fail, errorMessage " + error.message); @@ -6893,7 +6893,7 @@ Removes the callback used to receive death notifications of the remote object. } } let deathRecipient = new MyDeathRecipient(); - proxy.addDeathRecippient(deathRecipient, 0); + proxy.addDeathRecipient(deathRecipient, 0); proxy.removeDeathRecipient(deathRecipient, 0); ``` diff --git a/en/application-dev/reference/apis/js-apis-shortKey.md b/en/application-dev/reference/apis/js-apis-shortKey.md new file mode 100644 index 0000000000000000000000000000000000000000..79a8ce26644ead2c634af316ab5e191fc6955442 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-shortKey.md @@ -0,0 +1,81 @@ +# @ohos.multimodalInput.shortKey (Shortcut Key) + +The **shortKey** module provides APIs to set the delay for starting an ability using a shortcut key. For example, you can set the delay to 3 seconds so that a screenshot is taken when you press and hold the shortcut key for 3 seconds. + +> **NOTE** +> +> - The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> - The APIs provided by this module are system APIs. + +## Modules to Import + +``` +import shortKey from '@ohos.multimodalInput.shortKey'; +``` + +## shortKey.setKeyDownDuration + +setKeyDownDuration(businessId: string, delay: number, callback: AsyncCallback<void>): void + +Sets the delay for starting an ability using the shortcut key. This API uses an asynchronous callback to return the result. + +**System capability**: SystemCapability.MultimodalInput.Input.ShortKey + +**Parameters** + +| Name | Type | Mandatory| Description | +| ---------- | ------------------- | ---- | ------------------------------------------------------------ | +| businessId | string | Yes | Unique service ID registered on the multimodal side. It corresponds to **businessId** in the **ability_launch_config.json** file.| +| delay | number | Yes | Delay for starting an ability using the shortcut key, in ms.| +| callback | AsyncCallback<void> | Yes | Callback used to return the result. | + +**Example** + +``` +try { + shortKey.setKeyDownDuration("screenshot", 500, (error) => { + if (error) { + console.log(`Set key down duration failed, error: ${JSON.stringify(error, [`code`, `message`])}`); + return; + } + console.log(`Set key down duration success`); + }); +} catch (error) { + console.log(`Set key down duration failed, error: ${JSON.stringify(error, [`code`, `message`])}`); +} +``` + + + +## shortKey.setKeyDownDuration + +setKeyDownDuration(businessId: string, delay: number): Promise<void> + +Sets the delay for starting an ability using the shortcut key. This API uses a promise to return the result. + +**System capability**: SystemCapability.MultimodalInput.Input.ShortKey + +**Parameters** + +| Name | Type | Mandatory| Description | +| ---------- | ------ | ---- | ------------------------------------------------------------ | +| businessId | string | Yes | Unique service ID registered on the multimodal side. It corresponds to **businessId** in the **ability_launch_config.json** file.| +| delay | number | Yes | Delay for starting an ability using the shortcut key, in ms.| + +**Return value** + +| Parameters | Description | +| ------------- | ------------- | +| Promise<void> | Promise used to return the result.| + +**Example** + +``` +try { + shortKey.setKeyDownDuration("screenshot", 500).then(() => { + console.log(`Set key down duration success`); + }); +} catch (error) { + console.log(`Set key down duration failed, error: ${JSON.stringify(error, [`code`, `message`])}`); +} +``` diff --git a/en/application-dev/reference/apis/js-apis-system-battery.md b/en/application-dev/reference/apis/js-apis-system-battery.md index efeb9caec59a04362b80c6f3502dc5a34b8e7f34..8eef0562cdedb91214d4eb9e688445eb6d8ff9b8 100644 --- a/en/application-dev/reference/apis/js-apis-system-battery.md +++ b/en/application-dev/reference/apis/js-apis-system-battery.md @@ -27,7 +27,7 @@ Obtains the current charging state and battery level. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| options | [GetStatusOptions](#getstatusoptions) | No| Object that contains the API calling result.| +| options | [GetStatusOptions](#getstatusoptions) | No| Object that contains the API calling result. This parameter is optional and is left blank by default.| **Example** @@ -50,9 +50,9 @@ Object that contains the API calling result. | Name | Type | Mandatory| Description | | -------- | --------------------------------------------------- | ---- | ------------------------------------------------------------ | -| success | (data: [BatteryResponse](#batteryresponse)) => void | No | Called when API call is successful. **data** is a return value of the [BatteryResponse](#batteryresponse) type.| -| fail | (data: string, code: number) => void | No | Called when API call has failed. **data** indicates the error information, and **code** indicates the error code. | -| complete | () => void | No | Called when API call is complete. | +| success | (data: [BatteryResponse](#batteryresponse)) => void | No | Called when an API call is successful. **data** is a return value of the [BatteryResponse](#batteryresponse) type.| +| fail | (data: string, code: number) => void | No | Called when an API call has failed. **data** indicates the error information, and **code** indicates the error code. | +| complete | () => void | No | Called when an API call is complete. | ## BatteryResponse diff --git a/en/application-dev/reference/apis/js-apis-system-brightness.md b/en/application-dev/reference/apis/js-apis-system-brightness.md index 8053c8f0c73d190d33e547ff9f0227df5c6db06a..01a1defec2d87411735e0ffcf30b08beb93faccf 100644 --- a/en/application-dev/reference/apis/js-apis-system-brightness.md +++ b/en/application-dev/reference/apis/js-apis-system-brightness.md @@ -28,7 +28,7 @@ Obtains the current screen brightness. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| options | [GetBrightnessOptions](#getbrightnessoptions) | No | Options for obtaining the screen brightness.| +| options | [GetBrightnessOptions](#getbrightnessoptions) | No | Options for obtaining the screen brightness. This parameter is optional and is left blank by default.| **Example** @@ -56,7 +56,7 @@ Sets the screen brightness. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| options | [SetBrightnessOptions](#setbrightnessoptions) | No | Options for setting the screen brightness.| +| options | [SetBrightnessOptions](#setbrightnessoptions) | No | Options for setting the screen brightness. This parameter is optional and is left blank by default.| **Example** @@ -85,7 +85,7 @@ Obtains the screen brightness adjustment mode. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| options | [GetBrightnessModeOptions](#getbrightnessmodeoptions) | No| Options for obtaining the screen brightness mode.| +| options | [GetBrightnessModeOptions](#getbrightnessmodeoptions) | No| Options for obtaining the screen brightness mode. This parameter is optional and is left blank by default.| **Example** @@ -112,7 +112,7 @@ Sets the screen brightness adjustment mode. **Parameters** | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| options | [SetBrightnessModeOptions](#setbrightnessmodeoptions) | No | Options for setting the screen brightness mode.| +| options | [SetBrightnessModeOptions](#setbrightnessmodeoptions) | No | Options for setting the screen brightness mode. This parameter is optional and is left blank by default.| **Example** @@ -143,7 +143,7 @@ Sets whether to always keep the screen on. Call this API in **onShow()**. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| options | [SetKeepScreenOnOptions](#setkeepscreenonoptions) | No| Options for setting the screen to be steady on.| +| options | [SetKeepScreenOnOptions](#setkeepscreenonoptions) | No| Options for setting the screen to be steady on. This parameter is optional and is left blank by default.| **Example** @@ -166,9 +166,9 @@ Defines the options for obtaining the screen brightness. | Name | Type | Mandatory| Description | | -------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ | -| success | (data: [BrightnessResponse](#brightnessresponse)) => void | No | Called when API call is successful. **data** is a return value of the [BrightnessResponse](#brightnessresponse) type.| -| fail | (data: string, code: number) => void | No | Called when API call has failed. **data** indicates the error information, and **code** indicates the error code. | -| complete | () => void | No | Called when the API call is complete. | +| success | (data: [BrightnessResponse](#brightnessresponse)) => void | No | Called when an API call is successful. **data** is a return value of the [BrightnessResponse](#brightnessresponse) type.| +| fail | (data: string, code: number) => void | No | Called when an API call has failed. **data** indicates the error information, and **code** indicates the error code. | +| complete | () => void | No | Called when an API call is complete. | ## SetBrightnessOptions @@ -178,10 +178,10 @@ Defines the options for setting the screen brightness. | Name | Type | Mandatory| Description | | -------- | ------------------------------------ | ---- | ------------------------------------------------------------ | -| value | number | Yes | Screen brightness. The value is an integer ranging from **1** to **255**.
- If the value is less than or equal to **0**, value **1** will be used.
- If the value is greater than **255**, value **255** will be used.
- If the value contains decimals, the integral part of the value will be used. For example, if value **8.1** is set, value **8** will be used.| -| success | () => void | No | Callback upon a successful API call. | -| fail | (data: string, code: number) => void | No | Called when API call has failed. **data** indicates the error information, and **code** indicates the error code. | -| complete | () => void | No | Called when the API call is complete. | +| value | number | Yes | Screen brightness. The value is an integer ranging from **1** to **255**.
- If the value is less than or equal to **0**, value **1** will be used.
- If the value is greater than **255**, value **255** will be used.
- If the value contains decimals, the integral part of the value will be used. For example, if value **8.1** is set, value **8** will be used.| +| success | () => void | No | Called when an API call is successful. | +| fail | (data: string, code: number) => void | No | Called when an API call has failed. **data** indicates the error information, and **code** indicates the error code. | +| complete | () => void | No | Called when an API call is complete. | ## BrightnessResponse @@ -201,9 +201,9 @@ Defines the options for obtaining the screen brightness mode. | Name | Type | Mandatory| Description | | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | -| success | (data: [BrightnessModeResponse](#brightnessmoderesponse)) => void | No | Called when API call is successful. **data** is a return value of the [BrightnessModeResponse](#brightnessmoderesponse) type.| -| fail | (data: string, code: number) => void | No | Called when API call has failed. **data** indicates the error information, and **code** indicates the error code. | -| complete | () => void | No | Called when the API call is complete. | +| success | (data: [BrightnessModeResponse](#brightnessmoderesponse)) => void | No | Called when an API call is successful. **data** is a return value of the [BrightnessModeResponse](#brightnessmoderesponse) type.| +| fail | (data: string, code: number) => void | No | Called when an API call has failed. **data** indicates the error information, and **code** indicates the error code. | +| complete | () => void | No | Called when an API call is complete. | ## SetBrightnessModeOptions @@ -214,9 +214,9 @@ Defines the options for setting the screen brightness mode. | Name | Type | Mandatory| Description | | -------- | ------------------------------------ | ---- | ------------------------------------------------------ | | mode | number | Yes | The value **0** indicates the manual adjustment mode, and the value **1** indicates the automatic adjustment mode.| -| success | () => void | No | Callback upon a successful API call. | -| fail | (data: string, code: number) => void | No | Called when API call has failed. **data** indicates the error information, and **code** indicates the error code.| -| complete | () => void | No | Called when the API call is complete. | +| success | () => void | No | Called when an API call is successful. | +| fail | (data: string, code: number) => void | No | Called when an API call has failed. **data** indicates the error information, and **code** indicates the error code.| +| complete | () => void | No | Called when an API call is complete. | ## BrightnessModeResponse @@ -237,6 +237,6 @@ Defines the options for setting the screen to be steady on. | Name | Type | Mandatory| Description | | ------------ | ------------------------------------ | ---- | ------------------------------------------------------ | | keepScreenOn | boolean | Yes | The value **true** means to keep the screen steady on, and the value **false** indicates the opposite. | -| success | () => void | No | Callback upon a successful API call. | -| fail | (data: string, code: number) => void | No | Called when API call has failed. **data** indicates the error information, and **code** indicates the error code.| -| complete | () => void | No | Called when the API call is complete. | +| success | () => void | No | Called when an API call is successful. | +| fail | (data: string, code: number) => void | No | Called when an API call has failed. **data** indicates the error information, and **code** indicates the error code.| +| complete | () => void | No | Called when an API call is complete. | diff --git a/en/application-dev/reference/apis/js-apis-system-fetch.md b/en/application-dev/reference/apis/js-apis-system-fetch.md index 96bc642f5214e48b09df204a314bd694677a77f4..316e9ca1b3a083d9fdb277b6d910019d229cbce7 100644 --- a/en/application-dev/reference/apis/js-apis-system-fetch.md +++ b/en/application-dev/reference/apis/js-apis-system-fetch.md @@ -16,47 +16,15 @@ import fetch from '@system.fetch'; ## fetch.fetch3+ -fetch(options:{ - /** - * Resource URL. - * @since 3 - */ - url: string; - /** - * Request parameter, which can be of the string type or a JSON object. - * @since 3 - */ - data?: string | object; - /** - * Request header, which accommodates all attributes of the request. - * @since 3 - */ - header?: Object; - /** - * Request methods available: OPTIONS, GET, HEAD, POST, PUT, DELETE and TRACE. The default value is GET. - * @since 3 - */ - method?: string; - /** - * The return type can be text, or JSON. By default, the return type is determined based on Content-Type in the header returned by the server. - * @since 3 - */ - responseType?: string; - /** - * Called when the network data is obtained successfully. - * @since 3 - */ - success?: (data: FetchResponse) => void; - /** - * Called when the network data fails to be obtained. - * @since 3 - */ - fail?: (data: any, code: number) => void; - /** - * Called when the execution is completed. - * @since 3 - */ - complete?: () => void; +fetch(options:{
+  url: string;
+  data?: string | object;
+  header?: Object;
+  method?: string;
+  responseType?: string;
+  success?: (data: FetchResponse) => void;
+  fail?: (data: any, code: number) => void;
+  complete?: () => void;
} ): void Obtains data through a network. diff --git a/en/application-dev/reference/apis/js-apis-system-network.md b/en/application-dev/reference/apis/js-apis-system-network.md index 232c2be8d60b3b893fbebc1119b7d9e807d80ddf..e0cc9a177547c86910db7b3ba4c8ac5e8eb97e75 100644 --- a/en/application-dev/reference/apis/js-apis-system-network.md +++ b/en/application-dev/reference/apis/js-apis-system-network.md @@ -1,8 +1,6 @@ # @system.network (Network State) > **NOTE** -> - The APIs of this module are no longer maintained since API version 7. You are advised to use [`@ohos.telephony.observer`](js-apis-observer.md). -> > - The initial APIs of this module are supported since API version 3. Newly added APIs will be marked with a superscript to indicate their earliest API version. @@ -23,23 +21,11 @@ ohos.permission.GET_NETWORK_INFO ## network.getType3+ -getType(options?: { - /** - * Called when the network type is obtained. - * @since 3 - */ - success?: (data: NetworkResponse) => void; - /** - * Called when the network type fails to be obtained. - * @since 3 - */ - fail?: (data: any, code: number) => void; - /** - * Called when the execution is completed. - * @since 3 - */ - complete?: () => void; - }): void +getType(options?: {
+  success?: (data: NetworkResponse) => void;
+  fail?: (data: any, code: number) => void;
+  complete?: () => void;
+}): void Obtains the network type. @@ -79,17 +65,9 @@ export default { ## network.subscribe3+ -subscribe(options?:{ - /** - * Called when the network connection state changes. - * @since 3 - */ - success?: (data: NetworkResponse) => void; - /** - * Called when the listening fails. - * @since 3 - */ - fail?: (data: any, code: number) => void; +subscribe(options?:{
+  success?: (data: NetworkResponse) => void;
+  fail?: (data: any, code: number) => void;
}): void Listens to the network connection state. If this method is called multiple times, the last call takes effect. diff --git a/en/application-dev/reference/apis/js-apis-thermal.md b/en/application-dev/reference/apis/js-apis-thermal.md index d9914d9c865911380d57548e94d068956e690ec9..add214749c1dc31c0c477ba48180a1c9d8bd1808 100644 --- a/en/application-dev/reference/apis/js-apis-thermal.md +++ b/en/application-dev/reference/apis/js-apis-thermal.md @@ -1,6 +1,6 @@ # @ohos.thermal (Thermal Management) -The **thermal** module provides thermal level-related callback and query APIs to obtain the information required for thermal control. +This module provides thermal level-related callback and query APIs to obtain the information required for thermal control. > **NOTE** > @@ -90,7 +90,7 @@ Obtains the current thermal level. **System capability:** SystemCapability.PowerManager.ThermalManager -**Return value** +**Return value**: | Type | Description | | ------------ | ------------ | @@ -173,7 +173,7 @@ Obtains the current thermal level. **System capability:** SystemCapability.PowerManager.ThermalManager -**Return value** +**Return value**: | Type | Description | | ------------ | ------ | diff --git a/en/application-dev/reference/arkui-js-lite/figures/#000000.png b/en/application-dev/reference/arkui-js-lite/figures/000000.png similarity index 100% rename from en/application-dev/reference/arkui-js-lite/figures/#000000.png rename to en/application-dev/reference/arkui-js-lite/figures/000000.png diff --git a/en/application-dev/reference/arkui-js-lite/js-common-styles.md b/en/application-dev/reference/arkui-js-lite/js-common-styles.md index 15d76dc7b93a04aa82644b52f3a69f834d9aa1c8..52b7e4c81ed17f40e65b8dcfcc0a359729453429 100644 --- a/en/application-dev/reference/arkui-js-lite/js-common-styles.md +++ b/en/application-dev/reference/arkui-js-lite/js-common-styles.md @@ -4,21 +4,21 @@ You can set universal styles for components in the **style** attribute or **.css** files. -| Name| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| width | <length> \| <percentage>5+ | - | No| Component width.

If this attribute is not set, the default value **0** is used.| -| height | <length> \| <percentage>5+ | - | No| Component height.

If this attribute is not set, the default value **0** is used.| -| padding | <length> | 0 | No| Shorthand attribute to set the padding for all sides in a declaration.
The attribute can have one to four values:
- If you set only one value, it specifies the padding for all the four sides.
- If you set two values, the first value specifies the top and bottom padding, and the second value specifies the left and right padding.
- If you set three values, the first value specifies the top padding, the second value specifies the left and right padding, and the third value specifies the bottom padding.
- If you set four values, they respectively specify the padding for top, right, bottom, and left sides (in clockwise order).| -| padding-[left\|top\|right\|bottom] | <length> | 0 | No| Left, top, right, and bottom padding.| -| margin | <length> \| <percentage>5+ | 0 | No| Shorthand attribute to set the margin for all sides in a declaration. The attribute can have one to four values:
- If you set only one value, it specifies the margin for all the four sides.
- If you set two values, the first value specifies the top and bottom margins, and the second value specifies the left and right margins.
- If you set three values, the first value specifies the top margin, the second value specifies the left and right margins, and the third value specifies the bottom margin.
- If you set four values, they respectively specify the margin for top, right, bottom, and left sides (in clockwise order).| -| margin-[left\|top\|right\|bottom] | <length> \| <percentage>5+ | 0 | No| Left, top, right, and bottom margins.| -| border-width | <length> | 0 | No| Shorthand attribute to set the margin for all sides.| -| border-color | <color> | black | No| Shorthand attribute to set the color for all borders.| -| border-radius | <length> | - | No| Radius of round-corner borders. | -| background-color | <color> | - | No| Background color.| -| opacity5+ | number | 1 | No| Opacity of an element. The value ranges from **0** to **1**. The value **1** means opaque, and **0** means completely transparent.| -| display | string | flex | No| Type of the box containing an element. Available values are as follows:
- **flex**: flexible layout
- **none**: not rendered| -| [left\|top] | <length> \| <percentage>6+ | - | No| Edge of the element.
- **left**: left edge position of the element. This attribute defines the offset between the left edge of the margin area of a positioned element and left edge of its containing block.
- **top**: top edge position of the element. This attribute defines the offset between the top edge of a positioned element and that of a block included in the element. | +| Name | Type | Default Value | Mandatory | Description | +| ---------------------------------- | ---------------------------------------- | ----- | ---- | ---------------------------------------- | +| width | <length> \| <percentage>5+ | - | No | Component width.

If this attribute is not set, the default value **0** is used. | +| height | <length> \| <percentage>5+ | - | No | Component height.

If this attribute is not set, the default value **0** is used. | +| padding | <length> | 0 | No | Shorthand attribute to set the padding for all sides in a declaration.
The attribute can have one to four values:
- If you set only one value, it specifies the padding for all the four sides.
- If you set two values, the first value specifies the top and bottom padding, and the second value specifies the left and right padding.
- If you set three values, the first value specifies the top padding, the second value specifies the left and right padding, and the third value specifies the bottom padding.
- If you set four values, they respectively specify the padding for top, right, bottom, and left sides (in clockwise order).| +| padding-[left\|top\|right\|bottom] | <length> | 0 | No | Left, top, right, and bottom padding. | +| margin | <length> \| <percentage>5+ | 0 | No | Shorthand attribute to set the margin for all sides in a declaration. The attribute can have one to four values:
- If you set only one value, it specifies the margin for all the four sides.
- If you set two values, the first value specifies the top and bottom margins, and the second value specifies the left and right margins.
- If you set three values, the first value specifies the top margin, the second value specifies the left and right margins, and the third value specifies the bottom margin.
- If you set four values, they respectively specify the margin for top, right, bottom, and left sides (in clockwise order).| +| margin-[left\|top\|right\|bottom] | <length> \| <percentage>5+ | 0 | No | Left, top, right, and bottom margins. | +| border-width | <length> | 0 | No | Shorthand attribute to set the margin for all sides. | +| border-color | <color> | black | No | Shorthand attribute to set the color for all borders. | +| border-radius | <length> | - | No | Radius of round-corner borders. | +| background-color | <color> | - | No | Background color. | +| opacity5+ | number | 1 | No | Opacity of an element. The value ranges from **0** to **1**. The value **1** means opaque, and **0** means completely transparent. | +| display | string | flex | No | Type of the box containing an element. Available values are as follows:
- **flex**: flexible layout
- **none**: not rendered| +| [left\|top] | <length> \| <percentage>6+ | - | No | Edge of the element.
- **left**: left edge position of the element. This attribute defines the offset between the left edge of the margin area of a positioned element and left edge of its containing block.
- **top**: top edge position of the element. This attribute defines the offset between the top edge of a positioned element and that of a block included in the element.| > **NOTE** @@ -37,152 +37,152 @@ You can set universal styles for components in the **style** attribute or **.css **Table 1** Color enums -| Name| Hexadecimal Code| Color| -| -------- | -------- | -------- | -| aliceblue | \#f0f8ff | ![aliceblue](figures/aliceblue.png) | -| antiquewhite | \#faebd7 | ![antiquewhite](figures/antiquewhite.png) | -| aqua | \#00ffff | ![aqua](figures/aqua.png) | -| aquamarine | \#7fffd4 | ![aquamarine](figures/aquamarine.png) | -| azure | \#f0ffff | ![azure](figures/azure.png) | -| beige | \#f5f5dc | ![beige](figures/beige.png) | -| bisque | \#ffe4c4 | ![bisque](figures/bisque.png) | -| black | \#000000 | ![#000000](figures/#000000.png) | -| blanchedalmond | \#ffebcd | ![blanchedalmond](figures/blanchedalmond.png) | -| blue | \#0000ff | ![blue](figures/blue.png) | -| blueviolet | \#8a2be2 | ![blueviolet](figures/blueviolet.png) | -| brown | \#a52a2a | ![brown](figures/brown.png) | -| burlywood | \#deB887 | ![burlywood](figures/burlywood.png) | -| cadetblue | \#5f9ea0 | ![cadetblue](figures/cadetblue.png) | -| chartreuse | \#7fff00 | ![chartreuse](figures/chartreuse.png) | -| chocolate | \#d2691e | ![chocolate](figures/chocolate.png) | -| coral | \#ff7f50 | ![coral](figures/coral.png) | -| cornflowerblue | \#6495ed | ![cornflowerblue](figures/cornflowerblue.png) | -| cornsilk | \#fff8dc | ![cornsilk](figures/cornsilk.png) | -| crimson | \#dc143c | ![crimson](figures/crimson.png) | -| cyan | \#00ffff | ![cyan](figures/cyan.png) | -| darkblue | \#00008b | ![darkblue](figures/darkblue.png) | -| darkcyan | \#008b8b | ![darkcyan](figures/darkcyan.png) | -| darkgoldenrod | \#b8860b | ![darkgoldenrod](figures/darkgoldenrod.png) | -| darkgray | \#a9a9a9 | ![darkgray](figures/darkgray.png) | -| darkgreen | \#006400 | ![darkgreen](figures/darkgreen.png) | -| darkgrey | \#a9a9a9 | ![darkgrey](figures/darkgrey.png) | -| darkkhaki | \#bdb76b | ![darkkhaki](figures/darkkhaki.png) | -| darkmagenta | \#8b008b | ![darkmagenta](figures/darkmagenta.png) | -| darkolivegreen | \#556b2f | ![darkolivegreen](figures/darkolivegreen.png) | -| darkorange | \#ff8c00 | ![darkorange](figures/darkorange.png) | -| darkorchid | \#9932cc | ![darkorchid](figures/darkorchid.png) | -| darkred | \#8b0000 | ![darkred](figures/darkred.png) | -| darksalmon | \#e9967a | ![darksalmon](figures/darksalmon.png) | -| darkseagreen | \#8fbc8f | ![darkseagreen](figures/darkseagreen.png) | -| darkslateblue | \#483d8b | ![darkslateblue](figures/darkslateblue.png) | -| darkslategray | \#2f4f4f | ![darkslategray](figures/darkslategray.png) | -| darkslategrey | \#2f4f4f | ![darkslategrey](figures/darkslategrey.png) | -| darkturquoise | \#00ced1 | ![darkturquoise](figures/darkturquoise.png) | -| darkviolet | \#9400d3 | ![darkviolet](figures/darkviolet.png) | -| deeppink | \#ff1493 | ![deeppink](figures/deeppink.png) | -| deepskyblue | \#00bfff | ![deepskyblue](figures/deepskyblue.png) | -| dimgray | \#696969 | ![dimgray](figures/dimgray.png) | -| dimgrey | \#696969 | ![dimgrey](figures/dimgrey.png) | -| dodgerblue | \#1e90ff | ![dodgerblue](figures/dodgerblue.png) | -| firebrick | \#b22222 | ![firebrick](figures/firebrick.png) | -| floralwhite | \#fffaf0 | ![floralwhite](figures/floralwhite.png) | -| forestgreen | \#228b22 | ![forestgreen](figures/forestgreen.png) | -| fuchsia | \#ff00ff | ![fuchsia](figures/fuchsia.png) | -| gainsboro | \#dcdcdc | ![gainsboro](figures/gainsboro.png) | -| ghostwhite | \#f8f8ff | ![ghostwhite](figures/ghostwhite.png) | -| gold | \#ffd700 | ![gold](figures/gold.png) | -| goldenrod | \#daa520 | ![goldenrod](figures/goldenrod.png) | -| gray | \#808080 | ![gray](figures/gray.png) | -| green | \#008000 | ![green](figures/green.png) | -| greenyellow | \#adff2f | ![greenyellow](figures/greenyellow.png) | -| grey | \#808080 | ![grey](figures/grey.png) | -| honeydew | \#f0fff0 | ![honeydew](figures/honeydew.png) | -| hotpink | \#ff69b4 | ![hotpink](figures/hotpink.png) | -| indianred | \#cd5c5c | ![indianred](figures/indianred.png) | -| indigo | \#4b0082 | ![indigo](figures/indigo.png) | -| ivory | \#fffff0 | ![ivory](figures/ivory.png) | -| khaki | \#f0e68c | ![khaki](figures/khaki.png) | -| lavender | \#e6e6fa | ![lavender](figures/lavender.png) | -| lavenderblush | \#fff0f5 | ![lavenderblush](figures/lavenderblush.png) | -| lawngreen | \#7cfc00 | ![lawngreen](figures/lawngreen.png) | -| lemonchiffon | \#fffacd | ![lemonchiffon](figures/lemonchiffon.png) | -| lightblue | \#add8e6 | ![lightblue](figures/lightblue.png) | -| lightcoral | \#f08080 | ![lightcoral](figures/lightcoral.png) | -| lightcyan | \#e0ffff | ![lightcyan](figures/lightcyan.png) | +| Name | Hexadecimal Code | Color | +| -------------------- | -------- | ---------------------------------------- | +| aliceblue | \#f0f8ff | ![aliceblue](figures/aliceblue.png) | +| antiquewhite | \#faebd7 | ![antiquewhite](figures/antiquewhite.png) | +| aqua | \#00ffff | ![aqua](figures/aqua.png) | +| aquamarine | \#7fffd4 | ![aquamarine](figures/aquamarine.png) | +| azure | \#f0ffff | ![azure](figures/azure.png) | +| beige | \#f5f5dc | ![beige](figures/beige.png) | +| bisque | \#ffe4c4 | ![bisque](figures/bisque.png) | +| black | \#000000 | ![000000](figures/000000.png) | +| blanchedalmond | \#ffebcd | ![blanchedalmond](figures/blanchedalmond.png) | +| blue | \#0000ff | ![blue](figures/blue.png) | +| blueviolet | \#8a2be2 | ![blueviolet](figures/blueviolet.png) | +| brown | \#a52a2a | ![brown](figures/brown.png) | +| burlywood | \#deB887 | ![burlywood](figures/burlywood.png) | +| cadetblue | \#5f9ea0 | ![cadetblue](figures/cadetblue.png) | +| chartreuse | \#7fff00 | ![chartreuse](figures/chartreuse.png) | +| chocolate | \#d2691e | ![chocolate](figures/chocolate.png) | +| coral | \#ff7f50 | ![coral](figures/coral.png) | +| cornflowerblue | \#6495ed | ![cornflowerblue](figures/cornflowerblue.png) | +| cornsilk | \#fff8dc | ![cornsilk](figures/cornsilk.png) | +| crimson | \#dc143c | ![crimson](figures/crimson.png) | +| cyan | \#00ffff | ![cyan](figures/cyan.png) | +| darkblue | \#00008b | ![darkblue](figures/darkblue.png) | +| darkcyan | \#008b8b | ![darkcyan](figures/darkcyan.png) | +| darkgoldenrod | \#b8860b | ![darkgoldenrod](figures/darkgoldenrod.png) | +| darkgray | \#a9a9a9 | ![darkgray](figures/darkgray.png) | +| darkgreen | \#006400 | ![darkgreen](figures/darkgreen.png) | +| darkgrey | \#a9a9a9 | ![darkgrey](figures/darkgrey.png) | +| darkkhaki | \#bdb76b | ![darkkhaki](figures/darkkhaki.png) | +| darkmagenta | \#8b008b | ![darkmagenta](figures/darkmagenta.png) | +| darkolivegreen | \#556b2f | ![darkolivegreen](figures/darkolivegreen.png) | +| darkorange | \#ff8c00 | ![darkorange](figures/darkorange.png) | +| darkorchid | \#9932cc | ![darkorchid](figures/darkorchid.png) | +| darkred | \#8b0000 | ![darkred](figures/darkred.png) | +| darksalmon | \#e9967a | ![darksalmon](figures/darksalmon.png) | +| darkseagreen | \#8fbc8f | ![darkseagreen](figures/darkseagreen.png) | +| darkslateblue | \#483d8b | ![darkslateblue](figures/darkslateblue.png) | +| darkslategray | \#2f4f4f | ![darkslategray](figures/darkslategray.png) | +| darkslategrey | \#2f4f4f | ![darkslategrey](figures/darkslategrey.png) | +| darkturquoise | \#00ced1 | ![darkturquoise](figures/darkturquoise.png) | +| darkviolet | \#9400d3 | ![darkviolet](figures/darkviolet.png) | +| deeppink | \#ff1493 | ![deeppink](figures/deeppink.png) | +| deepskyblue | \#00bfff | ![deepskyblue](figures/deepskyblue.png) | +| dimgray | \#696969 | ![dimgray](figures/dimgray.png) | +| dimgrey | \#696969 | ![dimgrey](figures/dimgrey.png) | +| dodgerblue | \#1e90ff | ![dodgerblue](figures/dodgerblue.png) | +| firebrick | \#b22222 | ![firebrick](figures/firebrick.png) | +| floralwhite | \#fffaf0 | ![floralwhite](figures/floralwhite.png) | +| forestgreen | \#228b22 | ![forestgreen](figures/forestgreen.png) | +| fuchsia | \#ff00ff | ![fuchsia](figures/fuchsia.png) | +| gainsboro | \#dcdcdc | ![gainsboro](figures/gainsboro.png) | +| ghostwhite | \#f8f8ff | ![ghostwhite](figures/ghostwhite.png) | +| gold | \#ffd700 | ![gold](figures/gold.png) | +| goldenrod | \#daa520 | ![goldenrod](figures/goldenrod.png) | +| gray | \#808080 | ![gray](figures/gray.png) | +| green | \#008000 | ![green](figures/green.png) | +| greenyellow | \#adff2f | ![greenyellow](figures/greenyellow.png) | +| grey | \#808080 | ![grey](figures/grey.png) | +| honeydew | \#f0fff0 | ![honeydew](figures/honeydew.png) | +| hotpink | \#ff69b4 | ![hotpink](figures/hotpink.png) | +| indianred | \#cd5c5c | ![indianred](figures/indianred.png) | +| indigo | \#4b0082 | ![indigo](figures/indigo.png) | +| ivory | \#fffff0 | ![ivory](figures/ivory.png) | +| khaki | \#f0e68c | ![khaki](figures/khaki.png) | +| lavender | \#e6e6fa | ![lavender](figures/lavender.png) | +| lavenderblush | \#fff0f5 | ![lavenderblush](figures/lavenderblush.png) | +| lawngreen | \#7cfc00 | ![lawngreen](figures/lawngreen.png) | +| lemonchiffon | \#fffacd | ![lemonchiffon](figures/lemonchiffon.png) | +| lightblue | \#add8e6 | ![lightblue](figures/lightblue.png) | +| lightcoral | \#f08080 | ![lightcoral](figures/lightcoral.png) | +| lightcyan | \#e0ffff | ![lightcyan](figures/lightcyan.png) | | lightgoldenrodyellow | \#fafad2 | ![lightgoldenrodyellow](figures/lightgoldenrodyellow.png) | -| lightgray | \#d3d3d3 | ![lightgray](figures/lightgray.png) | -| lightgreen | \#90ee90 | ![lightgreen](figures/lightgreen.png) | -| lightpink | \#ffb6c1 | ![lightpink](figures/lightpink.png) | -| lightsalmon | \#ffa07a | ![lightsalmon](figures/lightsalmon.png) | -| lightseagreen | \#20b2aa | ![lightseagreen](figures/lightseagreen.png) | -| lightskyblue | \#87cefa | ![lightskyblue](figures/lightskyblue.png) | -| lightslategray | \#778899 | ![lightslategray](figures/lightslategray.png) | -| lightslategrey | \#778899 | ![lightslategrey](figures/lightslategrey.png) | -| lightsteelblue | \#b0c4de | ![lightsteelblue](figures/lightsteelblue.png) | -| lightyellow | \#ffffe0 | ![lightyellow](figures/lightyellow.png) | -| lime | \#00ff00 | ![lime](figures/lime.png) | -| limegreen | \#32cd32 | ![limegreen](figures/limegreen.png) | -| linen | \#faf0e6 | ![linen](figures/linen.png) | -| magenta | \#ff00ff | ![magenta](figures/magenta.png) | -| maroon | \#800000 | ![maroon](figures/maroon.png) | -| mediumaquamarine | \#66cdaa | ![mediumaquamarine](figures/mediumaquamarine.png) | -| mediumblue | \#0000cd | ![mediumblue](figures/mediumblue.png) | -| mediumorchid | \#ba55d3 | ![mediumorchid](figures/mediumorchid.png) | -| mediumpurple | \#9370db | ![mediumpurple](figures/mediumpurple.png) | -| mediumseagreen | \#3cb371 | ![mediumseagreen](figures/mediumseagreen.png) | -| mediumslateblue | \#7b68ee | ![mediumslateblue](figures/mediumslateblue.png) | -| mediumspringgreen | \#00fa9a | ![mediumspringgreen](figures/mediumspringgreen.png) | -| mediumturquoise | \#48d1cc | ![mediumturquoise](figures/mediumturquoise.png) | -| mediumvioletred | \#c71585 | ![mediumvioletred](figures/mediumvioletred.png) | -| midnightblue | \#191970 | ![midnightblue](figures/midnightblue.png) | -| mintcream | \#f5fffa | ![mintcream](figures/mintcream.png) | -| mistyrose | \#ffe4e1 | ![mistyrose](figures/mistyrose.png) | -| moccasin | \#ffe4b5 | ![moccasin](figures/moccasin.png) | -| navajowhite | \#ffdead | ![navajowhite](figures/navajowhite.png) | -| navy | \#000080 | ![navy](figures/navy.png) | -| oldlace | \#fdf5e6 | ![oldlace](figures/oldlace.png) | -| olive | \#808000 | ![olive](figures/olive.png) | -| olivedrab | \#6b8e23 | ![olivedrab](figures/olivedrab.png) | -| orange | \#ffa500 | ![orange](figures/orange.png) | -| orangered | \#ff4500 | ![orangered](figures/orangered.png) | -| orchid | \#da70d6 | ![orchid](figures/orchid.png) | -| palegoldenrod | \#eee8aa | ![palegoldenrod](figures/palegoldenrod.png) | -| palegreen | \#98fb98 | ![palegreen](figures/palegreen.png) | -| paleturquoise | \#afeeee | ![paleturquoise](figures/paleturquoise.png) | -| palevioletred | \#db7093 | ![palevioletred](figures/palevioletred.png) | -| papayawhip | \#ffefd5 | ![papayawhip](figures/papayawhip.png) | -| peachpuff | \#ffdab9 | ![peachpuff](figures/peachpuff.png) | -| peru | \#cd853f | ![peru](figures/peru.png) | -| pink | \#ffc0cb | ![pink](figures/pink.png) | -| plum | \#dda0dd | ![plum](figures/plum.png) | -| powderblue | \#b0e0e6 | ![powderblue](figures/powderblue.png) | -| purple | \#800080 | ![purple](figures/purple.png) | -| rebeccapurple | \#663399 | ![rebeccapurple](figures/rebeccapurple.png) | -| red | \#ff0000 | ![red](figures/red.png) | -| rosybrown | \#bc8f8f | ![rosybrown](figures/rosybrown.png) | -| royalblue | \#4169e1 | ![royalblue](figures/royalblue.png) | -| saddlebrown | \#8b4513 | ![saddlebrown](figures/saddlebrown.png) | -| salmon | \#fa8072 | ![salmon](figures/salmon.png) | -| sandybrown | \#f4a460 | ![sandybrown](figures/sandybrown.png) | -| seagreen | \#2e8b57 | ![seagreen](figures/seagreen.png) | -| seashell | \#fff5ee | ![seashell](figures/seashell.png) | -| sienna | \#a0522d | ![sienna](figures/sienna.png) | -| silver | \#c0c0c0 | ![silver](figures/silver.png) | -| skyblue | \#87ceeb | ![skyblue](figures/skyblue.png) | -| slateblue | \#6a5acd | ![slateblue](figures/slateblue.png) | -| slategray | \#708090 | ![slategray](figures/slategray.png) | -| slategrey | \#708090 | ![slategray](figures/slategray.png) | -| snow | \#fffafa | ![snow](figures/snow.png) | -| springgreen | \#00ff7f | ![springgreen](figures/springgreen.png) | -| steelblue | \#4682b4 | ![steelblue](figures/steelblue.png) | -| tan | \#d2b48c | ![tan](figures/tan.png) | -| teal | \#008080 | ![teal](figures/teal.png) | -| thistle | \#d8Bfd8 | ![thistle](figures/thistle.png) | -| tomato | \#ff6347 | ![tomato](figures/tomato.png) | -| turquoise | \#40e0d0 | ![turquoise](figures/turquoise.png) | -| violet | \#ee82ee | ![violet](figures/violet.png) | -| wheat | \#f5deb3 | ![wheat](figures/wheat.png) | -| white | \#ffffff | ![white](figures/white.png) | -| whitesmoke | \#f5f5f5 | ![whitesmoke](figures/whitesmoke.png) | -| yellow | \#ffff00 | ![yellow](figures/yellow.png) | -| yellowgreen | \#9acd32 | ![yellowgreen](figures/yellowgreen.png) | +| lightgray | \#d3d3d3 | ![lightgray](figures/lightgray.png) | +| lightgreen | \#90ee90 | ![lightgreen](figures/lightgreen.png) | +| lightpink | \#ffb6c1 | ![lightpink](figures/lightpink.png) | +| lightsalmon | \#ffa07a | ![lightsalmon](figures/lightsalmon.png) | +| lightseagreen | \#20b2aa | ![lightseagreen](figures/lightseagreen.png) | +| lightskyblue | \#87cefa | ![lightskyblue](figures/lightskyblue.png) | +| lightslategray | \#778899 | ![lightslategray](figures/lightslategray.png) | +| lightslategrey | \#778899 | ![lightslategrey](figures/lightslategrey.png) | +| lightsteelblue | \#b0c4de | ![lightsteelblue](figures/lightsteelblue.png) | +| lightyellow | \#ffffe0 | ![lightyellow](figures/lightyellow.png) | +| lime | \#00ff00 | ![lime](figures/lime.png) | +| limegreen | \#32cd32 | ![limegreen](figures/limegreen.png) | +| linen | \#faf0e6 | ![linen](figures/linen.png) | +| magenta | \#ff00ff | ![magenta](figures/magenta.png) | +| maroon | \#800000 | ![maroon](figures/maroon.png) | +| mediumaquamarine | \#66cdaa | ![mediumaquamarine](figures/mediumaquamarine.png) | +| mediumblue | \#0000cd | ![mediumblue](figures/mediumblue.png) | +| mediumorchid | \#ba55d3 | ![mediumorchid](figures/mediumorchid.png) | +| mediumpurple | \#9370db | ![mediumpurple](figures/mediumpurple.png) | +| mediumseagreen | \#3cb371 | ![mediumseagreen](figures/mediumseagreen.png) | +| mediumslateblue | \#7b68ee | ![mediumslateblue](figures/mediumslateblue.png) | +| mediumspringgreen | \#00fa9a | ![mediumspringgreen](figures/mediumspringgreen.png) | +| mediumturquoise | \#48d1cc | ![mediumturquoise](figures/mediumturquoise.png) | +| mediumvioletred | \#c71585 | ![mediumvioletred](figures/mediumvioletred.png) | +| midnightblue | \#191970 | ![midnightblue](figures/midnightblue.png) | +| mintcream | \#f5fffa | ![mintcream](figures/mintcream.png) | +| mistyrose | \#ffe4e1 | ![mistyrose](figures/mistyrose.png) | +| moccasin | \#ffe4b5 | ![moccasin](figures/moccasin.png) | +| navajowhite | \#ffdead | ![navajowhite](figures/navajowhite.png) | +| navy | \#000080 | ![navy](figures/navy.png) | +| oldlace | \#fdf5e6 | ![oldlace](figures/oldlace.png) | +| olive | \#808000 | ![olive](figures/olive.png) | +| olivedrab | \#6b8e23 | ![olivedrab](figures/olivedrab.png) | +| orange | \#ffa500 | ![orange](figures/orange.png) | +| orangered | \#ff4500 | ![orangered](figures/orangered.png) | +| orchid | \#da70d6 | ![orchid](figures/orchid.png) | +| palegoldenrod | \#eee8aa | ![palegoldenrod](figures/palegoldenrod.png) | +| palegreen | \#98fb98 | ![palegreen](figures/palegreen.png) | +| paleturquoise | \#afeeee | ![paleturquoise](figures/paleturquoise.png) | +| palevioletred | \#db7093 | ![palevioletred](figures/palevioletred.png) | +| papayawhip | \#ffefd5 | ![papayawhip](figures/papayawhip.png) | +| peachpuff | \#ffdab9 | ![peachpuff](figures/peachpuff.png) | +| peru | \#cd853f | ![peru](figures/peru.png) | +| pink | \#ffc0cb | ![pink](figures/pink.png) | +| plum | \#dda0dd | ![plum](figures/plum.png) | +| powderblue | \#b0e0e6 | ![powderblue](figures/powderblue.png) | +| purple | \#800080 | ![purple](figures/purple.png) | +| rebeccapurple | \#663399 | ![rebeccapurple](figures/rebeccapurple.png) | +| red | \#ff0000 | ![red](figures/red.png) | +| rosybrown | \#bc8f8f | ![rosybrown](figures/rosybrown.png) | +| royalblue | \#4169e1 | ![royalblue](figures/royalblue.png) | +| saddlebrown | \#8b4513 | ![saddlebrown](figures/saddlebrown.png) | +| salmon | \#fa8072 | ![salmon](figures/salmon.png) | +| sandybrown | \#f4a460 | ![sandybrown](figures/sandybrown.png) | +| seagreen | \#2e8b57 | ![seagreen](figures/seagreen.png) | +| seashell | \#fff5ee | ![seashell](figures/seashell.png) | +| sienna | \#a0522d | ![sienna](figures/sienna.png) | +| silver | \#c0c0c0 | ![silver](figures/silver.png) | +| skyblue | \#87ceeb | ![skyblue](figures/skyblue.png) | +| slateblue | \#6a5acd | ![slateblue](figures/slateblue.png) | +| slategray | \#708090 | ![slategray](figures/slategray.png) | +| slategrey | \#708090 | ![slategray](figures/slategray.png) | +| snow | \#fffafa | ![snow](figures/snow.png) | +| springgreen | \#00ff7f | ![springgreen](figures/springgreen.png) | +| steelblue | \#4682b4 | ![steelblue](figures/steelblue.png) | +| tan | \#d2b48c | ![tan](figures/tan.png) | +| teal | \#008080 | ![teal](figures/teal.png) | +| thistle | \#d8Bfd8 | ![thistle](figures/thistle.png) | +| tomato | \#ff6347 | ![tomato](figures/tomato.png) | +| turquoise | \#40e0d0 | ![turquoise](figures/turquoise.png) | +| violet | \#ee82ee | ![violet](figures/violet.png) | +| wheat | \#f5deb3 | ![wheat](figures/wheat.png) | +| white | \#ffffff | ![white](figures/white.png) | +| whitesmoke | \#f5f5f5 | ![whitesmoke](figures/whitesmoke.png) | +| yellow | \#ffff00 | ![yellow](figures/yellow.png) | +| yellowgreen | \#9acd32 | ![yellowgreen](figures/yellowgreen.png) | diff --git a/en/application-dev/reference/arkui-js-lite/js-components-basic-chart.md b/en/application-dev/reference/arkui-js-lite/js-components-basic-chart.md index 7a0a07fe1bee64329c6fe292f881856b941e6ee1..2c8f4c0550f7794d975eb7014e30506c034e9a1d 100644 --- a/en/application-dev/reference/arkui-js-lite/js-components-basic-chart.md +++ b/en/application-dev/reference/arkui-js-lite/js-components-basic-chart.md @@ -14,118 +14,118 @@ Not supported ## Attributes -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| type | string | No| Chart type. Dynamic modification is not supported. Available values include:
- **bar**: bar chart
- **line**: line chart
Default value: **line**| -| options | ChartOptions | Yes| Chart parameters. You can set the minimum value, maximum value, scale, and line width of the x-axis or y-axis, whether to display the x-axis and y-axis, and whether the line is smooth. Dynamic modification is not supported.| -| datasets | Array<ChartDataset> | Yes| Data sets. You can set multiple datasets and their background colors.| -| id | string | No| Unique ID of the component.| -| style | string | No| Style declaration of the component.| -| class | string | No| Style class of the component, which is used to refer to a style table.| -| ref | string | No| Reference information of child elements, which is registered with the parent component on **$refs**.| +| Name | Type | Mandatory | Description | +| -------- | ------------------------- | ---- | ---------------------------------------- | +| type | string | No | Chart type. Dynamic modification is not supported. Available values include:
- **bar**: bar chart
- **line**: line chart
Default value: **line**| +| options | ChartOptions | Yes | Chart parameters. You can set the minimum value, maximum value, scale, and line width of the x-axis or y-axis, whether to display the x-axis and y-axis, and whether the line is smooth. Dynamic modification is not supported.| +| datasets | Array<ChartDataset> | Yes | Data sets. You can set multiple datasets and their background colors. | +| id | string | No | Unique ID of the component. | +| style | string | No | Style declaration of the component. | +| class | string | No | Style class of the component, which is used to refer to a style table. | +| ref | string | No | Reference information of child elements, which is registered with the parent component on **$refs**.| **Table 1** ChartOptions -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| xAxis | ChartAxis | Yes| X-axis parameters. You can set the minimum value, maximum value, and scale of the x-axis, and whether to display the x-axis.| -| yAxis | ChartAxis | Yes| Y-axis parameters. You can set the minimum value, maximum value, and scale of the y-axis, and whether to display the y-axis.| -| series | ChartSeries | No| Data series parameters which cover the following:
- Line style, such as the line width and whether the line is smooth.
- Style and size of the white point at the start of the line.
**NOTE**
Only line charts support this attribute. | +| Name | Type | Mandatory | Description | +| ------ | ----------- | ---- | ---------------------------------------- | +| xAxis | ChartAxis | Yes | X-axis parameters. You can set the minimum value, maximum value, and scale of the x-axis, and whether to display the x-axis. | +| yAxis | ChartAxis | Yes | Y-axis parameters. You can set the minimum value, maximum value, and scale of the y-axis, and whether to display the y-axis. | +| series | ChartSeries | No | Data series parameters which cover the following:
- Line style, such as the line width and whether the line is smooth.
- Style and size of the white point at the start of the line.
**NOTE**
Only line charts support this attribute.| **Table 2** ChartDataset -| Name| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| backgroundColor(deprecated) | <color> | \#ff6384 | No| Color of a line or bar. This attribute is not recommended.| -| strokeColor | <color> | \#ff6384 | No| Line color. Only line charts support this attribute.| -| fillColor | <color> | \#ff6384 | No| Fill color. For line charts, the value indicates the gradient color to fill.| -| data | Array<number> | - | Yes| Data of the drawn line or bar.| -| gradient | boolean | false | No| Whether to display the gradient color. Only line charts support this attribute.| +| Name | Type | Default Value | Mandatory | Description | +| --------------------------- | ------------------- | -------- | ---- | -------------------- | +| backgroundColor(deprecated) | <color> | \#ff6384 | No | Color of a line or bar. This attribute is not recommended. | +| strokeColor | <color> | \#ff6384 | No | Line color. Only line charts support this attribute. | +| fillColor | <color> | \#ff6384 | No | Fill color. For line charts, the value indicates the gradient color to fill. | +| data | Array<number> | - | Yes | Data of the drawn line or bar. | +| gradient | boolean | false | No | Whether to display the gradient color. Only line charts support this attribute.| **Table 3** ChartAxis -| Name| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| min | number | 0 | No| Minimum value of the axis.
Negative numbers are not supported. Only line charts support this attribute.| -| max | number | 100 | No| Maximum value of the axis.
Negative numbers are not supported. Only line charts support this attribute.| -| axisTick | number | 10 | No| Number of scales displayed on the axis.
**NOTE**
The value ranges from 1 to 20. The display effect depends on the calculation result of Number of pixels occupied by the image width/(**max**-**min**).
Lite wearables support integer calculation, and an error may occur in the case of inexhaustible division. Specifically, a segment of space may be left at the end of the x-axis.
In the bar chart, the number of bars in each group of data is the same as the number of scales, and the bars are displayed at the scales.| -| display | boolean | false | No| Whether to display the axis.| -| color | <color> | \#c0c0c0 | No| Axis color.| +| Name | Type | Default Value | Mandatory | Description | +| -------- | ------------- | -------- | ---- | ---------------------------------------- | +| min | number | 0 | No | Minimum value of the axis.
Negative numbers are not supported. Only line charts support this attribute. | +| max | number | 100 | No | Maximum value of the axis.
Negative numbers are not supported. Only line charts support this attribute. | +| axisTick | number | 10 | No | Number of scales displayed on the axis.
**NOTE**
The value ranges from 1 to 20. The display effect depends on the calculation result of Number of pixels occupied by the image width/(**max**-**min**).
Lite wearables support integer calculation, and an error may occur in the case of inexhaustible division. Specifically, a segment of space may be left at the end of the x-axis.
In the bar chart, the number of bars in each group of data is the same as the number of scales, and the bars are displayed at the scales.| +| display | boolean | false | No | Whether to display the axis. | +| color | <color> | \#c0c0c0 | No | Axis color. | **Table 4** ChartSeries -| Name| Type| Mandatory| Description| -| -------- | -------- | -------- | -------- | -| lineStyle | ChartLineStyle | No| Line style, such as the line width and whether the line is smooth.| -| headPoint | PointStyle | No| Style and size of the white point at the start of the line.| -| topPoint | PointStyle | No| Style and size of the top point.| -| bottomPoint | PointStyle | No| Style and size of the bottom point.| -| loop | ChartLoop | No| Whether to start drawing again when the screen is looped.| +| Name | Type | Mandatory | Description | +| ----------- | -------------- | ---- | -------------------- | +| lineStyle | ChartLineStyle | No | Line style, such as the line width and whether the line is smooth. | +| headPoint | PointStyle | No | Style and size of the white point at the start of the line. | +| topPoint | PointStyle | No | Style and size of the top point. | +| bottomPoint | PointStyle | No | Style and size of the bottom point. | +| loop | ChartLoop | No | Whether to start drawing again when the screen is looped.| **Table 5** ChartLineStyle -| Name| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| width | <length> | 1px | No| Line width.| -| smooth | boolean | false | No| Whether the line is smooth.| +| Name | Type | Default Value | Mandatory | Description | +| ------ | -------------- | ----- | ---- | ----- | +| width | <length> | 1px | No | Line width.| +| smooth | boolean | false | No | Whether the line is smooth.| **Table 6** PointStyle -| Name| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| shape | string | circle | No| Shape of the highlight point. Available values are as follows:
- circle| -| size | <length> | 5px | No| Size of the highlight point.| -| strokeWidth | <length> | 1px | No| Stroke width.| -| strokeColor | <color> | \#ff0000 | No| Stroke color.| -| fillColor | <color> | \#ff0000 | No| Fill color.| -| display | boolean | true | No| Whether to display the highlight spot.| +| Name | Type | Default Value | Mandatory | Description | +| ----------- | -------------- | -------- | ---- | ---------------------------------- | +| shape | string | circle | No | Shape of the highlight point. Available values are as follows:
- circle| +| size | <length> | 5px | No | Size of the highlight point. | +| strokeWidth | <length> | 1px | No | Stroke width. | +| strokeColor | <color> | \#ff0000 | No | Stroke color. | +| fillColor | <color> | \#ff0000 | No | Fill color. | +| display | boolean | true | No | Whether to display the highlight spot. | **Table 7** ChartLoop -| Name| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| margin | <length> | 1 | No| Number of erased points (horizontal distance between the latest drawn point and the earliest point). You are not advised to use **margin** together with **topPoint**, **bottomPoint**, or **headPoint** for mini-, small- and standard-system devices. If you do so, there is a possibility that the point is in the erase area and invisible.| +| Name | Type | Default Value | Mandatory | Description | +| ------ | -------------- | ---- | ---- | ---------------------------------------- | +| margin | <length> | 1 | No | Number of erased points (horizontal distance between the latest drawn point and the earliest point). You are not advised to use **margin** together with **topPoint**, **bottomPoint**, or **headPoint** for mini-, small- and standard-system devices. If you do so, there is a possibility that the point is in the erase area and invisible.| ## Methods -| Methods| Parameter| Description| -| -------- | -------- | -------- | +| Methods | Parameter | Description | +| ------ | ---------------------------------------- | ---------------------------------------- | | append | {
serial: number, // Set the data subscript of the line chart to be updated.
data: Array<number>, // Set the new data.
} | Dynamically add data to an existing data series. The target series is specified based on **serial**, which is the subscript of the datasets array and starts from 0. **datasets[index].data** is not updated. Only line charts support this attribute. The value is incremented by 1 based on the horizontal coordinate and is related to the **xAxis min/max** setting.| ## Events -| Name| Parameter| Description| -| -------- | -------- | -------- | -| click | - | Triggered when the component is clicked. | -| longpress | - | Triggered when the component is long pressed. | -| swipe5+ | [SwipeEvent](js-common-events.md) | Triggered when a user quickly swipes on the component. | +| Name | Parameter | Description | +| ------------------ | --------------------------------- | ----------- | +| click | - | Triggered when the component is clicked. | +| longpress | - | Triggered when the component is long pressed. | +| swipe5+ | [SwipeEvent](js-common-events.md) | Triggered when a user quickly swipes on the component.| ## Styles -| Name| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| width | <length> \| <percentage>5+ | - | No| Component width.
If this attribute is not set, the default value **0** is used. | -| height | <length> \| <percentage>5+ | - | No| Component height.
If this attribute is not set, the default value **0** is used. | -| padding | <length> | 0 | No| Shorthand attribute to set the padding for all sides.
The attribute can have one to four values:
- If you set only one value, it specifies the padding for all the four sides.
- If you set two values, the first value specifies the top and bottom padding, and the second value specifies the left and right padding.
- If you set three values, the first value specifies the top padding, the second value specifies the left and right padding, and the third value specifies the bottom padding.
- If you set four values, they respectively specify the padding for top, right, bottom, and left sides (in clockwise order).| -| padding-[left\|top\|right\|bottom] | <length> | 0 | No| Left, top, right, and bottom padding.| -| margin | <length> \| <percentage>5+ | 0 | No| Shorthand attribute to set the margin for all sides. The attribute can have one to four values:
- If you set only one value, it specifies the margin for all the four sides.
- If you set two values, the first value specifies the top and bottom margins, and the second value specifies the left and right margins.
- If you set three values, the first value specifies the top margin, the second value specifies the left and right margins, and the third value specifies the bottom margin.
- If you set four values, they respectively specify the margin for top, right, bottom, and left sides (in clockwise order).| -| margin-[left\|top\|right\|bottom] | <length> \| <percentage>5+ | 0 | No| Left, top, right, and bottom margins.| -| border-width | <length> | 0 | No| Shorthand attribute to set the margin for all sides.| -| border-color | <color> | black | No| Shorthand attribute to set the color for all borders.| -| border-radius | <length> | - | No| Radius of round-corner borders. | -| background-color | <color> | - | No| Background color.| -| display | string | flex | No| How and whether to display the box containing an element. Available values are as follows:
- **flex**: flexible layout
- **none**: not rendered| -| [left\|top] | <length> \| <percentage>6+ | - | No| Edge of the element.
- **left**: left edge position of the element. This attribute defines the offset between the left edge of the margin area of a positioned element and left edge of its containing block.
- **top**: top edge position of the element. This attribute defines the offset between the top edge of a positioned element and that of a block included in the element. | +| Name | Type | Default Value | Mandatory | Description | +| ---------------------------------- | ---------------------------------------- | ----- | ---- | ---------------------------------------- | +| width | <length> \| <percentage>5+ | - | No | Component width.

If this attribute is not set, the default value **0** is used. | +| height | <length> \| <percentage>5+ | - | No | Component height.

If this attribute is not set, the default value **0** is used. | +| padding | <length> | 0 | No | Shorthand attribute to set the padding for all sides.
The attribute can have one to four values:
- If you set only one value, it specifies the padding for all the four sides.
- If you set two values, the first value specifies the top and bottom padding, and the second value specifies the left and right padding.
- If you set three values, the first value specifies the top padding, the second value specifies the left and right padding, and the third value specifies the bottom padding.
- If you set four values, they respectively specify the padding for top, right, bottom, and left sides (in clockwise order).| +| padding-[left\|top\|right\|bottom] | <length> | 0 | No | Left, top, right, and bottom padding. | +| margin | <length> \| <percentage>5+ | 0 | No | Shorthand attribute to set the margin for all sides. The attribute can have one to four values:
- If you set only one value, it specifies the margin for all the four sides.
- If you set two values, the first value specifies the top and bottom margins, and the second value specifies the left and right margins.
- If you set three values, the first value specifies the top margin, the second value specifies the left and right margins, and the third value specifies the bottom margin.
- If you set four values, they respectively specify the margin for top, right, bottom, and left sides (in clockwise order).| +| margin-[left\|top\|right\|bottom] | <length> \| <percentage>5+ | 0 | No | Left, top, right, and bottom margins. | +| border-width | <length> | 0 | No | Shorthand attribute to set the margin for all sides. | +| border-color | <color> | black | No | Shorthand attribute to set the color for all borders. | +| border-radius | <length> | - | No | Radius of round-corner borders. | +| background-color | <color> | - | No | Background color. | +| display | string | flex | No | How and whether to display the box containing an element. Available values are as follows:
- **flex**: flexible layout
- **none**: not rendered| +| [left\|top] | <length> \| <percentage>6+ | - | No | Edge of the element.
- **left**: left edge position of the element. This attribute defines the offset between the left edge of the margin area of a positioned element and left edge of its containing block.
- **top**: top edge position of the element. This attribute defines the offset between the top edge of a positioned element and that of a block included in the element.| ## Example 1. Line chart - + ```html
@@ -134,7 +134,7 @@ Not supported
``` - + ```css /* xxx.css */ .container { @@ -155,7 +155,7 @@ Not supported } ``` - + ```js // xxx.js export default { @@ -211,7 +211,7 @@ Not supported ![lite_line](figures/lite_line.PNG) 2. Bar chart - + ```html
@@ -219,7 +219,7 @@ Not supported
``` - + ```css /* xxx.css */ .container { @@ -236,7 +236,7 @@ Not supported } ``` - + ```js // xxx.js export default { diff --git a/en/application-dev/reference/arkui-js-lite/js-components-basic-image-animator.md b/en/application-dev/reference/arkui-js-lite/js-components-basic-image-animator.md index 97383611f9b1228304aa47ebe97a5d0610f18ee8..226eff9f6c284140b5c671d2135dbe212b609590 100644 --- a/en/application-dev/reference/arkui-js-lite/js-components-basic-image-animator.md +++ b/en/application-dev/reference/arkui-js-lite/js-components-basic-image-animator.md @@ -14,68 +14,68 @@ Not supported ## Attributes -| Name| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| images | Array<ImageFrame> | - | Yes| Image frame information. The frame information includes the image path, size, and location. The supported image formats include PNG, JPG, and BMP. For details about **ImageFrame**, see Table 1.
**NOTE**
Use data binding, for example, **images = {{images}}**, to specify the image. Declare the corresponding variable in the JavaScript: **images: [{src: "/common/heart-rate01.png"}, {src: "/common/heart-rate02.png"}]**. | -| iteration | number \| string | infinite | No| Number of times that the frame animation is played. **number** indicates a fixed number of playback operations, and **infinite** indicates an unlimited number of playback operations.| -| reverse | boolean | false | No| Playback sequence.
- **true**: Images are played from the last one to the first one.
- **false**: Images are played from the first one to the last one. | -| fixedsize | boolean | true | No| Whether the image size is the same as the component size.
- **true**: The image size is the same as the component size. In this case, the width, height, top, and left attributes of the image are invalid.
- **false**: The image size is different from the component size. In this case, the width, height, top, and left attributes of each image must be set separately. | -| duration | string | - | Yes| Single video playback duration, in seconds (s) or milliseconds (ms). The default unit is ms. If the value is **0**, no image is played. The value change takes effect only at the start of the next cycle. | -| fillmode5+ | string | forwards | No| Status of the frame animation after its playback is complete. Available values are as follows:
- **none**: restores to the initial status.
- **forwards**: retains the ending status defined for the last key frame.| -| id | string | - | No| Unique ID of the component.| -| style | string | - | No| Style declaration of the component.| -| class | string | - | No| Style class of the component, which is used to refer to a style table.| -| ref | string | - | No| Reference information of child elements, which is registered with the parent component on **$refs**.| +| Name | Type | Default Value | Mandatory | Description | +| --------------------- | -------------------------- | -------- | ---- | ---------------------------------------- | +| images | Array<ImageFrame> | - | Yes | Image frame information. The frame information includes the image path, size, and location. The supported image formats include PNG, JPG, and BMP. For details about **ImageFrame**, see Table 1.
**NOTE**
Use data binding, for example, **images = {{images}}**, to specify the image. Declare the corresponding variable in the JavaScript: **images: [{src: "/common/heart-rate01.png"}, {src: "/common/heart-rate02.png"}]**.| +| iteration | number \| string | infinite | No | Number of times that the frame animation is played. **number** indicates a fixed number of playback operations, and **infinite** indicates an unlimited number of playback operations.| +| reverse | boolean | false | No | Playback sequence.
- **true**: Images are played from the last one to the first one.
- **false**: Images are played from the first one to the last one.| +| fixedsize | boolean | true | No | Whether the image size is the same as the component size.
- **true**: The image size is the same as the component size. In this case, the width, height, top, and left attributes of the image are invalid.
- **false**: The image size is different from the component size. In this case, the width, height, top, and left attributes of each image must be set separately.| +| duration | string | - | Yes | Single video playback duration, in seconds (s) or milliseconds (ms). The default unit is ms. If the value is **0**, no image is played. The value change takes effect only at the start of the next cycle.| +| fillmode5+ | string | forwards | No | Status of the frame animation after its playback is complete. Available values are as follows:
- **none**: restores to the initial status.
- **forwards**: retains the ending status defined for the last key frame.| +| id | string | - | No | Unique ID of the component. | +| style | string | - | No | Style declaration of the component. | +| class | string | - | No | Style class of the component, which is used to refer to a style table. | +| ref | string | - | No | Reference information of child elements, which is registered with the parent component on **$refs**.| **Table 1** ImageFrame -| Name| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| src | <uri> | - | Yes| Image path.| -| width | <length> | 0 | No| Image width.| -| height | <length> | 0 | No| Image height.| -| top | <length> | 0 | No| Vertical coordinate of the image relative to the upper left corner of the component.| -| left | <length> | 0 | No| Horizontal coordinate of the image relative to the upper left corner of the component.| +| Name | Type | Default Value | Mandatory | Description | +| ------ | -------------- | ---- | ---- | ---------------- | +| src | <uri> | - | Yes | Image path. | +| width | <length> | 0 | No | Image width. | +| height | <length> | 0 | No | Image height. | +| top | <length> | 0 | No | Vertical coordinate of the image relative to the upper left corner of the component.| +| left | <length> | 0 | No | Horizontal coordinate of the image relative to the upper left corner of the component.| ## Events -| Name| Parameter| Description| -| -------- | -------- | -------- | -| stop | - | Triggered when the frame animation stops| -| click | - | Triggered when the component is clicked. | -| longpress | - | Triggered when the component is long pressed. | -| swipe5+ | [SwipeEvent](js-common-events.md) | Triggered when a user quickly swipes on the component. | +| Name | Parameter | Description | +| ------------------ | --------------------------------- | ----------- | +| stop | - | Triggered when the frame animation stops | +| click | - | Triggered when the component is clicked. | +| longpress | - | Triggered when the component is long pressed. | +| swipe5+ | [SwipeEvent](js-common-events.md) | Triggered when a user quickly swipes on the component.| ## Styles -| Name| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| width | <length> \| <percentage>5+ | - | No| Component width.

If this attribute is not set, the default value **0** is used.| -| height | <length> \| <percentage>5+ | - | No| Component height.

If this attribute is not set, the default value **0** is used.| -| padding | <length> | 0 | No| Shorthand attribute to set the padding for all sides.
The attribute can have one to four values:
- If you set only one value, it specifies the padding for all the four sides.
- If you set two values, the first value specifies the top and bottom padding, and the second value specifies the left and right padding.
- If you set three values, the first value specifies the top padding, the second value specifies the left and right padding, and the third value specifies the bottom padding.
- If you set four values, they respectively specify the padding for top, right, bottom, and left sides (in clockwise order).| -| padding-[left\|top\|right\|bottom] | <length> | 0 | No| Left, top, right, and bottom padding.| -| margin | <length> \| <percentage>5+ | 0 | No| Shorthand attribute to set the margin for all sides. The attribute can have one to four values:
- If you set only one value, it specifies the margin for all the four sides.
- If you set two values, the first value specifies the top and bottom margins, and the second value specifies the left and right margins.
- If you set three values, the first value specifies the top margin, the second value specifies the left and right margins, and the third value specifies the bottom margin.
- If you set four values, they respectively specify the margin for top, right, bottom, and left sides (in clockwise order).| -| margin-[left\|top\|right\|bottom] | <length> \| <percentage>5+ | 0 | No| Left, top, right, and bottom margins.| -| border-width | <length> | 0 | No| Shorthand attribute to set the margin for all sides.| -| border-color | <color> | black | No| Shorthand attribute to set the color for all borders.| -| border-radius | <length> | - | No| Radius of round-corner borders.| -| background-color | <color> | - | No| Background color.| -| opacity5+ | number | 1 | No| Opacity of an element. The value ranges from **0** to **1**. The value **1** means opaque, and **0** means completely transparent.| -| display | string | flex | No| How and whether to display the box containing an element. Available values are as follows:
- **flex**: flexible layout
- **none**: not rendered| -| [left\|top] | <length> \| <percentage>6+ | - | No| left\|Edge of the element.
- **left**: left edge position of the element. This attribute defines the offset between the left edge of the margin area of a positioned element and left edge of its containing block.
- **top**: top edge position of the element. This attribute defines the offset between the top edge of a positioned element and that of a block included in the element.| +| Name | Type | Default Value | Mandatory | Description | +| ---------------------------------- | ---------------------------------------- | ----- | ---- | ---------------------------------------- | +| width | <length> \| <percentage>5+ | - | No | Component width.

If this attribute is not set, the default value **0** is used. | +| height | <length> \| <percentage>5+ | - | No | Component height.

If this attribute is not set, the default value **0** is used. | +| padding | <length> | 0 | No | Shorthand attribute to set the padding for all sides.
The attribute can have one to four values:
- If you set only one value, it specifies the padding for all the four sides.
- If you set two values, the first value specifies the top and bottom padding, and the second value specifies the left and right padding.
- If you set three values, the first value specifies the top padding, the second value specifies the left and right padding, and the third value specifies the bottom padding.
- If you set four values, they respectively specify the padding for top, right, bottom, and left sides (in clockwise order).| +| padding-[left\|top\|right\|bottom] | <length> | 0 | No | Left, top, right, and bottom padding. | +| margin | <length> \| <percentage>5+ | 0 | No | Shorthand attribute to set the margin for all sides. The attribute can have one to four values:
- If you set only one value, it specifies the margin for all the four sides.
- If you set two values, the first value specifies the top and bottom margins, and the second value specifies the left and right margins.
- If you set three values, the first value specifies the top margin, the second value specifies the left and right margins, and the third value specifies the bottom margin.
- If you set four values, they respectively specify the margin for top, right, bottom, and left sides (in clockwise order).| +| margin-[left\|top\|right\|bottom] | <length> \| <percentage>5+ | 0 | No | Left, top, right, and bottom margins. | +| border-width | <length> | 0 | No | Shorthand attribute to set the margin for all sides. | +| border-color | <color> | black | No | Shorthand attribute to set the color for all borders. | +| border-radius | <length> | - | No | Radius of round-corner borders. | +| background-color | <color> | - | No | Background color. | +| opacity5+ | number | 1 | No | Opacity of an element. The value ranges from **0** to **1**. The value **1** means opaque, and **0** means completely transparent. | +| display | string | flex | No | How and whether to display the box containing an element. Available values are as follows:
- **flex**: flexible layout
- **none**: not rendered| +| [left\|top] | <length> \| <percentage>6+ | - | No | left\|Edge of the element.
- **left**: left edge position of the element. This attribute defines the offset between the left edge of the margin area of a positioned element and left edge of its containing block.
- **top**: top edge position of the element. This attribute defines the offset between the top edge of a positioned element and that of a block included in the element.| ## Methods -| Name| Parameter| Description| -| -------- | -------- | -------- | -| start | - | Starts to play the frame animation of an image. If this method is called again, the playback starts from the first frame.| -| pause | - | Pauses the frame animation playback of an image.| -| stop | - | Stops the frame animation playback of an image.| -| resume | - | Resumes the frame animation playback of an image.| -| getState | - | Obtains the playback state. Available values are as follows:
- playing
- paused
- stopped| +| Name | Parameter | Description | +| -------- | ---- | ---------------------------------------- | +| start | - | Starts to play the frame animation of an image. If this method is called again, the playback starts from the first frame. | +| pause | - | Pauses the frame animation playback of an image. | +| stop | - | Stops the frame animation playback of an image. | +| resume | - | Resumes the frame animation playback of an image. | +| getState | - | Obtains the playback state. Available values are as follows:
- playing
- paused
- stopped| ## Example diff --git a/en/application-dev/reference/arkui-js-lite/js-components-basic-slider.md b/en/application-dev/reference/arkui-js-lite/js-components-basic-slider.md index 8e69b18afe816c1691743976bf7ab72c2b124a36..14a1804c4b47d769b5020fb820ac768a3f434316 100644 --- a/en/application-dev/reference/arkui-js-lite/js-components-basic-slider.md +++ b/en/application-dev/reference/arkui-js-lite/js-components-basic-slider.md @@ -14,52 +14,52 @@ Not supported ## Attributes -| Name| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| min | number | 0 | No| Minimum value of the slider.| -| max | number | 100 | No| Maximum value of the slider.| -| value | number | 0 | No| Initial value of the slider.| -| id | string | - | No| Unique ID of the component.| -| style | string | - | No| Style declaration of the component.| -| class | string | - | No| Style class of the component, which is used to refer to a style table.| -| ref | string | - | No| Reference information of child elements, which is registered with the parent component on **$refs**.| +| Name | Type | Default Value | Mandatory | Description | +| ----- | ------ | ---- | ---- | ---------------------------------------- | +| min | number | 0 | No | Minimum value of the slider. | +| max | number | 100 | No | Maximum value of the slider. | +| value | number | 0 | No | Initial value of the slider. | +| id | string | - | No | Unique ID of the component. | +| style | string | - | No | Style declaration of the component. | +| class | string | - | No | Style class of the component, which is used to refer to a style table. | +| ref | string | - | No | Reference information of child elements, which is registered with the parent component on **$refs**.| ## Events -| Name| Parameter| Description| -| -------- | -------- | -------- | -| change | ChangeEvent | Triggered when the value changes.| -| click | - | Triggered when the component is clicked. | -| longpress | - | Triggered when the component is long pressed. | -| swipe5+ | [SwipeEvent](js-common-events.md) | Triggered when a user quickly swipes on the component. | +| Name | Parameter | Description | +| ------------------ | --------------------------------- | -------------- | +| change | ChangeEvent | Triggered when the value changes.| +| click | - | Triggered when the component is clicked. | +| longpress | - | Triggered when the component is long pressed. | +| swipe5+ | [SwipeEvent](js-common-events.md) | Triggered when a user quickly swipes on the component. | - **Table 2** ChangeEvent + **Table 1** ChangeEvent -| Attribute| Type| Description| -| -------- | -------- | -------- | +| Attribute | Type | Description | +| ---------------------------------------- | ------ | ------------- | | progress(deprecated5+) | string | Current value of the slider.| -| value5+ | number | Current value of the slider.| +| value5+ | number | Current value of the slider.| ## Styles -| Name| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| color | <color> | \#000000 | No| Background color of the slider.| -| selected-color | <color> | \#ffffff | No| Selected color of the slider.| -| width | <length> \| <percentage>5+ | - | No| Component width.
If this attribute is not set, the default value **0** is used. | -| height | <length> \| <percentage>5+ | - | No| Component height.
If this attribute is not set, the default value **0** is used. | -| padding | <length> | 0 | No| Shorthand attribute to set the padding for all sides.
The attribute can have one to four values:
- If you set only one value, it specifies the padding for all the four sides.
- If you set two values, the first value specifies the top and bottom padding, and the second value specifies the left and right padding.
- If you set three values, the first value specifies the top padding, the second value specifies the left and right padding, and the third value specifies the bottom padding.
- If you set four values, they respectively specify the padding for top, right, bottom, and left sides (in clockwise order).| -| padding-[left\|top\|right\|bottom] | <length> | 0 | No| Left, top, right, and bottom padding.| -| margin | <length> \| <percentage>5+ | 0 | No| Shorthand attribute to set the margin for all sides. The attribute can have one to four values:
- If you set only one value, it specifies the margin for all the four sides.
- If you set two values, the first value specifies the top and bottom margins, and the second value specifies the left and right margins.
- If you set three values, the first value specifies the top margin, the second value specifies the left and right margins, and the third value specifies the bottom margin.
- If you set four values, they respectively specify the margin for top, right, bottom, and left sides (in clockwise order).| -| margin-[left\|top\|right\|bottom] | <length> \| <percentage>5+ | 0 | No| Left, top, right, and bottom margins.| -| border-width | <length> | 0 | No| Shorthand attribute to set the margin for all sides.| -| border-color | <color> | black | No| Shorthand attribute to set the color for all borders.| -| border-radius | <length> | - | No| Radius of round-corner borders.| -| background-color | <color> | - | No| Background color.| -| display | string | flex | No| How and whether to display the box containing an element. Available values are as follows:
- **flex**: flexible layout
- **none**: not rendered| -| [left\|top] | <length> \| <percentage>6+ | - | No| Edge of the element.
- **left**: left edge position of the element. This attribute defines the offset between the left edge of the margin area of a positioned element and left edge of its containing block.
- **top**: top edge position of the element. This attribute defines the offset between the top edge of a positioned element and that of a block included in the element. | +| Name | Type | Default Value | Mandatory | Description | +| ---------------------------------- | ---------------------------------------- | -------- | ---- | ---------------------------------------- | +| color | <color> | \#000000 | No | Background color of the slider. | +| selected-color | <color> | \#ffffff | No | Selected color of the slider. | +| width | <length> \| <percentage>5+ | - | No | Component width.
If this attribute is not set, the default value **0** is used. | +| height | <length> \| <percentage>5+ | - | No | Component height.
If this attribute is not set, the default value **0** is used. | +| padding | <length> | 0 | No | Shorthand attribute to set the padding for all sides.
The attribute can have one to four values:
- If you set only one value, it specifies the padding for all the four sides.
- If you set two values, the first value specifies the top and bottom padding, and the second value specifies the left and right padding.
- If you set three values, the first value specifies the top padding, the second value specifies the left and right padding, and the third value specifies the bottom padding.
- If you set four values, they respectively specify the padding for top, right, bottom, and left sides (in clockwise order).| +| padding-[left\|top\|right\|bottom] | <length> | 0 | No | Left, top, right, and bottom padding. | +| margin | <length> \| <percentage>5+ | 0 | No | Shorthand attribute to set the margin for all sides. The attribute can have one to four values:
- If you set only one value, it specifies the margin for all the four sides.
- If you set two values, the first value specifies the top and bottom margins, and the second value specifies the left and right margins.
- If you set three values, the first value specifies the top margin, the second value specifies the left and right margins, and the third value specifies the bottom margin.
- If you set four values, they respectively specify the margin for top, right, bottom, and left sides (in clockwise order).| +| margin-[left\|top\|right\|bottom] | <length> \| <percentage>5+ | 0 | No | Left, top, right, and bottom margins. | +| border-width | <length> | 0 | No | Shorthand attribute to set the margin for all sides. | +| border-color | <color> | black | No | Shorthand attribute to set the color for all borders. | +| border-radius | <length> | - | No | Radius of round-corner borders. | +| background-color | <color> | - | No | Background color. | +| display | string | flex | No | How and whether to display the box containing an element. Available values are as follows:
- **flex**: flexible layout
- **none**: not rendered| +| [left\|top] | <length> \| <percentage>6+ | - | No | Edge of the element.
- **left**: left edge position of the element. This attribute defines the offset between the left edge of the margin area of a positioned element and left edge of its containing block.
- **top**: top edge position of the element. This attribute defines the offset between the top edge of a positioned element and that of a block included in the element.| ## Example diff --git a/en/application-dev/reference/arkui-js-lite/js-components-common-animation.md b/en/application-dev/reference/arkui-js-lite/js-components-common-animation.md index 8533e8dd7830abc31d5bd362ed115b083161fb69..ef2c39dc69ef2779e3e70c8ca61ff713f726e3d9 100644 --- a/en/application-dev/reference/arkui-js-lite/js-components-common-animation.md +++ b/en/application-dev/reference/arkui-js-lite/js-components-common-animation.md @@ -4,44 +4,44 @@ Components support dynamic rotation, translation, and scaling effects. These effects can be set in the **style** attribute or **.css** files. -| Name| Type| Default Value| Description| -| -------- | -------- | -------- | -------- | -| transform | string | - | Translation, rotation, and scaling attributes. For details, see Table 1. | -| animation-name | string | - | @keyframes rule. For details, see Table 2. | -| animation-delay | <time> | 0 | Delay for playing the animation, in ms or s, for example, **1000 ms** or **1s**. The default unit is ms. | -| animation-duration | <time> | 0 | Animation duration, in ms or s, for example, **1000 ms** or **1s**. The default unit is ms.
**NOTE**
**animation-duration** must be specified. Otherwise, the duration is **0**, which means the animation will not be played. | -| animation-iteration-count | number \| infinite | 1 | Number of times that an animation is played. The animation is played once by default. You can set the value to **infinite** to play the animation infinitely.| -| animation-timing-function | string |
linear | Speed curve of an animation, which makes the animation more fluent.
- **linear**: The animation speed keeps unchanged.
- **ease-in**: The animation starts at a low speed. The cubic-bezier curve (0.42, 0.0, 1.0, 1.0) is used
- **ease-out**: The animation ends at a low speed. The cubic-bezier curve (0.0, 0.0, 0.58, 1.0) is used.
- **ease-in-out**: The animation starts and ends at a low speed. The cubic-bezier curve (0.42, 0.0, 0.58, 1.0) is used. | -| animation-fill-mode | string | none | Start and end styles of the animation.
- **none**: No style is applied to the target before or after the animation is executed.
- **forwards**: The target keeps the state at the end of the animation (defined in the last key frame) after the animation is executed.| +| Name | Type | Default Value | Description | +| ------------------------- | ---------------------------------- | ----------- | ---------------------------------------- | +| transform | string | - | Translation, rotation, and scaling attributes. For details, see Table 1. | +| animation-name | string | - | \@keyframes rule. For details, see Table 2. | +| animation-delay | <time> | 0 | Delay for playing the animation, in ms or s, for example, **1000 ms** or **1s**. \|The default unit is ms.| +| animation-duration | <time> | 0 | Animation duration, in ms or s, for example, **1000 ms** or **1s**. \|The default unit is ms.
**NOTE**
**animation-duration** must be specified. Otherwise, the duration is **0**, which means the animation will not be played.| +| animation-iteration-count | number \| infinite | 1 | Number of times that an animation is played. The animation is played once by default. You can set the value to **infinite** to play the animation infinitely. | +| animation-timing-function | string |
linear | Speed curve of an animation, which makes the animation more fluent.
Available values are as follows:
- **linear**: The animation speed keeps unchanged.
- **ease-in**: The animation starts at a low speed. The cubic-bezier curve (0.42, 0.0, 1.0, 1.0) is used
- **ease-out**: The animation ends at a low speed. The cubic-bezier curve (0.0, 0.0, 0.58, 1.0) is used.
- **ease-in-out**: The animation starts and ends at a low speed. The cubic-bezier curve (0.42, 0.0, 0.58, 1.0) is used.| +| animation-fill-mode | string | none | Start and end styles of the animation.
- **none**: No style is applied to the target before or after the animation is executed.
- **forwards**: The target keeps the state at the end of the animation (defined in the last key frame) after the animation is executed.| **Table 1** transform -| Name| Type| Description| -| -------- | -------- | -------- | -| translateX | <length> | Moves an element along the x-axis.| -| translateY | <length> | Moves an element along the y-axis.| -| rotate | <deg> \| <rad> | Rotates an element.| +| Name | Type | Description | +| ---------- | ------------------------------------ | ---------- | +| translateX | <length> | Moves an element along the x-axis.| +| translateY | <length> | Moves an element along the y-axis.| +| rotate | <deg> \| <rad> | Rotates an element. | > **NOTE** > > Only images of the original size can be rotated on lite wearables. - **Table 2** @keyframes + **Table 2** \@keyframes -| Name| Type| Default Value| Description| -| -------- | -------- | -------- | -------- | -| background-color | <color> | - | Background color applied to the component after the animation is played.| -| width | <length> | - | Width value applied to the component after the animation is played.| -| height | <length> | - | Height value applied to the component after the animation is played.| -| transform | string | - | Transformation type applied to a component. For details, see Table 1.| +| Name | Type | Default Value | Description | +| ---------------- | -------------- | ---- | ------------------ | +| background-color | <color> | - | Background color applied to the component after the animation is played. | +| width | <length> | - | Width value applied to the component after the animation is played. | +| height | <length> | - | Height value applied to the component after the animation is played. | +| transform | string | - | Transformation type applied to a component. For details, see Table 1.| If there is no default value for when an animation will start or end, use **from** and **to** to specify the start and end of the display. The following is an example: -``` +```css @keyframes Go { from { diff --git a/en/application-dev/reference/arkui-js-lite/js-components-common-mediaquery.md b/en/application-dev/reference/arkui-js-lite/js-components-common-mediaquery.md index c01a9c145991b2cf4eabc971d718cb8132c9ee97..43a11aa1f7a691186eb436a19383913f0471ffa5 100644 --- a/en/application-dev/reference/arkui-js-lite/js-components-common-mediaquery.md +++ b/en/application-dev/reference/arkui-js-lite/js-components-common-mediaquery.md @@ -45,8 +45,8 @@ You can use media logical operators to implement complex media query. The follow **Table 1** Media logical operators -| Type | Description | -| --------------- | ------------------------------------------------------------ | +| Type | Description | +| --------------- | ---------------------------------------- | | and | The **and** operator is used to combine multiple media features into one media query, in a logical AND operation. The query is valid only when all media features are true. It can also combine media types and media functions.
For example, **screen and (device-type: liteWearable) and (max-height: 454)** evaluates to **true** when the device type is wearable and the maximum height of the application is 454 pixel units.| | or9+ | The **or** operator is used to combine multiple media features into one media query, in a logical OR operation. The query is valid if a media feature is true.
For example, **screen and (max-height: 454) or (round-screen: true)** evaluates to **true** when the maximum height of the application is 454 pixel units or the device screen is round.| @@ -55,18 +55,18 @@ You can use media logical operators to implement complex media query. The follow ## Media Features -| Type | Description | -| ---------------- | ------------------------------------------------------------ | -| height | Height of the display area on the application page. | -| min-height | Minimum height of the display area on the application page. | -| max-height | Maximum height of the display area on the application page. | -| width | Width of the display area on the application page. | -| min-width | Minimum width of the display area on the application page. | -| max-width | Maximum width of the display area on the application page. | +| Type | Description | +| ---------------- | ---------------------------------------- | +| height | Height of the display area on the application page. | +| min-height | Minimum height of the display area on the application page. | +| max-height | Maximum height of the display area on the application page. | +| width | Width of the display area on the application page. | +| min-width | Minimum width of the display area on the application page. | +| max-width | Maximum width of the display area on the application page. | | aspect-ratio | Ratio of the width to the height of the display area on the application page.
Example: **aspect-ratio: 1/2**| | min-aspect-ratio | Minimum ratio of the width to the height of the display area on the application page. | | max-aspect-ratio | Maximum ratio of the width to the height of the display area on the application page. | -| round-screen | Screen type. The value **true** means that the screen is round, and **false** means the opposite. | +| round-screen | Screen type. The value **true** means that the screen is round, and **false** means the opposite.| ## Sample Code for the Common Media Feature diff --git a/en/application-dev/reference/arkui-js-lite/js-components-container-stack.md b/en/application-dev/reference/arkui-js-lite/js-components-container-stack.md index 2ce76b90cf9ad62ad1b95c0e08af46ee79d7d096..c099a46be788de55f5832bc94614c569ba2b0bad 100644 --- a/en/application-dev/reference/arkui-js-lite/js-components-container-stack.md +++ b/en/application-dev/reference/arkui-js-lite/js-components-container-stack.md @@ -9,47 +9,47 @@ The **\** component provides a stack container where child components are ## Child Components -Supported +Supported. ## Attributes -| Name| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| id | string | - | No| Unique ID of the component.| -| style | string | - | No| Style declaration of the component.| -| class | string | - | No| Style class of the component, which is used to refer to a style table.| -| ref | string | - | No| Reference information of child elements, which is registered with the parent component on **$refs**.| +| Name | Type | Default Value | Mandatory | Description | +| ----- | ------ | ---- | ---- | ---------------------------------------- | +| id | string | - | No | Unique ID of the component. | +| style | string | - | No | Style declaration of the component. | +| class | string | - | No | Style class of the component, which is used to refer to a style table. | +| ref | string | - | No | Reference information of child elements, which is registered with the parent component on **$refs**.| ## Events -| Name| Parameter| Description| -| -------- | -------- | -------- | -| click | - | Triggered when the component is clicked.| -| longpress | - | Triggered when the component is long pressed.| +| Name | Parameter | Description | +| ------------------ | --------------------------------- | ----------- | +| click | - | Triggered when the component is clicked. | +| longpress | - | Triggered when the component is long pressed. | | swipe5+ | [SwipeEvent](js-common-events.md) | Triggered when a user quickly swipes on the component.| ## Styles -| Name| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| width | <length> \| <percentage>5+ | - | No| Component width.
If this attribute is not set, the default value **0** is used. | -| height | <length> \| <percentage>5+ | - | No| Component height.
If this attribute is not set, the default value **0** is used. | -| padding | <length> | 0 | No| Shorthand attribute to set the padding for all sides.
The attribute can have one to four values:
- If you set only one value, it specifies the padding for all the four sides.
- If you set two values, the first value specifies the top and bottom padding, and the second value specifies the left and right padding.
- If you set three values, the first value specifies the top padding, the second value specifies the left and right padding, and the third value specifies the bottom padding.
- If you set four values, they respectively specify the padding for top, right, bottom, and left sides (in clockwise order).| -| padding-[left\|top\|right\|bottom] | <length> | 0 | No| Left, top, right, and bottom padding.| -| margin | <length> \| <percentage>5+ | 0 | No| Shorthand attribute to set the margin for all sides. The attribute can have one to four values:
- If you set only one value, it specifies the margin for all the four sides.
- If you set two values, the first value specifies the top and bottom margins, and the second value specifies the left and right margins.
- If you set three values, the first value specifies the top margin, the second value specifies the left and right margins, and the third value specifies the bottom margin.
- If you set four values, they respectively specify the margin for top, right, bottom, and left sides (in clockwise order).| -| margin-[left\|top\|right\|bottom] | <length> \| <percentage>5+ | 0 | No| Left, top, right, and bottom margins.| -| border-width | <length> | 0 | No| Shorthand attribute to set the margin for all sides.| -| border-color | <color> | black | No| Shorthand attribute to set the color for all borders.| -| border-radius | <length> | - | No| Radius of round-corner borders.| -| background-color | <color> | - | No| Background color.| -| opacity5+ | number | 1 | No| Opacity of an element. The value ranges from **0** to **1**. The value **1** means opaque, and **0** means completely transparent.| -| display | string | flex | No| How and whether to display the box containing an element. Available values are as follows:
- **flex**: flexible layout
- **none**: not rendered| -| [left\|top] | <length> \| <percentage>6+ | - | No| Edge of the element.
- **left**: left edge position of the element. This attribute defines the offset between the left edge of the margin area of a positioned element and left edge of its containing block.
- **top**: top edge position of the element. This attribute defines the offset between the top edge of a positioned element and that of a block included in the element. | - -> **NOTE** +| Name | Type | Default Value | Mandatory | Description | +| ---------------------------------- | ---------------------------------------- | ----- | ---- | ---------------------------------------- | +| width | <length> \| <percentage>5+ | - | No | Component width.

If this attribute is not set, the default value **0** is used. | +| height | <length> \| <percentage>5+ | - | No | Component height.

If this attribute is not set, the default value **0** is used. | +| padding | <length> | 0 | No | Shorthand attribute to set the padding for all sides.
The attribute can have one to four values:
- If you set only one value, it specifies the padding for all the four sides.
- If you set two values, the first value specifies the top and bottom padding, and the second value specifies the left and right padding.
- If you set three values, the first value specifies the top padding, the second value specifies the left and right padding, and the third value specifies the bottom padding.
- If you set four values, they respectively specify the padding for top, right, bottom, and left sides (in clockwise order).| +| padding-[left\|top\|right\|bottom] | <length> | 0 | No | Left, top, right, and bottom padding. | +| margin | <length> \| <percentage>5+ | 0 | No | Shorthand attribute to set the margin for all sides. The attribute can have one to four values:
- If you set only one value, it specifies the margin for all the four sides.
- If you set two values, the first value specifies the top and bottom margins, and the second value specifies the left and right margins.
- If you set three values, the first value specifies the top margin, the second value specifies the left and right margins, and the third value specifies the bottom margin.
- If you set four values, they respectively specify the margin for top, right, bottom, and left sides (in clockwise order).| +| margin-[left\|top\|right\|bottom] | <length> \| <percentage>5+ | 0 | No | Left, top, right, and bottom margins. | +| border-width | <length> | 0 | No | Shorthand attribute to set the margin for all sides. | +| border-color | <color> | black | No | Shorthand attribute to set the color for all borders. | +| border-radius | <length> | - | No | Radius of round-corner borders. | +| background-color | <color> | - | No | Background color. | +| opacity5+ | number | 1 | No | Opacity of an element. The value ranges from **0** to **1**. The value **1** means opaque, and **0** means completely transparent. | +| display | string | flex | No | How and whether to display the box containing an element. Available values are as follows:
- **flex**: flexible layout
- **none**: not rendered| +| [left\|top] | <length> \| <percentage>6+ | - | No | Edge of the element.
- **left**: left edge position of the element. This attribute defines the offset between the left edge of the margin area of a positioned element and left edge of its containing block.
- **top**: top edge position of the element. This attribute defines the offset between the top edge of a positioned element and that of a block included in the element.| + +> **NOTE** > > The absolute positioning does not support a percentage. Therefore, **margin** cannot be set for the child components of the **\** component. diff --git a/en/application-dev/reference/arkui-js-lite/js-framework-file.md b/en/application-dev/reference/arkui-js-lite/js-framework-file.md index ade304c4d50a1aacac56a140c1bf3a3669165580..e03caae24cb2ddfd8c20c7517baef2420160bedc 100644 --- a/en/application-dev/reference/arkui-js-lite/js-framework-file.md +++ b/en/application-dev/reference/arkui-js-lite/js-framework-file.md @@ -50,7 +50,7 @@ Application resources can be accessed via an absolute or relative path. In this > > - If code files A and B are in the same directory, you can use either a relative or absolute path in code file B to reference resource files. > -> - If code files A and B are in different directories, you must use an absolute path in code file B to reference resource files. The reason is that the directory of code file B changes during Webpack packaging. +> - If code files A and B are in different directories, you must use an absolute path in code file B to reference resource files, because the directory of code file B changes during Webpack packaging. > diff --git a/en/application-dev/reference/arkui-js-lite/js-framework-js-tag.md b/en/application-dev/reference/arkui-js-lite/js-framework-js-tag.md index 37d08081341fb43d1228d2cd9b211b14cf39f35a..868e668195e277d512bd98c99b0404261b198eab 100644 --- a/en/application-dev/reference/arkui-js-lite/js-framework-js-tag.md +++ b/en/application-dev/reference/arkui-js-lite/js-framework-js-tag.md @@ -4,10 +4,10 @@ The "js" tag contains the instance name and page route information. -| Tag| Type| Default Value| Mandatory| Description| -| -------- | -------- | -------- | -------- | -------- | -| name | string | default | Yes| Name of the JavaScript instance.| -| pages | Array | - | Yes| Route information. For details, see ["pages"](#pages).| +| Tag | Type | Default Value | Mandatory | Description | +| ----- | ------ | ------- | ---- | ----------------------------- | +| name | string | default | Yes | Name of the JavaScript instance. | +| pages | Array | - | Yes | Route information. For details, see ["pages"](#pages).| > **NOTE** @@ -34,10 +34,10 @@ The **"pages"** defines the route information of each page. Each page consists o > **NOTE** > -> -> - The application home page is fixed to **pages/index/index**. -> -> - The page name should not be a component name, for example, **text.hml** or **button.hml**. +> +> - The application home page is fixed to **pages/index/index**. +> +> - The page name should not be a component name, for example, **text.hml** or **button.hml**. ## Example @@ -46,7 +46,7 @@ The **"pages"** defines the route information of each page. Each page consists o ``` { "app": { - "bundleName": "com.huawei.player", + "bundleName": "com.example.player", "version": { "code": 1, "name": "1.0" diff --git a/en/application-dev/reference/arkui-js-lite/js-framework-syntax-css.md b/en/application-dev/reference/arkui-js-lite/js-framework-syntax-css.md index 79b1d9938cac9f7f804a85407a74d6bd08931628..7e3bf96dde9606c86a70d75f1c89fe62a47d155d 100644 --- a/en/application-dev/reference/arkui-js-lite/js-framework-syntax-css.md +++ b/en/application-dev/reference/arkui-js-lite/js-framework-syntax-css.md @@ -14,16 +14,16 @@ CSS files can be imported using the **\@import** statement. This facilitates mod The **.css** file with the same name as the **.hml** file in each page directory describes the styles of components on the HML page, determining how the components will be displayed. 1. Internal style: The **style** and **class** attributes can be used to specify the component style. Sample code: - - ``` + + ```html
Hello World
``` - - ``` + + ```css /* index.css */ .container { justify-content: center; @@ -31,16 +31,16 @@ The **.css** file with the same name as the **.hml** file in each page directory ``` 2. External style files: You need to import the files. For example, create a **style.css** file in the **common** directory and import the file at the beginning of **index.css**. - - ``` + + ```css /* style.css */ .title { font-size: 50px; } ``` - - ``` + + ```css /* index.css */ @import '../../common/style.css'; .container { @@ -53,16 +53,16 @@ The **.css** file with the same name as the **.hml** file in each page directory A CSS selector is used to select elements for which styles need to be added to. The following table lists the supported selectors. -| Selector| Example| Description| -| -------- | -------- | -------- | -| .class | .container | Selects all components whose **class** is **container**.| -| \#id | \#titleId | Selects all components whose **id** is **titleId**.| -| , | .title, .content | Selects all components whose **class** is **title** or **content**.| +| Selector | Example | Description | +| ------ | --------------------- | ------------------------------------- | +| .class | .container | Selects all components whose **class** is **container**. | +| \#id | \#titleId | Selects all components whose **id** is **titleId**. | +| , | .title, .content | Selects all components whose **class** is **title** or **content**.| Example: -``` +```html
Title @@ -73,7 +73,7 @@ Example: ``` -``` +```css /* Page style xxx.css */ /* Set the style for the components whose class is title. */ .title { @@ -95,15 +95,17 @@ Example: A CSS pseudo-class is a keyword added to a selector that specifies a special state of the selected elements. -| Name| Available Components| Description| -| -------- | -------- | -------- | -| :active |
input[type="button"] | Selects the element activated by a user, for example, a pressed button. Only the **background-color** and **background-image** attributes can be set for the pseudo-class selector on lite wearables.| + + +| Name | Available Components | Description | +| -------- | ----------------------------------- | ---------------------------------------- | +| :active |
input[type="button"] | Selects the element activated by a user, for example, a pressed button. Only the **background-color** and **background-image** attributes can be set for the pseudo-class selector on lite wearables.| | :checked | input[type="checkbox", type="radio"]| Selects the element whose **checked** attribute is **true**. Only the **background-color** and **background-image** attributes can be set for the pseudo-class selector on lite wearables.| The following is an example for you to use the **:active** pseudo-class to control the style when a user presses the button. -``` +```html
@@ -111,7 +113,7 @@ The following is an example for you to use the **:active** pseudo-class to contr ``` -``` +```css /* index.css */ .button:active { background-color: #888888;/* After the button is activated, the background color is changed to #888888. */ @@ -124,8 +126,8 @@ The following is an example for you to use the **:active** pseudo-class to contr Precompilation is a program that uses specific syntax to generate CSS files. It provides variables and calculation, helping you define component styles more conveniently. Currently, Less, Sass, and Scss are supported. To use precompiled styles, change the suffix of the original **.css** file. For example, change **index.css** to **index.less**, **index.sass**, or **index.scss**. - The following **index.less** file is changed from **index.css**. - - ``` + + ```css /* index.less */ /* Define a variable. */ @colorBackground: #000000; @@ -135,8 +137,8 @@ Precompilation is a program that uses specific syntax to generate CSS files. It ``` - Reference a precompiled style file. For example, if the **style.scss** file is located in the **common** directory, change the original **index.css** file to **index.scss** and import **style.scss**. - - ``` + + ```css /* style.scss */ /* Define a variable. */ $colorBackground: #000000; @@ -144,8 +146,8 @@ Precompilation is a program that uses specific syntax to generate CSS files. It Reference the precompiled style file in **index.scss**: - - ``` + + ```css /* index.scss */ /* Import style.scss. */ @import '../../common/style.scss'; @@ -154,7 +156,7 @@ Precompilation is a program that uses specific syntax to generate CSS files. It } ``` - + > **NOTE** > > Place precompiled style files in the **common** directory. diff --git a/en/application-dev/reference/arkui-js-lite/js-framework-syntax-hml.md b/en/application-dev/reference/arkui-js-lite/js-framework-syntax-hml.md index b9f5bec1e13aaf9bc2112fdee9e43cdcc322641d..b111895cb5421d3b5d4310c56f85929c216615ec 100644 --- a/en/application-dev/reference/arkui-js-lite/js-framework-syntax-hml.md +++ b/en/application-dev/reference/arkui-js-lite/js-framework-syntax-hml.md @@ -7,7 +7,7 @@ The OpenHarmony Markup Language (HML) is an HTML-like language that allows you t ## HML Page Structure -``` +```html
Image Show @@ -21,7 +21,7 @@ The OpenHarmony Markup Language (HML) is an HTML-like language that allows you t ## Data Binding -``` +```html
{{content[1]}} @@ -29,7 +29,7 @@ The OpenHarmony Markup Language (HML) is an HTML-like language that allows you t ``` -``` +```js // xxx.js export default { data: { @@ -42,9 +42,9 @@ export default { ``` > **NOTE** -> - To make the array data modification take effect, use the **splice** method to change array items. -> -> - ECMAScript 6.0 syntax is not supported in HML. +> - To make the array data modification take effect, use the **splice** method to change array items. +> +> - ECMAScript 6.0 syntax is not supported in HML. ## Event Binding @@ -52,7 +52,7 @@ export default { The callback bound to an event receives an event object parameter, which can be used to obtain the event information. -``` +```html
@@ -73,7 +73,7 @@ The callback bound to an event receives an event object parameter, which can be ``` -``` +```js // xxx.js export default { data: { @@ -88,11 +88,11 @@ export default { > **NOTE** > -> Event bubbling is supported since API version 5. After you upgrade the SDK and run an existing JavaScript application, events bound using a traditional statement (such as **onclick**) will not bubble. However, if you use the new SDK to repack the JavaScript application, such events will bubble. To avoid service logic errors, replace the traditional statement with one supported by the new SDK. For example, replace **onclick** with **grab:click**. +> Event bubbling is supported since API version 5. After you upgrade the SDK and run an existing JavaScript application, events bound using a traditional statement (such as **onclick**) will not bubble. However, if you use the new SDK to repack the JavaScript application, such events will bubble. To avoid service logic errors, replace the traditional statement with one supported by the new SDK. For example, replace **onclick** with **grab:click**. **Example:** -``` +```html
{{count}} @@ -108,8 +108,8 @@ export default { ``` -``` -/* xxx.js */ +```js +// xxx.js export default { data: { count: 0 @@ -127,7 +127,7 @@ export default { ``` -``` +```css /* xxx.css */ .container { display: flex; @@ -164,7 +164,7 @@ export default { ## Loop Rendering -``` +```html
@@ -184,7 +184,7 @@ export default { ``` -``` +```js // xxx.js export default { data: { @@ -211,11 +211,12 @@ The **tid** attribute accelerates the **for** loop and improves the re-rendering - for="(i, v) in array": **i** indicates the element index, and **v** indicates the element variable. All elements of the array object will be looped through. -> **NOTE** +> **NOTE** +> > - Each element in the array must have the data attribute specified by **tid**. Otherwise, an exception may occur. -> +> > - The attribute specified by **tid** in the array must be unique. Otherwise, performance loss occurs. In the above example, only **id** and **name** can be used as **tid** because they are unique fields. -> +> > - The **tid** field does not support expressions. @@ -224,7 +225,7 @@ The **tid** attribute accelerates the **for** loop and improves the re-rendering There are two ways to implement conditional rendering: **if-elif-else** or **show**. In **if-elif-else**, when the **if** statement evaluates to **false**, the component is not built in the VDOM and is not rendered. For **show**, when show is **false**, the component is not rendered but is built in the VDOM. In addition, the **if-elif-else** statements must be used in sibling nodes. Otherwise, the compilation fails. The following example uses both ways to implement conditional rendering: -``` +```html
@@ -236,8 +237,8 @@ There are two ways to implement conditional rendering: **if-elif-else** or **sho ``` -``` -// xxx.css +```css +/* xxx.css */ .container{ flex-direction: column; align-items: center; @@ -250,7 +251,7 @@ There are two ways to implement conditional rendering: **if-elif-else** or **sho ``` -``` +```js // xxx.js export default { data: { @@ -269,7 +270,7 @@ export default { In the optimized rendering (**show**), if **show** is **true**, the node is rendered properly; if it is **false**, the display style will be **none**. -``` +```html
@@ -278,8 +279,8 @@ In the optimized rendering (**show**), if **show** is **true**, the node is rend ``` -``` -// xxx.css +```css +/* xxx.css */ .container{ flex-direction: column; align-items: center; @@ -292,7 +293,7 @@ In the optimized rendering (**show**), if **show** is **true**, the node is rend ``` -``` +```js // xxx.js export default { data: { @@ -305,4 +306,5 @@ export default { ``` > **NOTE** -> Do not use **for** and **if** attributes at the same time in an element. +> +> Do not use **for** and **if** attributes at the same time in an element. diff --git a/en/application-dev/reference/arkui-js-lite/js-framework-syntax-js.md b/en/application-dev/reference/arkui-js-lite/js-framework-syntax-js.md index 3ce76d4463643c979cf619749b2a8a5c80dae1c1..e9d71fc2ff680dfba5b95e7bae676854a1e68a28 100644 --- a/en/application-dev/reference/arkui-js-lite/js-framework-syntax-js.md +++ b/en/application-dev/reference/arkui-js-lite/js-framework-syntax-js.md @@ -31,7 +31,7 @@ The ECMAScript 6.0 syntax is supported. Lite wearables only support the followin - Module declaration Import functionality modules. - + ``` import router from '@system.router'; ``` @@ -39,7 +39,7 @@ The ECMAScript 6.0 syntax is supported. Lite wearables only support the followin - Code reference Import JavaScript code. - + ``` import utils from '../../common/utils.js'; ``` @@ -48,17 +48,17 @@ The ECMAScript 6.0 syntax is supported. Lite wearables only support the followin ## Objects - Page objects - | Attribute| Type| Description| - | -------- | -------- | -------- | - | data | Object/Function | Data model of the page. If the attribute is of the function type, the return value must be of the object type. The name cannot start with a dollar sign ($) or underscore (_). Do not use reserved words (**for**, **if**, **show**, and **tid**). | - | $refs | Object | DOM elements or child component instances that have registered the **ref** attribute. For an example, see [Obtaining a DOM Element](#obtaining-a-dom-element).| + | Attribute | Type | Description | + | ----- | --------------- | ---------------------------------------- | + | data | Object/Function | Data model of the page. If the attribute is of the function type, the return value must be of the object type. The name cannot start with a dollar sign ($) or underscore (_). Do not use reserved words (**for**, **if**, **show**, and **tid**).
| + | $refs | Object | DOM elements or child component instances that have registered the **ref** attribute. For an example, see [Obtaining a DOM Element](#obtaining-a-dom-element). | ## Obtaining a DOM Element Use **$refs** to obtain a DOM element. -``` +```html
@@ -66,57 +66,57 @@ Use **$refs** to obtain a DOM element. ``` -``` -// index.js -export default { - data: { - images: [ - { src: '/common/frame1.png' }, - { src: '/common/frame2.png' }, - { src: '/common/frame3.png' }, - ], - }, - handleClick() { - const animator = this.$refs.animator; // Obtain the DOM element whose $refs attribute is animator. - const state = animator.getState(); - if (state === 'paused') { - animator.resume(); - } else if (state === 'stopped') { - animator.start(); - } else { - animator.pause(); - } - }, -}; -``` + ```js + // index.js + export default { + data: { + images: [ + { src: '/common/frame1.png' }, + { src: '/common/frame2.png' }, + { src: '/common/frame3.png' }, + ], + }, + handleClick() { + const animator = this.$refs.animator; // Obtain the DOM element whose $refs attribute is animator. + const state = animator.getState(); + if (state === 'paused') { + animator.resume(); + } else if (state === 'stopped') { + animator.start(); + } else { + animator.pause(); + } + }, + }; + ``` ## Lifecycle APIs - Page lifecycle APIs - | Name | Type| Parameter| Return Value| Description| Triggered When| - | -------- | -------- | -------- | -------- | -------- | -------- | - | onInit | Function | N/A| N/A| Listens for page initialization.| Page initialization is complete. This API is called only once in the page lifecycle.| - | onReady | Function | N/A| N/A| Listens for page creation.| A page is created. This API is called only once in the page lifecycle.| - | onShow | Function | N/A| N/A| Listens for page display. | The page is displayed.| - | onHide | Function | N/A| N/A| Listens for page disappearance.| The page disappears.| - | onDestroy | Function | N/A| N/A| Listens for page destruction.| The page is destroyed.| - + | Name | Type | Parameter | Return Value | Description | Triggered When | + | --------- | -------- | ---- | ---- | ------ | ------------------- | + | onInit | Function | N/A | N/A | Listens for page initialization. | Page initialization is complete. This API is called only once in the page lifecycle.| + | onReady | Function | N/A | N/A | Listens for page creation.| A page is created. This API is called only once in the page lifecycle. | + | onShow | Function | N/A | N/A | Listens for page display. | The page is displayed. | + | onHide | Function | N/A | N/A | Listens for page disappearance. | The page disappears. | + | onDestroy | Function | N/A | N/A | Listens for page destruction. | The page is destroyed. | + The lifecycle APIs of page A are called in the following sequence: - Open page A: onInit() -> onReady() -> onShow() - + - Open page B on page A: onHide() -> onDestroy() - + - Go back to page A from page B: onInit() -> onReady() -> onShow() - + - Exit page A: onHide() -> onDestroy() - + - Hide page A: onHide() - + - Show background page A on the foreground: onShow() - Application lifecycle APIs - | Name | Type| Parameter| Return Value| Description| Triggered When| - | -------- | -------- | -------- | -------- | -------- | -------- | - | onCreate | Function | N/A| N/A| Listens for application creation.| The application is created.| - | onDestroy | Function | N/A| N/A| Listens for application exit.| The application exits.| + | Name | Type | Parameter | Return Value | Description | Triggered When | + | --------- | -------- | ---- | ---- | ---- | --------- | + | onCreate | Function | N/A | N/A | Listens for application creation.| The application is created.| + | onDestroy | Function | N/A | N/A | Listens for application exit.| The application exits.| diff --git a/en/application-dev/reference/arkui-ts/figures/LinearGradientDataPanel.PNG b/en/application-dev/reference/arkui-ts/figures/LinearGradientDataPanel.PNG new file mode 100644 index 0000000000000000000000000000000000000000..5dbe4fdeef5f231fd2145da2bbaa82b433458d6c Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/LinearGradientDataPanel.PNG differ diff --git a/en/application-dev/reference/arkui-ts/figures/dataPanel.PNG b/en/application-dev/reference/arkui-ts/figures/dataPanel.PNG index b360ca62d5d961ff107b2a703621123b3b48aa46..559a2370feae57233fb39cad218a8ca77241fed9 100644 Binary files a/en/application-dev/reference/arkui-ts/figures/dataPanel.PNG and b/en/application-dev/reference/arkui-ts/figures/dataPanel.PNG differ diff --git a/en/application-dev/reference/arkui-ts/ts-appendix-enums.md b/en/application-dev/reference/arkui-ts/ts-appendix-enums.md index 020c9d6eb2f6828712a97cfe64deb347d43cc8bf..bf4d48665a378934f14c413db9408fa09fb5705f 100644 --- a/en/application-dev/reference/arkui-ts/ts-appendix-enums.md +++ b/en/application-dev/reference/arkui-ts/ts-appendix-enums.md @@ -293,12 +293,12 @@ Since API version 9, this API is supported in ArkTS widgets. | Name | Description | | -------- | ------------------------------------------------------------ | -| Auto | The default configuration of the container (**\** or **\**) is used. | -| Start | The items in the container (**\** or **\**) are aligned with the cross-start edge. | -| Center | The items in the container (**\** or **\**) are centered along the cross axis. | -| End | The items in the container (**\** or **\**) are aligned with the cross-end edge. | -| Stretch | The items in the container (**\** or **\**) are stretched and padded along the cross axis. If the flex container has the **Wrap** attribute set to **FlexWrap.Wrap** or **FlexWrap.WrapReverse**, the items are stretched to the cross size of the widest element on the current row or column. In other cases, the items with no size set are stretched to the container size.| -| Baseline | The items in the container (**\** or **\**) are aligned in such a manner that their text baselines are aligned along the cross axis. | +| Auto | The default configuration of the flex container is used. | +| Start | The items in the flex container are aligned with the cross-start edge. | +| Center | The items in the flex container are centered along the cross axis. | +| End | The items in the flex container are aligned with the cross-end edge. | +| Stretch | The items in the flex container are stretched and padded along the cross axis. If the flex container has the **Wrap** attribute set to **FlexWrap.Wrap** or **FlexWrap.WrapReverse**, the items are stretched to the cross size of the widest element on the current row or column. In other cases, the items with no size set are stretched to the container size.| +| Baseline | The items in the flex container are aligned in such a manner that their text baselines are aligned along the cross axis. | ## FlexDirection @@ -414,7 +414,7 @@ Since API version 9, this API is supported in ArkTS widgets. | Name | Description | | --------------------- | -------------------------------------- | -| None | No clipping or ellipsis is used for text overflow. | +| None | Extra-long text is clipped. | | Clip | Extra-long text is clipped. | | Ellipsis | An ellipsis (...) is used to represent text overflow.| | Marquee10+ | Text continuously scrolls when text overflow occurs. | @@ -528,3 +528,11 @@ This API is supported in ArkTS widgets. | MAX_LINES_FIRST | Prioritize the **maxLines** settings. | | MIN_FONT_SIZE_FIRST | Prioritize the **minFontSize** settings. | | LAYOUT_CONSTRAINT_FIRST | Prioritize the layout constraint settings in terms of height.| + +## TransitionEdge10+ +| Name| Description| +| -------- | -------- | +| TOP | Top edge of the window.| +| BOTTOM | Bottom edge of the window.| +| START | Left edge of the window.| +| END | Right edge of the window.| diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-datapanel.md b/en/application-dev/reference/arkui-ts/ts-basic-components-datapanel.md index 41db34a3c7167bc08af84c54586af4981a265efc..3a56d0d8d44bc724a4290556f25d3366e5e7c339 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-datapanel.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-datapanel.md @@ -24,7 +24,7 @@ Since API version 9, this API is supported in ArkTS widgets. | Name | Type | Mandatory | Description| | ----------------- | -------- | ----- | -------- | -| values | number[] | Yes | Data value list. A maximum of nine values are supported. If more than nine values are set, only the first nine ones are used. A value less than 0 evaluates to the value **0**. | +| values | number[] | Yes | Data value list. A maximum of nine values are supported. If more than nine values are set, only the first nine ones are used. A value less than 0 evaluates to the value **0**.| | max | number | No | - When set to a value greater than 0, this parameter indicates the maximum value in the **values** list.
- When set to a value equal to or smaller than 0, this parameter indicates the sum of values in the **values** list. The values are displayed in proportion.
Default value: **100**| | type8+ | [DataPanelType](#datapaneltype) | No| Type of the data panel (dynamic modification is not supported).
Default value: **DataPanelType.Circle**| @@ -46,20 +46,20 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the | Name | Type| Mandatory| Description| | ------------- | ------- | ---- | -------- | -| closeEffect | boolean | Yes| Whether to disable the rotation effect for the component.
Default value: **false**.| +| closeEffect | boolean | Yes| Whether to disable the rotation and shadow effects for the component.
Default value: **false**
**NOTE**
This attribute enables or disables the shadow effect only when **trackShadow** is not set.
The shadow effect enabled through this attribute is in the default style.| | valueColors10+ | Array<[ResourceColor](ts-types.md#resourcecolor) \| [LinearGradient](#lineargradient10)> | Yes| Array of data segment colors. A value of the **ResourceColor** type indicates a solid color, and A value of the **LinearGradient** type indicates a color gradient.| -| trackBackgroundColor10+ | [ResourceColor](ts-types.md#resourcecolor) | Yes| Background color.| -| strokeWidth10+ | [Length](ts-types.md#Length) | Yes| Stroke width of the border.| -| trackShadow10+ | [DataPanelShadowOption](#datapanelshadowoption10) | Yes| Shadow style. If this attribute is not set, the shadow effect is disabled.| +| trackBackgroundColor10+ | [ResourceColor](ts-types.md#resourcecolor) | Yes| Background color.
Default value: **'#081824'**| +| strokeWidth10+ | [Length](ts-types.md#Length) | Yes| Stroke width of the border.
Default value: **24**
Unit: vp
**NOTE**
A value less than 0 evaluates to the default value.
This attribute does not take effect when the data panel type is **DataPanelType.Line**.| +| trackShadow10+ | [DataPanelShadowOption](#datapanelshadowoption10) | Yes| Shadow style.
**NOTE**
If this attribute is set to **null**, the shadow effect is disabled.| ## DataPanelShadowOption10+ | Name | Type| Mandatory| Description| | ------------- | ------- | ---- | -------- | -| radius | number \| [Resource](ts-types.md#resource)| No| Shadow blur radius.
Default value: **5vp**| -| colors | Array<[ResourceColor](ts-types.md#resourcecolor) \| [LinearGradient](#lineargradient10)> | No| Array of shadow colors for data segments.
Default value: same as the value of **valueColors**.| -| offsetX | number \| [Resource](ts-types.md#resource)| No| Offset on the x-axis.
Default value: **5vp**| -| offsetY | number \| [Resource](ts-types.md#resource)| No| Offset on the y-axis.
Default value: **5vp**| +| radius | number \| [Resource](ts-types.md#resource)| No| Shadow blur radius.
Default value: **5**
Unit: vp
**NOTE**
A value less than or equal to 0 evaluates to the default value.| +| colors | Array<[ResourceColor](ts-types.md#resourcecolor) \| [LinearGradient](#lineargradient10)> | No| Array of shadow colors for data segments.
Default value: same as the value of **valueColors**
**NOTE**
If the number of the set shadow colors is less than that of the data segments, the number of the displayed shadow colors is the same as the former.
If the number of the set shadow colors is greater than that of the data segments, the number of the displayed shadow colors is the same as the latter.| +| offsetX | number \| [Resource](ts-types.md#resource)| No| Offset on the x-axis.
Default value: **5**
Unit: vp| +| offsetY | number \| [Resource](ts-types.md#resource)| No| Offset on the y-axis.
Default value: **5**
Unit: vp| ## LinearGradient10+ @@ -79,12 +79,14 @@ Describes the gradient color stop. | Name | Type| Mandatory| Description| | ------------- | ------- | ---- | -------- | | color | [ResourceColor](ts-types.md#resourcecolor) | Yes| Color value.| -| offset | [Length](ts-types.md#Length) | Yes| Gradient color stop (proportion value between 0 and 1).| +| offset | [Length](ts-types.md#Length) | Yes| Gradient color stop (proportion value between 0 and 1). A value less than 0 evaluates to the value **0**. A value greater than 1 evaluates to the value **1**.| ## Example +### Example 1 + ```ts // xxx.ets @Entry @@ -133,3 +135,48 @@ struct DataPanelExample { ``` ![dataPanel](figures/dataPanel.PNG) + +### Example 2 + +```ts +// xxx.ets +@Entry +@Component +struct LinearGradientDataPanelExample { + public values1: number[] = [20, 20, 20, 20] + public color1: LinearGradient = new LinearGradient([{ color: "#65EEC9A3", offset: 0 }, { color: "#FFEF629F", offset: 1 }]) + public color2: LinearGradient = new LinearGradient([{ color: "#FF67F9D4", offset: 0 }, { color: "#FFFF9554", offset: 1 }]) + public colorShadow1: LinearGradient = new LinearGradient([{ color: "#65EEC9A3", offset: 0 }, { color: "#65EF629F", offset: 1 }]) + public colorShadow2: LinearGradient = new LinearGradient([{ color: "#65e26709", offset: 0 }, { color: "#65efbd08", offset: 1 }]) + public colorShadow3: LinearGradient = new LinearGradient([{ color: "#6572B513", offset: 0 }, { color: "#6508efa6", offset: 1 }]) + public colorShadow4: LinearGradient = new LinearGradient([{ color: "#65ed08f5", offset: 0 }, { color: "#65ef0849", offset: 1 }]) + @State color3: string = '#00FF00' + @State color4: string = '#20FF0000' + @State bgColor: string = '#08182431' + @State offsetX: number = 15 + @State offsetY: number = 15 + @State radius: number = 5 + @State colorArray: Array = [this.color1, this.color2, this.color3, this.color4] + @State shadowColorArray: Array = [this.colorShadow1, this.colorShadow2, this.colorShadow3, this.colorShadow4] + + build() { + Column({ space: 5 }) { + Text('LinearGradient').fontSize(9).fontColor(0xCCCCCC).textAlign(TextAlign.Start).width('100%').margin({ top: 20, left: 20}) + DataPanel({ values: this.values1, max: 100, type: DataPanelType.Circle }) + .width(300) + .height(300) + .valueColors(this.colorArray) + .trackShadow({ + radius: this.radius, + colors: this.shadowColorArray, + offsetX: this.offsetX, + offsetY: this.offsetY + }) + .strokeWidth(30) + .trackBackgroundColor(this.bgColor) + }.width('100%').margin({ top: 5 }) + } +} +``` + +![LinearGradientDataPanel](figures/LinearGradientDataPanel.PNG) diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-text.md b/en/application-dev/reference/arkui-ts/ts-basic-components-text.md index 2c6e87d2812bb855b685d3176c5f1fed68eee3e6..9a52243939d77e88ba48b793830784aa51ebc608 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-text.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-text.md @@ -26,28 +26,31 @@ Since API version 9, this API is supported in ArkTS widgets. ## Attributes -In addition to the [universal attributes](ts-universal-attributes-size.md), the following attributes are supported. +In addition to the [universal attributes](ts-universal-attributes-size.md) and [universal text attributes](ts-universal-attributes-text-style.md), the following attributes are supported. | Name | Type | Description | | ----------------------- | ----------------------------------- | ------------------------------------------- | -| textAlign | [TextAlign](ts-appendix-enums.md#textalign) | Horizontal alignment mode of the text.
Default value: **TextAlign.Start**
**NOTE**
The text takes up the full width of the **\** component. To set the vertical alignment for the text, use the [align](ts-universal-attributes-location.md) attribute.
Since API version 9, this API is supported in ArkTS widgets.| -| textOverflow | {overflow: [TextOverflow](ts-appendix-enums.md#textoverflow)} | Display mode when the text is too long.
Default value: **{overflow: TextOverflow.Clip}**
**NOTE**
Text is clipped at the transition between words. To clip text in the middle of a word, add **\u200B** between characters.
If **overflow** is set to **TextOverflow.None**, **TextOverflow.Clip**, or **TextOverflow.Ellipsis**, this attribute must be used with **maxLines**. Otherwise, the setting does not take effect. If **overflow** is set to **TextOverflow.Marquee**, the text scrolls in a line, and therefore **maxLines** does not need to be set.
Since API version 9, this API is supported in ArkTS widgets. | -| maxLines | number | Maximum number of lines in the text.
Default value: **Infinity**
**NOTE**
By default, text is automatically folded. If this attribute is specified, the text will not exceed the specified number of lines. If there is extra text, you can use **textOverflow** to specify how it is displayed.
Since API version 9, this API is supported in ArkTS widgets.| +| textAlign | [TextAlign](ts-appendix-enums.md#textalign) | Horizontal alignment mode of the text.
Default value: **TextAlign.Start**
**NOTE**
The text takes up the full width of the **\** component. To set vertical alignment for the text, use the [align](ts-universal-attributes-location.md) attribute. The **align** attribute alone does not control the horizontal position of the text. In other words, **Alignment.TopStart**, **Alignment.Top**, and **Alignment.TopEnd** produce the same effect, top-aligning the text; **Alignment.Start**, **Alignment.Center**, and **Alignment.End** produce the same effect, centered-aligning the text vertically; **Alignment.BottomStart**, **Alignment.Bottom**, and **Alignment.BottomEnd** produce the same effect, bottom-aligning the text. Yet, it can work with the **textAlign** attribute to jointly determine the horizontal position of the text.
Since API version 9, this API is supported in ArkTS widgets.| +| textOverflow | {overflow: [TextOverflow](ts-appendix-enums.md#textoverflow)} | Display mode when the text is too long.
Default value: **{overflow: TextOverflow.Clip}**
**NOTE**
Text is clipped at the transition between words. To clip text in the middle of a word, add **\u200B** between characters.
If **overflow** is set to **TextOverflow.None**, **TextOverflow.Clip**, or **TextOverflow.Ellipsis**, this attribute must be used with **maxLines**. Otherwise, the setting does not take effect. **TextOverflow.None** produces the same effect as **TextOverflow.Clip**. If **overflow** is set to **TextOverflow.Marquee**, the text scrolls in a line, and neither **maxLines** nor **copyOption** takes effect.
Since API version 9, this API is supported in ArkTS widgets.| +| maxLines | number | Maximum number of lines in the text.
Default value: **Infinity**
**NOTE**
By default, text is automatically folded. If this attribute is specified, the text will not exceed the specified number of lines. If there is extra text, you can use **textOverflow** to specify how it is displayed.
Since API version 9, this API is supported in ArkTS widgets. | | lineHeight | string \| number \| [Resource](ts-types.md#resource) | Text line height. If the value is less than or equal to **0**, the line height is not limited and the font size is adaptive. If the value of the number type, the unit fp is used.
Since API version 9, this API is supported in ArkTS widgets.| | decoration | {
type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype),
color?: [ResourceColor](ts-types.md#resourcecolor)
} | Style and color of the text decorative line.
Default value: {
type: TextDecorationType.None,
color: Color.Black
}
Since API version 9, this API is supported in ArkTS widgets.| | baselineOffset | number \| string | Baseline offset of the text. The default value is **0**.
Since API version 9, this API is supported in ArkTS widgets.
**NOTE**

If this attribute is set to a percentage, the default value is used.| -| letterSpacing | number \| string | Letter spacing.
Since API version 9, this API is supported in ArkTS widgets.
**NOTE**

If this attribute is set to a percentage, the default value is used.| +| letterSpacing | number \| string | Letter spacing.
Since API version 9, this API is supported in ArkTS widgets.
**NOTE**
If this attribute is set to a percentage, the default value is used.
If this attribute is set to a negative value, the letters will overlap each other. | | minFontSize | number \| string \| [Resource](ts-types.md#resource) | Minimum font size.
For the setting to take effect, this attribute must be used together with **maxFontSize**, **maxLines**, or layout constraint settings.
Since API version 9, this API is supported in ArkTS widgets. | | maxFontSize | number \| string \| [Resource](ts-types.md#resource) | Maximum font size.
For the setting to take effect, this attribute must be used together with **minFontSize**, **maxLines**, or layout constraint settings.
Since API version 9, this API is supported in ArkTS widgets. | | textCase | [TextCase](ts-appendix-enums.md#textcase) | Text case.
Default value: **TextCase.Normal**
Since API version 9, this API is supported in ArkTS widgets.| | copyOption9+ | [CopyOptions](ts-appendix-enums.md#copyoptions9) | Whether copy and paste is allowed.
Default value: **CopyOptions.None**
This API is supported in ArkTS widgets.| +| draggable9+ | boolean | Drag effect of the selected text.
This attribute cannot be used with the [onDragStart](ts-universal-events-drag-drop.md) event.
It must be used with **copyOption** to enable the selected text to be dragged and copied.
Default value: **false**| | textShadow10+ | [ShadowOptions](ts-universal-attributes-image-effect.md#shadowoptions) | Text shadow.| -| heightAdaptivePolicy10+ | [TextHeightAdaptivePolicy](ts-appendix-enums.md#TextHeightAdaptivePolicy10) | How the adaptive height is determined for the text.| +| heightAdaptivePolicy10+ | [TextHeightAdaptivePolicy](ts-appendix-enums.md#textheightadaptivepolicy10) | How the adaptive height is determined for the text.
Default value: **TextHeightAdaptivePolicy.MAX_LINES_FIRST**
**NOTE**
When this attribute is set to **TextHeightAdaptivePolicy.MAX_LINES_FIRST**, the **maxLines** attribute takes precedence for adjusting the text height. If the **maxLines** setting results in a layout beyond the layout constraints, the text will shrink to a font size between `minFontSize` and `maxFontSize` to allow for more content to be shown.
When this attribute is set to **TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST**, the **minFontSize** attribute takes precedence for adjusting the text height. If the text can fit in one line with the `minFontSize` setting, the text will enlarge to the largest possible font size between `minFontSize` and `maxFontSize`.
When this attribute is set to **TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST**, the layout constraints take precedence for adjusting the text height. If the resultant layout is beyond the layout constraints, the text will shrink to a font size between `minFontSize` and `maxFontSize` to respect the layout constraints. If the layout still exceeds the layout constraints after the font size is reduced to **minFontSize**, the lines that exceed the layout constraints are deleted. | | textIndent10+ | number \| string | Indentation of the first line.
Default value: **0**| > **NOTE** > > The **\** component cannot contain both the text and the child component **\** or **\**. If both of them exist, only the content in **\** or **\** is displayed. +> +> For the **\** component, the default value of the [clip](ts-universal-attributes-sharp-clipping.md) attribute is **true**. ## Events @@ -112,7 +115,7 @@ struct TextExample1 { Text('TextOverflow+maxLines').fontSize(9).fontColor(0xCCCCCC) // Clip the text when the value of maxLines is exceeded. Text('This is the setting of textOverflow to Clip text content This is the setting of textOverflow to None text content. This is the setting of textOverflow to Clip text content This is the setting of textOverflow to None text content.') - .textOverflow({ overflow: TextOverflow.None }) + .textOverflow({ overflow: TextOverflow.Clip }) .maxLines(1) .fontSize(12) .border({ width: 1 }) diff --git a/en/application-dev/reference/arkui-ts/ts-components-canvas-canvasgradient.md b/en/application-dev/reference/arkui-ts/ts-components-canvas-canvasgradient.md index 35211ab1665ca4dbee56199a3c449ae9ff2a8a0b..8801033ff3864cef03d0271db00a8d1dfb92d3da 100644 --- a/en/application-dev/reference/arkui-ts/ts-components-canvas-canvasgradient.md +++ b/en/application-dev/reference/arkui-ts/ts-components-canvas-canvasgradient.md @@ -22,7 +22,7 @@ Since API version 9, this API is supported in ArkTS widgets. | Name | Type | Mandatory | Default Value | Description | | ------ | ------ | ---- | --------- | ---------------------------- | | offset | number | Yes | 0 | Relative position of the gradient stop along the gradient vector. The value ranges from 0 to 1.| -| color | string | Yes | '#ffffff' | Gradient color to set. | +| color | string | Yes | '#ffffff' | Gradient color to set. For details about the color notation, see the description of the string type in [ResourceColor](ts-types.md#resourcecolor). | **Example** diff --git a/en/application-dev/reference/arkui-ts/ts-custom-component-lifecycle.md b/en/application-dev/reference/arkui-ts/ts-custom-component-lifecycle.md index 8c0149ffd66fd3269d0bd28189a25e70f96cf89e..148129e651983ba9ba54a017cd6d30d79272571d 100644 --- a/en/application-dev/reference/arkui-ts/ts-custom-component-lifecycle.md +++ b/en/application-dev/reference/arkui-ts/ts-custom-component-lifecycle.md @@ -113,6 +113,63 @@ Since API version 9, this API is supported in ArkTS widgets. | children | Array<[LayoutChild](#layoutchild9)> | Child component layout information. | | constraint | [ConstraintSizeOptions](ts-types.md#constraintsizeoptions) | Size constraint information of the parent component.| +## onRecycle10+ + +onRecycle?(params: { [key: string]: unknown }): void + +Invoked when a custom component previously placed in the cache for future reuse is re-added to the node tree, with the parameters used for constructing the component passed in. + +Since API version 10, this API is supported in ArkTS widgets. + +**Parameters** + +| Name| Type | Description | +| ------ | -------------------------- | -------------------- | +| params | { [key: string]: unknown } | Parameters used for constructing the custom component.| + + +```ts +// xxx.ets +@Entry +@Component +struct Index { + @State message: string = 'Hello World' + @State switch: boolean = true + + build() { + Column() { + Button(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + .onClick(() => { + this.switch = !this.switch + }) + if (this.switch) { + Child() + } + } + .height("100%") + .width('100%') + } +} + +@Recycle +@Component +struct Child { + onRecycle(params) { + console.info("Recycle Child") + } + + build() { + Column() { + Text("Child Component") + .fontSize(20) + } + .borderWidth(2) + .height(100) + } +} +``` ## LayoutChild9+ diff --git a/en/application-dev/reference/arkui-ts/ts-universal-attributes-gradient-color.md b/en/application-dev/reference/arkui-ts/ts-universal-attributes-gradient-color.md index 11394a20c84757bfff4fc3d95fc72a7f2c3ee428..8032455b78bf4a4e5654dfc939f23cfbdeafc2e3 100644 --- a/en/application-dev/reference/arkui-ts/ts-universal-attributes-gradient-color.md +++ b/en/application-dev/reference/arkui-ts/ts-universal-attributes-gradient-color.md @@ -12,9 +12,9 @@ Create a more gorgeous look for a component by applying a gradient color effect | Name | Type | Description | | -------------- | -------------------------------------------- | ----------------------------------- | -| linearGradient | {
angle?: number \| string,
direction?: [GradientDirection](ts-appendix-enums.md#gradientdirection),
colors: Array<[ColorStop](ts-basic-components-gauge.md#colorstop)>,
repeating?: boolean
} | Linear gradient.
- **angle**: start angle of the linear gradient. A positive value indicates a clockwise rotation from the origin, (0, 0).
Default value: **180**
- **direction**: direction of the linear gradient. It does not take effect when **angle** is set.
Default value: **GradientDirection.Bottom**
- **colors**: colors of the linear gradient.
- **repeating**: whether the colors are repeated.
Default value: **false**
Since API version 9, this API is supported in ArkTS widgets.| -| sweepGradient | {
center: Point,
start?: number \| string,
end?: number \| string,
rotation?: number\|string,
colors: Array<[ColorStop](ts-basic-components-gauge.md#colorstop)>,
repeating?: boolean
} | Sweep gradient, which can sweep around the specified center point in the 0–360 degree range. If the rotation angle exceeds the range, a monochrome color instead of a gradient will be drawn.
- **center**: center point of the sweep gradient, that is, the coordinates relative to the upper left corner of the current component.
- **start**: start point of the sweep gradient.
Default value: **0**
- **end**: end point of the sweep gradient.
Default value: **0**
- **rotation**: rotation angle of the sweep gradient.
Default value: **0**
- **colors**: colors of the sweep gradient.
- **repeating**: whether the colors are repeated.
Default value: **false**
Since API version 9, this API is supported in ArkTS widgets.
**NOTE**
A value less than 0 evaluates to the value **0**. A value greater than 360 evaluates to the value **1**.
When the data type of **start**, **end**, and **rotation** is string, the value **"90"** or **"90%"** is equivalent to **90**. | -| radialGradient | {
center: Point,
radius: number \| string,
colors: Array<[ColorStop](ts-basic-components-gauge.md#colorstop)>,
repeating?: boolean
} | Radial gradient.
- **center**: center point of the radial gradient, that is, the coordinates relative to the upper left corner of the current component.
- **radius**: radius of the radial gradient.
Value range: [0, +∞)
**NOTE**
A value less than 0 evaluates to the value **0**.
- **colors**: colors of the radial gradient.
- **repeating**: whether the colors are repeated.
Default value: **false**
Since API version 9, this API is supported in ArkTS widgets. | +| linearGradient | {
angle?: number \| string,
direction?: [GradientDirection](ts-appendix-enums.md#gradientdirection),
colors: Array<[ColorStop](ts-basic-components-gauge.md#colorstop)>,
repeating?: boolean
} | Linear gradient.
- **angle**: start angle of the linear gradient. A positive value indicates a clockwise rotation from the origin, (0, 0).
Default value: **180**
- **direction**: direction of the linear gradient. It does not take effect when **angle** is set.
Default value: **GradientDirection.Bottom**
- **colors**: colors of the linear gradient.
- **repeating**: whether the colors are repeated.
Default value: **false**
Since API version 9, this API is supported in ArkTS widgets.| +| sweepGradient | {
center: [Point](./ts-drawing-components-polygon.md#point),
start?: number \| string,
end?: number \| string,
rotation?: number\|string,
colors: Array<[ColorStop](ts-basic-components-gauge.md#colorstop)>,
repeating?: boolean
} | Sweep gradient, which can sweep around the specified center point in the 0–360 degree range. If the rotation angle exceeds the range, a monochrome color instead of a gradient will be drawn.
- **center**: center point of the sweep gradient, that is, the coordinates relative to the upper left corner of the current component.
- **start**: start point of the sweep gradient.
Default value: **0**
- **end**: end point of the sweep gradient.
Default value: **0**
- **rotation**: rotation angle of the sweep gradient.
Default value: **0**
- **colors**: colors of the sweep gradient.
- **repeating**: whether the colors are repeated.
Default value: **false**
Since API version 9, this API is supported in ArkTS widgets.
**NOTE**
A value less than 0 evaluates to the value **0**. A value greater than 360 evaluates to the value **1**.
When the data type of **start**, **end**, and **rotation** is string, the value **"90"** or **"90%"** is equivalent to **90**.| +| radialGradient | {
center: [Point](./ts-drawing-components-polygon.md#point),
radius: number \| string,
colors: Array<[ColorStop](ts-basic-components-gauge.md#colorstop)>,
repeating?: boolean
} | Radial gradient.
- **center**: center point of the radial gradient, that is, the coordinates relative to the upper left corner of the current component.
- **radius**: radius of the radial gradient.
Value range: [0, +∞)
**NOTE**
A value less than 0 evaluates to the value **0**.
- **colors**: colors of the radial gradient.
- **repeating**: whether the colors are repeated.
Default value: **false**
Since API version 9, this API is supported in ArkTS widgets.| ## Example diff --git a/en/application-dev/reference/errorcodes/Readme-EN.md b/en/application-dev/reference/errorcodes/Readme-EN.md index a9e53ed27e739a1accada2bfd497a7966003ad31..dd7b0dc1e4b1f520b276aa95727c988ce34063cf 100644 --- a/en/application-dev/reference/errorcodes/Readme-EN.md +++ b/en/application-dev/reference/errorcodes/Readme-EN.md @@ -55,7 +55,6 @@ - [Network Connection Management Error Codes](errorcode-net-connection.md) - [Ethernet Connection Error Codes](errorcode-net-ethernet.md) - [Network Sharing Error Codes](errorcode-net-sharing.md) - - [Policy Management Error Codes](errorcode-net-policy.md) - [mDNS Error Codes](errorcode-net-mdns.md) - Connectivity - [Bluetooth Error Codes](errorcode-bluetoothManager.md) diff --git a/en/application-dev/reference/errorcodes/errorcode-i18n.md b/en/application-dev/reference/errorcodes/errorcode-i18n.md index e78abf39b82bf0e4da3f35c0dfc14aaa78e31165..6b269c17442bcd97f5235ac85079356c9964cb46 100644 --- a/en/application-dev/reference/errorcodes/errorcode-i18n.md +++ b/en/application-dev/reference/errorcodes/errorcode-i18n.md @@ -26,7 +26,7 @@ Check whether the parameter type is correct. **Error Message** -Unspported option value. +param value not valid **Description** diff --git a/en/application-dev/reference/errorcodes/errorcode-loglibrary.md b/en/application-dev/reference/errorcodes/errorcode-loglibrary.md new file mode 100644 index 0000000000000000000000000000000000000000..8bfe5c124182b09a65543eb27dfbf3ba085d8e5c --- /dev/null +++ b/en/application-dev/reference/errorcodes/errorcode-loglibrary.md @@ -0,0 +1,24 @@ +# Log Library Error Codes + +> **NOTE** +> +> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md). + +## 21300001 Specified File Not Exist + +**Error Message** + +The specified file does not exist. + +**Description** + +When the **copy**, **move**, or **delete** API is called to perform file operations, the file with the specified name does not exist in the specified type of logs. + +**Possible Cause** + +1. The input file name is incorrect. +2. The file with the input file name does not exist. + +**Procedure** + +Check whether the input file name is correct. diff --git a/en/application-dev/reference/errorcodes/errorcode-multimodalinput.md b/en/application-dev/reference/errorcodes/errorcode-multimodalinput.md index 6933bfcf7075ca21cf7a63959f11059da061ff36..4c269a4a723459598a3f1117b820881619be648f 100644 --- a/en/application-dev/reference/errorcodes/errorcode-multimodalinput.md +++ b/en/application-dev/reference/errorcodes/errorcode-multimodalinput.md @@ -1,4 +1,4 @@ -# Screen Hopping Error Codes +# Screen Hopping Error Codes (To Be Deprecated) > **NOTE** > diff --git a/en/application-dev/reference/errorcodes/errorcode-net-policy.md b/en/application-dev/reference/errorcodes/errorcode-net-policy.md deleted file mode 100644 index 594f498f72ce70daaf714111b411ac704baf0b1c..0000000000000000000000000000000000000000 --- a/en/application-dev/reference/errorcodes/errorcode-net-policy.md +++ /dev/null @@ -1,63 +0,0 @@ -# Policy Management Error Codes - -> **NOTE** -> -> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md). - -## 2100001 Invalid Parameter Value - -**Error Message** - -Invalid parameter value. - -**Description** - -Invalid parameter value - -**Cause** - -The input parameter value is not within the valid value range. - -**Procedure** - -Check whether the input parameter value is within the valid value range. - -## 2100002 Service Connection Failure - -**Error Message** - -Operation failed. Cannot connect to service. - -**Description** - -This error code is reported if a service connection failure occurs. - -**Cause** - -The service is abnormal. - -**Procedure** - -Check whether system services are running properly. - -## 2100003 System Internal Error - -**Error Message** - -System internal error. - -**Description** - -This error code is reported if a system internal error occurs. - -**Cause** - -1. The memory is abnormal. - -2. A null pointer is present. - -**Procedure** - -1. Check whether the memory space is sufficient. If not, clear the memory and try again. - -2. Check whether the system is normal. If not, try again later or restart the device. diff --git a/en/application-dev/reference/js-service-widget-ui/js-service-widget-common-gradient.md b/en/application-dev/reference/js-service-widget-ui/js-service-widget-common-gradient.md index fbfe2c4db91511503d37bba3ad2100a912aee020..2c338d915e21c6a66ba684824739914c86966ff8 100644 --- a/en/application-dev/reference/js-service-widget-ui/js-service-widget-common-gradient.md +++ b/en/application-dev/reference/js-service-widget-ui/js-service-widget-common-gradient.md @@ -33,54 +33,52 @@ background: repeating-linear-gradient(direction/angle, color, color, ...); The color can be specified in any of the following formats: \#ff0000, \#ffff0000, rgb(255, 0, 0), and rgba(255, 0, 0, 1). At least two colors must be specified. -- Parameters +**Parameters** - | Name | Type | Default Value | Mandatory | Description | - | --------- | ---------------------------------------- | ---------------------------- | ---- | ---------------------------------------- | - | direction | to <side-or-corner> <side-or-corner> = [left \| right] \|\| [top \| bottom] | to bottom (gradient from top to bottom)| No | Transition direction. For example, **to left** (gradient from right to left) or **to bottom right** (gradient from upper left corner to lower right corner).| - | angle | <deg> | 180deg | No | Transition direction, which is the angle between the gradient line and the y-axis (in the clockwise direction), with the geometric center of the element being the origin of coordinates and the horizontal axis being the x-axis.| - | color | <color> [<length>\|<percentage>] | - | Yes | Colors among which smooth transitions are rendered. | +| Name | Type | Default Value | Mandatory | Description | +| --------- | ---------------------------------------- | ---------------------------- | ---- | ---------------------------------------- | +| direction | to <side-or-corner> <side-or-corner> = [left \| right] \|\| [top \| bottom] | to bottom (gradient from top to bottom)| No | Transition direction. For example, **to left** (gradient from right to left) or **to bottom right** (gradient from upper left corner to lower right corner).| +| angle | <deg> | 180deg | No | Transition direction, which is the angle between the gradient line and the y-axis (in the clockwise direction), with the geometric center of the element being the origin of coordinates and the horizontal axis being the x-axis.| +| color | <color> [<length>\|<percentage>] | - | Yes | Colors among which smooth transitions are rendered. | -- Example +**Example** - 1. Gradient from top to bottom (default) +1. Gradient from top to bottom (default) - ```css - #gradient { - height: 300px; - width: 600px; - /* Gradient starts from red at the top to green at the bottom. */ - background: linear-gradient(red, #00ff00); - } - ``` + ```css + #gradient { + height: 300px; + width: 600px; + /* Gradient starts from red at the top to green at the bottom. */ + background: linear-gradient(red, #00ff00); + } + ``` - ![111](figures/111.PNG) + ![111](figures/111.PNG) - 2. Gradient at an angle of 45° +2. Gradient at an angle of 45° + ```css + /* Gradient at an angle of 45°, changing from red to green */ + background: linear-gradient(45deg, rgb(255, 0, 0),rgb(0, 255, 0)); + ``` - ```css - /* Gradient at an angle of 45°, changing from red to green */ - background: linear-gradient(45deg, rgb(255, 0, 0),rgb(0, 255, 0)); - ``` + ![222](figures/222.PNG) - ![222](figures/222.PNG) +3. Gradient from left to right - 3. Gradient from left to right + ```css + /* Gradient from left to right, which is available in the 270 px width between the left 90 px and the left 360 px (600*0.6) */ + background: linear-gradient(to right, rgb(255, 0, 0) 90px, rgb(0, 255, 0) 60%); + ``` - ```css - /* Gradient from left to right, which is available in the 270 px width between the left 90 px and the left 360 px (600*0.6) */ - background: linear-gradient(to right, rgb(255, 0, 0) 90px, rgb(0, 255, 0) 60%); - ``` + ![333](figures/333.PNG) +4. Repeating gradient - ![333](figures/333.PNG) + ```css + /* Repeating gradient from left to right, the area of which is 30 px (60 – 30) and the opacity is 0.5 */ + background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30vp,rgba(0, 0, 255, .5) 60vp); + ``` - 4. Repeating gradient - - ```css - /* Repeating gradient from left to right, the area of which is 30 px (60 – 30) and the opacity is 0.5 */ - background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30vp,rgba(0, 0, 255, .5) 60vp); - ``` - - ![444](figures/444.PNG) + ![444](figures/444.PNG) diff --git a/en/application-dev/reference/native-apis/_mind_spore.md b/en/application-dev/reference/native-apis/_mind_spore.md index 7e546e8f958341e55b9f59cd4123b274c78cc0f1..ded41297291a904a08793bd2cd94e2ab667a10a0 100644 --- a/en/application-dev/reference/native-apis/_mind_spore.md +++ b/en/application-dev/reference/native-apis/_mind_spore.md @@ -5,14 +5,6 @@ Provides APIs related to MindSpore Lite model inference. -Copyright 2021 Huawei Technologies Co., Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - -[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - \@Syscap SystemCapability.Ai.MindSpore **Since:** diff --git a/en/application-dev/task-management/transient-task-dev-guide.md b/en/application-dev/task-management/transient-task-dev-guide.md index a83ba2094138e2271f55758484f483a9a7ddbaed..cb540210efac85a45f709b878b6b85dcf9024084 100644 --- a/en/application-dev/task-management/transient-task-dev-guide.md +++ b/en/application-dev/task-management/transient-task-dev-guide.md @@ -6,7 +6,7 @@ By default, an application can run for a period of 6 to 12 seconds after it swit You are advised not to call the [requestSuspendDelay()](../reference/apis/js-apis-resourceschedule-backgroundTaskManager.md#backgroundtaskmanagerrequestsuspenddelay) method to apply for delayed suspension after the application is running in the background. Instead, you need to call this interface to declare the execution time of the extended application to the system before performing any time-consuming operation. It is recommended that an application calls [requestSuspendDelay()](../reference/apis/js-apis-resourceschedule-backgroundTaskManager.md#backgroundtaskmanagerrequestsuspenddelay) when it is running in the foreground, so as not to affect the transient task quota of the application. -An application can obtain the remaining duration before being suspended by calling [getRemainingDelayTime()](../reference/apis/js-apis-resourceschedule-backgroundTaskManager.md#backgroundtaskmanagergetremainingdelaytimecallback). Each application has a daily time quota for transient tasks. Therefore, after the time-consuming task finishes execution, the application should call [cancelSuspendDelay()](../reference/apis/js-apis-resourceschedule-backgroundTaskManager.md#backgroundtaskmanagercancelsuspenddelay) to cancel the transient task in a timely manner. +An application can obtain the remaining duration before being suspended by calling [getRemainingDelayTime()](../reference/apis/js-apis-resourceschedule-backgroundTaskManager.md#backgroundtaskmanagergetremainingdelaytime). Each application has a daily time quota for transient tasks. Therefore, after the time-consuming task finishes execution, the application should call [cancelSuspendDelay()](../reference/apis/js-apis-resourceschedule-backgroundTaskManager.md#backgroundtaskmanagercancelsuspenddelay) to cancel the transient task in a timely manner. Typical time-consuming tasks include saving status data to the local database, opening and processing a large file, and synchronizing data to the cloud server. diff --git a/en/application-dev/telephony/telephony-sms.md b/en/application-dev/telephony/telephony-sms.md index 714d2f182b9e5452065db19f171b5dc45e522f73..400f06ac804cbbcf5875cdca518dec3cf978cc2a 100644 --- a/en/application-dev/telephony/telephony-sms.md +++ b/en/application-dev/telephony/telephony-sms.md @@ -31,11 +31,11 @@ The Short Messaging Service (SMS) module provides basic SMS management functions | Name | Description | | ------------------------------------------------------------ | ------------------------------------------------------- | -| createMessage(pdu: Array, specification: string, callback: AsyncCallback): void | Creates an SMS message instance based on the PDU and the specified SMS protocol.| +| createMessage(pdu: Array, specification: string, callback: AsyncCallback\): void | Creates an SMS message instance based on the PDU and the specified SMS protocol.| | sendMessage(options: SendMessageOptions): void | Sends text or data SMS messages. | -| getDefaultSmsSlotId(callback: AsyncCallback): void | Obtains the ID of the default SIM card used to send SMS messages. | -| setSmscAddr(slotId: number, smscAddr: string, callback: AsyncCallback): void | Sets the SMSC address based on the specified slot ID. | -| getSmscAddr(slotId: number, callback: AsyncCallback): void | Obtains the SMSC address based on the specified slot ID. | +| getDefaultSmsSlotId(callback: AsyncCallback\): void | Obtains the ID of the default SIM card used to send SMS messages. | +| setSmscAddr(slotId: number, smscAddr: string, callback: AsyncCallback\): void | Sets the SMSC address based on the specified slot ID. | +| getSmscAddr(slotId: number, callback: AsyncCallback\): void | Obtains the SMSC address based on the specified slot ID. | ## How to Develop diff --git a/en/application-dev/ui/arkts-common-components-xcomponent.md b/en/application-dev/ui/arkts-common-components-xcomponent.md new file mode 100644 index 0000000000000000000000000000000000000000..b6bdb5633f2275fda550f7ae2c6c7f75ed420d0f --- /dev/null +++ b/en/application-dev/ui/arkts-common-components-xcomponent.md @@ -0,0 +1,302 @@ +# XComponent + + +As a drawing component, the \<[XComponent](../reference/arkui-ts/ts-basic-components-xcomponent.md)> is usually used to meet relatively complex drawing customization requirements, for example, display of a camera preview stream and drawing of a game image. + + +You can specify the **type** parameter to implement different features. Two options are mainly available for this parameter: **surface** and **component**. + + +With the **\** of the **surface** type, you can pass data to the surface independently owned by it to render the image. + + +With the **\** of the **component** type, you can dynamically load the displayed content. + + +## surface Type + +When the **\** is set to the **surface** type, you can write EGL/OpenGL ES and media data and display it on the **\**. + +You can also have the **\** laid out and rendered together with other components. + +The **\** has an independent surface, which provides a native window for you to create the EGL/OpenGL ES environment on the native (C/C++) side and use the standard OpenGL ES for development. + +In addition, media-related applications (such as videos and cameras) can write data to the surface provided by the **\** to present the corresponding image. + + +## Using EGL/OpenGL ES for Rendering + + +### Key Points of Native Code Development + +OpenHarmony applications use native APIs to implement interactions between JS and C/C++ code. This is also the case with the **\**. For details, see [Using N-APIs in Application Projects](../napi/napi-guidelines.md). + +The type of the file for processing the JS logic on the native side is .so. + +- Each module has a .so file. + +- The .so file is named in the format of lib{moduleName}.so. + + +In the scenario where the **\** is used for standard OpenGL ES development, the content of the **CMAKELists.txt** file is as follows: + + + +``` +cmake_minimum_required(VERSION 3.4.1) +project(XComponent) # Project name + +set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) +# Path for searching for header files +include_directories(${NATIVERENDER_ROOT_PATH} + ${NATIVERENDER_ROOT_PATH}/include + ) + +# Compile the target .so file. SHARED indicates the dynamic library. +add_library(nativerender SHARED + xxx.cpp + ) + +# Search for related libraries (including OpenGL ES libraries and NDK APIs provided by the ). +find_library( EGL-lib + EGL ) + +find_library( GLES-lib + GLESv3 ) + +find_library( libace-lib + ace_ndk.z ) + +# Dependencies required for compiling .so files +target_link_libraries(nativerender PUBLIC ${EGL-lib} ${GLES-lib} ${libace-lib} libace_napi.z.so libc++.a) +``` + + +### Registering the N-API Module + + +```c++ +static napi_value Init(napi_env env, napi_value exports) +{ + // Define the API exposed on the module. + napi_property_descriptor desc[] ={ + DECLARE_NAPI_FUNCTION("changeColor", PluginRender::NapiChangeColor), + }; + // You can mount the native method (PluginRender::NapiChangeColor) to exports through this API. exports is bound to a JS object at the JS layer through the JS engine. + NAPI_CALL(env, napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc)); + return exports; +} + +static napi_module nativerenderModule = { + .nm_version = 1, + .nm_flags = 0, + .nm_filename = nullptr, + .nm_register_func = Init, // Specify the callback for when the corresponding module is loaded. + .nm_modname = "nativerender", // Specify the module name. For -related development, the name must be the same as the value of libraryname in the on ArkTS. + .nm_priv = ((void*)0), + .reserved = { 0 }, +}; + +extern "C" __attribute__((constructor)) void RegisterModule(void) +{ + // Register the SO module. + napi_module_register(&nativerenderModule);c +} +``` + + +### Parsing the NativeXComponent Instance + +**NativeXComponent** provides an instance at the native layer for the **\**, which can be used as a bridge for binding with the **\** at the JS layer. The NDK APIs provided by the **\** depend on this instance. For details about the NDK APIs, see [Native XComponent](../reference/native-apis/_o_h___native_x_component.md). + + +The **NativeXComponent** instance can be obtained by parsing the callback (that is, the **Init** function in [NAPI module registration](#registering-the-n-api-module)) when the module is loaded. + + + +```c++ +{ + // ... + napi_status status; + napi_value exportInstance = nullptr; + OH_NativeXComponent *nativeXComponent = nullptr; + // Parse the attribute of the wrapped NativeXComponent pointer. + status = napi_get_named_property(env, exports, OH_NATIVE_XCOMPONENT_OBJ, &exportInstance); + if (status != napi_ok) { + return false; + } + // Use the napi_unwrap API to parse the NativeXComponent instance pointer. + status = napi_unwrap(env, exportInstance, reinterpret_cast(&nativeXComponent)); + // ... +} +``` + + +### Registering XComponent Callback + +Based on the NativeXComponent pointer obtained by [parsing the NativeXComponent instance](#parsing-the-nativexcomponent-instance), perform callback registration through the **OH_NativeXComponent_RegisterCallback** API. + + + +```c++ +{ + ... + OH_NativeXComponent *nativeXComponent = nullptr; + // Parse the NativeXComponent instance. + + OH_NativeXComponent_Callback callback; + callback->OnSurfaceCreated = OnSurfaceCreatedCB; // Invoked when a surface is successfully created. You can obtain the handle to the native window from this event. + callback->OnSurfaceChanged = OnSurfaceChangedCB; // Invoked when the surface changes. You can obtain the native window handle and XComponent change information from this event. + callback->OnSurfaceDestroyed = OnSurfaceDestroyedCB; // Invoked when the surface is destroyed. You can release resources in this event. + callback->DispatchTouchEvent = DispatchTouchEventCB; // Invoked when a touch event occurs. You can obtain the touch event information from this event. + + OH_NativeXComponent_RegisterCallback(nativeXComponent, callback); + ... +} +``` + + +### Creating the EGL/OpenGL ES Environment + +In the registered **OnSurfaceCreated** callback, you can obtain the handle to the native window (which is essentially the surface independently owned by the **\**). Therefore, you can create the EGL/OpenGL ES environment for your application to start the development of the rendering logic. + + +```c++ +EGLCore* eglCore_; // EGLCore is a class that encapsulates OpenGL-related APIs. +uint64_t width_; +uint64_t height_; +void OnSurfaceCreatedCB(OH_NativeXComponent* component, void* window) +{ + int32_t ret = OH_NativeXComponent_GetXComponentSize(component, window, &width_, &height_); + if (ret === OH_NATIVEXCOMPONENT_RESULT_SUCCESS) { + eglCore_->GLContextInit(window, width_, height_); // Initialize the OpenGL environment. + } +} +``` + + +### ArkTS Syntax + +You can use the **\** to develop EGL/OpenGL ES rendering by using the following code on the ArkTS side: + + +```ts +XComponent({ id: 'xcomponentId1', type: 'surface', libraryname: 'nativerender' }) + .onLoad((context) => {}) + .onDestroy(() => {}) +``` + +- **id**: corresponds to an **\** and must be unique. Generally, you can use the **OH_NativeXComponent_GetXComponentId** API on the native side to obtain the corresponding ID and bind the corresponding **\**. + +- **libraryname**: name of the loaded module, which must be the same as the value of **nm_modname** used when the Napi module is registered on the native side. + + > **NOTE** + > + > An application loads modules to implement cross-language invoking in either of the following modes: + > + > 1. Use the **import** mode of the NAPI. + > + > ```ts + > import nativerender from "libnativerender.so" + > ``` + > + > 2. Use the **\**. + > + > While this mode also uses the NAPI mechanism as the **import** mode, it enables you to use the NDK APIs of the **\**, by having the **NativeXComponent** instance of the **\** exposed to the native layer of the application when the dynamic library is loaded. + +- **onLoad** event + - Trigger time: when the surface of the **\** is prepared. + - **context** parameter: where the native API exposed on the module is mounted. Its usage is similar to the usage of the **context2** instance obtained after the module is directly loaded using **import context2 from "libnativerender.so"**. + - Time sequence: When the **onLoad** event is subject to the surface. The following figure shows the time sequence of the **onLoad** event and the **OnSurfaceCreated** event on the native side. + + ![onLoad](figures/onLoad.png) + +- **onDestroy** event + + Trigger time: when the **\** is destroyed, in the same manner as that when an ArkUI component is destroyed. The following figure shows the time sequence of the **onDestroy** event and the **OnSurfaceDestroyed** event on the native side. + + ![onDestroy](figures/onDestroy.png) + + +### Writing Media Data + +The surface held by the **\** complies with the producer-consumer model. + +In OpenHarmony, components that comply with the producer design, such as the camera and video player, can write data to the surface held by the **\** and display the data through the **\**. + +![picture-1](figures/picture-1.png) + +You can bind the **\** to the **XComponentController** to obtain the surface ID (**surfaceId**, which uniquely identifies a surface) and send it to the corresponding component API. + + +```ts +@State surfaceId:string = ""; +mXComponentController: XComponentController = new XComponentController(); +XComponent({ id: '', type: 'surface', controller: this.mXComponentController }) + .onLoad(() => { + this.surfaceId = this.mXComponentController.getXComponentSurfaceId() + }) +``` + +For details about component APIs, see [AVPlayer](../reference/apis/js-apis-media.md#avplayer9) and [Camera](../reference/apis/js-apis-camera.md). + + +### component Type + +When the **\** is set to the **component** type, you can execute non-UI logic to dynamically load the displayed content. + + +>**NOTE** +> +> When **type** is set to **component**, the **\** functions as a container, where child components are laid out vertically. +> +> - Vertical alignment: [FlexAlign](../reference/arkui-ts/ts-appendix-enums.md#flexalign).Start +> +> - Horizontal alignment: [FlexAlign](../reference/arkui-ts/ts-appendix-enums.md#flexalign).Center +> +> The component does not respond to any events. +> +> Layout changes and event responses can be set by mounting child components. +> +> The non-UI logic written internally needs to be encapsulated in one or more functions. + + +### Example Scenario + + +```ts +@Builder +function addText(label: string): void { + Text(label) + .fontSize(40) +} + +@Entry +@Component +struct Index { + @State message: string = 'Hello XComponent' + @State messageCommon: string = 'Hello World' + build() { + Row() { + Column() { + XComponent({ id: 'xcomponentId-container', type: 'component' }) { + addText(this.message) + Divider() + .margin(4) + .strokeWidth(2) + .color('#F1F3F5') + .width("80%") + Column() { + Text(this.messageCommon) + .fontSize(30) + } + } + } + .width('100%') + } + .height('100%') + } +} +``` + +![en-us_image_0000001511900428](figures/en-us_image_0000001511900428.png) diff --git a/en/application-dev/ui/arkts-drawing-customization-on-canvas.md b/en/application-dev/ui/arkts-drawing-customization-on-canvas.md new file mode 100644 index 0000000000000000000000000000000000000000..7e0e1f79da9c0f26c210a939a54586a09f083832 --- /dev/null +++ b/en/application-dev/ui/arkts-drawing-customization-on-canvas.md @@ -0,0 +1,348 @@ +# Drawing Custom Graphics Using the Canvas + + +**Canvas** provides a canvas component for drawing custom graphics. You can use the **CanvasRenderingContext2D** and **OffscreenCanvasRenderingContext2D** objects to draw graphics on the **Canvas** component. The drawing objects can be basic shapes, text, and images. + + +## Drawing Custom Graphics on the Canvas + +You can draw custom graphics on the canvas in any of the following ways: + + +- Use [CanvasRenderingContext2D](../reference/arkui-ts/ts-canvasrenderingcontext2d.md). + + ```ts + @Entry + @Component + struct CanvasExample1 { + // Configure the parameters of the CanvasRenderingContext2D object, including whether to enable anti-aliasing. The value true indicates that anti-aliasing is enabled. + private settings: RenderingContextSettings = new RenderingContextSettings(true) + // Create a CanvasRenderingContext2D object by calling CanvasRenderingContext2D object in Canvas. + private context: CanvasRenderingContext2D= new CanvasRenderingContext2D(this.settings) + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + // Invoke the CanvasRenderingContext2D object in Canvas. + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + // You can draw content here. + this.context.strokeRect(50, 50, 200, 150); + }) + } + .width('100%') + .height('100%') + } + } + + ``` + + ![2023022793003(1)](figures/2023022793003(1).jpg) + +- Drawing offscreen onto a canvas is a process where content to draw onto the canvas is first drawn in the buffer, and then converted into a picture, and finally the picture is drawn on the canvas. This process increases the drawing efficiency. Specifically, the implementation is as follows: + 1. Use the **transferToImageBitmap** API to create an **ImageBitmap** object for the image that is recently rendered off the screen canvas. + 2. Use the **transferFromImageBitmap** API of the **CanvasRenderingContext2D** object to display the created **ImageBitmap** object. + + For details, see [OffscreenCanvasRenderingContext2D](../reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md). + + ```ts + @Entry + @Component + struct CanvasExample2 { + // Configure the parameters of the CanvasRenderingContext2D and OffscreenCanvasRenderingContext2D objects, including whether to enable anti-aliasing. The value true indicates that anti-aliasing is enabled. + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + // Create an OffscreenCanvasRenderingContext2D object. width indicates the width of the offscreen canvas, and height indicates the height of the offscreen canvas. + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(600, 600, this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + // You can draw content here. + this.offContext.strokeRect(50, 50, 200, 150); + // Display the image rendered by the offscreen drawing value on the common canvas. + let image = this.offContext.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + .width('100%') + .height('100%') + } + } + + ``` + + ![2023022793003(1)](figures/2023022793003(1).jpg) + + >**NOTE** + > + >The APIs called for drawing on the canvas through the **CanvasRenderingContext2D** and **OffscreenCanvasRenderingContext2D** objects are the same. Unless otherwise specified, the value unit of the parameters in these APIs is vp. + +- Before loading the Lottie animation on the canvas, download the Lottie as follows: + + ```ts + import lottie from '@ohos/lottie' + ``` + + For details about the APIs, see [Lottie](../reference/arkui-ts/ts-components-canvas-lottie.md). + + >**NOTE** + > + >Before using Lottie for the first time, run the **ohpm install \@ohos/lottieETS** command in the Terminal window to download Lottie. + + +## Initializing the Canvas Component + +**onReady(event: () => void)** is the event callback when the **Canvas** component initialization is complete. After this event is called, the determined width and height of the **Canvas** component can be obtained. The **CanvasRenderingContext2D** and **OffscreenCanvasRenderingContext2D** objects can then be used to call related APIs to draw graphics. + +```ts +Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() => { + this.context.fillStyle = '#0097D4'; + this.context.fillRect(50, 50, 100, 100); + }) + +``` + +![2023022793350(1)](figures/2023022793350(1).jpg) + + +## Canvas Component Drawing Modes + +Two modes are available for drawing with the **Canvas** component: + +- After the **onReady()** callback of the **Canvas** component is invoked, use the **CanvasRenderingContext2D** and **OffscreenCanvasRenderingContext2D** objects to call related APIs for drawing. + + ```ts + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + this.context.beginPath(); + this.context.moveTo(50, 50); + this.context.lineTo(280, 160); + this.context.stroke(); + }) + ``` + + ![2023022793719(1)](figures/2023022793719(1).jpg) + +- Define an individual **path2d** object to build an ideal path, and then call the **stroke** or **fill** API of the **CanvasRenderingContext2D** and **OffscreenCanvasRenderingContext2D** objects to draw the path. For details, see [Path2D](../reference/arkui-ts/ts-components-canvas-path2d.md). + + ```ts + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + let region = new Path2D(); + region.arc(100, 75, 50, 0, 6.28); + this.context.stroke(region); + }) + ``` + + ![2023022794031(1)](figures/2023022794031(1).jpg) + + +## Common Usage of the Canvas Component + +**OffscreenCanvasRenderingContext2D** and **CanvasRenderingContext2D** provide a large number of attributes and methods, which can be used to draw text and graphics and process pixels. They are the core of the **Canvas** component. Common APIs include [fill](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#fill), [clip](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#clip), and [stroke](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#stroke). In addition, [fillStyle](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#fillstyle), [globalAlpha](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#globalalpha), [strokeStyle](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#strokestyle), and more attributes are provided to spruce up the graphics. This topic describes typical usage of the canvas. + +- Draw a basic shape. + + +You can draw a basic shape by calling APIs such as [arc](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#arc), [ellipse](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#ellipse), and [rect](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#rect). + + ```ts + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + // Draw a rectangle. + this.context.beginPath(); + this.context.rect(100, 50, 100, 100); + this.context.stroke(); + // Draw a circle on the canvas. + this.context.beginPath(); + this.context.arc(150, 250, 50, 0, 6.28); + this.context.stroke(); + // Draw an oval on the canvas. + this.context.beginPath(); + this.context.ellipse(150, 450, 50, 100, Math.PI * 0.25, Math.PI * 0, Math.PI * 2); + this.context.stroke(); + }) + + ``` + +![2023022794521(1)](figures/2023022794521(1).jpg) + +- Draw text. + + You can use APIs such as [fillText](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#filltext) and [strokeText](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#stroketext) to draw text. + + ```ts + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + // Draw filled text on the canvas. + this.context.font = '50px sans-serif'; + this.context.fillText("Hello World!", 50, 100); + // Draw a text stroke on the canvas. + this.context.font = '55px sans-serif'; + this.context.strokeText("Hello World!", 50, 150); + }) + ``` + + ![2023022795105(1)](figures/2023022795105(1).jpg) + +- Draw images and processes image pixel information. + + You can draw an image by calling APIs such as [drawImage](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#drawimage) and [putImageData](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#putimagedata). You can also process image pixel information by calling APIs such as [createImageData](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#createimagedata), [getPixelMap](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#getpixelmap), and [getImageData](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#getimagedata). + + ```ts + @Entry + @Component + struct GetImageData { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(600, 600, this.settings) + private img:ImageBitmap = new ImageBitmap("/common/images/1234.png") + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + // Use the drawImage API to draw an image in the area with the width and height of 130 starting from (0, 0). + this.offContext.drawImage(this.img,0,0,130,130); + // Use the getImageData API to obtain the image data with the width and height of 130 starting from (50, 50). + let imagedata = this.offContext.getImageData(50,50,130,130); + // Use the putImageData API to draw the obtained image data in the area starting from (150, 150). + this.offContext.putImageData(imagedata,150,150); + // Draw the offscreen drawing content to the canvas. + let image = this.offContext.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + .width('100%') + .height('100%') + } + } + ``` + + ![drawimage](figures/drawimage.PNG) + +- Other usage + + **Canvas** also provides other usage. For example, regarding [CanvasGradient](../reference/arkui-ts/ts-components-canvas-canvasgradient.md), you can create a linear gradient with [createLinearGradient](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#createlineargradient) or create a radial gradient with [createRadialGradient](../reference/arkui-ts/ts-canvasrenderingcontext2d.md#createradialgradient), among others. + + ```ts + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + // Create a CanvasGradient object with radial gradient colors. + let grad = this.context.createRadialGradient(200,200,50, 200,200,200) + // Set the gradient color stop for the CanvasGradient object, including the offset and colors. + grad.addColorStop(0.0, '#E87361'); + grad.addColorStop(0.5, '#FFFFF0'); + grad.addColorStop(1.0, '#BDDB69'); + // Fill the rectangle with the CanvasGradient object. + this.context.fillStyle = grad; + this.context.fillRect(0, 0, 400, 400); + }) + ``` + + ![2023022700701(1)](figures/2023022700701(1).jpg) + + +## Example Scenario + +- Draw a basic shape. + + ```ts + @Entry + @Component + struct ClearRect { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + // Set the fill color to blue. + this.context.fillStyle = '#0097D4'; + // Take (50, 50) as the upper left corner and draw a rectangle with the width and height of 200. + this.context.fillRect(50,50,200,200); + // Use (70, 70) as the upper left corner and clear the area with the width of 150 and height of 100. + this.context.clearRect(70,70,150,100); + }) + } + .width('100%') + .height('100%') + } + } + + ``` + + ![2023022701120(1)](figures/2023022701120(1).jpg) + +- Draw an irregular shape. + + ```ts + @Entry + @Component + struct Path2d { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Row() { + Column() { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + // Use the Path2D API to create a pentagon. + let path = new Path2D(); + path.moveTo(150, 50); + path.lineTo(50, 150); + path.lineTo(100, 250); + path.lineTo(200, 250); + path.lineTo(250, 150); + path.closePath(); + // Set the fill color to blue. + this.context.fillStyle = '#0097D4'; + // Draw the pentagon described by Path2D in the canvas in fill mode. + this.context.fill(path); + }) + } + .width('100%') + } + .height('100%') + } + } + ``` + + ![2023032422159](figures/2023032422159.jpg) + diff --git a/en/application-dev/ui/figures/2023022700701(1).jpg b/en/application-dev/ui/figures/2023022700701(1).jpg new file mode 100644 index 0000000000000000000000000000000000000000..53a5dba3a495af6562da8e2bee506c88b0c7d7ba Binary files /dev/null and b/en/application-dev/ui/figures/2023022700701(1).jpg differ diff --git a/en/application-dev/ui/figures/2023022701120(1).jpg b/en/application-dev/ui/figures/2023022701120(1).jpg new file mode 100644 index 0000000000000000000000000000000000000000..950c2ea49f2407f07277f319ec8099cf1e2ce5dd Binary files /dev/null and b/en/application-dev/ui/figures/2023022701120(1).jpg differ diff --git a/en/application-dev/ui/figures/2023022793003(1).jpg b/en/application-dev/ui/figures/2023022793003(1).jpg new file mode 100644 index 0000000000000000000000000000000000000000..5f89a57ecd79bf7f46cc19eb49acf9dbbaaa1edd Binary files /dev/null and b/en/application-dev/ui/figures/2023022793003(1).jpg differ diff --git a/en/application-dev/ui/figures/2023022793350(1).jpg b/en/application-dev/ui/figures/2023022793350(1).jpg new file mode 100644 index 0000000000000000000000000000000000000000..74205f7d264efc72ccac31d2aeb9af7da0255d55 Binary files /dev/null and b/en/application-dev/ui/figures/2023022793350(1).jpg differ diff --git a/en/application-dev/ui/figures/2023022793719(1).jpg b/en/application-dev/ui/figures/2023022793719(1).jpg new file mode 100644 index 0000000000000000000000000000000000000000..328ea27be52901f0aa1e2a77764840c7e14f3e80 Binary files /dev/null and b/en/application-dev/ui/figures/2023022793719(1).jpg differ diff --git a/en/application-dev/ui/figures/2023022794031(1).jpg b/en/application-dev/ui/figures/2023022794031(1).jpg new file mode 100644 index 0000000000000000000000000000000000000000..67104a5b1dfc638e56e7ce322d68e555b009c8a7 Binary files /dev/null and b/en/application-dev/ui/figures/2023022794031(1).jpg differ diff --git a/en/application-dev/ui/figures/2023022794521(1).jpg b/en/application-dev/ui/figures/2023022794521(1).jpg new file mode 100644 index 0000000000000000000000000000000000000000..fef7086bd78fdccf2833994a0824613d8519466a Binary files /dev/null and b/en/application-dev/ui/figures/2023022794521(1).jpg differ diff --git a/en/application-dev/ui/figures/2023022795105(1).jpg b/en/application-dev/ui/figures/2023022795105(1).jpg new file mode 100644 index 0000000000000000000000000000000000000000..e729f45969660af14b82ed8c8e5f3c0b1af0e00c Binary files /dev/null and b/en/application-dev/ui/figures/2023022795105(1).jpg differ diff --git a/en/application-dev/ui/figures/2023032422159.jpg b/en/application-dev/ui/figures/2023032422159.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f9fb080dee7e023179932a79b1d5421f0d91824e Binary files /dev/null and b/en/application-dev/ui/figures/2023032422159.jpg differ diff --git a/en/application-dev/ui/figures/drawimage.PNG b/en/application-dev/ui/figures/drawimage.PNG new file mode 100644 index 0000000000000000000000000000000000000000..f5061126ce9c48cea3cffcef05ecf5ea994735bd Binary files /dev/null and b/en/application-dev/ui/figures/drawimage.PNG differ diff --git a/en/application-dev/ui/figures/en-us_image_0000001511900428.png b/en/application-dev/ui/figures/en-us_image_0000001511900428.png new file mode 100644 index 0000000000000000000000000000000000000000..53fb84e3c75c85055eb4e7a0797dc4600f9dd304 Binary files /dev/null and b/en/application-dev/ui/figures/en-us_image_0000001511900428.png differ diff --git a/en/application-dev/ui/figures/onDestroy.png b/en/application-dev/ui/figures/onDestroy.png new file mode 100644 index 0000000000000000000000000000000000000000..8615ef3b721eab8e90b7602ed20ac9ddd3cb2e07 Binary files /dev/null and b/en/application-dev/ui/figures/onDestroy.png differ diff --git a/en/application-dev/ui/figures/onLoad.png b/en/application-dev/ui/figures/onLoad.png new file mode 100644 index 0000000000000000000000000000000000000000..69c39d25de8323e5b20d5324da322796d051b102 Binary files /dev/null and b/en/application-dev/ui/figures/onLoad.png differ diff --git a/en/application-dev/ui/figures/picture-1.png b/en/application-dev/ui/figures/picture-1.png new file mode 100644 index 0000000000000000000000000000000000000000..85e91bba345c1b0012d0c6f031baa7ee43ef867a Binary files /dev/null and b/en/application-dev/ui/figures/picture-1.png differ diff --git a/en/application-dev/website.md b/en/application-dev/website.md index ce81eabf772ff5954646408aba1cc9b0dadd658d..f8e6f89f51a8ac406def90fb058ce2f80f2d5c73 100644 --- a/en/application-dev/website.md +++ b/en/application-dev/website.md @@ -1289,7 +1289,7 @@ - [@ohos.systemTimer (System Timer)](reference/apis/js-apis-system-timer.md) - [@ohos.wallpaper (Wallpaper)](reference/apis/js-apis-wallpaper.md) - [@ohos.web.webview (Webview)](reference/apis/js-apis-webview.md) - - [console (Log)](reference/apis/js-apis-logs.md) + - [Console](reference/apis/js-apis-logs.md) - [Timer](reference/apis/js-apis-timer.md) - application - [AccessibilityExtensionContext](reference/apis/js-apis-inner-application-accessibilityExtensionContext.md) diff --git a/en/device-dev/subsystems/subsys-boot-init-seccomp.md b/en/device-dev/subsystems/subsys-boot-init-seccomp.md index 33f566d8c2e638d3ec384c3990b046f97dcb628d..9ba6a0ed8a5ce8d3f84515e32de5d7b4fb043141 100644 --- a/en/device-dev/subsystems/subsys-boot-init-seccomp.md +++ b/en/device-dev/subsystems/subsys-boot-init-seccomp.md @@ -1,29 +1,21 @@ # Seccomp Policy Development - ## Overview - ### Introduction - Secure computing mode (Seccomp) is a security mechanism provided by the Linux kernel. In the Linux system, a large number of system calls can be opened to user-mode programs without any restrictions. However, not all of these system calls are necessarily needed for user-mode programs. In this case, abuse of system calls can lead to system threats. For example, if a process has a security vulnerability, an attacker can run a shellcode segment to trigger system calls that are not triggered during normal execution, resulting in privilege escalation or private information leakage. To prevent such security risks, Seccomp limits the scope of system calls that can be used by programs, so as to reduce system exposure and improve security. ### Operating Mechanism +1. Basic mechanism -- Basic mechanism - - Seccomp policies exist in the form of policy files. During compilation and building, a policy file is parsed to generate a source file that contains the BPF instruction policies, and then the source file is compiled into a dynamic policy library. During startup of a user-mode process, Seccomp system calls are invoked to load the BPF instruction policies into the kernel through the dynamic policy library. - -- Basic features + Seccomp policies exist in the form of policy files. During compilation and building, a policy file is parsed to generate a source file that contains the BPF instruction policies, and then the source file is compiled into a dynamic policy library. During startup of a user-mode process, Seccomp system calls are invoked to load the BPF instruction policies into the kernel through the dynamic policy library. - - A child process inherits the Seccomp policies of its parent process. - - After a Seccomp policy is loaded to the kernel during process running, the policy exists in the memory as a singly linked list and cannot be modified. - - Seccomp policies can be set for a process for multiple times. When a process executes a system call, the kernel traverses the policies specified for the nodes in the singly linked list, and then compares the policies to obtain the policy with the highest priority. +2. Basic features + - A child process inherits the Seccomp policies of its parent process. + - After a Seccomp policy is loaded to the kernel during process running, the policy exists in the memory as a singly linked list and cannot be modified. + - Seccomp policies can be set for a process for multiple times. When a process executes a system call, the kernel traverses the policies specified for the nodes in the singly linked list, and then compares the policies to obtain the policy with the highest priority. ### Constraints - -- System restrictions - - The system used must be a standard system, and the options listed below must be enabled in the kernel. You can find the kernel option configuration file of the product in **//kernel/linux/config/{linux_version}/arch/{target_cpu}/configs/**. +- System restrictions
The system used must be a standard system, and the options listed below must be enabled in the kernel. You can find the kernel option configuration file of the product in **//kernel/linux/config/{linux_version}/arch/{target_cpu}/configs/**. ```shell CONFIG_HAVE_ARCH_SECCOMP=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y @@ -32,7 +24,6 @@ Secure computing mode (Seccomp) is a security mechanism provided by the Linux ke ``` - Feature restrictions - - The Seccomp policy for non-privileged processes complies with the baseline blocklist mechanism. - If a process needs to use system calls in the baseline blocklist, the system calls must be declared in the privileged process policy file. - The same Seccomp policy is enabled for all application processes. @@ -40,13 +31,9 @@ Secure computing mode (Seccomp) is a security mechanism provided by the Linux ke - Personalized Seccomp policies can be enabled for the native service processes incubated by the init process. ## Enabling Seccomp - ### When to Use - To meet product security requirements, you can enable Seccomp to limit the scope of system calls that can be invoked by processes. The development procedure below describes how to enable the basic functions and policies of Seccomp. Note that the basic functions must meet the feature restrictions described in [Constraints](#constraints). For details about the basic policy file, see [Policy File Overview](#policy-file-overview). - ### How to Develop - 1. Add the following field to **vendor/Product vendor/Product name/config.json**: ```c "build_seccomp": true @@ -74,18 +61,14 @@ To meet product security requirements, you can enable Seccomp to limit the scope ] } ``` - 2. Perform a full build on the product code to generate an image. ``` ./build.sh --product-name *product name* --ccache --build-target make_all --target-cpu *specified CPU* ``` - 3. Burn the image into the device. ### Debugging and Verification - Check whether Seccomp is enabled for application processes and system service processes. - 1. Run the shell command to obtain the process ID (that is, **target pid**) of the target process. ``` ps -ef | grep xxx @@ -108,34 +91,30 @@ Check whether Seccomp is enabled for application processes and system service pr **Table 1** Description of the Seccomp status | Parameter | Description | | --- | --- | - | Seccomp | Whether Seccomp is enabled.
- **0**: disabled.
- **1**: enabled with the strict mode. Only the read, write, exit, and sigreturn system calls are allowed.
- **2**: enabled with the filter mode. The customized policies can be enabled by loading BPF instruction sets. | + | Seccomp | - **0**: disabled.
- **1**: enabled with the strict mode. Only the read, write, exit, and sigreturn system calls are allowed.
- **2**: enabled with the filter mode. The customized policies can be enabled by loading BPF instruction sets. | | Seccomp_filters | Number of Seccomp policies set for a process. | ## Customizing Seccomp Policies for a Process - ### When to Use - If the basic Seccomp policy has been enabled for a product, you can customize Seccomp policies for native service processes incubated by the init process to adapt to diversified security requirements. In this case, the Seccomp policies of other native service processes remain unchanged. - ### How to Develop 1. Collect statistics on the system calls required by the 32-bit and 64-bit systems by using the static analysis and Strace statistics methods described in [System Call Statistic Methods](#system-call-statistic-methods). In this way, you will obtain the initial Seccomp policy. 2. Write a policy file. For details, see [How to Write a Common Policy File](#how-to-write-a-common-policy-file). 3. Write and build the **BUILD.gn** file. - 1. Store the policy file in the code repository of the service subsystem and create a **BUILD.gn** file. For example, create the **seccomp_policy** folder in the service code repository, and create the policy file and **BUILD.gn** file in the folder. + 1. Store the policy file in the code repository of the service subsystem and create a **BUILD.gn** file. For example, create the **seccomp_policy** folder in the service code repository, and create the policy file and **BUILD.gn** file in the folder. ```shell //path/to/code/seccomp_policy ├── BUILD.gn └── example.seccomp.policy ``` - 2. To parse the policy file and build the policy dynamic library, use the **ohos_prebuilt_seccomp** template to declare the Seccomp policy file path of the process in the **BUILD.gn** file. The **ohos_prebuilt_seccomp** template is defined in the **//base/startup/init/services/modules/seccomp/scripts/seccomp_policy_fixer.gni** file. The following table describes the parameters in the template. **Table 2** Parameters in the ohos_prebuilt_seccomp template | Parameter | Description | | --- | --- | - | sources | Path of the policy configuration file, mandatory. | + | sources | Path of the policy configuration file, mandatory.| | filtername | Filter name, mandatory. The value must be the same as the value of **Services name** in the [boot configuration file](subsys-boot-init-cfg.md) of the process. Otherwise, the attempt to enable Seccomp will fail. This parameter determines the name of the dynamic policy library generated after the build. For example, if **filtername** is set to **xxx**, the name of the dynamic policy library is **libxxx_filter.z.so**. | | process_type | Process type, mandatory. If the process is one incubated by the init process, set this parameter to **system**; if the process is an application process, set this parameter to **app**.| | part_name | Part name, mandatory. | @@ -143,7 +122,7 @@ If the basic Seccomp policy has been enabled for a product, you can customize Se | install_enable | Option specifying whether to install the policy file to the image, mandatory. Set the value to **true**. | | install_images | Installation location in the image, mandatory. | - For example: + Example ```python #Import the template file. import("//base/startup/init/services/modules/seccomp/scripts/seccomp_policy_fixer.gni") @@ -163,7 +142,6 @@ If the basic Seccomp policy has been enabled for a product, you can customize Se install_images = [ "xxxxx" ] } ``` - 3. Add the build target of **xxxx_seccomp_filter** to other **BUILD.gn** files. ```python if (build_seccomp) { @@ -174,12 +152,10 @@ If the basic Seccomp policy has been enabled for a product, you can customize Se ```shell ./build.sh --product-name *product name* --ccache --build-target xxxx_seccomp_filter --target-cpu *specified CPU* ``` - If an error message that contains the following information is reported, the process needs to use the system calls in the baseline blocklist. In such a case, you need to declare the corresponding system call in **privileged_process.seccomp.policy**. For details, see [How to Write a Privileged Process Policy File](#how-to-write-a-privileged-process-policy-file). After the declaration is done, try again until the build is successful. ```shell xx of allow list is in block list ``` - 5. Use the hdc tool to push the dynamic policy library to the device and restart the device. ```shell # Push an appropriate library path based on the installation location in the image. For example, if the image is **system** and the system architecture is 32-bit, the path of the dynamic policy library is **/system/lib/seccomp/**. @@ -187,19 +163,15 @@ If the basic Seccomp policy has been enabled for a product, you can customize Se hdc file send /path/to/libxxx_filter.z.so /path/to/lib(or lib64)/seccomp/ hdc shell reboot ``` - 6. Use the [audit statistics](#audit-statistics) method to check and supplement the Seccomp policies. Repeat steps 4 to 6 until the process can run properly. ### Debugging and Verification - 1. If Seccomp is not enabled for the target process, [check the Seccomp status](#debugging-and-verification) of the target process. 2. If the process is terminated and audit log information is present in the kernel logs, the Seccomp policy is enabled but the policy list is incomplete. You can find an example audit log in [Audit Statistics](#audit-statistics). 3. If the process is not terminated, comment out the system calls (for example, **setuid**) related to the specified uid in the Seccomp policy file. Rebuild the dynamic policy library, push the library to the image, and restart the process. Then, check whether the process is terminated by Seccomp. If the process is terminated, Seccomp has been enabled. ## FAQs - ### How do I determine whether a process termination is caused by Seccomp? - **Symptom** If a process is terminated under certain conditions, how do I determine whether the issue is caused by Seccomp? @@ -235,9 +207,7 @@ Use either of the following methods: ``` ## Reference - ### Seccomp source code directory - ``` base/startup/init/services/modules/seccomp ├── BUILD.gn @@ -259,11 +229,7 @@ base/startup/init/services/modules/seccomp ``` ### Policy File Overview - -- Location - - Basic policy files are stored in **//base/startup/init/services/modules/seccomp/seccomp_policy**. - +- Location
Basic policy files are stored in **//base/startup/init/services/modules/seccomp/seccomp_policy**. - Basic policy files **Table 3** Description of policy files @@ -278,7 +244,6 @@ base/startup/init/services/modules/seccomp | privileged_process.seccomp.policy | Privileged process policy file. If certain processes need to use the system calls on the baseline blocklist, you need to declare the corresponding process identifiers and baseline blocklists in this file.| ### How to Write a Common Policy File - - To declare a configuration item, write **@** followed by the configuration item, for example, **@returnValue**. - Add the content of a configuration item from the next line of this configuration item to the beginning of the next configuration item. - To comment out a line, add a pound sign (#) at the beginning of this line. @@ -333,7 +298,6 @@ swapon;all ``` ### How to Write a Privileged Process Policy File - - To declare a configuration item, write **@** followed by the configuration item, for example, **@allowBlockList**. - Add the content of a configuration item from the next line of this configuration item to the beginning of the next configuration item. - To comment out a line, add a pound sign (#) at the beginning of this line. @@ -362,32 +326,30 @@ swapon;all ``` ### System Call Statistic Methods - **Table 6** Comparison of statistic methods | Statistic Method | Description | Advantage | Disadvantage | | --- | --- | --- | --- | |
Static analysis |
Analyze the ELF disassembly code to obtain the call relationship, collect statistics on the APIs that call the libc library, and then parse the LibC library to obtain the call relationship between the LibC APIs and the system call numbers. In this way, you will obtain the system call numbers used by the ELF file.|
Statistics collection is supported for system calls in abnormal branches. |
Parsing of call relationship is not supported for pointer functions. | -| Strace statistics | Use Strace to trace service processes or test processes when the device is running. During the trace, the invoked system calls are recorded into logs. Collect the logs after the trace is complete, and use a script to parse the logs and generate a Seccomp policy file.| Easy to use. | System calls can be completely collected only when all code branches are traversed. | +| Strace statistics | Use Strace to trace service processes when the device is running. During the trace, the invoked system calls are recorded into logs. Collect the logs after the trace is complete, and use a script to parse the logs and generate a Seccomp policy file.| Easy to use. | System calls can be completely collected only when all code branches are traversed. | | Audit statistics | After the Seccomp policy is enabled for a process, Seccomp intercepts invalid system calls and records audit log information containing the system call numbers into kernel logs. Collect the logs after the trace is complete, and use a script to parse the logs and generate a Seccomp policy file.| This method can be used as a supplement to the preceding methods. | Logs may be lost.
System calls can be completely collected only when all code branches are traversed. | -> **Disclaimer: Using Third-Party Software or Websites** -> -> We may recommend software, information, products, or websites owned or operated by third parties. Such recommendations are usually provided via hyperlinks or other methods to help you access third-party resources.
-> We strive to direct you to useful and trusted resources, but it is beyond our reach to guarantee the software, information, products, or services provided by or at third-party resources, or to track changes in these resources. Therefore, we are unable to assume the responsibility for the compliance, accuracy, and completeness of the content or results of any third-party resources, nor for any loss or damage caused by the use or failure of products or services provided by third-party resources. - #### Static Analysis - 1. Prepare the environment. 1. Prepare a Linux environment. 2. Download the cross compilers arm-linux-musleabi and aarch64-linux-musl. ```shell + wget https://musl.cc/arm-linux-musleabi-cross.tgz + wget https://musl.cc/aarch64-linux-musl-cross.tgz + + tar -zxvf arm-linux-musleabi-cross.tgz + tar -zxvf aarch64-linux-musl-cross.tgz + # Add the tool execution path to the environment variable. export PATH=$PATH:/path/to/arm-linux-musleabi-cross/bin export PATH=$PATH:/path/to/aarch64-linux-musl-cross/bin ``` - 3. Download the OpenHarmony source code. - For details, see [Obtaining Source Code](../get-code/sourcecode-acquire.md). + 3. Download the OpenHarmony source code. For details, see [Obtaining Source Code](../get-code/sourcecode-acquire.md). 2. Compile **seccomp_filter** to obtain the dependency files **libsyscall_to_nr_arm** and **libsyscall_to_nr_arm64**. @@ -399,10 +361,10 @@ swapon;all cp out/*product name* /gen/base/startup/init/services/modules/seccomp/gen_system_filter/libsyscall_to_nr_arm* base/startup/init/services/modules/seccomp/scripts/tools/ ``` -3. Copy the **generate_code_from_policy.py** script file to the tool folder. This script is available at **//base/startup/init/services/modules/seccomp/scripts/**. +3. Copy the **generate_code_from_policy.py** script file to the tool folder. This script file is available at **//base/startup/init/services/modules/seccomp/scripts/**. ```shell # Go to the root directory of the OpenHarmony source code. - cd /root/to/OpenharmonyCode; + cd /root/to/OpenHarmonyCode; # Go to the directory where the **generate_code_from_policy.py** script file is located. cd base/startup/init/services/modules/seccomp/scripts/; # Copy the **generate_code_from_policy.py** script file. @@ -414,22 +376,31 @@ swapon;all ./build.sh --product-name *product file* --ccache --target-cpu arm64 --build-target *target file* ``` -5. Modify the **collect_elf_syscall.py** script file, and change the paths of the objdump and readelf tools to their absolute paths in the Linux environment. The tools are stored in **//prebuilts**, and more particularly, **//prebuilts/clang/ohos/linux-x86_64/15.0.4/llvm/bin**. +5. If full build has not been performed before and the dependent dynamic libraries for step 4 are not in the **//out** directory, copy the related dynamic libraries to the **//out** directory. The following code is for reference only. If other dynamic libraries are involved, copy them in a similar way. + ```shell + # Go to the root directory of the source code. + cd /root/to/OpenHarmonyCode + # Create the **aarch64-linux-ohos** folder in **out/*product name*/lib.unstripped/** to store the dependent dynamic libraries. + mkdir out/*product name*/lib.unstripped/aarch64-linux-ohos + # Copy the related dynamic libraries to the //out directory. + cp prebuilts/clang/ohos/${host_platform_dir}/llvm/lib/clang/${clang_version}/lib/aarch64-linux-ohos/*.so out/*product name*/lib.unstripped/aarch64-linux-ohos/ + cp prebuilts/clang/ohos/${host_platform_dir}/${clang_version}/llvm/lib/aarch64-linux-ohos/*.so out/*product name*/lib.unstripped/aarch64-linux-ohos/ + ``` + +6. Modify the **collect_elf_syscall.py** script file, and change the paths of the objdump and readelf tools to their absolute paths in the Linux environment. This script file is available at **base/startup/init/services/modules/seccomp/scripts/tools/**. The **objdump** and **readelf** tools available at **//prebuilts**. ```python #modified the path of objdump and readelf path def get_obj_dump_path(): - obj_dump_path = '/path/to/prebuilts/clang/ohos/linux-x86_64/15.0.4/llvm/bin/llvm-objdump' + obj_dump_path = '/path/to/llvm-objdump' return obj_dump_path def get_read_elf_path(): - read_elf_path = '/path/to/prebuilts/clang/ohos/linux-x86_64/15.0.4/llvm/bin/llvm-readelf' + read_elf_path = '/path/to/llvm-readelf' return read_elf_path ``` -6. Use the **collect_elf_syscall.py** script file to parse and generate the corresponding policy file **xxx.seccomp.policy**. - - The script file is available at **//base/startup/init/services/modules/seccomp/scripts/tools/**. +7. Use the **collect_elf_syscall.py** script file to parse and generate the corresponding policy file **xxx.seccomp.policy**. **Table 7** Parameters in the collect_elf_syscall.py script file | Parameter | Description | @@ -462,59 +433,10 @@ swapon;all ``` #### Strace Statistics - 1. Use the cross compilers arm-linux-musleabi and aarch64-linux-musl to build the Strace tool for the 32-bit and 64-bit architectures, respectively. -2. [Trace the test process](#tracing-the-test-process) to obtain Strace logs. -3. [Trace the service process](#tracing-the-service-process) to obtain the Strace logs. -4. [Parse Strace logs](#parsing-strace-logs) by using scripts to obtain the Seccomp policy file. - -##### Tracing the Test Process - -1. Push the Strace tool to the device. - ```shell - hdc shell mount -rw -o remount / - hdc file send /path/to/strace /system/bin/ - hdc shell chmod a+x /system/bin/strace - ``` - -2. Modify the local embedded code in the [developer test framework](https://gitee.com/openharmony/testfwk_developer_test) so that Strace is executed in the test suite to trace the test process. - - Modify the **_init_gtest** and **_run_gtest** functions in **src/core/driver/drivers.py** as follows. If a line starts with a plus sign (+), the line is added; if a line starts with a hyphen (-), the line is deleted. - - ```python - --- a/src/core/driver/drivers.py - +++ b/src/core/driver/drivers.py - @@ -500,6 +500,8 @@ class CppTestDriver(IDriver): - "rm -rf %s" % self.config.target_test_path) - self.config.device.execute_shell_command( - "mkdir -p %s" % self.config.target_test_path) - + self.config.device.execute_shell_command( - + "mkdir -p /data/strace") - self.config.device.execute_shell_command( - "mount -o rw,remount,rw /") - if "fuzztest" == self.config.testtype[0]: - @@ -539,10 +541,11 @@ class CppTestDriver(IDriver): - test_para, - seed) - else: - - command = "cd %s; rm -rf %s.xml; chmod +x *; ./%s %s" % ( - + command = "cd %s; rm -rf %s.xml; chmod +x *; strace -ff -o /data/strace/%s.strace.log ./%s %s" % ( - self.config.target_test_path, - filename, - filename, - + filename, - test_para) - else: - coverage_outpath = self.config.coverage_outpath - ``` -3. Execute related service test cases. -4. Obtain Strace logs from **/data/strace** on the device. - ```shell - hdc file recv /data/strace /path/to/base/startup/init/services/modules/seccomp/scripts/tools/ - ``` - +2. [Trace the service process](#tracing-the-service-process) to obtain the Strace logs. +3. [Parse Strace logs](#parsing-strace-logs) by using scripts to obtain the Seccomp policy file. ##### Tracing the Service Process - 1. Modify the embedded code in the init repository. Specifically, add the following content to **//base/startup/init/services/init/init_common_service.c** before executing the **SetSystemseccompPolicy** function to set the Seccomp policy. If the line starts with a plus sign (+), the line is added; if the line starts with a hyphen (-), the line is deleted. **xxxx** must be the same as the value of **Services name** in the [boot configuration file](subsys-boot-init-cfg.md) of the process. ```c --- a/services/init/init_common_service.c @@ -563,7 +485,6 @@ swapon;all ``` ##### Parsing Strace Logs - 1. Copy the dependency files to the Strace log folder for later use. The dependency files are those generated in step 2 in [Static Analysis](#static-analysis). ```shell cp out/*product name* /gen/base/startup/init/services/modules/seccomp/gen_system_filter/libsyscall_to_nr_arm* base/startup/init/services/modules/seccomp/scripts/tools/strace/ @@ -600,7 +521,6 @@ swapon;all ``` #### Audit Statistics - 1. Enable the initial Seccomp policy. For details, see [Customizing Seccomp Policies for a Process](#customizing-seccomp-policies-for-a-process). 2. Obtain logs. 1. Create a folder for storing logs. @@ -636,8 +556,7 @@ swapon;all Example audit log: ```shell - <5>[ 198.963101] audit: type=1326 audit(1659528178.748:27): auid=4294967295 uid=0 gid=1000 ses=4294967295 subj=u:r:appspawn:s0 pid=2704 comm="config_dialog_s" exe="/system/bin/appspawn" sig=31 arch=40000028 syscall= - 208 compat=1 ip=0xf7b79400 code=0x80000000 + <5>[ 198.963101] audit: type=1326 audit(1659528178.748:27): auid=4294967295 uid=0 gid=1000 ses=4294967295 subj=u:r:appspawn:s0 pid=2704 comm="config_dialog_s" exe="/system/bin/appspawn" sig=31 arch=40000028 syscall=208 compat=1 ip=0xf7b79400 code=0x80000000 ``` **Table 9** Key parameters in audit logs | Parameter | Description | @@ -646,7 +565,7 @@ swapon;all | sig | Semaphore. The value **31** indicates **SIGSYS**, which is the signal sent to the process when Seccomp interception occurs. | | arch | Architecture ID. The value **40000028** indicates **arm**, and the value **c00000b7** indicates **arm64**. | | syscall | System call ID. | - | compat | The value **1** indicates the compatibility mode, that is, the arm64 kernel uses arm system calls. | + | compat | The value **1** indicates the compatibility mode, that is, the arm64 kernel uses arm system calls.| 1. Copy the dependency files to the log folder for later use. The dependency files are those generated in step 2 in [Static Analysis](#static-analysis). @@ -659,7 +578,7 @@ swapon;all | Parameter | Description | | --- | --- | | --src-path | Folder for storing log files. It must contain **libsyscall_to_nr_arm** and **libsyscall_to_nr_arm64**. The folder name must not end with a slash (/), for example, **./audit**.| - | --filter-name | Name of the generated policy file. For example, if the input value is **test**, the generated file name is **test.seccomp.policy**. | + | --filter-name | Name of the generated policy file. For example, if the input value is **test**, the generated file name is **test.seccomp.policy**.| ```shell cd base/startup/init/services/modules/seccomp/scripts/tools @@ -667,7 +586,6 @@ swapon;all ``` ### Combining Multiple Policy Files - During [colltatistics on system calls](#system-call-statistic-methods), multiple policy files may be generated. In these policy files, system calls may be repeated or disordered. To solve these problems, you can combine policy files to sort system calls by arm64/arm and by system call number in ascending order. **Table 11** Parameters in the merge_policy.py script file @@ -675,7 +593,6 @@ During [colltatistics on system calls](#system-call-statistic-methods), multiple | --- | --- | | --src-files | Files to be processed, including **libsyscall_to_nr_arm** and **libsyscall_to_nr_arm64**.| | --filter-name | Name of the generated policy file. For example, if the input value is **test**, the generated file name is **test.seccomp.policy**. | - 1. Copy the dependency files to the log folder for later use. ```shell cp out/*product name* /gen/base/startup/init/services/modules/seccomp/gen_system_filter/libsyscall_to_nr_arm* base/startup/init/services/modules/seccomp/scripts/tools/ diff --git a/en/device-dev/subsystems/subsys-boot-init-sysparam.md b/en/device-dev/subsystems/subsys-boot-init-sysparam.md index 0dfc391b06ed14caf4bc5d0e17ce8a4654af723e..af860ca17d428c3f0d9b847dbebd0d2fc3a89fde 100644 --- a/en/device-dev/subsystems/subsys-boot-init-sysparam.md +++ b/en/device-dev/subsystems/subsys-boot-init-sysparam.md @@ -23,7 +23,7 @@ Figure 1 Overview of system parameter operation primitives | get | Obtains the value of a system parameter. | | set | Sets the value of a system parameter. | | wait | Waits for value change of a system parameter synchronously.| -| watch | Observes value change of a system parameter asynchronously.| +| watch | Watches for the value change of a system parameter asynchronously.| #### Parameter Definition @@ -227,7 +227,7 @@ The parameter management subsystem allows you to manage system parameters by run | param get [**key**] | Obtains the system parameter value of the specified key. If no key name is specified, all system parameter values will be returned.| | param set **key value** | Sets the specified value for the specified key.| | param wait **key** **value** | Waits for the system parameter value of the specified key to match the specified value. Fuzzy match is supported. For example, * indicates any value, and val* indicates matching of only the first three val characters.| - | param watch | Observes value change of a system parameter asynchronously.| + | param watch | Watches for the value change of a system parameter asynchronously.| - syspara API mode @@ -244,7 +244,7 @@ The parameter management subsystem allows you to manage system parameters by run | const char\* GetBrand(void) | Obtains the device's brand name.| | const char\* GetMarketName(void) | Obtains the device's marketing name.| | const char\* GetProductSeries(void) | Obtains the device's product series name.| - | const char\* GetProductModel(void) | Obtains the device's authentication model.| + | const char\* GetProductModel(void) | Obtains the device's product model.| | const char\* GetSoftwareModel(void) | Obtains the device's software model.| | const char\* GetHardwareModel(void) | Obtains the device's hardware model.| | const char\* GetHardwareProfile(void) | Obtains the device's hardware profile.| diff --git a/en/device-dev/subsystems/subsys-power-mode-customization.md b/en/device-dev/subsystems/subsys-power-mode-customization.md index 093d13bf1d1526a1d1be67790dd7043f1f8fad92..8903184581d32e8885c9d9ac2a147b4432e99417 100644 --- a/en/device-dev/subsystems/subsys-power-mode-customization.md +++ b/en/device-dev/subsystems/subsys-power-mode-customization.md @@ -4,7 +4,7 @@ ### Introduction -By default, OpenHarmony provides the power mode feature, which offers the following options: normal mode, performance mode, power-saving mode, and ultra power-saving mode. However, the power mode configuration varies according to hardware specifications of different products. To address this issue, OpenHarmony provides the power mode customization function, allowing you to customize power modes depending on your hardware specifications. +By default, OpenHarmony provides the power mode feature, which offers the following options: normal mode, performance mode, power-saving mode, and super power-saving mode. However, the power mode configuration varies according to hardware specifications of different products. To address this issue, OpenHarmony provides the power mode customization function, allowing you to customize power modes depending on your hardware specifications. ### Basic Concepts @@ -16,7 +16,7 @@ OpenHarmony supports the following four power modes, each of which corresponds t - Power-saving mode: power mode that emphasizes on power saving, such as decreasing the system brightness, reducing the screen-off time, and shortening the time for entering sleep mode. -- Ultra power-saving mode: power mode that emphasizes on ultimate power saving, such as greatly decreasing the system brightness, greatly reducing the screen-off time, and greatly shortening the time for entering sleep mode. +- Super power-saving mode: power mode that emphasizes on ultimate power saving, such as greatly decreasing the system brightness, greatly reducing the screen-off time, and greatly shortening the time for entering sleep mode. ### Constraints @@ -59,7 +59,7 @@ The following uses [DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/ma | Normal mode| 600 | | Power-saving mode| 601 | | Performance mode| 602 | - | Ultra power-saving mode| 603 | + | Super power-saving mode| 603 | The **switch** node is used to configure items of the power mode. @@ -243,9 +243,9 @@ The following uses [DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/ma 4. Turn on the screen. If the screen turns off after 30 seconds, the setting of the auto sleep time is successful. -5. Set the power mode to the ultra power-saving mode, and verify the setting. +5. Set the power mode to the super power-saving mode, and verify the setting. - 1. Set the power mode to the ultra power-saving mode. + 1. Set the power mode to the super power-saving mode. ```shell power-shell setmode 603 @@ -278,8 +278,6 @@ The following uses [DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/ma ## Reference -During development, you can refer to the [default power mode configuration](https://gitee.com/openharmony/powermgr_power_manager/tree/master/services/native/profile): - -[Default configuration](https://gitee.com/openharmony/powermgr_power_manager/blob/master/services/native/profile/power_mode_config.xml) +During development, you can refer to the [default power mode configuration](https://gitee.com/openharmony/powermgr_power_manager/blob/master/services/native/profile/power_mode_config.xml): Packing path: `/system/etc/power_config/power_mode_config.xml` diff --git a/en/device-dev/subsystems/subsys-thermal_control.md b/en/device-dev/subsystems/subsys-thermal_control.md index a97216aae23fdecff45affb2b3ed9331c8f6d3b2..5dbb6ab4e90a28834d4b7140be7c19a05a262ec7 100644 --- a/en/device-dev/subsystems/subsys-thermal_control.md +++ b/en/device-dev/subsystems/subsys-thermal_control.md @@ -52,7 +52,7 @@ The following uses [DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/ma | name="current" | Charging current control | event | - **1**: event sending enabled
-**0**: event sending disabled| int | 0 or 1| | name="voltage" | Charging voltage control (charging voltage during fast charging and slow charging)| protocol | Supported charging protocols: fast charging (supercharge) and slow charging (buck)| string | sc or buck| | name="voltage" | Charging voltage control | event | - **1**: event sending enabled
-**0**: event sending disabled| int | 0 or 1| - | name="process_ctrl" | Process control (survival status of foreground and background processes)| event | - **1**: event sending enabled
-**0**: event sending disabled| int | 0 or 1| + | name="process_ctrl" | Process control (survival status of foreground and background processes)| event | - **1**: event sending enabled
-**0**: event sending disabled
If this parameter is not set, the value is defaulted to **0**.| int | 0 or 1| | name="shut_down" | Shutdown control (device shutdown)| event | - **1**: event sending enabled
-**0**: event sending disabled| int | 0 or 1| | name="thermallevel" | Thermal level control (thermal level reporting)| event | - **1**: event sending enabled
-**0**: event sending disabled| int | 0 or 1| | name="popup" | Pop-up window control (pop-up window display)| N/A| N/A| N/A| N/A| @@ -67,7 +67,7 @@ The following uses [DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/ma - + @@ -143,13 +143,14 @@ The following uses [DAYU200](https://gitee.com/openharmony/vendor_hihope/tree/ma name: volume uid: 2001,2002 strict: 0 enableEvent: 0 name: current protocol: sc,buck strict: 0 enableEvent: 1 name: voltage protocol: sc,buck strict: 0 enableEvent: 1 - name: process_ctrl params: 32,64,128,256 strict: 0 enableEvent: 0 + name: process_ctrl strict: 0 enableEvent: 0 name: shut_down strict: 0 enableEvent: 0 name: thermallevel strict: 0 enableEvent: 0 name: popup strict: 0 enableEvent: 0 ``` ## Reference + During development, you can refer to the [default thermal control configuration](https://gitee.com/openharmony/powermgr_thermal_manager/blob/master/services/native/profile/thermal_service_config.xml). Packing path: `/vendor/etc/thermal_config/hdf` diff --git a/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelog-web.md b/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelog-web.md index 806f1270619d8aec7e7efcf95f41b7a45cc602e8..aff1454a2ed5fca720e5924f863361a294dacb8f 100644 --- a/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelog-web.md +++ b/en/release-notes/changelogs/OpenHarmony_3.2.10.7/changelog-web.md @@ -465,3 +465,64 @@ Example: } } ``` + +## cl.web.11 Removal of webDebuggingAccess + +The definition of the **webDebuggingAccess** API is inappropriate. This API should take effect for all **Web** instances. In light of this, it is removed and replaced by the new API **setWebDebuggingAccess**. + +**Change Impacts** + +This API must be deprecated and replaced with the **setWebDebuggingAccess** API. + +**Key API/Component Changes** + +| Class| API Type| Declaration| Change Type| +| -- | -- | -- | -- | +|WebAttribute | method | webDebugggingAccess(webDebugggingAccess: boolean): WebAttribute| Deleted| + +**Adaptation Guide** + +Use the new API **setWebDebuggingAccess**. + +## cl.web.12 Adding of setWebDebuggingAccess + +Added the static API **setWebDebuggingAccess** to **WebviewController**. It sets whether to enable web debugging works for all **Web** instances. + +**Change Impacts** + +The original **webDebugggingAccess** API must be replaced with the new API in the application. + +**Key API/Component Changes** + +| Class| API Type| Declaration| Change Type| +| -- | -- | -- | -- | +|webview.WebviewController | method | static setWebDebugggingAccess(webDebugggingAccess: boolean): void| Added| + +**Adaptation Guide** + +The following exemplifies how to enable web debugging: + +```ts +// xxx.ets +import web_webview from '@ohos.web.webview'; + +@Entry +@Component +struct WebComponent { + controller: web_webview.WebviewController = new web_webview.WebviewController(); + + aboutToAppear():void { + try { + web_webview.WebviewController.setWebDebuggingAccess(true); + } catch(error) { + console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); + } + } + + build() { + Column() { + Web({ src: 'www.example.com', controller: this.controller }) + } + } +} +``` diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.2/changelog-web.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.2/changelog-web.md index 0077fba6b1d4332475ea8b8ffca6501333eb3282..26713e17d3561260b45b3b0da193693610e245c7 100644 --- a/en/release-notes/changelogs/OpenHarmony_4.0.2.2/changelog-web.md +++ b/en/release-notes/changelogs/OpenHarmony_4.0.2.2/changelog-web.md @@ -1,4 +1,4 @@ -# Web Subsystem ChangeLog +# Web Subsystem Changelog Compared with earlier versions, OpenHarmony 4.0.2.2 has the following API changes in its web subsystem: @@ -22,7 +22,7 @@ Use the new API **setWebDebuggingAccess**. ## cl.web.2 Adding of setWebDebuggingAccess -The static API **setWebDebuggingAccess** is added to **WebviewController**. It sets whether to enable web debugging, and the setting takes effect for all **Web** instances. +Added the static API **setWebDebuggingAccess** to **WebviewController**. It sets whether to enable web debugging works for all **Web** instances. **Change Impacts** @@ -61,5 +61,3 @@ struct WebComponent { } } } - -``` \ No newline at end of file diff --git a/zh-cn/application-dev/application-models/Readme-CN.md b/zh-cn/application-dev/application-models/Readme-CN.md index 9127d61840ae5a458f2a7499979477920f52e557..109f8a03b7c23794c0255d0abb650b3f835cbc44 100644 --- a/zh-cn/application-dev/application-models/Readme-CN.md +++ b/zh-cn/application-dev/application-models/Readme-CN.md @@ -47,7 +47,6 @@ - [根据卡片状态刷新不同内容](arkts-ui-widget-update-by-status.md) - [使用方刷新卡片内容(仅对系统应用开放)](arkts-ui-widget-content-update.md) - [开发基于JS UI的卡片](js-ui-widget-development.md) - - [Stage模型服务卡片相关实例](service-widget-development-samples.md) - [AbilityStage组件容器](abilitystage.md) - [应用上下文Context](application-context-stage.md) - 信息传递载体Want diff --git a/zh-cn/application-dev/application-models/application-component-configuration-stage.md b/zh-cn/application-dev/application-models/application-component-configuration-stage.md index 4765ee6c30a2b15b542cbc017bcaf468bf99f295..7bc5c21d3cfb0d2f780dc84e8923399dd2437d12 100644 --- a/zh-cn/application-dev/application-models/application-component-configuration-stage.md +++ b/zh-cn/application-dev/application-models/application-component-configuration-stage.md @@ -62,7 +62,7 @@ } } ``` - OpenHarmony系统对无图标应用严格管控,防止一些恶意应用故意配置无入口图标,导致用户找不到软件所在的位置,无法操作卸载应用,在一定程度上保证用户的手机安全。 + OpenHarmony系统对无图标应用严格管控,防止一些恶意应用故意配置无入口图标,导致用户找不到软件所在的位置,无法操作卸载应用,在一定程度上保证用户终端设备的安全。 如果应用确需隐藏入口图标,需要配置AllowAppDesktopIconHide应用特权,具体配置方式参考[应用特权配置指南](../../device-dev/subsystems/subsys-app-privilege-config-guide.md)。详细的入口图标及入口标签的显示规则如下。 diff --git a/zh-cn/application-dev/application-models/service-widget-development-samples.md b/zh-cn/application-dev/application-models/service-widget-development-samples.md deleted file mode 100644 index cd2aec33af20cfd20b72c2983b99840626963a2b..0000000000000000000000000000000000000000 --- a/zh-cn/application-dev/application-models/service-widget-development-samples.md +++ /dev/null @@ -1,14 +0,0 @@ -# Stage模型服务卡片相关实例 - - -针对Stage模型卡片提供方的开发,有以下相关实例可供参考: - - -- [基于Stage模型的JS卡片(API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/Widget/FormExtAbility) - -- [基于Stage模型的JS卡片(成语接龙小游戏)(API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/Widget/FormGame) - -- [基于Stage模型的ArkTS卡片(Canvas绘制实现的五子棋游戏卡片)(API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/Widget/ArkTSCard/CanvasGame) - -- [基于Stage模型的ArkTS卡片(逻辑代码执行实现的计算器卡片)(API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/Widget/ArkTSCard/Calculator) - diff --git a/zh-cn/application-dev/application-models/service-widget-overview.md b/zh-cn/application-dev/application-models/service-widget-overview.md index 7123aa6245c617f9aabad8f493d91d87fee5cca7..0625e8d9ac8ed784f18ccebeda5f84057e50085f 100644 --- a/zh-cn/application-dev/application-models/service-widget-overview.md +++ b/zh-cn/application-dev/application-models/service-widget-overview.md @@ -55,3 +55,16 @@ ArkTS卡片与JS卡片具备不同的实现原理及特征,在场景能力上 | 逻辑代码执行(不包含import能力) | 不支持 | 支持 | 推荐在开发需求需要动态能力的卡片时使用ArkTS卡片,因为它拥有更加丰富的能力和适应更多的场景,能够提高效率并实现动态化。但如果只需要静态展示卡片,可以考虑使用JS卡片。 + +# 服务卡片相关实例 + +针对Stage模型卡片提供方的开发,有以下相关实例可供参考: + + +- [基于Stage模型的JS卡片(API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/Widget/FormExtAbility) + +- [基于Stage模型的JS卡片(成语接龙小游戏)(API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/Widget/FormGame) + +- [基于Stage模型的ArkTS卡片(Canvas绘制实现的五子棋游戏卡片)(API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/Widget/ArkTSCard/CanvasGame) + +- [基于Stage模型的ArkTS卡片(逻辑代码执行实现的计算器卡片)(API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/Widget/ArkTSCard/Calculator) diff --git a/zh-cn/application-dev/application-models/serviceextensionability.md b/zh-cn/application-dev/application-models/serviceextensionability.md index 143b7c53190d15f18ad647f278ca9cfb67af42a5..53910c106c132262c4ad4ecdfdf1a26ae24cc09b 100644 --- a/zh-cn/application-dev/application-models/serviceextensionability.md +++ b/zh-cn/application-dev/application-models/serviceextensionability.md @@ -392,7 +392,7 @@ ServiceExtensionAbility服务组件在[onConnect()](../reference/apis/js-apis-ap console.info(TAG, 'getBundleNameByUid: ' + callerBundleName); // 对客户端包名进行识别 if (callerBundleName != 'com.example.connectextapp') { // 识别不通过 - console.info(TAG, 'The caller bundle is not in whitelist, reject'); + console.info(TAG, 'The caller bundle is not in trustlist, reject'); return; } // 识别通过,执行正常业务逻辑 diff --git a/zh-cn/application-dev/application-models/windowextensionability.md b/zh-cn/application-dev/application-models/windowextensionability.md index 2d0cd23f2fe5622afa472bdf60248e14ff61836c..ceb33277174804374eca36ab98786e1c43d148c2 100644 --- a/zh-cn/application-dev/application-models/windowextensionability.md +++ b/zh-cn/application-dev/application-models/windowextensionability.md @@ -1,4 +1,4 @@ -# WindowExtensionAbility +# WindowExtensionAbility(仅对系统应用开放) [WindowExtensionAbility](../reference/apis/js-apis-application-windowExtensionAbility.md)是一种ExtensionAbility组件,用于提供界面组合扩展能力,允许系统应用进行跨应用的界面拉起和嵌入。 @@ -15,7 +15,7 @@ WindowExtensionAbility必须和[AbilityComponent](../reference/arkui-ts/ts-conta > -## 设置一个嵌入式UIAbility(仅对系统应用开放) +## 设置一个嵌入式UIAbility WindowExtensionAbility提供了onConnect()、onDisconnect()和onWindowReady()生命周期回调,根据需要重写对应的回调方法。 @@ -79,7 +79,7 @@ WindowExtensionAbility提供了onConnect()、onDisconnect()和onWindowReady()生 ``` -## 拉起一个嵌入式UIAbility(仅对系统应用开放) +## 拉起一个嵌入式UIAbility 系统应用可以通过AbilityComponent容器加载创建好的WindowExtensionAbility。 diff --git a/zh-cn/application-dev/application-test/arkxtest-guidelines.md b/zh-cn/application-dev/application-test/arkxtest-guidelines.md index f638915e4b248b6cb63c19901cfb5a4db4ccff4e..a7853c68efae3a1f75847e79aae5da8612156282 100644 --- a/zh-cn/application-dev/application-test/arkxtest-guidelines.md +++ b/zh-cn/application-dev/application-test/arkxtest-guidelines.md @@ -1,4 +1,4 @@ -# 自动化测试框架使用指南 +# 自动化测试框架使用指导 ## 概述 diff --git a/zh-cn/application-dev/connectivity/ipc-rpc-overview.md b/zh-cn/application-dev/connectivity/ipc-rpc-overview.md index 9bae7408831c2dceffce76425c579d265fd39f2a..c0bba08366f8167e024bd91162f3c132e4da81fe 100755 --- a/zh-cn/application-dev/connectivity/ipc-rpc-overview.md +++ b/zh-cn/application-dev/connectivity/ipc-rpc-overview.md @@ -7,8 +7,8 @@ IPC(Inter-Process Communication)与RPC(Remote Procedure Call)用于实 > **说明:** > Stage模型不能直接使用本文介绍的IPC和RPC,需要通过以下能力实现相关业务场景: ->- IPC典型使用场景为[后台服务](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/application-models/background-services.md),后台服务通过IPC机制提供跨进程的服务调用能力。 ->- RPC典型使用场景为[多端协同](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/application-models/hop-multi-device-collaboration.md),多端协同通过RPC机制提供远端接口调用与数据传递。 +>- IPC典型使用场景为[后台服务](../application-models/background-services.md),后台服务通过IPC机制提供跨进程的服务调用能力。 +>- RPC典型使用场景为[多端协同](../application-models/hop-multi-device-collaboration.md),多端协同通过RPC机制提供远端接口调用与数据传递。 ## 实现原理 @@ -20,7 +20,7 @@ IPC和RPC通常采用客户端-服务器(Client-Server)模型,在使用时 ## 约束与限制 -- 单个设备上跨进程通信时,传输的数据量最大约为1MB,过大的数据量请使用[匿名共享内存](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-rpc.md#ashmem8)。 +- 单个设备上跨进程通信时,传输的数据量最大约为1MB,过大的数据量请使用[匿名共享内存](../reference/apis/js-apis-rpc.md#ashmem8)。 - 不支持在RPC中订阅匿名Stub对象(没有向SAMgr注册Stub对象)的死亡通知。 diff --git a/zh-cn/application-dev/device/Readme-CN.md b/zh-cn/application-dev/device/Readme-CN.md index a544ccb901e4848a3c15156ee69566e5b53947eb..539afd28b058040e10e38b3262c7466f76e3878a 100644 --- a/zh-cn/application-dev/device/Readme-CN.md +++ b/zh-cn/application-dev/device/Readme-CN.md @@ -9,8 +9,8 @@ - [传感器开发概述](sensor-overview.md) - [传感器开发指导](sensor-guidelines.md) - 振动 - - [振动开发概述](vibrator-overview.md) - - [振动开发指导](vibrator-guidelines.md) + - [Vibrator开发概述](vibrator-overview.md) + - [Vibrator开发指导](vibrator-guidelines.md) - 多模输入 - [输入设备开发指导](inputdevice-guidelines.md) - [鼠标光标开发指导](pointerstyle-guidelines.md) @@ -18,4 +18,4 @@ - [示例服务器开发概述](sample-server-overview.md) - [示例服务器开发指导](sample-server-guidelines.md) - 设备状态 - - [设备状态开发指导](stationary-guidelines.md) + - [Stationary开发指导](stationary-guidelines.md) diff --git a/zh-cn/application-dev/dfx/hilog-guidelines.md b/zh-cn/application-dev/dfx/hilog-guidelines.md index 60e60a5fd3958952bca4859e70bcca440f174a55..201bff782abd9a9822d8ee877391a0c34fbd9546 100644 --- a/zh-cn/application-dev/dfx/hilog-guidelines.md +++ b/zh-cn/application-dev/dfx/hilog-guidelines.md @@ -1,4 +1,4 @@ -# HiLog开发指导 +# HiLog开发指导(Native) ## 概述 HiLog是OpenHarmony日志系统,提供给系统框架、服务、以及应用打印日志,记录用户操作、系统运行状态等。 > **说明:** diff --git a/zh-cn/application-dev/faqs/faqs-arkui-component.md b/zh-cn/application-dev/faqs/faqs-arkui-component.md index f98bc87181a7f8049e91c26adb638f7c62039f49..572d7b1cbe51472ffe64c4d148b10cf6610f50c8 100644 --- a/zh-cn/application-dev/faqs/faqs-arkui-component.md +++ b/zh-cn/application-dev/faqs/faqs-arkui-component.md @@ -256,7 +256,7 @@ controller: TextInputController = new TextInputController() 适用于:OpenHarmony 3.2 Beta5 API 9 -gridCount参数是指弹窗宽度占栅格列数的个数。系统把窗口宽等分,等分的份数即为栅格列数,不同设备栅格列数不同。比如手机屏幕密度值在320vp<=水平宽度<600vp,所以栅格列数是4,则gridCount的有效值在\[1, 4\]。 +gridCount参数是指弹窗宽度占栅格列数的个数。系统把窗口宽等分,等分的份数即为栅格列数,不同设备栅格列数不同。假设设备屏幕密度值在320vp<=水平宽度<600vp,所以栅格列数是4,则gridCount的有效值在\[1, 4\]。 注意:仅采用弹窗默认样式时设置有效。 @@ -391,7 +391,7 @@ Text组件当前文本排列方向固定为横向排列,要设置为竖向排 @Entry @Component struct Index15 { - private message: string = '本文档适用于HarmonyOS应用开发的初学者。通过构建一个简单的具有页面跳转/返回功能的应用,快速了解工程目录的主要文件,熟悉HarmonyOS应用开发流程。'; + private message: string = '本文档适用于应用开发的初学者。通过构建一个简单的具有页面跳转/返回功能的应用,快速了解工程目录的主要文件,熟悉应用开发流程。'; build() { Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap }) { ForEach(this.message.split(''), (item, index) => { diff --git a/zh-cn/application-dev/faqs/faqs-distributed-data-management.md b/zh-cn/application-dev/faqs/faqs-distributed-data-management.md index 990e948258281788f189a759b82832ef4c06493a..fd6227383e841702195f5aeffec3d5f6e5c2279f 100644 --- a/zh-cn/application-dev/faqs/faqs-distributed-data-management.md +++ b/zh-cn/application-dev/faqs/faqs-distributed-data-management.md @@ -77,7 +77,7 @@ PixelMap应该被转换成相应的ArrayBuffer再放进数据库。 **参考链接** -[readPixelsToBuffer](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-image.md#readpixelstobuffer7-1) +[readPixelsToBuffer](../reference/apis/js-apis-image.md#readpixelstobuffer7-1) ## 如何获取rdb关系型数据库文件 diff --git a/zh-cn/application-dev/faqs/faqs-network-management.md b/zh-cn/application-dev/faqs/faqs-network-management.md index 10f16b87af9246232c846b1b2a28f222dfeea38e..782fa86fd87c4c6aa6a8bb6a8860d7a73d21ae23 100644 --- a/zh-cn/application-dev/faqs/faqs-network-management.md +++ b/zh-cn/application-dev/faqs/faqs-network-management.md @@ -133,19 +133,19 @@ this.options = { **解决措施** -启动应用,获取权限后系统会访问远程服务器,将拍摄照片保存在本地,通过上传接口将文件从个人手机传送至远程服务器。 +启动应用,获取权限后系统会访问远程服务器,将拍摄照片保存在本地,通过上传接口将文件从个人设备传送至远程服务器。 **参考链接** [上传下载](../reference/apis/js-apis-request.md) -## 手机网络正常,调用connection.hasDefaultNet\(\)接口失败 +## 设备网络正常,调用connection.hasDefaultNet\(\)接口失败 适用于:OpenHarmony 3.2 Beta API 9 **问题现象** -手机可以上网,浏览器可以正常打开网页,但是hasDefaultNet这个方法调用失败,回调函数走到了失败的回调。 +设备可以上网,浏览器可以正常打开网页,但是hasDefaultNet这个方法调用失败,回调函数走到了失败的回调。 **解决措施** diff --git a/zh-cn/application-dev/faqs/faqs-window-manager.md b/zh-cn/application-dev/faqs/faqs-window-manager.md index be3ac7d14cfe79b8d64d58acda9eb840aeb8636a..f0f4f5644428281e1d4d1235e0cde4e4b7fabdd0 100644 --- a/zh-cn/application-dev/faqs/faqs-window-manager.md +++ b/zh-cn/application-dev/faqs/faqs-window-manager.md @@ -114,7 +114,7 @@ if (windowClass) { **参考链接** -[window.SystemBarProperties](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-window.md#systembarproperties) +[window.SystemBarProperties](../reference/apis/js-apis-window.md#systembarproperties) ## 如何保持屏幕常亮 @@ -124,7 +124,7 @@ if (windowClass) { 设置屏幕常亮,不熄屏。 -获取窗口实例对象后,调用[setWindowKeepScreenOn方法](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-window.md#setwindowkeepscreenon9)可设置屏幕是否常亮。 +获取窗口实例对象后,调用[setWindowKeepScreenOn方法](../reference/apis/js-apis-window.md#setwindowkeepscreenon9)可设置屏幕是否常亮。 ``` let isKeepScreenOn = true; diff --git a/zh-cn/application-dev/file-management/save-user-file.md b/zh-cn/application-dev/file-management/save-user-file.md index ea8bdb6a0dbbdd4f48ea607b12a048cf17cc4b60..8f8353651f769944283ef2e4d5a42649ca1df2f2 100644 --- a/zh-cn/application-dev/file-management/save-user-file.md +++ b/zh-cn/application-dev/file-management/save-user-file.md @@ -7,10 +7,11 @@ ## 保存图片或视频类文件 -1. 导入选择器模块。 +1. 导入选择器模块和文件管理模块。 ```ts import picker from '@ohos.file.picker'; + import fs from '@ohos.file.fs'; ``` 2. 创建图库保存选项实例。 @@ -20,23 +21,25 @@ photoSaveOptions.newFileNames = ["PhotoViewPicker01.jpg"]; // 保存文件名(可选) ``` -3. 创建图库选择器实例,调用[save()](../reference/apis/js-apis-file-picker.md#save)接口拉起FilePicker界面进行文件保存。 - 用户选择目标文件夹,用户选择与文件类型相对应的文件夹,即可完成文件保存操作。保存成功后,返回保存文档的URI。 +3. 创建图库选择器实例,调用[save()](../reference/apis/js-apis-file-picker.md#save)接口拉起FilePicker界面进行文件保存。用户选择目标文件夹,用户选择与文件类型相对应的文件夹,即可完成文件保存操作。保存成功后,返回保存文档的URI。 + +
save返回的URI权限是读写权限,可以根据结果集中URI进行文件读写等操作。注意不能在picker的回调里直接使用此URI进行打开文件操作,需要定义一个全局变量保存URI,使用类似一个按钮去触发打开文件。 ```ts - let uri = null; + let URI = null; const photoViewPicker = new picker.PhotoViewPicker(); photoViewPicker.save(photoSaveOptions).then((photoSaveResult) => { - uri = photoSaveResult[0]; + URI = photoSaveResult[0]; + console.info('photoViewPicker.save to file succeed and URI is:' + URI); }).catch((err) => { - console.error(`Invoke documentPicker.select failed, code is ${err.code}, message is ${err.message}`); + console.error(`Invoke photoViewPicker.save failed, code is ${err.code}, message is ${err.message}`); }) ``` -4. 待界面从FilePicker返回后,在其他函数中使用[fs.openSync](../reference/apis/js-apis-file-fs.md#fsopensync)接口,通过uri打开这个文件得到fd。 +4. 待界面从FilePicker返回后,再通过类似一个按钮调用其他函数,使用[fs.openSync](../reference/apis/js-apis-file-fs.md#fsopensync)接口,通过URI打开这个文件得到fd。这里需要注意接口权限参数是fs.OpenMode.READ_WRITE。 ```ts - let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); + let file = fs.openSync(URI, fs.OpenMode.READ_WRITE); console.info('file fd: ' + file.fd); ``` @@ -50,10 +53,11 @@ ## 保存文档类文件 -1. 导入选择器模块。 +1. 导入选择器模块和文件管理模块。 ```ts import picker from '@ohos.file.picker'; + import fs from '@ohos.file.fs'; ``` 2. 创建文档保存选项实例。 @@ -63,27 +67,25 @@ documentSaveOptions.newFileNames = ["DocumentViewPicker01.txt"]; // 保存文件名(可选) ``` -3. 创建文档选择器实例。调用[save()](../reference/apis/js-apis-file-picker.md#save-3)接口拉起FilePicker界面进行文件保存。 - 用户选择目标文件夹,用户选择与文件类型相对应的文件夹,即可完成文件保存操作。保存成功后,返回保存文档的URI。 - - > **说明:** - > - > 目前DocumentSelectOptions不支持参数配置,默认可以选择所有类型的用户文件。 +3. 创建文档选择器实例。调用[save()](../reference/apis/js-apis-file-picker.md#save-3)接口拉起FilePicker界面进行文件保存。用户选择目标文件夹,用户选择与文件类型相对应的文件夹,即可完成文件保存操作。保存成功后,返回保存文档的URI。 + +
save返回的URI权限是读写权限,可以根据结果集中URI进行文件读写等操作。注意不能在picker的回调里直接使用此URI进行打开文件操作,需要定义一个全局变量保存URI,使用类似一个按钮去触发打开文件。 ```ts - let uri = null; + let URI = null; const documentViewPicker = new picker.DocumentViewPicker(); // 创建文件选择器实例 documentViewPicker.save(documentSaveOptions).then((documentSaveResult) => { - uri = documentSaveResult[0]; + URI = documentSaveResult[0]; + console.info('documentViewPicker.save to file succeed and URI is:' + URI); }).catch((err) => { - console.error(`Invoke documentPicker.save failed, code is ${err.code}, message is ${err.message}`); + console.error(`Invoke documentViewPicker.save failed, code is ${err.code}, message is ${err.message}`); }) ``` -4. 待界面从FilePicker返回后,在其他函数中使用[fs.openSync](../reference/apis/js-apis-file-fs.md#fsopensync)接口,通过uri打开这个文件得到fd。 +4. 待界面从FilePicker返回后,再通过类似一个按钮调用其他函数,使用[fs.openSync](../reference/apis/js-apis-file-fs.md#fsopensync)接口,通过URI打开这个文件得到fd。这里需要注意接口权限参数是fs.OpenMode.READ_WRITE。 ```ts - let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); + let file = fs.openSync(URI, fs.OpenMode.READ_WRITE); console.info('file fd: ' + file.fd); ``` @@ -97,10 +99,11 @@ ## 保存音频类文件 -1. 导入选择器模块。 +1. 导入选择器模块和文件管理模块。 ```ts import picker from '@ohos.file.picker'; + import fs from '@ohos.file.fs'; ``` 2. 创建音频保存选项实例。 @@ -110,26 +113,25 @@ audioSaveOptions.newFileNames = ['AudioViewPicker01.mp3']; // 保存文件名(可选) ``` -3. 创建音频选择器实例。调用[save()](../reference/apis/js-apis-file-picker.md#save-6)接口拉起FilePicker界面进行文件保存。 - 用户选择目标文件夹,用户选择与文件类型相对应的文件夹,即可完成文件保存操作。保存成功后,返回保存文档的URI。 - > **说明:** - > - > 目前AudioSelectOptions不支持参数配置,默认可以选择所有类型的用户文件。 - +3. 创建音频选择器实例。调用[save()](../reference/apis/js-apis-file-picker.md#save-6)接口拉起FilePicker界面进行文件保存。用户选择目标文件夹,用户选择与文件类型相对应的文件夹,即可完成文件保存操作。保存成功后,返回保存文档的URI。 + +
save返回的URI权限是读写权限,可以根据结果集中URI进行文件读写等操作。注意不能在picker的回调里直接使用此URI进行打开文件操作,需要定义一个全局变量保存URI,使用类似一个按钮去触发打开文件。 + ```ts - let uri = null; + let URI = null; const audioViewPicker = new picker.AudioViewPicker(); audioViewPicker.save(audioSaveOptions).then((audioSelectResult) => { - uri = audioSelectResult[0]; + URI = audioSelectResult[0]; + console.info('audioViewPicker.save to file succeed and URI is:' + URI); }).catch((err) => { - console.error(`Invoke audioPicker.select failed, code is ${err.code}, message is ${err.message}`); + console.error(`Invoke audioViewPicker.save failed, code is ${err.code}, message is ${err.message}`); }) ``` -4. 待界面从FilePicker返回后,在其他函数中使用[fs.openSync](../reference/apis/js-apis-file-fs.md#fsopensync)接口,通过uri打开这个文件得到fd。 +4. 待界面从FilePicker返回后,再通过类似一个按钮调用其他函数,使用[fs.openSync](../reference/apis/js-apis-file-fs.md#fsopensync)接口,通过URI打开这个文件得到fd。这里需要注意接口权限参数是fs.OpenMode.READ_WRITE。 ```ts - let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); + let file = fs.openSync(URI, fs.OpenMode.READ_WRITE); console.info('file fd: ' + file.fd); ``` diff --git a/zh-cn/application-dev/file-management/select-user-file.md b/zh-cn/application-dev/file-management/select-user-file.md index 4e42bc7aa0824158eb5c31604e283f66d38568ed..97f507b6d0c5262a1eb0eac22713190fb7786a36 100644 --- a/zh-cn/application-dev/file-management/select-user-file.md +++ b/zh-cn/application-dev/file-management/select-user-file.md @@ -12,10 +12,11 @@ ## 选择图片或视频类文件 -1. 导入选择器模块。 +1. 导入选择器模块和文件管理模块。 ```ts import picker from '@ohos.file.picker'; + import fs from '@ohos.file.fs'; ``` 2. 创建图库选择选项实例。 @@ -32,41 +33,44 @@ photoSelectOptions.maxSelectNumber = 5; // 选择媒体文件的最大数目 ``` -4. 创建图库选择器实例,调用[select()](../reference/apis/js-apis-file-picker.md#select)接口拉起FilePicker界面进行文件选择。 - - 文件选择成功后,返回[PhotoSelectResult](../reference/apis/js-apis-file-picker.md#photoselectresult)结果集,可以根据结果集中URI进行文件读取等操作。 +4. 创建图库选择器实例,调用[select()](../reference/apis/js-apis-file-picker.md#select)接口拉起FilePicker界面进行文件选择。文件选择成功后,返回[PhotoSelectResult](../reference/apis/js-apis-file-picker.md#photoselectresult)结果集。 + +
select返回的URI权限是只读权限,可以根据结果集中URI进行读取文件数据操作。注意不能在picker的回调里直接使用此URI进行打开文件操作,需要定义一个全局变量保存URI,使用类似一个按钮去触发打开文件。 ```ts - let uri = null; - const photoPicker = new picker.PhotoViewPicker(); - photoPicker.select(photoSelectOptions).then((photoSelectResult) => { - uri = photoSelectResult.photoUris[0]; + let URI = null; + const photoViewPicker = new picker.PhotoViewPicker(); + photoViewPicker.select(photoSelectOptions).then((photoSelectResult) => { + URI = photoSelectResult.photoUris[0]; + console.info('photoViewPicker.select to file succeed and URI is:' + URI); }).catch((err) => { - console.error(`Invoke photoPicker.select failed, code is ${err.code}, message is ${err.message}`); + console.error(`Invoke photoViewPicker.select failed, code is ${err.code}, message is ${err.message}`); }) ``` -5. 待界面从FilePicker返回后,在其他函数中使用[fs.openSync](../reference/apis/js-apis-file-fs.md#fsopensync)接口,通过uri打开这个文件得到fd。 +5. 待界面从FilePicker返回后,再通过类似一个按钮调用其他函数,使用[fs.openSync](../reference/apis/js-apis-file-fs.md#fsopensync)接口,通过URI打开这个文件得到fd。这里需要注意接口权限参数是fs.OpenMode.READ_ONLY。 ```ts - let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); + let file = fs.openSync(URI, fs.OpenMode.READ_ONLY); console.info('file fd: ' + file.fd); ``` -6. 通过fd使用[fs.writeSync](../reference/apis/js-apis-file-fs.md#writesync)接口对这个文件进行编辑修改,编辑修改完成后关闭fd。 +6. 通过fd使用[fs.readSync](../reference/apis/js-apis-file-fs.md#readsync)接口读取这个文件内的数据,读取完成后关闭fd。 ```ts - let writeLen = fs.writeSync(file.fd, 'hello, world'); - console.info('write data to file succeed and size is:' + writeLen); + let buffer = new ArrayBuffer(4096); + let readLen = fs.readSync(file.fd, buffer); + console.info('readSync data to file succeed and buffer size is:' + readLen); fs.closeSync(file); ``` ## 选择文档类文件 -1. 导入选择器模块。 +1. 导入选择器模块和文件管理模块。 ```ts import picker from '@ohos.file.picker'; + import fs from '@ohos.file.fs'; ``` 2. 创建文档选择选项实例。 @@ -75,23 +79,24 @@ const documentSelectOptions = new picker.DocumentSelectOptions(); ``` -3. 创建文档选择器实例。调用[select()](../reference/apis/js-apis-file-picker.md#select-3)接口拉起FilePicker界面进行文件选择。 - - 文件选择成功后,返回被选中文档的URI结果集。开发者可以根据结果集中URI做进一步的处理。 - - 例如通过[文件管理接口](../reference/apis/js-apis-file-fs.md)根据URI获取部分文件属性信息,比如文件大小、访问时间、修改时间等。如有获取文件名称需求,请暂时使用[startAbilityForResult](../../application-dev/application-models/uiability-intra-device-interaction.md)获取。 +3. 创建文档选择器实例。调用[select()](../reference/apis/js-apis-file-picker.md#select-3)接口拉起FilePicker界面进行文件选择。文件选择成功后,返回被选中文档的URI结果集。 + +
select返回的URI权限是只读权限,开发者可以根据结果集中URI做进一步的处理。注意不能在picker的回调里直接使用此URI进行打开文件操作,需要定义一个全局变量保存URI,使用类似一个按钮去触发打开文件。 + +
例如通过[文件管理接口](../reference/apis/js-apis-file-fs.md)根据URI获取部分文件属性信息,比如文件大小、访问时间、修改时间等。如有获取文件名称需求,请暂时使用[startAbilityForResult](../../application-dev/application-models/uiability-intra-device-interaction.md)获取。 > **说明:** > > 目前DocumentSelectOptions不支持参数配置,默认可以选择所有类型的用户文件。 ```ts - let uri = null; + let URI = null; const documentViewPicker = new picker.DocumentViewPicker(); // 创建文件选择器实例 documentViewPicker.select(documentSelectOptions).then((documentSelectResult) => { - uri = documentSelectResult[0]; + URI = documentSelectResult[0]; + console.info('documentViewPicker.select to file succeed and URI is:' + URI); }).catch((err) => { - console.error(`Invoke documentPicker.select failed, code is ${err.code}, message is ${err.message}`); + console.error(`Invoke documentViewPicker.select failed, code is ${err.code}, message is ${err.message}`); }) ``` @@ -109,7 +114,7 @@ try { let result = await context.startAbilityForResult(config, {windowMode: 1}); if (result.resultCode !== 0) { - console.error(`DocumentPicker.select failed, code is ${result.resultCode}, message is ${result.want.parameters.message}`); + console.error(`documentViewPicker.select failed, code is ${result.resultCode}, message is ${result.want.parameters.message}`); return; } // 获取到文档文件的URI @@ -117,34 +122,34 @@ // 获取到文档文件的文件名称 let file_name_list = result.want.parameters.file_name_list; } catch (err) { - console.error(`Invoke documentPicker.select failed, code is ${err.code}, message is ${err.message}`); + console.error(`Invoke documentViewPicker.select failed, code is ${err.code}, message is ${err.message}`); } ``` -4. 待界面从FilePicker返回后,在其他函数中使用[fs.openSync](../reference/apis/js-apis-file-fs.md#fsopensync)接口,通过uri打开这个文件得到fd。 +4. 待界面从FilePicker返回后,再通过类似一个按钮调用其他函数,使用[fs.openSync](../reference/apis/js-apis-file-fs.md#fsopensync)接口,通过URI打开这个文件得到fd。这里需要注意接口权限参数是fs.OpenMode.READ_ONLY。 ```ts - let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); + let file = fs.openSync(URI, fs.OpenMode.READ_ONLY); console.info('file fd: ' + file.fd); ``` -5. 通过fd使用[fs.readSync](../reference/apis/js-apis-file-fs.md#readsync)接口对这个文件进行读取数据,读取完成后关闭fd。 +5. 通过fd使用[fs.readSync](../reference/apis/js-apis-file-fs.md#readsync)接口读取这个文件内的数据,读取完成后关闭fd。 ```ts - let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); - let buf = new ArrayBuffer(4096); - let num = fs.readSync(file.fd, buf); - console.info('read data to file succeed and size is:' + num); + let buffer = new ArrayBuffer(4096); + let readLen = fs.readSync(file.fd, buffer); + console.info('readSync data to file succeed and buffer size is:' + readLen); fs.closeSync(file); ``` ## 选择音频类文件 -1. 导入选择器模块。 +1. 导入选择器模块和文件管理模块。 ```ts import picker from '@ohos.file.picker'; + import fs from '@ohos.file.fs'; ``` 2. 创建音频选择选项实例。 @@ -153,37 +158,39 @@ const audioSelectOptions = new picker.AudioSelectOptions(); ``` -3. 创建音频选择器实例。调用[select()](../reference/apis/js-apis-file-picker.md#select-6)接口拉起FilePicker界面进行文件选择。 - - 文件选择成功后,返回被选中音频的URI结果集。开发者可以根据结果集中URI做进一步的处理。 - - 例如通过[文件管理接口](../reference/apis/js-apis-file-fs.md)根据URI拿到音频资源的文件句柄(FD),再配合媒体服务实现音频播放的开发,具体请参考[音频播放开发指导](../media/audio-playback-overview.md)。 +3. 创建音频选择器实例。调用[select()](../reference/apis/js-apis-file-picker.md#select-6)接口拉起FilePicker界面进行文件选择。文件选择成功后,返回被选中音频的URI结果集。 + +
select返回的URI权限是只读权限,开发者可以根据结果集中URI做读取文件数据操作。注意不能在 picker的回调里直接使用此URI进行打开文件操作,需要定义一个全局变量保存URI,使用类似一个按钮去触发打开文件。 + +
例如通过[文件管理接口](../reference/apis/js-apis-file-fs.md)根据URI拿到音频资源的文件句柄(FD),再配合媒体服务实现音频播放的开发,具体请参考[音频播放开发指导](../media/audio-playback-overview.md)。 > **说明:** > > 目前AudioSelectOptions不支持参数配置,默认可以选择所有类型的用户文件。 ```ts - let uri = null; + let URI = null; const audioViewPicker = new picker.AudioViewPicker(); audioViewPicker.select(audioSelectOptions).then(audioSelectResult => { - uri = audioSelectOptions[0]; + URI = audioSelectOptions[0]; + console.info('audioViewPicker.select to file succeed and URI is:' + URI); }).catch((err) => { - console.error(`Invoke audioPicker.select failed, code is ${err.code}, message is ${err.message}`); + console.error(`Invoke audioViewPicker.select failed, code is ${err.code}, message is ${err.message}`); }) ``` -4. 待界面从FilePicker返回后,在其他函数中使用[fs.openSync](../reference/apis/js-apis-file-fs.md#fsopensync)接口,通过uri打开这个文件得到fd。 +4. 待界面从FilePicker返回后,再通过类似一个按钮调用其他函数,使用[fs.openSync](../reference/apis/js-apis-file-fs.md#fsopensync)接口,通过URI打开这个文件得到fd。这里需要注意接口权限参数是fs.OpenMode.READ_ONLY。 ```ts - let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); + let file = fs.openSync(URI, fs.OpenMode.READ_ONLY); console.info('file fd: ' + file.fd); ``` -5. 通过fd使用[fs.writeSync](../reference/apis/js-apis-file-fs.md#writesync)接口对这个文件进行编辑修改,编辑修改完成后关闭fd。 +5. 通过fd使用[fs.readSync](../reference/apis/js-apis-file-fs.md#readsync)接口读取这个文件内的数据,读取完成后关闭fd。 ```ts - let writeLen = fs.writeSync(file.fd, 'hello, world'); - console.info('write data to file succeed and size is:' + writeLen); + let buffer = new ArrayBuffer(4096); + let readLen = fs.readSync(file.fd, buffer); + console.info('readSync data to file succeed and buffer size is:' + readLen); fs.closeSync(file); ``` diff --git a/zh-cn/application-dev/key-features/multi-device-app-dev/appgallery-home-page.md b/zh-cn/application-dev/key-features/multi-device-app-dev/appgallery-home-page.md index 21f0212ff89360a4e7b0c49e12a8ee725551f766..8eba7442a2e8968184a359c05610f986a9f402af 100644 --- a/zh-cn/application-dev/key-features/multi-device-app-dev/appgallery-home-page.md +++ b/zh-cn/application-dev/key-features/multi-device-app-dev/appgallery-home-page.md @@ -1,7 +1,7 @@ # 应用市场首页 -本小节将以应用市场首页为例,介绍如何使用自适应布局能力和响应式布局能力适配不同尺寸窗口。本示例已经在[OpenHarmony应用示例](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/AppMarket)中开源,读者可以根据需要自行下载源码并运行及查看效果。 +本小节将以应用市场首页为例,介绍如何使用自适应布局能力和响应式布局能力适配不同尺寸窗口。 ## 页面设计 @@ -268,4 +268,12 @@ export default struct Home { | -------- | -------- | -------- | | ![zh-cn_image_0000001334345550](figures/zh-cn_image_0000001334345550.jpg) | ![zh-cn_image_0000001385105477](figures/zh-cn_image_0000001385105477.jpg) | ![zh-cn_image_0000001384985569](figures/zh-cn_image_0000001384985569.jpg) | +## 相关实例 + +针对应用市场应用开发,有以下相关实例可以参考: + +应用市场开发:[一多应用市场首页应用示例](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/AppMarket) + + + \ No newline at end of file diff --git a/zh-cn/application-dev/key-features/multi-device-app-dev/music-album-page.md b/zh-cn/application-dev/key-features/multi-device-app-dev/music-album-page.md index 9662322e8d223b3840f6080d7ffb7c14477c9ca6..4e400e55d06d31176c87e3801d6c82519ebc9f07 100644 --- a/zh-cn/application-dev/key-features/multi-device-app-dev/music-album-page.md +++ b/zh-cn/application-dev/key-features/multi-device-app-dev/music-album-page.md @@ -1,7 +1,7 @@ # 音乐专辑页 -本小节将以音乐专辑页为例,介绍如何使用自适应布局能力和响应式布局能力适配不同尺寸窗口。本示例已经在[OpenHarmony应用示例](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/MusicAlbum)中开源,读者可以根据需要自行下载源码并运行及查看效果。 +本小节将以音乐专辑页为例,介绍如何使用自适应布局能力和响应式布局能力适配不同尺寸窗口。 ## 页面设计 @@ -125,7 +125,7 @@ export default struct PlayListCover { ## 歌单列表 -不同断点下,歌单列表的样式基本一致,但sm和md断点下是歌单列表是单列显示,lg断点下是双列显示。可以通过[List组件](https://gitee.com/fanzhaonan/docs/blob/master/zh-cn/application-dev/reference/arkui-ts/ts-container-list.md)的lanes属性实现这一效果。 +不同断点下,歌单列表的样式基本一致,但sm和md断点下是歌单列表是单列显示,lg断点下是双列显示。可以通过[List组件](../../reference/arkui-ts/ts-container-list.md)的lanes属性实现这一效果。 ``` @@ -242,3 +242,10 @@ struct Index { | sm | md | lg | | -------- | -------- | -------- | | ![MusicAlbum_sm_running](figures/MusicAlbum_sm_running.png) | ![MusicAlbum_md_running](figures/MusicAlbum_md_running.png) | ![MusicAlbum_lg_running](figures/MusicAlbum_lg_running.png) | + +## 相关实例 + +针对音乐专辑应用,有以下相关实例可供参考: + +音乐专辑应用:[音乐专辑页应用示例](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/MusicAlbum) + diff --git a/zh-cn/application-dev/key-features/multi-device-app-dev/settings-application-page.md b/zh-cn/application-dev/key-features/multi-device-app-dev/settings-application-page.md index 40ec326319b50820ad9c608128894203959a80bc..9b837b444cf2b582d6169a6bb003a33c018af8ee 100644 --- a/zh-cn/application-dev/key-features/multi-device-app-dev/settings-application-page.md +++ b/zh-cn/application-dev/key-features/multi-device-app-dev/settings-application-page.md @@ -1,7 +1,6 @@ # 设置应用页面 -本小节以“设置”应用页面为例,介绍如何使用自适应布局能力和响应式布局能力适配不同尺寸窗口。本示例已经在[OpenHarmony应用示例](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/Settings)中开源,读者可以根据需要自行下载源码并运行及查看效果。 - +本小节以“设置”应用页面为例,介绍如何使用自适应布局能力和响应式布局能力适配不同尺寸窗口。 ## 页面设计 为充分利用屏幕尺寸优势,应用常常有在小屏设备上单栏显示,大屏设备上左右分两栏显示的设计,设置应用页面设计如下。 @@ -164,3 +163,9 @@ export struct WlanMoreSettingItem { * 激活`WlanSetting`中的`WlanMoreSettingItem`,可以加载及显示`WlanMoreSetting`。 Navigation组件支持自动切换单栏和双栏的显示效果,同时可以根据当前状态自动添加返回键及响应系统的返回键事件。借助Navigation组件,开发者不用关心单栏和双栏场景的差异而更关注于应用本身,极大的减少开发工作量及提高开发效率。 + +## 相关实例 + +针对“设置”应用页面,有以下相关实例可以参考: + +设置:[设置应用示例](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/Settings) diff --git a/zh-cn/application-dev/key-features/multi-device-app-dev/start-with-a-example.md b/zh-cn/application-dev/key-features/multi-device-app-dev/start-with-a-example.md index a20bc3c2e594a40ab62323378add0c66753a4255..74af3ea2bf01a5a7d6216a7c461c240775f27155 100644 --- a/zh-cn/application-dev/key-features/multi-device-app-dev/start-with-a-example.md +++ b/zh-cn/application-dev/key-features/multi-device-app-dev/start-with-a-example.md @@ -78,7 +78,7 @@ ## 页面开发 -天气应用中涉及较多的页面和弹窗,本小节以天气主页为例,简单介绍不同设备下的页面实现思路。天气应用已经在[OpenHarmony应用示例](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/Weather)中开源,感兴趣的读者可以自行下载及了解详细代码实现。 +天气应用中涉及较多的页面和弹窗,本小节以天气主页为例,简单介绍不同设备下的页面实现思路。 观察天气主页在不同设备上的UX设计图,可以进行如下设计: - 将天气主页划分为9个基础区域,如: @@ -272,4 +272,12 @@ struct Home { 在本文的[功能开发的一多能力介绍](development-intro.md)章节中,将详细展开介绍。 +## 相关实例 + +针对天气应用,有以下相关实例可供参考: + +天气应用:[天气应用示例](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/MultiDeviceAppDev/Weather) + + + \ No newline at end of file diff --git a/zh-cn/application-dev/media/Readme-CN.md b/zh-cn/application-dev/media/Readme-CN.md index 1f2d6d43b8c3686432e4b428f11bc023092e8b62..2c02d655deb19ef6b0d2484281dabfd2774a094f 100755 --- a/zh-cn/application-dev/media/Readme-CN.md +++ b/zh-cn/application-dev/media/Readme-CN.md @@ -19,7 +19,7 @@ - [音频录制开发概述](audio-recording-overview.md) - [使用AVRecorder开发音频录制功能](using-avrecorder-for-recording.md) - [使用AudioCapturer开发音频录制功能](using-audiocapturer-for-recording.md) - - [使用OpenSLES开发音频录制功能](using-opensl-es-for-recording.md) + - [使用OpenSL ES开发音频录制功能](using-opensl-es-for-recording.md) - [管理麦克风](mic-management.md) - [音频录制流管理](audio-recording-stream-management.md) - [音频输入设备管理](audio-input-device-management.md) @@ -28,7 +28,7 @@ - [开发音频通话功能](audio-call-development.md) - [视频播放](video-playback.md) - [视频录制](video-recording.md) -- 媒体会话(仅对系统应用开放) +- 媒体会话 - [媒体会话概述](avsession-overview.md) - 本地媒体会话 - [本地媒体会话概述](local-avsession-overview.md) diff --git a/zh-cn/application-dev/media/using-avsession-controller.md b/zh-cn/application-dev/media/using-avsession-controller.md index 9842ff1d21cfba07a39278c158e0ca731beb4afc..9d9fd7d17c3fdb9487ba1cd4bb21047e919845ed 100644 --- a/zh-cn/application-dev/media/using-avsession-controller.md +++ b/zh-cn/application-dev/media/using-avsession-controller.md @@ -26,11 +26,7 @@ OpenHarmony系统预置的播控中心,作为媒体会话控制方与音视频 | -------- | -------- | | getAllSessionDescriptors(callback: AsyncCallback<Array<Readonly<AVSessionDescriptor>>>): void | 获取系统中所有媒体会话的描述符。 | | createController(sessionId: string, callback: AsyncCallback<AVSessionController>): void | 创建媒体会话控制器。 | -| getValidCommands(callback: AsyncCallback<Array<AVControlCommandType>>): void | 获取媒体会话支持的有效命令。
音视频应用在接入媒体会话时监听的播控命令,即为媒体会话支持的有效命令,相关信息请参见[媒体会话提供方监听播控命令事件](using-avsession-developer.md)。 | -| getLaunchAbility(callback: AsyncCallback<WantAgent>): void | 获取媒体会话中配置的可被拉起的UIAbility。
当用户在媒体会话控制方应用进行界面操作,例如点击了播控中心卡片后,可以拉起对应的应用。 | -| sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void | 通过会话对应的AVSessionController向会话发送按键命令。 | -| sendSystemAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void | 向置顶会话发送按键命令。 | -| sendControlCommand(command: AVControlCommand, callback: AsyncCallback<void>): void | 通过会话对应的AVSessionController向会话发送播控命令。 | +| sendSystemAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void | 向置顶会话发送按键命令。 | | sendSystemControlCommand(command: AVControlCommand, callback: AsyncCallback<void>): void | 向置顶会话发送播控命令。 | | getHistoricalSessionDescriptors(maxSize: number, callback: AsyncCallback\>>): void10+ | 获取历史会话的描述符。 | @@ -38,15 +34,15 @@ OpenHarmony系统预置的播控中心,作为媒体会话控制方与音视频 | 接口名 | 说明 | | -------- | -------- | -| getAVPlaybackState(callback: AsyncCallback<AVPlaybackState>): void | 获取当前会话播放状态相关信息。 | -| getAVMetadata(callback: AsyncCallback<AVMetadata>): void | 获取会话元数据。 | -| getOutputDevice(callback: AsyncCallback<OutputDeviceInfo>): void | 获取播放设备信息。 | -| sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void | 发送按键事件到会话。| -| getLaunchAbility(callback: AsyncCallback<WantAgent>): void | 获取应用在会话中保存的WantAgent对象。 | -| isActive(callback: AsyncCallback<boolean>): void | 判断会话是否被激活。 | -| destroy(callback: AsyncCallback<void>): void | 销毁当前控制器,销毁后当前控制器不再可用。 | -| getValidCommands(callback: AsyncCallback<Array<AVControlCommandType>>): void | 获取会话支持的有效命令。 | -| sendControlCommand(command: AVControlCommand, callback: AsyncCallback<void>): void | 通过会话控制器发送命令到其对应的会话。 | +| getAVPlaybackState(callback: AsyncCallback<AVPlaybackState>): void10+ | 获取当前会话播放状态相关信息。 | +| getAVMetadata(callback: AsyncCallback<AVMetadata>): void10+ | 获取会话元数据。 | +| getOutputDevice(callback: AsyncCallback<OutputDeviceInfo>): void10+ | 获取播放设备信息。 | +| sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback<void>): void10+ | 发送按键事件到会话。| +| getLaunchAbility(callback: AsyncCallback<WantAgent>): void10+ | 获取应用在会话中保存的WantAgent对象。 | +| isActive(callback: AsyncCallback<boolean>): void10+ | 判断会话是否被激活。 | +| destroy(callback: AsyncCallback<void>): void10+ | 销毁当前控制器,销毁后当前控制器不再可用。 | +| getValidCommands(callback: AsyncCallback<Array<AVControlCommandType>>): void10+ | 获取会话支持的有效命令。 | +| sendControlCommand(command: AVControlCommand, callback: AsyncCallback<void>): void10+ | 通过会话控制器发送命令到其对应的会话。 | | sendCommonCommand(command: string, args: {[key: string]: Object}, callback: AsyncCallback<void>): void10+ | 通过会话控制器发送自定义命令到其对应的会话。 | | getAVQueueItems(callback: AsyncCallback<Array<AVQueueItem>>): void10+ | 获取当前播放列表相关信息。 | | getAVQueueTitle(callback: AsyncCallback<string>): void10+ | 获取当前播放列表的名称。 | diff --git a/zh-cn/application-dev/media/using-avsession-developer.md b/zh-cn/application-dev/media/using-avsession-developer.md index bc2f22de68aacb7a922461f41753d423eded6338..8d398a9c1043c22f7a1ee21151295566eb57848b 100644 --- a/zh-cn/application-dev/media/using-avsession-developer.md +++ b/zh-cn/application-dev/media/using-avsession-developer.md @@ -16,15 +16,15 @@ | 接口名 | 说明 | | -------- | -------- | -| createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback<AVSession>): void | 创建媒体会话。
一个UIAbility只能存在一个媒体会话,重复创建会失败。 | -| setAVMetadata(data: AVMetadata, callback: AsyncCallback<void>): void | 设置媒体会话元数据。 | -| setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback<void>): void | 设置媒体会话播放状态。 | -| setLaunchAbility(ability: WantAgent, callback: AsyncCallback<void>): void | 设置启动UIAbility。 | -| getController(callback: AsyncCallback<AVSessionController>): void | 获取当前会话自身控制器。 | -| getOutputDevice(callback: AsyncCallback<OutputDeviceInfo>): void | 获取播放设备相关信息。 | -| activate(callback: AsyncCallback<void>): void | 激活媒体会话。 | -| deactivate(callback: AsyncCallback<void>): void | 禁用当前会话。 | -| destroy(callback: AsyncCallback<void>): void | 销毁媒体会话。 | +| createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback<AVSession>): void10+ | 创建媒体会话。
一个UIAbility只能存在一个媒体会话,重复创建会失败。 | +| setAVMetadata(data: AVMetadata, callback: AsyncCallback<void>): void10+ | 设置媒体会话元数据。 | +| setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback<void>): void10+ | 设置媒体会话播放状态。 | +| setLaunchAbility(ability: WantAgent, callback: AsyncCallback<void>): void10+ | 设置启动UIAbility。 | +| getController(callback: AsyncCallback<AVSessionController>): void10+ | 获取当前会话自身控制器。 | +| getOutputDevice(callback: AsyncCallback<OutputDeviceInfo>): void10+ | 获取播放设备相关信息。 | +| activate(callback: AsyncCallback<void>): void10+ | 激活媒体会话。 | +| deactivate(callback: AsyncCallback<void>): void10+ | 禁用当前会话。 | +| destroy(callback: AsyncCallback<void>): void10+ | 销毁媒体会话。 | | setAVQueueItems(items: Array<AVQueueItem>, callback: AsyncCallback<void>): void 10+ | 设置媒体播放列表。 | | setAVQueueTitle(title: string, callback: AsyncCallback<void>): void10+ | 设置媒体播放列表名称。 | | dispatchSessionEvent(event: string, args: {[key: string]: Object}, callback: AsyncCallback<void>): void10+ | 设置会话内自定义事件。 | diff --git a/zh-cn/application-dev/napi/Readme-CN.md b/zh-cn/application-dev/napi/Readme-CN.md index 9af3ee7711908264fc5e071361c3895d632e1265..00b4ee9ef498a402eaeca2a2430d16618246b069 100644 --- a/zh-cn/application-dev/napi/Readme-CN.md +++ b/zh-cn/application-dev/napi/Readme-CN.md @@ -6,4 +6,5 @@ - [Rawfile开发指导](rawfile-guidelines.md) - [NativeWindow开发指导](native-window-guidelines.md) - [使用MindSpore Lite引擎进行模型推理](mindspore-lite-guidelines.md) +- [使用MindSpore Lite进行离线模型的转换及推理](mindspore-lite-offline-model-guidelines.md) - [Neural Network Runtime对接AI推理框架开发指导](neural-network-runtime-guidelines.md) \ No newline at end of file diff --git a/zh-cn/application-dev/napi/introduction.md b/zh-cn/application-dev/napi/introduction.md index 9091080ad5b30e6617a2b5363127a41dbb95c69f..4603c8fd5896c0077a4733b7c504de3c6a00d195 100644 --- a/zh-cn/application-dev/napi/introduction.md +++ b/zh-cn/application-dev/napi/introduction.md @@ -1,4 +1,4 @@ -# Native API 介绍 +# Native API介绍 Native API是OHOS SDK上提供的一组native开发接口与工具集合,方便开发者使用C或者C++语言实现应用的关键功能。Native API只覆盖了OHOS基础的一些底层能力,如libc,图形库,窗口系统,多媒体,压缩库等,并没有完全提供类似于JS API上的完整的OHOS 平台能力。在应用中使用Native API会编译成动态库打包到应用中。 diff --git a/zh-cn/application-dev/napi/mindspore-lite-offline-model-guidelines.md b/zh-cn/application-dev/napi/mindspore-lite-offline-model-guidelines.md new file mode 100644 index 0000000000000000000000000000000000000000..49c15687733f86c97b90dc97a3de08fa95b7f312 --- /dev/null +++ b/zh-cn/application-dev/napi/mindspore-lite-offline-model-guidelines.md @@ -0,0 +1,112 @@ +# 使用MindSpore Lite进行离线模型的转换及推理 + +## 基本概念 + +- MindSpore Lite:OpenHarmony内置AI推理引擎,提供深度学习模型的推理部署能力。 + +- Neural Network Runtime:神经网络运行时,简称NNRt。作为中间桥梁,连通上层 AI 推理框架和底层加速芯片,实现 AI 模型的跨芯片推理计算。 + +- 离线模型:使用硬件厂商的离线模型转换工具转换得到的模型,由硬件厂商负责解析和推理。 + +## 场景介绍 + +常规的MindSpore Lite AI模型部署流程是: +- 开发者首先将三方格式模型(如:ONNX、CAFFE等)用MindSpore Lite模型转换工具,生成.ms模型; +- 然后在代码中调用MindSpore Lite推理引擎接口,执行模型推理。通过指定推理设备为NNRt,可利用系统中的AI硬件加速推理。 + +使用常规的MindSpore Lite + NNRt推理,初始阶段的动态构图会存在一定的模型加载时延。 + +当部署场景对加载时延要求严格时,开发者希望进一步降低加载时延,可采用另一种部署方案——基于离线模型的推理: +- 首先使用AI硬件厂商提供的离线转换工具,预先编译好一个离线模型。 +- 然后使用MindSpore Lite转换工具,将离线模型整体作为黑盒,封装到.ms模型中。 +- 最后将.ms模型输入给MindSpore Lite,执行推理。 + +执行推理时,MindSpore Lite会直接将离线模型传给接入NNRt的 AI 硬件,无需在线构图即可加载,大幅降低模型加载时延,并且可携带额外的硬件特定信息,协助 AI 硬件推理。 + +本文介绍离线模型推理及转换的详细流程。 + +## 约束与限制 + +- 离线模型仅支持在NNRt后端推理,硬件厂商需接入NNRt且支持离线模型推理。 + +## 离线模型转换 + + +### 1、编译转换工具 + +取[MindSpore Lite源码](https://gitee.com/openharmony/third_party_mindspore)。此代码仓采用 “压缩包 + 补丁”的方式管理源码。首先执行以下命令解压源码,打入补丁: +```bash +cd mindspore +python3 build_helper.py --in_zip_path=./mindspore-v1.8.1.zip --patch_dir=./patches/ --out_src_path=./mindspore-src +``` +执行完毕,MindSpore Lite完整源码位于:`mindspore-src/source/`。 + +执行编译: +```bash +cd mindspore-src/source/ +bash build.sh -I x86_64 -j 8 +``` + +编译完成后,可从源码根目录的`output/`子目录取得MindSpore Lite发布件。 + + +### 2、编写转换工具扩展配置文件 + +离线模型本身作为黑盒,转换工具无法解析它得到模型输入输出张量信息,因此需要用户在转换工具的扩展配置文件手动配置。转换工具即可根据此配置,生成封装离线模型的.ms模型文件。 + +扩展配置样例如下: +- 首行[third_party_model]为固定关键词,表明此节为离线模型配置。 +- 下方依次是模型输入输出张量的名称、数据类型、形状、内存格式等信息,每个字段独占一行,先后顺序不限,采用键值对格式。 +- 除数据类型和形状必选外,其它为可选配置。 +- 最后,还提供扩展参数字段,可将离线模型所需的自定义配置用键值对的形式一同封装到.ms文件,在推理时由NNRt传递给AI硬件使用。 + +```text +[third_party_model] +input_names=in_0;in_1 +input_dtypes=float32;float32 +input_shapes=8,256,256;8,256,256,3 +input_formats=NCHW;NCHW +output_names=out_0 +output_dtypes=float32 +output_shapes=8,64 +output_formats=NCHW +extended_parameters=key_foo:value_foo;key_bar:value_bar +``` + +字段说明: + +- `input_names`:[可选]模型输入名称,格式:字符串,多个输入用`;`间隔。 +- `input_dtypes`:[必选]模型输入数据类型,格式:类型,多个输入用`;`间隔。 +- `input_shapes`:[必选]模型输入形状,格式:整数数组,多个输入用`;`间隔。 +- `input_formats`:[可选]模型输入内存布局,格式:字符串,多个输入用`;`间隔,默认值NHWC。 +- `output_names`:[可选]模型输入名称,格式:字符串,多个输入用`;`间隔。 +- `output_dtypes`:[必选]模型输出数据类型,格式:类型,多个输出用`;`间隔。 +- `output_shapes`:[必选]模型输出形状,格式:整数数组,多个输出用`;`间隔。 +- `output_formats`:[可选]模型输出内存布局,格式:字符串,多个输入用`;`间隔,默认值NHWC。 +- `extended_parameters`:[可选]推理硬件自定义配置,字符串键值对格式,会通过NNRt后端传给硬件。 + +### 3、转换离线模型 + +解压上述步骤1编出的压缩包,解压后,转换工具位于`tools/converter/converter/`,进入该目录后执行: + +```bash +export LD_LIBRARY_PATH=${PWD}/../lib +./converter_lite --fmk=THIRDPARTY --modelFile=/path/to/your_model --configFile=/path/to/your_config --outputFile=/path/to/output_model +``` +即可完成离线模型转换。 + +转换参数说明: +- `--fmk`:输入模型的原始格式。`THIRDPARTY`表示输入为离线模型。 +- `--modelFile`: 输入模型的路径。 +- `--configFile`:扩展功能配置文件路径。此处用于离线模型的模型信息配置。 +- `--outputFile`:输出模型的路径。无需加后缀,可自动生成.ms后缀。 + +> **说明:** +> +> 当fmk指定为`THIRDPARTY`,执行离线模型转换,仅以上四个参数和扩展配置文件生效,其它参数配置无效。 + +## 离线模型推理 + +离线模型推理要求推理上下文只能添加NNRt设备,除此之外,与常规的.ms模型推理流程没有区别。 + +详细的MindSpore Lite推理流程请参考:[使用MindSpore Lite引擎进行模型推理](./mindspore-lite-guidelines.md)。 diff --git a/zh-cn/application-dev/napi/napi-guidelines.md b/zh-cn/application-dev/napi/napi-guidelines.md index e2788d6106d55f287f045f51a68841bc44e18b7d..2ffb79d552180b5e1d5b34cd869eaca1adf4eaf2 100644 --- a/zh-cn/application-dev/napi/napi-guidelines.md +++ b/zh-cn/application-dev/napi/napi-guidelines.md @@ -1,4 +1,4 @@ -# N-API在应用工程中的使用指导 +# Native API在应用工程中的使用指导 在OpenHarmony中,C API中的N-API接口可以实现ArkTS/TS/JS与C/C++之间的交互。N-API提供的接口名与三方Node.js一致,目前支持部分接口,支持列表见[链接](https://gitee.com/openharmony/arkui_napi/blob/master/libnapi.ndk.json)。 diff --git a/zh-cn/application-dev/napi/native-window-guidelines.md b/zh-cn/application-dev/napi/native-window-guidelines.md index 0bc953f8d2fb3bdd548feb1d7a5f186afb179e6d..b4ee38bccfb6c83e2dc82e6e25d6020439ca1bb9 100644 --- a/zh-cn/application-dev/napi/native-window-guidelines.md +++ b/zh-cn/application-dev/napi/native-window-guidelines.md @@ -1,4 +1,4 @@ -# NativeWindow 开发指导 +# NativeWindow开发指导 ## 场景介绍 diff --git a/zh-cn/application-dev/napi/rawfile-guidelines.md b/zh-cn/application-dev/napi/rawfile-guidelines.md index f0b38d25a80e23c1a113c5f606cada27efb9c47c..1dc38726a59975b29f52f7275e125176e7a88ff0 100644 --- a/zh-cn/application-dev/napi/rawfile-guidelines.md +++ b/zh-cn/application-dev/napi/rawfile-guidelines.md @@ -1,4 +1,4 @@ -# 资源管理Rawfile开发指导 +# Rawfile开发指导 ## 场景介绍 diff --git a/zh-cn/application-dev/quick-start/Readme-CN.md b/zh-cn/application-dev/quick-start/Readme-CN.md index 854bfcc68ab005c0a58b1dc540d6a22d5fc19c5a..341593b560e8a4a37286e041b0dfb8fd2c320a79 100755 --- a/zh-cn/application-dev/quick-start/Readme-CN.md +++ b/zh-cn/application-dev/quick-start/Readme-CN.md @@ -24,7 +24,7 @@ - [HAR](har-package.md) - HSP - [应用内HSP开发指导](in-app-hsp.md) - - [应用间HSP开发指导(仅对系统应用开放)](cross-app-hsp.md) + - [应用间HSP开发指导](cross-app-hsp.md) - 原子化服务 - [原子化服务开发指导](atomicService.md) - [原子化服务空间管理(仅对系统应用开放)](atomicService-aging.md) diff --git a/zh-cn/application-dev/quick-start/arkts-two-way-sync.md b/zh-cn/application-dev/quick-start/arkts-two-way-sync.md index ad46b5403b94b6fe3ba96fcfc171e301b9f778cf..0624026ebeaa42fe495ad5d26b9b81f5cdd30bb7 100644 --- a/zh-cn/application-dev/quick-start/arkts-two-way-sync.md +++ b/zh-cn/application-dev/quick-start/arkts-two-way-sync.md @@ -4,21 +4,21 @@ $$运算符为系统内置组件提供TS变量的引用,使得TS变量和系统内置组件的内部状态保持同步。 -内部状态具体指什么取决于组件。例如,[bindPopup](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md)属性方法的show参数。 +内部状态具体指什么取决于组件。例如,[bindPopup](../reference/arkui-ts/ts-universal-attributes-popup.md)属性方法的show参数。 ## 使用规则 - 当前$$支持基础类型变量,以及\@State、\@Link和\@Prop装饰的变量。 -- 当前$$仅支持[bindPopup](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md)属性方法的show参数,[Radio](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-radio.md)组件的checked属性,[Refresh](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/arkui-ts/ts-container-refresh.md)组件的refreshing参数。 +- 当前$$仅支持[bindPopup](../reference/arkui-ts/ts-universal-attributes-popup.md)属性方法的show参数,[Radio](../reference/arkui-ts/ts-basic-components-radio.md)组件的checked属性,[Refresh](../reference/arkui-ts/ts-container-refresh.md)组件的refreshing参数。 - $$绑定的变量变化时,会触发UI的同步刷新。 ## 使用示例 -以[bindPopup](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md)属性方法的show参数为例: +以[bindPopup](../reference/arkui-ts/ts-universal-attributes-popup.md)属性方法的show参数为例: ```ts diff --git a/zh-cn/application-dev/quick-start/cross-app-hsp.md b/zh-cn/application-dev/quick-start/cross-app-hsp.md index 4c3339447f1c10cd12d9ba90d521da0212789d87..02441588ba74b9a331d7ec5a64a26991068e2b07 100644 --- a/zh-cn/application-dev/quick-start/cross-app-hsp.md +++ b/zh-cn/application-dev/quick-start/cross-app-hsp.md @@ -170,7 +170,7 @@ struct Index { } ``` -## 应用间HSP的分发方式 +## 应用间HSP的分发方式(仅对系统应用开放) 应用间`HSP`由于并未直接完整的集成到开发者应用中去,所以需要提前预置在系统版本中或者随开发者应用同步安装到设备上,主要有以下两种形式: 1. 随系统发布,部分常用应用间`HSP`会预置在系统版本中。 2. 随应用发布,即用户在应用市场下载应用时,如果应用依赖了一个或者多个应用间`HSP`,同时设备上没有安装这个其依赖的应用间`HSP`时,应用市场会为用户同时下载普通应用以及其依赖的应用间`HSP`。从而保证普通应用能够正常使用共享库的功能。 diff --git a/zh-cn/application-dev/quick-start/module-structure.md b/zh-cn/application-dev/quick-start/module-structure.md index 43fcb6291a53377069b13798978ad01b4a6a7989..158a069aac21be897af26093d5d82d8b39cbfbd8 100644 --- a/zh-cn/application-dev/quick-start/module-structure.md +++ b/zh-cn/application-dev/quick-start/module-structure.md @@ -228,7 +228,7 @@ metadata对象示例: **OpenHarmony中不允许应用隐藏入口图标** -OpenHarmony系统对无图标应用严格管控,防止一些恶意应用故意配置无入口图标,导致用户找不到软件所在的位置,无法操作卸载应用,在一定程度上保证用户的手机安全。 +OpenHarmony系统对无图标应用严格管控,防止一些恶意应用故意配置无入口图标,导致用户找不到软件所在的位置,无法操作卸载应用,在一定程度上保证用户终端设备的安全。 **入口图标的设置:** 需要在配置文件(config.json)中abilities配置下设置icon,label以及skills,而且skills的配置下必须同时包含“ohos.want.action.home” 和 “entity.system.home”。 ``` diff --git a/zh-cn/application-dev/quick-start/multi-hap-principles.md b/zh-cn/application-dev/quick-start/multi-hap-principles.md index 78e9b228052f0ee54ec7217388bfc199bbba8cf0..147f409d987cf47a827382cd62507cc4f2972fd7 100644 --- a/zh-cn/application-dev/quick-start/multi-hap-principles.md +++ b/zh-cn/application-dev/quick-start/multi-hap-principles.md @@ -16,6 +16,6 @@ - 同一进程内的数据通信,请参见[线程间通信](../application-models/thread-model-stage.md)。 -- 跨进程的数据通信,请参见[进程间通信](../application-models/process-model-stage.md)。。 +- 跨进程的数据通信,请参见[进程间通信](../application-models/process-model-stage.md)。 - 多HAP如果运行在同一进程,则多HAP间组件的通信方式与同一HAP内组件的通信方式相同。 diff --git a/zh-cn/application-dev/quick-start/multi-hap-release-deployment.md b/zh-cn/application-dev/quick-start/multi-hap-release-deployment.md index 3fa01718df7eb39c4446365247dc187de27a221d..7f4b1002886c97b67f64608d8e677729af527ef8 100644 --- a/zh-cn/application-dev/quick-start/multi-hap-release-deployment.md +++ b/zh-cn/application-dev/quick-start/multi-hap-release-deployment.md @@ -51,7 +51,7 @@ // 执行结果 uninstall bundle successfully. ``` - 完成HAP安装或更新后,即可参考相关调试命令进行[调试](https://docs.openharmony.cn/pages/v3.2Beta/zh-cn/application-dev/tools/aa-tool.md/)。 + 完成HAP安装或更新后,即可参考相关调试命令进行[调试](../tools/aa-tool.md)。 ## 发布 当开发的程序包满足发布要求时,可以在工具中打包编译生成App包。将该App包上架到应用市场云端,应用市场会对上架的App包校验签名,校验签名通过后会将App包中的HAP拆分出来,同时对拆分出的HAP重新添加签名,然后对HAP进行分发。 diff --git a/zh-cn/application-dev/reference/apis/Readme-CN.md b/zh-cn/application-dev/reference/apis/Readme-CN.md index 54747d3f3df65453d59ae2aed92eb305a88212c3..b090da5f4cc0d468f7312c481f2780832a2426bf 100644 --- a/zh-cn/application-dev/reference/apis/Readme-CN.md +++ b/zh-cn/application-dev/reference/apis/Readme-CN.md @@ -150,6 +150,7 @@ - [通知服务公共事件定义](common_event/commonEvent-ans.md) - [资源调度子系统公共事件定义](common_event/commonEvent-resourceschedule.md) - [电话服务子系统公共事件定义](common_event/commonEvent-telephony.md) + - [USB子系统公共事件定义](common_event/commonEvent-usb.md) - 包管理 - [@ohos.bundle.appControl (appControl模块)](js-apis-appControl.md) - [@ohos.bundle.bundleManager (bundleManager模块)](js-apis-bundleManager.md) @@ -244,7 +245,7 @@ - [PermissionRequestResult](js-apis-permissionrequestresult.md) - 数据管理 - - [@ohos.data.cloudData(端云协同)](js-apis-data-cloudData.md) + - [@ohos.data.cloudData (端云协同)](js-apis-data-cloudData.md) - [@ohos.data.dataAbility (DataAbility谓词)](js-apis-data-ability.md) - [@ohos.data.dataShare (数据共享)](js-apis-data-dataShare.md) - [@ohos.data.dataSharePredicates (数据共享谓词)](js-apis-data-dataSharePredicates.md) @@ -360,7 +361,7 @@ - [@ohos.multimodalInput.mouseEvent (鼠标输入事件)](js-apis-mouseevent.md) - [@ohos.multimodalInput.pointer (鼠标指针)](js-apis-pointer.md) - [@ohos.multimodalInput.touchEvent (触摸输入事件)](js-apis-touchevent.md) - - [@ohos.multimodalInput.shortKey (快捷键)](js-apis-shortKey.md) + - [@ohos.multimodalInput.shortKey(快捷键)](js-apis-shortKey.md) - [@ohos.power (系统电源管理)](js-apis-power.md) - [@ohos.runningLock (Runninglock锁)](js-apis-runninglock.md) - [@ohos.sensor (传感器)](js-apis-sensor.md) @@ -380,16 +381,16 @@ - 定制管理 - [@ohos.configPolicy (配置策略)](js-apis-configPolicy.md) - - [@ohos.enterprise.accountManager (帐户管理)](js-apis-enterprise-accountManager.md) + - [@ohos.enterprise.accountManager(帐户管理)](js-apis-enterprise-accountManager.md) - [@ohos.enterprise.adminManager (企业设备管理)](js-apis-enterprise-adminManager.md) - - [@ohos.enterprise.applicationManager (应用管理)](js-apis-enterprise-applicationManager.md) - - [@ohos.enterprise.bundleManager (包管理)](js-apis-enterprise-bundleManager.md) + - [@ohos.enterprise.applicationManager(应用管理)](js-apis-enterprise-applicationManager.md) + - [@ohos.enterprise.bundleManager(包管理)](js-apis-enterprise-bundleManager.md) - [@ohos.enterprise.dateTimeManager (系统时间管理)](js-apis-enterprise-dateTimeManager.md) - [@ohos.enterprise.deviceControl (设备控制管理)](js-apis-enterprise-deviceControl.md) - - [@ohos.enterprise.deviceInfo (设备信息管理)](js-apis-enterprise-deviceInfo.md) + - [@ohos.enterprise.deviceInfo(设备信息管理)](js-apis-enterprise-deviceInfo.md) - [@ohos.enterprise.EnterpriseAdminExtensionAbility (EnterpriseAdminExtensionAbility)](js-apis-EnterpriseAdminExtensionAbility.md) - - [@ohos.enterprise.networkManager (网络管理)](js-apis-enterprise-networkManager.md) - - [@ohos.enterprise.wifiManager (WiFi管理)](js-apis-enterprise-wifiManager.md) + - [@ohos.enterprise.networkManager(网络管理)](js-apis-enterprise-networkManager.md) + - [@ohos.enterprise.wifiManager(WiFi管理)](js-apis-enterprise-wifiManager.md) - 语言基础类库 - [@ohos.buffer (Buffer)](js-apis-buffer.md) diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-uiAbility.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-uiAbility.md index d0e077b11b74a387882eb8fc9b8e80a49e3bd805..e33b170620886c87350cd2da8a2a907d7e2c9c6d 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-uiAbility.md +++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-uiAbility.md @@ -332,9 +332,9 @@ import AbilityConstant from '@ohos.app.ability.AbilityConstant'; class MyUIAbility extends UIAbility { onShare(wantParams) { console.log('onShare'); - wantParams['ohos.extra.param.key.contentTitle'] = {title: "W3"}; - wantParams['ohos.extra.param.key.shareAbstract'] = {abstract: "communication for huawei employee"}; - wantParams['ohos.extra.param.key.shareUrl'] = {url: "w3.huawei.com"}; + wantParams['ohos.extra.param.key.contentTitle'] = {title: "OA"}; + wantParams['ohos.extra.param.key.shareAbstract'] = {abstract: "communication for company employee"}; + wantParams['ohos.extra.param.key.shareUrl'] = {url: "oa.example.com"}; } } ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-avsession.md b/zh-cn/application-dev/reference/apis/js-apis-avsession.md index ae65d8ce84581984ba17bb741848aa85ecfab023..887bff759d8232ae3d8383012ff72209c3e3ee1b 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-avsession.md +++ b/zh-cn/application-dev/reference/apis/js-apis-avsession.md @@ -4,22 +4,20 @@ 该模块提供以下媒体会话相关的常用功能: -- [AVSession](#avsession) : 会话,可用于设置元数据、播放状态信息等操作。 -- [AVSessionController](#avsessioncontroller): 会话控制器,可用于查看会话ID,完成对会话发送命令及事件,获取会话元数据、播放状态信息等操作。 +- [AVSession](#avsession10) : 会话,可用于设置元数据、播放状态信息等操作。 +- [AVSessionController](#avsessioncontroller10): 会话控制器,可用于查看会话ID,完成对会话发送命令及事件,获取会话元数据、播放状态信息等操作。 > **说明:** > > 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 -> 本模块的所有接口均为系统接口。 - ## 导入模块 ```js import avSession from '@ohos.multimedia.avsession'; ``` -## avSession.createAVSession +## avSession.createAVSession10+ createAVSession(context: Context, tag: string, type: AVSessionType): Promise\ @@ -27,21 +25,19 @@ createAVSession(context: Context, tag: string, type: AVSessionType): Promise\ | Promise对象。回调返回会话实例对象,可用于获取会话ID,以及设置元数据、播放状态,发送按键事件等操作。| +| Promise<[AVSession](#avsession10)\> | Promise对象。回调返回会话实例对象,可用于获取会话ID,以及设置元数据、播放状态,发送按键事件等操作。| **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -67,7 +63,7 @@ await avSession.createAVSession(context, tag, "audio").then((data) => { }); ``` -## avSession.createAVSession +## avSession.createAVSession10+ createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void @@ -75,16 +71,14 @@ createAVSession(context: Context, tag: string, type: AVSessionType, callback: As **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | --------------------------------------- | ---- | ------------------------------------------------------------ | | context| [Context](js-apis-inner-app-context.md) | 是| 应用上下文,提供获取应用程序环境信息的能力。 | | tag | string | 是 | 会话的自定义名称。 | -| type | [AVSessionType](#avsessiontype) | 是 | 会话类型,当前支持音频和视频。 | -| callback | AsyncCallback<[AVSession](#avsession)\> | 是 | 回调函数。回调返回会话实例对象,可用于获取会话ID,以及设置元数据、播放状态,发送按键事件等操作。 | +| type | [AVSessionType](#avsessiontype10) | 是 | 会话类型,当前支持音频和视频。 | +| callback | AsyncCallback<[AVSession](#avsession10)\> | 是 | 回调函数。回调返回会话实例对象,可用于获取会话ID,以及设置元数据、播放状态,发送按键事件等操作。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -309,7 +303,7 @@ createController(sessionId: string): Promise\ | 类型 | 说明 | | ----------------------------------------------------- | ------------------------------------------------------------ | -| Promise<[AVSessionController](#avsessioncontroller)\> | Promise对象。返回会话控制器实例,可查看会话ID,
并完成对会话发送命令及事件,获取元数据、播放状态信息等操作。| +| Promise<[AVSessionController](#avsessioncontroller10)\> | Promise对象。返回会话控制器实例,可查看会话ID,
并完成对会话发送命令及事件,获取元数据、播放状态信息等操作。| **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -361,7 +355,7 @@ createController(sessionId: string, callback: AsyncCallback\ | 是 | 回调函数。返回会话控制器实例,可查看会话ID,
并完成对会话发送命令及事件,获取元数据、播放状态信息等操作。 | +| callback | AsyncCallback<[AVSessionController](#avsessioncontroller10)\> | 是 | 回调函数。返回会话控制器实例,可查看会话ID,
并完成对会话发送命令及事件,获取元数据、播放状态信息等操作。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -760,7 +754,7 @@ sendSystemControlCommand(command: AVControlCommand): Promise\ | 参数名 | 类型 | 必填 | 说明 | | ------- | ------------------------------------- | ---- | ----------------------------------- | -| command | [AVControlCommand](#avcontrolcommand) | 是 | AVSession的相关命令和命令相关参数。 | +| command | [AVControlCommand](#avcontrolcommand10) | 是 | AVSession的相关命令和命令相关参数。 | **返回值:** @@ -819,7 +813,7 @@ sendSystemControlCommand(command: AVControlCommand, callback: AsyncCallback\ | 是 | 回调函数。当命令发送成功,err为undefined,否则返回错误对象。 | **错误码:** @@ -859,17 +853,14 @@ avSession.sendSystemControlCommand(avcommand, function (err) { }); ``` -## AVSession +## AVSession10+ -调用[avSession.createAVSession](#avsessioncreateavsession)后,返回会话的实例,可以获得会话ID,完成设置元数据,播放状态信息等操作。 +调用[avSession.createAVSession](#avsessioncreateavsession10)后,返回会话的实例,可以获得会话ID,完成设置元数据,播放状态信息等操作。 ### 属性 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - - | 名称 | 类型 | 可读 | 可写 | 说明 | | :-------- | :----- | :--- | :--- | :---------------------------- | | sessionId | string | 是 | 否 | AVSession对象唯一的会话标识。 | @@ -880,7 +871,7 @@ avSession.sendSystemControlCommand(avcommand, function (err) { let sessionId = session.sessionId; ``` -### setAVMetadata +### setAVMetadata10+ setAVMetadata(data: AVMetadata): Promise\ @@ -888,13 +879,11 @@ setAVMetadata(data: AVMetadata): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | ------ | ------------------------- | ---- | ------------ | -| data | [AVMetadata](#avmetadata) | 是 | 会话元数据。 | +| data | [AVMetadata](#avmetadata10) | 是 | 会话元数据。 | **返回值:** @@ -936,7 +925,7 @@ session.setAVMetadata(metadata).then(() => { }); ``` -### setAVMetadata +### setAVMetadata10+ setAVMetadata(data: AVMetadata, callback: AsyncCallback\): void @@ -944,13 +933,11 @@ setAVMetadata(data: AVMetadata, callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------- | ---- | ------------------------------------- | -| data | [AVMetadata](#avmetadata) | 是 | 会话元数据。 | +| data | [AVMetadata](#avmetadata10) | 是 | 会话元数据。 | | callback | AsyncCallback\ | 是 | 回调函数。当元数据设置成功,err为undefined,否则返回错误对象。 | **错误码:** @@ -989,7 +976,7 @@ session.setAVMetadata(metadata, function (err) { }); ``` -### setAVPlaybackState +### setAVPlaybackState10+ setAVPlaybackState(state: AVPlaybackState): Promise\ @@ -997,13 +984,11 @@ setAVPlaybackState(state: AVPlaybackState): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | ------ | ----------------------------------- | ---- | ---------------------------------------------- | -| data | [AVPlaybackState](#avplaybackstate) | 是 | 会话播放状态,包括状态、倍数、循环模式等信息。 | +| data | [AVPlaybackState](#avplaybackstate10) | 是 | 会话播放状态,包括状态、倍数、循环模式等信息。 | **返回值:** @@ -1037,7 +1022,7 @@ session.setAVPlaybackState(playbackState).then(() => { }); ``` -### setAVPlaybackState +### setAVPlaybackState10+ setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback\): void @@ -1045,13 +1030,11 @@ setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ----------------------------------- | ---- | ---------------------------------------------- | -| data | [AVPlaybackState](#avplaybackstate) | 是 | 会话播放状态,包括状态、倍数、循环模式等信息。 | +| data | [AVPlaybackState](#avplaybackstate10) | 是 | 会话播放状态,包括状态、倍数、循环模式等信息。 | | callback | AsyncCallback\ | 是 | 回调函数。当播放状态设置成功,err为undefined,否则返回错误对象。 | **错误码:** @@ -1090,8 +1073,6 @@ setAVQueueItems(items: Array\): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -1159,8 +1140,6 @@ setAVQueueItems(items: Array\, callback: AsyncCallback\): voi **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -1225,8 +1204,6 @@ setAVQueueTitle(title: string): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -1266,8 +1243,6 @@ setAVQueueTitle(title: string, callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -1296,7 +1271,7 @@ session.setAVQueueTitle(queueTitle, function (err) { }); ``` -### setLaunchAbility +### setLaunchAbility10+ setLaunchAbility(ability: WantAgent): Promise\ @@ -1304,8 +1279,6 @@ setLaunchAbility(ability: WantAgent): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -1368,7 +1341,7 @@ wantAgent.getWantAgent(wantAgentInfo).then((agent) => { }); ``` -### setLaunchAbility +### setLaunchAbility10+ setLaunchAbility(ability: WantAgent, callback: AsyncCallback\): void @@ -1376,8 +1349,6 @@ setLaunchAbility(ability: WantAgent, callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -1445,8 +1416,6 @@ dispatchSessionEvent(event: string, args: {[key: string]: Object}): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -1609,7 +1574,7 @@ await session.setExtras(extras, (err) => { }) ``` -### getController +### getController10+ getController(): Promise\ @@ -1617,13 +1582,11 @@ getController(): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | | ---------------------------------------------------- | ----------------------------- | -| Promise<[AVSessionController](#avsessioncontroller)> | Promise对象。返回会话控制器。 | +| Promise<[AVSessionController](#avsessioncontroller10)> | Promise对象。返回会话控制器。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -1645,7 +1608,7 @@ session.getController().then((avcontroller) => { }); ``` -### getController +### getController10+ getController(callback: AsyncCallback\): void @@ -1653,13 +1616,11 @@ getController(callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ----------------------------------------------------------- | ---- | -------------------------- | -| callback | AsyncCallback<[AVSessionController](#avsessioncontroller)\> | 是 | 回调函数。返回会话控制器。 | +| callback | AsyncCallback<[AVSessionController](#avsessioncontroller10)\> | 是 | 回调函数。返回会话控制器。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -1683,7 +1644,7 @@ session.getController(function (err, avcontroller) { }); ``` -### getOutputDevice +### getOutputDevice10+ getOutputDevice(): Promise\ @@ -1691,13 +1652,11 @@ getOutputDevice(): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | | ---------------------------------------------- | --------------------------------- | -| Promise<[OutputDeviceInfo](#outputdeviceinfo)> | Promise对象。返回播放设备信息。 | +| Promise<[OutputDeviceInfo](#outputdeviceinfo10)> | Promise对象。返回播放设备信息。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -1717,7 +1676,7 @@ session.getOutputDevice().then((outputDeviceInfo) => { }); ``` -### getOutputDevice +### getOutputDevice10+ getOutputDevice(callback: AsyncCallback\): void @@ -1725,13 +1684,11 @@ getOutputDevice(callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ----------------------------------------------------- | ---- | ------------------------------ | -| callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo)\> | 是 | 回调函数,返回播放设备信息。 | +| callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo10)\> | 是 | 回调函数,返回播放设备信息。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -1753,7 +1710,7 @@ session.getOutputDevice(function (err, outputDeviceInfo) { }); ``` -### activate +### activate10+ activate(): Promise\ @@ -1761,8 +1718,6 @@ activate(): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | @@ -1787,7 +1742,7 @@ session.activate().then(() => { }); ``` -### activate +### activate10+ activate(callback: AsyncCallback\): void @@ -1795,8 +1750,6 @@ activate(callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -1823,16 +1776,14 @@ session.activate(function (err) { }); ``` -### deactivate +### deactivate10+ deactivate(): Promise\ -禁用当前会话的功能,可通过[activate](#activate)恢复。结果通过Promise异步回调方式返回。 +禁用当前会话的功能,可通过[activate](#activate10)恢复。结果通过Promise异步回调方式返回。 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | @@ -1857,18 +1808,16 @@ session.deactivate().then(() => { }); ``` -### deactivate +### deactivate10+ deactivate(callback: AsyncCallback\): void 禁用当前会话。结果通过callback异步回调方式返回。 -禁用当前会话的功能,可通过[activate](#activate)恢复。 +禁用当前会话的功能,可通过[activate](#activate10)恢复。 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -1895,7 +1844,7 @@ session.deactivate(function (err) { }); ``` -### destroy +### destroy10+ destroy(): Promise\ @@ -1903,8 +1852,6 @@ destroy(): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | @@ -1929,7 +1876,7 @@ session.destroy().then(() => { }); ``` -### destroy +### destroy10+ destroy(callback: AsyncCallback\): void @@ -1937,8 +1884,6 @@ destroy(callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -1965,7 +1910,7 @@ session.destroy(function (err) { }); ``` -### on('play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind') +### on('play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind')10+ on(type: 'play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind', callback: () => void): void @@ -1973,8 +1918,6 @@ on(type: 'play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind', **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2016,7 +1959,7 @@ session.on('rewind', () => { }); ``` -### on('seek') +### on('seek')10+ on(type: 'seek', callback: (time: number) => void): void @@ -2024,8 +1967,6 @@ on(type: 'seek', callback: (time: number) => void): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2049,7 +1990,7 @@ session.on('seek', (time) => { }); ``` -### on('setSpeed') +### on('setSpeed')10+ on(type: 'setSpeed', callback: (speed: number) => void): void @@ -2057,8 +1998,6 @@ on(type: 'setSpeed', callback: (speed: number) => void): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2082,7 +2021,7 @@ session.on('setSpeed', (speed) => { }); ``` -### on('setLoopMode') +### on('setLoopMode')10+ on(type: 'setLoopMode', callback: (mode: LoopMode) => void): void @@ -2090,14 +2029,12 @@ on(type: 'setLoopMode', callback: (mode: LoopMode) => void): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------- | ---- | ---- | | type | string | 是 | 事件回调类型,支持事件`'setLoopMode'`:当设置循环模式的命令被发送到会话时,触发该事件。 | -| callback | (mode: [LoopMode](#loopmode)) => void | 是 | 回调函数。参数mode是循环模式。 | +| callback | (mode: [LoopMode](#loopmode10)) => void | 是 | 回调函数。参数mode是循环模式。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -2115,7 +2052,7 @@ session.on('setLoopMode', (mode) => { }); ``` -### on('toggleFavorite') +### on('toggleFavorite')10+ on(type: 'toggleFavorite', callback: (assetId: string) => void): void @@ -2123,8 +2060,6 @@ on(type: 'toggleFavorite', callback: (assetId: string) => void): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2156,8 +2091,6 @@ on(type: 'skipToQueueItem', callback: (itemId: number) => void): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2181,7 +2114,7 @@ session.on('skipToQueueItem', (itemId) => { }); ``` -### on('handleKeyEvent') +### on('handleKeyEvent')10+ on(type: 'handleKeyEvent', callback: (event: KeyEvent) => void): void @@ -2189,8 +2122,6 @@ on(type: 'handleKeyEvent', callback: (event: KeyEvent) => void): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2214,7 +2145,7 @@ session.on('handleKeyEvent', (event) => { }); ``` -### on('outputDeviceChange') +### on('outputDeviceChange')10+ on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void @@ -2222,14 +2153,12 @@ on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): vo **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------------------------- | ---- | ------------------------------------------------------------ | | type | string | 是 | 事件回调类型,支持事件`'outputDeviceChange'`:当播放设备变化时,触发该事件。 | -| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | 是 | 回调函数。参数device是设备相关信息。 | +| callback | (device: [OutputDeviceInfo](#outputdeviceinfo10)) => void | 是 | 回调函数。参数device是设备相关信息。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -2255,8 +2184,6 @@ on(type: 'commonCommand', callback: (command: string, args: {[key: string]: Obje **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2280,7 +2207,7 @@ session.on('commonCommand', (commonCommand, args) => { }); ``` -### off('play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind') +### off('play'|'pause'|'stop'|'playNext'|'playPrevious'|'fastForward'|'rewind')10+ off(type: 'play' | 'pause' | 'stop' | 'playNext' | 'playPrevious' | 'fastForward' | 'rewind', callback?: () => void): void @@ -2288,8 +2215,6 @@ off(type: 'play' | 'pause' | 'stop' | 'playNext' | 'playPrevious' | 'fastForward **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2317,7 +2242,7 @@ session.off('fastForward'); session.off('rewind'); ``` -### off('seek') +### off('seek')10+ off(type: 'seek', callback?: (time: number) => void): void @@ -2325,8 +2250,6 @@ off(type: 'seek', callback?: (time: number) => void): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2348,7 +2271,7 @@ off(type: 'seek', callback?: (time: number) => void): void session.off('seek'); ``` -### off('setSpeed') +### off('setSpeed')10+ off(type: 'setSpeed', callback?: (speed: number) => void): void @@ -2356,8 +2279,6 @@ off(type: 'setSpeed', callback?: (speed: number) => void): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2379,7 +2300,7 @@ off(type: 'setSpeed', callback?: (speed: number) => void): void session.off('setSpeed'); ``` -### off('setLoopMode') +### off('setLoopMode')10+ off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void @@ -2387,14 +2308,12 @@ off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------- | ---- | ----- | | type | string | 是 | 关闭对应的监听事件,支持关闭事件`'setLoopMode'`。| -| callback | (mode: [LoopMode](#loopmode)) => void | 否 | 回调函数,参数mode是循环模式。
当监听事件取消成功,err为undefined,否则返回错误对象。
该参数为可选参数,若不填写该参数,则认为取消所有相关会话的事件监听。 | +| callback | (mode: [LoopMode](#loopmode10)) => void | 否 | 回调函数,参数mode是循环模式。
当监听事件取消成功,err为undefined,否则返回错误对象。
该参数为可选参数,若不填写该参数,则认为取消所有相关会话的事件监听。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -2410,7 +2329,7 @@ off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void session.off('setLoopMode'); ``` -### off('toggleFavorite') +### off('toggleFavorite')10+ off(type: 'toggleFavorite', callback?: (assetId: string) => void): void @@ -2418,8 +2337,6 @@ off(type: 'toggleFavorite', callback?: (assetId: string) => void): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2449,8 +2366,6 @@ off(type: 'skipToQueueItem', callback?: (itemId: number) => void): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2472,7 +2387,7 @@ off(type: 'skipToQueueItem', callback?: (itemId: number) => void): void session.off('skipToQueueItem'); ``` -### off('handleKeyEvent') +### off('handleKeyEvent')10+ off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void @@ -2480,8 +2395,6 @@ off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2503,7 +2416,7 @@ off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void session.off('handleKeyEvent'); ``` -### off('outputDeviceChange') +### off('outputDeviceChange')10+ off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void @@ -2511,14 +2424,12 @@ off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------------------------- | ---- | ------------------------------------------------------ | | type | string | 是 | 关闭对应的监听事件,支持关闭事件`'outputDeviceChange'`。 | -| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | 否 | 回调函数,参数device是设备相关信息。
当监听事件取消成功,err为undefined,否则返回错误对象。
该参数为可选参数,若不填写该参数,则认为取消所有相关会话的事件监听。 | +| callback | (device: [OutputDeviceInfo](#outputdeviceinfo10)) => void | 否 | 回调函数,参数device是设备相关信息。
当监听事件取消成功,err为undefined,否则返回错误对象。
该参数为可选参数,若不填写该参数,则认为取消所有相关会话的事件监听。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -2543,8 +2454,6 @@ off(type: 'commonCommand', callback?: (command: string, args: {[key:string]: Obj **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2567,7 +2476,7 @@ session.off('commonCommand'); -## AVSessionController +## AVSessionController10+ 调用[avSession.createController](#avsessioncreatecontroller)后,返回会话控制器实例。控制器可查看会话ID,并可完成对会话发送命令及事件,获取会话元数据,播放状态信息等操作。 @@ -2575,9 +2484,6 @@ session.off('commonCommand'); **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - - | 名称 | 类型 | 可读 | 可写 | 说明 | | :-------- | :----- | :--- | :--- | :-------------------------------------- | | sessionId | string | 是 | 否 | AVSessionController对象唯一的会话标识。 | @@ -2593,7 +2499,7 @@ await avSession.createController(session.sessionId).then((controller) => { }); ``` -### getAVPlaybackState +### getAVPlaybackState10+ getAVPlaybackState(): Promise\ @@ -2601,13 +2507,11 @@ getAVPlaybackState(): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | | --------------------------------------------- | --------------------------- | -| Promise<[AVPlaybackState](#avplaybackstate)\> | Promise对象。返回播放状态对象。 | +| Promise<[AVPlaybackState](#avplaybackstate10)\> | Promise对象。返回播放状态对象。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -2627,7 +2531,7 @@ controller.getAVPlaybackState().then((playbackState) => { }); ``` -### getAVPlaybackState +### getAVPlaybackState10+ getAVPlaybackState(callback: AsyncCallback\): void @@ -2635,13 +2539,11 @@ getAVPlaybackState(callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | --------------------------------------------------- | ---- | ---------------------------- | -| callback | AsyncCallback<[AVPlaybackState](#avplaybackstate)\> | 是 | 回调函数,返回当前播放状态对象。 | +| callback | AsyncCallback<[AVPlaybackState](#avplaybackstate10)\> | 是 | 回调函数,返回当前播放状态对象。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -2671,8 +2573,6 @@ getAVQueueItems(): Promise\> **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | @@ -2705,8 +2605,6 @@ getAVQueueItems(callback: AsyncCallback\>): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2741,8 +2639,6 @@ getAVQueueTitle(): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | @@ -2775,8 +2671,6 @@ getAVQueueTitle(callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2811,8 +2705,6 @@ skipToQueueItem(itemId: number): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2852,8 +2744,6 @@ skipToQueueItem(itemId: number, callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -2882,7 +2772,7 @@ controller.skipToQueueItem(queueItemId, function (err) { }); ``` -### getAVMetadata +### getAVMetadata10+ getAVMetadata(): Promise\ @@ -2890,13 +2780,11 @@ getAVMetadata(): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | | ----------------------------------- | ----------------------------- | -| Promise<[AVMetadata](#avmetadata)\> | Promise对象,返回会话元数据。 | +| Promise<[AVMetadata](#avmetadata10)\> | Promise对象,返回会话元数据。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -2916,7 +2804,7 @@ controller.getAVMetadata().then((metadata) => { }); ``` -### getAVMetadata +### getAVMetadata10+ getAVMetadata(callback: AsyncCallback\): void @@ -2924,13 +2812,11 @@ getAVMetadata(callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ----------------------------------------- | ---- | -------------------------- | -| callback | AsyncCallback<[AVMetadata](#avmetadata)\> | 是 | 回调函数,返回会话元数据。 | +| callback | AsyncCallback<[AVMetadata](#avmetadata10)\> | 是 | 回调函数,返回会话元数据。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -2952,7 +2838,7 @@ controller.getAVMetadata(function (err, metadata) { }); ``` -### getOutputDevice +### getOutputDevice10+ getOutputDevice(): Promise\ @@ -2960,13 +2846,11 @@ getOutputDevice(): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | | ----------------------------------------------- | --------------------------------- | -| Promise<[OutputDeviceInfo](#outputdeviceinfo)\> | Promise对象,返回播放设备信息。 | +| Promise<[OutputDeviceInfo](#outputdeviceinfo10)\> | Promise对象,返回播放设备信息。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -2985,7 +2869,7 @@ controller.getOutputDevice().then((deviceInfo) => { }); ``` -### getOutputDevice +### getOutputDevice10+ getOutputDevice(callback: AsyncCallback\): void @@ -2993,13 +2877,11 @@ getOutputDevice(callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ----------------------------------------------------- | ---- | ------------------------------ | -| callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo)\> | 是 | 回调函数,返回播放设备信息。 | +| callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo10)\> | 是 | 回调函数,返回播放设备信息。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -3029,8 +2911,6 @@ getExtras(): Promise\<{[key: string]: Object}> **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | @@ -3061,8 +2941,6 @@ getExtras(callback: AsyncCallback\<{[key: string]: Object}>): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -3105,7 +2983,7 @@ controller.getExtras(function (err, extras) { }); ``` -### sendAVKeyEvent +### sendAVKeyEvent10+ sendAVKeyEvent(event: KeyEvent): Promise\ @@ -3113,8 +2991,6 @@ sendAVKeyEvent(event: KeyEvent): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -3151,7 +3027,7 @@ controller.sendAVKeyEvent(event).then(() => { }); ``` -### sendAVKeyEvent +### sendAVKeyEvent10+ sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback\): void @@ -3159,8 +3035,6 @@ sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -3194,7 +3068,7 @@ controller.sendAVKeyEvent(event, function (err) { }); ``` -### getLaunchAbility +### getLaunchAbility10+ getLaunchAbility(): Promise\ @@ -3202,13 +3076,11 @@ getLaunchAbility(): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | | ------------------------------------------------------- | ------------------------------------------------------------ | -| Promise<[WantAgent](js-apis-app-ability-wantAgent.md)\> | Promise对象,返回在[setLaunchAbility](#setlaunchability)保存的对象,包括应用的相关属性信息,如bundleName,abilityName,deviceId等。 | +| Promise<[WantAgent](js-apis-app-ability-wantAgent.md)\> | Promise对象,返回在[setLaunchAbility](#setlaunchability10)保存的对象,包括应用的相关属性信息,如bundleName,abilityName,deviceId等。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -3231,7 +3103,7 @@ controller.getLaunchAbility().then((agent) => { }); ``` -### getLaunchAbility +### getLaunchAbility10+ getLaunchAbility(callback: AsyncCallback\): void @@ -3239,13 +3111,11 @@ getLaunchAbility(callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | -| callback | AsyncCallback<[WantAgent](js-apis-app-ability-wantAgent.md)\> | 是 | 回调函数。返回在[setLaunchAbility](#setlaunchability)保存的对象,包括应用的相关属性信息,如bundleName,abilityName,deviceId等。 | +| callback | AsyncCallback<[WantAgent](js-apis-app-ability-wantAgent.md)\> | 是 | 回调函数。返回在[setLaunchAbility](#setlaunchability10)保存的对象,包括应用的相关属性信息,如bundleName,abilityName,deviceId等。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -3270,7 +3140,7 @@ controller.getLaunchAbility(function (err, agent) { }); ``` -### getRealPlaybackPositionSync +### getRealPlaybackPositionSync10+ getRealPlaybackPositionSync(): number @@ -3278,8 +3148,6 @@ getRealPlaybackPositionSync(): number **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | @@ -3300,7 +3168,7 @@ getRealPlaybackPositionSync(): number let time = controller.getRealPlaybackPositionSync(); ``` -### isActive +### isActive10+ isActive(): Promise\ @@ -3308,8 +3176,6 @@ isActive(): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | @@ -3335,7 +3201,7 @@ controller.isActive().then((isActive) => { }); ``` -### isActive +### isActive10+ isActive(callback: AsyncCallback\): void @@ -3343,8 +3209,6 @@ isActive(callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -3372,7 +3236,7 @@ controller.isActive(function (err, isActive) { }); ``` -### destroy +### destroy10+ destroy(): Promise\ @@ -3380,8 +3244,6 @@ destroy(): Promise\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | @@ -3406,7 +3268,7 @@ controller.destroy().then(() => { }); ``` -### destroy +### destroy10+ destroy(callback: AsyncCallback\): void @@ -3414,8 +3276,6 @@ destroy(callback: AsyncCallback\): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -3442,7 +3302,7 @@ controller.destroy(function (err) { }); ``` -### getValidCommands +### getValidCommands10+ getValidCommands(): Promise\> @@ -3450,13 +3310,11 @@ getValidCommands(): Promise\> **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **返回值:** | 类型 | 说明 | | ------------------------------------------------------------ | --------------------------------- | -| Promise\> | Promise对象。返回有效命令的集合。 | +| Promise\> | Promise对象。返回有效命令的集合。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -3477,7 +3335,7 @@ controller.getValidCommands.then((validCommands) => { }); ``` -### getValidCommands +### getValidCommands10+ getValidCommands(callback: AsyncCallback\>): void @@ -3485,13 +3343,11 @@ getValidCommands(callback: AsyncCallback\>): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------------------------------ | ---- | ------------------------------ | -| callback | AsyncCallback\\> | 是 | 回调函数,返回有效命令的集合。 | +| callback | AsyncCallback\\> | 是 | 回调函数,返回有效命令的集合。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -3514,7 +3370,7 @@ controller.getValidCommands(function (err, validCommands) { }); ``` -### sendControlCommand +### sendControlCommand10+ sendControlCommand(command: AVControlCommand): Promise\ @@ -3522,17 +3378,15 @@ sendControlCommand(command: AVControlCommand): Promise\ > **说明:** > -> 媒体控制方在使用sendControlCommand命令前,需要确保控制对应的媒体会话注册了对应的监听,注册媒体会话相关监听的方法请参见接口[注册媒体会话相关监听](#onplaypausestopplaynextplaypreviousfastforwardrewind)。 +> 媒体控制方在使用sendControlCommand命令前,需要确保控制对应的媒体会话注册了对应的监听,注册媒体会话相关监听的方法请参见接口[注册媒体会话相关监听](#onplaypausestopplaynextplaypreviousfastforwardrewind10)。 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | ------- | ------------------------------------- | ---- | ------------------------------ | -| command | [AVControlCommand](#avcontrolcommand) | 是 | 会话的相关命令和命令相关参数。 | +| command | [AVControlCommand](#avcontrolcommand10) | 是 | 会话的相关命令和命令相关参数。 | **返回值:** @@ -3573,7 +3427,7 @@ controller.sendControlCommand(avCommand).then(() => { }); ``` -### sendControlCommand +### sendControlCommand10+ sendControlCommand(command: AVControlCommand, callback: AsyncCallback\): void @@ -3581,17 +3435,15 @@ sendControlCommand(command: AVControlCommand, callback: AsyncCallback\): v > **说明:** > -> 媒体控制方在使用sendControlCommand命令前,需要确保控制对应的媒体会话注册了对应的监听,注册媒体会话相关监听的方法请参见接口[注册媒体会话相关监听](#onplaypausestopplaynextplaypreviousfastforwardrewind)。 +> 媒体控制方在使用sendControlCommand命令前,需要确保控制对应的媒体会话注册了对应的监听,注册媒体会话相关监听的方法请参见接口[注册媒体会话相关监听](#onplaypausestopplaynextplaypreviousfastforwardrewind10)。 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------- | ---- | ------------------------------ | -| command | [AVControlCommand](#avcontrolcommand) | 是 | 会话的相关命令和命令相关参数。 | +| command | [AVControlCommand](#avcontrolcommand10) | 是 | 会话的相关命令和命令相关参数。 | | callback | AsyncCallback\ | 是 | 回调函数。当命令发送成功,err为undefined,否则返回错误对象。 | **错误码:** @@ -3637,8 +3489,6 @@ sendCommonCommand(command: string, args: {[key: string]: Object}): Promise\ { }) ``` -### on('metadataChange') +### on('metadataChange')10+ on(type: 'metadataChange', filter: Array\ | 'all', callback: (data: AVMetadata) => void) @@ -3734,15 +3582,13 @@ on(type: 'metadataChange', filter: Array\ | 'all', callback: ( **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | | type | string | 是 | 事件回调类型,支持事件`'metadataChange'`:当元数据变化时,触发该事件。 | -| filter | Array\ | 'all' | 是 | 'all' 表示关注元数据所有字段变化;Array 表示关注Array中的字段变化。 | -| callback | (data: [AVMetadata](#avmetadata)) => void | 是 | 回调函数,参数data是变化后的元数据。 | +| filter | Array\ | 'all' | 是 | 'all' 表示关注元数据所有字段变化;Array 表示关注Array中的字段变化。 | +| callback | (data: [AVMetadata](#avmetadata10)) => void | 是 | 回调函数,参数data是变化后的元数据。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -3765,7 +3611,7 @@ controller.on('metadataChange', metaFilter, (metadata) => { }); ``` -### on('playbackStateChange') +### on('playbackStateChange')10+ on(type: 'playbackStateChange', filter: Array\ | 'all', callback: (state: AVPlaybackState) => void) @@ -3773,15 +3619,13 @@ on(type: 'playbackStateChange', filter: Array\ | 'all', c **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | | type | string | 是 | 事件回调类型,支持事件`'playbackStateChange'`:当播放状态变化时,触发该事件。 | -| filter | Array\ | 'all' | 是 | 'all' 表示关注播放状态所有字段变化;Array 表示关注Array中的字段变化。 | -| callback | (state: [AVPlaybackState](#avplaybackstate)) => void | 是 | 回调函数,参数state是变化后的播放状态。 | +| filter | Array\ | 'all' | 是 | 'all' 表示关注播放状态所有字段变化;Array 表示关注Array中的字段变化。 | +| callback | (state: [AVPlaybackState](#avplaybackstate10)) => void | 是 | 回调函数,参数state是变化后的播放状态。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -3812,8 +3656,6 @@ on(type: 'sessionEvent', callback: (sessionEvent: string, args: {[key:string]: O **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -3845,8 +3687,6 @@ on(type: 'queueItemsChange', callback: (items: Array<[AVQueueItem](#avqueueitem1 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -3878,8 +3718,6 @@ on(type: 'queueTitleChange', callback: (title: string) => void): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -3911,8 +3749,6 @@ on(type: 'extrasChange', callback: (extras: {[key:string]: Object}) => void): vo **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -3937,7 +3773,7 @@ controller.on('extrasChange', (extras) => { }); ``` -### on('sessionDestroy') +### on('sessionDestroy')10+ on(type: 'sessionDestroy', callback: () => void) @@ -3945,8 +3781,6 @@ on(type: 'sessionDestroy', callback: () => void) **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -3970,7 +3804,7 @@ controller.on('sessionDestroy', () => { }); ``` -### on('activeStateChange') +### on('activeStateChange')10+ on(type: 'activeStateChange', callback: (isActive: boolean) => void) @@ -3978,8 +3812,6 @@ on(type: 'activeStateChange', callback: (isActive: boolean) => void) **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -4003,7 +3835,7 @@ controller.on('activeStateChange', (isActive) => { }); ``` -### on('validCommandChange') +### on('validCommandChange')10+ on(type: 'validCommandChange', callback: (commands: Array\) => void) @@ -4011,14 +3843,12 @@ on(type: 'validCommandChange', callback: (commands: Array\ **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | | type | string | 是 | 事件回调类型,支持事件`'validCommandChange'`:当检测到会话的合法命令发生改变时,触发该事件。 | -| callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype)\>) => void | 是 | 回调函数。参数commands是有效命令的集合。 | +| callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype10)\>) => void | 是 | 回调函数。参数commands是有效命令的集合。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -4037,7 +3867,7 @@ controller.on('validCommandChange', (validCommands) => { }); ``` -### on('outputDeviceChange') +### on('outputDeviceChange')10+ on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void @@ -4045,14 +3875,12 @@ on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): vo **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------------------------- | ---- | ------------------------------------------------------------ | | type | string | 是 | 事件回调类型,支持事件为`'outputDeviceChange'`:当播放设备变化时,触发该事件)。 | -| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | 是 | 回调函数,参数device是设备相关信息。 | +| callback | (device: [OutputDeviceInfo](#outputdeviceinfo10)) => void | 是 | 回调函数,参数device是设备相关信息。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -4070,7 +3898,7 @@ controller.on('outputDeviceChange', (device) => { }); ``` -### off('metadataChange') +### off('metadataChange')10+ off(type: 'metadataChange', callback?: (data: AVMetadata) => void) @@ -4078,14 +3906,12 @@ off(type: 'metadataChange', callback?: (data: AVMetadata) => void) **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------------------ | ---- | ------------------------------------------------------ | | type | string | 是 | 取消对应的监听事件,支持事件`'metadataChange'`。 | -| callback | (data: [AVMetadata](#avmetadata)) => void | 否 | 回调函数,参数data是变化后的元数据。
该参数为可选参数,若不填写该参数,则认为取消所有相关会话的事件监听。 | +| callback | (data: [AVMetadata](#avmetadata10)) => void | 否 | 回调函数,参数data是变化后的元数据。
该参数为可选参数,若不填写该参数,则认为取消所有相关会话的事件监听。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -4100,7 +3926,7 @@ off(type: 'metadataChange', callback?: (data: AVMetadata) => void) controller.off('metadataChange'); ``` -### off('playbackStateChange') +### off('playbackStateChange')10+ off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void) @@ -4108,14 +3934,12 @@ off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void) **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------------------------------ | ---- | ----------------------------------------------------- | | type | string | 是 | 取消对应的监听事件,支持事件`'playbackStateChange'`。 | -| callback | (state: [AVPlaybackState](#avplaybackstate)) => void | 否 | 回调函数,参数state是变化后的播放状态。
该参数为可选参数,若不填写该参数,则认为取消所有相关会话的事件监听。 | +| callback | (state: [AVPlaybackState](#avplaybackstate10)) => void | 否 | 回调函数,参数state是变化后的播放状态。
该参数为可选参数,若不填写该参数,则认为取消所有相关会话的事件监听。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -4138,8 +3962,6 @@ off(type: 'sessionEvent', callback?: (sessionEvent: string, args: {[key:string]: **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -4168,8 +3990,6 @@ off(type: 'queueItemsChange', callback?: (items: Array<[AVQueueItem](#avqueueite **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -4198,8 +4018,6 @@ off(type: 'queueTitleChange', callback?: (title: string) => void): void **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -4228,8 +4046,6 @@ off(type: 'extrasChange', callback?: (extras: {[key:string]: Object}) => void): **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -4252,7 +4068,7 @@ off(type: 'extrasChange', callback?: (extras: {[key:string]: Object}) => void): controller.off('extrasChange'); ``` -### off('sessionDestroy') +### off('sessionDestroy')10+ off(type: 'sessionDestroy', callback?: () => void) @@ -4260,8 +4076,6 @@ off(type: 'sessionDestroy', callback?: () => void) **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -4282,7 +4096,7 @@ off(type: 'sessionDestroy', callback?: () => void) controller.off('sessionDestroy'); ``` -### off('activeStateChange') +### off('activeStateChange')10+ off(type: 'activeStateChange', callback?: (isActive: boolean) => void) @@ -4290,8 +4104,6 @@ off(type: 'activeStateChange', callback?: (isActive: boolean) => void) **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -4312,7 +4124,7 @@ off(type: 'activeStateChange', callback?: (isActive: boolean) => void) controller.off('activeStateChange'); ``` -### off('validCommandChange') +### off('validCommandChange')10+ off(type: 'validCommandChange', callback?: (commands: Array\) => void) @@ -4320,14 +4132,12 @@ off(type: 'validCommandChange', callback?: (commands: Array\) => void | 否 | 回调函数。参数commands是有效命令的集合。
该参数为可选参数,若不填写该参数,则认为取消所有相关会话的事件监听。 | +| callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype10)\>) => void | 否 | 回调函数。参数commands是有效命令的集合。
该参数为可选参数,若不填写该参数,则认为取消所有相关会话的事件监听。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -4342,7 +4152,7 @@ off(type: 'validCommandChange', callback?: (commands: Array\10+
off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void @@ -4350,14 +4160,12 @@ off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - **参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------------------------- | ---- | ------------------------------------------------------ | | type | string | 是 | 取消对应的监听事件,支持事件`'outputDeviceChange'`。 | -| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | 否 | 回调函数,参数device是设备相关信息。
该参数为可选参数,若不填写该参数,则认为取消所有相关会话的事件监听。 | +| callback | (device: [OutputDeviceInfo](#outputdeviceinfo10)) => void | 否 | 回调函数,参数device是设备相关信息。
该参数为可选参数,若不填写该参数,则认为取消所有相关会话的事件监听。 | **错误码:** 以下错误码的详细介绍请参见[媒体会话管理错误码](../errorcodes/errorcode-avsession.md)。 @@ -4388,13 +4196,11 @@ controller.off('outputDeviceChange'); | pid | number | 是 | 会话的进程ID | | uid | number | 是 | 用户ID | -## AVSessionType +## AVSessionType10+ 当前会话支持的会话类型。 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口。 - | 名称 | 类型 | 说明 | | ----- | ------ | ---- | | audio | string | 音频 | @@ -4411,21 +4217,19 @@ controller.off('outputDeviceChange'); | 名称 | 类型 | 可读 | 可写 | 说明 | | ------------ | ------------------------------------------------------------ | ---- | --------------------------------------------------- | --------------------------------------------------- | | sessionId | string | 是 | 否 | 会话ID | -| type | [AVSessionType](#avsessiontype) | 是 | 否 | 会话类型 | +| type | [AVSessionType](#avsessiontype10) | 是 | 否 | 会话类型 | | sessionTag | string | 是 | 否 | 会话的自定义名称 | | elementName | [ElementName](js-apis-bundle-ElementName.md) | 是 | 否 | 会话所属应用的信息(包含bundleName、abilityName等) | | isActive | boolean | 是 | 否 | 会话是否被激活 | | isTopSession | boolean | 是 | 否 | 会话是否为最新的会话 | -| outputDevice | [OutputDeviceInfo](#outputdeviceinfo) | 是 | 否 | 分布式设备相关信息 | +| outputDevice | [OutputDeviceInfo](#outputdeviceinfo10) | 是 | 否 | 分布式设备相关信息 | -## AVControlCommandType +## AVControlCommandType10+ 会话可传递的命令。 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - | 名称 | 类型 | 说明 | | -------------- | ------ | ------------ | | play | string | 播放 | @@ -4440,27 +4244,23 @@ controller.off('outputDeviceChange'); | setLoopMode | string | 设置循环模式 | | toggleFavorite | string | 是否收藏 | -## AVControlCommand +## AVControlCommand10+ 会话接受的命令的对象描述。 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - | 名称 | 类型 | 必填 | 说明 | | --------- | ------------------------------------------------- | ---- | -------------- | -| command | [AVControlCommandType](#avcontrolcommandtype) | 是 | 命令 | -| parameter | [LoopMode](#loopmode) | string | number | 否 | 命令对应的参数 | +| command | [AVControlCommandType](#avcontrolcommandtype10) | 是 | 命令 | +| parameter | [LoopMode](#loopmode10) | string | number | 否 | 命令对应的参数 | -## AVMetadata +## AVMetadata10+ 媒体元数据的相关属性。 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - | 名称 | 类型 | 必填 | 说明 | | --------------- |-------------------------| ---- |---------------------------------------------------------------------| | assetId | string | 是 | 媒体ID。 | @@ -4507,60 +4307,52 @@ controller.off('outputDeviceChange'); | itemId | number | 是 | 播放列表中单项的ID。 | | description | [AVMediaDescription](#avmediadescription10) | 是 | 播放列表中单项的媒体元数据。 | -## AVPlaybackState +## AVPlaybackState10+ 媒体播放状态的相关属性。 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - | 名称 | 类型 | 必填 | 说明 | | ------------ | ------------------------------------- | ---- | ------- | | state | [PlaybackState](#playbackstate) | 否 | 播放状态 | | speed | number | 否 | 播放倍速 | | position | [PlaybackPosition](#playbackposition) | 否 | 播放位置 | | bufferedTime | number | 否 | 缓冲时间 | -| loopMode | [LoopMode](#loopmode) | 否 | 循环模式 | +| loopMode | [LoopMode](#loopmode10) | 否 | 循环模式 | | isFavorite | boolean | 否 | 是否收藏 | | activeItemId10+ | number | 否 | 正在播放的媒体Id | | extras10+ | {[key: string]: Object} | 否 | 自定义媒体数据 | -## PlaybackPosition +## PlaybackPosition10+ 媒体播放位置的相关属性。 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - | 名称 | 类型 | 必填 | 说明 | | ----------- | ------ | ---- | ------------------ | | elapsedTime | number | 是 | 已用时间,单位毫秒(ms)。 | | updateTime | number | 是 | 更新时间,单位毫秒(ms)。 | -## OutputDeviceInfo +## OutputDeviceInfo10+ 播放设备的相关信息。 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - | 名称 | 类型 | 必填 | 说明 | | ---------- | -------------- | ---- | ---------------------- | | isRemote | boolean | 是 | 设备是否连接。 | | audioDeviceId | Array | 是 | 播放设备的ID集合。 | | deviceName | Array | 是 | 播放设备的名称集合。 | -## PlaybackState +## PlaybackState10+ 表示媒体播放状态的枚举。 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - | 名称 | 值 | 说明 | | --------------------------- | ---- | ----------- | | PLAYBACK_STATE_INITIAL | 0 | 初始状态 | @@ -4572,14 +4364,12 @@ controller.off('outputDeviceChange'); | PLAYBACK_STATE_STOP | 6 | 停止 | -## LoopMode +## LoopMode10+ 表示媒体播放循环模式的枚举。 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - | 名称 | 值 | 说明 | | ------------------ | ---- | -------- | | LOOP_MODE_SEQUENCE | 0 | 顺序播放 | @@ -4587,14 +4377,12 @@ controller.off('outputDeviceChange'); | LOOP_MODE_LIST | 2 | 表单循环 | | LOOP_MODE_SHUFFLE | 3 | 随机播放 | -## AVSessionErrorCode +## AVSessionErrorCode10+ 会话发生错误时的错误码。 **系统能力:** SystemCapability.Multimedia.AVSession.Core -**系统接口:** 该接口为系统接口 - | 名称 | 值 | 说明 | | ------------------------------ | ------- | ------------------------------- | | ERR_CODE_SERVICE_EXCEPTION | 6600101 | Session service exception. | diff --git a/zh-cn/application-dev/reference/apis/js-apis-bluetoothManager.md b/zh-cn/application-dev/reference/apis/js-apis-bluetoothManager.md index 72b9a7371ceaff11c6ea9c32a8be8bdffd17aaae..b37ae7045112684b14b981642805ab50a9b2f57a 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-bluetoothManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-bluetoothManager.md @@ -4355,6 +4355,7 @@ try { | serviceUuids | Array<string> | 是 | 是 | 表示要广播的服务 UUID 列表。 | | manufactureData | Array<[ManufactureData](#manufacturedata)> | 是 | 是 | 表示要广播的广播的制造商信息列表。 | | serviceData | Array<[ServiceData](#servicedata)> | 是 | 是 | 表示要广播的服务数据列表。 | +| includeDeviceName10+ | boolean | 是 | 是 | 表示是否携带设备名,可选参数。 | ## ManufactureData diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-applicationInfo.md b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-applicationInfo.md index bf0cbbb9a8716a44ddc1929e97dde91ac8949119..7f9c0a63ab135bd162e1eb3865b5068beba634bf 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-applicationInfo.md +++ b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-applicationInfo.md @@ -25,9 +25,9 @@ | removable | boolean | 是 | 否 | 应用程序是否可以被移除。 | | accessTokenId | number | 是 | 否 | 应用程序的accessTokenId。 | | uid | number | 是 | 否 | 应用程序的uid。 | -| iconResource | [Resource](js-apis-resource-manager.md#resource9) | 是 | 否 | 应用程序的图标资源信息,通过ApplicationInfo 获取的resource 包含了该资源的信息的bundleName、moduleName 和 id,可以调用全球化的接口[@ohos.resourceManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.resourceManager.d.ts)中的getMediaContent来获取详细的资源数据信息。 | -| labelResource | [Resource](js-apis-resource-manager.md#resource9) | 是 | 否 | 应用程序的标签资源信息,通过ApplicationInfo 获取的resource 包含了该资源的信息的bundleName、moduleName 和 id,可以调用全球化的接口[@ohos.resourceManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.resourceManager.d.ts)中的getMediaContent来获取详细的资源数据信息。 | -| descriptionResource | [Resource](js-apis-resource-manager.md#resource9) | 是 | 否 | 应用程序的描述资源信息,通过ApplicationInfo 获取的resource 包含了该资源的信息的bundleName、moduleName 和 id,可以调用全球化的接口[@ohos.resourceManager.d.ts](https://gitee.com/openharmony/interface_sdk-js/blob/master/api/@ohos.resourceManager.d.ts)中的getMediaContent来获取详细的资源数据信息。| +| iconResource | [Resource](js-apis-resource-manager.md#resource9) | 是 | 否 | 应用程序的图标资源信息,通过ApplicationInfo 获取的resource 包含了该资源的信息的bundleName、moduleName 和 id,可以调用全球化的接口[@ohos.resourceManager.d.ts](js-apis-resource-manager.md#getmediacontent9)中的getMediaContent来获取详细的资源数据信息。 | +| labelResource | [Resource](js-apis-resource-manager.md#resource9) | 是 | 否 | 应用程序的标签资源信息,通过ApplicationInfo 获取的resource 包含了该资源的信息的bundleName、moduleName 和 id,可以调用全球化的接口[@ohos.resourceManager.d.ts](js-apis-resource-manager.md#getmediacontent9)中的getMediaContent来获取详细的资源数据信息。 | +| descriptionResource | [Resource](js-apis-resource-manager.md#resource9) | 是 | 否 | 应用程序的描述资源信息,通过ApplicationInfo 获取的resource 包含了该资源的信息的bundleName、moduleName 和 id,可以调用全球化的接口[@ohos.resourceManager.d.ts](js-apis-resource-manager.md#getmediacontent9)中的getMediaContent来获取详细的资源数据信息。| | appDistributionType | string | 是 | 否 | 应用程序签名证书的分发类型,分为:app_gallery、enterprise、os_integration和crowdtesting。 | | appProvisionType | string | 是 | 否 | 应用程序签名证书文件的类型,分为debug和release两种类型。 | | systemApp | boolean | 是 | 否 | 标识应用是否为系统应用。 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-deviceAttest.md b/zh-cn/application-dev/reference/apis/js-apis-deviceAttest.md new file mode 100644 index 0000000000000000000000000000000000000000..55f3b1e033b83d1dac3c6c37fbd7cfe8a34a3183 --- /dev/null +++ b/zh-cn/application-dev/reference/apis/js-apis-deviceAttest.md @@ -0,0 +1,149 @@ +# @ohos.deviceAttest (设备证明) + +为了证明设备是OpenHarmony生态中的合法设备,设备证明模块会把设备信息通过云端进行一致性合法校验。 +通过本模块接口,可查询设备在云端校验的结果。 + +> **说明:** +> +> - 本模块首批接口从API version 9开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 +> +> - 本模块接口为系统接口。 + +## 导入模块 + +```js +import deviceAttest from '@ohos.deviceAttest'; +``` + +## deviceAttest.getAttestStatus + +getAttestStatus(callback: AsyncCallback<AttestResultInfo>) : void + +获取端云校验结果的详细信息。使用callback异步回调。 + +**系统能力:** SystemCapability.XTS.DeviceAttest + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ----------------------------------------------------------- | ---- | ------------------------------------------------------------ | +| callback | AsyncCallback<[AttestResultInfo](#attestresultinfo)> | 是 | 回调函数。当获取端云校验结果的详细信息成功,error为undefined,result为获取到的[AttestResultInfo](#attestresultinfo);否则为错误对象。 | + +**错误码:** + +| 错误码ID | 错误信息 | +|----------|----------------------| +| 20000001 | system service exception | + +**示例:** + +```js +try { + deviceAttest.getAttestStatus((error, result) => { + if (typeof err === 'undefined') { + console.info("error code:" + error.code + " message:" + error.message); + } else { + console.info("auth:" + result.authResult + " software:" + result.softwareResult + " ticket:" + result.ticket); + console.info("versionIdResult:" + result.softwareResultDetail[0], + " patchlevelResult:" + result.softwareResultDetail[1], + " roothashResult:" + result.softwareResultDetail[2], + " PCIDResult:" + result.softwareResultDetail[3], + " reserver:" + result.softwareResultDetail[4]); + } + }) +} catch (error) { + console.info("error code:" + error.code + " message:" + error.message); +} +``` + +## deviceAttest.getAttestStatus + +getAttestStatus() : Promise<AttestResultInfo> + +获取端云校验结果的详细信息。使用Promise异步回调。 + +**系统能力:** SystemCapability.XTS.DeviceAttest + +**返回值:** + +| 类型 | 说明 | +| ----------------------------------------------------- | ------------------------------- | +| Promise<[AttestResultInfo](#attestresultinfo)> | Promise对象,返回端云校验结果的详细信息。 | + +**错误码:** + +| 错误码ID | 错误信息 | +|----------|----------------------| +| 20000001 | system service exception | + +**示例:** + +```js +try { + deviceAttest.getAttestStatus().then((value) => { + console.info("auth:" + result.authResult + " software:" + result.softwareResult + " ticket:" + result.ticket); + console.info("versionIdResult:" + result.softwareResultDetail[0], + " patchlevelResult:" + result.softwareResultDetail[1], + " roothashResult:" + result.softwareResultDetail[2], + " PCIDResult:" + result.softwareResultDetail[3], + " reserver:" + result.softwareResultDetail[4]); + }).catch((error) => { + console.info("error code:" + error.code + " message:" + error.message); + }); +} catch (error) { + console.info("error code:" + error.code + " message:" + error.message); +} +``` + +## deviceAttest.getAttestStatusSync + +getAttestStatusSync() : AttestResultInfo + +以同步方式获取端云校验结果的详细信息。 + +**系统能力:** SystemCapability.XTS.DeviceAttest + +**返回值:** + +| 类型 | 说明 | +| ----------------------------------------------------- | ------------------------------- | +| [AttestResultInfo](#attestresultinfo) | 返回端云校验结果的详细信息。 | + +**错误码:** + +| 错误码ID | 错误信息 | +|----------|----------------------| +| 20000001 | system service exception | + +**示例:** + +```js +try { + let attestResultInfo = deviceAttest.getAttestStatusSync(); + console.info("auth:" + result.authResult + " software:" + result.softwareResult + " ticket:" + result.ticket); + console.info("versionIdResult:" + result.softwareResultDetail[0], + " patchlevelResult:" + result.softwareResultDetail[1], + " roothashResult:" + result.softwareResultDetail[2], + " PCIDResult:" + result.softwareResultDetail[3], + " reserver:" + result.softwareResultDetail[4]); +} catch (error) { + console.info("error code:" + error.code + " message:" + error.message); +} +``` + +## AttestResultInfo + +端云校验结果的详细信息。 + +**系统能力:** SystemCapability.XTS.DeviceAttest + +| 名称 | 类型 | 可读 | 可写 | 说明 | +| --------------------- | --------------------- | ---- | ---- | ---------------------- | +| authResult | number | 是 | 否 | 设备硬件信息校验结果。 | +| softwareResult | number | 是 | 否 | 设备软件信息校验结果。 | +| softwareResultDetail | Array<number> | 是 | 否 | 设备软件信息校验结果详细说明
- softwareResultDetail[0]:版本Id的校验结果;
- softwareResultDetail[1]:安全补丁标签的校验结果;
- softwareResultDetail[2]:版本Hash的校验结果;
- softwareResultDetail[3]:系统能力集合的校验结果;
- softwareResultDetail[4]:保留位。 | +| ticket | string | 是 | 否 | 云侧下发的软证书。
设备硬件信息校验结果通过后有值;校验结果失败,该值为空 | + +> **说明:** +> +> - 设备硬件信息和设备软件信息的校验结果返回值有-2、-1、0。-2表示未认证,-1表示认证失败,0表示认证通过。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-distributedKVStore.md b/zh-cn/application-dev/reference/apis/js-apis-distributedKVStore.md index c5bc7922dea9d9e6a1a2a4bcbc2ca9b59c2a0f94..23afabc1b9f5611e85e805f6c036d03a4de85bfa 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-distributedKVStore.md +++ b/zh-cn/application-dev/reference/apis/js-apis-distributedKVStore.md @@ -457,7 +457,7 @@ try { kvStore = store; kvStore = null; store = null; - kvManager.closeKVStore('appId', 'storeId', function (err, data) { + kvManager.closeKVStore('appId', 'storeId', function (err) { if (err != undefined) { console.error(`Failed to close KVStore.code is ${err.code},message is ${err.message}`); return; @@ -568,7 +568,7 @@ try { kvStore = store; kvStore = null; store = null; - kvManager.deleteKVStore('appId', 'storeId', function (err, data) { + kvManager.deleteKVStore('appId', 'storeId', function (err) { if (err != undefined) { console.error(`Failed to delete KVStore.code is ${err.code},message is ${err.message}`); return; @@ -2128,7 +2128,7 @@ put(key: string, value: Uint8Array | string | number | boolean, callback: AsyncC const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err, data) { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err) { if (err != undefined) { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); return; @@ -2182,8 +2182,8 @@ put(key: string, value: Uint8Array | string | number | boolean): Promise<void const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then((data) => { - console.info(`Succeeded in putting.data=${data}`); + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(() => { + console.info(`Succeeded in putting data`); }).catch((err) => { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); }); @@ -2239,7 +2239,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put Batch.code is ${err.code},message is ${err.message}`); return; @@ -2311,7 +2311,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries).then(async (entries) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting Batch'); kvStore.getEntries('batch_test_string_key').then((entries) => { console.info('Succeeded in getting Entries'); @@ -2372,7 +2372,7 @@ try { v8Arr.push(vb1); v8Arr.push(vb2); v8Arr.push(vb3); - kvStore.putBatch(v8Arr, async function (err, data) { + kvStore.putBatch(v8Arr, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -2434,7 +2434,7 @@ try { v8Arr.push(vb1); v8Arr.push(vb2); v8Arr.push(vb3); - kvStore.putBatch(v8Arr).then(async (data) => { + kvStore.putBatch(v8Arr).then(async () => { console.info(`Succeeded in putting patch`); }).catch((err) => { console.error(`putBatch fail.code is ${err.code},message is ${err.message}`); @@ -2480,13 +2480,13 @@ delete(key: string, callback: AsyncCallback<void>): void const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err, data) { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err) { if (err != undefined) { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); return; } console.info('Succeeded in putting'); - kvStore.delete(KEY_TEST_STRING_ELEMENT, function (err, data) { + kvStore.delete(KEY_TEST_STRING_ELEMENT, function (err) { if (err != undefined) { console.error(`Failed to delete.code is ${err.code},message is ${err.message}`); return; @@ -2540,9 +2540,9 @@ delete(key: string): Promise<void> const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then((data) => { - console.info(`Succeeded in putting: ${data}`); - kvStore.delete(KEY_TEST_STRING_ELEMENT).then((data) => { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(() => { + console.info(`Succeeded in putting data`); + kvStore.delete(KEY_TEST_STRING_ELEMENT).then(() => { console.info('Succeeded in deleting'); }).catch((err) => { console.error(`Failed to delete.code is ${err.code},message is ${err.message}`); @@ -2595,13 +2595,13 @@ try { let predicates = new dataSharePredicates.DataSharePredicates(); let arr = ["name"]; predicates.inKeys(arr); - kvStore.put("name", "bob", function (err, data) { + kvStore.put("name", "bob", function (err) { if (err != undefined) { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); return; } console.info("Succeeded in putting"); - kvStore.delete(predicates, function (err, data) { + kvStore.delete(predicates, function (err) { if (err == undefined) { console.info('Succeeded in deleting'); } else { @@ -2660,9 +2660,9 @@ try { let predicates = new dataSharePredicates.DataSharePredicates(); let arr = ["name"]; predicates.inKeys(arr); - kvStore.put("name", "bob").then((data) => { - console.info(`Succeeded in putting: ${data}`); - kvStore.delete(predicates).then((data) => { + kvStore.put("name", "bob").then(() => { + console.info(`Succeeded in putting data`); + kvStore.delete(predicates).then(() => { console.info('Succeeded in deleting'); }).catch((err) => { console.error(`Failed to delete.code is ${err.code},message is ${err.message}`); @@ -2724,13 +2724,13 @@ try { keys.push(key + i); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put Batch.code is ${err.code},message is ${err.message}`); return; } console.info('Succeeded in putting Batch'); - kvStore.deleteBatch(keys, async function (err, data) { + kvStore.deleteBatch(keys, async function (err) { if (err != undefined) { console.error(`Failed to delete Batch.code is ${err.code},message is ${err.message}`); return; @@ -2797,9 +2797,9 @@ try { keys.push(key + i); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries).then(async (data) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting Batch'); - kvStore.deleteBatch(keys).then((err) => { + kvStore.deleteBatch(keys).then(() => { console.info('Succeeded in deleting Batch'); }).catch((err) => { console.error(`Failed to delete Batch.code is ${err.code},message is ${err.message}`); @@ -2845,10 +2845,10 @@ removeDeviceData(deviceId: string, callback: AsyncCallback<void>): void const KEY_TEST_STRING_ELEMENT = 'key_test_string_2'; const VALUE_TEST_STRING_ELEMENT = 'value-string-002'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, async function (err, data) { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, async function (err) { console.info('Succeeded in putting data'); const deviceid = 'no_exist_device_id'; - kvStore.removeDeviceData(deviceid, async function (err, data) { + kvStore.removeDeviceData(deviceid, async function (err) { if (err == undefined) { console.info('succeeded in removing device data'); } else { @@ -2902,13 +2902,13 @@ removeDeviceData(deviceId: string): Promise<void> const KEY_TEST_STRING_ELEMENT = 'key_test_string_2'; const VALUE_TEST_STRING_ELEMENT = 'value-string-001'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then((err) => { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(() => { console.info('Succeeded in putting data'); }).catch((err) => { console.error(`Failed to put data.code is ${err.code},message is ${err.message} `); }); const deviceid = 'no_exist_device_id'; - kvStore.removeDeviceData(deviceid).then((err) => { + kvStore.removeDeviceData(deviceid).then(() => { console.info('succeeded in removing device data'); }).catch((err) => { console.error(`Failed to remove device data.code is ${err.code},message is ${err.message} `); @@ -2954,7 +2954,7 @@ get(key: string, callback: AsyncCallback<boolean | string | number | Uint8Arr const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err, data) { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err) { if (err != undefined) { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); return; @@ -3009,8 +3009,8 @@ get(key: string): Promise<boolean | string | number | Uint8Array> const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then((data) => { - console.info(`Succeeded in putting data.data=${data}`); + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(() => { + console.info(`Succeeded in putting data`); kvStore.get(KEY_TEST_STRING_ELEMENT).then((data) => { console.info(`Succeeded in getting data.data=${data}`); }).catch((err) => { @@ -3065,7 +3065,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put Batch.code is ${err.code},message is ${err.message}`); return; @@ -3132,7 +3132,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries).then(async (entries) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting Batch'); kvStore.getEntries('batch_test_string_key').then((entries) => { console.info('Succeeded in getting Entries'); @@ -3190,7 +3190,7 @@ try { entries.push(entry); } console.info(`entries: {entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { console.info('Succeeded in putting Batch'); const query = new distributedKVStore.Query(); query.prefixKey("batch_test"); @@ -3256,7 +3256,7 @@ try { entries.push(entry); } console.info(`entries: {entries}`); - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting Batch'); const query = new distributedKVStore.Query(); query.prefixKey("batch_test"); @@ -3317,7 +3317,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -3330,7 +3330,7 @@ try { } console.info('Succeeded in getting result set'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); return; @@ -3391,7 +3391,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); @@ -3402,7 +3402,7 @@ try { }).catch((err) => { console.error(`Failed to get resultset.code is ${err.code},message is ${err.message}`); }); - kvStore.closeResultSet(resultSet).then((err) => { + kvStore.closeResultSet(resultSet).then(() => { console.info('Succeeded in closing result set'); }).catch((err) => { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); @@ -3454,7 +3454,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -3522,7 +3522,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); @@ -3583,7 +3583,7 @@ try { } console.info('Succeeded in getting result set'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); return; @@ -3643,7 +3643,7 @@ try { }).catch((err) => { console.error(`Failed to get resultset.code is ${err.code},message is ${err.message}`); }); - kvStore.closeResultSet(resultSet).then((err) => { + kvStore.closeResultSet(resultSet).then(() => { console.info('Succeeded in closing result set'); }).catch((err) => { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); @@ -3673,7 +3673,7 @@ closeResultSet(resultSet: KVStoreResultSet, callback: AsyncCallback<void>) ```js try { let resultSet = null; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err == undefined) { console.info('Succeeded in closing result set'); } else { @@ -3760,7 +3760,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { console.info('Succeeded in putting batch'); const query = new distributedKVStore.Query(); query.prefixKey("batch_test"); @@ -3822,7 +3822,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); @@ -3867,11 +3867,11 @@ backup(file:string, callback: AsyncCallback<void>):void ```js let file = "BK001"; try { - kvStore.backup(file, (err, data) => { + kvStore.backup(file, function(err) => { if (err) { console.error(`Failed to backup.code is ${err.code},message is ${err.message} `); } else { - console.info(`Succeeded in backupping data.data=${data}`); + console.info(`Succeeded in backupping data`); } }); } catch (e) { @@ -3912,8 +3912,8 @@ backup(file:string): Promise<void> ```js let file = "BK001"; try { - kvStore.backup(file).then((data) => { - console.info(`Succeeded in backupping data.data=${data}`); + kvStore.backup(file).then(() => { + console.info(`Succeeded in backupping data`); }).catch((err) => { console.error(`Failed to backup.code is ${err.code},message is ${err.message}`); }); @@ -3950,11 +3950,11 @@ restore(file:string, callback: AsyncCallback<void>):void ```js let file = "BK001"; try { - kvStore.restore(file, (err, data) => { + kvStore.restore(file, (err) => { if (err) { console.error(`Failed to restore.code is ${err.code},message is ${err.message}`); } else { - console.info(`Succeeded in restoring data.data=${data}`); + console.info(`Succeeded in restoring data`); } }); } catch (e) { @@ -3995,8 +3995,8 @@ restore(file:string): Promise<void> ```js let file = "BK001"; try { - kvStore.restore(file).then((data) => { - console.info(`Succeeded in restoring data.data=${data}`); + kvStore.restore(file).then(() => { + console.info(`Succeeded in restoring data`); }).catch((err) => { console.error(`Failed to restore.code is ${err.code},message is ${err.message}`); }); @@ -4124,7 +4124,7 @@ try { console.info(`startTransaction 0 ${data}`); count++; }); - kvStore.startTransaction(async function (err, data) { + kvStore.startTransaction(async function (err) { if (err != undefined) { console.error(`Failed to start Transaction.code is ${err.code},message is ${err.message}`); return; @@ -4132,7 +4132,7 @@ try { console.info('Succeeded in starting Transaction'); let entries = putBatchString(10, 'batch_test_string_key'); console.info(`entries: ${entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -4182,7 +4182,7 @@ try { console.info(`startTransaction 0 ${data}`); count++; }); - kvStore.startTransaction().then(async (err) => { + kvStore.startTransaction().then(async () => { console.info('Succeeded in starting Transaction'); }).catch((err) => { console.error(`Failed to start Transaction.code is ${err.code},message is ${err.message}`); @@ -4218,7 +4218,7 @@ commit(callback: AsyncCallback<void>): void ```js try { - kvStore.commit(function (err, data) { + kvStore.commit(function (err) { if (err == undefined) { console.info('Succeeded in committing'); } else { @@ -4256,7 +4256,7 @@ commit(): Promise<void> ```js try { - kvStore.commit().then(async (err) => { + kvStore.commit().then(async () => { console.info('Succeeded in committing'); }).catch((err) => { console.error(`Failed to commit.code is ${err.code},message is ${err.message}`); @@ -4292,7 +4292,7 @@ rollback(callback: AsyncCallback<void>): void ```js try { - kvStore.rollback(function (err,data) { + kvStore.rollback(function (err) { if (err == undefined) { console.info('Succeeded in rolling back'); } else { @@ -4330,7 +4330,7 @@ rollback(): Promise<void> ```js try { - kvStore.rollback().then(async (err) => { + kvStore.rollback().then(async () => { console.info('Succeeded in rolling back'); }).catch((err) => { console.error(`Failed to rollback.code is ${err.code},message is ${err.message}`); @@ -4359,7 +4359,7 @@ enableSync(enabled: boolean, callback: AsyncCallback<void>): void ```js try { - kvStore.enableSync(true, function (err, data) { + kvStore.enableSync(true, function (err) { if (err == undefined) { console.info('Succeeded in enabling sync'); } else { @@ -4395,7 +4395,7 @@ enableSync(enabled: boolean): Promise<void> ```js try { - kvStore.enableSync(true).then((err) => { + kvStore.enableSync(true).then(() => { console.info('Succeeded in enabling sync'); }).catch((err) => { console.error(`Failed to enable sync.code is ${err.code},message is ${err.message}`); @@ -4427,7 +4427,7 @@ setSyncRange(localLabels: string[], remoteSupportLabels: string[], callback: Asy try { const localLabels = ['A', 'B']; const remoteSupportLabels = ['C', 'D']; - kvStore.setSyncRange(localLabels, remoteSupportLabels, function (err, data) { + kvStore.setSyncRange(localLabels, remoteSupportLabels, function (err) { if (err != undefined) { console.error(`Failed to set syncRange.code is ${err.code},message is ${err.message}`); return; @@ -4466,7 +4466,7 @@ setSyncRange(localLabels: string[], remoteSupportLabels: string[]): Promise<v try { const localLabels = ['A', 'B']; const remoteSupportLabels = ['C', 'D']; - kvStore.setSyncRange(localLabels, remoteSupportLabels).then((err) => { + kvStore.setSyncRange(localLabels, remoteSupportLabels).then(() => { console.info('Succeeded in setting syncRange'); }).catch((err) => { console.error(`Failed to set syncRange.code is ${err.code},message is ${err.message}`); @@ -4496,7 +4496,7 @@ setSyncParam(defaultAllowedDelayMs: number, callback: AsyncCallback<void>) ```js try { const defaultAllowedDelayMs = 500; - kvStore.setSyncParam(defaultAllowedDelayMs, function (err, data) { + kvStore.setSyncParam(defaultAllowedDelayMs, function (err) { if (err != undefined) { console.error(`Failed to set syncParam.code is ${err.code},message is ${err.message}`); return; @@ -4533,7 +4533,7 @@ setSyncParam(defaultAllowedDelayMs: number): Promise<void> ```js try { const defaultAllowedDelayMs = 500; - kvStore.setSyncParam(defaultAllowedDelayMs).then((err) => { + kvStore.setSyncParam(defaultAllowedDelayMs).then(() => { console.info('Succeeded in setting syncParam'); }).catch((err) => { console.error(`Failed to set syncParam.code is ${err.code},message is ${err.message}`); @@ -4596,7 +4596,7 @@ deviceManager.createDeviceManager('bundleName', (err, value) => { kvStore.on('syncComplete', function (data) { console.info('Sync dataChange'); }); - kvStore.put(KEY_TEST_SYNC_ELEMENT + 'testSync101', VALUE_TEST_SYNC_ELEMENT, function (err, data) { + kvStore.put(KEY_TEST_SYNC_ELEMENT + 'testSync101', VALUE_TEST_SYNC_ELEMENT, function (err) { if (err != undefined) { console.error(`Failed to sync.code is ${err.code},message is ${err.message}`); return; @@ -4666,7 +4666,7 @@ deviceManager.createDeviceManager('bundleName', (err, value) => { kvStore.on('syncComplete', function (data) { console.info('Sync dataChange'); }); - kvStore.put(KEY_TEST_SYNC_ELEMENT + 'testSync101', VALUE_TEST_SYNC_ELEMENT, function (err, data) { + kvStore.put(KEY_TEST_SYNC_ELEMENT + 'testSync101', VALUE_TEST_SYNC_ELEMENT, function (err) { if (err != undefined) { console.error(`Failed to sync.code is ${err.code},message is ${err.message}`); return; @@ -4746,7 +4746,7 @@ try { kvStore.on('syncComplete', function (data) { console.info(`syncComplete ${data}`); }); - kvStore.put(KEY_TEST_FLOAT_ELEMENT, VALUE_TEST_FLOAT_ELEMENT).then((data) => { + kvStore.put(KEY_TEST_FLOAT_ELEMENT, VALUE_TEST_FLOAT_ELEMENT).then(() => { console.info('succeeded in putting'); }).catch((err) => { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); @@ -4969,7 +4969,7 @@ get(key: string, callback: AsyncCallback<boolean | string | number | Uint8Arr const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err, data) { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, function (err) { if (err != undefined) { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); return; @@ -5024,8 +5024,8 @@ get(key: string): Promise<boolean | string | number | Uint8Array> const KEY_TEST_STRING_ELEMENT = 'key_test_string'; const VALUE_TEST_STRING_ELEMENT = 'value-test-string'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then((data) => { - console.info(`Succeeded in putting data.data=${data}`); + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(() => { + console.info(`Succeeded in putting data`); kvStore.get(KEY_TEST_STRING_ELEMENT).then((data) => { console.info(`Succeeded in getting data.data=${data}`); }).catch((err) => { @@ -5075,7 +5075,7 @@ get(deviceId: string, key: string, callback: AsyncCallback<boolean | string | const KEY_TEST_STRING_ELEMENT = 'key_test_string_2'; const VALUE_TEST_STRING_ELEMENT = 'value-string-002'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, async function (err, data) { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT, async function (err) { if (err != undefined) { console.error(`Failed to put.code is ${err.code},message is ${err.message}`); return; @@ -5135,7 +5135,7 @@ get(deviceId: string, key: string): Promise<boolean | string | number | Uint8 const KEY_TEST_STRING_ELEMENT = 'key_test_string_2'; const VALUE_TEST_STRING_ELEMENT = 'value-string-002'; try { - kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(async (data) => { + kvStore.put(KEY_TEST_STRING_ELEMENT, VALUE_TEST_STRING_ELEMENT).then(async () => { console.info('Succeeded in putting'); kvStore.get('localDeviceId', KEY_TEST_STRING_ELEMENT).then((data) => { console.info('Succeeded in getting'); @@ -5191,7 +5191,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put Batch.code is ${err.code},message is ${err.message}`); return; @@ -5258,7 +5258,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries).then(async (entries) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting Batch'); kvStore.getEntries('batch_test_string_key').then((entries) => { console.info('Succeeded in getting Entries'); @@ -5320,7 +5320,7 @@ try { entries.push(entry); } console.info(`entries : ${entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -5392,7 +5392,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); kvStore.getEntries('localDeviceId', 'batch_test_string_key').then((entries) => { console.info('Succeeded in getting entries'); @@ -5453,7 +5453,7 @@ try { entries.push(entry); } console.info(`entries: {entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { console.info('Succeeded in putting Batch'); const query = new distributedKVStore.Query(); query.prefixKey("batch_test"); @@ -5519,7 +5519,7 @@ try { entries.push(entry); } console.info(`entries: {entries}`); - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting Batch'); const query = new distributedKVStore.Query(); query.prefixKey("batch_test"); @@ -5584,7 +5584,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -5661,7 +5661,7 @@ try { entries.push(entry); } console.info(`entries: ${entries}`); - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); var query = new distributedKVStore.Query(); query.deviceId('localDeviceId'); @@ -5722,7 +5722,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -5735,7 +5735,7 @@ try { } console.info('Succeeded in getting result set'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); return; @@ -5796,7 +5796,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); @@ -5807,7 +5807,7 @@ try { }).catch((err) => { console.error(`Failed to get resultset.code is ${err.code},message is ${err.message}`); }); - kvStore.closeResultSet(resultSet).then((err) => { + kvStore.closeResultSet(resultSet).then(() => { console.info('Succeeded in closing result set'); }).catch((err) => { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); @@ -5859,7 +5859,7 @@ try { } console.info('Succeeded in getting resultSet'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultSet.code is ${err.code},message is ${err.message}`); return; @@ -5918,7 +5918,7 @@ try { }).catch((err) => { console.error(`Failed to get resultSet.code is ${err.code},message is ${err.message}`); }); - kvStore.closeResultSet(resultSet).then((err) => { + kvStore.closeResultSet(resultSet).then(() => { console.info('Succeeded in closing resultSet'); }).catch((err) => { console.error(`Failed to close resultSet.code is ${err.code},message is ${err.message}`); @@ -5975,7 +5975,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -5990,7 +5990,7 @@ try { } console.info('Succeeded in getting resultSet'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultSet.code is ${err.code},message is ${err.message}`); return; @@ -6056,7 +6056,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); @@ -6071,7 +6071,7 @@ try { }); query.deviceId('localDeviceId'); console.info("GetResultSet " + query.getSqlLike()); - kvStore.closeResultSet(resultSet).then((err) => { + kvStore.closeResultSet(resultSet).then(() => { console.info('Succeeded in closing resultSet'); }).catch((err) => { console.error(`Failed to close resultSet.code is ${err.code},message is ${err.message}`); @@ -6129,7 +6129,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); @@ -6194,7 +6194,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -6209,7 +6209,7 @@ try { } console.info('Succeeded in getting resultSet'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultSet.code is ${err.code},message is ${err.message}`); return; @@ -6266,7 +6266,7 @@ try { } console.info('Succeeded in getting result set'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); return; @@ -6326,7 +6326,7 @@ try { }).catch((err) => { console.error(`Failed to get resultset.code is ${err.code},message is ${err.message}`); }); - kvStore.closeResultSet(resultSet).then((err) => { + kvStore.closeResultSet(resultSet).then(() => { console.info('Succeeded in closing result set'); }).catch((err) => { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); @@ -6384,7 +6384,7 @@ try { } console.info('Succeeded in getting result set'); resultSet = result; - kvStore.closeResultSet(resultSet, function (err, data) { + kvStore.closeResultSet(resultSet, function (err) { if (err != undefined) { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); return; @@ -6449,7 +6449,7 @@ try { }).catch((err) => { console.error(`Failed to get resultset.code is ${err.code},message is ${err.message}`); }); - kvStore.closeResultSet(resultSet).then((err) => { + kvStore.closeResultSet(resultSet).then(() => { console.info('Succeeded in closing result set'); }).catch((err) => { console.error(`Failed to close resultset.code is ${err.code},message is ${err.message}`); @@ -6499,7 +6499,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { console.info('Succeeded in putting batch'); const query = new distributedKVStore.Query(); query.prefixKey("batch_test"); @@ -6561,7 +6561,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); @@ -6623,7 +6623,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries, async function (err, data) { + kvStore.putBatch(entries, async function (err) { if (err != undefined) { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); return; @@ -6695,7 +6695,7 @@ try { } entries.push(entry); } - kvStore.putBatch(entries).then(async (err) => { + kvStore.putBatch(entries).then(async () => { console.info('Succeeded in putting batch'); }).catch((err) => { console.error(`Failed to put batch.code is ${err.code},message is ${err.message}`); diff --git a/zh-cn/application-dev/reference/apis/js-apis-enterprise-applicationManager.md b/zh-cn/application-dev/reference/apis/js-apis-enterprise-applicationManager.md index 58e878092cce57306a64218be9453ede4ff2d41e..2a97cd1ea3daeea613da560b9865752772eba7cf 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-enterprise-applicationManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-enterprise-applicationManager.md @@ -17,7 +17,7 @@ import applicationManager from '@ohos.enterprise.applicationManager'; addDisallowedRunningBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void; -指定设备管理员应用添加应用运行黑名单接口,使用callback形式返回是否添加成功。添加至黑名单的应用不允许在管理员用户下运行,否则允许运行。 +指定设备管理员应用添加应用运行黑名单接口,使用callback形式返回是否添加成功。添加至黑名单的应用不允许在当前用户下运行,否则允许运行。 **需要权限:** ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -302,7 +302,7 @@ applicationManager.removeDisallowedRunningBundles(wantTemp, appIds, 100).then(() getDisallowedRunningBundles(admin: Want, callback: AsyncCallback<Array<string>>): void; -指定管理员应用获取管理员用户下的应用运行黑名单接口,使用callback形式返回获取应用运行黑名单。 +指定管理员应用获取当前用户下的应用运行黑名单接口,使用callback形式返回获取应用运行黑名单。 **需要权限:** ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -389,7 +389,7 @@ applicationManager.getDisallowedRunningBundles(wantTemp, 100, (error) => { getDisallowedRunningBundles(admin: Want, userId?: number): Promise<Array<string>>; -如果调用接口时传入参数userId,指定管理员应用获取指定用户下应用运行黑名单接口,如果调用接口时没有传入参数userId,指定管理员应用获取当前用户下应用运行黑名单接口,使用promise形式返回获取应用运行黑名单。 +指定管理员应用获取指定用户或当前用户下应用运行黑名单接口,使用promise形式返回获取应用运行黑名单。如果调用接口时传入参数userId,表示获取指定用户下应用运行黑名单,如果调用接口没有传入参数userId,表示获取当前用户下应用运行黑名单。 **需要权限:** ohos.permission.ENTERPRISE_MANAGE_SET_APP_RUNNING_POLICY @@ -408,7 +408,7 @@ getDisallowedRunningBundles(admin: Want, userId?: number): Promise<Array<s | 类型 | 说明 | | --------------------- | ------------------------- | -| Promise<Array<string>> | Promise对象,返回管理员用户下的应用运行黑名单。 | +| Promise<Array<string>> | Promise对象,返回当前用户下的应用运行黑名单。 | **错误码**: diff --git a/zh-cn/application-dev/reference/apis/js-apis-enterprise-bundleManager.md b/zh-cn/application-dev/reference/apis/js-apis-enterprise-bundleManager.md index fd67acd688993624dfac366381a95d99215642c0..54fbe16a28809223ffc5608c0e392f7ed1578307 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-enterprise-bundleManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-enterprise-bundleManager.md @@ -17,7 +17,7 @@ import bundleManager from '@ohos.enterprise.bundleManager'; addAllowedInstallBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void; -指定设备管理员应用添加包安装白名单接口,添加至白名单的应用允许在管理员用户下安装,否则不允许安装,使用callback形式返回是否添加成功。 +指定设备管理员应用添加包安装白名单接口,添加至白名单的应用允许在当前用户下安装,否则不允许安装,使用callback形式返回是否添加成功。 **需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -301,7 +301,7 @@ bundleManager.removeAllowedInstallBundles(wantTemp, appIds, 100).then(() => { getAllowedInstallBundles(admin: Want, callback: AsyncCallback<Array<string>>): void; -指定管理员应用获取管理员用户下的包安装白名单接口,使用callback形式返回获取包安装白名单。 +指定管理员应用获取当前用户下的包安装白名单接口,使用callback形式返回获取包安装白名单。 **需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -388,7 +388,7 @@ bundleManager.getAllowedInstallBundles(wantTemp, 100, (error) => { getAllowedInstallBundles(admin: Want, userId?: number): Promise<Array<string>>; -如果调用接口时传入参数userId,指定管理员应用获取指定用户下包安装白名单接口,如果调用接口时没有传入参数userId,指定管理员应用获取当前用户下包安装白名单接口,使用promise形式返回获取包安装白名单。 +指定管理员应用获取指定用户或当前用户下包安装白名单接口,使用promise形式返回获取包安装白名单。如果调用接口时传入参数userId,表示获取指定用户下包安装白名单,如果调用接口没有传入参数userId,表示获取当前用户下包安装白名单。 **需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -407,7 +407,7 @@ getAllowedInstallBundles(admin: Want, userId?: number): Promise<Array<stri | 类型 | 说明 | | --------------------- | ------------------------- | -| Promise<Array<string>> | Promise对象,返回管理员用户下的包安装白名单。 | +| Promise<Array<string>> | Promise对象,返回当前用户下的包安装白名单。 | **错误码**: @@ -436,7 +436,7 @@ bundleManager.getAllowedInstallBundles(wantTemp, 100).then(() => { addDisallowedInstallBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void; -指定设备管理员应用添加包安装黑名单接口,添加至黑名单的应用不允许安装,使用callback形式返回是否添加成功。 +指定设备管理员应用添加包安装黑名单接口,添加至黑名单的应用不允许在当前用户下安装,使用callback形式返回是否添加成功。 **需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -720,7 +720,7 @@ bundleManager.removeDisallowedInstallBundles(wantTemp, appIds, 100).then(() => { getDisallowedInstallBundles(admin: Want, callback: AsyncCallback<Array<string>>): void; -指定管理员应用获取管理员用户下的包安装黑名单接口,使用callback形式返回获取包安装黑名单。 +指定管理员应用获取当前用户下的包安装黑名单接口,使用callback形式返回获取包安装黑名单。 **需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -807,7 +807,7 @@ bundleManager.getDisallowedInstallBundles(wantTemp, 100, (error) => { getDisallowedInstallBundles(admin: Want, userId?: number): Promise<Array<string>>; -如果调用接口时传入参数userId,指定管理员应用获取指定用户下包安装黑名单接口。如果调用接口时没有传入参数userId,指定管理员应用获取当前用户下包安装黑名单接口,使用promise形式返回获取包安装黑名单。 +指定管理员应用获取指定用户或当前用户下包安装黑名单接口,使用promise形式返回获取包安装黑名单。如果调用接口时传入参数userId,表示获取指定用户下包安装黑名单,如果调用接口没有传入参数userId,表示获取当前用户下包安装黑名单。 **需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY @@ -826,7 +826,7 @@ getDisallowedInstallBundles(admin: Want, userId?: number): Promise<Array<s | 类型 | 说明 | | --------------------- | ------------------------- | -| Promise<Array<string>> | Promise对象,返回管理员用户下的包安装白名单。 | +| Promise<Array<string>> | Promise对象,返回当前用户下的包安装白名单。 | **错误码**: @@ -849,3 +849,425 @@ bundleManager.getDisallowedInstallBundles(wantTemp, 100).then(() => { }).catch(error => { console.log("error code:" + error.code + " error message:" + error.message); }); + +## bundleManager.addDisallowedUninstallBundles + +addDisallowedUninstallBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void + +指定设备管理员应用添加包卸载黑名单接口,添加至黑名单的应用不允许在当前用户下卸载,使用callback形式返回是否添加成功。 + +**需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY + +**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager + +**系统API**: 此接口为系统接口。 + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ---------------------------------------- | ---- | ------------------------------- | +| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 | +| appIds | Array<string> | 是 | 应用ID数组。 | +| callback | AsyncCallback<void> | 是 | 回调函数。当接口调用成功,err为null,否则为错误对象。 | + +**错误码**: + +以下的错误码的详细介绍请参见[企业设备管理错误码](../errorcodes/errorcode-enterpriseDeviceManager.md) + +| 错误码ID | 错误信息 | +| ------- | ---------------------------------------------------------------------------- | +| 9200001 | the application is not an administrator of the device. | +| 9200002 | the administrator application does not have permission to manage the device. | + +**示例:** + +```js +let wantTemp = { + bundleName: "com.example.myapplication", + abilityName: "EntryAbility", +}; +let appIds = ["com.example.myapplication"]; + +bundleManager.addDisallowedUninstallBundles(wantTemp, appIds, (error) => { + if (error != null) { + console.log("error code:" + error.code + " error message:" + error.message); + } +}); +``` + +## bundleManager.addDisallowedUninstallBundles + +addDisallowedUninstallBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback<void>): void + +指定设备管理员应用添加包卸载黑名单接口,添加至黑名单的应用不允许在指定用户(通过userId指定)下卸载,使用callback形式返回是否添加成功。 + +**需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY + +**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager + +**系统API**: 此接口为系统接口。 + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ----- | ----------------------------------- | ---- | ------- | +| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 | +| appIds | Array<string> | 是 | 应用ID数组。 | +| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 | +| callback | AsyncCallback<void> | 是 | 回调函数,当接口调用成功,err为null,否则为错误对象。 | + +**错误码**: + +以下的错误码的详细介绍请参见[企业设备管理错误码](../errorcodes/errorcode-enterpriseDeviceManager.md) + +| 错误码ID | 错误信息 | +| ------- | ---------------------------------------------------------------------------- | +| 9200001 | the application is not an administrator of the device. | +| 9200002 | the administrator application does not have permission to manage the device. | + +**示例:** + +```js +let wantTemp = { + bundleName: "com.example.myapplication", + abilityName: "EntryAbility", +}; +let appIds = ["com.example.myapplication"]; + +bundleManager.addDisallowedUninstallBundles(wantTemp, appIds, 100, (error) => { + if (error != null) { + console.log("error code:" + error.code + " error message:" + error.message); + } +}); +``` + +## bundleManager.addDisallowedUninstallBundles + +addDisallowedUninstallBundles(admin: Want, appIds: Array\, userId?: number): Promise<void> + +指定设备管理员应用添加包卸载黑名单接口。如果调用接口时传入了可选参数userId,则添加至黑名单的应用不允许在指定用户下卸载;如果调用接口时没有传入参数userId,则添加至黑名单的应用不允许在当前用户下卸载,使用promise形式返回是否添加成功。 + +**需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY + +**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager + +**系统API**: 此接口为系统接口。 + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ----- | ----------------------------------- | ---- | ------- | +| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 | +| appIds | Array<string> | 是 | 应用ID数组。 | +| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 | + +**返回值:** + +| 类型 | 说明 | +| --------------------- | ------------------------- | +| Promise<void> | 无返回结果的Promise对象。当指定设备管理员应用添加包卸载黑名单失败时会抛出错误对象。 | + +**错误码**: + +以下的错误码的详细介绍请参见[企业设备管理错误码](../errorcodes/errorcode-enterpriseDeviceManager.md) + +| 错误码ID | 错误信息 | +| ------- | ---------------------------------------------------------------------------- | +| 9200001 | the application is not an administrator of the device. | +| 9200002 | the administrator application does not have permission to manage the device. | + +**示例:** + +```js +let wantTemp = { + bundleName: "com.example.myapplication", + abilityName: "EntryAbility", +}; +let appIds = ["com.example.myapplication"]; + +bundleManager.addDisallowedUninstallBundles(wantTemp, appIds, 100).then(() => { + console.log("success"); +}).catch(error => { + console.log("error code:" + error.code + " error message:" + error.message); +}); +``` + +## bundleManager.removeDisallowedUninstallBundles + +removeDisallowedUninstallBundles(admin: Want, appIds: Array\, callback: AsyncCallback<void>): void + +指定设备管理员应用移除包卸载黑名单接口,在黑名单存在的情况下,在包卸载黑名单中的应用不允许在当前用户下卸载,使用callback形式返回移除结果。 + +**需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY + +**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager + +**系统API**: 此接口为系统接口。 + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ---------------------------------------- | ---- | ------------------------------- | +| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 | +| appIds | Array<string> | 是 | 应用ID数组。 | +| callback | AsyncCallback<void> | 是 | 回调函数。当接口调用成功,err为null,否则为错误对象。 | + +**错误码**: + +以下的错误码的详细介绍请参见[企业设备管理错误码](../errorcodes/errorcode-enterpriseDeviceManager.md) + +| 错误码ID | 错误信息 | +| ------- | ---------------------------------------------------------------------------- | +| 9200001 | the application is not an administrator of the device. | +| 9200002 | the administrator application does not have permission to manage the device. | + +**示例:** + +```js +let wantTemp = { + bundleName: "com.example.myapplication", + abilityName: "EntryAbility", +}; +let appIds = ["com.example.myapplication"]; + +bundleManager.removeDisallowedUninstallBundles(wantTemp, appIds, (error) => { + if (error != null) { + console.log("error code:" + error.code + " error message:" + error.message); + } +}); +``` + +## bundleManager.removeDisallowedUninstallBundles + +removeDisallowedUninstallBundles(admin: Want, appIds: Array\, userId: number, callback: AsyncCallback<void>): void + +指定设备管理员应用移除包卸载黑名单接口,在黑名单存在的情况下,在包卸载黑名单中的应用不允许在指定用户(通过userId指定)下卸载,使用callback形式返回移除结果。 + +**需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY + +**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager + +**系统API**: 此接口为系统接口。 + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ----- | ----------------------------------- | ---- | ------- | +| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 | +| appIds | Array<string> | 是 | 应用ID数组。 | +| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 | +| callback | AsyncCallback<void> | 是 | 回调函数。当接口调用成功,err为null,否则为错误对象。 | + +**错误码**: + +以下的错误码的详细介绍请参见[企业设备管理错误码](../errorcodes/errorcode-enterpriseDeviceManager.md) + +| 错误码ID | 错误信息 | +| ------- | ---------------------------------------------------------------------------- | +| 9200001 | the application is not an administrator of the device. | +| 9200002 | the administrator application does not have permission to manage the device. | + +**示例:** + +```js +let wantTemp = { + bundleName: "com.example.myapplication", + abilityName: "EntryAbility", +}; +let appIds = ["com.example.myapplication"]; + +bundleManager.removeDisallowedUninstallBundles(wantTemp, appIds, 100, (error) => { + if (error != null) { + console.log("error code:" + error.code + " error message:" + error.message); + } +}); +``` + +## bundleManager.removeDisallowedUninstallBundles + +removeDisallowedUninstallBundles(admin: Want, appIds: Array\, userId?: number): Promise<void> + +指定设备管理员应用移除包卸载黑名单接口。在黑名单存在的情况下,如果调用接口时传入参数userId,则在包卸载黑名单中的应用不允许在指定用户下卸载;如果调用接口时没有传入参数userId,则在包卸载黑名单中的应用不允许在当前用户下卸载,使用promise形式返回移除结果。 + +**需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY + +**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager + +**系统API**: 此接口为系统接口。 + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ----- | ----------------------------------- | ---- | ------- | +| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 | +| appIds | Array\<string> | 是 | 应用ID数组。 | +| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 | + +**返回值:** + +| 类型 | 说明 | +| --------------------- | ------------------------- | +| Promise<void> | 无返回结果的Promise对象。当指定设备管理员应用移除包卸载黑名单失败时会抛出错误对象。 | + +**错误码**: + +以下的错误码的详细介绍请参见[企业设备管理错误码](../errorcodes/errorcode-enterpriseDeviceManager.md) + +| 错误码ID | 错误信息 | +| ------- | ---------------------------------------------------------------------------- | +| 9200001 | the application is not an administrator of the device. | +| 9200002 | the administrator application does not have permission to manage the device. | + +**示例:** + +```js +let wantTemp = { + bundleName: "com.example.myapplication", + abilityName: "EntryAbility", +}; +let appIds = ["com.example.myapplication"]; + +bundleManager.removeDisallowedUninstallBundles(wantTemp, appIds, 100).then(() => { + console.log("success"); +}).catch(error => { + console.log("error code:" + error.code + " error message:" + error.message); +}); +``` + +## bundleManager.getDisallowedUninstallBundles + +getDisallowedUninstallBundles(admin: Want, callback: AsyncCallback<Array<string>>): void + +指定管理员应用获取当前用户下的包卸载黑名单接口,使用callback形式返回获取包卸载黑名单。 + +**需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY + +**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager + +**系统API**: 此接口为系统接口。 + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ---------------------------------------- | ---- | ------------------------------- | +| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 | +| callback | AsyncCallback<Array<string>> | 是 | 回调函数,当接口调用成功,err为null,否则为错误对象。 | + +**错误码**: + +以下的错误码的详细介绍请参见[企业设备管理错误码](../errorcodes/errorcode-enterpriseDeviceManager.md) + +| 错误码ID | 错误信息 | +| ------- | ---------------------------------------------------------------------------- | +| 9200001 | the application is not an administrator of the device. | +| 9200002 | the administrator application does not have permission to manage the device. | + +**示例:** + +```js +let wantTemp = { + bundleName: "com.example.myapplication", + abilityName: "EntryAbility", +}; + +bundleManager.getDisallowedUninstallBundles(wantTemp, (error, data) => { + if (error != null) { + console.log("error code:" + error.code + " error message:" + error.message); + } else { + console.log("success: " + data); + } +}); +``` + +## bundleManager.getDisallowedUninstallBundles + +getDisallowedUninstallBundles(admin: Want, userId: number, callback: AsyncCallback<Array<string>>): void + +指定管理员应用获取指定用户(通过userId指定)下的包卸载黑名单接口,使用callback形式返回获取包卸载黑名单。 + +**需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY + +**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager + +**系统API**: 此接口为系统接口。 + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ---------------------------------------- | ---- | ------------------------------- | +| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 | +| userId | number | 是 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 | +| callback | AsyncCallback<Array<string>> | 是 | 回调函数,当接口调用成功,err为null,否则为错误对象。 | + +**错误码**: + +以下的错误码的详细介绍请参见[企业设备管理错误码](../errorcodes/errorcode-enterpriseDeviceManager.md) + +| 错误码ID | 错误信息 | +| ------- | ---------------------------------------------------------------------------- | +| 9200001 | the application is not an administrator of the device. | +| 9200002 | the administrator application does not have permission to manage the device. | + +**示例:** + +```js +let wantTemp = { + bundleName: "com.example.myapplication", + abilityName: "EntryAbility", +}; + +bundleManager.getDisallowedUninstallBundles(wantTemp, 100, (error, data) => { + if (error != null) { + console.log("error code:" + error.code + " error message:" + error.message); + } else { + console.log("success: " + data); + } +}); +``` + +## bundleManager.getDisallowedUninstallBundles + +getDisallowedUninstallBundles(admin: Want, userId?: number): Promise<Array<string>> + +指定管理员应用获取指定用户或当前用户下包卸载黑名单接口,使用promise形式返回获取包卸载黑名单。如果调用接口时传入参数userId,表示获取指定用户下包卸载黑名单,如果调用接口没有传入参数userId,表示获取当前用户下包卸载黑名单。 + +**需要权限:** ohos.permission.ENTERPRISE_SET_BUNDLE_INSTALL_POLICY + +**系统能力:** SystemCapability.Customization.EnterpriseDeviceManager + +**系统API**: 此接口为系统接口。 + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ----- | ----------------------------------- | ---- | ------- | +| admin | [Want](js-apis-app-ability-want.md) | 是 | 设备管理员应用。 | +| userId | number | 否 | 用户ID。默认值:调用方所在用户,取值范围:大于等于0。 | + +**返回值:** + +| 类型 | 说明 | +| --------------------- | ------------------------- | +| Promise<Array<string>> | Promise对象,返回当前用户下的包卸载白名单。 | + +**错误码**: + +以下的错误码的详细介绍请参见[企业设备管理错误码](../errorcodes/errorcode-enterpriseDeviceManager.md) + +| 错误码ID | 错误信息 | +| ------- | ---------------------------------------------------------------------------- | +| 9200001 | the application is not an administrator of the device. | +| 9200002 | the administrator application does not have permission to manage the device. | + +**示例:** + +```js +let wantTemp = { + bundleName: "com.example.myapplication", + abilityName: "EntryAbility", +}; +bundleManager.getDisallowedUninstallBundles(wantTemp, 100).then((data) => { + console.log("success: " + data); +}).catch(error => { + console.log("error code:" + error.code + " error message:" + error.message); +}); diff --git a/zh-cn/application-dev/reference/apis/js-apis-file-backup.md b/zh-cn/application-dev/reference/apis/js-apis-file-backup.md index 7bd4e7512bff6bcaeaf953515c3d5da34f9048ee..62a1902faf944e082ec2e07221328f396009a770 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-file-backup.md +++ b/zh-cn/application-dev/reference/apis/js-apis-file-backup.md @@ -263,7 +263,7 @@ getLocalCapabilities(callback: AsyncCallback<FileData>): void "versionCode" : 1000000, "versionName" : "1.0.0" }], - "deviceType" : "phone", + "deviceType" : "default", "systemFullName" : "OpenHarmony-4.0.0.0" } ``` @@ -324,7 +324,7 @@ getLocalCapabilities(): Promise<FileData> "versionCode" : 1000000, "versionName" : "1.0.0" }], - "deviceType" : "phone", + "deviceType" : "default", "systemFullName" : "OpenHarmony-4.0.0.0" } ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-hisysevent.md b/zh-cn/application-dev/reference/apis/js-apis-hisysevent.md index b4aca61bee3cc90429b9b24a55188798d01b636c..e6f056289ace23b20e9e63ebb62f7f907a89277f 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-hisysevent.md +++ b/zh-cn/application-dev/reference/apis/js-apis-hisysevent.md @@ -313,6 +313,8 @@ try { | beginTime | number | 是 | 查询的系统事件起始时间(13位时间戳)。 | | endTime | number | 是 | 查询的系统事件结束时间(13位时间戳)。 | | maxEvents | number | 是 | 查询的系统事件最多条数。 | +| fromSeq10+ | number | 否 | 查询的系统事件起始序列号,默认值为-1。 | +| toSeq10+ | number | 否 | 查询的系统事件结束序列号,默认值为-1。 | ## QueryRule @@ -324,6 +326,7 @@ try { | -------- | -------- | -------- | -------- | | domain | string | 是 | 查询包含的事件领域。 | | names | string[] | 是 | 查询所包含的多个事件名称,每个查询规则对象包含多个系统事件名称。 | +| condition10+ | string | 否 | 事件的额外参数条件,格式:{"version":"V1","condition":{"and":[{"param":"参数","op":"操作符","value":"比较值"}]}} | ## Querier @@ -403,4 +406,199 @@ try { } catch (error) { console.error(`error code: ${error.code}, error msg: ${error.message}`); } -``` \ No newline at end of file +``` + +## hiSysEvent.exportSysEvents10+ + +exportSysEvents(queryArg: QueryArg, rules: QueryRule[]): number + +批量导出系统事件,以文件格式写入应用沙箱固定目录(/data/storage/el2/base/cache/hiview/event/)。 + +**需要权限:** ohos.permission.READ_DFX_SYSEVENT + +**系统能力:** SystemCapability.HiviewDFX.HiSysEvent + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ------------------------- | ---- | ------------------------------------------ | +| queryArg | [QueryArg](#queryarg) | 是 | 导出需要配置的查询参数。 | +| rules | [QueryRule](#queryrule)[] | 是 | 查询规则数组,每次导出可配置多个查询规则。 | + +**返回值:** + +| 类型 | 说明 | +| ------ | ---------------- | +| number | 接口调用时间戳。 | + +**错误码:** + +以下错误码的详细介绍请参见[系统事件错误码](../errorcodes/errorcode-hisysevent.md)。 + +| 错误码ID | 错误信息 | +| -------- | ----------------------------------- | +| 11200301 | Count of query rules is over limit. | +| 11200302 | Invalid query rule. | +| 11200304 | Export frequency is over limit. | + +**示例:** + +``` +import hiSysEvent from '@ohos.hiSysEvent'; +import fs from '@ohos.file.fs'; + +try { + hiSysEvent.write({ + domain: "RELIABILITY", + name: "STACK", + eventType: hiSysEvent.EventType.FAULT, + params: { + PID: 487, + UID: 103, + PACKAGE_NAME: "com.ohos.hisysevent.test", + PROCESS_NAME: "syseventservice", + MSG: "no msg." + } + }, (err, val) => { + // do something here. + }) + + let time = hiSysEvent.exportSysEvents({ + beginTime: -1, + endTime: -1, + maxEvents: 1, + }, [{ + domain: "RELIABILITY", + names: ["STACK"], + }]) + console.log(`receive export task time is : ${time}`); + + // 延迟读取本次导出的事件 + setTimeout(function() { + let eventDir = '/data/storage/el2/base/cache/hiview/event'; + let filenames = fs.listFileSync(eventDir); + for (let i = 0; i < filenames.length; i++) { + if (filenames[i].indexOf(time.toString()) != -1) { + let res = fs.readTextSync(eventDir + '/' + filenames[i]); + let events = JSON.parse('[' + res.slice(0, res.length - 1) + ']'); + console.log("read file end, events is :" + JSON.stringify(events)); + } + } + }, 10000) +} catch (error) { + console.error(`error code: ${error.code}, error msg: ${error.message}`); +} +``` + +## hiSysEvent.subscribe10+ + +subscribe(rules: QueryRule[]): number + +订阅实时系统事件(事件需满足低频率或偶发性的约束条件),事件发生时立即以文件格式写入应用沙箱固定目录(/data/storage/el2/base/cache/hiview/event/)。 + +**需要权限:** ohos.permission.READ_DFX_SYSEVENT + +**系统能力:** SystemCapability.HiviewDFX.HiSysEvent + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ------------------------- | ---- | ------------------------------------------ | +| rules | [QueryRule](#queryrule)[] | 是 | 查询规则数组,每次订阅可配置多个查询规则。 | + +**返回值:** + +| 类型 | 说明 | +| ------ | ---------------- | +| number | 接口调用时间戳。 | + +**错误码:** + +以下错误码的详细介绍请参见[系统事件错误码](../errorcodes/errorcode-hisysevent.md)。 + +| 错误码ID | 错误信息 | +| -------- | ----------------------------------- | +| 11200301 | Count of query rules is over limit. | +| 11200302 | Invalid query rule. | + +**示例:** + +``` +import hiSysEvent from '@ohos.hiSysEvent'; +import fs from '@ohos.file.fs'; + +try { + hiSysEvent.subscribe([{ + domain: "RELIABILITY", + names: ["STACK"], + },{ + domain: "BUNDLE_MANAGER", + names: ["BUNDLE_UNINSTALL"], + }]) + hiSysEvent.write({ + domain: "RELIABILITY", + name: "STACK", + eventType: hiSysEvent.EventType.FAULT, + params: { + PID: 487, + UID: 103, + PACKAGE_NAME: "com.ohos.hisysevent.test", + PROCESS_NAME: "syseventservice", + MSG: "no msg." + } + }, (err, val) => { + // do something here. + }) + + // 延迟读取订阅的事件 + setTimeout(function() { + let eventDir = '/data/storage/el2/base/cache/hiview/event'; + let filenames = fs.listFileSync(eventDir); + for (let i = 0; i < filenames.length; i++) { + let res = fs.readTextSync(eventDir + '/' + filenames[i]); + let events = JSON.parse('[' + res.slice(0, res.length - 1) + ']'); + console.log("read file end, events is :" + JSON.stringify(events)); + } + }, 10000) +} catch (error) { + console.error(`error code: ${error.code}, error msg: ${error.message}`); +} +``` + +## hiSysEvent.unsubscribe10+ + +unsubscribe(): void + +取消订阅系统事件。 + +**需要权限:** ohos.permission.READ_DFX_SYSEVENT + +**系统能力:** SystemCapability.HiviewDFX.HiSysEvent + +**错误码:** + +以下错误码的详细介绍请参见[系统事件错误码](../errorcodes/errorcode-hisysevent.md)。 + +| 错误码ID | 错误信息 | +| -------- | ------------------- | +| 11200305 | Unsubscribe failed. | + +**示例:** + +``` +import hiSysEvent from '@ohos.hiSysEvent'; + +try { + hiSysEvent.subscribe([{ + domain: "RELIABILITY", + names: ["STACK"], + },{ + domain: "BUNDLE_MANAGER", + names: ["BUNDLE_UNINSTALL","BUNDLE_INSTALL"], + }]) + hiSysEvent.unsubscribe(); +} catch (error) { + console.error(`error code: ${error.code}, error msg: ${error.message}`); +} +``` + diff --git a/zh-cn/application-dev/reference/apis/js-apis-http.md b/zh-cn/application-dev/reference/apis/js-apis-http.md index 516f58d1977bce818c3d0987cf1b5deff8650c7e..8828e0e1123f5b459fa6f3fa614bde4e1def4f8d 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-http.md +++ b/zh-cn/application-dev/reference/apis/js-apis-http.md @@ -862,7 +862,7 @@ httpRequest.off('dataProgress'); | 名称 | 类型 | 必填 | 说明 | | -------------- | --------------------------------------------- | ---- | ------------------------------------------------------------ | | method | [RequestMethod](#requestmethod) | 否 | 请求方式,默认为GET。 | -| extraData | string6+ \| Object6+ \| ArrayBuffer8+ | 否 | 发送请求的额外数据,默认无此字段。
- 当HTTP请求为POST、PUT等方法时,此字段为HTTP请求的content,以UTF-8编码形式作为请求体。当'Content-Type'为'application/x-www-form-urlencoded'时,请求提交的信息主体数据应在key和value进行URL转码后按照键值对"key1=value1&key2=value2&key3=value3"的方式进行编码。6+
- 当HTTP请求为GET、OPTIONS、DELETE、TRACE、CONNECT等方法时,此字段为HTTP请求参数的补充。开发者需传入Encode编码后的string类型参数,Object类型的参数无需预编码,参数内容会拼接到URL中进行发送;ArrayBuffer类型的参数不会做拼接处理。6+ | +| extraData | string6+ \| Object6+ \| ArrayBuffer8+ | 否 | 发送请求的额外数据,默认无此字段。
- 当HTTP请求为POST、PUT等方法时,此字段为HTTP请求的content,以UTF-8编码形式作为请求体。当'Content-Type'为'application/x-www-form-urlencoded'时,请求提交的信息主体数据应在key和value进行URL转码后按照键值对"key1=value1&key2=value2&key3=value3"的方式进行编码。- 当HTTP请求为GET、OPTIONS、DELETE、TRACE、CONNECT等方法时,此字段为HTTP请求参数的补充。开发者需传入Encode编码后的string类型参数,Object类型的参数无需预编码,参数内容会拼接到URL中进行发送;ArrayBuffer类型的参数不会做拼接处理。| | expectDataType9+ | [HttpDataType](#httpdatatype9) | 否 | 指定返回数据的类型,默认无此字段。如果设置了此参数,系统将优先返回指定的类型。 | | usingCache9+ | boolean | 否 | 是否使用缓存,默认为true。 | | priority9+ | number | 否 | 优先级,范围[1,1000],默认是1。 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-inputmethodengine.md b/zh-cn/application-dev/reference/apis/js-apis-inputmethodengine.md index 21a1a1b7c0f3e295e1103253faaf4558779b88f5..7520784617e7d482f965b82b715808b61fcd802b 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inputmethodengine.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inputmethodengine.md @@ -494,7 +494,7 @@ createPanel(ctx: BaseContext, info: PanelInfo, callback: AsyncCallback\): | 参数名 | 类型 | 必填 | 说明 | | ------- | ----------- | ---- | ------------------------ | -| ctx | [BaseContext](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-inner-application-baseContext.md) | 是 | 当前输入法应用上下文信息。 | +| ctx | [BaseContext](js-apis-inner-application-baseContext.md) | 是 | 当前输入法应用上下文信息。 | | info | [PanelInfo](#panelinfo10) | 是 | 输入法面板信息。 | | callback | AsyncCallback\<[Panel](#panel10)> | 是 | 回调函数。当输入法面板创建成功,返回当前创建的输入法面板对象。 | @@ -538,7 +538,7 @@ createPanel(ctx: BaseContext, info: PanelInfo): Promise\ | 参数名 | 类型 | 必填 | 说明 | | ------- | ----------- | ---- | ------------------------ | -| ctx | [BaseContext](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-inner-application-baseContext.md) | 是 | 当前输入法应用上下文信息。 | +| ctx | [BaseContext](js-apis-inner-application-baseContext.md) | 是 | 当前输入法应用上下文信息。 | | info | [PanelInfo](#panelinfo10) | 是 | 输入法面板信息。 | **返回值:** @@ -2521,8 +2521,8 @@ try { | 名称 | 类型 | 可读 | 可写 | 说明 | | --------- | -------- | ---- | ---- | ------------ | -| keyCode | number | 是 | 否 | 按键的键值。 | -| keyAction | number | 是 | 否 | 按键的状态。 | +| keyCode | number | 是 | 否 | 按键的键值。键码值说明参考[KeyCode](js-apis-keycode.md#keycode)。 | +| keyAction | number | 是 | 否 | 按键事件类型。
- 当值为2时,表示按下事件;
- 当值为3时,表示抬起事件。 | ## PanelFlag10+ diff --git a/zh-cn/application-dev/reference/apis/js-apis-installer.md b/zh-cn/application-dev/reference/apis/js-apis-installer.md index a42897bcb27dde426ab7734dc8e694e84077054c..a7a8e000760c564b4c9cc8b09c7023ceafa7b7d1 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-installer.md +++ b/zh-cn/application-dev/reference/apis/js-apis-installer.md @@ -773,7 +773,7 @@ try { | installFlag | number | 否 | 指示安装标志,枚举值:0:应用初次安装,1:应用覆盖安装,默认值为应用初次安装 | | isKeepData | boolean | 否 | 卸载时是否保留数据目录,默认值为false。 | | hashParams | Array<[HashParam](#hashparam)> | 否 | 哈希值参数,默认值为空。 | -| crowdtestDeadline| number | 否 |[众测](https://developer.huawei.com/consumer/cn/agconnect/crowd-test/)截止日期,默认值为-1。 | +| crowdtestDeadline| number | 否 | 众测活动的截止日期,默认值为-1,表示无截止日期约束。 | | sharedBundleDirPaths10+ | Array\ | 否 |共享包文件所在路径,默认值为空。 | ## UninstallParam10+ diff --git a/zh-cn/application-dev/reference/apis/js-apis-media.md b/zh-cn/application-dev/reference/apis/js-apis-media.md index a0464c42c0ff9a00722a388d8e93f6780caa6206..e5136037e5111c3e80ca8d21b95c970645a47b33 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-media.md +++ b/zh-cn/application-dev/reference/apis/js-apis-media.md @@ -309,18 +309,19 @@ Codec MIME类型枚举。 **系统能力:** SystemCapability.Multimedia.Media.Core -| 名称 | 值 | 说明 | -| ------------------------ | --------------- | ------------------------------------------------------------ | -| MD_KEY_TRACK_INDEX | 'track_index' | 表示轨道序号,其对应键值类型为number。 | -| MD_KEY_TRACK_TYPE | 'track_type' | 表示轨道类型,其对应键值类型为number,参考[MediaType](#mediatype8)。 | -| MD_KEY_CODEC_MIME | 'codec_mime' | 表示codec_mime类型,其对应键值类型为string。 | -| MD_KEY_DURATION | 'duration' | 表示媒体时长,其对应键值类型为number,单位为毫秒(ms)。 | -| MD_KEY_BITRATE | 'bitrate' | 表示比特率,其对应键值类型为number,单位为比特率(bps)。 | -| MD_KEY_WIDTH | 'width' | 表示视频宽度,其对应键值类型为number,单位为像素(px)。 | -| MD_KEY_HEIGHT | 'height' | 表示视频高度,其对应键值类型为number,单位为像素(px)。 | -| MD_KEY_FRAME_RATE | 'frame_rate' | 表示视频帧率,其对应键值类型为number,单位为100帧每秒(100fps)。 | -| MD_KEY_AUD_CHANNEL_COUNT | 'channel_count' | 表示声道数,其对应键值类型为number。 | -| MD_KEY_AUD_SAMPLE_RATE | 'sample_rate' | 表示采样率,其对应键值类型为number,单位为赫兹(Hz)。 | +| 名称 | 值 | 说明 | +| ----------------------------- | --------------- | ------------------------------------------------------------ | +| MD_KEY_TRACK_INDEX | 'track_index' | 表示轨道序号,其对应键值类型为number。 | +| MD_KEY_TRACK_TYPE | 'track_type' | 表示轨道类型,其对应键值类型为number,参考[MediaType](#mediatype8)。 | +| MD_KEY_CODEC_MIME | 'codec_mime' | 表示codec_mime类型,其对应键值类型为string。 | +| MD_KEY_DURATION | 'duration' | 表示媒体时长,其对应键值类型为number,单位为毫秒(ms)。 | +| MD_KEY_BITRATE | 'bitrate' | 表示比特率,其对应键值类型为number,单位为比特率(bps)。 | +| MD_KEY_WIDTH | 'width' | 表示视频宽度,其对应键值类型为number,单位为像素(px)。 | +| MD_KEY_HEIGHT | 'height' | 表示视频高度,其对应键值类型为number,单位为像素(px)。 | +| MD_KEY_FRAME_RATE | 'frame_rate' | 表示视频帧率,其对应键值类型为number,单位为100帧每秒(100fps)。 | +| MD_KEY_AUD_CHANNEL_COUNT | 'channel_count' | 表示声道数,其对应键值类型为number。 | +| MD_KEY_AUD_SAMPLE_RATE | 'sample_rate' | 表示采样率,其对应键值类型为number,单位为赫兹(Hz)。 | +| MD_KEY_LANGUAGE10+ | "language" | 表示语言信息,其对应键值类型为string。 | ## BufferingInfoType8+ @@ -580,7 +581,7 @@ avPlayer.prepare().then(() => { play(callback: AsyncCallback\): void -通过回调方式开始播放音视频资源,只能在prepared/paused/complete状态调用。 +通过回调方式开始播放音视频资源,只能在prepared/paused/completed状态调用。 **系统能力:** SystemCapability.Multimedia.Media.AVPlayer @@ -614,7 +615,7 @@ avPlayer.play((err) => { play(): Promise\ -通过Promise方式开始播放音视频资源,只能在prepared/paused/complete状态调用。 +通过Promise方式开始播放音视频资源,只能在prepared/paused/completed状态调用。 **系统能力:** SystemCapability.Multimedia.Media.AVPlayer @@ -712,7 +713,7 @@ avPlayer.pause().then(() => { stop(callback: AsyncCallback\): void -通过回调方式停止播放音视频资源,只能在prepared/playing/paused/complete状态调用。 +通过回调方式停止播放音视频资源,只能在prepared/playing/paused/completed状态调用。 **系统能力:** SystemCapability.Multimedia.Media.AVPlayer @@ -746,7 +747,7 @@ avPlayer.stop((err) => { stop(): Promise\ -通过Promise方式停止播放音视频资源,只能在prepared/playing/paused/complete状态调用。 +通过Promise方式停止播放音视频资源,只能在prepared/playing/paused/completed状态调用。 **系统能力:** SystemCapability.Multimedia.Media.AVPlayer @@ -778,7 +779,7 @@ avPlayer.stop().then(() => { reset(callback: AsyncCallback\): void -通过回调方式重置播放,只能在initialized/prepared/playing/paused/complete/stopped/error状态调用。 +通过回调方式重置播放,只能在initialized/prepared/playing/paused/completed/stopped/error状态调用。 **系统能力:** SystemCapability.Multimedia.Media.AVPlayer @@ -812,7 +813,7 @@ avPlayer.reset((err) => { reset(): Promise\ -通过Promise方式通过Promise方式重置播放,只能在initialized/prepared/playing/paused/complete/stopped/error状态调用。 +通过Promise方式通过Promise方式重置播放,只能在initialized/prepared/playing/paused/completed/stopped/error状态调用。 **系统能力:** SystemCapability.Multimedia.Media.AVPlayer @@ -906,7 +907,7 @@ avPlayer.release().then(() => { }) ``` -### getTrackDescription9+ +### getTrackDescription9+ getTrackDescription(callback: AsyncCallback\>): void @@ -998,11 +999,129 @@ for (let i = 0; i < arrayDescription.length; i++) { } ``` +### selectTrack10+ + +selectTrack(index: number): void + +选择音频轨道,只能在prepared状态调用,可以通过监听[trackChange事件](#trackchange_on)确认是否生效。 + +**系统能力:** SystemCapability.Multimedia.Media.AVPlayer + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ------ | ---- | ------------------------------------------------------------ | +| index | number | 是 | 轨道序号,可以通过[getTrackDescription](#avplayer_gettrackdescription)获取。 | + +**示例:** + +```js +let index = 2 +avPlayer.setBitrate(index) +``` + +### deselectTrack10+ + +deselectTrack(index: number): void + +取消已经选择的音频轨道,取消后会播放默认音频轨道。只能在prepared状态调用,可以通过监听[trackChange事件](#trackchange_on)确认是否生效。 + +**系统能力:** SystemCapability.Multimedia.Media.AVPlayer + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ------ | ---- | ------------------------------------------------------------ | +| index | number | 是 | 轨道序号,可以通过[getCurrentTrack](#avplayer_getcurrenttrack)获取当前生效的轨道序号。 | + +**示例:** + +```js +let index = 2 +avPlayer.deselectTrack(index) +``` + +### getCurrentTrack10+ + +getCurrentTrack(trackType: MediaType, callback: AsyncCallback\): void + +通过回调方式获取当前生效的轨道序号,只能在prepared/playing/paused/completed状态调用。 + +**系统能力:** SystemCapability.Multimedia.Media.AVPlayer + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| --------- | ----------------------- | ---- | ------------------------------------------------------------ | +| trackType | [MediaType](#mediatype) | 是 | 媒体类型枚举。 | +| callback | AsyncCallback\ | 是 | 获取当前生效轨道序号回调方法,返回-1表示当前无该媒体类型轨道。 | + +**错误码:** + +以下错误码的详细介绍请参见[媒体错误码](../errorcodes/errorcode-media.md) + +| 错误码ID | 错误信息 | +| -------- | ------------------------------------------ | +| 5400102 | Operation not allowed. Return by callback. | + +**示例:** + +```js +let mediaType = media.MediaType.MEDIA_TYPE_AUD; +let trackIndex = null; + +avPlayer.getCurrentTrack(mediaType (err, index) => { + if (err == null) { + console.info('getCurrentTrack success'); + trackIndex = index; + } else { + console.error('getCurrentTrack failed and error is ' + err.message); + } +}); +``` + +### getCurrentTrack10+ + +getCurrentTrack(trackType: MediaType): Promise\ + +通过Promise方式获取当前生效的轨道序号,只能在prepared/playing/paused/completed状态调用。 + +**系统能力:** SystemCapability.Multimedia.Media.AVPlayer + +**返回值:** + +| 类型 | 说明 | +| ---------------- | ------------------------------------------------------------ | +| trackType | [MediaType](#mediatype) | +| Promise\ | 当前生效的轨道序号Promise返回值,-1表示当前无该媒体类型轨道。 | + +**错误码:** + +以下错误码的详细介绍请参见[媒体错误码](../errorcodes/errorcode-media.md) + +| 错误码ID | 错误信息 | +| -------- | ----------------------------------------- | +| 5400102 | Operation not allowed. Return by promise. | + +**示例:** + +```js +let mediaType = media.MediaType.MEDIA_TYPE_AUD; +let trackIndex = null; + +avPlayer.getCurrentTrack(mediaType).then((index) => { + console.info('getCurrentTrack success'); + trackIndex = index; +}).catch((err) => { + console.error('getCurrentTrack failed and catch error is ' + err.message); +}); +``` + ### seek9+ seek(timeMs: number, mode?:SeekMode): void -跳转到指定播放位置,只能在prepared/playing/paused/complete状态调用,可以通过[seekDone事件](#seekDone_on)确认是否生效。 +跳转到指定播放位置,只能在prepared/playing/paused/completed状态调用,可以通过[seekDone事件](#seekDone_on)确认是否生效。 注:直播场景不支持seek。 **系统能力:** SystemCapability.Multimedia.Media.AVPlayer @@ -1068,7 +1187,7 @@ avPlayer.off('seekDone') setSpeed(speed: PlaybackSpeed): void -设置倍速模式,只能在prepared/playing/paused/complete状态调用,可以通过[speedDone事件](#speedDone_on)确认是否生效。 +设置倍速模式,只能在prepared/playing/paused/completed状态调用,可以通过[speedDone事件](#speedDone_on)确认是否生效。 注:直播场景不支持setSpeed。 **系统能力:** SystemCapability.Multimedia.Media.AVPlayer @@ -1132,7 +1251,7 @@ avPlayer.off('speedDone') setBitrate(bitrate: number): void -选择要播放的指定比特率,仅对**HLS协议网络流**有效,只能在prepared/playing/paused/complete状态调用,可以通过[bitrateDone](#bitrateDone_on)事件确认是否生效。 +选择要播放的指定比特率,仅对**HLS协议网络流**有效,只能在prepared/playing/paused/completed状态调用,可以通过[bitrateDone](#bitrateDone_on)事件确认是否生效。 **系统能力:** SystemCapability.Multimedia.Media.AVPlayer @@ -1239,7 +1358,7 @@ avPlayer.off('availableBitrates') setVolume(volume: number): void -设置媒体播放音量,只能在prepared/playing/paused/complete状态调用,可以通过[volumeChange事件](#volumeChange_on)确认是否生效。 +设置媒体播放音量,只能在prepared/playing/paused/completed状态调用,可以通过[volumeChange事件](#volumeChange_on)确认是否生效。 **系统能力:** SystemCapability.Multimedia.Media.AVPlayer @@ -1604,6 +1723,49 @@ off(type: 'audioInterrupt'): void avPlayer.off('audioInterrupt') ``` +### on('trackChange')10+ + +on(type: 'trackChange', callback: (index: number, isSelect: boolean) => void): void; + +监听selectTrack和deselectTrack生效的事件。 + +**系统能力:** SystemCapability.Multimedia.Media.AVPlayer + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | -------- | ---- | ----------------------------------------------------- | +| type | string | 是 | 生效轨道变化事件回调类型,支持的事件:'trackChange'。 | +| callback | function | 是 | 生效轨道变化事件回调方法。 | + +**示例:** + +```js +avPlayer.on('trackChange', (index: number, isSelect: boolean) => { + console.info('trackChange success, and index is:' + index + ', isSelect is :' + isSelect) +}) +``` + +### off('trackChange')10+ + +off(type: 'trackChange'): void + +取消监听生效轨道变化事件。 + +**系统能力:** SystemCapability.Multimedia.Media.AVPlayer + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ------ | ---- | --------------------------------------------------------- | +| type | string | 是 | 生效轨道变化事件回调类型,取消注册的事件:'trackChange'。 | + +**示例:** + +```js +avPlayer.off('trackChange') +``` + ## AVPlayerState9+ [AVPlayer](#avplayer9)的状态机,可通过state属性主动获取当前状态,也可通过监听[stateChange](#stateChange_on)事件上报当前状态,状态机之间的切换规则,可参考[音频播放开发指导](../../media/using-avplayer-for-playback.md)。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-taskpool.md b/zh-cn/application-dev/reference/apis/js-apis-taskpool.md index c1806da517eef94093f34922214f794dd3a3227f..a67b484f61b77df887e2942115cea0277ea7a8e5 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-taskpool.md +++ b/zh-cn/application-dev/reference/apis/js-apis-taskpool.md @@ -1,4 +1,4 @@ -# @ohos.taskpool(使用任务池) +# @ohos.taskpool(启动任务池) 任务池(taskpool)作用是为应用程序提供一个多线程的运行环境,降低整体资源的消耗、提高系统的整体性能,且您无需关心线程实例的生命周期。您可以使用任务池API创建后台任务(Task),并对所创建的任务进行如任务执行、任务取消的操作。理论上您可以使用任务池API创建数量不受限制的任务,但是出于内存因素不建议您这样做。此外,不建议您在任务中执行阻塞操作,特别是无限期阻塞操作,长时间的阻塞操作占据工作线程,可能会阻塞其他任务调度,影响您的应用性能。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-zlib.md b/zh-cn/application-dev/reference/apis/js-apis-zlib.md index 9d4dbbd60d9b38010b3b11282103755fd0715520..c538eba261440d09e8071fa3f4b76c975dca1a3e 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-zlib.md +++ b/zh-cn/application-dev/reference/apis/js-apis-zlib.md @@ -248,6 +248,7 @@ decompressFile(inFile: string, outFile: string, options: Options, callback: Asyn | -------- | --------------------------------------| | 900001 | The input source file is invalid. | | 900002 | The input destination file is invalid. | +| 900003 | The input source file is not ZIP format or damaged. | **示例** @@ -298,6 +299,7 @@ decompressFile(inFile: string, outFile: string, options: Options): Promise\ **说明:** @@ -46,7 +46,7 @@ js标签中包含了实例名称、页面路由信息。 ``` { "app": { - "bundleName": "com.huawei.player", + "bundleName": "com.example.player", "version": { "code": 1, "name": "1.0" diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/offscreen_canvas.png b/zh-cn/application-dev/reference/arkui-ts/figures/offscreen_canvas.png new file mode 100644 index 0000000000000000000000000000000000000000..6408dcb81dc4e02287e5bf7b714534a4a48de12a Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/offscreen_canvas.png differ diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/offscreen_canvas_height.png b/zh-cn/application-dev/reference/arkui-ts/figures/offscreen_canvas_height.png new file mode 100644 index 0000000000000000000000000000000000000000..69818ec80dd321547d5dfc97333409512f1e83d3 Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/offscreen_canvas_height.png differ diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/offscreen_canvas_transferToImageBitmap.png b/zh-cn/application-dev/reference/arkui-ts/figures/offscreen_canvas_transferToImageBitmap.png new file mode 100644 index 0000000000000000000000000000000000000000..774081139d8c0e38406966a718b394584ded9b01 Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/offscreen_canvas_transferToImageBitmap.png differ diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/offscreen_canvas_width.png b/zh-cn/application-dev/reference/arkui-ts/figures/offscreen_canvas_width.png new file mode 100644 index 0000000000000000000000000000000000000000..d920c43bb9215e144b1bf5ac4362999a41da22c0 Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/offscreen_canvas_width.png differ diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/size.jpeg b/zh-cn/application-dev/reference/arkui-ts/figures/size.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..b89a721447db8981ebe3fb34bccbfd939dd1f91e Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/size.jpeg differ diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/size.png b/zh-cn/application-dev/reference/arkui-ts/figures/size.png deleted file mode 100644 index 5170abe9fb68747018cecc57e27df68806bafac4..0000000000000000000000000000000000000000 Binary files a/zh-cn/application-dev/reference/arkui-ts/figures/size.png and /dev/null differ diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-gauge.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-gauge.md index f0cdf20e57b7dba240039a1cb6add8de68ae0959..186fc08864a5b5a8da793bd3f3b1fed536f940a0 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-gauge.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-gauge.md @@ -47,7 +47,7 @@ Gauge(options:{value: number, min?: number, max?: number}) | 名称 | 类型定义 | 描述 | | --------- | -------------------- | ------------------------------------------------------------ | -| ColorStop | [[ResourceColor](ts-types.md#resourcecolor), number] | 描述渐进色颜色断点类型,第一个参数为颜色值,若设置为非颜色类型,则置为黑色。第二个参数为颜色所占比重,若设置为负数或是非数值类型,则将比重置为0,该颜色不显示。 | +| ColorStop | [[ResourceColor](ts-types.md#resourcecolor), number] | 描述渐进色颜色断点类型,第一个参数为颜色值,若设置为非颜色类型,则置为黑色。第二个参数为颜色所占比重,若设置为负数或是非数值类型,则将比重置为0。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-marquee.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-marquee.md index bbf92272113f7c71bcfdeaeee4570e11947566cc..749862d2f2a64193ca641ab384426e0b223845bb 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-marquee.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-marquee.md @@ -33,7 +33,7 @@ Marquee(value: { start: boolean, step?: number, loop?: number, fromStart?: boole | 名称 | 参数类型 | 描述 | | ---------- | -------- | ------------------------------------------------------------ | -| allowScale | boolean | 是否允许文本缩放。
默认值:false
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| allowScale | boolean | 是否允许文本缩放。
暂不支持该接口。
默认值:false
| ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md index fb9a962a564af2c5cf963a16d996e0d1b457270d..b187df205a98398277c003fb42f1f2fbbc3d21db 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md @@ -6,7 +6,7 @@ > > 该组件从API Version 7开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 > -> 该组件从API Version 10开始支持继承父组件Text的属性,即如果子组件未设置属性且父组件设置属性,则继承父组件设置的属性。支持继承的属性仅包括:fontColor、fontSize、fontStyle、fontWeight、decoration、letterSpacing、textCase、lineHeight、fontfamily。 +> 该组件从API Version 10开始支持继承父组件Text的属性,即如果子组件未设置属性且父组件设置属性,则继承父组件设置的属性。支持继承的属性仅包括:fontColor、fontSize、fontStyle、fontWeight、decoration、letterSpacing、textCase、fontfamily。 ## 子组件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-components-offscreencanvas.md b/zh-cn/application-dev/reference/arkui-ts/ts-components-offscreencanvas.md new file mode 100644 index 0000000000000000000000000000000000000000..7ccf634162c6dacf44c116226c20b8fcbface455 --- /dev/null +++ b/zh-cn/application-dev/reference/arkui-ts/ts-components-offscreencanvas.md @@ -0,0 +1,232 @@ +# OffscreenCanvas + +OffscreenCanvas组件用于自定义绘制图形。 + +使用[Canvas](ts-components-canvas-canvas.md)组件或[Canvas API](ts-canvasrenderingcontext2d.md)时,渲染、动画和用户交互通常发生在应用程序的主线程上,与画布动画和渲染相关的计算可能会影响应用程序性能。OffscreenCanvas提供了一个可以在屏幕外渲染的画布,这样可以在单独的线程中运行一些任务,从而避免影响应用程序主线程性能。 + +> **说明:** +> +> 该组件从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 + +## 子组件 + +不支持。 + +## 接口 + +OffscreenCanvas(width: number, height: number) + +从API version 9开始,该接口支持在ArkTS卡片中使用。 + +**参数:** + +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ------ | -------- | ---- | ------ | ------------------------------------- | +| width | number | 是 | 0 | OffscreenCanvas组件的宽度,单位为vp。 | +| height | number | 是 | 0 | OffscreenCanvas组件的高度,单位为vp。 | + +## 属性 + +除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性: + +| 名称 | 类型 | 默认值 | 描述 | +| ------ | ------ | ------ | ------------------------------------------------------------ | +| width | number | 0 | OffscreenCanvas组件的宽度,单位为vp。从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| height | number | 0 | OffscreenCanvas组件的高度,单位为vp。从API version 9开始,该接口支持在ArkTS卡片中使用。 | + +### width + +```ts +// xxx.ets +@Entry +@Component +struct OffscreenCanvasPage { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offCanvas: OffscreenCanvas = new OffscreenCanvas(200, 300) + + build() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Start }) { + Column() { + Canvas(this.context) + .width('100%') + .height('100%') + .borderWidth(5) + .borderColor('#00FF00') + .backgroundColor('#FFFFFF') + .onReady(() => { + var offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = '#CDCDCD' + offContext.fillRect(0, 0, this.offCanvas.width, 150) + var image = this.offCanvas.transferToImageBitmap() + this.context.setTransform(1, 0, 0, 1, 50, 200) + this.context.transferFromImageBitmap(image) + }) + } + }.width('100%').height('100%') + } +} +``` + +![zh-cn_image_0000001194032666](figures/offscreen_canvas_width.png) + +### height + +```ts +// xxx.ets +@Entry +@Component +struct OffscreenCanvasPage { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offCanvas: OffscreenCanvas = new OffscreenCanvas(200, 300) + + build() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Start }) { + Column() { + Canvas(this.context) + .width('100%') + .height('100%') + .borderWidth(5) + .borderColor('#00FF00') + .backgroundColor('#FFFFFF') + .onReady(() => { + var offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = '#CDCDCD' + offContext.fillRect(0, 0, 100, this.offCanvas.height) + var image = this.offCanvas.transferToImageBitmap() + this.context.setTransform(1, 0, 0, 1, 50, 200) + this.context.transferFromImageBitmap(image) + }) + } + }.width('100%').height('100%') + } +} +``` + +![zh-cn_image_0000001194032666](figures/offscreen_canvas_height.png) + +## 方法 + +### transferToImageBitmap + +transferToImageBitmap(): ImageBitmap + +从OffscreenCanvas组件中最近渲染的图像创建一个ImageBitmap对象。 + +从API version 9开始,该接口支持在ArkTS卡片中使用。 + +**返回值:** + +| 类型 | 描述 | +| -------------------------------------------------- | ----------------------- | +| [ImageBitmap](ts-components-canvas-imagebitmap.md) | 创建的ImageBitmap对象。 | + +**示例:** + +```ts +// xxx.ets +@Entry +@Component +struct OffscreenCanvasPage { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(300, 500) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .borderWidth(5) + .borderColor('#00FF00') + .backgroundColor('#FFFFFF') + .onReady(() => { + var offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = '#CDCDCD' + offContext.fillRect(0, 0, 300, 500) + offContext.fillStyle = '#000000' + offContext.font = '70px serif bold' + offContext.fillText("Offscreen : Hello World!", 20, 60) + var image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} +``` + +![zh-cn_image_0000001194032666](figures/offscreen_canvas_transferToImageBitmap.png) + +### getContext10+ + +getContext(contextType: "2d", option?: RenderingContextSettings): OffscreenCanvasRenderingContext2D + +返回OffscreenCanvas组件的绘图上下文。 + +**参数:** + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| ----------- | ------------------------------------------------------------ | ---- | ------ | ------------------------------------------------------------ | +| contextType | string | 是 | "2d" | OffscreenCanvas组件绘图上下文的类型。 | +| option | [RenderingContextSettings](ts-canvasrenderingcontext2d.md#renderingcontextsettings) | 否 | - | 见[RenderingContextSettings](ts-canvasrenderingcontext2d.md#renderingcontextsettings)。 | + +**返回值:** + +| 类型 | 描述 | +| ------------------------------------------------------------ | --------------------------------- | +| [OffscreenCanvasRenderingContext2D](ts-offscreencanvasrenderingcontext2d.md) | OffscreenCanvas组件的绘图上下文。 | + +**示例:** + +```ts +@Entry +@Component +struct OffscreenCanvasExamplePage { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offscreenCanvas: OffscreenCanvas = new OffscreenCanvas(600, 800) + + build() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Start }) { + Column() { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#FFFFFF') + .onReady(() => { + var offContext = this.offscreenCanvas.getContext("2d", this.settings) + offContext.font = '70px sans-serif' + offContext.fillText("Offscreen : Hello World!", 20, 60) + offContext.fillStyle = "#0000ff" + offContext.fillRect(230, 350, 50, 50) + offContext.fillStyle = "#EE0077" + offContext.translate(70, 70) + offContext.fillRect(230, 350, 50, 50) + offContext.fillStyle = "#77EE0077" + offContext.translate(-70, -70) + offContext.fillStyle = "#00ffff" + offContext.rotate(45 * Math.PI / 180); + offContext.fillRect(180, 120, 50, 50); + offContext.rotate(-45 * Math.PI / 180); + offContext.beginPath() + offContext.moveTo(10, 150) + offContext.bezierCurveTo(20, 100, 200, 100, 200, 20) + offContext.stroke() + offContext.fillStyle = '#FF00FF' + offContext.fillRect(100, 100, 60, 60) + var imageData = this.offscreenCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(imageData) + }) + }.width('100%').height('100%') + } + .width('100%') + .height('100%') + } +} +``` + +![zh-cn_image_0000001194032666](figures/offscreen_canvas.png) + diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-relativecontainer.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-relativecontainer.md index 6390be6bf5545188807777190731bc67143aab6b..4672911bae011d0b55618299a5b85ddeec577bc1 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-relativecontainer.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-relativecontainer.md @@ -15,7 +15,7 @@ * 垂直方向为top, center, bottom,对应容器的VerticalAlign.Top, VerticalAlign.Center, VerticalAlign.Bottom。 * 子组件可以将容器或者其他子组件设为锚点: * 参与相对布局的容器内组件必须设置id,不设置id的组件不显示,容器id固定为__container__。 - * 此子组件某一方向上的三个位置可以将容器或其他子组件的同方向三个位置为锚点,同方向上两个以上位置设置锚点以后会跳过第三个。 + * 此子组件某一方向上的三个位置可以将容器或其他子组件的同方向三个位置为锚点,同方向上设置两个以上锚点的优先级。水平方向Start和Center优先,垂直方向Top和Center优先。 * 前端页面设置的子组件尺寸大小不会受到相对布局规则的影响。子组件某个方向上设置两个或以上alignRules时不建议设置此方向尺寸大小。 * 对齐后需要额外偏移可设置offset。 * 特殊情况 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md index 1f86949d0ec12e39742e9fa6ed74fefed8191fcd..087958ef8610100ccf6ec0ffdfd9687e55134a5a 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md @@ -131,11 +131,12 @@ currentOffset(): { xOffset: number, yOffset: number } ### scrollToIndex -scrollToIndex(value: number): void - +scrollToIndex(value: number, smooth?:boolean): void 滑动到指定Index。 +开启smooth动效时,会对经过的所有item进行加载和布局计算,当大量加载item时会导致性能问题。 + > **说明:** > @@ -143,10 +144,10 @@ scrollToIndex(value: number): void **参数:** -| 参数名 | 参数类型 | 必填 | 参数描述 | -| ------ | -------- | ---- | ---------------------------------- | -| value | number | 是 | 要滑动到的列表项在列表中的索引值。 | - +| 参数名 | 参数类型 | 必填 | 参数描述 | +| --------------------- | -------- | ---- | ------------------------------------------------------------ | +| value | number | 是 | 要滑动到的列表项在列表中的索引值。 | +| smooth10+  | boolean | 否 | 设置滑动到列表项在列表中的索引值时是否有动效,true表示有动效,false表示没有动效。
默认值:false。
**说明:**
当前仅List组件支持该参数。 | ### scrollBy9+ diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md index 5c0b0b53bffdb6ef76d7ae4a007410ca9382fdb7..129851a67c806ea1bd52c3574cedf07e5f72e171 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md @@ -45,11 +45,9 @@ Swiper(controller?: SwiperController) | cachedCount8+ | number | 设置预加载子组件个数。
默认值:1
**说明:**
cachedCount已经做了预加载的优化,不建议与[LazyForEach](../../quick-start/arkts-rendering-control-lazyforeach.md)一起使用。 | | disableSwipe8+ | boolean | 禁用组件滑动切换功能。
默认值:false | | curve8+ | [Curve](ts-appendix-enums.md#curve) \| string | 设置Swiper的动画曲线,默认为淡入淡出曲线,常用曲线参考[Curve枚举说明](ts-appendix-enums.md#curve),也可以通过[插值计算](../apis/js-apis-curve.md)模块提供的接口创建自定义的插值曲线对象。
默认值:Curve.Linear | -| indicatorStyle8+ | {
left?: [Length](ts-types.md#length),
top?: [Length](ts-types.md#length),
right?: [Length](ts-types.md#length),
bottom?: [Length](ts-types.md#length),
size?: [Length](ts-types.md#length),
mask?: boolean,
color?: [ResourceColor](ts-types.md),
selectedColor?: [ResourceColor](ts-types.md)
} | 设置导航点样式:
\- left: 设置导航点距离Swiper组件左边的距离。
\- top: 设置导航点距离Swiper组件顶部的距离。
\- right: 设置导航点距离Swiper组件右边的距离。
\- bottom: 设置导航点距离Swiper组件底部的距离。
\- size: 设置导航点的直径。
\- mask: 设置是否显示导航点蒙层样式。
\- color: 设置导航点的颜色。
\- selectedColor: 设置选中的导航点的颜色。 | +| indicatorStyle8+ | {
left?: [Length](ts-types.md#length),
top?: [Length](ts-types.md#length),
right?: [Length](ts-types.md#length),
bottom?: [Length](ts-types.md#length),
size?: [Length](ts-types.md#length),
mask?: boolean,
color?: [ResourceColor](ts-types.md),
selectedColor?: [ResourceColor](ts-types.md)
} | 设置导航点样式:
\- left: 设置导航点距离Swiper组件左边的距离。
\- top: 设置导航点距离Swiper组件顶部的距离。
\- right: 设置导航点距离Swiper组件右边的距离。
\- bottom: 设置导航点距离Swiper组件底部的距离。
\- size: 设置导航点的直径,不支持设置百分比。默认值:6vp。
\- mask: 设置是否显示导航点蒙层样式。
\- color: 设置导航点的颜色。
\- selectedColor: 设置选中的导航点的颜色。 | | displayCount8+ | number\|string | 设置一页内元素显示个数。
默认值:1
**说明:**
字符串类型仅支持设置为'auto',显示效果同SwiperDisplayMode.AutoLinear。
使用number类型时,子组件按照主轴均分Swiper宽度(减去displayCount-1的itemSpace)的方式进行主轴拉伸(收缩)布局。 | | effectMode8+ | [EdgeEffect](ts-appendix-enums.md#edgeeffect) | 滑动效果,目前支持的滑动效果参见EdgeEffect的枚举说明。
默认值:EdgeEffect.Spring
**说明:**
控制器接口调用时不生效回弹。 | -| nextMargin10+ |
[Length](ts-types.md#length)
| 后边距,用于露出后一项的一小部分。
默认值:0
**说明:**
仅当SwiperDisplayMode为STRETCH模式时生效。当cachedCount设置值小于等于0时,此时会露出后一项的一小部分,但无法加载子组件。 | -| prevMargin10+ |
[Length](ts-types.md#length)
| 前边距,用于露出前一项的一小部分。
默认值:0
**说明:**
仅当SwiperDisplayMode为STRETCH模式时生效。当cachedCount设置值小于等于0时,此时会露出前一项的一小部分,但无法加载子组件。 | ## SwiperDisplayMode枚举说明 @@ -92,10 +90,10 @@ finishAnimation(callback?: () => void): void | 参数名 | 参数类型 | 必填项 | 参数描述 | | ------ | -------- | ------ | ------------------------------------ | -| left | [Length](ts-types.md#length) | 否 | 设置导航点距离Swiper组件左边的距离。 | -| top | [Length](ts-types.md#length) | 否 | 设置导航点距离Swiper组件顶部的距离。 | -| right | [Length](ts-types.md#length) | 否 | 设置导航点距离Swiper组件右边的距离。 | -| bottom | [Length](ts-types.md#length) | 否 | 设置导航点距离Swiper组件底部的距离。 | +| left | [Length](ts-types.md#length) | 否 | 设置导航点距离Swiper组件左边的距离。
默认值:0
单位:vp | +| top | [Length](ts-types.md#length) | 否 | 设置导航点距离Swiper组件顶部的距离。
默认值:0
单位:vp | +| right | [Length](ts-types.md#length) | 否 | 设置导航点距离Swiper组件右边的距离。
默认值:0
单位:vp | +| bottom | [Length](ts-types.md#length) | 否 | 设置导航点距离Swiper组件底部的距离。
默认值:0
单位:vp | ### DotIndicator diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sheet-transition.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sheet-transition.md index e4ea2b85c1ae1c3e20bf41e2b6ea7bd7bd9b1df4..235648a9c0604eff8f30edad5e4aeab3a30a4a76 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sheet-transition.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sheet-transition.md @@ -5,6 +5,7 @@ > **说明: ** > > 从API Version 10开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 +> 不支持横竖屏切换。 ## 属性 diff --git a/zh-cn/application-dev/reference/errorcodes/Readme-CN.md b/zh-cn/application-dev/reference/errorcodes/Readme-CN.md index 2c99a4845ea42c57f896ce875bd2aded04446aef..5b9633e022fa0c75e2c316cb6f95adfb14ef7567 100644 --- a/zh-cn/application-dev/reference/errorcodes/Readme-CN.md +++ b/zh-cn/application-dev/reference/errorcodes/Readme-CN.md @@ -84,7 +84,7 @@ - [设备管理错误码](errorcode-device-manager.md) - [位置服务子系统错误码](errorcode-geoLocationManager.md) - [键鼠穿越管理错误码](errorcode-devicestatus.md) - - [键鼠穿越管理错误码 (待停用)](errorcode-multimodalinput.md) + - [键鼠穿越管理错误码(待停用)](errorcode-multimodalinput.md) - [传感器错误码](errorcode-sensor.md) - [振动错误码](errorcode-vibrator.md) - [系统参数错误码](errorcode-system-parameterV9.md) diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-net-ethernet.md b/zh-cn/application-dev/reference/errorcodes/errorcode-net-ethernet.md index 9da62b519dee086e40edcad453daee5e3c0a41b6..b0bb8ac27f07c7c2988099151e4a88897484c738 100644 --- a/zh-cn/application-dev/reference/errorcodes/errorcode-net-ethernet.md +++ b/zh-cn/application-dev/reference/errorcodes/errorcode-net-ethernet.md @@ -1,4 +1,4 @@ -# 以太网错误码 +# 以太网连接错误码 > **说明:** > diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-zlib.md b/zh-cn/application-dev/reference/errorcodes/errorcode-zlib.md index 7702ca82f46d12042a6b187df3cd2cf06b93e861..9d9d7bcf63c977f97afecf21dbe1cae380d9860f 100755 --- a/zh-cn/application-dev/reference/errorcodes/errorcode-zlib.md +++ b/zh-cn/application-dev/reference/errorcodes/errorcode-zlib.md @@ -41,4 +41,25 @@ The input destination file is invalid. **处理步骤** 1. 检查目标文件路径是否正确,如果不正确,填写正确的沙箱路径。 -2. 检查目标文件目录是否存在,如果不存在,新建这个路径。 \ No newline at end of file +2. 检查目标文件目录是否存在,如果不存在,新建这个路径。 + +## 900003 传入的源文件格式错误或者已损坏 + +**错误信息** + +The input source file is not ZIP format or damaged. + +**错误描述** + +当调用decompressFile接口时,传入源文件的压缩格式有误或者已损坏。 + + +**可能原因** + +1. 当调用decompressFile接口时,传入的源文件压缩格式有误。 +2. 当调用decompressFile接口时,传入的源文件不完整或已损坏。 + +**处理步骤** + +1. 检查源文件压缩格斯是否为ZIP格式。 +2. 检查源文件是否完整,如果是网络下载的,需要确保文件下载完成后再调用decompress接口。 \ No newline at end of file diff --git a/zh-cn/application-dev/reference/native-apis/Readme-CN.md b/zh-cn/application-dev/reference/native-apis/Readme-CN.md index 56e89cb8de8e3a8bd38b57dbfd595ed7e2d6ad5b..569ecdaf38c86bec3bd8395c0f72509f4263407c 100644 --- a/zh-cn/application-dev/reference/native-apis/Readme-CN.md +++ b/zh-cn/application-dev/reference/native-apis/Readme-CN.md @@ -10,6 +10,7 @@ - [NativeVsync](_native_vsync.md) - [Image](image.md) - [Rawfile](rawfile.md) + - [RDB](_r_d_b.md) - [MindSpore](_mind_spore.md) - [NeuralNeworkRuntime](_neural_nework_runtime.md) - [AudioDecoder](_audio_decoder.md) @@ -63,6 +64,12 @@ - [native_huks_api.h](native__huks__api_8h.md) - [native_huks_param.h](native__huks__param_8h.md) - [native_huks_type.h](native__huks__type_8h.md) + - [oh_cursor.h](oh__cursor_8h.md) + - [oh_predicates.h](oh__predicates_8h.md) + - [oh_value_object.h](oh__value__object_8h.md) + - [oh_values_bucket.h](oh__values__bucket_8h.md) + - [relation_error_code.h](relation__error__code_8h.md) + - [relation_store.h](relation__store_8h.md) - [syscap_ndk.h](syscap__ndk_8h.md) - 结构体 - [OH_Drawing_BitmapFormat](_o_h___drawing___bitmap_format.md) @@ -100,3 +107,9 @@ - [OH_Huks_ParamSet](_o_h___huks___param_set.md) - [OH_Huks_PubKeyInfo](_o_h___huks___pub_key_info.md) - [OH_Huks_Result](_o_h___huks___result.md) + - [OH_Cursor](_o_h___cursor.md) + - [OH_Predicates](_o_h___predicates.md) + - [OH_Rdb_Config](_o_h___rdb___config.md) + - [OH_Rdb_Store](_o_h___rdb___store.md) + - [OH_VBucket](_o_h___v_bucket.md) + - [OH_VObject](_o_h___v_object.md) diff --git a/zh-cn/application-dev/reference/native-apis/_audio_decoder.md b/zh-cn/application-dev/reference/native-apis/_audio_decoder.md index bd434a343ca936184a44d9c07b44710b844ff51a..566fab75c9b5f5683ed72af4f4aec7f768d88689 100644 --- a/zh-cn/application-dev/reference/native-apis/_audio_decoder.md +++ b/zh-cn/application-dev/reference/native-apis/_audio_decoder.md @@ -3,7 +3,7 @@ ## 概述 -AudioDecoder模块提供用于音频解码功能的函数。该模块在部分设备上可能不支持,可以通过[CanIUse](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/syscap.md)接口确认。 +AudioDecoder模块提供用于音频解码功能的函数。该模块在部分设备上可能不支持,可以通过[CanIUse](../syscap.md)接口确认。 @syscap SystemCapability.Multimedia.Media.AudioDecoder diff --git a/zh-cn/application-dev/reference/native-apis/_audio_encoder.md b/zh-cn/application-dev/reference/native-apis/_audio_encoder.md index 3c011bcc363ab52cb91aa0a969d43fcde062b2ba..9a0235deb7db5b5bc6b72c95ee5ce6ce341b3035 100644 --- a/zh-cn/application-dev/reference/native-apis/_audio_encoder.md +++ b/zh-cn/application-dev/reference/native-apis/_audio_encoder.md @@ -3,7 +3,7 @@ ## 概述 -AudioEncoder模块提供用于音频编码功能的函数。该模块在部分设备上可能不支持,可以通过[CanIUse](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/syscap.md)接口确认。 +AudioEncoder模块提供用于音频编码功能的函数。该模块在部分设备上可能不支持,可以通过[CanIUse](../syscap.md)接口确认。 @syscap SystemCapability.Multimedia.Media.AudioEncoder diff --git a/zh-cn/application-dev/reference/native-apis/_codec_base.md b/zh-cn/application-dev/reference/native-apis/_codec_base.md index aa3be62e1ec6e78273ea5fc1316d1f5d18d9eb9f..0246d18de02cae249484000f12c75e23a5119def 100644 --- a/zh-cn/application-dev/reference/native-apis/_codec_base.md +++ b/zh-cn/application-dev/reference/native-apis/_codec_base.md @@ -3,7 +3,7 @@ ## 概述 -CodecBase模块提供运行音视频编解码通用的结构体、字符常量、枚举。该模块在部分设备上可能不支持,可以通过[CanIUse](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/syscap.md)接口确认。 +CodecBase模块提供运行音视频编解码通用的结构体、字符常量、枚举。该模块在部分设备上可能不支持,可以通过[CanIUse](../syscap.md)接口确认。 @syscap SystemCapability.Multimedia.Media.CodecBase diff --git a/zh-cn/application-dev/reference/native-apis/_mind_spore.md b/zh-cn/application-dev/reference/native-apis/_mind_spore.md index 25e71ee14487b95e300e9f7a8d4f7090ed292b2e..5a39e666d0951b461e9a3112e635d49e3986f300 100644 --- a/zh-cn/application-dev/reference/native-apis/_mind_spore.md +++ b/zh-cn/application-dev/reference/native-apis/_mind_spore.md @@ -56,7 +56,7 @@ | [OH_AI_TensorHandleArray](#oh_ai_tensorhandlearray) | 张量数组结构体,用于存储张量数组指针和张量数组长度 | | [OH_AI_ShapeInfo](_o_h___a_i___shape_info.md) | 维度信息,最大的维度为MS_MAX_SHAPE_NUM。 | | [OH_AI_CallBackParam](#oh_ai_callbackparam) | 回调函数中传入的算子信息。 | -| [OH_AI_KernelCallBack](#oh_ai_kernelcallback)) (const [OH_AI_TensorHandleArray](_o_h___a_i___tensor_handle_array.md) inputs, const [OH_AI_TensorHandleArray](_o_h___a_i___tensor_handle_array.md) outputs, const [OH_AI_CallBackParam](_o_h___a_i___call_back_param.md) kernel_Info) | 回调函数指针。 | +| [OH_AI_KernelCallBack](#oh_ai_kernelcallback) | 回调函数指针。 | | [OH_AI_Status](#oh_ai_status) | Minspore的状态码。 | | [OH_AI_TensorHandle](#oh_ai_tensorhandle) | 指向张量对象句柄。 | | [OH_AI_ModelType](#oh_ai_modeltype) | 模型文件的类型。 | @@ -94,11 +94,11 @@ | [OH_AI_ContextGetThreadAffinityMode](#oh_ai_contextgetthreadaffinitymode) (const [OH_AI_ContextHandle](#oh_ai_contexthandle) context) | 获取运行时线程绑定CPU核心的策略。 | | [OH_AI_ContextSetThreadAffinityCoreList](#oh_ai_contextsetthreadaffinitycorelist) ([OH_AI_ContextHandle](#oh_ai_contexthandle) context, const int32_t \*core_list, size_t core_num) | 设置运行时线程绑定CPU核心的列表。 | | [OH_AI_ContextGetThreadAffinityCoreList](#oh_ai_contextgetthreadaffinitycorelist) (const [OH_AI_ContextHandle](#oh_ai_contexthandle) context, size_t \*core_num) | 获取CPU绑核列表。 | -| [OH_AI_ContextSetEnableParallel](#oh_ai_contextsetenableparallel) ([OH_AI_ContextHandle](#oh_ai_contexthandle) context, bool is_parallel) | 设置运行时是否支持并行。 | +| [OH_AI_ContextSetEnableParallel](#oh_ai_contextsetenableparallel) ([OH_AI_ContextHandle](#oh_ai_contexthandle) context, bool is_parallel) | 设置运行时是否支持并行。此接口特性当前未开启,设置无效。 | | [OH_AI_ContextGetEnableParallel](#oh_ai_contextgetenableparallel) (const [OH_AI_ContextHandle](#oh_ai_contexthandle) context) | 获取是否支持算子间并行。 | -| [OH_AI_ContextAddDeviceInfo](#oh_ai_contextadddeviceinfo) ([OH_AI_ContextHandle](#oh_ai_contexthandle) context, [OH_AI_DeviceInfoHandle](#oh_ai_deviceinfohandle) device_info) | 添加运行设备信息。 | +| [OH_AI_ContextAddDeviceInfo](#oh_ai_contextadddeviceinfo) ([OH_AI_ContextHandle](#oh_ai_contexthandle) context, [OH_AI_DeviceInfoHandle](#oh_ai_deviceinfohandle) device_info) | 将一个用户定义的运行设备信息附加到推理上下文中。 | | [OH_AI_DeviceInfoCreate](#oh_ai_deviceinfocreate) ([OH_AI_DeviceType](#oh_ai_devicetype) device_type) | 创建一个设备信息对象。 | -| [OH_AI_DeviceInfoDestroy](#oh_ai_deviceinfodestroy) ([OH_AI_DeviceInfoHandle](#oh_ai_deviceinfohandle) \*device_info) | 释放设备信息实例。 | +| [OH_AI_DeviceInfoDestroy](#oh_ai_deviceinfodestroy) ([OH_AI_DeviceInfoHandle](#oh_ai_deviceinfohandle) \*device_info) | 释放设备信息实例。注意:设备信息实例被添加到context后,无需调用者手动释放。 | | [OH_AI_DeviceInfoSetProvider](#oh_ai_deviceinfosetprovider) ([OH_AI_DeviceInfoHandle](#oh_ai_deviceinfohandle) device_info, const char \*provider) | 设置供应商的名称。 | | [OH_AI_DeviceInfoGetProvider](#oh_ai_deviceinfogetprovider) (const [OH_AI_DeviceInfoHandle](#oh_ai_deviceinfohandle) device_info) | 获取生产商的名称。 | | [OH_AI_DeviceInfoSetProviderDevice](#oh_ai_deviceinfosetproviderdevice) ([OH_AI_DeviceInfoHandle](#oh_ai_deviceinfohandle) device_info, const char \*device) | 设置生产商设备的名称。 | @@ -465,23 +465,23 @@ MSTensor保存的数据支持的排列格式。 | 枚举值 | 描述 | | ------------------- | ---------------- | -| OH_AI_FORMAT_NCHW | 表示NCHW排列。 | -| OH_AI_FORMAT_NHWC | 表示NHWC排列。 | -| OH_AI_FORMAT_NHWC4 | 表示NHWC4排列。 | -| OH_AI_FORMAT_HWKC | 表示HWKC排列。 | -| OH_AI_FORMAT_HWCK | 表示HWCK排列。 | -| OH_AI_FORMAT_KCHW | 表示KCHW排列。 | -| OH_AI_FORMAT_CKHW | 表示CKHW排列。 | -| OH_AI_FORMAT_KHWC | 表示KHWC排列。 | -| OH_AI_FORMAT_CHWK | 表示CHWK排列。 | -| OH_AI_FORMAT_HW | 表示HW排列。 | -| OH_AI_FORMAT_HW4 | 表示HW4排列。 | -| OH_AI_FORMAT_NC | 表示NC排列。 | -| OH_AI_FORMAT_NC4 | 表示NC4排列。 | -| OH_AI_FORMAT_NC4HW4 | 表示NC4HW4排列。 | -| OH_AI_FORMAT_NCDHW | 表示NCDHW排列。 | -| OH_AI_FORMAT_NWC | 表示NWC排列。 | -| OH_AI_FORMAT_NCW | 表示NCW排列。 | +| OH_AI_FORMAT_NCHW | 按批次N、通道C、高度H和宽度W的顺序存储张量数据。 | +| OH_AI_FORMAT_NHWC | 按批次N、高度H、宽度W和通道C的顺序存储张量数据。 | +| OH_AI_FORMAT_NHWC4 | 按批次N、高度H、宽度W和通道C的顺序存储张量数据,其中C轴是4字节对齐格式。 | +| OH_AI_FORMAT_HWKC | 按高度H、宽度W、核数K和通道C的顺序存储张量数据。 | +| OH_AI_FORMAT_HWCK | 按高度H、宽度W、通道C和核数K的顺序存储张量数据。 | +| OH_AI_FORMAT_KCHW | 按核数K、通道C、高度H和宽度W的顺序存储张量数据。 | +| OH_AI_FORMAT_CKHW | 按通道C、核数K、高度H和宽度W的顺序存储张量数据。 | +| OH_AI_FORMAT_KHWC | 按核数K、高度H、宽度W和通道C的顺序存储张量数据。 | +| OH_AI_FORMAT_CHWK | 按通道C、高度H、宽度W和核数K的顺序存储张量数据。 | +| OH_AI_FORMAT_HW | 按高度H和宽度W的顺序存储张量数据。 | +| OH_AI_FORMAT_HW4 | 按高度H和宽度W的顺序存储张量数据,其中W轴是4字节对齐格式。 | +| OH_AI_FORMAT_NC | 按批次N和通道C的顺序存储张量数据。 | +| OH_AI_FORMAT_NC4 | 按批次N和通道C的顺序存储张量数据,其中C轴是4字节对齐格式。 | +| OH_AI_FORMAT_NC4HW4 | 按批次N、通道C、高度H和宽度W的顺序存储张量数据,其中C轴和W轴是4字节对齐格式。 | +| OH_AI_FORMAT_NCDHW | 按批次N、通道C、深度D、高度H和宽度W的顺序存储张量数据。 | +| OH_AI_FORMAT_NWC | 按批次N、宽度W和通道C的顺序存储张量数据。 | +| OH_AI_FORMAT_NCW | 按批次N、通道C和宽度W的顺序存储张量数据。 | ### OH_AI_ModelType @@ -497,7 +497,7 @@ enum OH_AI_ModelType | 枚举值 | 描述 | | ----------------------- | ------------------ | -| OH_AI_MODELTYPE_MINDIR | 模型类型是MindIR。 | +| OH_AI_MODELTYPE_MINDIR | 模型类型是MindIR,对应的模型文件后缀为.ms。 | | OH_AI_MODELTYPE_INVALID | 模型类型无效。 | @@ -620,7 +620,7 @@ OH_AI_API void OH_AI_ContextAddDeviceInfo (OH_AI_ContextHandle context, OH_AI_De **描述:** -添加运行设备信息。 +将一个用户定义的运行设备信息附加到推理上下文中。 **参数:** @@ -706,7 +706,7 @@ OH_AI_API const int32_t* OH_AI_ContextGetThreadAffinityCoreList (const OH_AI_Con **返回:** -CPU绑核列表。 +CPU绑核列表。此列表对象由[OH_AI_ContextHandle](#oh_ai_contexthandle)管理,调用者无须手动释放。 ### OH_AI_ContextGetThreadAffinityMode() @@ -762,7 +762,7 @@ OH_AI_API void OH_AI_ContextSetEnableParallel (OH_AI_ContextHandle context, bool **描述:** -设置运行时是否支持并行。 +设置运行时是否支持并行。此接口特性当前未开启,设置无效。 **参数:** @@ -937,7 +937,7 @@ OH_AI_API void OH_AI_DeviceInfoDestroy (OH_AI_DeviceInfoHandle * device_info) **描述:** -释放设备信息实例。 +释放设备信息实例。注意:设备信息实例被添加到context后,无需调用者手动释放。 **参数:** diff --git a/zh-cn/application-dev/reference/native-apis/_o_h___cursor.md b/zh-cn/application-dev/reference/native-apis/_o_h___cursor.md new file mode 100644 index 0000000000000000000000000000000000000000..b0efcb1b9525af973951bf34f5d08eff71599e6a --- /dev/null +++ b/zh-cn/application-dev/reference/native-apis/_o_h___cursor.md @@ -0,0 +1,39 @@ +# OH_Cursor + + +## 概述 + +表示结果集。 + +提供通过查询数据库生成的数据库结果集的访问方法。 + +**起始版本:** + +10 + +**相关模块:** + +[RDB](_r_d_b.md) + + +## 汇总 + + +### 成员变量 + +| 名称 | 描述 | +| -------- | -------- | +| [id](_r_d_b.md) | OH_Cursor结构体的唯一标识符。 | +| [getColumnCount](_r_d_b.md#getcolumncount) | 函数指针,获取结果集中的列数。 | +| [getColumnType](_r_d_b.md#getcolumntype) | 函数指针,根据指定的列索引获取列名。 | +| [getColumnIndex](_r_d_b.md#getcolumnindex) | 函数指针,根据指定的列名获取列索引。 | +| [getColumnName](_r_d_b.md#getcolumnname) | 函数指针,根据指定的列索引获取列名。 | +| [getRowCount](_r_d_b.md#getrowcount) | 函数指针,获取结果集中的行数。 | +| [goToNextRow](_r_d_b.md#gotonextrow) | 函数指针,转到结果集的下一行。 | +| [getSize](_r_d_b.md#getsize) | 函数指针,当结果集中列的数据类型是BLOB或者TEXT时,获取其值所需的内存。 | +| [getText](_r_d_b.md#gettext) | 函数指针,以字符串形式获取当前行中指定列的值。 | +| [getInt64](_r_d_b.md#getint64) | 函数指针,以int64_t形式获取当前行中指定列的值。 | +| [getReal](_r_d_b.md#getreal) | 函数指针,以double形式获取当前行中指定列的值。 | +| [getBlob](_r_d_b.md#getblob) | 函数指针,以字节数组的形式获取当前行中指定列的值。 | +| [isNull](_r_d_b.md#isnull-12) | 函数指针,检查当前行中指定列的值是否为null。 | +| [close](_r_d_b.md#close) | 函数指针,关闭结果集。 | diff --git a/zh-cn/application-dev/reference/native-apis/_o_h___predicates.md b/zh-cn/application-dev/reference/native-apis/_o_h___predicates.md new file mode 100644 index 0000000000000000000000000000000000000000..68d780459fe274488a4c7e7076ea87bb0126aa81 --- /dev/null +++ b/zh-cn/application-dev/reference/native-apis/_o_h___predicates.md @@ -0,0 +1,48 @@ +# OH_Predicates + + +## 概述 + +表示谓词。 + +**起始版本:** + +10 + +**相关模块:** + +[RDB](_r_d_b.md) + + +## 汇总 + + +### 成员变量 + +| 名称 | 描述 | +| -------- | -------- | +| [id](_r_d_b.md#id-14) | OH_Predicates结构体的唯一标识符。 | +| [equalTo](_r_d_b.md#equalto) | 函数指针,配置谓词以匹配数据字段等于指定值的字段。 | +| [notEqualTo](_r_d_b.md#notequalto) | 函数指针,配置谓词以匹配数据字段不等于指定值的字段。 | +| [beginWrap](_r_d_b.md#beginwrap) | 函数指针,向谓词添加左括号。 | +| [endWrap](_r_d_b.md#endwrap) | 函数指针,向谓词添加右括号。 | +| [orOperate](_r_d_b.md#oroperate) | 函数指针,将或条件添加到谓词中。 | +| [andOperate](_r_d_b.md#andoperate) | 函数指针,向谓词添加和条件。 | +| [isNull](_r_d_b.md#isnull-22) | 函数指针,配置谓词以匹配值为null的字段。 | +| [isNotNull](_r_d_b.md#isnotnull) | 函数指针,配置谓词以匹配值不为null的指定字段。 | +| [like](_r_d_b.md#like) | 函数指针,配置谓词以匹配数据字段为field且值类似于指定字符串的字段。 | +| [between](_r_d_b.md#between) | 函数指针,将谓词配置为匹配数据字段为field且其值在给定范围内的指定字段。 | +| [notBetween](_r_d_b.md#notbetween) | 函数指针,将谓词配置为匹配数据字段为field且其值超出给定范围内的指定字段。 | +| [greaterThan](_r_d_b.md#greaterthan) | 函数指针,配置谓词以匹配数据字段为field且值大于指定值valueObject的字段。 | +| [lessThan](_r_d_b.md#lessthan) | 函数指针,配置谓词以匹配数据字段为field且值小于指定值valueObject的字段 | +| [greaterThanOrEqualTo](_r_d_b.md#greaterthanorequalto) | 函数指针,配置谓词以匹配数据字段为field且值大于或等于指定值valueObject的字段 | +| [lessThanOrEqualTo](_r_d_b.md#lessthanorequalto) | 函数指针,配置谓词以匹配数据字段为field且值小于或等于指定值valueObject的字段 | +| [orderBy](_r_d_b.md#orderby) | 函数指针,配置谓词以匹配其值按升序或降序排序的列。 | +| [distinct](_r_d_b.md#distinct) | 函数指针,配置谓词以过滤重复记录并仅保留其中一个。 | +| [limit](_r_d_b.md#limit) | 函数指针,设置最大数据记录数的谓词。 | +| [offset](_r_d_b.md#offset) | 函数指针,配置谓词以指定返回结果的起始位置。 | +| [groupBy](_r_d_b.md#groupby) | 函数指针,配置R谓词按指定列分组查询结果。 | +| [in](_r_d_b.md#in) | 函数指针,配置谓词以匹配数据字段为field且值在给定范围内的指定字段。 | +| [notIn](_r_d_b.md#notin) | 函数指针,配置谓词以匹配数据字段为field且值超出给定范围内的指定字段。 | +| [clear](_r_d_b.md#clear-12) | 函数指针,清空谓词。 | +| [destroyPredicates](_r_d_b.md#destroypredicates) | 销毁[OH_Predicates](_o_h___predicates.md)对象,并回收该对象占用的内存。 | diff --git a/zh-cn/application-dev/reference/native-apis/_o_h___rdb___config.md b/zh-cn/application-dev/reference/native-apis/_o_h___rdb___config.md new file mode 100644 index 0000000000000000000000000000000000000000..6248376e3c64ef9b0d798d298a03c2fff5b4e686 --- /dev/null +++ b/zh-cn/application-dev/reference/native-apis/_o_h___rdb___config.md @@ -0,0 +1,26 @@ +# OH_Rdb_Config + + +## 概述 + +管理关系数据库配置。 + +**起始版本:** + +10 + +**相关模块:** + +[RDB](_r_d_b.md) + + +## 汇总 + + +### 成员变量 + +| 名称 | 描述 | +| -------- | -------- | +| [path](_r_d_b.md#path) | 数据库文件路径。 | +| [isEncrypt](_r_d_b.md#isencrypt) | 指定数据库是否加密。 | +| [securityLevel](_r_d_b.md#securitylevel) | 设置数据库安全级别 [OH_Rdb_SecurityLevel](_r_d_b.md#oh_rdb_securitylevel)。 | diff --git a/zh-cn/application-dev/reference/native-apis/_o_h___rdb___store.md b/zh-cn/application-dev/reference/native-apis/_o_h___rdb___store.md new file mode 100644 index 0000000000000000000000000000000000000000..3d8aac7e244f64975c5fa2fa78fd0c7e3c43dad9 --- /dev/null +++ b/zh-cn/application-dev/reference/native-apis/_o_h___rdb___store.md @@ -0,0 +1,24 @@ +# OH_Rdb_Store + + +## 概述 + +表示数据库类型。 + +**起始版本:** + +10 + +**相关模块:** + +[RDB](_r_d_b.md) + + +## 汇总 + + +### 成员变量 + +| 名称 | 描述 | +| -------- | -------- | +| [id](_r_d_b.md#id-44) | OH_Rdb_Store结构体的唯一标识符。 | diff --git a/zh-cn/application-dev/reference/native-apis/_o_h___v_bucket.md b/zh-cn/application-dev/reference/native-apis/_o_h___v_bucket.md new file mode 100644 index 0000000000000000000000000000000000000000..64d09843067511a41a45ffdff13bbe2e3eed7da1 --- /dev/null +++ b/zh-cn/application-dev/reference/native-apis/_o_h___v_bucket.md @@ -0,0 +1,32 @@ +# OH_VBucket + + +## 概述 + +用于存储键值对的类型。 + +**起始版本:** + +10 + +**相关模块:** + +[RDB](_r_d_b.md) + + +## 汇总 + + +### 成员变量 + +| 名称 | 描述 | +| -------- | -------- | +| [id](_r_d_b.md#id-34) | OH_VBucket结构体的唯一标识符。 | +| [capability](_r_d_b.md#capability) | 表示结构体的存储键值对的数量。 | +| [putText](_r_d_b.md#puttext-12) | 将const char\*值放入给定列名的[OH_VBucket](_o_h___v_bucket.md)对象中。 | +| [putInt64](_r_d_b.md#putint64-12) | 将int64_t值放入给定列名的[OH_VBucket](_o_h___v_bucket.md)对象中。 | +| [putReal](_r_d_b.md#putreal) | 将double值放入给定列名的[OH_VBucket](_o_h___v_bucket.md)对象中**。** | +| [putBlob](_r_d_b.md#putblob) | 将const uint8_t \*值放入给定列名的[OH_VBucket](_o_h___v_bucket.md)对象中。 | +| [putNull](_r_d_b.md#putnull) | 将NULL值放入给定列名的[OH_VBucket](_o_h___v_bucket.md)对象中。 | +| [clear](_r_d_b.md#clear-22) | 清空[OH_VBucket](_o_h___v_bucket.md)对象。 | +| [destroyValuesBucket](_r_d_b.md#destroyvaluesbucket) | 销毁[OH_VBucket](_o_h___v_bucket.md)对象,并回收该对象占用的内存。 | diff --git a/zh-cn/application-dev/reference/native-apis/_o_h___v_object.md b/zh-cn/application-dev/reference/native-apis/_o_h___v_object.md new file mode 100644 index 0000000000000000000000000000000000000000..819322fbdd72002e7d21580fac224436cbbb84e6 --- /dev/null +++ b/zh-cn/application-dev/reference/native-apis/_o_h___v_object.md @@ -0,0 +1,29 @@ +# OH_VObject + + +## 概述 + +表示允许的数据字段类型。 + +**起始版本:** + +10 + +**相关模块:** + +[RDB](_r_d_b.md) + + +## 汇总 + + +### 成员变量 + +| 名称 | 描述 | +| -------- | -------- | +| [id](_r_d_b.md#id-24) | OH_VObject结构体的唯一标识符。 | +| [putInt64](_r_d_b.md#putint64-22) | 将int64类型的单个参数或者数组转换为[OH_VObject](_o_h___v_object.md)类型的值。 | +| [putDouble](_r_d_b.md#putdouble) | 将double类型的单个参数或者数组转换为[OH_VObject](_o_h___v_object.md)类型的值。 | +| [putText](_r_d_b.md#puttext-22) | 将char \*类型的字符数组转换为[OH_VObject](_o_h___v_object.md)类型的值。 | +| [putTexts](_r_d_b.md#puttexts) | 将char \*类型的字符串数组转换为[OH_VObject](_o_h___v_object.md)类型的值。 | +| [destroyValueObject](_r_d_b.md#destroyvalueobject) | 销毁[OH_VObject](_o_h___v_object.md)对象,并回收该对象占用的内存。 | diff --git a/zh-cn/application-dev/reference/native-apis/_r_d_b.md b/zh-cn/application-dev/reference/native-apis/_r_d_b.md new file mode 100644 index 0000000000000000000000000000000000000000..96b2c7c5c58aa7b07170a594a7f9fc614bdc6e26 --- /dev/null +++ b/zh-cn/application-dev/reference/native-apis/_r_d_b.md @@ -0,0 +1,2261 @@ +# RDB + + +## 概述 + +关系型数据库(Relational Database,RDB)是一种基于关系模型来管理数据的数据库。关系型数据库基于SQLite组件提供了一套完整的 对本地数据库进行管理的机制,对外提供了一系列的增、删、改、查等接口,也可以直接运行用户输入的SQL语句来满足复杂的场景需要。 + +\@syscap SystemCapability.DistributedDataManager.RelationalStore.Core + +**起始版本:** + +10 + + +## 汇总 + + +### 文件 + +| 名称 | 描述 | +| -------- | -------- | +| [oh_cursor.h](oh__cursor_8h.md) | 提供通过查询数据库生成的数据库结果集的访问方法。 | +| [oh_predicates.h](oh__predicates_8h.md) | 表示关系型数据库(RDB)的谓词。 | +| [oh_value_object.h](oh__value__object_8h.md) | 提供类型转换方法。 | +| [oh_values_bucket.h](oh__values__bucket_8h.md) | 用于存储键值对的类型。 | +| [relation_error_code.h](relation__error__code_8h.md) | 声明关系型数据库(RDB)的错误码信息。 | +| [relation_store.h](relation__store_8h.md) | 提供管理关系数据库(RDB)方法的接口。 | + + +### 结构体 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_Cursor](_o_h___cursor.md) | 表示结果集。 | +| [OH_Predicates](_o_h___predicates.md) | 表示谓词。 | +| [OH_VObject](_o_h___v_object.md) | 表示允许的数据字段类型。 | +| [OH_VBucket](_o_h___v_bucket.md) | 用于存储键值对的类型。 | +| [OH_Rdb_Config](_o_h___rdb___config.md) | 管理关系数据库配置。 | +| [OH_Rdb_Store](_o_h___rdb___store.md) | 表示数据库类型。 | + + +### 类型定义 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_Cursor](#oh_cursor) | 表示结果集。 | +| [OH_Predicates](#oh_predicates) | 表示谓词。 | +| [OH_VObject](#oh_vobject) | 表示允许的数据字段类型。 | +| [OH_VBucket](#oh_vbucket) | 用于存储键值对的类型。 | + + +### 枚举 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_ColumnType](#oh_columntype) {
TYPE_NULL = 0, TYPE_INT64, TYPE_REAL, TYPE_TEXT,
TYPE_BLOB
} | 数据库字段类型. | +| [OH_OrderType](#oh_ordertype) { ASC = 0, DESC = 1 } | 排序方式。 | +| [OH_Rdb_ErrCode](#oh_rdb_errcode) { RDB_ERR_INVALID_ARGS = -2, RDB_ERR = -1, RDB_ERR_OK = 0 } | 表示错误码信息。 | +| [OH_Rdb_SecurityLevel](#oh_rdb_securitylevel) { S1 = 1, S2, S3, S4 } | 数据库的安全级别枚举。 | + + +### 函数 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_Rdb_CreateValueObject](#oh_rdb_createvalueobject) (void) | 创建[OH_VObject](_o_h___v_object.md)实例。 | +| [OH_Rdb_CreateValuesBucket](#oh_rdb_createvaluesbucket) (void) | 创建[OH_VBucket](_o_h___v_bucket.md)实例。 | +| [OH_Rdb_CreatePredicates](#oh_rdb_createpredicates) (const char \*table) | 创建[OH_Predicates](_o_h___predicates.md)实例。 | +| [OH_Rdb_GetOrOpen](#oh_rdb_getoropen) (const [OH_Rdb_Config](_o_h___rdb___config.md) \*config, int \*errCode) | 获得一个相关的[OH_Rdb_Store](_o_h___rdb___store.md)实例,操作关系型数据库。 | +| [OH_Rdb_CloseStore](#oh_rdb_closestore) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store) | 销毁[OH_Rdb_Store](_o_h___rdb___store.md)对象,并回收该对象占用的内存。 | +| [OH_Rdb_DeleteStore](#oh_rdb_deletestore) (const char \*path) | 使用指定的数据库文件配置删除数据库。 | +| [OH_Rdb_Insert](#oh_rdb_insert) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*table, [OH_VBucket](_o_h___v_bucket.md) \*valuesBucket) | 向目标表中插入一行数据。 | +| [OH_Rdb_Update](#oh_rdb_update) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, [OH_VBucket](_o_h___v_bucket.md) \*valuesBucket, [OH_Predicates](_o_h___predicates.md) \*predicates) | 根据指定的条件更新数据库中的数据。 | +| [OH_Rdb_Delete](#oh_rdb_delete) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, [OH_Predicates](_o_h___predicates.md) \*predicates) | 根据指定的条件删除数据库中的数据。 | +| [OH_Rdb_Query](#oh_rdb_query) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, [OH_Predicates](_o_h___predicates.md) \*predicates, const char \*const \*columnNames, int length) | 根据指定条件查询数据库中的数据 | +| [OH_Rdb_Execute](#oh_rdb_execute) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*sql) | 执行无返回值的SQL语句。 | +| [OH_Rdb_ExecuteQuery](#oh_rdb_executequery) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*sql) | 根据指定SQL语句查询数据库中的数据。 | +| [OH_Rdb_BeginTransaction](#oh_rdb_begintransaction) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store) | 在开始执行SQL语句之前,开始事务。 | +| [OH_Rdb_RollBack](#oh_rdb_rollback) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store) | 回滚已经执行的SQL语句。 | +| [OH_Rdb_Commit](#oh_rdb_commit) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store) | 提交已执行的SQL语句 | +| [OH_Rdb_Backup](#oh_rdb_backup) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*databasePath) | 以指定路径备份数据库。 | +| [OH_Rdb_Restore](#oh_rdb_restore) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*databasePath) | 从指定的数据库备份文件恢复数据库。 | +| [OH_Rdb_GetVersion](#oh_rdb_getversion) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, int \*version) | 获取数据库版本。 | +| [OH_Rdb_SetVersion](#oh_rdb_setversion) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, int version) | 设置数据库版本。 | + + +### 变量 + +| 名称 | 描述 | +| -------- | -------- | +| OH_Cursor::id | OH_Cursor结构体的唯一标识符。 | +| [OH_Cursor::getColumnCount](#getcolumncount) | 函数指针,获取结果集中的列数。 | +| [OH_Cursor::getColumnType](#getcolumntype) | 函数指针,根据指定的列索引获取列名。 | +| [OH_Cursor::getColumnIndex](#getcolumnindex) | 函数指针,根据指定的列名获取列索引。 | +| [OH_Cursor::getColumnName](#getcolumnname) | 函数指针,根据指定的列索引获取列名。 | +| [OH_Cursor::getRowCount](#getrowcount) | 函数指针,获取结果集中的行数。 | +| [OH_Cursor::goToNextRow](#gotonextrow) | 函数指针,转到结果集的下一行。 | +| [OH_Cursor::getSize](#getsize) | 函数指针,当结果集中列的数据类型是BLOB或者TEXT时,获取其值所需的内存。 | +| [OH_Cursor::getText](#gettext) | 函数指针,以字符串形式获取当前行中指定列的值。 | +| [OH_Cursor::getInt64](#getint64) | 函数指针,以int64_t形式获取当前行中指定列的值。 | +| [OH_Cursor::getReal](#getreal) | 函数指针,以double形式获取当前行中指定列的值。 | +| [OH_Cursor::getBlob](#getblob) | 函数指针,以字节数组的形式获取当前行中指定列的值。 | +| [OH_Cursor::isNull](#isnull-12) | 函数指针,检查当前行中指定列的值是否为null。 | +| [OH_Cursor::close](#close) | 函数指针,关闭结果集。 | +| [OH_Predicates::id](#id-14) | OH_Predicates结构体的唯一标识符。 | +| [OH_Predicates::equalTo](#equalto) | 函数指针,配置谓词以匹配数据字段等于指定值的字段。 | +| [OH_Predicates::notEqualTo](#notequalto) | 函数指针,配置谓词以匹配数据字段不等于指定值的字段。 | +| [OH_Predicates::beginWrap](#beginwrap) | 函数指针,向谓词添加左括号。 | +| [OH_Predicates::endWrap](#endwrap) | 函数指针,向谓词添加右括号。 | +| [OH_Predicates::orOperate](#oroperate) | 函数指针,将或条件添加到谓词中。 | +| [OH_Predicates::andOperate](#andoperate) | 函数指针,向谓词添加和条件。 | +| [OH_Predicates::isNull](#isnull-22) | 函数指针,配置谓词以匹配值为null的字段。 | +| [OH_Predicates::isNotNull](#isnotnull) | 函数指针,配置谓词以匹配值不为null的指定字段。 | +| [OH_Predicates::like](#like) | 函数指针,配置谓词以匹配数据字段为field且值类似于指定字符串的字段。 | +| [OH_Predicates::between](#between) | 函数指针,将谓词配置为匹配数据字段为field且其值在给定范围内的指定字段。 | +| [OH_Predicates::notBetween](#notbetween) | 函数指针,将谓词配置为匹配数据字段为field且其值超出给定范围内的指定字段。 | +| [OH_Predicates::greaterThan](#greaterthan) | 函数指针,配置谓词以匹配数据字段为field且值大于指定值valueObject的字段。 | +| [OH_Predicates::lessThan](#lessthan) | 函数指针,配置谓词以匹配数据字段为field且值小于指定值valueObject的字段。 | +| [OH_Predicates::greaterThanOrEqualTo](#greaterthanorequalto) | 函数指针,配置谓词以匹配数据字段为field且值大于或等于指定值valueObject的字段。 | +| [OH_Predicates::lessThanOrEqualTo](#lessthanorequalto) | 函数指针,配置谓词以匹配数据字段为field且值小于或等于指定值valueObject的字段。 | +| [OH_Predicates::orderBy](#orderby) | 函数指针,配置谓词以匹配其值按升序或降序排序的列。 | +| [OH_Predicates::distinct](#distinct) | 函数指针,配置谓词以过滤重复记录并仅保留其中一个。 | +| [OH_Predicates::limit](#limit) | 函数指针,设置最大数据记录数的谓词。 | +| [OH_Predicates::offset](#offset) | 函数指针,配置谓词以指定返回结果的起始位置。 | +| [OH_Predicates::groupBy](#groupby) | 函数指针,配置R谓词按指定列分组查询结果。 | +| [OH_Predicates::in](#in) | 函数指针,配置谓词以匹配数据字段为field且值在给定范围内的指定字段。 | +| [OH_Predicates::notIn](#notin) | 函数指针,配置谓词以匹配数据字段为field且值超出给定范围内的指定字段。 | +| [OH_Predicates::clear](#clear-12) | 函数指针,清空谓词。 | +| [OH_Predicates::destroyPredicates](#destroypredicates) | 销毁[OH_Predicates](_o_h___predicates.md)对象,并回收该对象占用的内存。 | +| [OH_VObject::id](#id-24) | OH_VObject结构体的唯一标识符。 | +| [OH_VObject::putInt64](#putint64-22) | 将int64类型的单个参数或者数组转换为[OH_VObject](_o_h___v_object.md)类型的值。 | +| [OH_VObject::putDouble](#putdouble) | 将double类型的单个参数或者数组转换为[OH_VObject](_o_h___v_object.md)类型的值。 | +| [OH_VObject::putText](#puttext-22) | 将char \*类型的字符数组转换为[OH_VObject](_o_h___v_object.md)类型的值。 | +| [OH_VObject::putTexts](#puttexts) | 将char \*类型的字符串数组转换为[OH_VObject](_o_h___v_object.md)类型的值。 | +| [OH_VObject::destroyValueObject](#destroyvalueobject) | 销毁[OH_VObject](_o_h___v_object.md)对象,并回收该对象占用的内存。 | +| [OH_VBucket::id](#id-34) | OH_VBucket结构体的唯一标识符。 | +| [OH_VBucket::capability](#capability) | 表示结构体的存储键值对的数量 | +| [OH_VBucket::putText](#puttext-12) | 将const char\*值放入给定列名的[OH_VBucket](_o_h___v_bucket.md)对象中。 | +| [OH_VBucket::putInt64](#putint64-12) | 将int64_t值放入给定列名的[OH_VBucket](_o_h___v_bucket.md)对象中。 | +| [OH_VBucket::putReal](#putreal) | 将double值放入给定列名的[OH_VBucket](_o_h___v_bucket.md)对象中**。** | +| [OH_VBucket::putBlob](#putblob) | 将const uint8_t \*值放入给定列名的[OH_VBucket](_o_h___v_bucket.md)对象中。 | +| [OH_VBucket::putNull](#putnull) | 将NULL值放入给定列名的[OH_VBucket](_o_h___v_bucket.md)对象中。 | +| [OH_VBucket::clear](#clear-22) | 清空[OH_VBucket](_o_h___v_bucket.md)对象。 | +| [OH_VBucket::destroyValuesBucket](#destroyvaluesbucket) | 销毁[OH_VBucket](_o_h___v_bucket.md)对象,并回收该对象占用的内存。 | +| [OH_Rdb_Config::path](#path) | 数据库文件路径。 | +| [OH_Rdb_Config::isEncrypt](#isencrypt) | 指定数据库是否加密。 | +| [OH_Rdb_Config::securityLevel](#securitylevel) | 设置数据库安全级别[OH_Rdb_SecurityLevel](#oh_rdb_securitylevel)。 | +| [OH_Rdb_Store::id](#id-44) | OH_Rdb_Store结构体的唯一标识符。 | + + +## 类型定义说明 + + +### OH_Cursor + + +``` +typedef struct OH_Cursor OH_Cursor +``` + +**描述:** + +表示结果集。 + +提供通过查询数据库生成的数据库结果集的访问方法。 + + +### OH_Predicates + + +``` +typedef struct OH_Predicates OH_Predicates +``` + +**描述:** + +表示谓词。 + + +### OH_VBucket + + +``` +typedef struct OH_VBucket OH_VBucket +``` + +**描述:** + +用于存储键值对的类型。 + + +### OH_VObject + + +``` +typedef struct OH_VObject OH_VObject +``` + +**描述:** + +表示允许的数据字段类型。 + + +## 枚举类型说明 + + +### OH_ColumnType + + +``` +enum OH_ColumnType +``` + +**描述:** + +数据库字段类型. + +| 枚举值 | 描述 | +| -------- | -------- | +| TYPE_NULL | 表示NULL类型。 | +| TYPE_INT64 | 表示INT64数据类型。 | +| TYPE_REAL | 表示REAL数据类型。 | +| TYPE_TEXT | 表示TEXT数据类型。 | +| TYPE_BLOB | 表示BLOB数据类型。 | + + +### OH_OrderType + + +``` +enum OH_OrderType +``` + +**描述:** + +排序方式。 + +| 枚举值 | 描述 | +| -------- | -------- | +| ASC | 升序排列。 | +| DESC | 降序排列。 | + + +### OH_Rdb_ErrCode + + +``` +enum OH_Rdb_ErrCode +``` + +**描述:** + +表示错误码信息。 + +| 枚举值 | 描述 | +| -------- | -------- | +| RDB_ERR_INVALID_ARGS | 参数非法。 | +| RDB_ERR | 执行出错。 | +| RDB_ERR_OK | 执行成功。 | + + +### OH_Rdb_SecurityLevel + + +``` +enum OH_Rdb_SecurityLevel +``` + +**描述:** + +数据库的安全级别枚举。 + +| 枚举值 | 描述 | +| -------- | -------- | +| S1 | S1: 表示数据库的安全级别为低级别。
当数据泄露时会产生较低影响。 | +| S2 | S2: 表示数据库的安全级别为中级别。
当数据泄露时会产生较大影响。 | +| S3 | S3: 表示数据库的安全级别为高级别。
当数据泄露时会产生重大影响。 | +| S4 | S4: 表示数据库的安全级别为关键级别。
当数据泄露时会产生严重影响。 | + + +## 函数说明 + + +### OH_Rdb_Backup() + + +``` +int OH_Rdb_Backup (OH_Rdb_Store * store, const char * databasePath ) +``` + +**描述:** + +以指定路径备份数据库。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| store | 表示指向[OH_Rdb_Store](_o_h___rdb___store.md)实例的指针。 | +| databasePath | 指定数据库的备份文件路径。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Rdb_Store](_o_h___rdb___store.md). + + +### OH_Rdb_BeginTransaction() + + +``` +int OH_Rdb_BeginTransaction (OH_Rdb_Store * store) +``` + +**描述:** + +在开始执行SQL语句之前,开始事务。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| store | 表示指向[OH_Rdb_Store](_o_h___rdb___store.md)实例的指针。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Rdb_Store](_o_h___rdb___store.md). + + +### OH_Rdb_CloseStore() + + +``` +int OH_Rdb_CloseStore (OH_Rdb_Store * store) +``` + +**描述:** + +销毁[OH_Rdb_Store](_o_h___rdb___store.md)对象,并回收该对象占用的内存。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| store | 表示指向[OH_Rdb_Store](_o_h___rdb___store.md)实例的指针。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Rdb_Store](_o_h___rdb___store.md). + + +### OH_Rdb_Commit() + + +``` +int OH_Rdb_Commit (OH_Rdb_Store * store) +``` + +**描述:** + +提交已执行的SQL语句 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| store | 表示指向[OH_Rdb_Store](_o_h___rdb___store.md)实例的指针。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Rdb_Store](_o_h___rdb___store.md). + + +### OH_Rdb_CreatePredicates() + + +``` +OH_Predicates* OH_Rdb_CreatePredicates (const char * table) +``` + +**描述:** + +创建[OH_Predicates](_o_h___predicates.md)实例。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| table | 表示数据库表名。 | + +**返回:** + +创建成功则返回一个指向[OH_Predicates](_o_h___predicates.md)结构体实例的指针,否则返回NULL。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md). + + +### OH_Rdb_CreateValueObject(void) + + +``` +OH_VObject* OH_Rdb_CreateValueObject () +``` + +**描述:** + +创建[OH_VObject](_o_h___v_object.md)实例。 + +**返回:** + +创建成功则返回一个指向[OH_VObject](_o_h___v_object.md)结构体实例的指针,否则返回NULL。 + +**参见:** + +[OH_VObject](_o_h___v_object.md). + + +### OH_Rdb_CreateValuesBucket(void) + + +``` +OH_VBucket* OH_Rdb_CreateValuesBucket () +``` + +**描述:** + +创建[OH_VBucket](_o_h___v_bucket.md)实例。 + +**返回:** + +创建成功则返回一个指向[OH_VBucket](_o_h___v_bucket.md)结构体实例的指针,否则返回NULL。 + +**参见:** + +[OH_VBucket](_o_h___v_bucket.md). + + +### OH_Rdb_Delete() + + +``` +int OH_Rdb_Delete (OH_Rdb_Store * store, OH_Predicates * predicates ) +``` + +**描述:** + +根据指定的条件删除数据库中的数据。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| store | 表示指向[OH_Rdb_Store](_o_h___rdb___store.md)实例的指针。 | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针,指定删除条件。 | + +**返回:** + +如果更新成功,返回受影响的行数,否则返回特定的错误码。 + +**参见:** + +[OH_Rdb_Store](_o_h___rdb___store.md), [OH_Predicates](_o_h___predicates.md). + + +### OH_Rdb_DeleteStore() + + +``` +int OH_Rdb_DeleteStore (const char * path) +``` + +**描述:** + +使用指定的数据库文件配置删除数据库。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| path | 表示数据库路径。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + + +### OH_Rdb_Execute() + + +``` +int OH_Rdb_Execute (OH_Rdb_Store * store, const char * sql ) +``` + +**描述:** + +执行无返回值的SQL语句。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| store | 表示指向[OH_Rdb_Store](_o_h___rdb___store.md)实例的指针。 | +| sql | 指定要执行的SQL语句。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Rdb_Store](_o_h___rdb___store.md). + + +### OH_Rdb_ExecuteQuery() + + +``` +OH_Cursor* OH_Rdb_ExecuteQuery (OH_Rdb_Store * store, const char * sql ) +``` + +**描述:** + +根据指定SQL语句查询数据库中的数据。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| store | 表示指向[OH_Rdb_Store](_o_h___rdb___store.md)实例的指针。 | +| sql | 指定要执行的SQL语句。 | + +**返回:** + +如果查询成功则返回一个指向[OH_Cursor](_o_h___cursor.md)结构体实例的指针,否则返回NULL。 + +**参见:** + +[OH_Rdb_Store](_o_h___rdb___store.md). + + +### OH_Rdb_GetOrOpen() + + +``` +OH_Rdb_Store* OH_Rdb_GetOrOpen (const OH_Rdb_Config * config, int * errCode ) +``` + +**描述:** + +获得一个相关的[OH_Rdb_Store](_o_h___rdb___store.md)实例,操作关系型数据库。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| config | 表示指向[OH_Rdb_Config](_o_h___rdb___config.md)实例的指针,与此RDB存储相关的数据库配置。 | +| errCode | 该参数是输出参数,函数执行状态写入该变量。 | + +**返回:** + +创建成功则返回一个指向[OH_Rdb_Store](_o_h___rdb___store.md)结构体实例的指针,否则返回NULL。 + +**参见:** + +[OH_Rdb_Config](_o_h___rdb___config.md), [OH_Rdb_Store](_o_h___rdb___store.md). + + +### OH_Rdb_GetVersion() + + +``` +int OH_Rdb_GetVersion (OH_Rdb_Store * store, int * version ) +``` + +**描述:** + +获取数据库版本。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| store | 表示指向[OH_Rdb_Store](_o_h___rdb___store.md)实例的指针。 | +| version | 表示版本号。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Rdb_Store](_o_h___rdb___store.md). + + +### OH_Rdb_Insert() + + +``` +int OH_Rdb_Insert (OH_Rdb_Store * store, const char * table, OH_VBucket * valuesBucket ) +``` + +**描述:** + +向目标表中插入一行数据。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| store | 表示指向[OH_Rdb_Store](_o_h___rdb___store.md)实例的指针。 | +| table | 表示指定的目标表名。 | +| valuesBucket | 表示要插入到表中的数据行[OH_VBucket](_o_h___v_bucket.md)。 | + +**返回:** + +如果插入成功,返回行ID。否则返回特定的错误码。 + +**参见:** + +[OH_Rdb_Store](_o_h___rdb___store.md), [OH_VBucket](_o_h___v_bucket.md). + + +### OH_Rdb_Query() + + +``` +OH_Cursor* OH_Rdb_Query (OH_Rdb_Store * store, OH_Predicates * predicates, const char *const * columnNames, int length ) +``` + +**描述:** + +根据指定条件查询数据库中的数据 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| store | 表示指向[OH_Rdb_Store](_o_h___rdb___store.md)实例的指针。 | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针,指定查询条件。 | +| columnNames | 表示要查询的列。如果值为空,则查询应用于所有列。 | +| length | 表示columnNames数组的长度。 | + +**返回:** + +如果查询成功则返回一个指向[OH_Cursor](_o_h___cursor.md)结构体实例的指针,否则返回NULL。 + +**参见:** + +[OH_Rdb_Store](_o_h___rdb___store.md), [OH_Predicates](_o_h___predicates.md), [OH_Cursor](_o_h___cursor.md). + + +### OH_Rdb_Restore() + + +``` +int OH_Rdb_Restore (OH_Rdb_Store * store, const char * databasePath ) +``` + +**描述:** + +从指定的数据库备份文件恢复数据库。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| store | 表示指向[OH_Rdb_Store](_o_h___rdb___store.md)实例的指针。 | +| databasePath | 指定数据库的备份文件路径。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Rdb_Store](_o_h___rdb___store.md). + + +### OH_Rdb_RollBack() + + +``` +int OH_Rdb_RollBack (OH_Rdb_Store * store) +``` + +**描述:** + +回滚已经执行的SQL语句。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| store | 表示指向[OH_Rdb_Store](_o_h___rdb___store.md)实例的指针。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Rdb_Store](_o_h___rdb___store.md). + + +### OH_Rdb_SetVersion() + + +``` +int OH_Rdb_SetVersion (OH_Rdb_Store * store, int version ) +``` + +**描述:** + +设置数据库版本。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| store | 表示指向[OH_Rdb_Store](_o_h___rdb___store.md)实例的指针。 | +| version | 示版本号。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Rdb_Store](_o_h___rdb___store.md). + + +### OH_Rdb_Update() + + +``` +int OH_Rdb_Update (OH_Rdb_Store * store, OH_VBucket * valuesBucket, OH_Predicates * predicates ) +``` + +**描述:** + +根据指定的条件更新数据库中的数据。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| store | 表示指向[OH_Rdb_Store](_o_h___rdb___store.md)实例的指针。 | +| valuesBucket | 表示要更新到表中的数据行[OH_VBucket](_o_h___v_bucket.md)。 | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针,指定更新条件。 | + +**返回:** + +如果更新成功,返回受影响的行数,否则返回特定的错误码。 + +**参见:** + +[OH_Rdb_Store](_o_h___rdb___store.md), OH_Bucket, [OH_Predicates](_o_h___predicates.md). + + +## 变量说明 + + +### andOperate + + +``` +OH_Predicates(* OH_Predicates::andOperate) (OH_Predicates *predicates) +``` + +**描述:** + +函数指针,向谓词添加和条件。 + +该方法等同于SQL语句中的“AND”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | + +**返回:** + +返回带有和条件的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md). + + +### beginWrap + + +``` +OH_Predicates(* OH_Predicates::beginWrap) (OH_Predicates *predicates) +``` + +**描述:** + +函数指针,向谓词添加左括号。 + +该方法等同于SQL语句中的“(”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | + +**返回:** + +返回带有左括号的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md). + + +### between + + +``` +OH_Predicates(* OH_Predicates::between) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject) +``` + +**描述:** + +函数指针,将谓词配置为匹配数据字段为field且其值在给定范围内的指定字段。 + +该方法等同于SQL语句中的“BETWEEN”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| field | 数据库表中的列名。 | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针,指示要与谓词匹配的值。 | + +**返回:** + +返回与指定字段匹配的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md), [OH_VObject](_o_h___v_object.md). + + +### capability + + +``` +uint16_t OH_VBucket::capability +``` + +**描述:** + +表示结构体的存储键值对的数量 + + +### clear [1/2] + + +``` +OH_Predicates(* OH_Predicates::clear) (OH_Predicates *predicates) +``` + +**描述:** + +函数指针,清空谓词。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | + +**返回:** + +返回清空后的谓词 + +**参见:** + +[OH_Predicates](_o_h___predicates.md). + + +### clear [2/2] + + +``` +int(* OH_VBucket::clear) (OH_VBucket *bucket) +``` + +**描述:** + +清空[OH_VBucket](_o_h___v_bucket.md)对象。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| bucket | 表示指向[OH_VBucket](_o_h___v_bucket.md)实例的指针。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_VBucket](_o_h___v_bucket.md). + + +### close + + +``` +int(* OH_Cursor::close) (OH_Cursor *cursor) +``` + +**描述:** + +函数指针,关闭结果集。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| cursor | 表示指向[OH_Cursor](_o_h___cursor.md)实例的指针。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Cursor](_o_h___cursor.md). + + +### destroyPredicates + + +``` +int(* OH_Predicates::destroyPredicates) (OH_Predicates *predicates) +``` + +**描述:** + +销毁[OH_Predicates](_o_h___predicates.md)对象,并回收该对象占用的内存。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md). + + +### destroyValueObject + + +``` +int(* OH_VObject::destroyValueObject) (OH_VObject *valueObject) +``` + +**描述:** + +销毁[OH_VObject](_o_h___v_object.md)对象,并回收该对象占用的内存。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_VObject](_o_h___v_object.md). + + +### destroyValuesBucket + + +``` +int(* OH_VBucket::destroyValuesBucket) (OH_VBucket *bucket) +``` + +**描述:** + +销毁[OH_VBucket](_o_h___v_bucket.md)对象,并回收该对象占用的内存。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| bucket | 表示指向[OH_VBucket](_o_h___v_bucket.md)实例的指针。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_VBucket](_o_h___v_bucket.md). + + +### distinct + + +``` +OH_Predicates(* OH_Predicates::distinct) (OH_Predicates *predicates) +``` + +**描述:** + +函数指针,配置谓词以过滤重复记录并仅保留其中一个。 + +该方法等同于SQL语句中的“DISTINCT”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | + +**返回:** + +返回可用于过滤重复记录的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md). + + +### endWrap + + +``` +OH_Predicates(* OH_Predicates::endWrap) (OH_Predicates *predicates) +``` + +**描述:** + +函数指针,向谓词添加右括号。 + +该方法等同于SQL语句中的“)”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | + +**返回:** + +返回带有右括号的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md). + + +### equalTo + + +``` +OH_Predicates(* OH_Predicates::equalTo) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject) +``` + +**描述:** + +函数指针,配置谓词以匹配数据字段等于指定值的字段。 + +该方法等同于SQL语句中的“=”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| field | 数据库表中的列名 | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针,指示要与谓词匹配的值。 | + +**返回:** + +返回与指定字段匹配的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md), [OH_VObject](_o_h___v_object.md). + + +### getBlob + + +``` +int(* OH_Cursor::getBlob) (OH_Cursor *cursor, int32_t columnIndex, unsigned char *value, int length) +``` + +**描述:** + +函数指针,以字节数组的形式获取当前行中指定列的值。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| cursor | 表示指向[OH_Cursor](_o_h___cursor.md)实例的指针。 | +| columnIndex | 表示结果集中指定列的索引。 | +| value | 该参数是输出参数,结果集中指定列的值会以字节数组形式写入该变量。 | +| length | 表示value的长度,该值可通过getSize获取。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Cursor](_o_h___cursor.md). + + +### getColumnCount + + +``` +int(* OH_Cursor::getColumnCount) (OH_Cursor *cursor, int *count) +``` + +**描述:** + +函数指针,获取结果集中的列数。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| cursor | 表示指向[OH_Cursor](_o_h___cursor.md)实例的指针。 | +| count | 该参数是输出参数,结果集中的列数会写入该变量。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Cursor](_o_h___cursor.md). + + +### getColumnIndex + + +``` +int(* OH_Cursor::getColumnIndex) (OH_Cursor *cursor, const char *name, int *columnIndex) +``` + +**描述:** + +函数指针,根据指定的列名获取列索引。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| cursor | 表示指向[OH_Cursor](_o_h___cursor.md)实例的指针。 | +| name | 表示结果集中指定列的名称。 | +| columnIndex | 该参数是输出参数,结果集中指定列的索引会写入该变量。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Cursor](_o_h___cursor.md). + + +### getColumnName + + +``` +int(* OH_Cursor::getColumnName) (OH_Cursor *cursor, int32_t columnIndex, char *name, int length) +``` + +**描述:** + +函数指针,根据指定的列索引获取列名。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| cursor | 表示指向[OH_Cursor](_o_h___cursor.md)实例的指针。 | +| columnIndex | 表示结果集中指定列的索引。 | +| name | 该参数是输出参数,结果集中指定列的名称会写入该变量。 | +| length | 表示列名的长度。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Cursor](_o_h___cursor.md). + + +### getColumnType + + +``` +int(* OH_Cursor::getColumnType) (OH_Cursor *cursor, int32_t columnIndex, OH_ColumnType *columnType) +``` + +**描述:** + +函数指针,根据指定的列索引获取列名。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| cursor | 表示指向[OH_Cursor](_o_h___cursor.md)实例的指针。 | +| columnIndex | 表示结果集中指定列的索引。 | +| columnType | 该参数是输出参数,结果集中指定列的数据类型[OH_ColumnType](#oh_columntype)会写入该变量。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Cursor](_o_h___cursor.md), [OH_ColumnType](#oh_columntype). + + +### getInt64 + + +``` +int(* OH_Cursor::getInt64) (OH_Cursor *cursor, int32_t columnIndex, int64_t *value) +``` + +**描述:** + +函数指针,以int64_t形式获取当前行中指定列的值。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| cursor | 表示指向[OH_Cursor](_o_h___cursor.md)实例的指针。 | +| columnIndex | 表示结果集中指定列的索引。 | +| value | 该参数是输出参数,结果集中指定列的值会以int64_t形式写入该变量。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Cursor](_o_h___cursor.md). + + +### getReal + + +``` +int(* OH_Cursor::getReal) (OH_Cursor *cursor, int32_t columnIndex, double *value) +``` + +**描述:** + +函数指针,以double形式获取当前行中指定列的值。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| cursor | 表示指向[OH_Cursor](_o_h___cursor.md)实例的指针。 | +| columnIndex | 表示结果集中指定列的索引。 | +| value | 该参数是输出参数,结果集中指定列的值会以double形式写入该变量。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Cursor](_o_h___cursor.md). + + +### getRowCount + + +``` +int(* OH_Cursor::getRowCount) (OH_Cursor *cursor, int *count) +``` + +**描述:** + +函数指针,获取结果集中的行数。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| cursor | 表示指向[OH_Cursor](_o_h___cursor.md)实例的指针。 | +| count | 该参数是输出参数,结果集中的行数会写入该变量。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Cursor](_o_h___cursor.md). + + +### getSize + + +``` +int(* OH_Cursor::getSize) (OH_Cursor *cursor, int32_t columnIndex, size_t *size) +``` + +**描述:** + +函数指针,当结果集中列的数据类型是BLOB或者TEXT时,获取其值所需的内存。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| cursor | 表示指向[OH_Cursor](_o_h___cursor.md)实例的指针。 | +| columnIndex | 表示结果集中指定列的索引。 | +| size | 该参数是输出参数,BLOB或者TEXT数据所需内存大小会写入该变量。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Cursor](_o_h___cursor.md). + + +### getText + + +``` +int(* OH_Cursor::getText) (OH_Cursor *cursor, int32_t columnIndex, char *value, int length) +``` + +**描述:** + +函数指针,以字符串形式获取当前行中指定列的值。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| cursor | 表示指向[OH_Cursor](_o_h___cursor.md)实例的指针。 | +| columnIndex | 表示结果集中指定列的索引。 | +| value | 该参数是输出参数,结果集中指定列的值会以字符串形式写入该变量。 | +| length | 表示value的长度,该值可通过getSize获取。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Cursor](_o_h___cursor.md). + + +### goToNextRow + + +``` +int(* OH_Cursor::goToNextRow) (OH_Cursor *cursor) +``` + +**描述:** + +函数指针,转到结果集的下一行。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| cursor | 表示指向[OH_Cursor](_o_h___cursor.md)实例的指针。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Cursor](_o_h___cursor.md). + + +### greaterThan + + +``` +OH_Predicates(* OH_Predicates::greaterThan) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject) +``` + +**描述:** + +函数指针,配置谓词以匹配数据字段为field且值大于指定值valueObject的字段。 + +该方法等同于SQL语句中的“>”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| field | 数据库表中的列名。 | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针,指示要与谓词匹配的值。 | + +**返回:** + +返回与指定字段匹配的谓词 + +**参见:** + +[OH_Predicates](_o_h___predicates.md), [OH_VObject](_o_h___v_object.md). + + +### greaterThanOrEqualTo + + +``` +OH_Predicates(* OH_Predicates::greaterThanOrEqualTo) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject) +``` + +**描述:** + +函数指针,配置谓词以匹配数据字段为field且值大于或等于指定值valueObject的字段 + +该方法等同于SQL语句中的“>=”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| field | 数据库表中的列名。 | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针,指示要与谓词匹配的值。 | + +**返回:** + +返回与指定字段匹配的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md), [OH_VObject](_o_h___v_object.md). + + +### groupBy + + +``` +OH_Predicates(* OH_Predicates::groupBy) (OH_Predicates *predicates, char const *const *fields, int length) +``` + +**描述:** + +函数指针,配置R谓词按指定列分组查询结果。 + +该方法等同于SQL语句中的“GROUP BY”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| fields | 指定分组依赖的列名。 | +| length | 表示fields数值的长度。 | + +**返回:** + +返回分组查询列的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md). + + +### id [1/4] + + +``` +int64_t OH_Predicates::id +``` + +**描述:** + +OH_Predicates结构体的唯一标识符。 + + +### id [2/4] + + +``` +int64_t OH_VObject::id +``` + +**描述:** + +OH_VObject结构体的唯一标识符。 + + +### id [3/4] + + +``` +int64_t OH_VBucket::id +``` + +**描述:** + +OH_VBucket结构体的唯一标识符。 + + +### id [4/4] + + +``` +int64_t OH_Rdb_Store::id +``` + +**描述:** + +OH_Rdb_Store结构体的唯一标识符。 + + +### in + + +``` +OH_Predicates(* OH_Predicates::in) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject) +``` + +**描述:** + +函数指针,配置谓词以匹配数据字段为field且值在给定范围内的指定字段。 + +该方法等同于SQL语句中的“IN”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| field | 表示数据库表中的列名。 | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针,指示要与谓词匹配的值。 | + +**返回:** + +返回与指定字段匹配的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md), [OH_VObject](_o_h___v_object.md). + + +### isEncrypt + + +``` +bool OH_Rdb_Config::isEncrypt +``` + +**描述:** + +指定数据库是否加密。 + + +### isNotNull + + +``` +OH_Predicates(* OH_Predicates::isNotNull) (OH_Predicates *predicates, const char *field) +``` + +**描述:** + +函数指针,配置谓词以匹配值不为null的指定字段。 + +该方法等同于SQL语句中的“IS NOT NULL”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| field | 数据库表中的列名。 | + +**返回:** + +返回与指定字段匹配的谓词 + +**参见:** + +[OH_Predicates](_o_h___predicates.md). + + +### isNull [1/2] + + +``` +int(* OH_Cursor::isNull) (OH_Cursor *cursor, int32_t columnIndex, bool *isNull) +``` + +**描述:** + +函数指针,检查当前行中指定列的值是否为null。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| cursor | 表示指向[OH_Cursor](_o_h___cursor.md)实例的指针。 | +| columnIndex | 表示结果集中指定列的索引。 | +| isNull | 该参数是输出参数,如果当前行中指定列的值为null,该值为true,否则为false。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_Cursor](_o_h___cursor.md). + + +### isNull [2/2] + + +``` +OH_Predicates(* OH_Predicates::isNull) (OH_Predicates *predicates, const char *field) +``` + +**描述:** + +函数指针,配置谓词以匹配值为null的字段。 + +该方法等同于SQL语句中的“IS NULL”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| field | 数据库表中的列名。 | + +**返回:** + +返回与指定字段匹配的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md). + + +### lessThan + + +``` +OH_Predicates(* OH_Predicates::lessThan) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject) +``` + +**描述:** + +函数指针,配置谓词以匹配数据字段为field且值小于指定值valueObject的字段 + +该方法等同于SQL语句中的“<”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| field | 数据库表中的列名。 | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针,指示要与谓词匹配的值。 | + +**返回:** + +返回与指定字段匹配的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md), [OH_VObject](_o_h___v_object.md). + + +### lessThanOrEqualTo + + +``` +OH_Predicates(* OH_Predicates::lessThanOrEqualTo) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject) +``` + +**描述:** + +函数指针,配置谓词以匹配数据字段为field且值小于或等于指定值valueObject的字段 + +该方法等同于SQL语句中的“<=”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| field | 数据库表中的列名。 | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针,指示要与谓词匹配的值。 | + +**返回:** + +返回与指定字段匹配的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md), [OH_VObject](_o_h___v_object.md). + + +### like + + +``` +OH_Predicates(* OH_Predicates::like) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject) +``` + +**描述:** + +函数指针,配置谓词以匹配数据字段为field且值类似于指定字符串的字段。 + +该方法等同于SQL语句中的“LIKE”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| field | 数据库表中的列名。 | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针,指示要与谓词匹配的值。 | + +**返回:** + +返回与指定字段匹配的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md), [OH_VObject](_o_h___v_object.md). + + +### limit + + +``` +OH_Predicates(* OH_Predicates::limit) (OH_Predicates *predicates, unsigned int value) +``` + +**描述:** + +函数指针,设置最大数据记录数的谓词。 + +该方法等同于SQL语句中的“LIMIT”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| value | 表示最大数据记录数。 | + +**返回:** + +返回可用于设置最大数据记录数的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md). + + +### notBetween + + +``` +OH_Predicates(* OH_Predicates::notBetween) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject) +``` + +**描述:** + +函数指针,将谓词配置为匹配数据字段为field且其值超出给定范围内的指定字段。 + +该方法等同于SQL语句中的“NOT BETWEEN”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| field | 数据库表中的列名。 | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针,指示要与谓词匹配的值。 | + +**返回:** + +返回与指定字段匹配的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md), [OH_VObject](_o_h___v_object.md). + + +### notEqualTo + + +``` +OH_Predicates(* OH_Predicates::notEqualTo) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject) +``` + +**描述:** + +函数指针,配置谓词以匹配数据字段不等于指定值的字段。 + +该方法等同于SQL语句中的“!=”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| field | 数据库表中的列名。 | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针,指示要与谓词匹配的值。 | + +**返回:** + +返回与指定字段匹配的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md), [OH_VObject](_o_h___v_object.md). + + +### notIn + + +``` +OH_Predicates(* OH_Predicates::notIn) (OH_Predicates *predicates, const char *field, OH_VObject *valueObject) +``` + +**描述:** + +函数指针,配置谓词以匹配数据字段为field且值超出给定范围内的指定字段。 + +该方法等同于SQL语句中的“NOT IN”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| field | 表示数据库表中的列名。 | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针,指示要与谓词匹配的值。 | + +**返回:** + +返回与指定字段匹配的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md), [OH_VObject](_o_h___v_object.md). + + +### offset + + +``` +OH_Predicates(* OH_Predicates::offset) (OH_Predicates *predicates, unsigned int rowOffset) +``` + +**描述:** + +函数指针,配置谓词以指定返回结果的起始位置。 + +该方法等同于SQL语句中的“OFFSET”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| rowOffset | 返回结果的起始位置,取值为正整数。 | + +**返回:** + +返回具有指定返回结果起始位置的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md). + + +### orderBy + + +``` +OH_Predicates(* OH_Predicates::orderBy) (OH_Predicates *predicates, const char *field, OH_OrderType type) +``` + +**描述:** + +函数指针,配置谓词以匹配其值按升序或降序排序的列。 + +该方法等同于SQL语句中的“ORDER BY”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | +| field | 数据库表中的列名。 | +| type | 表示排序类型 [OH_OrderType](#oh_ordertype). | + +**返回:** + +返回与指定字段匹配的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md), [OH_OrderType](#oh_ordertype). + + +### orOperate + + +``` +OH_Predicates(* OH_Predicates::orOperate) (OH_Predicates *predicates) +``` + +**描述:** + +函数指针,将或条件添加到谓词中。 + +该方法等同于SQL语句中的“OR”。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| predicates | 表示指向[OH_Predicates](_o_h___predicates.md)实例的指针。 | + +**返回:** + +返回带有或条件的谓词。 + +**参见:** + +[OH_Predicates](_o_h___predicates.md). + + +### path + + +``` +const char* OH_Rdb_Config::path +``` + +**描述:** + +数据库文件路径。 + + +### putBlob + + +``` +int(* OH_VBucket::putBlob) (OH_VBucket *bucket, const char *field, const uint8_t *value, uint32_t size) +``` + +**描述:** + +将const uint8_t \*值放入给定列名的[OH_VBucket](_o_h___v_bucket.md)对象中。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| bucket | 表示指向[OH_VBucket](_o_h___v_bucket.md)实例的指针。 | +| field | 数据库表中的列名。 | +| value | 数据库表中指定列名对应的值。 | +| size | 表示value的长度。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_VBucket](_o_h___v_bucket.md). + + +### putDouble + + +``` +int(* OH_VObject::putDouble) (OH_VObject *valueObject, double *value, uint32_t count) +``` + +**描述:** + +将double类型的单个参数或者数组转换为[OH_VObject](_o_h___v_object.md)类型的值。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针。 | +| value | 表示指向double类型的单个参数或者数组的指针。 | +| count | 如果value是指向单个数值的指针,则count = 1;如果value是指向数组的指针,则count是数组的长度。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_VObject](_o_h___v_object.md). + + +### putInt64 [1/2] + + +``` +int(* OH_VBucket::putInt64) (OH_VBucket *bucket, const char *field, int64_t value) +``` + +**描述:** + +将int64_t值放入给定列名的[OH_VBucket](_o_h___v_bucket.md)对象中。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| bucket | 表示指向[OH_VBucket](_o_h___v_bucket.md)实例的指针。 | +| field | 数据库表中的列名。 | +| value | 数据库表中指定列名对应的值。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_VBucket](_o_h___v_bucket.md). + + +### putInt64 [2/2] + + +``` +int(* OH_VObject::putInt64) (OH_VObject *valueObject, int64_t *value, uint32_t count) +``` + +**描述:** + +将int64类型的单个参数或者数组转换为[OH_VObject](_o_h___v_object.md)类型的值。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针。 | +| value | 表示指向int64_t类型的单个参数或者数组的指针。 | +| count | 如果value是指向单个数值的指针,则count = 1;如果value是指向数组的指针,则count是数组的长度。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_VObject](_o_h___v_object.md). + + +### putNull + + +``` +int(* OH_VBucket::putNull) (OH_VBucket *bucket, const char *field) +``` + +**描述:** + +将NULL值放入给定列名的[OH_VBucket](_o_h___v_bucket.md)对象中。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| bucket | 表示指向[OH_VBucket](_o_h___v_bucket.md)实例的指针。 | +| field | 数据库表中的列名。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_VBucket](_o_h___v_bucket.md). + + +### putReal + + +``` +int(* OH_VBucket::putReal) (OH_VBucket *bucket, const char *field, double value) +``` + +**描述:** + +将double值放入给定列名的{**OH_VBucket}对象中。** + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| bucket | 表示指向[OH_VBucket](_o_h___v_bucket.md)实例的指针。 | +| field | 数据库表中的列名。 | +| value | 数据库表中指定列名对应的值。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_VBucket](_o_h___v_bucket.md). + + +### putText [1/2] + + +``` +int(* OH_VBucket::putText) (OH_VBucket *bucket, const char *field, const char *value) +``` + +**描述:** + +将const char\*值放入给定列名的[OH_VBucket](_o_h___v_bucket.md)对象中。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| bucket | 表示指向[OH_VBucket](_o_h___v_bucket.md)实例的指针。 | +| field | 数据库表中的列名。 | +| value | 数据库表中指定列名对应的值。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_VBucket](_o_h___v_bucket.md). + + +### putText [2/2] + + +``` +int(* OH_VObject::putText) (OH_VObject *valueObject, const char *value) +``` + +**描述:** + +将char \*类型的字符数组转换为[OH_VObject](_o_h___v_object.md)类型的值。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针。 | +| value | 表示字符数组参数。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_VObject](_o_h___v_object.md). + + +### putTexts + + +``` +int(* OH_VObject::putTexts) (OH_VObject *valueObject, const char **value, uint32_t count) +``` + +**描述:** + +将char \*类型的字符串数组转换为[OH_VObject](_o_h___v_object.md)类型的值。 + +**参数:** + +| 名称 | 描述 | +| -------- | -------- | +| valueObject | 表示指向[OH_VObject](_o_h___v_object.md)实例的指针。 | +| value | 表示字符串数组参数。 | +| count | 表示字符串数组参数value的长度。 | + +**返回:** + +返回操作是否成功,出错时返回对应的错误码。 + +**参见:** + +[OH_VObject](_o_h___v_object.md). + + +### securityLevel + + +``` +enum OH_Rdb_SecurityLevel OH_Rdb_Config::securityLevel +``` + +**描述:** + +设置数据库安全级别[OH_Rdb_SecurityLevel](#oh_rdb_securitylevel)。 diff --git a/zh-cn/application-dev/reference/native-apis/_video_decoder.md b/zh-cn/application-dev/reference/native-apis/_video_decoder.md index a53a04ceaac7926389522bd400869fefc1859bf3..df48c843419645ba3dce1858004fddaaa5e577ce 100644 --- a/zh-cn/application-dev/reference/native-apis/_video_decoder.md +++ b/zh-cn/application-dev/reference/native-apis/_video_decoder.md @@ -3,7 +3,7 @@ ## 概述 -VideoDecoder模块提供用于视频解码功能的函数。该模块在部分设备上可能不支持,可以通过[CanIUse](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/syscap.md)接口确认。 +VideoDecoder模块提供用于视频解码功能的函数。该模块在部分设备上可能不支持,可以通过[CanIUse](../syscap.md)接口确认。 @syscap SystemCapability.Multimedia.Media.VideoDecoder diff --git a/zh-cn/application-dev/reference/native-apis/_video_encoder.md b/zh-cn/application-dev/reference/native-apis/_video_encoder.md index b7bf9abf6a31cdb4201bb87b8b3c2649d2f0f816..37734d087ca2f1613cb68d5f29c112fd9e01e617 100644 --- a/zh-cn/application-dev/reference/native-apis/_video_encoder.md +++ b/zh-cn/application-dev/reference/native-apis/_video_encoder.md @@ -3,7 +3,7 @@ ## 概述 -VideoEncoder模块提供用于视频编码功能的函数和枚举。该模块在部分设备上可能不支持,可以通过[CanIUse](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/syscap.md)接口确认。 +VideoEncoder模块提供用于视频编码功能的函数和枚举。该模块在部分设备上可能不支持,可以通过[CanIUse](../syscap.md)接口确认。 @syscap SystemCapability.Multimedia.Media.VideoEncoder diff --git a/zh-cn/application-dev/reference/native-apis/context_8h.md b/zh-cn/application-dev/reference/native-apis/context_8h.md index df34bc97972ece5f49feff906942f01f62d11cd3..c3ad71e2390393b7bcc1f8785770c3a8416db4ab 100644 --- a/zh-cn/application-dev/reference/native-apis/context_8h.md +++ b/zh-cn/application-dev/reference/native-apis/context_8h.md @@ -37,11 +37,11 @@ | [OH_AI_ContextGetThreadAffinityMode](_mind_spore.md#oh_ai_contextgetthreadaffinitymode) (const [OH_AI_ContextHandle](_mind_spore.md#oh_ai_contexthandle) context) | 获取运行时线程绑定CPU核心的策略。 | | [OH_AI_ContextSetThreadAffinityCoreList](_mind_spore.md#oh_ai_contextsetthreadaffinitycorelist) ([OH_AI_ContextHandle](_mind_spore.md#oh_ai_contexthandle) context, const int32_t \*core_list, size_t core_num) | 设置运行时线程绑定CPU核心的列表。 | | [OH_AI_ContextGetThreadAffinityCoreList](_mind_spore.md#oh_ai_contextgetthreadaffinitycorelist) (const [OH_AI_ContextHandle](_mind_spore.md#oh_ai_contexthandle) context, size_t \*core_num) | 获取CPU绑核列表。 | -| [OH_AI_ContextSetEnableParallel](_mind_spore.md#oh_ai_contextsetenableparallel) ([OH_AI_ContextHandle](_mind_spore.md#oh_ai_contexthandle) context, bool is_parallel) | 设置运行时是否支持并行。 | +| [OH_AI_ContextSetEnableParallel](_mind_spore.md#oh_ai_contextsetenableparallel) ([OH_AI_ContextHandle](_mind_spore.md#oh_ai_contexthandle) context, bool is_parallel) | 设置运行时是否支持并行。此接口特性当前未开启,设置无效。 | | [OH_AI_ContextGetEnableParallel](_mind_spore.md#oh_ai_contextgetenableparallel) (const [OH_AI_ContextHandle](_mind_spore.md#oh_ai_contexthandle) context) | 获取是否支持算子间并行。 | -| [OH_AI_ContextAddDeviceInfo](_mind_spore.md#oh_ai_contextadddeviceinfo) ([OH_AI_ContextHandle](_mind_spore.md#oh_ai_contexthandle) context, [OH_AI_DeviceInfoHandle](_mind_spore.md#oh_ai_deviceinfohandle) device_info) | 添加运行设备信息。 | +| [OH_AI_ContextAddDeviceInfo](_mind_spore.md#oh_ai_contextadddeviceinfo) ([OH_AI_ContextHandle](_mind_spore.md#oh_ai_contexthandle) context, [OH_AI_DeviceInfoHandle](_mind_spore.md#oh_ai_deviceinfohandle) device_info) | 将一个用户定义的运行设备信息附加到推理上下文中。 | | [OH_AI_DeviceInfoCreate](_mind_spore.md#oh_ai_deviceinfocreate) ([OH_AI_DeviceType](_mind_spore.md#oh_ai_devicetype) device_type) | 创建一个设备信息对象。 | -| [OH_AI_DeviceInfoDestroy](_mind_spore.md#oh_ai_deviceinfodestroy) ([OH_AI_DeviceInfoHandle](_mind_spore.md#oh_ai_deviceinfohandle) \*device_info) | 释放设备信息实例。 | +| [OH_AI_DeviceInfoDestroy](_mind_spore.md#oh_ai_deviceinfodestroy) ([OH_AI_DeviceInfoHandle](_mind_spore.md#oh_ai_deviceinfohandle) \*device_info) | 释放设备信息实例。注意:设备信息实例被添加到context后,无需调用者手动释放。 | | [OH_AI_DeviceInfoSetProvider](_mind_spore.md#oh_ai_deviceinfosetprovider) ([OH_AI_DeviceInfoHandle](_mind_spore.md#oh_ai_deviceinfohandle) device_info, const char \*provider) | 设置供应商的名称。 | | [OH_AI_DeviceInfoGetProvider](_mind_spore.md#oh_ai_deviceinfogetprovider) (const [OH_AI_DeviceInfoHandle](_mind_spore.md#oh_ai_deviceinfohandle) device_info) | 获取生产商的名称。 | | [OH_AI_DeviceInfoSetProviderDevice](_mind_spore.md#oh_ai_deviceinfosetproviderdevice) ([OH_AI_DeviceInfoHandle](_mind_spore.md#oh_ai_deviceinfohandle) device_info, const char \*device) | 设置生产商设备的名称。 | diff --git a/zh-cn/application-dev/reference/native-apis/oh__cursor_8h.md b/zh-cn/application-dev/reference/native-apis/oh__cursor_8h.md new file mode 100644 index 0000000000000000000000000000000000000000..a26b98ca89b090de9683dec7cd566211193bb60e --- /dev/null +++ b/zh-cn/application-dev/reference/native-apis/oh__cursor_8h.md @@ -0,0 +1,40 @@ +# oh_cursor.h + + +## 概述 + +提供通过查询数据库生成的数据库结果集的访问方法。 + +结果集是指用户调用关系型数据库查询接口之后返回的结果集合,提供了多种灵活的数据访问方式,以便用户获取各项数据。 + +**起始版本:** + +10 + +**相关模块:** + +[RDB](_r_d_b.md) + + +## 汇总 + + +### 结构体 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_Cursor](_o_h___cursor.md) | 表示结果集。 | + + +### 类型定义 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_Cursor](_r_d_b.md#oh_cursor) | 表示结果集。 | + + +### 枚举 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_ColumnType](_r_d_b.md#oh_columntype) {
TYPE_NULL = 0, TYPE_INT64, TYPE_REAL, TYPE_TEXT,
TYPE_BLOB
} | 数据库字段类型. | diff --git a/zh-cn/application-dev/reference/native-apis/oh__predicates_8h.md b/zh-cn/application-dev/reference/native-apis/oh__predicates_8h.md new file mode 100644 index 0000000000000000000000000000000000000000..c59b86d0fbf3b107ec7a65f13b6b3112030c8668 --- /dev/null +++ b/zh-cn/application-dev/reference/native-apis/oh__predicates_8h.md @@ -0,0 +1,38 @@ +# oh_predicates.h + + +## 概述 + +表示关系型数据库(RDB)的谓词。 + +**起始版本:** + +10 + +**相关模块:** + +[RDB](_r_d_b.md) + + +## 汇总 + + +### 结构体 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_Predicates](_o_h___predicates.md) | 表示谓词。 | + + +### 类型定义 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_Predicates](_r_d_b.md#oh_predicates) | 表示谓词。 | + + +### 枚举 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_OrderType](_r_d_b.md#oh_ordertype) { ASC = 0, DESC = 1 } | 排序方式。 | diff --git a/zh-cn/application-dev/reference/native-apis/oh__value__object_8h.md b/zh-cn/application-dev/reference/native-apis/oh__value__object_8h.md new file mode 100644 index 0000000000000000000000000000000000000000..fa976cc9d7fccca8b7dd1b3680689d5acdb6f42b --- /dev/null +++ b/zh-cn/application-dev/reference/native-apis/oh__value__object_8h.md @@ -0,0 +1,31 @@ +# oh_value_object.h + + +## 概述 + +提供类型转换方法。 + +**起始版本:** + +10 + +**相关模块:** + +[RDB](_r_d_b.md) + + +## 汇总 + + +### 结构体 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_VObject](_o_h___v_object.md) | 表示允许的数据字段类型。 | + + +### 类型定义 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_VObject](_r_d_b.md#oh_vobject) | 表示允许的数据字段类型。 | diff --git a/zh-cn/application-dev/reference/native-apis/oh__values__bucket_8h.md b/zh-cn/application-dev/reference/native-apis/oh__values__bucket_8h.md new file mode 100644 index 0000000000000000000000000000000000000000..266744e43c3be41a4655d831d3ed6f67f018c0d7 --- /dev/null +++ b/zh-cn/application-dev/reference/native-apis/oh__values__bucket_8h.md @@ -0,0 +1,31 @@ +# oh_values_bucket.h + + +## 概述 + +用于存储键值对的类型。 + +**起始版本:** + +10 + +**相关模块:** + +[RDB](_r_d_b.md) + + +## 汇总 + + +### 结构体 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_VBucket](_o_h___v_bucket.md) | 用于存储键值对的类型。 | + + +### 类型定义 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_VBucket](_r_d_b.md#oh_vbucket) | 用于存储键值对的类型。 | diff --git a/zh-cn/application-dev/reference/native-apis/relation__error__code_8h.md b/zh-cn/application-dev/reference/native-apis/relation__error__code_8h.md new file mode 100644 index 0000000000000000000000000000000000000000..2064655e123b4777b5d422241315643a5aca1a94 --- /dev/null +++ b/zh-cn/application-dev/reference/native-apis/relation__error__code_8h.md @@ -0,0 +1,24 @@ +# relation_error_code.h + + +## 概述 + +声明关系型数据库(RDB)的错误码信息。 + +**起始版本:** + +10 + +**相关模块:** + +[RDB](_r_d_b.md) + + +## 汇总 + + +### 枚举 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_Rdb_ErrCode](_r_d_b.md#oh_rdb_errcode) { RDB_ERR_INVALID_ARGS = -2, RDB_ERR = -1, RDB_ERR_OK = 0 } | 表示错误码信息。 | diff --git a/zh-cn/application-dev/reference/native-apis/relation__store_8h.md b/zh-cn/application-dev/reference/native-apis/relation__store_8h.md new file mode 100644 index 0000000000000000000000000000000000000000..20d0f4dc86beeb8aa9e6aab0b23aad1380231969 --- /dev/null +++ b/zh-cn/application-dev/reference/native-apis/relation__store_8h.md @@ -0,0 +1,57 @@ +# relation_store.h + + +## 概述 + +提供管理关系数据库(RDB)方法的接口。 + +**起始版本:** + +10 + +**相关模块:** + +[RDB](_r_d_b.md) + + +## 汇总 + + +### 结构体 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_Rdb_Config](_o_h___rdb___config.md) | 管理关系数据库配置。 | +| [OH_Rdb_Store](_o_h___rdb___store.md) | 表示数据库类型。 | + + +### 枚举 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_Rdb_SecurityLevel](_r_d_b.md#oh_rdb_securitylevel) { S1 = 1, S2, S3, S4 } | 数据库的安全级别枚举。 | + + +### 函数 + +| 名称 | 描述 | +| -------- | -------- | +| [OH_Rdb_CreateValueObject](_r_d_b.md#oh_rdb_createvalueobject) (void) | 创建[OH_VObject](_o_h___v_object.md)实例。 | +| [OH_Rdb_CreateValuesBucket](_r_d_b.md#oh_rdb_createvaluesbucket) (void) | 创建[OH_VBucket](_o_h___v_bucket.md)实例。 | +| [OH_Rdb_CreatePredicates](_r_d_b.md#oh_rdb_createpredicates) (const char \*table) | 创建[OH_Predicates](_o_h___predicates.md)实例。 | +| [OH_Rdb_GetOrOpen](_r_d_b.md#oh_rdb_getoropen) (const [OH_Rdb_Config](_o_h___rdb___config.md) \*config, int \*errCode) | 获得一个相关的[OH_Rdb_Store](_o_h___rdb___store.md)实例,操作关系型数据库。 | +| [OH_Rdb_CloseStore](_r_d_b.md#oh_rdb_closestore) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store) | 销毁[OH_Rdb_Store](_o_h___rdb___store.md)对象,并回收该对象占用的内存。 | +| [OH_Rdb_DeleteStore](_r_d_b.md#oh_rdb_deletestore) (const char \*path) | 使用指定的数据库文件配置删除数据库。 | +| [OH_Rdb_Insert](_r_d_b.md#oh_rdb_insert) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*table, [OH_VBucket](_o_h___v_bucket.md) \*valuesBucket) | 向目标表中插入一行数据。 | +| [OH_Rdb_Update](_r_d_b.md#oh_rdb_update) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, [OH_VBucket](_o_h___v_bucket.md) \*valuesBucket, [OH_Predicates](_o_h___predicates.md) \*predicates) | 根据指定的条件更新数据库中的数据。 | +| [OH_Rdb_Delete](_r_d_b.md#oh_rdb_delete) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, [OH_Predicates](_o_h___predicates.md) \*predicates) | 根据指定的条件删除数据库中的数据。 | +| [OH_Rdb_Query](_r_d_b.md#oh_rdb_query) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, [OH_Predicates](_o_h___predicates.md) \*predicates, const char \*const \*columnNames, int length) | 根据指定条件查询数据库中的数据 | +| [OH_Rdb_Execute](_r_d_b.md#oh_rdb_execute) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*sql) | 执行无返回值的SQL语句。 | +| [OH_Rdb_ExecuteQuery](_r_d_b.md#oh_rdb_executequery) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*sql) | 根据指定SQL语句查询数据库中的数据。 | +| [OH_Rdb_BeginTransaction](_r_d_b.md#oh_rdb_begintransaction) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store) | 在开始执行SQL语句之前,开始事务。 | +| [OH_Rdb_RollBack](_r_d_b.md#oh_rdb_rollback) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store) | 回滚已经执行的SQL语句。 | +| [OH_Rdb_Commit](_r_d_b.md#oh_rdb_commit) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store) | 提交已执行的SQL语句 | +| [OH_Rdb_Backup](_r_d_b.md#oh_rdb_backup) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*databasePath) | 以指定路径备份数据库。 | +| [OH_Rdb_Restore](_r_d_b.md#oh_rdb_restore) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, const char \*databasePath) | 从指定的数据库备份文件恢复数据库。 | +| [OH_Rdb_GetVersion](_r_d_b.md#oh_rdb_getversion) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, int \*version) | 获取数据库版本。 | +| [OH_Rdb_SetVersion](_r_d_b.md#oh_rdb_setversion) ([OH_Rdb_Store](_o_h___rdb___store.md) \*store, int version) | 设置数据库版本。 | diff --git a/zh-cn/application-dev/reference/native-lib/Readme-CN.md b/zh-cn/application-dev/reference/native-lib/Readme-CN.md index 3edca1fa95b46222ccb34cb7c59313909a6feab0..6c28ebf7a877c5070bea98db62334ee929eb1be7 100644 --- a/zh-cn/application-dev/reference/native-lib/Readme-CN.md +++ b/zh-cn/application-dev/reference/native-lib/Readme-CN.md @@ -1,7 +1,7 @@ # Native API标准库 -- [Node_API](third_party_napi/napi.md) +- [Node-API](third_party_napi/napi.md) - [libuv](third_party_libuv/libuv.md) -- [支持的标准库介绍](third_party_libc/musl.md) +- [Native API中支持的标准库](third_party_libc/musl.md) - 附录 - [Native api中没有导出的符号列表](third_party_libc/musl-peculiar-symbol.md) - [Native api中由于权限管控可能调用失败的符号列表](third_party_libc/musl-permission-control-symbol.md) diff --git a/zh-cn/application-dev/security/Readme-CN.md b/zh-cn/application-dev/security/Readme-CN.md index c7c50de3b885e922047c97ec68f09bdfa40ab589..450b81acceefa6d53156159bf3deb99e9637dc97 100644 --- a/zh-cn/application-dev/security/Readme-CN.md +++ b/zh-cn/application-dev/security/Readme-CN.md @@ -14,7 +14,7 @@ - [通用密钥库密码算法规格](huks-appendix.md) - 加解密算法库框架 - [加解密算法库框架概述](cryptoFramework-overview.md) - - [加解密算法框架开发指导](cryptoFramework-guidelines.md) + - [加解密算法库框架开发指导](cryptoFramework-guidelines.md) - 证书 - [证书概述](cert-overview.md) - [证书开发指导](cert-guidelines.md) diff --git a/zh-cn/application-dev/security/accesstoken-guidelines.md b/zh-cn/application-dev/security/accesstoken-guidelines.md index d512d0d715c0a82060cec85d950a11c4f9f0f9e9..8b8c26fd1fae0f51cd267143b4a73e5f767d6187 100644 --- a/zh-cn/application-dev/security/accesstoken-guidelines.md +++ b/zh-cn/application-dev/security/accesstoken-guidelines.md @@ -1,4 +1,4 @@ -# 访问控制授权申请 +# 访问控制授权申请指导 ## 场景介绍 diff --git a/zh-cn/application-dev/security/cryptoFramework-guidelines.md b/zh-cn/application-dev/security/cryptoFramework-guidelines.md index cbfd2ba12b1b336730567bc1aafd45f98c3a45a7..8c6a5429a824e2e4b100bbf0983e9835802a96ea 100644 --- a/zh-cn/application-dev/security/cryptoFramework-guidelines.md +++ b/zh-cn/application-dev/security/cryptoFramework-guidelines.md @@ -13,8 +13,10 @@ 1. 随机生成算法库密钥对象。该对象可用于后续的加解密等操作。 2. 根据指定数据生成算法库密钥对象(也就是将外部或存储的二进制数据转换为算法库的密钥对象)。该对象可用于后续的加解密等操作。 3. 获取算法库密钥对象的二进制数据,用于存储或传输。 -> **说明**:密钥对象Key包括对称密钥SymKey和非对称密钥(公钥PubKey和私钥PriKey),其中公钥和私钥组成密钥对KeyPair。密钥之间的具体关系可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。 +> **说明:** +> +> 密钥对象Key包括对称密钥SymKey和非对称密钥(公钥PubKey和私钥PriKey),其中公钥和私钥组成密钥对KeyPair。密钥之间的具体关系可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。 **接口及参数说明** @@ -46,7 +48,7 @@ 以使用Promise方式随机生成RSA密钥(1024位,素数个数为2)为例: -```javascript +```js import cryptoFramework from '@ohos.security.cryptoFramework'; function generateAsyKey() { @@ -75,7 +77,7 @@ function generateAsyKey() { 以使用Promise方式随机生成AES密钥(256位)为例: -```javascript +```js import cryptoFramework from '@ohos.security.cryptoFramework'; // 字节流以16进制输出 @@ -103,7 +105,7 @@ function testGenerateAesKey() { 1. 获取RSA公钥或私钥二进制数据,公钥需满足ASN.1语法、X.509规范、DER编码格式,私钥需满足ASN.1语法、PKCS#8规范、DER编码格式。 2. 创建AsyKeyGenerator对象,调用convertKey方法,传入公钥二进制和私钥二进制(二者非必选项,可只传入其中一个),转换为KeyPair对象。 -```javascript +```js import cryptoFramework from '@ohos.security.cryptoFramework'; function convertAsyKey() { @@ -119,16 +121,16 @@ function convertAsyKey() { } ``` -**说明** - - 当前convertKey操作,公钥只支持转换满足X.509规范的DER格式,私钥只支持PKCS#8规范的DER格式; +> **说明:** +> +> 当前convertKey操作,公钥只支持转换满足X.509规范的DER格式,私钥只支持PKCS#8规范的DER格式。 示例4:根据指定的ECC非对称密钥二进制数据,生成KeyPair对象(场景2、3) 1. 获取ECC二进制密钥数据,封装成DataBlob对象。 2. 调用convertKey方法,传入公钥二进制和私钥二进制(二者非必选项,可只传入其中一个),转换为KeyPair对象。 -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" function convertEccAsyKey() { @@ -154,7 +156,7 @@ function convertEccAsyKey() { 以使用callback方式生成3DES密钥(3DES密钥只能为192位)为例: -```javascript +```js import cryptoFramework from '@ohos.security.cryptoFramework'; // 字节流以16进制输出 @@ -201,12 +203,15 @@ function testConvertAesKey() { **场景说明** 在数据存储或传输场景中,可以使用加解密操作用于保证数据的机密性,防止敏感数据泄露。使用加解密操作中,典型的场景有: + 1. 使用对称密钥的加解密操作 2. 使用非对称密钥的加解密操作 **接口及参数说明** -详细接口说明可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。
由于密码算法的复杂性,在选取不同规格和参数时,开发差异较大,无法通过代码示例一一列举,请仔细阅读API参考资料中的相关接口,确保使用正确。 +详细接口说明可参考[API参考](../reference/apis/js-apis-cryptoFramework.md)。 + +由于密码算法的复杂性,在选取不同规格和参数时,开发差异较大,无法通过代码示例一一列举,请仔细阅读API参考资料中的相关接口,确保使用正确。 以上场景设计的常用接口如下表所示: @@ -490,9 +495,10 @@ function test3DesEcb() { } } ``` + 以AES GCM以promise方式,分段update()实现加解密为例: -```javascript +```js import cryptoFramework from '@ohos.security.cryptoFramework'; var globalCipher; @@ -638,7 +644,7 @@ function testAesMultiUpdate() { 2. 生成Cipher对象。通过createCipher接口创建Cipher对象,执行初始化操作,设置密钥及加解密模式。 3. 执行加解密操作。通过调用Cipher对象提供的doFinal接口,执行加密操作生成密文或执行解密操作生成明文。 -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" let plan = "This is cipher test."; @@ -738,8 +744,10 @@ function decryptMessageCallback() { }); } ``` + 以RSA非对称加解密(多次调用doFinal实现分段)为例: -```javascript + +```js import cryptoFramework from "@ohos.security.cryptoFramework" function stringToUint8Array(str) { @@ -823,17 +831,18 @@ function encryptLongMessagePromise() { } ``` -**说明** - -1. 使用RSA加解密时,Cipher对象不可重复调用init方法初始化,在创建了一个加密Cipher对象后,如果要进行解密,则需要重新创建另一个Cipher对象执行解密操作。 -2. RSA加密有长度限制,允许加密明文的最大长度见[加解密算法库框架概述](cryptoFramework-overview.md)中的基本概念章节。 -3. RSA解密每次允许解密的密文长度为,RSA密钥的位数/8。 +> **说明:** +> +> 1. 使用RSA加解密时,Cipher对象不可重复调用init方法初始化,在创建了一个加密Cipher对象后,如果要进行解密,则需要重新创建另一个Cipher对象执行解密操作。 +> 2. RSA加密有长度限制,允许加密明文的最大长度见[加解密算法库框架概述](cryptoFramework-overview.md)中的基本概念章节。 +> 3. RSA解密每次允许解密的密文长度为,RSA密钥的位数/8。 ## 使用签名验签操作 **场景说明** 当需要判断接收的数据是否被篡改且是否为指定对象发送的数据时,可以使用签名验签操作。使用签名验签操作中,典型的场景有: + 1. 使用RSA签名验签操作 2. 使用ECC签名验签操作 @@ -861,21 +870,23 @@ function encryptLongMessagePromise() { **开发步骤** 示例1:使用RSA签名验签操作 + 1. 生成RSA密钥。通过createAsyKeyGenerator接口创建AsyKeyGenerator对象,并生成RSA非对称密钥。 2. 生成Sign对象。通过createSign接口创建Sign对象,执行初始化操作并设置签名私钥。 3. 执行签名操作。通过Sign类提供的update接口,添加签名数据,并调用sign接口生成数据的签名。 4. 生成Verify对象。通过createVerify接口创建Verify对象,执行初始化操作并设置验签公钥。 5. 执行验签操作。通过Verify类提供的update接口,添加签名数据,并调用verify接口传入签名进行验签。 -```javascript + +```js import cryptoFramework from "@ohos.security.cryptoFramework" function stringToUint8Array(str) { - var arr = []; - for (var i = 0, j = str.length; i < j; ++i) { - arr.push(str.charCodeAt(i)); - } - var tmpArray = new Uint8Array(arr); - return tmpArray; + var arr = []; + for (var i = 0, j = str.length; i < j; ++i) { + arr.push(str.charCodeAt(i)); + } + var tmpArray = new Uint8Array(arr); + return tmpArray; } let globalKeyPair; @@ -945,22 +956,23 @@ function verifyMessageCallback() { ``` 示例2:使用ECDSA操作 + 1. 生成ECC密钥。通过createAsyKeyGenerator接口创建AsyKeyGenerator对象,并生成ECC非对称密钥。 2. 生成Sign对象。通过createSign接口创建Sign对象,执行初始化操作并设置签名私钥。 3. 执行签名操作。通过Sign类提供的update接口,添加签名数据,并调用doFinal接口生成数据的签名。 4. 生成Verify对象。通过createVerify接口创建Verify对象,执行初始化操作并设置验签公钥。 5. 执行验签操作。通过Verify类提供的update接口,添加签名数据,并调用doFinal接口传入签名进行验签。 -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" function stringToUint8Array(str) { - var arr = []; - for (var i = 0, j = str.length; i < j; ++i) { - arr.push(str.charCodeAt(i)); - } - var tmpArray = new Uint8Array(arr); - return tmpArray; + var arr = []; + for (var i = 0, j = str.length; i < j; ++i) { + arr.push(str.charCodeAt(i)); + } + var tmpArray = new Uint8Array(arr); + return tmpArray; } let globalKeyPair; @@ -1028,9 +1040,10 @@ function verifyMessageCallback() { }) } ``` + 以执行签名、验签操作时多次调用update实现分段为例: -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" function stringToUint8Array(str) { @@ -1127,142 +1140,133 @@ function signLongMessagePromise() { 3. 通过接口`digest`,返回摘要计算结果 4. 获取当前摘要算法名与摘要计算长度 -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" -// turn string into uint8Arr +// 可理解的字符串转成字节流 function stringToUint8Array(str) { - var arr = []; - for (var i = 0, j = str.length; i < j; ++i) { - arr.push(str.charCodeAt(i)); - } - var tmpUint8Array = new Uint8Array(arr); - return tmpUint8Array; -} - -// generate dataBlob with given length -function GenDataBlob(dataBlobLen) { - var dataBlob; - if (dataBlobLen == 12) { - dataBlob = {data: stringToUint8Array("my test data")}; - } else { - console.error("GenDataBlob: dataBlobLen is invalid"); - dataBlob = {data: stringToUint8Array("my test data")}; + let arr = []; + for (let i = 0, j = str.length; i < j; ++i) { + arr.push(str.charCodeAt(i)); } - return dataBlob; + return new Uint8Array(arr); } -// md with promise async -function doMdByPromise(algName) { - var md; +// 以Promise方式完成摘要 +function doMdByPromise() { + let mdAlgName = "SHA256"; // 摘要算法名 + let message = "mdTestMessgae"; // 待摘要数据 + let md; + let mdOutput; try { - md = cryptoFramework.createMd(algName); + md = cryptoFramework.createMd(mdAlgName); } catch (error) { console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); + return; } - console.error("[Promise]: Md algName is: " + md.algName); - // 初次update - var promiseMdUpdate = md.update(GenDataBlob(12)); + console.info("[Promise]: Md algName is: " + md.algName); + // 数据量较少时,可以只做一次update,将数据全部传入,接口未对入参长度做限制 + let promiseMdUpdate = md.update({ data: stringToUint8Array(message) }); promiseMdUpdate.then(() => { - // 可根据情况进行多次update - promiseMdUpdate = md.update(GenDataBlob(12)); - return promiseMdUpdate; - }).then(mdOutput => { - var PromiseMdDigest = md.digest(); + // 通过digest,返回摘要结果 + let PromiseMdDigest = md.digest(); return PromiseMdDigest; - }).then(mdOutput => { - console.error("[Promise]: MD result: " + mdOutput.data); - var mdLen = md.getMdLength(); - console.error("[Promise]: MD len: " + mdLen); + }).then(digestOutput => { + mdOutput = digestOutput; + console.info("[Promise]: MD result: " + mdOutput.data); + let mdLen = md.getMdLength(); + console.info("[Promise]: MD len: " + mdLen); }).catch(error => { console.error("[Promise]: error: " + error.message); }); } -// md with callback async -function doMdByCallback(algName) { - var md; +// 以Callback方式完成摘要 +function doMdByCallback() { + let mdAlgName = "SHA256"; // 摘要算法名 + let message = "mdTestMessgae"; // 待摘要数据 + let md; + let mdOutput; try { - md = cryptoFramework.createMd(algName); + md = cryptoFramework.createMd(mdAlgName); } catch (error) { console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); } - console.error("[Callback]: Md algName is: " + md.algName); - // 初次update - md.update(GenDataBlob(12), (err,) => { + console.info("[Callback]: Md algName is: " + md.algName); + // 数据量较少时,可以只做一次update,将数据全部传入,接口未对入参长度做限制 + md.update({ data: stringToUint8Array(message) }, (err,) => { if (err) { console.error("[Callback]: err: " + err.code); } - // 可根据情况进行多次update - md.update(GenDataBlob(12), (err1,) => { + md.digest((err1, digestOutput) => { if (err1) { console.error("[Callback]: err: " + err1.code); + } else { + mdOutput = digestOutput; + console.info("[Callback]: MD result: " + mdOutput.data); + let mdLen = md.getMdLength(); + console.info("[Callback]: MD len: " + mdLen); } - md.digest((err2, mdOutput) => { - if (err2) { - console.error("[Callback]: err: " + err2.code); - } else { - console.error("[Callback]: MD result: " + mdOutput.data); - var mdLen = md.getMdLength(); - console.error("[Callback]: MD len: " + mdLen); - } - }); }); }); } ``` + 以MD更新时多次调用update实现分段为例: -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" -async function updateData(index, obj, data) { - console.error("update " + (index + 1) + " MB data..."); - return obj.update(data); -} +```js +import cryptoFramework from "@ohos.security.cryptoFramework" +// 可理解的字符串转成字节流 function stringToUint8Array(str) { - var arr = []; - for (var i = 0, j = str.length; i < j; ++i) { + let arr = []; + for (let i = 0, j = str.length; i < j; ++i) { arr.push(str.charCodeAt(i)); } - var tmpUint8Array = new Uint8Array(arr); - return tmpUint8Array; + return new Uint8Array(arr); } -function GenDataBlob(dataBlobLen) { - var dataBlob; - if (dataBlobLen == 12) { - dataBlob = {data: stringToUint8Array("my test data")}; - } else { - console.error("GenDataBlob: dataBlobLen is invalid"); - dataBlob = {data: stringToUint8Array("my test data")}; - } - return dataBlob; -} -function LoopMdPromise(algName, loopSize) { - var md; +// 使用Promise方式,完成分段摘要 +async function doLoopMdPromise() { + let mdAlgName = "SHA256"; // 摘要算法名 + let md; + let mdOutput; try { - md = cryptoFramework.createMd(algName); + md = cryptoFramework.createMd(mdAlgName); } catch (error) { console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); return; } - console.error("[Promise]: Md algName is: " + md.algName); - var promiseMdUpdate = md.update(GenDataBlob(12)); - promiseMdUpdate.then(() => { - var PromiseMdDigest = md.digest(); - return PromiseMdDigest; - }).then(async () => { - for (var i = 0; i < loopSize; i++) { - await updateData(i, md, GenDataBlob(12)); + console.info("[Promise]: Md algName is: " + md.algName); + let messageText = "aaaaa.....bbbbb.....ccccc.....ddddd.....eee"; // 假设信息总共43字节 + let messageArr = []; + let updateLength = 20; // 假设每20字节分段update一次,实际并无要求 + + for (let i = 0; i <= messageText.length; i++) { + if ((i % updateLength == 0 || i == messageText.length) && messageArr.length != 0) { + let message = new Uint8Array(messageArr); + let messageBlob = { data : message }; + // 使用await处理for循环里的update + try { + await md.update(messageBlob); // 分段update + } catch (error) { + console.error("await update error code: " + error.code + ", message is: " + error.message); + return; + } + messageArr = []; } - var PromiseMdDigest = md.digest(); - return PromiseMdDigest; - }).then(mdOutput => { - console.error("[Promise]: MD result: " + mdOutput.data); - var mdLen = md.getMdLength(); - console.error("[Promise]: MD len: " + mdLen); + // 按分割长度,填充messageArr + if (i < messageText.length) { + messageArr.push(messageText.charCodeAt(i)); + } + } + let PromiseMdDigest = md.digest(); + PromiseMdDigest.then(digestOutput => { + mdOutput = digestOutput; + console.info("[Promise]: MD result: " + mdOutput.data); + let mdLen = md.getMdLength(); + console.info("[Promise]: MD len: " + mdLen); }).catch(error => { console.error("[Promise]: error: " + error.message); }); @@ -1292,7 +1296,7 @@ function LoopMdPromise(algName, loopSize) { 1. 通过createKeyAgreement接口创建KeyAgreement对象,用于后续的密钥协商操作。 2. 调用KeyAgreement对象提供的generateSecret方法,传入对端的ECC公钥对象,以及本地生成的ECC私钥对象。 -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" let globalSelfPriKey; @@ -1371,80 +1375,75 @@ Mac(message authentication code)可以对消息进行完整性校验,通过使 4. 通过接口`doFinal`,返回Mac计算结果 5. 获取当前摘要算法名与Mac计算长度 -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" -// turn string into uint8Arr +// 可理解的字符串转成字节流 function stringToUint8Array(str) { - var arr = []; - for (var i = 0, j = str.length; i < j; ++i) { - arr.push(str.charCodeAt(i)); - } - var tmpUint8Array = new Uint8Array(arr); - return tmpUint8Array; -} - -// generate blob with this func -function GenDataBlob(dataBlobLen) { - var dataBlob; - if (dataBlobLen == 12) { - dataBlob = {data: stringToUint8Array("my test data")}; - } else { - console.error("GenDataBlob: dataBlobLen is invalid"); - dataBlob = {data: stringToUint8Array("my test data")}; + let arr = []; + for (let i = 0, j = str.length; i < j; ++i) { + arr.push(str.charCodeAt(i)); } - return dataBlob; + return new Uint8Array(arr); } -function doHmacByPromise(algName) { - var mac; +// 以Promise方式完成HMAC +function doHmacByPromise() { + let macAlgName = "SHA256"; // 摘要算法名 + let message = "hmacTestMessgae"; // 待hmac数据 + let macOutput; + let mac; try { - mac = cryptoFramework.createMac(algName); + mac = cryptoFramework.createMac(macAlgName); } catch (error) { console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); } - console.error("[Promise]: Mac algName is: " + mac.algName); - var KeyBlob = { + console.info("[Promise]: Mac algName is: " + mac.algName); + let KeyBlob = { + // 128位密钥 data : stringToUint8Array("12345678abcdefgh") } - var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); - var promiseConvertKey = symKeyGenerator.convertKey(KeyBlob); + let symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); + // 将二进制密钥转换为算法库密钥 + let promiseConvertKey = symKeyGenerator.convertKey(KeyBlob); promiseConvertKey.then(symKey => { - var promiseMacInit = mac.init(symKey); + let promiseMacInit = mac.init(symKey); return promiseMacInit; }).then(() => { - // 初次update - var promiseMacUpdate = mac.update(GenDataBlob(12)); - return promiseMacUpdate; - }).then(() => { - // 可根据情况进行多次update - var promiseMacUpdate = mac.update(GenDataBlob(12)); + // 数据量较少时,可以只做一次update,将数据全部传入,接口未对入参长度做限制 + let promiseMacUpdate = mac.update({ data: stringToUint8Array(message) }); return promiseMacUpdate; }).then(() => { - var PromiseMacDoFinal = mac.doFinal(); + let PromiseMacDoFinal = mac.doFinal(); return PromiseMacDoFinal; - }).then(macOutput => { - console.error("[Promise]: HMAC result: " + macOutput.data); - var macLen = mac.getMacLength(); - console.error("[Promise]: MAC len: " + macLen); + }).then(output => { + macOutput = output; + console.info("[Promise]: HMAC result: " + macOutput.data); + let macLen = mac.getMacLength(); + console.info("[Promise]: MAC len: " + macLen); }).catch(error => { console.error("[Promise]: error: " + error.message); }); } -// process by callback -function doHmacByCallback(algName) { - var mac; +// 以Callback方式完成HMAC +function doHmacByCallback() { + let macAlgName = "SHA256"; // 摘要算法名 + let message = "hmacTestMessgae"; // 待hmac数据 + let macOutput; + let mac; try { - mac = cryptoFramework.createMac(algName); + mac = cryptoFramework.createMac(macAlgName); } catch (error) { - AlertDialog.show({message: "[Callback]: error code: " + error.code + ", message is: " + error.message}); console.error("[Callback]: error code: " + error.code + ", message is: " + error.message); } - var KeyBlob = { + console.info("[Promise]: Mac algName is: " + mac.algName); + let KeyBlob = { + // 128位密钥 data : stringToUint8Array("12345678abcdefgh") } - var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); + let symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); + // 将二进制密钥转换为算法库密钥 symKeyGenerator.convertKey(KeyBlob, (err, symKey) => { if (err) { console.error("[Callback]: err: " + err.code); @@ -1453,97 +1452,99 @@ function doHmacByCallback(algName) { if (err1) { console.error("[Callback]: err: " + err1.code); } - // 初次update - mac.update(GenDataBlob(12), (err2, ) => { + // 数据量较少时,可以只做一次update,将数据全部传入,接口未对入参长度做限制 + mac.update({ data: stringToUint8Array(message) }, (err2, ) => { if (err2) { console.error("[Callback]: err: " + err2.code); } - // 可根据情况进行多次update - mac.update(GenDataBlob(12), (err3, ) => { + mac.doFinal((err3, output) => { if (err3) { console.error("[Callback]: err: " + err3.code); + } else { + macOutput = output; + console.info("[Callback]: HMAC result: " + macOutput.data); + let macLen = mac.getMacLength(); + console.info("[Callback]: MAC len: " + macLen); } - mac.doFinal((err4, macOutput) => { - if (err4) { - console.error("[Callback]: err: " + err4.code); - } else { - console.error("[Callback]: HMAC result: " + macOutput.data); - var macLen = mac.getMacLength(); - console.error("[Callback]: MAC len: " + macLen); - } - }); }); }); }); }); } ``` + 以HMAC更新MAC时多次调用update实现分段为例: -```javascript -import cryptoFramework from "@ohos.security.cryptoFramework" -async function updateData(index, obj, data) { - console.error("update " + (index + 1) + " MB data..."); - return obj.update(data); -} +```js +import cryptoFramework from "@ohos.security.cryptoFramework" function stringToUint8Array(str) { - var arr = []; - for (var i = 0, j = str.length; i < j; ++i) { + let arr = []; + for (let i = 0, j = str.length; i < j; ++i) { arr.push(str.charCodeAt(i)); } - var tmpUint8Array = new Uint8Array(arr); - return tmpUint8Array; -} - -function GenDataBlob(dataBlobLen) { - var dataBlob; - if (dataBlobLen == 12) { - dataBlob = {data: stringToUint8Array("my test data")}; - } else { - console.error("GenDataBlob: dataBlobLen is invalid"); - dataBlob = {data: stringToUint8Array("my test data")}; - } - return dataBlob; + return new Uint8Array(arr); } -function LoopHmacPromise(algName, loopSize) { - var mac; +function doLoopHmacPromise() { + let macAlgName = "SHA256"; // 摘要算法名 + let macOutput; + let mac; try { - mac = cryptoFramework.createMac(algName); + mac = cryptoFramework.createMac(macAlgName); } catch (error) { console.error("[Promise]: error code: " + error.code + ", message is: " + error.message); return; } - console.error("[Promise]: Mac algName is: " + mac.algName); - var KeyBlob = { + console.info("[Promise]: Mac algName is: " + mac.algName); + let KeyBlob = { + // 128位密钥 data : stringToUint8Array("12345678abcdefgh") } - var symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); - var promiseConvertKey = symKeyGenerator.convertKey(KeyBlob); + let messageText = "aaaaa.....bbbbb.....ccccc.....ddddd.....eee"; // 假设信息总共43字节 + let updateLength = 20; // 假设每20字节分段update一次,实际并无要求 + let symKeyGenerator = cryptoFramework.createSymKeyGenerator("AES128"); + // 将二进制密钥转换为算法库密钥 + let promiseConvertKey = symKeyGenerator.convertKey(KeyBlob); promiseConvertKey.then(symKey => { - var promiseMacInit = mac.init(symKey); + let promiseMacInit = mac.init(symKey); return promiseMacInit; }).then(async () => { - for (var i = 0; i < loopSize; i++) { - await updateData(i, mac, GenDataBlob(12)); + let promiseMacUpdate; + let messageArr = []; + for (let i = 0; i <= messageText.length; i++) { + if ((i % updateLength == 0 || i == messageText.length) && messageArr.length != 0) { + let message = new Uint8Array(messageArr); + let messageBlob = { data : message }; + // 使用await处理for循环里的update + try { + promiseMacUpdate = await mac.update(messageBlob); // 分段update + } catch (error) { + console.error("await update error code: " + error.code + ", message is: " + error.message); + return; + } + messageArr = []; + } + // 按分割长度,填充messageArr + if (i < messageText.length) { + messageArr.push(messageText.charCodeAt(i)); + } } - var promiseMacUpdate = mac.update(GenDataBlob(12)); return promiseMacUpdate; }).then(() => { - var PromiseMacDoFinal = mac.doFinal(); + let PromiseMacDoFinal = mac.doFinal(); return PromiseMacDoFinal; - }).then(macOutput => { - console.error("[Promise]: HMAC result: " + macOutput.data); - var macLen = mac.getMacLength(); - console.error("[Promise]: MAC len: " + macLen); + }).then(output => { + macOutput = output; + console.log("[Promise]: HMAC result: " + macOutput.data); + let macLen = mac.getMacLength(); + console.log("[Promise]: MAC len: " + macLen); }).catch(error => { console.error("[Promise]: error: " + error.message); }); } ``` - ## 使用随机数操作 **场景说明** @@ -1570,7 +1571,7 @@ function LoopHmacPromise(algName, loopSize) { 2. 接受输入长度,通过接口`generateRandom`,生成指定长度的随机数 3. 接受DataBlob数据,通过接口`setSeed`,为随机数生成池设置种子 -```javascript +```js import cryptoFramework from "@ohos.security.cryptoFramework" // process by promise diff --git a/zh-cn/application-dev/security/cryptoFramework-overview.md b/zh-cn/application-dev/security/cryptoFramework-overview.md index 65c6ef5d43d7773be21c1f73cf17c0a46200b8c9..a039e6eba1b92c9e552ece87d90574b527690a48 100644 --- a/zh-cn/application-dev/security/cryptoFramework-overview.md +++ b/zh-cn/application-dev/security/cryptoFramework-overview.md @@ -1,12 +1,16 @@ # 加解密算法库框架概述 + 加解密算法库框架是一个屏蔽了第三方密码学算法库实现差异的算法框架,提供加解密、签名验签、消息验证码、哈希、安全随机数等相关功能。开发者可以通过调用加解密算法库框架,忽略底层不同三方算法库的差异,实现迅捷开发。 -> **说明:** 加解密算法库框架仅提供密钥的密码学操作,而不提供密钥管理功能。因此,使用算法库时,需要应用自己来保管密钥(适用于临时会话密钥等仅在内存中使用的场景,或者应用自己实现密钥安全存储的场景)。如果业务需要由系统提供密钥管理功能(密钥存储等),请使用[HUKS部件](huks-overview.md)。 +> **说明:** +> +> 加解密算法库框架仅提供密钥的密码学操作,而不提供密钥管理功能。因此,使用算法库时,需要应用自己来保管密钥(适用于临时会话密钥等仅在内存中使用的场景,或者应用自己实现密钥安全存储的场景)。如果业务需要由系统提供密钥管理功能(密钥存储等),请使用[HUKS部件](huks-overview.md)。 ## 框架实现原理 加解密算法库框架提供的组件分为三层:接口层,Framework层和插件层。接口层负责对外提供统一的JS接口,插件层实现针对具体三方算法库的功能,Framework层通过灵活加载插件层的插件适配并屏蔽三方算法库差异。 ## 基本概念 + **对称密钥** 对称密钥使用同一个密钥对数据进行加密解密操作。即对称加密算法中,数据发送方使用加密密钥对明文进行特殊加密算法处理后,使其变成复杂的加密密文发送出去。接收方收到密文后,若想解读原文,则需要使用同一个加密密钥以及相同算法的逆算法对密文进行解密,才能使其恢复成可读明文。 @@ -14,6 +18,7 @@ - **AES加密** AES的全称是Advanced Encryption Standard,是最常见的对称加密。AES为分组密码,分组密码也就是把明文分成一组一组的,每组长度相等,每次加密一组数据,直到加密完整个明文。在AES标准规范中,分组长度只能是128位,也就是说,每个分组为16个字节(每个字节8位)。密钥的长度可以使用128位、192位或256位。 + - **3DES加密** 3DES,也称为 3DESede 或 TripleDES,是三重数据加密算法,相当于是对每个数据块应用三次DES的对称加密算法,它使用3个64位的密钥对数据块进行三次加密。相比DES,3DES因密钥长度变长,安全性有所提高,但其处理速度不高。因此又出现了AES加密算法,AES较于3DES速度更快、安全性更高。 @@ -27,6 +32,7 @@ RSA密钥以极大整数做因数分解的数学难题作为密钥安全性的基石。生成密钥时,首先需要随机出两个大素数p和q,计算n = p * q并将n做为模,再选择一个大于1且小于(p - 1) * (q - 1)的整数e,确保e与(p - 1)*(q - 1)互素,最后计算d,使得e * d - 1为(p - 1)和(q - 1)的倍数,则可得到公钥(n, e)和私钥(n, d)。 算法库框架除提供了默认的双素数RSA密钥生成外,还提供了多素数密钥生成方式,可以在密钥生成时通过指定primes参数(PRIMES_2, PRIMES_3, PRIMES_4, PRIMES_5)指定素数个数。多素数密钥的优点是可以减少解密、签名的计算量(中国剩余定理),但相对的劣势是密钥强度会越低,算法库依据OpenSSL的素数使用规则制定了相应规格,具体将在**约束与限制**章节中说明。 + - **ECC密钥** ECC是一种基于椭圆曲线数学的公开密钥加密算法,其数学基础是利用椭圆曲线上的有理点构成Abel加法群上椭圆离散对数的计算困难性,算法库框架提供了多种椭圆曲线的ECC密钥生成能力。 @@ -36,38 +42,47 @@ - **对称AES加解密** 算法库目前提供了AES加解密常用的7种加密模式:ECB、CBC、OFB、CFB、CTR、GCM和CCM。AES为分组加密算法,分组长度大小为128位。实际应用中明文最后一组可能不足128位,不足数据可以使用各种padding模式做数据填充。下文中描述了各个padding的区别: - - NoPadding:不带填充; - - PKCS5:填充字符由一个字节序列组成,每个字节填充该填充字节序列的长度,规定是8字节填充; - - PKCS7:填充字符和PKCS5填充方法一致,但是可以在1-255字节之间任意填充; - - > **说明:** ECB、CBC加密模式,明文长度不是128位整数倍,必须使用填充方法补足。
由于需要填充至分组大小,所以实际算法库中的PKCS5和PKCS7都是以分组大小作为填充长度的,即AES加密填充至16字节。 + - NoPadding:不带填充。 + - PKCS5:填充字符由一个字节序列组成,每个字节填充该填充字节序列的长度,规定是8字节填充。 + - PKCS7:填充字符和PKCS5填充方法一致,但是可以在1-255字节之间任意填充。 + + > **说明:** + > + > ECB、CBC加密模式,明文长度不是128位整数倍,必须使用填充方法补足。
+ > 由于需要填充至分组大小,所以实际算法库中的PKCS5和PKCS7都是以分组大小作为填充长度的,即AES加密填充至16字节。 - **对称3DES加解密** 该算法的加解密过程分别是对明文/密文数据进行三次DES加密或解密,得到相应的密文或明文。 算法库目前提供了3DES加解密常用的4种加密模式:ECB、CBC、OFB和CFB。DES为分组加密算法,分组长度大小为64位。实际应用中明文最后一组可能不足64位,不足数据可以使用各种padding模式做数据填充。下文中描述了各个padding的区别: - - NoPadding:不带填充; - - PKCS5:填充字符由一个字节序列组成,每个字节填充该填充字节序列的长度,规定是8字节填充; - - PKCS7:填充字符和PKCS5填充方法一致,但是可以在1-255字节之间任意填充; + - NoPadding:不带填充。 + - PKCS5:填充字符由一个字节序列组成,每个字节填充该填充字节序列的长度,规定是8字节填充。 + - PKCS7:填充字符和PKCS5填充方法一致,但是可以在1-255字节之间任意填充。 - > **说明:** ECB、CBC加密模式,明文长度不是64位整数倍,必须使用填充方法补足。
由于需要填充至分组大小,所以实际算法库中的PKCS5和PKCS7都是以分组大小作为填充长度的,即3DES加密填充至8字节。 + > **说明:** + > + > ECB、CBC加密模式,明文长度不是64位整数倍,必须使用填充方法补足。
+ > 由于需要填充至分组大小,所以实际算法库中的PKCS5和PKCS7都是以分组大小作为填充长度的,即3DES加密填充至8字节。 - **非对称RSA加解密** 当持有RSA公钥(n, e)和私钥(n, d)后,RSA加密过程为:密文 = 明文 ^ e mod n, 解密过程为:明文 = 密文 ^ d mod n。算法库目前提供了RSA加解密常用的三种模式:PKCS1、PKCS1_OAEP和NoPadding。RSA为块加密算法,加密长度需要在固定长度进行,实际应用中会使用各种padding模式做数据填充。下文中描述了各个padding的区别: - - NoPadding:不带填充,输入的数据必须与RSA钥模一样长,输出数据长度与RSA钥模一样长; - - PKCS1:pkcs1padding V1.5是RSA加解密默认的填充方式,输入的数据必须<=RSA钥模-11,输出数据长度与RSA钥模一样长; - - PKCS1_OAEP:RSA_PKCS1_OAEP_PADDING填充模式是PKCS#1推出的新填充方式,此模式需要设置两个摘要(md和mgf1_md),输入的数据必须小于RSA钥模 - md摘要长度 - mgf1_md摘要长度 - 2,输出数据长度与RSA钥模一样长;
+ - NoPadding:不带填充,输入的数据必须与RSA钥模一样长,输出数据长度与RSA钥模一样长。 + - PKCS1:pkcs1padding V1.5是RSA加解密默认的填充方式,输入的数据必须<=RSA钥模-11,输出数据长度与RSA钥模一样长。 + - PKCS1_OAEP:RSA_PKCS1_OAEP_PADDING填充模式是PKCS#1推出的新填充方式,此模式需要设置两个摘要(md和mgf1_md),输入的数据必须小于RSA钥模 - md摘要长度 - mgf1_md摘要长度 - 2,输出数据长度与RSA钥模一样长。 - **补充说明:** RSA钥模 = (RSA的bits + 7) / 8 + > **说明:** + > + > RSA钥模 = (RSA的bits + 7) / 8 **签名验签** - **RSA签名验签** - 当持有RSA公钥(n, e)和私钥(n, d)后,RSA签名生成过程为:签名 = 消息 ^ d mod n, 验签过程为:消息 = 签名 ^ d mod n。消息发送方发送数据时,同时发送消息和私钥签名后的签名信息,消息接收方接受到数据后,将签名信息用公钥解密并验证消息是否一致。因发送的消息长度大多大于RSA钥模,因此算法库框架提供了两种padding模式,通过摘要提取消息的散列值再做签名。算法库框架中提供了签名验签相关的两种模式:PKCS1和PSS。下问对两种模式做详细描述: - - PKCS1: pkcs1padding V1.5是RSA加解密默认的填充方式,使用该模式时需要设置摘要(md); - - PSS: PSS模式是RSA 算法的基础上叠加上一种填充算法,使用该签名算法时需要使用摘要(md)和掩码函数(mgf1_md); + 当持有RSA公钥(n, e)和私钥(n, d)后,RSA签名生成过程为:签名 = 消息 ^ d mod n, 验签过程为:消息 = 签名 ^ d mod n。消息发送方发送数据时,同时发送消息和私钥签名后的签名信息,消息接收方接受到数据后,将签名信息用公钥解密并验证消息是否一致。因发送的消息长度大多大于RSA钥模,因此算法库框架提供了两种padding模式,通过摘要提取消息的散列值再做签名。算法库框架中提供了签名验签相关的两种模式:PKCS1和PSS。下问对两种模式做详细描述: + - PKCS1: pkcs1padding V1.5是RSA加解密默认的填充方式,使用该模式时需要设置摘要(md)。 + - PSS: PSS模式是RSA 算法的基础上叠加上一种填充算法,使用该签名算法时需要使用摘要(md)和掩码函数(mgf1_md)。 + - **ECDSA** 椭圆曲线数字签名算法(ECDSA)是基于椭圆曲线密码(ECC)模拟数字签名算法(DSA)。相比普通的离散对数问题(DLP)和大数分解问题(IFP),椭圆曲线密码的单位比特强度要高于其他公钥体制。算法库框架提供了多种椭圆曲线及摘要算法组合的椭圆曲线数字签名算法(ECDSA)能力。 @@ -83,9 +98,9 @@ 消息摘要MD算法是一种能将任意长度的输入消息,通过哈希算法生成长度固定的摘要的算法。消息摘要算法通过其不可逆的特性能被用于敏感信息的加密。消息摘要算法也被称为哈希算法或单向散列算法。 在摘要算法相同时,生成的摘要值主要有下列特点: -- 当输入消息相同时,生成摘要序列相同; -- 当输入消息的长度不一致时,生成摘要序列长度固定(摘要长度由算法决定); -- 当输入消息不一致时,生成摘要序列几乎不会相同(依然存在相同概率,由摘要长度决定相同概率); +- 当输入消息相同时,生成摘要序列相同。 +- 当输入消息的长度不一致时,生成摘要序列长度固定(摘要长度由算法决定)。 +- 当输入消息不一致时,生成摘要序列几乎不会相同(依然存在相同概率,由摘要长度决定相同概率)。 消息摘要算法主要分为三类:MD,SHA与MAC(详见HMAC章节) MD算法包括MD2,MD4和MD5。 @@ -102,7 +117,6 @@ HMAC(Hash-based Message Authentication Code)是一种基于密钥的消息 - **内部状态**代表随机数生成器内存中的数值,当内部状态相同时,随机数生成器会生成固定的随机数序列 - **种子**(seed)是一个用来对伪随机数的内部状态进行初始化的数据,随机数生成器通过种子来生成一系列的随机序列。 - ## 约束与限制 - 算法库框架不支持多线程并发操作。 @@ -121,9 +135,12 @@ HMAC(Hash-based Message Authentication Code)是一种基于密钥的消息 |AES|192|AES192| |AES|256|AES256| - > **说明**:“字符串参数”是“对称密钥算法”和“密钥长度”拼接而成,用于在创建对称密钥生成器时,指定密钥规格。 + > **说明:** + > + > “字符串参数”是“对称密钥算法”和“密钥长度”拼接而成,用于在创建对称密钥生成器时,指定密钥规格。 **非对称密钥生成规格** + - **RSA密钥生成** 支持的非对称密钥生成参数: @@ -146,7 +163,9 @@ HMAC(Hash-based Message Authentication Code)是一种基于密钥的消息 |RSA8192|4|RSA8192\|PRIMES_4| |RSA8192|5|RSA8192\|PRIMES_5| - > **说明**:生成RSA非对称密钥时,默认素数为2,PRIMES_2参数可省略。 + > **说明:** + > + > 生成RSA非对称密钥时,默认素数为2,PRIMES_2参数可省略。 - **ECC密钥生成** @@ -179,14 +198,15 @@ HMAC(Hash-based Message Authentication Code)是一种基于密钥的消息 |AES|GCM|AES[128\|192\|256]\|GCM\|[NoPadding\|PKCS5\|PKCS7]| |AES|CCM|AES[128\|192\|256]\|CCM\|[NoPadding\|PKCS5\|PKCS7]| -> **说明:** -> -> 1. []中只能任选一项。 -> 2. “字符串参数”是“对称加解密算法(含密钥长度)”、“分组模式”、“填充模式”拼接而成,用于在创建对称加解密实例时,指定对称加解密算法规格。 + > **说明:** + > + > 1. []中只能任选一项。 + > 2. “字符串参数”是“对称加解密算法(含密钥长度)”、“分组模式”、“填充模式”拼接而成,用于在创建对称加解密实例时,指定对称加解密算法规格。 **非对称RSA加解密** RSA加解密时,涉及三种填充模式:NoPadding, PKCS1和PKCS1_OAEP。 + - 使用NoPadding模式时可以指定的参数: |非对称密钥类型| 填充模式 | 字符串参数 | @@ -199,7 +219,7 @@ RSA加解密时,涉及三种填充模式:NoPadding, PKCS1和PKCS1_OAEP。 |RSA4096|NoPadding|RSA4096\|NoPadding| |RSA8192|NoPadding|RSA8192\|NoPadding| -- 使用PKCS1模式时可以指定的参数: +- 使用PKCS1模式时可以指定的参数: |非对称密钥类型| 填充模式 | 字符串参数 | |---|---|---| @@ -212,11 +232,12 @@ RSA加解密时,涉及三种填充模式:NoPadding, PKCS1和PKCS1_OAEP。 |RSA8192|PKCS1|RSA8192\|PKCS1| - 使用PKCS1_OAEP模式时可以指定的参数: - > **说明:** - > - > 1.[]内的参数只能任选一项,非[]内的为固定值; - > 2.使用时请从表格中选择非对称密钥类型、填充模式、摘要、掩码摘要四个数据,用|拼接成字符串。 - > 例如:"RSA2048|PKCS1_OAEP|SHA256|MGF1_SHA256" + + > **说明:** + > + > 1. []内的参数只能任选一项,非[]内的为固定值; + > 2. 使用时请从表格中选择非对称密钥类型、填充模式、摘要、掩码摘要四个数据,用|拼接成字符串。
+ > 例如:"RSA2048|PKCS1_OAEP|SHA256|MGF1_SHA256" | 非对称密钥类型 | 填充模式 | 摘要 | 掩码摘要 | |---|---|---|---| @@ -261,13 +282,13 @@ RSA加解密时,涉及三种填充模式:NoPadding, PKCS1和PKCS1_OAEP。 |RSA8192|PKCS1_OAEP|SHA384|[MGF1_MD5\|MGF1_SHA1\|MGF1_SHA224\|MGF1_SHA256\|MGF1_SHA384\|MGF1_SHA512]| |RSA8192|PKCS1_OAEP|SHA512|[MGF1_MD5\|MGF1_SHA1\|MGF1_SHA224\|MGF1_SHA256\|MGF1_SHA384\|MGF1_SHA512]| - ### 签名验签规格 **RSA签名验签** RSA签名验签时,涉及两种填充模式:PKCS1和PSS。 -- 使用PKCS1模式时可以指定的参数: + +- 使用PKCS1模式时可以指定的参数: | 非对称密钥类型 | 填充模式 | 摘要 | 字符串参数 | |---|---|---|---| @@ -280,11 +301,11 @@ RSA签名验签时,涉及两种填充模式:PKCS1和PSS。 |RSA8192|PKCS1|[MD5\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]|RSA8192\|PKCS1\|[MD5\|SHA1\|SHA224\|SHA256\|SHA384\|SHA512]| - 使用PSS模式时可以指定的参数: - > **说明:** - > - > 1.[]内的参数只能任选一项,非[]内的为固定值; - > 2.使用时请从表格中选择非对称密钥类型、填充模式、摘要、掩码摘要四个数据,用|拼接成字符串。 - > 例如:"RSA2048|PSS|SHA256|MGF1_SHA256" + > **说明:** + > + > 1. []内的参数只能任选一项,非[]内的为固定值; + > 2. 使用时请从表格中选择非对称密钥类型、填充模式、摘要、掩码摘要四个数据,用|拼接成字符串。
+ > 例如:"RSA2048|PSS|SHA256|MGF1_SHA256" | 非对称密钥类型 | 填充模式 | 摘要 | 掩码摘要 | |---|---|---|---| @@ -362,6 +383,7 @@ RSA签名验签时,涉及两种填充模式:PKCS1和PSS。 |ECC|ECC521| ### MD消息摘要算法规格 + - 加解密算法库框架当前支持的MD算法参数: |摘要算法|支持种类| @@ -374,6 +396,7 @@ RSA签名验签时,涉及两种填充模式:PKCS1和PSS。 |HASH|MD5| ### HMAC消息认证码算法规格 + - 加解密算法库框架当前支持的HMAC算法参数: |摘要算法|支持种类| diff --git a/zh-cn/application-dev/security/huks-guidelines.md b/zh-cn/application-dev/security/huks-guidelines.md index 11f3be25474bc098ad41bff00db3d649544d6e59..abd865f96c6e4dc7b10625cdab47050d63063b4a 100644 --- a/zh-cn/application-dev/security/huks-guidelines.md +++ b/zh-cn/application-dev/security/huks-guidelines.md @@ -949,7 +949,7 @@ struct Index { ### 密钥协商 -应用在协商密钥时建议传入[HuksKeyStorageType](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-huks.md#hukskeystoragetype)中定义的类型;从API10开始应用只能选择存储(HUKS_STORAGE_ONLY_USED_IN_HUKS),或者选择导出(HUKS_STORAGE_KEY_EXPORT_ALLOWED),若不传入,则默认同时支持存储和导出,存在安全问题,不推荐业务使用。 +应用在协商密钥时建议传入[HuksKeyStorageType](../reference/apis/js-apis-huks.md#hukskeystoragetype)中定义的类型;从API10开始应用只能选择存储(HUKS_STORAGE_ONLY_USED_IN_HUKS),或者选择导出(HUKS_STORAGE_KEY_EXPORT_ALLOWED),若不传入,则默认同时支持存储和导出,存在安全问题,不推荐业务使用。 ```ts /* @@ -1320,7 +1320,7 @@ async function testAgree() { ### 密钥派生 -应用在派生密钥时建议传入[HuksKeyStorageType](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-huks.md#hukskeystoragetype)中定义的类型;从API10开始应用只能选择存储(HUKS_STORAGE_ONLY_USED_IN_HUKS),或者选择导出(HUKS_STORAGE_KEY_EXPORT_ALLOWED),若不传入,则默认同时支持存储和导出,存在安全问题,不推荐业务使用。 +应用在派生密钥时建议传入[HuksKeyStorageType](../reference/apis/js-apis-huks.md#hukskeystoragetype)中定义的类型;从API10开始应用只能选择存储(HUKS_STORAGE_ONLY_USED_IN_HUKS),或者选择导出(HUKS_STORAGE_KEY_EXPORT_ALLOWED),若不传入,则默认同时支持存储和导出,存在安全问题,不推荐业务使用。 ```ts /* @@ -2076,16 +2076,16 @@ HUKS提供了全面完善的密钥访问控制能力,确保存储在HUKS中的 ### 细粒度用户身份认证访问控制 -该功能是基于已有[密钥访问控制](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/huks-guidelines.md#%E5%AF%86%E9%92%A5%E8%AE%BF%E9%97%AE%E6%8E%A7%E5%88%B6)能力的扩展,提供了基于生物特征和锁屏密码二次身份认证的细粒度访问控制能力,允许设置密钥在加密、解密、签名、验签、密钥协商、密钥派生的单个或多个场景时是否需要进行身份验证。比如,业务需要使用HUKS密钥加密保存账号密码信息等数据,要求在加密的时候不进行指纹等身份认证,解密的时候需要进行指纹等身份认证,这是就需要依赖HUKS提供细粒度的二次身份认证访问控制机制。 +该功能是基于已有[密钥访问控制](#密钥访问控制)能力的扩展,提供了基于生物特征和锁屏密码二次身份认证的细粒度访问控制能力,允许设置密钥在加密、解密、签名、验签、密钥协商、密钥派生的单个或多个场景时是否需要进行身份验证。比如,业务需要使用HUKS密钥加密保存账号密码信息等数据,要求在加密的时候不进行指纹等身份认证,解密的时候需要进行指纹等身份认证,这是就需要依赖HUKS提供细粒度的二次身份认证访问控制机制。 **开发流程** -1. 基于用户身份认证访问控制的流程,在密钥生成阶段,通过额外指定用于细粒度用户身份认证访问控制的HuksTag:[HUKS_TAG_KEY_AUTH_PURPOSE](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-huks.md#hukstag)值,来指定在某种算法用途的情况下需要使用用户身份认证访问控制能力。 +1. 基于用户身份认证访问控制的流程,在密钥生成阶段,通过额外指定用于细粒度用户身份认证访问控制的HuksTag:[HUKS_TAG_KEY_AUTH_PURPOSE](../reference/apis/js-apis-huks.md#hukstag)值,来指定在某种算法用途的情况下需要使用用户身份认证访问控制能力。 2. 基于用户身份认证访问控制的流程,在密钥使用阶段,业务无需再次指定HUKS_TAG_KEY_AUTH_PURPOSE值,同用户身份认证访问控制的开发流程。 **接口说明** -新增用于细粒度用户身份认证访问控制的HuksTag:[HUKS_TAG_KEY_AUTH_PURPOSE](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-huks.md#hukstag),该Tag值取值范围为枚举类[HuksKeyAlg](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-huks.md#hukskeyalg)。 +新增用于细粒度用户身份认证访问控制的HuksTag:[HUKS_TAG_KEY_AUTH_PURPOSE](../reference/apis/js-apis-huks.md#hukstag),该Tag值取值范围为枚举类[HuksKeyAlg](../reference/apis/js-apis-huks.md#hukskeyalg)。 **表8** 细粒度用户身份认证访问控制Tag类型介绍 | 名称 | 描述 | diff --git a/zh-cn/application-dev/task-management/Readme-CN.md b/zh-cn/application-dev/task-management/Readme-CN.md index b4312a624b16fb2fc66e713eab464e2d53677ed2..3ea02ae686749eb66dec03e5f4b70f975980883d 100644 --- a/zh-cn/application-dev/task-management/Readme-CN.md +++ b/zh-cn/application-dev/task-management/Readme-CN.md @@ -1,11 +1,11 @@ -# 后台任务(Background Task)管理 +# 后台任务(Background Task)管理 -- 后台任务 +- 后台任务 - [后台任务概述](background-task-overview.md) - [短时任务开发指导](transient-task-dev-guide.md) - [长时任务开发指导](continuous-task-dev-guide.md) - - [延迟任务开发指导](work-scheduler-dev-guide.md) - - [延迟任务回调能力开发指导](workscheduler-extensionability.md) + - [延迟任务调度开发指导](work-scheduler-dev-guide.md) + - [延迟任务回调能力开发指导(WorkSchedulerExtensionAbility)](workscheduler-extensionability.md) - [申请能效资源开发指导](efficiency-resources-apply-dev-guide.md) - 后台代理提醒 diff --git a/zh-cn/application-dev/task-management/continuous-task-dev-guide.md b/zh-cn/application-dev/task-management/continuous-task-dev-guide.md index f7f7437bb8285960bf9d986d82cc355456209a2f..a52def2cb9ee79c8341d274d92d6f466b792735b 100644 --- a/zh-cn/application-dev/task-management/continuous-task-dev-guide.md +++ b/zh-cn/application-dev/task-management/continuous-task-dev-guide.md @@ -1,4 +1,4 @@ -# 长时任务 +# 长时任务开发指导 ## 场景说明 diff --git a/zh-cn/application-dev/task-management/efficiency-resources-apply-dev-guide.md b/zh-cn/application-dev/task-management/efficiency-resources-apply-dev-guide.md index 056918f672881e64e8b399d7ead97de17df47a19..aea04c231c2cdef5dccf4e14eb4e4c6ed7495d31 100644 --- a/zh-cn/application-dev/task-management/efficiency-resources-apply-dev-guide.md +++ b/zh-cn/application-dev/task-management/efficiency-resources-apply-dev-guide.md @@ -1,4 +1,4 @@ -# 申请能效资源 +# 申请能效资源开发指导 ## 场景说明 diff --git a/zh-cn/application-dev/task-management/transient-task-dev-guide.md b/zh-cn/application-dev/task-management/transient-task-dev-guide.md index cebf29a4d823778a797a867214de304992249133..e0de4621dd2dd023548285a13f6b34ee850c8b8c 100644 --- a/zh-cn/application-dev/task-management/transient-task-dev-guide.md +++ b/zh-cn/application-dev/task-management/transient-task-dev-guide.md @@ -1,4 +1,4 @@ -# 短时任务 +# 短时任务开发指导 ## 场景说明 diff --git a/zh-cn/application-dev/website.md b/zh-cn/application-dev/website.md index de5d7d5dabba86b0bbc6628ddc394ec9ec06dc6c..9ff8ecb323a1a2f4f49695348d2083190788051f 100644 --- a/zh-cn/application-dev/website.md +++ b/zh-cn/application-dev/website.md @@ -26,10 +26,10 @@ - [HAR](quick-start/har-package.md) - HSP - [应用内HSP开发指导](quick-start/in-app-hsp.md) - - [应用间HSP开发指导(仅对系统应用开放)](quick-start/cross-app-hsp.md) + - [应用间HSP开发指导](quick-start/cross-app-hsp.md) - 应用程序包快速修复 - [快速修复概述](quick-start/quickfix-principles.md) - - [快速修复调试指导](quick-start/quickfix-debug.md) + - [快速修复命令行调试开发指导](quick-start/quickfix-debug.md) - 应用配置文件(Stage模型) - [应用配置文件概述(Stage模型)](quick-start/application-configuration-file-overview-stage.md) - [app.json5配置文件](quick-start/app-configuration-file.md) @@ -98,7 +98,7 @@ - [AccessibilityExtensionAbility](application-models/accessibilityextensionability.md) - [EnterpriseAdminExtensionAbility](application-models/enterprise-extensionAbility.md) - [InputMethodExtensionAbility](application-models/inputmethodextentionability.md) - - [WindowExtensionAbility](application-models/windowextensionability.md) + - [WindowExtensionAbility(仅对系统应用开放)](application-models/windowextensionability.md) - 服务卡片开发指导(Stage模型) - [服务卡片概述](application-models/service-widget-overview.md) - 开发基于ArkTS UI的卡片 @@ -125,7 +125,6 @@ - [根据卡片状态刷新不同内容](application-models/arkts-ui-widget-update-by-status.md) - [使用方刷新卡片内容(仅对系统应用开放)](application-models/arkts-ui-widget-content-update.md) - [开发基于JS UI的卡片](application-models/js-ui-widget-development.md) - - [Stage模型服务卡片相关实例](application-models/service-widget-development-samples.md) - [AbilityStage组件容器](application-models/abilitystage.md) - [应用上下文Context](application-models/application-context-stage.md) - 信息传递载体Want @@ -151,7 +150,7 @@ - [静态订阅公共事件(仅对系统应用开放)](application-models/common-event-static-subscription.md) - [取消动态订阅公共事件](application-models/common-event-unsubscription.md) - [公共事件发布](application-models/common-event-publish.md) - - [移除粘性公共事件](application-models/common-event-remove-sticky.md) + - [移除粘性公共事件(仅对系统应用开放)](application-models/common-event-remove-sticky.md) - [后台服务](application-models/background-services.md) - 了解线程模型 - [线程模型概述](application-models/thread-model-stage.md) @@ -393,7 +392,7 @@ - [通知概述](notification/notification-overview.md) - [订阅通知(仅对系统应用开放)](notification/notification-subscription.md) - [使能通知开关](notification/notification-enable.md) - - [通知角标](notification/notification-badge.md) + - [管理通知角标](notification/notification-badge.md) - 发布通知 - [发布基础类型通知](notification/text-notification.md) - [发布进度条类型通知](notification/progress-bar-notification.md) @@ -426,7 +425,7 @@ - [音频录制开发概述](media/audio-recording-overview.md) - [使用AVRecorder开发音频录制功能](media/using-avrecorder-for-recording.md) - [使用AudioCapturer开发音频录制功能](media/using-audiocapturer-for-recording.md) - - [使用OpenSLES开发音频录制功能](media/using-opensl-es-for-recording.md) + - [使用OpenSL ES开发音频录制功能](media/using-opensl-es-for-recording.md) - [管理麦克风](media/mic-management.md) - [音频录制流管理](media/audio-recording-stream-management.md) - [音频输入设备管理](media/audio-input-device-management.md) @@ -435,7 +434,7 @@ - [开发音频通话功能](media/audio-call-development.md) - [视频播放](media/video-playback.md) - [视频录制](media/video-recording.md) - - 媒体会话(仅对系统应用开放) + - 媒体会话 - [媒体会话概述](media/avsession-overview.md) - 本地媒体会话 - [本地媒体会话概述](media/local-avsession-overview.md) @@ -480,7 +479,7 @@ - [通用密钥库密码算法规格](security/huks-appendix.md) - 加解密算法库框架 - [加解密算法库框架概述](security/cryptoFramework-overview.md) - - [加解密算法框架开发指导](security/cryptoFramework-guidelines.md) + - [加解密算法库框架开发指导](security/cryptoFramework-guidelines.md) - 证书 - [证书概述](security/cert-overview.md) - [证书开发指导](security/cert-guidelines.md) @@ -558,8 +557,8 @@ - [后台任务概述](task-management/background-task-overview.md) - [短时任务开发指导](task-management/transient-task-dev-guide.md) - [长时任务开发指导](task-management/continuous-task-dev-guide.md) - - [延迟任务开发指导](task-management/work-scheduler-dev-guide.md) - - [延迟任务回调能力开发指导](task-management/workscheduler-extensionability.md) + - [延迟任务调度开发指导](task-management/work-scheduler-dev-guide.md) + - [延迟任务回调能力开发指导(WorkSchedulerExtensionAbility)](task-management/workscheduler-extensionability.md) - [申请能效资源开发指导](task-management/efficiency-resources-apply-dev-guide.md) - 后台代理提醒 - [后台代理提醒概述](task-management/reminder-agent-overview.md) @@ -574,8 +573,8 @@ - [传感器开发概述](device/sensor-overview.md) - [传感器开发指导](device/sensor-guidelines.md) - 振动 - - [振动开发概述](device/vibrator-overview.md) - - [振动开发指导](device/vibrator-guidelines.md) + - [Vibrator开发概述](device/vibrator-overview.md) + - [Vibrator开发指导](device/vibrator-guidelines.md) - 多模输入 - [输入设备开发指导](device/inputdevice-guidelines.md) - [鼠标光标开发指导](device/pointerstyle-guidelines.md) @@ -583,7 +582,7 @@ - [示例服务器开发概述](device/sample-server-overview.md) - [示例服务器开发指导](device/sample-server-guidelines.md) - 设备状态 - - [设备状态开发指导](device/stationary-guidelines.md) + - [Stationary开发指导](device/stationary-guidelines.md) - 设备使用信息统计 - [设备使用信息统计概述](device-usage-statistics/device-usage-statistics-overview.md) - [设备使用信息统计开发指导](device-usage-statistics/device-usage-statistics-use-guide.md) @@ -728,6 +727,9 @@ - [图像球面效果](reference/arkui-ts/ts-universal-attributes-sphericalEffect.md) - [图像渐亮效果](reference/arkui-ts/ts-universal-attributes-lightUpEffect.md) - [图像边缘像素扩展效果](reference/arkui-ts/ts-universal-attributes-pixelStretchEffect.md) + - 模态转场设置 + - [全屏模态转场](reference/arkui-ts/ts-universal-attributes-modal-transition.md) + - [半模态转场](reference/arkui-ts/ts-universal-attributes-sheet-transition.md) - [文本通用属性](reference/arkui-ts/ts-universal-attributes-text-style.md) - 手势处理 - [绑定手势方法](reference/arkui-ts/ts-gesture-settings.md) @@ -827,10 +829,12 @@ - [Shape](reference/arkui-ts/ts-drawing-components-shape.md) - 画布组件 - [Canvas](reference/arkui-ts/ts-components-canvas-canvas.md) - - [CanvasRenderingContext2D对象](reference/arkui-ts/ts-canvasrenderingcontext2d.md) - [CanvasGradient对象](reference/arkui-ts/ts-components-canvas-canvasgradient.md) + - [CanvasPattern](reference/arkui-ts/ts-components-canvas-canvaspattern.md) + - [CanvasRenderingContext2D对象](reference/arkui-ts/ts-canvasrenderingcontext2d.md) - [ImageBitmap对象](reference/arkui-ts/ts-components-canvas-imagebitmap.md) - [ImageData对象](reference/arkui-ts/ts-components-canvas-imagedata.md) + - [Matrix2D](reference/arkui-ts/ts-components-canvas-matrix2d.md) - [OffscreenCanvasRenderingContext2D对象](reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md) - [Path2D对象](reference/arkui-ts/ts-components-canvas-path2d.md) - [Lottie](reference/arkui-ts/ts-components-canvas-lottie.md) @@ -1269,7 +1273,7 @@ - security - [PermissionRequestResult](reference/apis/js-apis-permissionrequestresult.md) - 数据管理 - - [@ohos.data.cloudData(端云协同)](reference/apis/js-apis-data-cloudData.md) + - [@ohos.data.cloudData (端云协同)](reference/apis/js-apis-data-cloudData.md) - [@ohos.data.dataAbility (DataAbility谓词)](reference/apis/js-apis-data-ability.md) - [@ohos.data.dataShare (数据共享)](reference/apis/js-apis-data-dataShare.md) - [@ohos.data.dataSharePredicates (数据共享谓词)](reference/apis/js-apis-data-dataSharePredicates.md) @@ -1277,7 +1281,7 @@ - [@ohos.data.distributedDataObject (分布式数据对象)](reference/apis/js-apis-data-distributedobject.md) - [@ohos.data.distributedKVStore (分布式键值数据库)](reference/apis/js-apis-distributedKVStore.md) - [@ohos.data.preferences (用户首选项)](reference/apis/js-apis-data-preferences.md) - - [@ohos.data.relationalStore (关系型数据库)](reference/apis/js-apis-data-relationalStore.md) + - [@ohos.data.relationalStore (关系型数据库)](reference/apis/js-apis-data-relationalStore.md) - [@ohos.data.UDMF (统一数据管理框架)](reference/apis/js-apis-data-udmf.md) - [@ohos.data.ValuesBucket (数据集)](reference/apis/js-apis-data-valuesBucket.md) - 文件管理 @@ -1356,6 +1360,7 @@ - [@ohos.web.webview (Webview)](reference/apis/js-apis-webview.md) - [console (控制台)](reference/apis/js-apis-logs.md) - [Timer (定时器)](reference/apis/js-apis-timer.md) + - [syscap (系统能力)](reference/apis/js-apis-syscap.md) - application - [AccessibilityExtensionContext (辅助功能扩展上下文)](reference/apis/js-apis-inner-application-accessibilityExtensionContext.md) - 设备管理 @@ -1378,7 +1383,7 @@ - [@ohos.multimodalInput.mouseEvent (鼠标输入事件)](reference/apis/js-apis-mouseevent.md) - [@ohos.multimodalInput.pointer (鼠标指针)](reference/apis/js-apis-pointer.md) - [@ohos.multimodalInput.touchEvent (触摸输入事件)](reference/apis/js-apis-touchevent.md) - - [@ohos.multimodalInput.shortKey (快捷键)](reference/apis/js-apis-shortKey.md) + - [@ohos.multimodalInput.shortKey(快捷键)](reference/apis/js-apis-shortKey.md) - [@ohos.power (系统电源管理)](reference/apis/js-apis-power.md) - [@ohos.runningLock (Runninglock锁)](reference/apis/js-apis-runninglock.md) - [@ohos.sensor (传感器)](reference/apis/js-apis-sensor.md) @@ -1396,16 +1401,16 @@ - [@ohos.account.osAccount (系统帐号管理)](reference/apis/js-apis-osAccount.md) - 定制管理 - [@ohos.configPolicy (配置策略)](reference/apis/js-apis-configPolicy.md) - - [@ohos.enterprise.accountManager (帐户管理)](reference/apis/js-apis-enterprise-accountManager.md) + - [@ohos.enterprise.accountManager(帐户管理)](reference/apis/js-apis-enterprise-accountManager.md) - [@ohos.enterprise.adminManager (企业设备管理)](reference/apis/js-apis-enterprise-adminManager.md) - - [@ohos.enterprise.applicationManager (应用管理)](reference/apis/js-apis-enterprise-applicationManager.md) - - [@ohos.enterprise.bundleManager (包管理)](reference/apis/js-apis-enterprise-bundleManager.md) + - [@ohos.enterprise.applicationManager(应用管理)](reference/apis/js-apis-enterprise-applicationManager.md) + - [@ohos.enterprise.bundleManager(包管理)](reference/apis/js-apis-enterprise-bundleManager.md) - [@ohos.enterprise.dateTimeManager (系统时间管理)](reference/apis/js-apis-enterprise-dateTimeManager.md) - [@ohos.enterprise.deviceControl (设备控制管理)](reference/apis/js-apis-enterprise-deviceControl.md) - - [@ohos.enterprise.deviceInfo (设备信息管理)](reference/apis/js-apis-enterprise-deviceInfo.md) + - [@ohos.enterprise.deviceInfo(设备信息管理)](reference/apis/js-apis-enterprise-deviceInfo.md) - [@ohos.enterprise.EnterpriseAdminExtensionAbility (EnterpriseAdminExtensionAbility)](reference/apis/js-apis-EnterpriseAdminExtensionAbility.md) - - [@ohos.enterprise.networkManager (网络管理)](reference/apis/js-apis-enterprise-networkManager.md) - - [@ohos.enterprise.wifiManager (WiFi管理)](reference/apis/js-apis-enterprise-wifiManager.md) + - [@ohos.enterprise.networkManager(网络管理)](reference/apis/js-apis-enterprise-networkManager.md) + - [@ohos.enterprise.wifiManager(WiFi管理)](reference/apis/js-apis-enterprise-wifiManager.md) - 语言基础类库 - [@ohos.buffer (Buffer)](reference/apis/js-apis-buffer.md) - [@ohos.convertxml (xml转换JavaScript)](reference/apis/js-apis-convertxml.md) @@ -1575,7 +1580,7 @@ - [设备管理错误码](reference/errorcodes/errorcode-device-manager.md) - [位置服务子系统错误码](reference/errorcodes/errorcode-geoLocationManager.md) - [键鼠穿越管理错误码](reference/errorcodes/errorcode-devicestatus.md) - - [键鼠穿越管理错误码 (待停用)](reference/errorcodes/errorcode-multimodalinput.md) + - [键鼠穿越管理错误码(待停用)](reference/errorcodes/errorcode-multimodalinput.md) - [传感器错误码](reference/errorcodes/errorcode-sensor.md) - [振动错误码](reference/errorcodes/errorcode-vibrator.md) - [系统参数错误码](reference/errorcodes/errorcode-system-parameterV9.md) @@ -1609,6 +1614,7 @@ - [HuksKeyApi](reference/native-apis/_huks_key_api.md) - [HuksParamSetApi](reference/native-apis/_huks_param_set_api.md) - [HuksTypeApi](reference/native-apis/_huks_type_api.md) + - [Init](reference/native-apis/init.md) - 头文件 - [drawing_bitmap.h](reference/native-apis/drawing__bitmap_8h.md) - [drawing_brush.h](reference/native-apis/drawing__brush_8h.md) @@ -1650,6 +1656,7 @@ - [native_huks_api.h](reference/native-apis/native__huks__api_8h.md) - [native_huks_param.h](reference/native-apis/native__huks__param_8h.md) - [native_huks_type.h](reference/native-apis/native__huks__type_8h.md) + - [syscap_ndk.h](reference/native-apis/syscap__ndk_8h.md) - 结构体 - [OH_Drawing_BitmapFormat](reference/native-apis/_o_h___drawing___bitmap_format.md) - [OH_NativeBuffer_Config](reference/native-apis/_o_h___native_buffer___config.md) @@ -1687,9 +1694,9 @@ - [OH_Huks_PubKeyInfo](reference/native-apis/_o_h___huks___pub_key_info.md) - [OH_Huks_Result](reference/native-apis/_o_h___huks___result.md) - 标准库 - - [Node_API](reference/native-lib/third_party_napi/napi.md) + - [Node-API](reference/native-lib/third_party_napi/napi.md) - [libuv](reference/native-lib/third_party_libuv/libuv.md) - - [支持的标准库介绍](reference/native-lib/third_party_libc/musl.md) + - [Native API中支持的标准库](reference/native-lib/third_party_libc/musl.md) - 附录 - [Native api中没有导出的符号列表](reference/native-lib/third_party_libc/musl-peculiar-symbol.md) - [Native api中由于权限管控可能调用失败的符号列表](reference/native-lib/third_party_libc/musl-permission-control-symbol.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/Readme-CN.md b/zh-cn/device-dev/reference/hdi-apis/Readme-CN.md index 2bd9d277227ef129572b18b0def810169c77b548..773236e3b8c3e789ab39591a90d5f3242a367313 100644 --- a/zh-cn/device-dev/reference/hdi-apis/Readme-CN.md +++ b/zh-cn/device-dev/reference/hdi-apis/Readme-CN.md @@ -3,254 +3,223 @@ - 模块 - [Audio](_audio.md) - [Battery](battery.md) - - [Camera](camera.md) - - [Codec](codec.md) + - [Camera](_camera.md) + - [Codec](_codec.md) - [Display](_display.md) - [HdfFaceAuth](_hdf_face_auth.md) - [HdfPinAuth](_hdf_pin_auth.md) - [HdfUserAuth](_hdf_user_auth.md) - - [HdiActivityRecognition](activity_recognition.md) - - [Input](input.md) - - [Light](light.md) - - [Motion](motion.md) + - [HdiActivityRecognition](_hdi_activity_recognition.md) + - [HdiLpfenceCellbatching](_hdi_lpfence_cellbatching.md) + - [HdiLpfenceCellfence](_hdi_lpfence_cellfence.md) + - [HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + - [HdiLpfenceWififence](_hdi_lpfence_wififence.md) + - [Input](_input.md) + - [Light](_light.md) + - [Motion](_motion.md) + - [NNRt](_n_n_rt.md) - [Power](power.md) - - [Sensor](sensor.md) + - [Ril](_ril.md) + - [Sensor](_sensor.md) - [Thermal](thermal.md) - - [USB](usb.md) - - [Vibrator](vibrator.md) - - [WLAN](wlan.md) -- 头文件和结构体 - - 头文件 - - [audio_adapter.h](audio__adapter_8h.md) - - [audio_attribute.h](audio__attribute_8h.md) - - [audio_capture.h](audio__capture_8h.md) - - [audio_control.h](audio__control_8h.md) - - [audio_manager.h](audio__manager_8h.md) - - [audio_render.h](audio__render_8h.md) - - [audio_scene.h](audio__scene_8h.md) - - [audio_types.h](audio__types_8h.md) - - [audio_volume.h](audio__volume_8h.md) - - [codec_callback_if.h](codec_callback_if_h.md) - - [codec_common_type.h](codec_common_type_h.md) - - [codec_component_if.h](codec_component_if_h.md) - - [codec_component_manager.h](codec__component__manager_h.md) - - [codec_component_type.h](codec__component__type_h.md) + - [USB](_u_s_b.md) + - [Vibrator](_vibrator.md) + - [WLAN](_w_l_a_n.md) +- 头文件 + - Audio模块头文件 + - [AudioTypes.idl](_audio_types_8idl.md) + - [IAudioAdapter.idl](_i_audio_adapter_8idl.md) + - [IAudioCallback.idl](_i_audio_callback_8idl.md) + - [IAudioCapture.idl](_i_audio_capture_8idl.md) + - [IAudioManager.idl](_i_audio_manager_8idl.md) + - [IAudioRender.idl](_i_audio_render_8idl.md) + - Battery模块相关头文件 + - [IBatteryCallback.idl](_i_battery_callback_8idl.md) + - [IBatteryInterface.idl](_i_battery_interface_8idl.md) + - [Types.idl](_battery_types_8idl.md) + - Camera模块头文件 + - [ICameraDevice.idl](_i_camera_device_8idl.md) + - [ICameraDeviceCallback.idl](_i_camera_device_callback_8idl.md) + - [ICameraHost.idl](_i_camera_host_8idl.md) + - [ICameraHostCallback.idl](_i_camera_host_callback_8idl.md) + - [IOfflineStreamOperator.idl](_i_offline_stream_operator_8idl.md) + - [IStreamOperator.idl](_i_stream_operator_8idl.md) + - [IStreamOperatorCallback.idl](_i_stream_operator_callback_8idl.md) + - [Types.idl](_types_8idl.md) + - Codec模块头文件 + - [codec_callback_if.h](codec__callback__if_8h.md) + - [codec_common_type.h](codec__common__type_8h.md) + - [codec_component_if.h](codec__component__if_8h.md) + - [codec_component_manager.h](codec__component__manager_8h.md) + - [codec_component_type.h](codec__component__type_8h.md) + - Display模块头文件 - [display_device.h](display__device_8h.md) - [display_gfx.h](display__gfx_8h.md) - [display_gralloc.h](display__gralloc_8h.md) - [display_layer.h](display__layer_8h.md) - [display_type.h](display__type_8h.md) - [display_vgu.h](display__vgu_8h.md) - - [input_controller.h](input__controller_8h.md) - - [input_manager.h](input__manager_8h.md) - - [input_reporter.h](input__reporter_8h.md) - - [input_type.h](input__type_8h.md) - - [ActivityRecognitionTypes.idl](activity_recognition_types_idl.md) - - [Types.idl](battery_types_idl.md) - - [IExecutor.idl](face__auth_2_i_executor_8idl.md) - - [IExecutorCallback.idl](face__auth_2_i_executor_callback_8idl.md) + - HdfFaceAuth模块头文件 - [FaceAuthTypes.idl](_face_auth_types_8idl.md) - - [PinAuthTypes.idl](_pin_auth_types_8idl.md) - - [IExecutor.idl](pin__auth_2_i_executor_8idl.md) - - [IExecutorCallback.idl](pin__auth_2_i_executor_callback_8idl.md) + - [IExecutor.idl](_i_executor_8idl_faceauth.md) + - [IExecutorCallback.idl](_i_executor_callback_8idl_faceauth.md) - [IFaceAuthInterface.idl](_i_face_auth_interface_8idl.md) + - HdfPinAuth模块头文件 + - [IExecutor.idl](_i_executor_8idl_pinauth.md) + - [IExecutorCallback.idl](_i_executor_callback_8idl_pinauth.md) - [IPinAuthInterface.idl](_i_pin_auth_interface_8idl.md) + - HdfUserAuth模块头文件 - [IUserAuthInterface.idl](_i_user_auth_interface_8idl.md) - [UserAuthTypes.idl](_user_auth_types_8idl.md) + - HdiActivityRecognition模块头文件 + - [ActivityRecognitionTypes.idl](_activity_recognition_types_8idl.md) - [IActivityChangedCallback.idl](_i_activity_changed_callback_8idl.md) - [IActivityInterface.idl](_i_activity_interface_8idl.md) - - [IBatteryCallback.idl](_i_battery_callback_8idl.md) - - [IBatteryInterface.idl](_i_battery_interface_8idl.md) - - [ICameraDevice.idl](_i_camera_device_8idl.md) - - [ICameraDeviceCallback.idl](_i_camera_device_callback_8idl.md) - - [ICameraHostCallback.idl](_i_camera_host_callback_8idl.md) - - [ICameraHost.idl](_i_camera_host_8idl.md) + - HdiLpfenceCellbatching模块头文件 + - [CellbatchingTypes.idl](_cellbatching_types_8idl.md) + - [ICellbatchingCallback.idl](_i_cellbatching_callback_8idl.md) + - [ICellbatchingInterface.idl](_i_cellbatching_interface_8idl.md) + - HdiLpfenceCellfence模块头文件 + - [CellfenceTypes.idl](_cellfence_types_8idl.md) + - [ICellfenceCallback.idl](_i_cellfence_callback_8idl.md) + - [ICellfenceInterface.idl](_i_cellfence_interface_8idl.md) + - HdiLpfenceGeofence模块头文件 + - [GeofenceTypes.idl](_geofence_types_8idl.md) + - [IGeofenceCallback.idl](_i_geofence_callback_8idl.md) + - [IGeofenceIntf.idl](_i_geofence_intf_8idl.md) + - HdiLpfenceWififence模块头文件 + - [IWififenceCallback.idl](_i_wififence_callback_8idl.md) + - [IWififenceInterface.idl](_i_wififence_interface_8idl.md) + - [WififenceTypes.idl](_wififence_types_8idl.md) + - Input模块头文件 + - [input_controller.h](input__controller_8h.md) + - [input_manager.h](input__manager_8h.md) + - [input_reporter.h](input__reporter_8h.md) + - [input_type.h](input__type_8h.md) + - Light模块头文件 - [ILightInterface.idl](_i_light_interface_8idl.md) + - [LightTypes.idl](_light_types_8idl.md) + - Motion模块头文件 - [IMotionCallback.idl](_i_motion_callback_8idl.md) - [IMotionInterface.idl](_i_motion_interface_8idl.md) - - [IOfflineStreamOperator.idl](_i_offline_stream_operator_8idl.md) + - [MotionTypes.idl](_motion_types_8idl.md) + - NNRt模块头文件 + - [INnrtDevice.idl](_i_nnrt_device_8idl.md) + - [IPreparedModel.idl](_i_prepared_model_8idl.md) + - [ModelTypes.idl](_model_types_8idl.md) + - [NnrtTypes.idl](_nnrt_types_8idl.md) + - [NodeAttrTypes.idl](_node_attr_types_8idl.md) + - Power模块头文件 - [IPowerHdiCallback.idl](_i_power_hdi_callback_8idl.md) - [IPowerInterface.idl](_i_power_interface_8idl.md) + - [PowerTypes.idl](_power_types_8idl.md) + - Ril模块头文件 + - [IRil.idl](_i_ril_8idl.md) + - [IRilCallback.idl](_i_ril_callback_8idl.md) + - [Types.idl](_ril_types_8idl.md) + - Sensor模块头文件 - [ISensorCallback.idl](_i_sensor_callback_8idl.md) - [ISensorInterface.idl](_i_sensor_interface_8idl.md) - - [IStreamOperator.idl](_i_stream_operator_8idl.md) - - [IStreamOperatorCallback.idl](_i_stream_operator_callback_8idl.md) + - [SensorTypes.idl](_sensor_types_8idl.md) + - Thermal模块头文件 - [IThermalCallback.idl](_i_thermal_callback_8idl.md) - [IThermalInterface.idl](_i_thermal_interface_8idl.md) + - [ThermalTypes.idl](_thermal_types_8idl.md) + - USB模块头文件 - [IUsbdBulkCallback.idl](_i_usbd_bulk_callback_8idl.md) - - [IUsbInterface.idl](_i_usb_interface_8idl.md) - [IUsbdSubscriber.idl](_i_usbd_subscriber_8idl.md) + - [IUsbInterface.idl](_i_usb_interface_8idl.md) + - [UsbTypes.idl](_usb_types_8idl.md) + - Vibrator模块头文件 - [IVibratorInterface.idl](_i_vibrator_interface_8idl.md) + - [VibratorTypes.idl](_vibrator_types_8idl.md) + - WLAN模块头文件 - [IWlanCallback.idl](_i_wlan_callback_8idl.md) - [IWlanInterface.idl](_i_wlan_interface_8idl.md) - - [LightTypes.idl](_light_types_8idl.md) - - [MotionTypes.idl](_motion_types_8idl.md) - - [PowerTypes.idl](_power_types_8idl.md) - - [SensorTypes.idl](_sensor_types_8idl.md) - - [ThermalTypes.idl](_thermal_types_8idl.md) - - [Types.idl](camera_2v1__0_2_types_8idl.md) - - [UsbTypes.idl](_usb_types_8idl.md) - - [VibratorTypes.idl](_vibrator_types_8idl.md) - [WlanTypes.idl](_wlan_types_8idl.md) - - 结构体 - - [YUVDescInfo](_yun_desc_info_.md) - - [ExtDataHandle](_ext_data_handle.md) - - [ActRecognitionEvent](_act_recognition_event.md) - - [AllocInfo](_alloc_info.md) - - [Alignment](_alignment.md) - - [AudioAdapter](_audio_adapter.md) +- 结构体 + - Audio模块结构体 - [AudioAdapterDescriptor](_audio_adapter_descriptor.md) - - [AudioAttribute](_audio_attribute.md) - - [AudioCapture](_audio_capture.md) - - [AudioControl](_audio_control.md) - [AudioDevExtInfo](_audio_dev_ext_info.md) - [AudioDeviceDescriptor](_audio_device_descriptor.md) - - [AudioManager](_audio_manager.md) + - [AudioDeviceStatus](_audio_device_status.md) + - [AudioEvent](_audio_event.md) + - [AudioInfo](_audio_info.md) - [AudioMixExtInfo](_audio_mix_ext_info.md) - - [AudioMmapBufferDescriptor](_audio_mmap_buffer_descriptor.md) + - [AudioMmapBufferDescripter](_audio_mmap_buffer_descripter.md) - [AudioPort](_audio_port.md) - - [AudioPortCap](audio_portcap.md) - [AudioPortCapability](_audio_port_capability.md) - - [AudioRender](_audio_render.md) - [AudioRoute](_audio_route.md) - [AudioRouteNode](_audio_route_node.md) - [AudioSampleAttributes](_audio_sample_attributes.md) - - [AudioScene](_audio_scene.md) - [AudioSceneDescriptor](_audio_scene_descriptor.md) - - [AudioSceneDescriptor::SceneDesc](union_audio_scene_descriptor_1_1_scene_desc.md) - [AudioSessionExtInfo](_audio_session_ext_info.md) - [AudioSubPortCapability](_audio_sub_port_capability.md) - [AudioTimeStamp](_audio_time_stamp.md) - - [AudioVolume](_audio_volume.md) - - [AuthResultInfo](_auth_result_info.md) - - [AuthSolution](_auth_solution.md) - - [BufferData](_buffer_data.md) + - [IAudioAdapter](interface_i_audio_adapter.md) + - [IAudioCallback](interface_i_audio_callback.md) + - [IAudioCapture](interface_i_audio_capture.md) + - [IAudioManager](interface_i_audio_manager.md) + - [IAudioRender](interface_i_audio_render.md) + - [SceneDesc](union_scene_desc.md) + - Battery模块结构体 - [BatteryInfo](_battery_info.md) + - [IBatteryCallback](interface_i_battery_callback.md) + - [IBatteryInterface](interface_i_battery_interface.md) + - Camera模块结构体 - [CaptureEndedInfo](_capture_ended_info.md) - [CaptureErrorInfo](_capture_error_info.md) - [CaptureInfo](_capture_info.md) + - [ICameraDevice](interface_i_camera_device.md) + - [ICameraDeviceCallback](interface_i_camera_device_callback.md) + - [ICameraHost](interface_i_camera_host.md) + - [ICameraHostCallback](interface_i_camera_host_callback.md) + - [IOfflineStreamOperator](interface_i_offline_stream_operator.md) + - [IStreamOperator](interface_i_stream_operator.md) + - [IStreamOperatorCallback](interface_i_stream_operator_callback.md) + - [StreamAttribute](_stream_attribute.md) + - [StreamInfo](_stream_info.md) + - Codec模块结构体 + - [Alignment](_alignment.md) + - [AudioPortCap](_audio_port_cap.md) - [CodecCallbackType](_codec_callback_type.md) - [CodecCompCapability](_codec_comp_capability.md) - [CodecComponentManager](_codec_component_manager.md) - [CodecComponentType](_codec_component_type.md) - - [ColorValue](union_color_value.md) - [CompVerInfo](_comp_ver_info.md) - - [CredentialInfo](_credential_info.md) + - [EventInfo](_event_info.md) + - [GetBufferHandleUsageParams](_get_buffer_handle_usage_params.md) + - [OmxCodecBuffer](_omx_codec_buffer.md) + - [PortCap](union_port_cap.md) + - [RangeValue](_range_value.md) + - [Rect](_rect.md) + - [SupportBufferType](_support_buffer_type.md) + - [UseBufferType](_use_buffer_type.md) + - [VideoPortCap](_video_port_cap.md) + - Display模块结构体 + - [AllocInfo](_alloc_info.md) + - [BufferData](_buffer_data.md) - [DeviceFuncs](_device_funcs.md) - [DisplayCapability](_display_capability.md) - [DisplayInfo](_display_info.md) - [DisplayModeInfo](_display_mode_info.md) - - [EnrolledInfo](_enrolled_info.md) - - [EnrollParam](_enroll_param.md) - - [EnrollResultInfo](_enroll_resultinfo.md) - - [EventInfo](_event_info.md) - - [ExecutorInfo](_executor_info.md) - - [ExecutorInfo](_user_executor_info.md) - - [ExecutorRegisterInfo](_executor_register_info.md) - - [ExecutorSendMsg](_executor_send_msg.md) - - [GetBufferHandleUsageParams](_get_buffer_handle_usage_params.md) + - [ExtDataHandle](_ex_data_handle.md) - [GfxFuncs](_gfx_funcs.md) - [GfxOpt](_gfx_opt.md) - [GrallocFuncs](_gralloc_funcs.md) - - [HdfFeatureInfo](_hdf_feature_info.md) - - [HdfLightColor](_hdf_light_color.md) - - [HdfLightEffect](_hdf_light_effect.md) - - [HdfLightFlashEffect](_hdf_light_flash_effect.md) - - [HdfLightInfo](_hdf_light_info.md) - - [HdfMotionEvent](_hdf_motion_event.md) - - [HdfNetDeviceInfo](_hdf_net_device_info.md) - - [HdfNetDeviceInfoResult](_hdf_net_device_info_result.md) - - [HdfSensorEvents](_hdf_sensor_events.md) - - [HdfSensorInformation](_hdf_sensor_information.md) - - [HdfStaInfo](_hdf_sta_info.md) - - [HdfThermalCallbackInfo](_hdf_thermal_callback_info.md) - - [HdfVibratorInfo](_hdf_vibrator_info.md) - - [HdfWifiDriverScanSsid](_hdf_wifi_driver_scan_ssid.md) - - [HdfWifiInfo](_hdf_wifi_info.md) - - [HdfWifiScan](_hdf_wifi_scan.md) - - [HdfWifiScanResult](_hdf_wifi_scan_result.md) - [HDRCapability](_h_d_r_capability.md) - [HDRMetaData](_h_d_r_meta_data.md) - - [IActivityChangedCallback](interface_i_activity_changed_callback.md) - - [IActivityInterface](interface_i_activity_interface.md) - - [IBatteryCallback](interface_i_battery_callback.md) - - [IBatteryInterface](interface_i_battery_interface.md) - - [ICameraDevice](interface_i_camera_device.md) - - [ICameraDeviceCallback](interface_i_camera_device_callback.md) - - [ICameraHost](interface_i_camera_host.md) - - [ICameraHostCallback](interface_i_camera_host_callback.md) - [ICircle](_i_circle.md) - - [IdentifyResultInfo](_identify_result_info.md) - - [IExecutor](interface_i_executor.md) - - [IExecutor](interface_pin_i_executor.md) - - [IExecutorCallback](interface_i_executor_callback.md) - - [IExecutorCallback](interface_pin_i_executor_callback.md) - - [IFaceAuthInterface](interface_i_face_auth_interface.md) - [ILine](_i_line.md) - - [IInputInterface](_i_input_interface.md) - - [ILightInterface](interface_i_light_interface.md) - - [IMotionCallback](interface_i_motion_callback.md) - - [IMotionInterface](interface_i_motion_interface.md) - - [InputController](_input_controller.md) - - [InputDevAbility](_input_dev_ability.md) - - [InputDevAttr](_input_dev_attr.md) - - [InputDevDesc](_input_dev_desc.md) - - [InputDeviceInfo](_input_device_info.md) - - [InputDevIdentify](_input_dev_identify.md) - - [InputDimensionInfo](_input_dimension_info.md) - - [InputEventCb](_input_event_cb.md) - - [InputEventPackage](_input_event_package.md) - - [IPowerHdiCallback](interface_i_power_hdi_callback.md) - - [InputExtraCmd](_input_extra_cmd.md) - - [InputHostCb](_input_host_cb.md) - - [InputHotPlugEvent](_input_hot_plug_event.md) - - [InputManager](_input_manager.md) - - [InputReporter](_input_reporter.md) - - [IOfflineStreamOperator](interface_i_offline_stream_operator.md) - - [IPinAuthInterface](interface_i_pin_auth_interface.md) - - [IPowerInterface](interface_i_power_interface.md) - [IRect](_i_rect.md) - - [ISensorCallback](interface_i_sensor_callback.md) - - [ISensorInterface](interface_i_sensor_interface.md) - - [IStreamOperator](interface_i_stream_operator.md) - - [IStreamOperatorCallback](interface_i_stream_operator_callback.md) - [ISurface](_i_surface.md) - - [IThermalCallback](interface_i_thermal_callback.md) - - [IThermalInterface](interface_i_thermal_interface.md) - - [IUsbdBulkCallback](interface_i_usbd_bulk_callback.md) - - [IUsbdSubscriber](interface_i_usbd_subscriber.md) - - [IUsbInterface](interface_i_usb_interface.md) - - [IUserAuthInterface](interface_i_user_auth_interface.md) - - [IVibratorInterface](interface_i_vibrator_interface.md) - - [IWlanCallback](interface_i_wlan_callback.md) - - [IWlanInterface](interface_i_wlan_interface.md) - [LayerAlpha](_layer_alpha.md) - [LayerBuffer](_layer_buffer.md) - [LayerFuncs](_layer_funcs.md) - [LayerInfo](_layer_info.md) - - [MeasChannelParam](_meas_channel_param.md) - - [MeasChannelResult](_meas_channel_result.md) - - [OmxCodecBuffer](_omx_codec_buffer.md) - - [PortCap](union_port_cap.md) - - [PortInfo](_port_info.md) - [PresentTimestamp](_present_timestamp.md) - [PropertyObject](_property_object.md) - - [ProjectionScreenCmdParam](_projection_screen_cmd_param.md) - - [RangeValue](_range_value.md) - - [Rect](_rect.md) - [Rectangle](_rectangle.md) - - [RGBColor](_r_g_b_color.md) - - [ScheduleInfo](_schedule_info.md) - - [StreamAttribute](_stream_attribute.md) - - [StreamInfo](_stream_info.md) - - [SupportBufferType](_support_buffer_type.md) - - [TemplateInfo](_template_info.md) - - [ThermalZoneInfo](_thermal_zone_info.md) - - [UsbCtrlTransfer](_usb_ctrl_transfer.md) - - [UsbDev](_usb_dev.md) - - [USBDeviceInfo](_u_s_b_device_info.md) - - [UsbPipe](_usb_pipe.md) - - [UseBufferType](_use_buffer_type.md) - [VerifyAllocInfo](_verify_alloc_info.md) - [VGUBuffer](_v_g_u_buffer.md) - [VGUColorStop](_v_g_u_color_stop.md) @@ -271,6 +240,284 @@ - [VGUSolid](_v_g_u_solid.md) - [VGUStrokeAttr](_v_g_u_stroke_attr.md) - [VGUSurface](_v_g_u_surface.md) - - [VideoPortCap](_video_port_cap.md) - - [WifiStationInfo](_wifi_station_info.md) + - [YUVDescInfo](_yuv_desc_info.md) + - HdfFaceAuth模块结构体 + - [ExecutorInfo](_executor_info_faceauth.md) + - [IExecutor](interface_i_executor_faceauth.md) + - [IExecutorCallback](interface_i_executor_callback_faceauth.md) + - [IFaceAuthInterface](interface_i_face_auth_interface.md) + - [TemplateInfo](_template_info_faceauth.md) + - HdfPinAuth模块结构体 + - [ExecutorInfo](_executor_info_pinauth.md) + - [IExecutor](interface_i_executor_pinauth.md) + - [IExecutorCallback](interface_i_executor_callback_pinauth.md) + - [IPinAuthInterface](interface_i_pin_auth_interface.md) + - [TemplateInfo](_template_info_pinauth.md) + - HdfUserAuth模块结构体 + - [AuthResultInfo](_auth_result_info.md) + - [AuthSolution](_auth_solution.md) + - [CredentialInfo](_credential_info.md) + - [EnrolledInfo](_enrolled_info.md) + - [EnrollParam](_enroll_param.md) + - [EnrollResultInfo](_enroll_result_info.md) + - [ExecutorInfo](_executor_info_userauth.md) + - [ExecutorRegisterInfo](_executor_register_info.md) + - [ExecutorSendMsg](_executor_send_msg.md) + - [IdentifyResultInfo](_identify_result_info.md) + - [IUserAuthInterface](interface_i_user_auth_interface.md) + - [ScheduleInfo](_schedule_info.md) + - HdiActivityRecognition模块结构体 + - [ActRecognitionEvent](_act_recognition_event.md) + - [IActivityChangedCallback](interface_i_activity_changed_callback.md) + - [IActivityInterface](interface_i_activity_interface.md) + - HdiLpfenceCellbatching模块结构体 + - [CellbatchingRequest](_cellbatching_request.md) + - [CellTrajectoryData](_cell_trajectory_data.md) + - [ICellbatchingCallback](interface_i_cellbatching_callback.md) + - [ICellbatchingInterface](interface_i_cellbatching_interface.md) + - HdiLpfenceCellfence模块结构体 + - [CellfenceInfo](_cellfence_info.md) + - [CellfenceRequest](_cellfence_request.md) + - [CellfenceSize](_cellfence_size.md) + - [CellfenceStatus](_cellfence_status.md) + - [ICellfenceCallback](interface_i_cellfence_callback.md) + - [ICellfenceInterface](interface_i_cellfence_interface.md) + - HdiLpfenceGeofence模块结构体 + - [CurrentCell](_current_cell.md) + - [GeofenceCellInfo](_geofence_cell_info.md) + - [GeofenceCircleRequest](_geofence_circle_request.md) + - [GeofencePolygonRequest](_geofence_polygon_request.md) + - [GeofenceResult](_geofence_result.md) + - [GeofenceSize](_geofence_size.md) + - [GeoLocationInfo](_geo_location_info.md) + - [IGeofenceCallback](interface_i_geofence_callback.md) + - [IGeofenceInterface](interface_i_geofence_interface.md) + - [NeighborCell](_neighbor_cell.md) + - [OfflineDb](_offline_db.md) + - [Point](_point.md) + - [RequestCellDb](_request_cell_db.md) + - HdiLpfenceWififence模块结构体 + - [IWififenceCallback](interface_i_wififence_callback.md) + - [IWififenceInterface](interface_i_wififence_interface.md) + - [WififenceRequest](_wififence_request.md) + - [WififenceSize](_wififence_size.md) + + + - Input模块结构体 + - [IInputInterface](_i_input_interface.md) + - [InputController](_input_controller.md) + - [InputDevAbility](_input_dev_ability.md) + - [InputDevAttr](_input_dev_attr.md) + - [InputDevDesc](_input_dev_desc.md) + - [InputDeviceInfo](_input_device_info.md) + - [InputDevIdentify](_input_dev_identify.md) + - [InputDimensionInfo](_input_dimension_info.md) + - [InputEventCb](_input_event_cb.md) + - [InputEventPackage](_input_event_package.md) + - [InputExtraCmd](_input_extra_cmd.md) + - [InputHostCb](_input_host_cb.md) + - [InputHotPlugEvent](_input_hot_plug_event.md) + - [InputManager](_input_manager.md) + - [InputReporter](_input_reporter.md) + - Light模块结构体 + - [ColorValue](union_color_value.md) + - [HdfLightColor](_hdf_light_color.md) + - [HdfLightEffect](_hdf_light_effect.md) + - [HdfLightFlashEffect](_hdf_light_flash_effect.md) + - [HdfLightInfo](_hdf_light_info.md) + - [ILightInterface](interface_i_light_interface.md) + - [RGBColor](_r_g_b_color.md) - [WRGBColor](_w_r_g_b_color.md) + - Motion模块结构体 + - [HdfMotionEvent](_hdf_motion_event.md) + - [IMotionCallback](interface_i_motion_callback.md) + - [IMotionInterface](interface_i_motion_interface.md) + - NNRt模块结构体 + - [Activation](_activation.md) + - [AddFusion](_add_fusion.md) + - [ArgMaxFusion](_arg_max_fusion.md) + - [AvgPoolFusion](_avg_pool_fusion.md) + - [BatchToSpaceND](_batch_to_space_n_d.md) + - [BiasAdd](_bias_add.md) + - [Cast](_cast.md) + - [Concat](_concat.md) + - [Conv2DFusion](_conv2_d_fusion.md) + - [Conv2dTransposeFusion](_conv2d_transpose_fusion.md) + - [DivFusion](_div_fusion.md) + - [Eltwise](_eltwise.md) + - [ExpandDims](_expand_dims.md) + - [Fill](_fill.md) + - [FullConnection](_full_connection.md) + - [FusedBatchNorm](_fused_batch_norm.md) + - [Gather](_gather.md) + - [INnrtDevice](interface_i_nnrt_device.md) + - [IOTensor](_i_o_tensor.md) + - [IPreparedModel](interface_i_prepared_model.md) + - [LayerNormFusion](_layer_norm_fusion.md) + - [LessEqual](_less_equal.md) + - [MatMulFusion](_mat_mul_fusion.md) + - [Maximum](_maximum.md) + - [MaxPoolFusion](_max_pool_fusion.md) + - [Model](_model.md) + - [ModelConfig](_model_config.md) + - [MulFusion](_mul_fusion.md) + - [Node](_node.md) + - [OneHot](_one_hot.md) + - [PadFusion](_pad_fusion.md) + - [PowFusion](_pow_fusion.md) + - [PReLUFusion](_p_re_l_u_fusion.md) + - [QuantDTypeCast](_quant_d_type_cast.md) + - [QuantParam](_quant_param.md) + - [ReduceFusion](_reduce_fusion.md) + - [Reshape](_reshape.md) + - [Resize](_resize.md) + - [Rsqrt](_rsqrt.md) + - [ScaleFusion](_scale_fusion.md) + - [Shape](_shape.md) + - [SharedBuffer](_shared_buffer.md) + - [SliceFusion](_slice_fusion.md) + - [Softmax](_softmax.md) + - [SpaceToBatchND](_space_to_batch_n_d.md) + - [Split](_split.md) + - [Sqrt](_sqrt.md) + - [SquaredDifference](_squared_difference.md) + - [Squeeze](_squeeze.md) + - [Stack](_stack.md) + - [StridedSlice](_strided_slice.md) + - [SubFusion](_sub_fusion.md) + - [SubGraph](_sub_graph.md) + - [Tensor](_tensor.md) + - [TileFusion](_tile_fusion.md) + - [TopKFusion](_top_k_fusion.md) + - [Transpose](_transpose.md) + - [Unsqueeze](_unsqueeze.md) + - Power模块结构体 + - [IPowerHdiCallback](interface_i_power_hdi_callback.md) + - [IPowerInterface](interface_i_power_interface.md) + - Ril模块结构体 + - [ApduSimIORequestInfo](_apdu_sim_i_o_request_info.md) + - [AvailableNetworkInfo](_available_network_info.md) + - [AvailableNetworkList](_available_network_list.md) + - [CallForwardQueryInfoList](_call_forward_query_info_list.md) + - [CallForwardQueryResult](_call_forward_query_result.md) + - [CallForwardSetInfo](_call_forward_set_info.md) + - [CallInfo](_call_info.md) + - [CallInfoList](_call_info_list.md) + - [CallRestrictionInfo](_call_restriction_info.md) + - [CallRestrictionResult](_call_restriction_result.md) + - [CallWaitResult](_call_wait_result.md) + - [CardStatusInfo](_card_status_info.md) + - [CBConfigInfo](_c_b_config_info.md) + - [CBConfigReportInfo](_c_b_config_report_info.md) + - [CdmaCBConfigInfo](_cdma_c_b_config_info.md) + - [CdmaCBConfigInfoList](_cdma_c_b_config_info_list.md) + - [CdmaRssi](_cdma_rssi.md) + - [CellListCurrentInfo](_cell_list_current_info.md) + - [CellListNearbyInfo](_cell_list_nearby_info.md) + - [CellListRatCdma](_cell_list_rat_cdma.md) + - [CellListRatGsm](_cell_list_rat_gsm.md) + - [CellListRatLte](_cell_list_rat_lte.md) + - [CellListRatNr](_cell_list_rat_nr.md) + - [CellListRatTdscdma](_cell_list_rat_tdscdma.md) + - [CellListRatWcdma](_cell_list_rat_wcdma.md) + - [CellNearbyInfo](_cell_nearby_info.md) + - [CellRatCdma](_cell_rat_cdma.md) + - [CellRatGsm](_cell_rat_gsm.md) + - [CellRatLte](_cell_rat_lte.md) + - [CellRatNr](_cell_rat_nr.md) + - [CellRatTdscdma](_cell_rat_tdscdma.md) + - [CellRatWcdma](_cell_rat_wcdma.md) + - [ChannelConfigInfoList](_channel_config_info_list.md) + - [CsRegStatusInfo](_cs_reg_status_info.md) + - [CurrentCellInfo](_current_cell_info.md) + - [CurrentServiceCellParas](union_current_service_cell_paras.md) + - [DataCallInfo](_data_call_info.md) + - [DataCallResultList](_data_call_result_list.md) + - [DataLinkBandwidthInfo](_data_link_bandwidth_info.md) + - [DataLinkBandwidthReportingRule](_data_link_bandwidth_reporting_rule.md) + - [DataPerformanceInfo](_data_performance_info.md) + - [DataProfileDataInfo](_data_profile_data_info.md) + - [DataProfilesInfo](_data_profiles_info.md) + - [DataSleepInfo](_data_sleep_info.md) + - [DialInfo](_dial_info.md) + - [DtmfInfo](_dtmf_info.md) + - [EmergencyCall](_emergency_call.md) + - [EmergencyInfoList](_emergency_info_list.md) + - [GetClipResult](_get_clip_result.md) + - [GetClirResult](_get_clir_result.md) + - [GsmRssi](_gsm_rssi.md) + - [GsmSmsMessageInfo](_gsm_sms_message_info.md) + - [IccIoResultInfo](_icc_io_result_info.md) + - [IRil](interface_i_ril.md) + - [IRilCallback](interface_i_ril_callback.md) + - [LockStatusResp](_lock_status_resp.md) + - [LteRssi](_lte_rssi.md) + - [ModeData](_mode_data.md) + - [NrRssi](_nr_rssi.md) + - [OpenLogicalChannelResponse](_open_logical_channel_response.md) + - [OperatorInfo](_operator_info.md) + - [PhysicalChannelConfig](_physical_channel_config.md) + - [PreferredNetworkTypeInfo](_preferred_network_type_info.md) + - [PsRegStatusInfo](_ps_reg_status_info.md) + - [RadioProtocol](_radio_protocol.md) + - [RilRadioResponseInfo](_ril_radio_response_info.md) + - [RingbackVoice](_ringback_voice.md) + - [Rssi](_rssi.md) + - [SendCdmaSmsMessageInfo](_send_cdma_sms_message_info.md) + - [SendSmsResultInfo](_send_sms_result_info.md) + - [ServiceCellParas](union_service_cell_paras.md) + - [ServiceCenterAddress](_service_center_address.md) + - [SetBarringInfo](_set_barring_info.md) + - [SetNetworkModeInfo](_set_network_mode_info.md) + - [SetupDataCallResultInfo](_setup_data_call_result_info.md) + - [SimAuthenticationRequestInfo](_sim_authentication_request_info.md) + - [SimIoRequestInfo](_sim_io_request_info.md) + - [SimLockInfo](_sim_lock_info.md) + - [SimPasswordInfo](_sim_password_info.md) + - [SimPinInputTimes](_sim_pin_input_times.md) + - [SmsMessageInfo](_sms_message_info.md) + - [SmsMessageIOInfo](_sms_message_i_o_info.md) + - [SrvccStatus](_srvcc_status.md) + - [SsNoticeInfo](_ss_notice_info.md) + - [TdScdmaRssi](_td_scdma_rssi.md) + - [UniInfo](_uni_info.md) + - [UssdNoticeInfo](_ussd_notice_info.md) + - [VoiceRadioTechnology](_voice_radio_technology.md) + - [WcdmaRssi](_wcdma_rssi.md) + - Sensor模块结构体 + - [HdfSensorEvents](_hdf_sensor_events.md) + - [HdfSensorInformation](_hdf_sensor_information.md) + - [ISensorCallback](interface_i_sensor_callback.md) + - [ISensorInterface](interface_i_sensor_interface.md) + - Thermal模块结构体 + - [HdfThermalCallbackInfo](_hdf_thermal_callback_info.md) + - [IThermalCallback](interface_i_thermal_callback.md) + - [IThermalInterface](interface_i_thermal_interface.md) + - [ThermalZoneInfo](_thermal_zone_info.md) + - USB模块结构体 + - [IUsbdBulkCallback](interface_i_usbd_bulk_callback.md) + - [IUsbdSubscriber](interface_i_usbd_subscriber.md) + - [IUsbInterface](interface_i_usb_interface.md) + - [PortInfo](_port_info.md) + - [UsbCtrlTransfer](_usb_ctrl_transfer.md) + - [UsbDev](_usb_dev.md) + - [USBDeviceInfo](_u_s_b_device_info.md) + - [UsbPipe](_usb_pipe.md) + - Vibrator模块结构体 + - [HdfVibratorInfo](_hdf_vibrator_info.md) + - [IVibratorInterface](interface_i_vibrator_interface.md) + - WLAN模块结构体 + - [HdfFeatureInfo](_hdf_feature_info.md) + - [HdfNetDeviceInfo](_hdf_net_device_info.md) + - [HdfNetDeviceInfoResult](_hdf_net_device_info_result.md) + - [HdfStaInfo](_hdf_sta_info.md) + - [HdfWifiDriverScanSsid](_hdf_wifi_driver_scan_ssid.md) + - [HdfWifiInfo](_hdf_wifi_info.md) + - [HdfWifiScan](_hdf_wifi_scan.md) + - [HdfWifiScanResult](_hdf_wifi_scan_result.md) + - [IWlanCallback](interface_i_wlan_callback.md) + - [IWlanInterface](interface_i_wlan_interface.md) + - [MeasChannelParam](_meas_channel_param.md) + - [MeasChannelResult](_meas_channel_result.md) + - [ProjectionScreenCmdParam](_projection_screen_cmd_param.md) + - [WifiStationInfo](_wifi_station_info.md) \ No newline at end of file diff --git a/zh-cn/device-dev/reference/hdi-apis/_act_recognition_event.md b/zh-cn/device-dev/reference/hdi-apis/_act_recognition_event.md index be0a24cf5da6609d76c3ae7dc8d6bc8ebfeb0ae5..1f8128bc9c58927a087020fedf20f98b1c261338 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_act_recognition_event.md +++ b/zh-cn/device-dev/reference/hdi-apis/_act_recognition_event.md @@ -1,37 +1,33 @@ # ActRecognitionEvent -## **概述** +## 概述 -定义行为识别模块使用的数据类型。 +定义行为事件上报的数据结构。 -**Since**: +**Since:** 3.2 -**Version**: - -1.0 - **相关模块:** -[HdiActivityRecognition](activity_recognition.md) +[HdiActivityRecognition](_hdi_activity_recognition.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [activity](#activity) | 行为类型 | -| [eventType](#eventtype) | 事件类型 | -| [timestamp](#timestamp) | 时间戳 | -| [confidence](#confidence) | 置信度 | +| [activity](#activity) | int
行为类型,详见[ActRecognitionEventType](_hdi_activity_recognition.md#actrecognitioneventtype)。 | +| [eventType](#eventtype) | int
事件类型,详见[ActRecognitionEventType](_hdi_activity_recognition.md#actrecognitioneventtype)。 | +| [timestamp](#timestamp) | long
时间戳 | +| [confidence](#confidence) | int
置信度,100为最可信,0为最不可信,-1为该行为不支持置信度的计算。 | -## **类成员变量说明** +## 类成员变量说明 ### activity @@ -41,9 +37,9 @@ int ActRecognitionEvent::activity ``` -**描述:** +**描述:** -行为类型,详见[ActRecognitionEventType](activity_recognition.md#actrecognitioneventtype)。 +行为类型,详见[ActRecognitionEventType](_hdi_activity_recognition.md#actrecognitioneventtype)。 ### confidence @@ -53,7 +49,7 @@ int ActRecognitionEvent::activity int ActRecognitionEvent::confidence ``` -**描述:** +**描述:** 置信度,100为最可信,0为最不可信,-1为该行为不支持置信度的计算。 @@ -65,9 +61,9 @@ int ActRecognitionEvent::confidence int ActRecognitionEvent::eventType ``` -**描述:** +**描述:** -事件类型,详见[ActRecognitionEventType](activity_recognition.md#actrecognitioneventtype)。 +事件类型,详见[ActRecognitionEventType](_hdi_activity_recognition.md#actrecognitioneventtype)。 ### timestamp @@ -77,6 +73,6 @@ int ActRecognitionEvent::eventType long ActRecognitionEvent::timestamp ``` -**描述:** +**描述:** -时间戳。 +时间戳 diff --git a/zh-cn/device-dev/reference/hdi-apis/_activation.md b/zh-cn/device-dev/reference/hdi-apis/_activation.md new file mode 100644 index 0000000000000000000000000000000000000000..75fd2cf52b8c0b71b62bafa86b720d7a88625815 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_activation.md @@ -0,0 +1,91 @@ +# Activation + + +## 概述 + +激活类型的算子,所有的激活函数都属于该算子,具体的激活函数类型一句参数来确定。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_ACTIVATION。 + +输入: + +- x,n维张量。 + +输出: + +- 输出x经过激活函数之后的张量。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [activationType](#activationtype) | enum [ActivationType](_n_n_rt.md#activationtype)
激活函数类型。  | +| [alpha](#alpha) | float
尺寸因子,用于LeakyReLU和ELU激活函数。  | +| [minVal](#minval) | float
最小值,用于HardTanh激活函数。  | +| [maxVal](#maxval) | float
最大值,用于HardTanh激活函数。  | +| [approximate](#approximate) | boolean
是否使用近似算法,用于GRLU激活函数。  | + + +## 类成员变量说明 + + +### activationType + + +``` +enum ActivationType Activation::activationType +``` +**描述:** +激活函数类型。 + + +### alpha + + +``` +float Activation::alpha +``` +**描述:** +尺寸因子,用于LeakyReLU和ELU激活函数。 + + +### approximate + + +``` +boolean Activation::approximate +``` +**描述:** +是否使用近似算法,用于GRLU激活函数。 + + +### maxVal + + +``` +float Activation::maxVal +``` +**描述:** +最大值,用于HardTanh激活函数。 + + +### minVal + + +``` +float Activation::minVal +``` +**描述:** +最小值,用于HardTanh激活函数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_activity_recognition_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_activity_recognition_types_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..21d103ba0eeb625179595bc5ac721cb576d19892 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_activity_recognition_types_8idl.md @@ -0,0 +1,43 @@ +# ActivityRecognitionTypes.idl + + +## 概述 + +定义行为识别模块使用的数据类型。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[HdiActivityRecognition](_hdi_activity_recognition.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [ActRecognitionEvent](_act_recognition_event.md) | struct
定义行为事件上报的数据结构。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [ActRecognitionEventType](_hdi_activity_recognition.md#actrecognitioneventtype) { ACT_RECOGNITION_EVENT_ENTER = 0x01 , ACT_RECOGNITION_EVENT_EXIT = 0x02 } | 枚举行为事件的类型。 | +| [ActRecognitionPowerMode](_hdi_activity_recognition.md#actrecognitionpowermode) { ACT_RECOGNITION_NORMAL_MODE = 0 , ACT_RECOGNITION_LOW_POWER_MODE = 1 } | 枚举功耗模式的类型。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.activity_recognition.v1_0 | 行为识别模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_add_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_add_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..9e04ac3100e79c4dc25d136d503fa591fc1fb77e --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_add_fusion.md @@ -0,0 +1,55 @@ +# AddFusion + + +## 概述 + +输入Tensor逐元素相加, 输出x和y的和,数据形状与输入broadcast之后一样,数据类型与较高精度的输入精度一致。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_ADD_FUSION。 + +输入: + +- x,第一个输入张量。 + +- y,第二个输入张量,数据类型和第一个张量保持一致。 + +输出: + +- output,x和y逐元素相加, 输出x和y的和,数据形状与输入broadcast之后一样,数据类型与较高精度的输入精度一致。 如果配置了activationType则会在输出之前调用指定的激活函数。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [activationType](#activationtype) | enum [ActivationType](_n_n_rt.md#activationtype)
激活函数类型。详情请参考:[ActivationType](_n_n_rt.md#activationtype) | + + +## 类成员变量说明 + + +### activationType + + +``` +enum ActivationType AddFusion::activationType +``` + +**描述:** + +激活函数类型。详情请参考:[ActivationType](_n_n_rt.md#activationtype) diff --git a/zh-cn/device-dev/reference/hdi-apis/_alignment.md b/zh-cn/device-dev/reference/hdi-apis/_alignment.md index 508dff7fee34820fe172e03b1cc4c60587153ce1..b91e8b1c2f605dbc7faad276ef71eac1fd195816 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_alignment.md +++ b/zh-cn/device-dev/reference/hdi-apis/_alignment.md @@ -1,27 +1,27 @@ # Alignment -## **概述** +## 概述 对齐结构定义,包含宽高的对齐值。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [widthAlignment](#widthalignment) | 宽的对齐值。 | -| [heightAlignment](#heightalignment) | 高的对齐值。 | +| [widthAlignment](#widthalignment) | int32_t
宽的对齐值。  | +| [heightAlignment](#heightalignment) | int32_t
高的对齐值。  | -## **类成员变量说明** +## 类成员变量说明 ### heightAlignment @@ -30,9 +30,7 @@ ``` int32_t Alignment::heightAlignment ``` - -**描述:** - +**描述:** 高的对齐值。 @@ -42,7 +40,5 @@ int32_t Alignment::heightAlignment ``` int32_t Alignment::widthAlignment ``` - -**描述:** - +**描述:** 宽的对齐值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_alloc_info.md b/zh-cn/device-dev/reference/hdi-apis/_alloc_info.md index b75e855aa644a53d4a51f52124346e34c4368d9c..692cb5eac9e95d8e9761ebfa84dbf914f7a54d0d 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_alloc_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_alloc_info.md @@ -1,24 +1,24 @@ # AllocInfo -## **概述** +## 概述 -定义待分配的内存的信息。 +定义关于要分配的内存的信息。 **相关模块:** [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [width](_display.md#width-69) | 申请内存宽度 | -| [height](_display.md#height-68) | 申请内存高度 | -| [usage](_display.md#usage-12) | 申请内存的使用场景 | -| [format](_display.md#format-12) | 申请内存格式 | -| [expectedSize](_display.md#expectedsize) | 申请内存大小 | +| [width](_display.md#width-69) | uint32_t
申请内存宽度 | +| [height](_display.md#height-68) | uint32_t
申请内存高度 | +| [usage](_display.md#usage-12) | uint64_t
申请内存的使用场景 | +| [format](_display.md#format-12) | [PixelFormat](_display.md#pixelformat)
申请内存格式 | +| [expectedSize](_display.md#expectedsize) | uint32_t
申请内存大小 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_apdu_sim_i_o_request_info.md b/zh-cn/device-dev/reference/hdi-apis/_apdu_sim_i_o_request_info.md new file mode 100644 index 0000000000000000000000000000000000000000..e01fa6ea44f763fa0a707896cf69bf5b4905eb0f --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_apdu_sim_i_o_request_info.md @@ -0,0 +1,110 @@ +# ApduSimIORequestInfo + + +## 概述 + +APDU数据传输请求信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [channelId](#channelid) | int
通道ID  | +| [type](#type) | int
APDU指令类型,参考ETSI 102 221 [55]  | +| [instruction](#instruction) | int
APDU指令,参考ETSI 102 221 [55]  | +| [p1](#p1) | int
SIM数据请求命令参数,参考3GPP TS 51.011[28]  | +| [p2](#p2) | int
SIM数据请求命令参数2,参考3GPP TS 51.011[28]  | +| [p3](#p3) | int
SIM数据请求命令参数3,参考3GPP TS 51.011[28] 如果p3为负值,则会向SIM发送一个4字节的APDU  | +| [data](#data) | String
请求传输的数据信息  | + + +## 类成员变量说明 + + +### channelId + + +``` +int ApduSimIORequestInfo::channelId +``` +**描述:** +通道ID + + +### data + + +``` +String ApduSimIORequestInfo::data +``` +**描述:** +请求传输的数据信息 + + +### instruction + + +``` +int ApduSimIORequestInfo::instruction +``` +**描述:** +APDU指令,参考ETSI 102 221 [55] + + +### p1 + + +``` +int ApduSimIORequestInfo::p1 +``` +**描述:** +SIM数据请求命令参数,参考3GPP TS 51.011[28] + + +### p2 + + +``` +int ApduSimIORequestInfo::p2 +``` +**描述:** +SIM数据请求命令参数2,参考3GPP TS 51.011[28] + + +### p3 + + +``` +int ApduSimIORequestInfo::p3 +``` +**描述:** +SIM数据请求命令参数3,参考3GPP TS 51.011[28] 如果p3为负值,则会向SIM发送一个4字节的APDU + + +### serial + + +``` +int ApduSimIORequestInfo::serial +``` +**描述:** +请求的序列号 + + +### type + + +``` +int ApduSimIORequestInfo::type +``` +**描述:** +APDU指令类型,参考ETSI 102 221 [55] diff --git a/zh-cn/device-dev/reference/hdi-apis/_arg_max_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_arg_max_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..f01668424335aafbcbe48ccf7135a4f8ad1ecbc4 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_arg_max_fusion.md @@ -0,0 +1,80 @@ +# ArgMaxFusion + + +## 概述 + +返回跨轴的tensor前K个索引或者是数值。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_ARGMAX_FUSION。 + +输入: + +- x,n维tensor,输入张量(N,\*),其中\*意味着数量任意的附加维度。 + +输出: + +- output,轴上输入张量最大值的前K个索引或者是数值。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [axis](#axis) | long
指定求最大值索引的维度。  | +| [topK](#topk) | long
轴上前K个最大值。  | +| [keepDims](#keepdims) | boolean
是否保持输出维度和输入的维度是否相同。  | +| [outMaxValue](#outmaxvalue) | boolean
若为false则输出索引,为true则输出数值,默认为false。  | + + +## 类成员变量说明 + + +### axis + + +``` +long ArgMaxFusion::axis +``` +**描述:** +指定求最大值索引的维度。 + + +### keepDims + + +``` +boolean ArgMaxFusion::keepDims +``` +**描述:** +是否保持输出维度和输入的维度是否相同。 + + +### outMaxValue + + +``` +boolean ArgMaxFusion::outMaxValue +``` +**描述:** +若为false则输出索引,为true则输出数值,默认为false。 + + +### topK + + +``` +long ArgMaxFusion::topK +``` +**描述:** +轴上前K个最大值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio.md b/zh-cn/device-dev/reference/hdi-apis/_audio.md index 9dde93d0d7f47911dc97740ccf20f51b7a7ad570..4e9cfad3426e420db829c29e59555f6a5e09c5f5 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_audio.md +++ b/zh-cn/device-dev/reference/hdi-apis/_audio.md @@ -1,210 +1,101 @@ # Audio -## **概述** +## 概述 Audio模块接口定义。 -音频接口涉及自定义类型、驱动加载接口、驱动适配器接口、音频播放(Render)接口、音频录音(Capture)接口等。 +音频接口涉及数据类型、驱动加载接口、驱动适配器接口、音频播放接口、音频录音接口等。 -**Since**: +**Since:** -1.0 +3.2 -**Version**: +**Version:** 1.0 -## **汇总** +## 汇总 ### 文件 | 名称 | 描述 | | -------- | -------- | -| [audio_adapter.h](audio__adapter_8h.md) | Audio适配器的接口定义文件 | -| [audio_attribute.h](audio__attribute_8h.md) | Audio属性的接口定义文件 | -| [audio_capture.h](audio__capture_8h.md) | Audio录音的接口定义文件 | -| [audio_control.h](audio__control_8h.md) | Audio控制的接口定义文件 | -| [audio_manager.h](audio__manager_8h.md) | Audio适配器管理及加载的接口定义文件 | -| [audio_render.h](audio__render_8h.md) | Audio播放的接口定义文件 | -| [audio_scene.h](audio__scene_8h.md) | Audio场景的接口定义文件 | -| [audio_types.h](audio__types_8h.md) | Audio模块接口定义中使用的自定义数据类型 | -| [audio_volume.h](audio__volume_8h.md) | Audio音量的接口定义文件 | +| [AudioTypes.idl](_audio_types_8idl.md) | Audio模块接口定义中使用的数据类型。 | +| [IAudioAdapter.idl](_i_audio_adapter_8idl.md) | Audio适配器的接口定义文件。 | +| [IAudioCallback.idl](_i_audio_callback_8idl.md) | Audio播放的回调函数定义文件。 | +| [IAudioCapture.idl](_i_audio_capture_8idl.md) | Audio录音的接口定义文件。 | +| [IAudioManager.idl](_i_audio_manager_8idl.md) | Audio适配器管理及加载的接口定义文件。 | +| [IAudioRender.idl](_i_audio_render_8idl.md) | Audio播放的接口定义文件。 | ### 类 | 名称 | 描述 | | -------- | -------- | -| [AudioAdapter](_audio_adapter.md) | AudioAdapter音频适配器接口 | -| [AudioAttribute](_audio_attribute.md) | AudioAttribute音频属性接口 | -| [AudioCapture](_audio_capture.md) | AudioCapture音频录音接口 | -| [AudioControl](_audio_control.md) | AudioControl音频控制接口 | -| [AudioManager](_audio_manager.md) | AudioManager音频适配器管理接口 | -| [AudioRender](_audio_render.md) | AudioRender音频播放接口 | -| [AudioScene](_audio_scene.md) | AudioScene音频场景接口 | -| [AudioPort](_audio_port.md) | 音频端口 | -| [AudioAdapterDescriptor](_audio_adapter_descriptor.md) | 音频适配器描述符 | -| [AudioDeviceDescriptor](_audio_device_descriptor.md) | 音频设备描述符 | -| [AudioSceneDescriptor](_audio_scene_descriptor.md) | 音频场景描述符 | -| [AudioSceneDescriptor::SceneDesc](union_audio_scene_descriptor_1_1_scene_desc.md) | 音频场景描述 | -| [AudioSampleAttributes](_audio_sample_attributes.md) | 音频采样属性 | -| [AudioTimeStamp](_audio_time_stamp.md) | 音频时间戳 | -| [AudioSubPortCapability](_audio_sub_port_capability.md) | 音频子端口的支持能力 | -| [AudioPortCapability](_audio_port_capability.md) | 音频端口的支持能力 | -| [AudioMmapBufferDescriptor](_audio_mmap_buffer_descriptor.md) | mmap缓冲区描述符 | -| [AudioDevExtInfo](_audio_dev_ext_info.md) | 音频设备拓展信息 | -| [AudioMixExtInfo](_audio_mix_ext_info.md) | 音轨拓展信息 | -| [AudioSessionExtInfo](_audio_session_ext_info.md) | 会话拓展信息 | -| [AudioRouteNode](_audio_route_node.md) | 音频路由节点 | -| [AudioRoute](_audio_route.md) | 音频路由信息 | -| [AudioVolume](_audio_volume.md) | AudioVolume音频音量接口 | - - -### 类型定义 - - | 名称 | 描述 | -| -------- | -------- | -| AudioHandle | 音频句柄 | -| ([RenderCallback](#rendercallback)) (enum AudioCallbackType, void \*reserved, void \*cookie) | 回调函数指针 | +| [AudioDeviceStatus](_audio_device_status.md) | struct
音频设备状态。 | +| [SceneDesc](union_scene_desc.md) | union
音频场景描述。 | +| [AudioPort](_audio_port.md) | struct
音频端口。 | +| [AudioAdapterDescriptor](_audio_adapter_descriptor.md) | struct
音频适配器描述符。 | +| [AudioDeviceDescriptor](_audio_device_descriptor.md) | struct
音频设备描述符。 | +| [AudioSceneDescriptor](_audio_scene_descriptor.md) | struct
音频场景描述符。 | +| [AudioSampleAttributes](_audio_sample_attributes.md) | struct
音频采样属性。 | +| [AudioTimeStamp](_audio_time_stamp.md) | struct
音频时间戳。 | +| [AudioSubPortCapability](_audio_sub_port_capability.md) | struct
音频子端口的支持能力。 | +| [AudioPortCapability](_audio_port_capability.md) | struct
音频端口的支持能力。 | +| [AudioMmapBufferDescripter](_audio_mmap_buffer_descripter.md) | struct
mmap缓冲区描述符。 | +| [AudioDevExtInfo](_audio_dev_ext_info.md) | struct
音频设备拓展信息。 | +| [AudioMixExtInfo](_audio_mix_ext_info.md) | struct
音轨拓展信息。 | +| [AudioSessionExtInfo](_audio_session_ext_info.md) | struct
会话拓展信息。 | +| [AudioInfo](_audio_info.md) | struct
音频端口特定信息。 | +| [AudioRouteNode](_audio_route_node.md) | struct
音频路由节点。 | +| [AudioRoute](_audio_route.md) | struct
音频路由信息。 | +| [AudioEvent](_audio_event.md) | struct
音频事件。 | +| [IAudioAdapter](interface_i_audio_adapter.md) | interface
AudioAdapter音频适配器接口。 | +| [IAudioCallback](interface_i_audio_callback.md) | interface
Audio回调接口。 | +| [IAudioCapture](interface_i_audio_capture.md) | interface
AudioCapture音频录音接口。 | +| [IAudioManager](interface_i_audio_manager.md) | interface
AudioManager音频适配器管理接口。 | +| [IAudioRender](interface_i_audio_render.md) | interface
AudioRender音频播放接口。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [AudioPortDirection](#audioportdirection) { PORT_OUT = 0x1u, PORT_IN = 0x2u, PORT_OUT_IN = 0x3u } | 音频端口的类型 | -| [AudioPortPin](#audioportpin) { PIN_NONE = 0x0u, PIN_OUT_SPEAKER = 0x1u, PIN_OUT_HEADSET = 0x2u, PIN_OUT_LINEOUT = 0x4u,   PIN_OUT_HDMI = 0x8u, PIN_OUT_USB = 0x10u, PIN_OUT_USB_EXT = 0x20u, PIN_IN_MIC = 0x8000001u,   PIN_IN_HS_MIC = 0x8000002u, PIN_IN_LINEIN = 0x8000004u, PIN_IN_USB_EXT = 0x8000008u } | 音频适配器端口的PIN脚 | -| [AudioCategory](#audiocategory) { AUDIO_IN_MEDIA = 0, AUDIO_IN_COMMUNICATION, AUDIO_IN_RINGTONE, AUDIO_IN_CALL } | 音频类型(category) | -| [AudioFormat](#audioformat){ AUDIO_FORMAT_PCM_8_BIT = 0x1u, AUDIO_FORMAT_PCM_16_BIT = 0x2u, AUDIO_FORMAT_PCM_24_BIT = 0x3u, AUDIO_FORMAT_PCM_32_BIT = 0x4u,   AUDIO_FORMAT_AAC_MAIN = 0x1000001u, AUDIO_FORMAT_AAC_LC = 0x1000002u, AUDIO_FORMAT_AAC_LD = 0x1000003u, AUDIO_FORMAT_AAC_ELD = 0x1000004u,   AUDIO_FORMAT_AAC_HE_V1 = 0x1000005u, AUDIO_FORMAT_AAC_HE_V2 = 0x1000006u, AUDIO_FORMAT_G711A = 0x2000001u, AUDIO_FORMAT_G711U = 0x2000002u,   AUDIO_FORMAT_G726 = 0x2000003u } | 音频格式 | -| [AudioChannelMask](#audiochannelmask){ AUDIO_CHANNEL_FRONT_LEFT = 0x1, AUDIO_CHANNEL_FRONT_RIGHT = 0x2, AUDIO_CHANNEL_MONO = 0x1u, AUDIO_CHANNEL_STEREO = 0x3u } | 音频通道掩码(mask) | -| [AudioSampleRatesMask](#audiosampleratesmask){ AUDIO_SAMPLE_RATE_MASK_8000 = 0x1u, AUDIO_SAMPLE_RATE_MASK_12000 = 0x2u, AUDIO_SAMPLE_RATE_MASK_11025 = 0x4u, AUDIO_SAMPLE_RATE_MASK_16000 = 0x8u,   AUDIO_SAMPLE_RATE_MASK_22050 = 0x10u, AUDIO_SAMPLE_RATE_MASK_24000 = 0x20u, AUDIO_SAMPLE_RATE_MASK_32000 = 0x40u, AUDIO_SAMPLE_RATE_MASK_44100 = 0x80u,   AUDIO_SAMPLE_RATE_MASK_48000 = 0x100u, AUDIO_SAMPLE_RATE_MASK_64000 = 0x200u, AUDIO_SAMPLE_RATE_MASK_96000 = 0x400u, AUDIO_SAMPLE_RATE_MASK_INVALID = 0xFFFFFFFFu } | 音频采样频率MASK | -| [AudioPortPassthroughMode](#audioportpassthroughmode){ PORT_PASSTHROUGH_LPCM = 0x1, PORT_PASSTHROUGH_RAW = 0x2, PORT_PASSTHROUGH_HBR2LBR = 0x4, PORT_PASSTHROUGH_AUTO = 0x8 } | 音频端口的数据透传模式 | -| [AudioSampleFormat](#audiosampleformat){ AUDIO_SAMPLE_FORMAT_S8, AUDIO_SAMPLE_FORMAT_S8P, AUDIO_SAMPLE_FORMAT_U8, AUDIO_SAMPLE_FORMAT_U8P,   AUDIO_SAMPLE_FORMAT_S16, AUDIO_SAMPLE_FORMAT_S16P, AUDIO_SAMPLE_FORMAT_U16, AUDIO_SAMPLE_FORMAT_U16P,   AUDIO_SAMPLE_FORMAT_S24, AUDIO_SAMPLE_FORMAT_S24P, AUDIO_SAMPLE_FORMAT_U24, AUDIO_SAMPLE_FORMAT_U24P,   AUDIO_SAMPLE_FORMAT_S32, AUDIO_SAMPLE_FORMAT_S32P, AUDIO_SAMPLE_FORMAT_U32, AUDIO_SAMPLE_FORMAT_U32P,   AUDIO_SAMPLE_FORMAT_S64, AUDIO_SAMPLE_FORMAT_S64P, AUDIO_SAMPLE_FORMAT_U64, AUDIO_SAMPLE_FORMAT_U64P,   AUDIO_SAMPLE_FORMAT_F32, AUDIO_SAMPLE_FORMAT_F32P, AUDIO_SAMPLE_FORMAT_F64, AUDIO_SAMPLE_FORMAT_F64P } | 原始音频样本格式 | -| [AudioChannelMode](#audiochannelmode){  AUDIO_CHANNEL_NORMAL = 0, AUDIO_CHANNEL_BOTH_LEFT, AUDIO_CHANNEL_BOTH_RIGHT, AUDIO_CHANNEL_EXCHANGE,   AUDIO_CHANNEL_MIX, AUDIO_CHANNEL_LEFT_MUTE, AUDIO_CHANNEL_RIGHT_MUTE, AUDIO_CHANNEL_BOTH_MUTE } | 音频播放的通道模式 | -| [AudioDrainNotifyType](#audiodrainnotifytype){ AUDIO_DRAIN_NORMAL_MODE, AUDIO_DRAIN_EARLY_MODE } | DrainBuffer函数结束类型 | -| [AudioCallbackType](#audiocallbacktype){ AUDIO_NONBLOCK_WRITE_COMPLETED, AUDIO_DRAIN_COMPLETED, AUDIO_FLUSH_COMPLETED, AUDIO_RENDER_FULL,   AUDIO_ERROR_OCCUR } | 回调函数通知事件类型 | -| [AudioPortRole](#audioportrole){ AUDIO_PORT_UNASSIGNED_ROLE = 0, AUDIO_PORT_SOURCE_ROLE = 1, AUDIO_PORT_SINK_ROLE = 2 } | 音频端口角色 | -| [AudioPortType](#audioporttype){ AUDIO_PORT_UNASSIGNED_TYPE = 0, AUDIO_PORT_DEVICE_TYPE = 1, AUDIO_PORT_MIX_TYPE = 2, AUDIO_PORT_SESSION_TYPE = 3 } | 音频端口类型. | -| [AudioSessionType](#audiosessiontype){ AUDIO_OUTPUT_STAGE_SESSION = 0, AUDIO_OUTPUT_MIX_SESSION, AUDIO_ALLOCATE_SESSION, AUDIO_INVALID_SESSION } | 端口会话类型 | - - -### 函数 - - | 名称 | 描述 | -| -------- | -------- | -| [GetAudioManagerFuncs](#getaudiomanagerfuncs)(void) | 获取音频适配器管理接口的操作函数列表,详情参考[AudioManager](_audio_manager.md)。 | - - -### 变量 - - | 变量 名称 | 描述 | -| -------- | -------- | -| [AudioPort::dir](#dir) | 音频端口的类型。 | -| [AudioPort::portId](#portid-14) | 音频端口的ID。 | -| [AudioPort::portName](#portname) | 音频端口的名称。 | -| [AudioAdapterDescriptor::adapterName](#adaptername) | 音频适配器的名称。 | -| [AudioAdapterDescriptor::portNum](#portnum) | 一个音频适配器支持的端口数目。 | -| [AudioAdapterDescriptor::ports](#ports) | 一个音频适配器支持的端口列表。 | -| [AudioDeviceDescriptor::portId](#portid-24) | 音频端口ID。 | -| [AudioDeviceDescriptor::pins](#pins) | 音频端口上的PIN脚(输出、输入)。 | -| [AudioDeviceDescriptor::desc](#desc-15) | 以字符串命名的音频设备。 | -| [AudioSceneDescriptor::SceneDesc::id](#id) | 音频场景的ID。 | -| [AudioSceneDescriptor::SceneDesc::desc](#desc-35) | 以字符串命名的音频场景。 | -| [AudioSceneDescriptor::scene](#scene) | 音频场景的名称。 | -| [AudioSceneDescriptor::desc](#desc-25) | 音频设备描述符。 | -| [AudioSampleAttributes::type](#type-13) | 音频类型。 | -| [AudioSampleAttributes::interleaved](#interleaved) | 音频数据交织的标记。 | -| [AudioSampleAttributes::format](#format) | 音频数据格式。 | -| [AudioSampleAttributes::sampleRate](#samplerate) | 音频采样频率。 | -| [AudioSampleAttributes::channelCount](#channelcount-12) | 音频通道数目,如单通道(mono)为1、立体声(stereo)为2。 | -| [AudioSampleAttributes::period](#period) | 音频采样周期。 | -| [AudioSampleAttributes::frameSize](#framesize) | 音频数据的帧大小。 | -| [AudioSampleAttributes::isBigEndian](#isbigendian) | 音频数据的大端标志。 | -| [AudioSampleAttributes::isSignedData](#issigneddata) | 音频数据的有符号或无符号标志。 | -| [AudioSampleAttributes::startThreshold](#startthreshold) | 音频渲染开始阈值。 | -| [AudioSampleAttributes::stopThreshold](#stopthreshold) | 音频渲染停止阈值。 | -| [AudioSampleAttributes::silenceThreshold](#silencethreshold) | 音频捕获缓冲区阈值。 | -| [AudioSampleAttributes::streamId](#streamid-12) | 渲染或捕获的音频标识符。 | -| [AudioTimeStamp::tvSec](#tvsec) | tvSec时间,单位:秒。 | -| [AudioTimeStamp::tvNSec](#tvnsec) | tvNSec时间,单位:纳秒。 | -| [AudioSubPortCapability::portId](#portid-34) | 子端口ID。 | -| [AudioSubPortCapability::desc](#desc-45) | 以字符串命名的子端口。 | -| [AudioSubPortCapability::mask](#mask) | 数据透传模式。 | -| [AudioPortCapability::deviceType](#devicetype) | 设备输出、输入类型。 | -| [AudioPortCapability::deviceId](#deviceid) | 绑定(bind)设备ID,唯一的设备识别符。 | -| [AudioPortCapability::hardwareMode](#hardwaremode) | 是否支持设备绑定处理。 | -| [AudioPortCapability::formatNum](#formatnum) | 支持的音频格式数目。 | -| [AudioPortCapability::formats](#formats) | 支持的音频格式。 | -| [AudioPortCapability::sampleRateMasks](#sampleratemasks) | 支持的音频采样频率(8k、16k、32k、48k)。 | -| [AudioPortCapability::channelMasks](#channelmasks) | 设备的声道布局掩码(mask)。 | -| [AudioPortCapability::channelCount](#channelcount-22) | 支持的最大声道总数。 | -| [AudioPortCapability::subPortsNum](#subportsnum) | 支持的子端口数目(仅用于输出设备)。 | -| [AudioPortCapability::subPorts](#subports) | 支持的子端口列表。 | -| [AudioPortCapability::supportSampleFormatNum](#supportsampleformatnum) | 支持的音频样本格式数量。 | -| [AudioPortCapability::supportSampleFormats](#supportsampleformats) | 支持的音频样本格式。 | -| [AudioMmapBufferDescriptor::memoryAddress](#memoryaddress) | 指向mmap缓冲区的指针。 | -| [AudioMmapBufferDescriptor::memoryFd](#memoryfd) | mmap缓冲区的文件描述符。 | -| [AudioMmapBufferDescriptor::totalBufferFrames](#totalbufferframes) | 缓冲区总大小,单位:帧。 | -| [AudioMmapBufferDescriptor::transferFrameSize](#transferframesize) | 传输大小,单位:帧。 | -| [AudioMmapBufferDescriptor::isShareable](#isshareable) | mmap缓冲区是否可以在进程间共享。 | -| [AudioDevExtInfo::moduleId](#moduleid-12) | 音频流绑定的模块ID。 | -| [AudioDevExtInfo::type](#type-23) | 音频端口上的PIN脚(输出、输入)。 | -| [AudioDevExtInfo::desc](#desc-55) | 地址描述。 | -| [AudioMixExtInfo::moduleId](#moduleid-22) | 流所属模块标识符。 | -| [AudioMixExtInfo::streamId](#streamid-22) | 由调用者传递的Render或Capture标识符。 | -| [AudioSessionExtInfo::sessionType](#sessiontype) | 音频会话类型。 | -| [AudioRouteNode::portId](#portid-44) | 音频端口ID。 | -| [AudioRouteNode::role](#role) | 指定端口角色为sink或source。 | -| [AudioRouteNode::type](#type-33) | 指定端口类型。 | -| [AudioRouteNode::device](#device) | 设备特定信息。 | -| [AudioRouteNode::mix](#mix) | 音轨特定信息。 | -| [AudioRouteNode::session](#session) | 会话特定信息。 | -| [AudioRoute::sourcesNum](#sourcesnum) | 发送端节点数量。 | -| [AudioRoute::sources](#sources) | 发送端列表。 | -| [AudioRoute::sinksNum](#sinksnum) | 接受端节点数量。 | -| [AudioRoute::sinks](#sinks) | 接受端列表。 | - - -## **类型定义说明** - - -### RenderCallback - - -``` -typedef int32_t(* RenderCallback) (enum AudioCallbackType, void *reserved, void *cookie) -``` - -**描述:** - -回调函数指针。 - -**参数:** +| [AudioPortDirection](#audioportdirection) { PORT_OUT = 1 , PORT_IN = 2 , PORT_OUT_IN = 3 } | 音频端口的类型。 | +| [AudioPortPin](#audioportpin) {
PIN_NONE = 0 , PIN_OUT_SPEAKER = 1 , PIN_OUT_HEADSET = 2 , PIN_OUT_LINEOUT = 4 ,
PIN_OUT_HDMI = 8 , PIN_IN_MIC = 134217729 , PIN_IN_HS_MIC = 134217730 , PIN_IN_LINEIN = 134217732 ,
PIN_IN_USB_EXT = 134217736
} | 音频端口上的Pin脚。 | +| [AudioCategory](#audiocategory) { AUDIO_IN_MEDIA = 0 , AUDIO_IN_COMMUNICATION = 1 , AUDIO_IN_RINGTONE = 2 , AUDIO_IN_CALL = 3 } | 音频类型(场景)。 | +| [AudioFormat](#audioformat) {
AUDIO_FORMAT_PCM_8_BIT = 1 , AUDIO_FORMAT_PCM_16_BIT = 2 , AUDIO_FORMAT_PCM_24_BIT = 3 , AUDIO_FORMAT_PCM_32_BIT = 4 ,
AUDIO_FORMAT_AAC_MAIN = 16777217 , AUDIO_FORMAT_AAC_LC = 16777218 , AUDIO_FORMAT_AAC_LD = 16777219 , AUDIO_FORMAT_AAC_ELD = 16777220 ,
AUDIO_FORMAT_AAC_HE_V1 = 16777221 , AUDIO_FORMAT_AAC_HE_V2 = 16777222 , AUDIO_FORMAT_G711A = 33554433 , AUDIO_FORMAT_G711U = 33554434 ,
AUDIO_FORMAT_G726 = 33554435
} | 音频格式。 | +| [AudioChannelMask](#audiochannelmask) { AUDIO_CHANNEL_FRONT_LEFT = 1 , AUDIO_CHANNEL_FRONT_RIGHT = 2 , AUDIO_CHANNEL_MONO = 1 , AUDIO_CHANNEL_STEREO = 3 } | 音频通道掩码。 | +| [AudioSampleRatesMask](#audiosampleratesmask) {
AUDIO_SAMPLE_RATE_MASK_8000 = 1 << 0 , AUDIO_SAMPLE_RATE_MASK_12000 = 1 << 1 , AUDIO_SAMPLE_RATE_MASK_11025 = 1 << 2 , AUDIO_SAMPLE_RATE_MASK_16000 = 1 << 3 ,
AUDIO_SAMPLE_RATE_MASK_22050 = 1 << 4 , AUDIO_SAMPLE_RATE_MASK_24000 = 1 << 5 , AUDIO_SAMPLE_RATE_MASK_32000 = 1 << 6 , AUDIO_SAMPLE_RATE_MASK_44100 = 1 << 7 ,
AUDIO_SAMPLE_RATE_MASK_48000 = 1 << 8 , AUDIO_SAMPLE_RATE_MASK_64000 = 1 << 9 , AUDIO_SAMPLE_RATE_MASK_96000 = 1 << 10 , AUDIO_SAMPLE_RATE_MASK_INVALID = 4294967295
} | 音频采样频率掩码。 | +| [AudioPortPassthroughMode](#audioportpassthroughmode) { PORT_PASSTHROUGH_LPCM = 1 , PORT_PASSTHROUGH_RAW = 2 , PORT_PASSTHROUGH_HBR2LBR = 4 , PORT_PASSTHROUGH_AUTO = 8 } | 音频端口的数据透传模式。 | +| [AudioDeviceType](#audiodevicetype) {
AUDIO_LINEOUT = 1 << 0 , AUDIO_HEADPHONE = 1 << 1 , AUDIO_HEADSET = 1 << 2 , AUDIO_USB_HEADSET = 1 << 3 ,
AUDIO_USB_HEADPHONE = 1 << 4 , AUDIO_USBA_HEADSET = 1 << 5 , AUDIO_USBA_HEADPHONE = 1 << 6 , AUDIO_PRIMARY_DEVICE = 1 << 7 ,
AUDIO_USB_DEVICE = 1 << 8 , AUDIO_A2DP_DEVICE = 1 << 9 , AUDIO_DEVICE_UNKOWN
} | 音频设备类型。 | +| [AudioEventType](#audioeventtype) {
AUDIO_DEVICE_ADD = 1 , AUDIO_DEVICE_REMOVE = 2 , AUDIO_LOAD_SUCCESS = 3 , AUDIO_LOAD_FAILURE = 4 ,
AUDIO_UNLOAD = 5 , AUDIO_SERVICE_VALID = 7 , AUDIO_SERVICE_INVALID = 8 , AUDIO_CAPTURE_THRESHOLD = 9 ,
AUDIO_EVENT_UNKOWN = 10
} | 音频事件类型。 | +| [AudioExtParamKey](#audioextparamkey) {
AUDIO_EXT_PARAM_KEY_NONE = 0 , AUDIO_EXT_PARAM_KEY_VOLUME = 1 , AUDIO_EXT_PARAM_KEY_FOCUS = 2 , AUDIO_EXT_PARAM_KEY_BUTTON = 3 ,
AUDIO_EXT_PARAM_KEY_EFFECT = 4 , AUDIO_EXT_PARAM_KEY_STATUS = 5 , AUDIO_EXT_PARAM_KEY_LOWPOWER = 1000
} | 音频扩展参数键类型。 | +| [AudioSampleFormat](#audiosampleformat) {
AUDIO_SAMPLE_FORMAT_S8 = 0 , AUDIO_SAMPLE_FORMAT_S8P = 1 , AUDIO_SAMPLE_FORMAT_U8 = 2 , AUDIO_SAMPLE_FORMAT_U8P = 3 ,
AUDIO_SAMPLE_FORMAT_S16 = 4 , AUDIO_SAMPLE_FORMAT_S16P = 5 , AUDIO_SAMPLE_FORMAT_U16 = 6 , AUDIO_SAMPLE_FORMAT_U16P = 7 ,
AUDIO_SAMPLE_FORMAT_S24 = 8 , AUDIO_SAMPLE_FORMAT_S24P = 9 , AUDIO_SAMPLE_FORMAT_U24 = 10 , AUDIO_SAMPLE_FORMAT_U24P = 11 ,
AUDIO_SAMPLE_FORMAT_S32 = 12 , AUDIO_SAMPLE_FORMAT_S32P = 13 , AUDIO_SAMPLE_FORMAT_U32 = 14 , AUDIO_SAMPLE_FORMAT_U32P = 15 ,
AUDIO_SAMPLE_FORMAT_S64 = 16 , AUDIO_SAMPLE_FORMAT_S64P = 17 , AUDIO_SAMPLE_FORMAT_U64 = 18 , AUDIO_SAMPLE_FORMAT_U64P = 19 ,
AUDIO_SAMPLE_FORMAT_F32 = 20 , AUDIO_SAMPLE_FORMAT_F32P = 21 , AUDIO_SAMPLE_FORMAT_F64 = 22 , AUDIO_SAMPLE_FORMAT_F64P = 23
} | 原始音频样本格式。 | +| [AudioChannelMode](#audiochannelmode) {
AUDIO_CHANNEL_NORMAL = 0 , AUDIO_CHANNEL_BOTH_LEFT , AUDIO_CHANNEL_BOTH_RIGHT , AUDIO_CHANNEL_EXCHANGE ,
AUDIO_CHANNEL_MIX , AUDIO_CHANNEL_LEFT_MUTE , AUDIO_CHANNEL_RIGHT_MUTE , AUDIO_CHANNEL_BOTH_MUTE
} | 音频播放的通道模式。 | +| [AudioDrainNotifyType](#audiodrainnotifytype) { AUDIO_DRAIN_NORMAL_MODE , AUDIO_DRAIN_EARLY_MODE } | 音频数据结束类型。 | +| [AudioCallbackType](#audiocallbacktype) {
AUDIO_NONBLOCK_WRITE_COMPELETED , AUDIO_DRAIN_COMPELETED , AUDIO_FLUSH_COMPLETED , AUDIO_RENDER_FULL ,
AUDIO_ERROR_OCCUR
} | 回调函数通知事件类型。 | +| [AudioPortRole](#audioportrole) { AUDIO_PORT_UNASSIGNED_ROLE = 0 , AUDIO_PORT_SOURCE_ROLE = 1 , AUDIO_PORT_SINK_ROLE = 2 } | 音频端口角色。 | +| [AudioPortType](#audioporttype) { AUDIO_PORT_UNASSIGNED_TYPE = 0 , AUDIO_PORT_DEVICE_TYPE = 1 , AUDIO_PORT_MIX_TYPE = 2 , AUDIO_PORT_SESSION_TYPE = 3 } | 音频端口类型。 | +| [AudioSessionType](#audiosessiontype) { AUDIO_OUTPUT_STAGE_SESSION = 0 , AUDIO_OUTPUT_MIX_SESSION , AUDIO_ALLOCATE_SESSION , AUDIO_INVALID_SESSION } | 端口会话类型。 | + + +### 关键字 | 名称 | 描述 | | -------- | -------- | -| AudioCallbackType | 回调函数响应类型 | -| reserved | 保留字段 | -| cookie | 用于传递数据 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** +| package ohos.hdi.audio.v1_0 | 音频接口的包路径。 | -[RegCallback](_audio_render.md#regcallback) - -## **枚举类型说明** +## 枚举类型说明 ### AudioCallbackType - + ``` enum AudioCallbackType ``` @@ -215,56 +106,56 @@ enum AudioCallbackType | 枚举值 | 描述 | | -------- | -------- | -| AUDIO_NONBLOCK_WRITE_COMPLETED | 非阻塞式写完成 | -| AUDIO_DRAIN_COMPLETED | DrainBuffer完成 | -| AUDIO_FLUSH_COMPLETED | Flush完成 | -| AUDIO_RENDER_FULL | Render缓冲区已满 | -| AUDIO_ERROR_OCCUR | 发生了错误 | +| AUDIO_NONBLOCK_WRITE_COMPELETED | 非阻塞式写完成。 | +| AUDIO_DRAIN_COMPELETED | DrainBuffer完成,详情参考[DrainBuffer()](interface_i_audio_render.md#drainbuffer)。 | +| AUDIO_FLUSH_COMPLETED | Flush完成,详情参考[Flush()](interface_i_audio_capture.md#flush)。 | +| AUDIO_RENDER_FULL | 录音缓冲区已满。 | +| AUDIO_ERROR_OCCUR | 发生了错误。 | ### AudioCategory - + ``` enum AudioCategory ``` **描述:** -音频类型(category)。 +音频类型(场景)。 | 枚举值 | 描述 | | -------- | -------- | -| AUDIO_IN_MEDIA | 媒体 | -| AUDIO_IN_COMMUNICATION | 通信 | -| AUDIO_IN_RINGTONE | 铃声 | -| AUDIO_IN_CALL | 呼叫 | +| AUDIO_IN_MEDIA | 媒体。 | +| AUDIO_IN_COMMUNICATION | 通信。 | +| AUDIO_IN_RINGTONE | 电话铃声。 | +| AUDIO_IN_CALL | 呼叫。 | ### AudioChannelMask - + ``` enum AudioChannelMask ``` **描述:** -音频通道掩码(mask)。 +音频通道掩码。 -定义音频声道的位置。 +定义音频声道的位置掩码。 | 枚举值 | 描述 | | -------- | -------- | -| AUDIO_CHANNEL_FRONT_LEFT | 声道布局前左 | -| AUDIO_CHANNEL_FRONT_RIGHT | 声道布局前右 | -| AUDIO_CHANNEL_MONO | 单声道 | -| AUDIO_CHANNEL_STEREO | 立体声,由左右声道组成(FRONT_LEFT \| FRONT_RIGHT) | +| AUDIO_CHANNEL_FRONT_LEFT | 声道布局前左。 | +| AUDIO_CHANNEL_FRONT_RIGHT | 声道布局前右。 | +| AUDIO_CHANNEL_MONO | 单声道。 | +| AUDIO_CHANNEL_STEREO | 立体声,由左右声道组成。 | ### AudioChannelMode - + ``` enum AudioChannelMode ``` @@ -279,1031 +170,311 @@ enum AudioChannelMode | 枚举值 | 描述 | | -------- | -------- | -| AUDIO_CHANNEL_NORMAL | 正常模式,不做处理 | -| AUDIO_CHANNEL_BOTH_LEFT | 两个声道全部为左声道声音 | -| AUDIO_CHANNEL_BOTH_RIGHT | 两个声道全部为右声道声音 | -| AUDIO_CHANNEL_EXCHANGE | 左右声道数据互换,左声道为右声道声音,右声道为左声道声音 | -| AUDIO_CHANNEL_MIX | 左右两个声道输出为左右声道相加(混音) | -| AUDIO_CHANNEL_LEFT_MUTE | 左声道静音,右声道播放原右声道声音 | -| AUDIO_CHANNEL_RIGHT_MUTE | 右声道静音,左声道播放原左声道声音 | -| AUDIO_CHANNEL_BOTH_MUTE | 左右声道均静音 | - - -### AudioDrainNotifyType - - -``` -enum AudioDrainNotifyType -``` +| AUDIO_CHANNEL_NORMAL | 正常模式,不做处理。 | +| AUDIO_CHANNEL_BOTH_LEFT | 两个声道全部为左声道声音。 | +| AUDIO_CHANNEL_BOTH_RIGHT | 两个声道全部为右声道声音。 | +| AUDIO_CHANNEL_EXCHANGE | 左右声道数据互换,左声道为右声道声音,右声道为左声道声音。 | +| AUDIO_CHANNEL_MIX | 左右两个声道输出为左右声道相加(混音)。 | +| AUDIO_CHANNEL_LEFT_MUTE | 左声道静音,右声道播放原右声道声音。 | +| AUDIO_CHANNEL_RIGHT_MUTE | 右声道静音,左声道播放原左声道声音。 | +| AUDIO_CHANNEL_BOTH_MUTE | 左右声道均静音。 | -**描述:** - -DrainBuffer函数结束类型。 - - | 枚举值 | 描述 | -| -------- | -------- | -| AUDIO_DRAIN_NORMAL_MODE | DrainBuffer在所有数据播放结束后返回 | -| AUDIO_DRAIN_EARLY_MODE | DrainBuffer()在当前曲目的所有数据播放完之前返回,以便留出时间给音频服务做连续性曲目切换 | +### AudioDeviceType -### AudioFormat - ``` -enum AudioFormat +enum AudioDeviceType ``` **描述:** -音频格式。 +音频设备类型。 | 枚举值 | 描述 | | -------- | -------- | -| AUDIO_FORMAT_PCM_8_BIT | 8bit位宽pcm格式 | -| AUDIO_FORMAT_PCM_16_BIT | 16bit位宽pcm格式 | -| AUDIO_FORMAT_PCM_24_BIT | 24bit位宽pcm格式 | -| AUDIO_FORMAT_PCM_32_BIT | 32bit位宽pcm格式 | -| AUDIO_FORMAT_AAC_MAIN | AAC MAIN格式 | -| AUDIO_FORMAT_AAC_LC | AAC LC格式 | -| AUDIO_FORMAT_AAC_LD | AAC LD格式 | -| AUDIO_FORMAT_AAC_ELD | AAC ELD格式 | -| AUDIO_FORMAT_AAC_HE_V1 | AAC HE_V1格式 | -| AUDIO_FORMAT_AAC_HE_V2 | AAC HE_V2格式 | -| AUDIO_FORMAT_G711A | G711A格式 | -| AUDIO_FORMAT_G711U | G711u格式 | -| AUDIO_FORMAT_G726 | G726格式 | - - -### AudioPortDirection - - -``` -enum AudioPortDirection -``` - -**描述:** - -音频端口的类型。 +| AUDIO_LINEOUT | LINEOUT设备。 | +| AUDIO_HEADPHONE | 耳机。 | +| AUDIO_HEADSET | 头戴式耳机。 | +| AUDIO_USB_HEADSET | USB头戴式耳机。 | +| AUDIO_USB_HEADPHONE | USB耳机。 | +| AUDIO_USBA_HEADSET | USB模拟头戴式耳机。 | +| AUDIO_USBA_HEADPHONE | USB模拟耳机。 | +| AUDIO_PRIMARY_DEVICE | 主音频设备。 | +| AUDIO_USB_DEVICE | USB音频设备。 | +| AUDIO_A2DP_DEVICE | 蓝牙音频设备。 | +| AUDIO_DEVICE_UNKOWN | 未知设备。 | - | 枚举值 | 描述 | -| -------- | -------- | -| PORT_OUT | 音频输出端口 | -| PORT_IN | 音频输入端口 | -| PORT_OUT_IN | 音频输出/入端口, 同时支持输出和输入能力(OUT \| IN) | +### AudioDrainNotifyType -### AudioPortPassthroughMode - ``` -enum AudioPortPassthroughMode +enum AudioDrainNotifyType ``` **描述:** -音频端口的数据透传模式。 +音频数据结束类型。 | 枚举值 | 描述 | | -------- | -------- | -| PORT_PASSTHROUGH_LPCM | 立体声pcm | -| PORT_PASSTHROUGH_RAW | HDMI透传 | -| PORT_PASSTHROUGH_HBR2LBR | 蓝光次世代音频降规格输出 | -| PORT_PASSTHROUGH_AUTO | 根据HDMI EDID能力自动匹配 | - - -### AudioPortPin - - -``` -enum AudioPortPin -``` - -**描述:** - -音频适配器端口的PIN脚。 +| AUDIO_DRAIN_NORMAL_MODE | 曲目的所有数据播放完就结束。 | +| AUDIO_DRAIN_EARLY_MODE | 曲目的所有数据未播放完就结束,以便给音频服务做连续性曲目切换留出时间。 | - | 枚举值 | 描述 | -| -------- | -------- | -| PIN_NONE | 无效PIN | -| PIN_OUT_SPEAKER | 喇叭输出 | -| PIN_OUT_HEADSET | 有线耳机输出 | -| PIN_OUT_LINEOUT | Lineout输出 | -| PIN_OUT_HDMI | HDMI输出 | -| PIN_OUT_USB | USB设备输出 | -| PIN_OUT_USB_EXT | 扩展 USB 设备输出 | -| PIN_IN_MIC | Mic输入 | -| PIN_IN_HS_MIC | 有线耳机Mic输入 | -| PIN_IN_LINEIN | Linein输入 | -| PIN_IN_USB_EXT | 扩展 USB 设备输入 | +### AudioEventType -### AudioPortRole - ``` -enum AudioPortRole +enum AudioEventType ``` **描述:** -音频端口角色。 +音频事件类型。 | 枚举值 | 描述 | | -------- | -------- | -| AUDIO_PORT_UNASSIGNED_ROLE | 未指定端口角色 | -| AUDIO_PORT_SOURCE_ROLE | 指定端口为发送端角色 | -| AUDIO_PORT_SINK_ROLE | 指定端口为接受端角色 | - - -### AudioPortType - - -``` -enum AudioPortType -``` +| AUDIO_DEVICE_ADD | 音频设备添加。 | +| AUDIO_DEVICE_REMOVE | 音频设备移除。 | +| AUDIO_LOAD_SUCCESS | 声卡加载成功。 | +| AUDIO_LOAD_FAILURE | 声卡加载失败。 | +| AUDIO_UNLOAD | 声卡卸载。 | +| AUDIO_SERVICE_VALID | 音频服务可用。 | +| AUDIO_SERVICE_INVALID | 音频服务不可用。 | +| AUDIO_CAPTURE_THRESHOLD | 录音阈值上报。 | +| AUDIO_EVENT_UNKOWN | 未知事件。 | -**描述:** - -音频端口类型。 - - | 枚举值 | 描述 | -| -------- | -------- | -| AUDIO_PORT_UNASSIGNED_TYPE | 未指定端口类型 | -| AUDIO_PORT_DEVICE_TYPE | 指定端口为设备类型 | -| AUDIO_PORT_MIX_TYPE | 指定端口类型为复合类型 | -| AUDIO_PORT_SESSION_TYPE | 指定端口为会话类型 | +### AudioExtParamKey -### AudioSampleFormat - ``` -enum AudioSampleFormat +enum AudioExtParamKey ``` **描述:** -原始音频样本格式。 +音频扩展参数键类型。 | 枚举值 | 描述 | | -------- | -------- | -| AUDIO_SAMPLE_FORMAT_S8 | 8bit位宽有符号交织样本 | -| AUDIO_SAMPLE_FORMAT_S8P | 8bit位宽有符号非交织样本 | -| AUDIO_SAMPLE_FORMAT_U8 | 8bit位宽无符号交织样本 | -| AUDIO_SAMPLE_FORMAT_U8P | 8bit位宽无符号非交织样本 | -| AUDIO_SAMPLE_FORMAT_S16 | 16bit位宽有符号交织样本 | -| AUDIO_SAMPLE_FORMAT_S16P | 16bit位宽有符号非交织样本 | -| AUDIO_SAMPLE_FORMAT_U16 | 16bit位宽无符号交织样本 | -| AUDIO_SAMPLE_FORMAT_U16P | 16bit位宽无符号非交织样本 | -| AUDIO_SAMPLE_FORMAT_S24 | 24bit位宽有符号交织样本 | -| AUDIO_SAMPLE_FORMAT_S24P | 24bit位宽有符号非交织样本 | -| AUDIO_SAMPLE_FORMAT_U24 | 24bit位宽无符号交织样本 | -| AUDIO_SAMPLE_FORMAT_U24P | 24bit位宽无符号非交织样本 | -| AUDIO_SAMPLE_FORMAT_S32 | 32bit位宽有符号交织样本 | -| AUDIO_SAMPLE_FORMAT_S32P | 32bit位宽有符号非交织样本 | -| AUDIO_SAMPLE_FORMAT_U32 | 32bit位宽无符号交织样本 | -| AUDIO_SAMPLE_FORMAT_U32P | 32bit位宽无符号非交织样本 | -| AUDIO_SAMPLE_FORMAT_S64 | 64bit位宽有符号交织样本 | -| AUDIO_SAMPLE_FORMAT_S64P | 64bit位宽有符号非交织样本 | -| AUDIO_SAMPLE_FORMAT_U64 | 64bit位宽无符号交织样本 | -| AUDIO_SAMPLE_FORMAT_U64P | 64bit位宽无符号非交织样本 | -| AUDIO_SAMPLE_FORMAT_F32 | 32bit位宽浮点型交织样本 | -| AUDIO_SAMPLE_FORMAT_F32P | 64bit位宽浮点型非交织样本 | -| AUDIO_SAMPLE_FORMAT_F64 | 64bit位宽双精度浮点型交织样本 | -| AUDIO_SAMPLE_FORMAT_F64P | 64bit位宽双精度浮点型非交织样本 | - - -### AudioSampleRatesMask - - -``` -enum AudioSampleRatesMask -``` +| AUDIO_EXT_PARAM_KEY_NONE | 分布式音频-无效事件。 | +| AUDIO_EXT_PARAM_KEY_VOLUME | 分布式音频-音量事件。 | +| AUDIO_EXT_PARAM_KEY_FOCUS | 分布式音频-焦点事件。 | +| AUDIO_EXT_PARAM_KEY_BUTTON | 分布式音频-媒体按钮事件。 | +| AUDIO_EXT_PARAM_KEY_EFFECT | 分布式音频-音频效果事件。 | +| AUDIO_EXT_PARAM_KEY_STATUS | 分布式音频-设备状态事件。 | +| AUDIO_EXT_PARAM_KEY_LOWPOWER | 低电量事件。 | -**描述:** - -音频采样频率MASK。 - - | 枚举值 | 描述 | -| -------- | -------- | -| AUDIO_SAMPLE_RATE_MASK_8000 | 8K 采样频率 | -| AUDIO_SAMPLE_RATE_MASK_12000 | 12K 采样频率 | -| AUDIO_SAMPLE_RATE_MASK_11025 | 11.025K 采样频率 | -| AUDIO_SAMPLE_RATE_MASK_16000 | 16K 采样频率 | -| AUDIO_SAMPLE_RATE_MASK_22050 | 22.050K 采样频率 | -| AUDIO_SAMPLE_RATE_MASK_24000 | 24K 采样频率 | -| AUDIO_SAMPLE_RATE_MASK_32000 | 32K 采样频率 | -| AUDIO_SAMPLE_RATE_MASK_44100 | 44.1K 采样频率 | -| AUDIO_SAMPLE_RATE_MASK_48000 | 48K 采样频率 | -| AUDIO_SAMPLE_RATE_MASK_64000 | 64K 采样频率 | -| AUDIO_SAMPLE_RATE_MASK_96000 | 96K 采样频率 | -| AUDIO_SAMPLE_RATE_MASK_INVALID | 无效的采样频率 | +### AudioFormat -### AudioSessionType - ``` -enum AudioSessionType +enum AudioFormat ``` **描述:** -端口会话类型。 +音频格式。 | 枚举值 | 描述 | | -------- | -------- | -| AUDIO_OUTPUT_STAGE_SESSION | 会话绑定到指定输出流 | -| AUDIO_OUTPUT_MIX_SESSION | 会话绑定到特定音轨 | -| AUDIO_ALLOCATE_SESSION | 会话ID需重新申请 | -| AUDIO_INVALID_SESSION | 无效会话类型 | - - -## **函数说明** - - -### GetAudioManagerFuncs() - - -``` -struct AudioManager* GetAudioManagerFuncs (void ) -``` - -**描述:** - -获取音频适配器管理接口的操作函数列表,详情参考[AudioManager](_audio_manager.md)。 - -**返回:** - -成功返回一个音频适配器管理接口的对象,失败返回NULL。 - - -## **变量说明** - - -### adapterName - - -``` -const char* AudioAdapterDescriptor::adapterName -``` - -**描述:** +| AUDIO_FORMAT_PCM_8_BIT | 8bit位宽PCM(Pulse Code Modulation)格式。 | +| AUDIO_FORMAT_PCM_16_BIT | 16bit位宽PCM格式。 | +| AUDIO_FORMAT_PCM_24_BIT | 24bit位宽PCM格式。 | +| AUDIO_FORMAT_PCM_32_BIT | 32bit位宽PCM格式。 | +| AUDIO_FORMAT_AAC_MAIN | AAC(Advanced Audio Coding) MAIN格式。 | +| AUDIO_FORMAT_AAC_LC | AAC LC格式。 | +| AUDIO_FORMAT_AAC_LD | AAC LD格式。 | +| AUDIO_FORMAT_AAC_ELD | AAC ELD格式。 | +| AUDIO_FORMAT_AAC_HE_V1 | AAC HE_V1格式。 | +| AUDIO_FORMAT_AAC_HE_V2 | AAC HE_V2格式。 | +| AUDIO_FORMAT_G711A | PCM G711A格式。 | +| AUDIO_FORMAT_G711U | PCM G711u格式。 | +| AUDIO_FORMAT_G726 | PCM G726格式。 | -音频适配器的名称 - - -### channelCount [1/2] - - -``` -uint32_t AudioSampleAttributes::channelCount -``` - -**描述:** - -音频通道数目,如单通道(mono)为1、立体声(stereo)为2。 - - -### channelCount [2/2] - - -``` -unsigned int AudioPortCapability::channelCount -``` - -**描述:** - -支持的最大声道总数 - - -### channelMasks - - -``` -enum AudioChannelMask AudioPortCapability::channelMasks -``` - -**描述:** - -设备的声道布局掩码(mask),详情参考[AudioChannelMask](#audiochannelmask)。 - - -### desc [1/5] - - -``` -const char* AudioDeviceDescriptor::desc -``` - -**描述:** - -以字符串命名的音频设备 - - -### desc [2/5] - - -``` -struct AudioDeviceDescriptor AudioSceneDescriptor::desc -``` - -**描述:** - -音频设备描述符 - - -### desc [3/5] - - -``` -const char* AudioSceneDescriptor::SceneDesc::desc -``` - -**描述:** - -以字符串命名的音频场景 +### AudioPortDirection -### desc [4/5] - ``` -const char* AudioSubPortCapability::desc +enum AudioPortDirection ``` **描述:** -以字符串命名的子端口 - - -### desc [5/5] - - -``` -const char* AudioDevExtInfo::desc -``` +音频端口的类型。 -**描述:** + | 枚举值 | 描述 | +| -------- | -------- | +| PORT_OUT | 音频输出端口。 | +| PORT_IN | 音频输入端口。 | +| PORT_OUT_IN | 音频输出输入端口。 | -地址描述 +### AudioPortPassthroughMode -### device - ``` -struct AudioDevExtInfo AudioRouteNode::ext::device +enum AudioPortPassthroughMode ``` **描述:** -设备特定信息。 - - -### deviceId - - -``` -unsigned int AudioPortCapability::deviceId -``` +音频端口的数据透传模式。 -**描述:** + | 枚举值 | 描述 | +| -------- | -------- | +| PORT_PASSTHROUGH_LPCM | 立体声PCM。 | +| PORT_PASSTHROUGH_RAW | HDMI透传。 | +| PORT_PASSTHROUGH_HBR2LBR | 蓝光次世代音频降规格输出。 | +| PORT_PASSTHROUGH_AUTO | 根据HDMI EDID能力自动匹配。 | -绑定(bind)设备ID,唯一的设备识别符。 +### AudioPortPin -### deviceType - ``` -unsigned int AudioPortCapability::deviceType +enum AudioPortPin ``` **描述:** -设备输出、输入类型。 +音频端口上的Pin脚。 + | 枚举值 | 描述 | +| -------- | -------- | +| PIN_NONE | 无效端口。 | +| PIN_OUT_SPEAKER | 喇叭输出。 | +| PIN_OUT_HEADSET | 有线耳机输出。 | +| PIN_OUT_LINEOUT | Lineout输出。 | +| PIN_OUT_HDMI | HDMI输出。 | +| PIN_IN_MIC | 麦克风输入。 | +| PIN_IN_HS_MIC | 有线耳机麦克风输入。 | +| PIN_IN_LINEIN | Linein输入。 | +| PIN_IN_USB_EXT | USB外部声卡输出。 | -### dir - - -``` -enum AudioPortDirection AudioPort::dir -``` - -**描述:** - -音频端口的类型,详情参考[AudioPortDirection](#audioportdirection)。 +### AudioPortRole -### format - ``` -enum AudioFormat AudioSampleAttributes::format +enum AudioPortRole ``` **描述:** -音频数据格式,详情参考[AudioFormat](#audioformat)。 - - -### formatNum - - -``` -unsigned int AudioPortCapability::formatNum -``` +音频端口角色。 -**描述:** + | 枚举值 | 描述 | +| -------- | -------- | +| AUDIO_PORT_UNASSIGNED_ROLE | 未指定端口角色。 | +| AUDIO_PORT_SOURCE_ROLE | 指定端口为发送端角色。 | +| AUDIO_PORT_SINK_ROLE | 指定端口为接受端角色。 | -支持的音频格式数目 +### AudioPortType -### formats - ``` -enum AudioFormat* AudioPortCapability::formats +enum AudioPortType ``` **描述:** -支持的音频格式,详情参考[AudioFormat](#audioformat)。 - - -### frameSize - - -``` -uint32_t AudioSampleAttributes::frameSize -``` +音频端口类型。 -**描述:** + | 枚举值 | 描述 | +| -------- | -------- | +| AUDIO_PORT_UNASSIGNED_TYPE | 未指定端口类型。 | +| AUDIO_PORT_DEVICE_TYPE | 指定端口为设备类型。 | +| AUDIO_PORT_MIX_TYPE | 指定端口为复合类型。 | +| AUDIO_PORT_SESSION_TYPE | 指定端口为会话类型。 | -音频数据的帧大小 +### AudioSampleFormat -### hardwareMode - ``` -bool AudioPortCapability::hardwareMode +enum AudioSampleFormat ``` **描述:** -是否支持设备绑定处理 - - -### id - - -``` -unsigned int AudioSceneDescriptor::SceneDesc::id -``` +原始音频样本格式。 -**描述:** +| 枚举值 | 描述 | +| -------- | -------- | +| AUDIO_SAMPLE_FORMAT_S8 | 8bit位宽有符号交织样本。 | +| AUDIO_SAMPLE_FORMAT_S8P | 8bit位宽有符号非交织样本。 | +| AUDIO_SAMPLE_FORMAT_U8 | 8bit位宽无符号交织样本。 | +| AUDIO_SAMPLE_FORMAT_U8P | 8bit位宽无符号非交织样本。 | +| AUDIO_SAMPLE_FORMAT_S16 | 16bit位宽有符号交织样本。 | +| AUDIO_SAMPLE_FORMAT_S16P | 16bit位宽有符号非交织样本。 | +| AUDIO_SAMPLE_FORMAT_U16 | 16bit位宽无符号交织样本。 | +| AUDIO_SAMPLE_FORMAT_U16P | 16bit位宽无符号非交织样本。 | +| AUDIO_SAMPLE_FORMAT_S24 | 24bit位宽有符号交织样本。 | +| AUDIO_SAMPLE_FORMAT_S24P | 24bit位宽有符号非交织样本。 | +| AUDIO_SAMPLE_FORMAT_U24 | 24bit位宽无符号交织样本。 | +| AUDIO_SAMPLE_FORMAT_U24P | 24bit位宽无符号非交织样本。 | +| AUDIO_SAMPLE_FORMAT_S32 | 32bit位宽有符号交织样本。 | +| AUDIO_SAMPLE_FORMAT_S32P | 32bit位宽有符号非交织样本。 | +| AUDIO_SAMPLE_FORMAT_U32 | 32bit位宽无符号交织样本。 | +| AUDIO_SAMPLE_FORMAT_U32P | 32bit位宽无符号非交织样本。 | +| AUDIO_SAMPLE_FORMAT_S64 | 64bit位宽有符号交织样本。 | +| AUDIO_SAMPLE_FORMAT_S64P | 64bit位宽有符号非交织样本。 | +| AUDIO_SAMPLE_FORMAT_U64 | 64bit位宽无符号交织样本。 | +| AUDIO_SAMPLE_FORMAT_U64P | 64bit位宽无符号非交织样本。 | +| AUDIO_SAMPLE_FORMAT_F32 | 32bit位宽浮点型交织样本。 | +| AUDIO_SAMPLE_FORMAT_F32P | 64bit位宽浮点型非交织样本。 | +| AUDIO_SAMPLE_FORMAT_F64 | 64bit位宽双精度浮点型交织样本。 | +| AUDIO_SAMPLE_FORMAT_F64P | 64bit位宽双精度浮点型非交织样本。 | -音频场景的ID +### AudioSampleRatesMask -### interleaved - ``` -bool AudioSampleAttributes::interleaved +enum AudioSampleRatesMask ``` **描述:** -音频数据交织的标记 - - -### isBigEndian +音频采样频率掩码。 - -``` -bool AudioSampleAttributes::isBigEndian -``` - -**描述:** + | 枚举值 | 描述 | +| -------- | -------- | +| AUDIO_SAMPLE_RATE_MASK_8000 | 8K 采样频率。 | +| AUDIO_SAMPLE_RATE_MASK_12000 | 12K 采样频率。 | +| AUDIO_SAMPLE_RATE_MASK_11025 | 11.025K 采样频率。 | +| AUDIO_SAMPLE_RATE_MASK_16000 | 16K 采样频率。 | +| AUDIO_SAMPLE_RATE_MASK_22050 | 22.050K 采样频率。 | +| AUDIO_SAMPLE_RATE_MASK_24000 | 24K 采样频率。 | +| AUDIO_SAMPLE_RATE_MASK_32000 | 32K 采样频率。 | +| AUDIO_SAMPLE_RATE_MASK_44100 | 44.1K 采样频率。 | +| AUDIO_SAMPLE_RATE_MASK_48000 | 48K 采样频率。 | +| AUDIO_SAMPLE_RATE_MASK_64000 | 64K 采样频率。 | +| AUDIO_SAMPLE_RATE_MASK_96000 | 96K 采样频率。 | +| AUDIO_SAMPLE_RATE_MASK_INVALID | 无效的采样频率。 | -音频数据的大端标志 +### AudioSessionType -### isShareable - ``` -int32_t AudioMmapBufferDescriptor::isShareable +enum AudioSessionType ``` **描述:** -mmap缓冲区是否可以在进程间共享 - - -### isSignedData +端口会话类型。 - -``` -bool AudioSampleAttributes::isSignedData -``` - -**描述:** - -音频数据的有符号或无符号标志 - - -### mask - - -``` -enum AudioPortPassthroughMode AudioSubPortCapability::mask -``` - -**描述:** - -数据透传模式,详情参考[AudioPortPassthroughMode](#audioportpassthroughmode)。 - - -### memoryAddress - - -``` -void* AudioMmapBufferDescriptor::memoryAddress -``` - -**描述:** - -指向mmap缓冲区的指针 - - -### memoryFd - - -``` -int32_t AudioMmapBufferDescriptor::memoryFd -``` - -**描述:** - -mmap缓冲区的文件描述符 - - -### mix - - -``` -struct AudioMixExtInfo AudioRouteNode::ext::mix -``` - -**描述:** - -音轨特定信息。 - - -### moduleId [1/2] - - -``` -int32_t AudioDevExtInfo::moduleId -``` - -**描述:** - -音频流绑定的模块ID - - -### moduleId [2/2] - - -``` -int32_t AudioMixExtInfo::moduleId -``` - -**描述:** - -流所属模块标识符 - - -### period - - -``` -uint32_t AudioSampleAttributes::period -``` - -**描述:** - -音频采样周期 - - -### pins - - -``` -enum AudioPortPin AudioDeviceDescriptor::pins -``` - -**描述:** - -音频端口上的PIN脚(输出、输入),详情参考[AudioPortPin](#audioportpin)。 - - -### portId [1/4] - - -``` -unsigned int AudioPort::portId -``` - -**描述:** - -音频端口的ID - - -### portId [2/4] - - -``` -unsigned int AudioDeviceDescriptor::portId -``` - -**描述:** - -音频端口ID - - -### portId [3/4] - - -``` -unsigned int AudioSubPortCapability::portId -``` - -**描述:** - -子端口ID - - -### portId [4/4] - - -``` -int32_t AudioRouteNode::portId -``` - -**描述:** - -音频端口ID - - -### portName - - -``` -const char* AudioPort::portName -``` - -**描述:** - -音频端口的名称 - - -### portNum - - -``` -unsigned int AudioAdapterDescriptor::portNum -``` - -**描述:** - -一个音频适配器支持的端口数目 - - -### ports - - -``` -struct AudioPort* AudioAdapterDescriptor::ports -``` - -**描述:** - -一个音频适配器支持的端口列表 - - -### role - - -``` -enum AudioPortRole AudioRouteNode::role -``` - -**描述:** - -指定端口角色为sink或source - - -### sampleRate - - -``` -unsigned int AudioSampleAttributes::sampleRate -``` - -**描述:** - -音频采样频率 - - -### sampleRateMasks - - -``` -unsigned int AudioPortCapability::sampleRateMasks -``` - -**描述:** - -支持的音频采样频率(8k、16k、32k、48k) - - -### scene - - -``` -union AudioSceneDescriptor::SceneDesc AudioSceneDescriptor::scene -``` - -**描述:** - -音频场景的名称 - - -### session - - -``` -struct AudioSessionExtInfo AudioRouteNode::ext::session -``` - -**描述:** - -会话特定信息。 - - -### sessionType - - -``` -enum AudioSessionType AudioSessionExtInfo::sessionType -``` - -**描述:** - -音频会话类型 - - -### silenceThreshold - - -``` -uint32_t AudioSampleAttributes::silenceThreshold -``` - -**描述:** - -音频捕获缓冲区阈值 - - -### sinks - - -``` -const struct AudioRouteNode* AudioRoute::sinks -``` - -**描述:** - -接受端列表 - - -### sinksNum - - -``` -uint32_t AudioRoute::sinksNum -``` - -**描述:** - -接受端节点数量 - - -### sources - - -``` -const struct AudioRouteNode* AudioRoute::sources -``` - -**描述:** - -发送端列表 - - -### sourcesNum - - -``` -uint32_t AudioRoute::sourcesNum -``` - -**描述:** - -发送端节点数量 - - -### startThreshold - - -``` -uint32_t AudioSampleAttributes::startThreshold -``` - -**描述:** - -音频渲染开始阈值 - - -### stopThreshold - - -``` -uint32_t AudioSampleAttributes::stopThreshold -``` - -**描述:** - -音频渲染停止阈值 - - -### streamId [1/2] - - -``` -int32_t AudioSampleAttributes::streamId -``` - -**描述:** - -渲染或捕获的音频标识符 - - -### streamId [2/2] - - -``` -int32_t AudioMixExtInfo::streamId -``` - -**描述:** - -由调用者传递的Render或Capture标识符 - - -### subPorts - - -``` -struct AudioSubPortCapability* AudioPortCapability::subPorts -``` - -**描述:** - -支持的子端口列表 - - -### subPortsNum - - -``` -unsigned int AudioPortCapability::subPortsNum -``` - -**描述:** - -支持的子端口数目(仅用于输出设备) - - -### supportSampleFormatNum - - -``` -uint32_t AudioPortCapability::supportSampleFormatNum -``` - -**描述:** - -支持的音频样本格式数量 - - -### supportSampleFormats - - -``` -enum AudioSampleFormat* AudioPortCapability::supportSampleFormats -``` - -**描述:** - -支持的音频样本格式,详请参考[AudioSampleFormat](#audiosampleformat)。 - - -### totalBufferFrames - - -``` -int32_t AudioMmapBufferDescriptor::totalBufferFrames -``` - -**描述:** - -缓冲区总大小,单位:帧。 - - -### transferFrameSize - - -``` -int32_t AudioMmapBufferDescriptor::transferFrameSize -``` - -**描述:** - -传输大小,单位:帧。 - - -### tvNSec - - -``` -int64_t AudioTimeStamp::tvNSec -``` - -**描述:** - -tvNSec时间,单位:纳秒。 - - -### tvSec - - -``` -int64_t AudioTimeStamp::tvSec -``` - -**描述:** - -tvSec时间,单位:秒。 - - -### type [1/3] - - -``` -enum AudioCategory AudioSampleAttributes::type -``` - -**描述:** - -音频类型,详情参考[AudioCategory](#audiocategory)。 - - -### type [2/3] - - -``` -enum AudioPortPin AudioDevExtInfo::type -``` - -**描述:** - -音频端口上的PIN脚(输出、输入),详情参考[AudioPortPin](#audioportpin)。 - - -### type [3/3] - - -``` -enum AudioPortType AudioRouteNode::type -``` - -**描述:** - -指定端口类型为device, mix等。 + | 枚举值 | 描述 | +| -------- | -------- | +| AUDIO_OUTPUT_STAGE_SESSION | 会话绑定到指定输出流。 | +| AUDIO_OUTPUT_MIX_SESSION | 会话绑定到特定音轨。 | +| AUDIO_ALLOCATE_SESSION | 会话ID需重新申请。 | +| AUDIO_INVALID_SESSION | 无效会话类型。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_adapter.md b/zh-cn/device-dev/reference/hdi-apis/_audio_adapter.md deleted file mode 100644 index 21b6213df6b8046579946e9992314dadd360fa22..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_adapter.md +++ /dev/null @@ -1,327 +0,0 @@ -# AudioAdapter - - -## **概述** - -AudioAdapter音频适配器接口。 - -提供音频适配器(声卡)对外支持的驱动能力,包括初始化端口、创建Render、创建Capture、获取端口能力集等。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - -**参见:** - -[AudioRender](_audio_render.md) - -[AudioCapture](_audio_capture.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| ([InitAllPorts](#initallports))(struct AudioAdapter \*adapter) | 初始化一个音频适配器所有的端口驱动 | -| ([CreateRender](#createrender) )(struct AudioAdapter \*adapter, const struct AudioDeviceDescriptor \*desc, const struct AudioSampleAttributes \*attrs, struct AudioRender \*\*render) | 创建一个音频播放(Render)接口的对象 | -| ([DestroyRender](#destroyrender) )(struct AudioAdapter \*adapter, struct AudioRender \*render) | 销毁一个音频播放(Render)接口的对象 | -| ([CreateCapture](#createcapture))(struct AudioAdapter \*adapter, const struct AudioDeviceDescriptor \*desc, const struct AudioSampleAttributes \*attrs, struct AudioCapture \*\*capture) | 创建一个音频录音(Capture)接口的对象 | -| ([DestroyCapture](#destroycapture))(struct AudioAdapter \*adapter, struct AudioCapture \*capture) | 销毁一个音频录音(Capture)接口的对象 | -| ([GetPortCapability](#getportcapability) )(struct AudioAdapter \*adapter, struct AudioPort \*port, struct AudioPortCapability \*capability) | 获取一个音频适配器的端口驱动的能力集 | -| ([SetPassthroughMode](#setpassthroughmode) )(struct AudioAdapter \*adapter, struct AudioPort \*port, enum AudioPortPassthroughMode mode) | 设置音频端口驱动的数据透传模式 | -| ([GetPassthroughMode](#getpassthroughmode))(struct AudioAdapter \*adapter, struct AudioPort \*port, enum AudioPortPassthroughMode \*mode) | 获取音频端口驱动的数据透传模式 | -| ([UpdateAudioRoute](#updateaudioroute))(struct AudioAdapter \*adapter, const struct AudioRoute \*route, int32_t \*routeHandle) | 更新一个或多个发送端和接受端之间的路由 | -| ([ReleaseAudioRoute](#releaseaudioroute))(struct AudioAdapter \*adapter, int32_t routeHandle) | 释放一个音频路由 | - - -## **类成员变量说明** - - -### CreateCapture - - -``` -int32_t(* AudioAdapter::CreateCapture) (struct AudioAdapter *adapter, const struct AudioDeviceDescriptor *desc, const struct AudioSampleAttributes *attrs, struct AudioCapture **capture) -``` - -**描述:** - -创建一个音频录音(Capture)接口的对象。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| adapter | 待操作的音频适配器的指针 | -| desc | 指向要启动的音频适配器的描述符的指针 | -| attrs | 指向要打开的音频采样属性的指针 | -| capture | 指向AudioCapture对象的二级指针 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[GetPortCapability](#getportcapability) - -[DestroyCapture](#destroycapture) - - -### CreateRender - - -``` -int32_t(* AudioAdapter::CreateRender) (struct AudioAdapter *adapter, const struct AudioDeviceDescriptor *desc, const struct AudioSampleAttributes *attrs, struct AudioRender **render) -``` - -**描述:** - -创建一个音频播放(Render)接口的对象。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| adapter | 待操作的音频适配器对象 | -| desc | 待打开的音频设备描述符 | -| attrs | 待打开的音频采样属性 | -| render | 获取的音频播放接口的对象实例保存到render中 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[GetPortCapability](#getportcapability) - -[DestroyRender](#destroyrender) - - -### DestroyCapture - - -``` -int32_t(* AudioAdapter::DestroyCapture) (struct AudioAdapter *adapter, struct AudioCapture *capture) -``` - -**描述:** - -销毁一个音频录音(Capture)接口的对象。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| adapter | 待操作的音频适配器对象 | -| capture | 待操作的音频录音接口对象 | - -**注意:** - -在音频录音过程中,不能销毁该接口对象。 - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[CreateCapture](#createcapture) - - -### DestroyRender - - -``` -int32_t(* AudioAdapter::DestroyRender) (struct AudioAdapter *adapter, struct AudioRender *render) -``` - -**描述:** - -销毁一个音频播放(Render)接口的对象。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| adapter | 待操作的音频适配器对象 | -| render | 待操作的音频播放接口对象 | - -**注意:** - -在音频播放过程中,不能销毁该接口对象 - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[CreateRender](#createrender) - - -### GetPassthroughMode - - -``` -int(* AudioAdapter::GetPassthroughMode) (struct AudioAdapter *adapter, struct AudioPort *port, enum AudioPortPassthroughMode *mode) -``` - -**描述:** - -获取音频端口驱动的数据透传模式。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| adapter | 待操作的音频适配器对象 | -| port | 待获取的端口 | -| mode | 获取的传输模式保存到mode中 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[SetPassthroughMode](#setpassthroughmode) - - -### GetPortCapability - - -``` -int(* AudioAdapter::GetPortCapability) (struct AudioAdapter *adapter, struct AudioPort *port, struct AudioPortCapability *capability) -``` - -**描述:** - -获取一个音频适配器的端口驱动的能力集。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| adapter | 待操作的音频适配器对象 | -| port | 待获取的端口 | -| capability | 获取的端口能力保存到capability中 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### InitAllPorts - - -``` -int(* AudioAdapter::InitAllPorts) (struct AudioAdapter *adapter) -``` - -**描述:** - -初始化一个音频适配器所有的端口驱动。 - -在音频服务中,调用其他驱动接口前需要首先调用该接口检查端口是否已经初始化完成: - -- 如果端口驱动初始化完成,则函数返回值0, 否则返回负值。 - -- 如果端口没有初始化完成,则需要等待一段时间(例如100ms)后重新进行检查,直到端口初始化完成后再继续操作。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| adapter | 待操作的音频适配器对象 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### ReleaseAudioRoute - - -``` -int32_t(* AudioAdapter::ReleaseAudioRoute) (struct AudioAdapter *adapter, int32_t routeHandle) -``` - -**描述:** - -释放一个音频路由。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| adapter | 待操作的音频适配器对象 | -| routeHandle | 待释放的路由句柄 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### SetPassthroughMode - - -``` -int(* AudioAdapter::SetPassthroughMode) (struct AudioAdapter *adapter, struct AudioPort *port, enum AudioPortPassthroughMode mode) -``` - -**描述:** - -设置音频端口驱动的数据透传模式。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| adapter | 待操作的音频适配器对象 | -| port | 待设置的端口 | -| mode | 待设置的传输模式 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[GetPassthroughMode](#getpassthroughmode) - - -### UpdateAudioRoute - - -``` -int32_t(* AudioAdapter::UpdateAudioRoute) (struct AudioAdapter *adapter, const struct AudioRoute *route, int32_t *routeHandle) -``` - -**描述:** - -更新一个或多个发送端和接受端之间的路由。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| adapter | 待操作的音频适配器对象 | -| route | 路由信息 | -| routeHandle | 生成的路由句柄 | - -**返回:** - -成功返回值0,失败返回负值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_adapter_descriptor.md b/zh-cn/device-dev/reference/hdi-apis/_audio_adapter_descriptor.md index 93f007349acdeaafcd080489f1cb530cc84da07c..a29da8ce1ef22ccfbb2f97c66d0a67b4d546aff2 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_adapter_descriptor.md +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_adapter_descriptor.md @@ -1,24 +1,58 @@ # AudioAdapterDescriptor -## **概述** +## 概述 音频适配器描述符。 -一个音频适配器(adapter)是一个声卡的端口驱动集合,包含输出端口、输入端口, 其中一个端口对应着多个PIN脚,一个PIN脚对应着一个实体的器件(例如喇叭、有线耳机)。 +一个音频适配器(Adapter)是一个声卡的端口驱动集合,包含输出端口、输入端口, 其中一个端口对应着多个Pin脚,一个Pin脚对应着一个实体的器件(例如喇叭、有线耳机)。 + +**Since:** + +3.2 + +**Version:** + +1.0 **相关模块:** [Audio](_audio.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [adapterName](_audio.md#adaptername) | 音频适配器的名称 | -| [portNum](_audio.md#portnum) | 一个音频适配器支持的端口数目 | -| [ports](_audio.md#ports) | 一个音频适配器支持的端口列表 | +| [adapterName](#adaptername) | String
音频适配器的名称。 | +| [ports](#ports) | struct [AudioPort](_audio_port.md)[]
一个音频适配器支持的端口列表,详情参考[AudioPort](_audio_port.md)。 | + + +## 类成员变量说明 + + +### adapterName + + +``` +String AudioAdapterDescriptor::adapterName +``` + +**描述:** + +音频适配器的名称。 + + +### ports + + +``` +struct AudioPort [] AudioAdapterDescriptor::ports +``` + +**描述:** + +一个音频适配器支持的端口列表,详情参考[AudioPort](_audio_port.md)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_attribute.md b/zh-cn/device-dev/reference/hdi-apis/_audio_attribute.md deleted file mode 100644 index 2281b389b21c0a4c1111e9b1d12490fc9c3070fb..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_attribute.md +++ /dev/null @@ -1,330 +0,0 @@ -# AudioAttribute - - -## **概述** - -AudioAttribute音频属性接口。 - -提供音频播放(Render)或录音(Capture)需要的公共属性驱动能力,包括获取帧(frame)信息、设置采样属性等。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| ([GetFrameSize](#getframesize))(AudioHandle handle, uint64_t \*size) | 获取音频帧(frame)的大小 | -| ([GetFrameCount](#getframecount))(AudioHandle handle, uint64_t \*count) | 获取音频buffer中的音频帧数 | -| ([SetSampleAttributes](#setsampleattributes))(AudioHandle handle, const struct AudioSampleAttributes \*attrs) | 设置音频采样的属性参数 | -| ([GetSampleAttributes](#getsampleattributes))(AudioHandle handle, struct AudioSampleAttributes \*attrs) | 获取音频采样的属性参数 | -| ([GetCurrentChannelId](#getcurrentchannelid))(AudioHandle handle, uint32_t \*channelId) | 获取音频的数据通道ID | -| ([SetExtraParams](#setextraparams))(AudioHandle handle, const char \*keyValueList) | 设置音频拓展参数 | -| ([GetExtraParams](#getextraparams))(AudioHandle handle, char \*keyValueList) | 获取音频拓展参数 | -| ([ReqMmapBuffer](#reqmmapbuffer))(AudioHandle handle, int32_t reqSize, struct AudioMmapBufferDescriptor \*desc) | 请求Mmap缓冲区 | -| ([GetMmapPosition](#getmmapposition))(AudioHandle handle, uint64_t \*frames, struct AudioTimeStamp \*time) | 获取当前Mmap的读/写位置 | -| ([AddAudioEffect](#addaudioeffect))(AudioHandle handle, uint64_t effectid) | 添加音频效果算法实例 | -| ([RemoveAudioEffect](#removeaudioeffect))(AudioHandle handle, uint64_t effectid) | 移除音频效果算法实例 | -| ([GetFrameBufferSize](#getframebuffersize))(AudioHandle handle, uint64_t \*bufferSize) | 获取播放或录音的缓冲区大小 | - - -## **类成员变量说明** - - -### AddAudioEffect - - -``` -int32_t (*AudioAttribute::AddAudioEffect)(AudioHandle handle, uint64_t effectid) -``` - -**描述:** - -添加音频效果算法实例。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| effectid | 输入参数,待添加的音频效果算法实例ID。 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### GetCurrentChannelId - - -``` -int32_t(* AudioAttribute::GetCurrentChannelId) (AudioHandle handle, uint32_t *channelId) -``` - -**描述:** - -获取音频的数据通道ID。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| channelId | 输出参数,获取的通道ID保存到channelId中。 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### GetExtraParams - - -``` -int32_t(* AudioAttribute::GetExtraParams) (AudioHandle handle, char *keyValueList) -``` - -**描述:** - -获取音频拓展参数。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| keyValueList | 输出参数,拓展参数键值对字符串列表,格式为key=value,多个键值对通过分号分割。 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### GetFrameBufferSize - - -``` -int32_t (*AudioAttribute::GetFrameBufferSize)(AudioHandle handle, uint64_t *bufferSize) -``` - -**描述:** - -获取播放或录音的缓冲区大小。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| bufferSize | 输出参数,获取的缓冲区大小保存到bufferSize中。 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### GetFrameCount - - -``` -int32_t(* AudioAttribute::GetFrameCount) (AudioHandle handle, uint64_t *count) -``` - -**描述:** - -获取音频buffer中的音频帧数。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| count | 输出参数,一个音频buffer中包含的音频帧数,获取后保存到count中。 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### GetFrameSize - - -``` -int32_t(* AudioAttribute::GetFrameSize) (AudioHandle handle, uint64_t *size) -``` - -**描述:** - -获取音频帧(frame)的大小,即一帧音频数据的长度(字节数)。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| size | 输出参数,获取的音频帧大小(字节数)保存到size中。 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### GetMmapPosition - - -``` -int32_t(* AudioAttribute::GetMmapPosition) (AudioHandle handle, uint64_t *frames, struct AudioTimeStamp *time) -``` - -**描述:** - -获取当前Mmap的读/写位置。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| frames | 输出参数,获取的音频帧计数保存到frames中。 | -| time | 输出参数,获取的关联时间戳保存到time中。 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### GetSampleAttributes - - -``` -int32_t(* AudioAttribute::GetSampleAttributes) (AudioHandle handle, struct AudioSampleAttributes *attrs) -``` - -**描述:** - -获取音频采样的属性参数。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| attrs | 输出参数,获取的音频采样属性(例如采样频率、采样精度、通道)保存到attrs中。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[GetSampleAttributes](#getsampleattributes) - - -### RemoveAudioEffect - - -``` -int32_t (*AudioAttribute::RemoveAudioEffect)(AudioHandle handle, uint64_t effectid) -``` - -**描述:** - -移除音频效果算法实例。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| effectid | 输入参数,待移除的音频效果算法实例ID。 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### ReqMmapBuffer - - -``` -int32_t(* AudioAttribute::ReqMmapBuffer) (AudioHandle handle, int32_t reqSize, struct AudioMmapBufferDescriptor *desc) -``` - -**描述:** - -请求Mmap缓冲区。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| reqSize | 输入参数,请求缓冲区的大小。 | -| desc | 输出参数,缓冲区描述符。 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### SetExtraParams - - -``` -int32_t(* AudioAttribute::SetExtraParams) (AudioHandle handle, const char *keyValueList) -``` - -**描述:** - -设置音频拓展参数。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| keyValueList | 输入参数,拓展参数键值对字符串列表,格式为key=value,多个键值对通过分号分割。 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### SetSampleAttributes - - -``` -int32_t(* AudioAttribute::SetSampleAttributes) (AudioHandle handle, const struct AudioSampleAttributes *attrs) -``` - -**描述:** - -设置音频采样的属性参数。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| attrs | 输入参数,待设置的音频采样属性,例如采样频率、采样精度、通道。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[GetSampleAttributes](#getsampleattributes) diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_capture.md b/zh-cn/device-dev/reference/hdi-apis/_audio_capture.md deleted file mode 100644 index c3cecd48016cf8819856ae7cf1eccf85fe778c86..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_capture.md +++ /dev/null @@ -1,81 +0,0 @@ -# AudioCapture - - -## **概述** - -AudioCapture录音接口。 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| control | 音频控制能力接口,详情参考[AudioControl](_audio_control.md)。 | -| attr | 音频属性能力接口,详情参考[AudioAttribute](_audio_attribute.md)。 | -| scene | 音频场景能力接口,详情参考[AudioScene](_audio_scene.md)。 | -| volume | 音频音量能力接口,详情参考[AudioVolume](_audio_volume.md)。 | -| ([CaptureFrame](#captureframe))(struct AudioCapture \*capture, void \*frame, uint64_t requestBytes, uint64_t \*replyBytes) | 从音频驱动中录制(Capture)一帧输入数据(录音,音频上行数据)。 | -| ([GetCapturePosition](#getcaptureposition))(struct AudioCapture \*capture, uint64_t \*frames, struct AudioTimeStamp \*time) | 获取音频输入帧数的上一次计数。 | - - -## **类成员变量说明** - - -### CaptureFrame - - -``` -int32_t(* AudioCapture::CaptureFrame) (struct AudioCapture *capture, void *frame, uint64_t requestBytes, uint64_t *replyBytes) -``` - -**描述:** - -从音频驱动中录制(Capture)一帧输入数据(录音,音频上行数据)。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| capture | 输入参数,待操作的音频录音接口对象。 | -| frame | 输入参数,待存放输入数据的音频frame。 | -| requestBytes | 输入参数,待存放输入数据的音频frame大小(字节数)。 | -| replyBytes | 输出参数,实际读取到的音频数据长度(字节数),获取后保存到replyBytes中。 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### GetCapturePosition - - -``` -int32_t(* AudioCapture::GetCapturePosition) (struct AudioCapture *capture, uint64_t *frames, struct AudioTimeStamp *time) -``` - -**描述:** - -获取音频输入帧数的上一次计数。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| capture | 输入参数,待操作的音频录音接口对象。| -| frames | 输出参数,获取的音频帧计数保存到frames中。 | -| time | 输出参数,获取的关联时间戳保存到time中。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[CaptureFrame](#captureframe) diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_control.md b/zh-cn/device-dev/reference/hdi-apis/_audio_control.md deleted file mode 100644 index 368c9f34b2028cbd0a4b99d7abf6bb0ebe502fdc..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_control.md +++ /dev/null @@ -1,211 +0,0 @@ -# AudioControl - - -## **概述** - -AudioControl音频控制接口。 - -提供音频播放(Render)或录音(Capture)需要的公共控制驱动能力,包括Start、Stop、Pause、Resume、Flush等。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| ([Start](#start))(AudioHandle handle) | 启动一个音频播放(Render)或录音(Capture)处理。 | -| ([Stop](#stop))(AudioHandle handle) | 停止一个音频播放(Render)或录音(Capture)处理。 | -| ([Pause](#pause))(AudioHandle handle) | 暂停一个音频播放(Render)或录音(Capture)处理。 | -| ([Resume](#resume))(AudioHandle handle) | 恢复一个音频播放(Render)或录音(Capture)处理。 | -| ([Flush](#flush))(AudioHandle handle) | 刷新音频缓冲区buffer中的数据。 | -| ([TurnStandbyMode](#turnstandbymode))(AudioHandle handle) | 设置或去设置设备的待机模式。 | -| ([AudioDevDump](#audiodevdump))(AudioHandle handle, int32_t range, int32_t fd) | Dump音频设备信息。 | - - -## **类成员变量说明** - - -### AudioDevDump - - -``` -int32_t(* AudioControl::AudioDevDump) (AudioHandle handle, int32_t range, int32_t fd) -``` - -**描述:** - -Dump音频设备信息。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 待操作的音频句柄 | -| range | Dump信息范围,分为简要信息、全量信息 | -| fd | 指定Dump目标文件 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### Flush - - -``` -int32_t(* AudioControl::Flush) (AudioHandle handle) -``` - -**描述:** - -刷新音频缓冲区buffer中的数据。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 待操作的音频句柄 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### Pause - - -``` -int32_t(* AudioControl::Pause) (AudioHandle handle) -``` - -**描述:** - -暂停一个音频播放(Render)或录音(Capture)处理。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 待操作的音频句柄 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[Resume](#resume) - - -### Resume - - -``` -int32_t(* AudioControl::Resume) (AudioHandle handle) -``` - -**描述:** - -恢复一个音频播放(Render)或录音(Capture)处理。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 待操作的音频句柄 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[Pause](#pause) - - -### Start - - -``` -int32_t(* AudioControl::Start) (AudioHandle handle) -``` - -**描述:** - -启动一个音频播放(Render)或录音(Capture)处理。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 待操作的音频句柄 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[Stop](#stop) - - -### Stop - - -``` -int32_t(* AudioControl::Stop) (AudioHandle handle) -``` - -**描述:** - -停止一个音频播放(Render)或录音(Capture)处理。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 待操作的音频句柄 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[Start](#start) - - -### TurnStandbyMode - - -``` -int32_t(* AudioControl::TurnStandbyMode) (AudioHandle handle) -``` - -**描述:** - -设置或去设置设备的待机模式。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 待操作的音频句柄 | - -**返回:** - -设置设备待机模式成功返回值0,再次执行后去设置待机模式成功返回正值,失败返回负值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_dev_ext_info.md b/zh-cn/device-dev/reference/hdi-apis/_audio_dev_ext_info.md index d3f01acc1f1826b366fbfa92b6370b86ebc480fe..1035604499d478c86ff97776ec1ed4511a3b24f0 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_dev_ext_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_dev_ext_info.md @@ -1,22 +1,69 @@ # AudioDevExtInfo -## **概述** +## 概述 音频设备拓展信息。 +**Since:** + +3.2 + +**Version:** + +1.0 + **相关模块:** [Audio](_audio.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [moduleId](_audio.md#moduleid-12) | 音频流绑定的模块ID | -| [type](_audio.md#type-23) | 音频端口上的PIN脚(输出、输入) | -| [desc](_audio.md#desc-55) | 地址描述 | +| [moduleId](#moduleid) | unsigned int
音频流绑定的模块ID。 | +| [type](#type) | enum [AudioPortPin](_audio.md#audioportpin)
音频端口上的Pin脚(输出、输入),详情参考[AudioPortPin](_audio.md#audioportpin)。 | +| [desc](#desc) | String
地址描述。 | + + +## 类成员变量说明 + + +### desc + + +``` +String AudioDevExtInfo::desc +``` + +**描述:** + +地址描述。 + + +### moduleId + + +``` +unsigned int AudioDevExtInfo::moduleId +``` + +**描述:** + +音频流绑定的模块ID。 + + +### type + + +``` +enum AudioPortPin AudioDevExtInfo::type +``` + +**描述:** + +音频端口上的Pin脚(输出、输入),详情参考[AudioPortPin](_audio.md#audioportpin)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_device_descriptor.md b/zh-cn/device-dev/reference/hdi-apis/_audio_device_descriptor.md index 3046db7ba8f824722145bb83855dc5cc53d60a42..04c725e84577bbd291d6da6f826302ee9c6d0941 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_device_descriptor.md +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_device_descriptor.md @@ -1,22 +1,59 @@ # AudioDeviceDescriptor -## **概述** +## 概述 -音频设备描述符 +音频设备描述符。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** [Audio](_audio.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [portId](_audio.md#portid-24) | 音频端口ID | -| [pins](_audio.md#pins) | 音频端口上的PIN脚(输出、输入) | -| [desc](_audio.md#desc-15) | 以字符串命名的音频设备 | +| [portId](#portid) | unsigned int
音频端口ID。  | +| [pins](#pins) | enum [AudioPortPin](_audio.md#audioportpin)
音频端口上的Pin脚(输出、输入),详情参考[AudioPortPin](_audio.md#audioportpin)。  | +| [desc](#desc) | String
以字符串命名的音频设备。  | + + +## 类成员变量说明 + + +### desc + + +``` +String AudioDeviceDescriptor::desc +``` +**描述:** +以字符串命名的音频设备。 + + +### pins + + +``` +enum AudioPortPin AudioDeviceDescriptor::pins +``` +**描述:** +音频端口上的Pin脚(输出、输入),详情参考[AudioPortPin](_audio.md#audioportpin)。 + + +### portId + + +``` +unsigned int AudioDeviceDescriptor::portId +``` +**描述:** +音频端口ID。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_device_status.md b/zh-cn/device-dev/reference/hdi-apis/_audio_device_status.md new file mode 100644 index 0000000000000000000000000000000000000000..6f1aeead10a159ba6c2d50d955a37e68da115054 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_device_status.md @@ -0,0 +1,37 @@ +# AudioDeviceStatus + + +## 概述 + +音频设备状态。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [pnpStatus](#pnpstatus) | unsigned int
PnP设备状态,详情参考[AudioDeviceType](_audio.md#audiodevicetype),[AudioEventType](_audio.md#audioeventtype)。  | + + +## 类成员变量说明 + + +### pnpStatus + + +``` +unsigned int AudioDeviceStatus::pnpStatus +``` +**描述:** +PnP设备状态,详情参考[AudioDeviceType](_audio.md#audiodevicetype),[AudioEventType](_audio.md#audioeventtype)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_event.md b/zh-cn/device-dev/reference/hdi-apis/_audio_event.md new file mode 100644 index 0000000000000000000000000000000000000000..fda96635bc119e702f85e507c95fac62fe913053 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_event.md @@ -0,0 +1,56 @@ +# AudioEvent + + +## 概述 + +音频事件。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [eventType](#eventtype) | unsigned int
事件类型,详情参考[AudioEventType](_audio.md#audioeventtype)。 | +| [deviceType](#devicetype) | unsigned int
设备类型,详情参考[AudioDeviceType](_audio.md#audiodevicetype)。 | + + +## 类成员变量说明 + + +### deviceType + + +``` +unsigned int AudioEvent::deviceType +``` + +**描述:** + +设备类型,详情参考[AudioDeviceType](_audio.md#audiodevicetype)。 + + +### eventType + + +``` +unsigned int AudioEvent::eventType +``` + +**描述:** + +事件类型,详情参考[AudioEventType](_audio.md#audioeventtype)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_info.md b/zh-cn/device-dev/reference/hdi-apis/_audio_info.md new file mode 100644 index 0000000000000000000000000000000000000000..d74fab5a41b564a69f0e15c79e45395a19de2175 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_info.md @@ -0,0 +1,59 @@ +# AudioInfo + + +## 概述 + +音频端口特定信息。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [device](#device) | struct [AudioDevExtInfo](_audio_dev_ext_info.md)
设备特定信息,详情参考[AudioDevExtInfo](_audio_dev_ext_info.md)。  | +| [mix](#mix) | struct [AudioMixExtInfo](_audio_mix_ext_info.md)
音轨特定信息,详情参考[AudioMixExtInfo](_audio_mix_ext_info.md)。  | +| [session](#session) | struct [AudioSessionExtInfo](_audio_session_ext_info.md)
会话特定信息,详情参考[AudioSessionExtInfo](_audio_session_ext_info.md)。  | + + +## 类成员变量说明 + + +### device + + +``` +struct AudioDevExtInfo AudioInfo::device +``` +**描述:** +设备特定信息,详情参考[AudioDevExtInfo](_audio_dev_ext_info.md)。 + + +### mix + + +``` +struct AudioMixExtInfo AudioInfo::mix +``` +**描述:** +音轨特定信息,详情参考[AudioMixExtInfo](_audio_mix_ext_info.md)。 + + +### session + + +``` +struct AudioSessionExtInfo AudioInfo::session +``` +**描述:** +会话特定信息,详情参考[AudioSessionExtInfo](_audio_session_ext_info.md)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_manager.md b/zh-cn/device-dev/reference/hdi-apis/_audio_manager.md deleted file mode 100644 index c809c03c0b8835dcea26e5d18c48cf05d59f3211..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_manager.md +++ /dev/null @@ -1,145 +0,0 @@ -# AudioManager - - -## **概述** - -AudioManager音频适配器管理接口。 - -按照音频服务下发的音频适配器(声卡)描述符加载一个具体的音频适配器驱动程序。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - -**参见:** - -[AudioAdapter](_audio_adapter.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| ([GetAllAdapters](#getalladapters))(struct AudioAdapterManager \*manager, struct AudioAdapterDescriptor \*\*descs, int \*size) | 获取音频驱动中支持的所有适配器的列表 | -| ([LoadAdapter](#loadadapter))(struct AudioAdapterManager \*manager, const struct AudioAdapterDescriptor \*desc, struct AudioAdapter \*\*adapter) | 加载一个音频适配器(声卡)的驱动 | -| ([UnloadAdapter](#unloadadapter))(struct AudioAdapterManager \*manager, struct AudioAdapter \*adapter) | 卸载音频适配器(声卡)的驱动 | -| ([ReleaseAudioManagerObject](#releaseaudiomanagerobject))(struct AudioManager \*object) | 释放音频管理接口对象 | - - -## **类成员变量说明** - - -### GetAllAdapters - - -``` -int(* AudioManager::GetAllAdapters) (struct AudioAdapterManager *manager, struct AudioAdapterDescriptor **descs, int *size) -``` - -**描述:** - -获取音频驱动中支持的所有适配器的列表。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| manager | 输入参数,待操作的音频管理接口对象。 | -| descs | 输出参数,获取到的音频适配器列表保存到descs中。 | -| size | 输出参数,获取到的音频适配器列表的长度保存到size中。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[LoadAdapter](#loadadapter) - - -### LoadAdapter - - -``` -int(* AudioManager::LoadAdapter) (struct AudioAdapterManager *manager, const struct AudioAdapterDescriptor *desc, struct AudioAdapter **adapter) -``` - -**描述:** - -加载一个音频适配器(声卡)的驱动。 - -加载一个具体的音频驱动,例如USB驱动,在具体实现中可能加载的是一个动态链接库(\*.so)。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| manager | 输入参数,待操作的音频管理接口对象。 | -| desc | 输入参数,待加载的音频适配器描述符。 | -| adapter | 输出参数,获取的音频适配器接口的对象实例保存到adapter中。| - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[GetAllAdapters](#getalladapters) - -[UnloadAdapter](#unloadadapter) - - -### ReleaseAudioManagerObject - - -``` -bool(* AudioManager::ReleaseAudioManagerObject) (struct AudioManager *object) -``` - -**描述:** - -释放音频管理接口对象。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| object | 输入参数,待操作的音频管理接口对象。 | - -**返回:** - -成功返回true,失败返回false。 - - -### UnloadAdapter - - -``` -void(* AudioManager::UnloadAdapter) (struct AudioAdapterManager *manager, struct AudioAdapter *adapter) -``` - -**描述:** - -卸载音频适配器(声卡)的驱动。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| manager | 输入参数,待操作的音频管理接口对象。 | -| adapter | 输入参数,待卸载的音频适配器接口的对象。 | - -**参见:** - -[LoadAdapter](#loadadapter) diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_mix_ext_info.md b/zh-cn/device-dev/reference/hdi-apis/_audio_mix_ext_info.md index 50032fae465492d88b676b63a14a54d8a5b3cb87..b5ef1a7aa5293de4f6e039390d3b3ed3b51f45c3 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_mix_ext_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_mix_ext_info.md @@ -1,21 +1,48 @@ # AudioMixExtInfo -## **概述** +## 概述 音轨拓展信息。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** [Audio](_audio.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [moduleId](_audio.md#moduleid-22) | 流所属模块标识符 | -| [streamId](_audio.md#streamid-22) | 由调用者传递的Render或Capture标识符 | +| [moduleId](#moduleid) | unsigned int
流所属模块标识符。  | +| [streamId](#streamid) | unsigned int
由调用者传递的Render或Capture标识符。  | + + +## 类成员变量说明 + + +### moduleId + + +``` +unsigned int AudioMixExtInfo::moduleId +``` +**描述:** +流所属模块标识符。 + + +### streamId + + +``` +unsigned int AudioMixExtInfo::streamId +``` +**描述:** +由调用者传递的Render或Capture标识符。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_mmap_buffer_descripter.md b/zh-cn/device-dev/reference/hdi-apis/_audio_mmap_buffer_descripter.md new file mode 100644 index 0000000000000000000000000000000000000000..7272b233bb8a6300965ec6f97a8293cb960b8899 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_mmap_buffer_descripter.md @@ -0,0 +1,103 @@ +# AudioMmapBufferDescripter + + +## 概述 + +mmap缓冲区描述符。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [memoryAddress](#memoryaddress) | byte[]
指向mmap缓冲区的指针。  | +| [memoryFd](#memoryfd) | int
mmap缓冲区的文件描述符。  | +| [totalBufferFrames](#totalbufferframes) | int
缓冲区总大小,单位:帧。  | +| [transferFrameSize](#transferframesize) | int
传输大小,单位:帧。  | +| [isShareable](#isshareable) | int
mmap缓冲区是否可以在进程间共享。  | +| [offset](#offset) | unsigned int
文件偏移。  | +| [filePath](#filepath) | String
mmap文件路径。  | + + +## 类成员变量说明 + + +### filePath + + +``` +String AudioMmapBufferDescripter::filePath +``` +**描述:** +mmap文件路径。 + + +### isShareable + + +``` +int AudioMmapBufferDescripter::isShareable +``` +**描述:** +mmap缓冲区是否可以在进程间共享。 + + +### memoryAddress + + +``` +byte [] AudioMmapBufferDescripter::memoryAddress +``` +**描述:** +指向mmap缓冲区的指针。 + + +### memoryFd + + +``` +int AudioMmapBufferDescripter::memoryFd +``` +**描述:** +mmap缓冲区的文件描述符。 + + +### offset + + +``` +unsigned int AudioMmapBufferDescripter::offset +``` +**描述:** +文件偏移。 + + +### totalBufferFrames + + +``` +int AudioMmapBufferDescripter::totalBufferFrames +``` +**描述:** +缓冲区总大小,单位:帧。 + + +### transferFrameSize + + +``` +int AudioMmapBufferDescripter::transferFrameSize +``` +**描述:** +传输大小,单位:帧。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_mmap_buffer_descriptor.md b/zh-cn/device-dev/reference/hdi-apis/_audio_mmap_buffer_descriptor.md deleted file mode 100644 index 8488a838eff0aaec2b8f565f494ee0f07e88fcbb..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_mmap_buffer_descriptor.md +++ /dev/null @@ -1,24 +0,0 @@ -# AudioMmapBufferDescriptor - - -## **概述** - -Mmap缓冲区描述符。 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| [memoryAddress](_audio.md#memoryaddress) | 指向Mmap缓冲区的指针 | -| [memoryFd](_audio.md#memoryfd) | Mmap缓冲区的文件描述符 | -| [totalBufferFrames](_audio.md#totalbufferframes) | 缓冲区总大小,单位:帧 | -| [transferFrameSize](_audio.md#transferframesize) | 传输大小,单位:帧 | -| [isShareable](_audio.md#isshareable) | Mmap缓冲区是否可以在进程间共享 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_port.md b/zh-cn/device-dev/reference/hdi-apis/_audio_port.md index 4cf79c86ea3854c602904c120e54a43e7abd1779..525ea18208831dfaa04ce314f950fd1d2da8251c 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_port.md +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_port.md @@ -1,22 +1,59 @@ # AudioPort -## **概述** +## 概述 音频端口。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** [Audio](_audio.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [dir](_audio.md#dir) | 音频端口的类型。 | -| [portId](_audio.md#portid-14) | 音频端口的ID。 | -| [portName](_audio.md#portname) | 音频端口的名称。 | +| [dir](#dir) | enum [AudioPortDirection](_audio.md#audioportdirection)
音频端口的类型,详情参考[AudioPortDirection](_audio.md#audioportdirection)。  | +| [portId](#portid) | unsigned int
音频端口的ID。  | +| [portName](#portname) | String
音频端口的名称。  | + + +## 类成员变量说明 + + +### dir + + +``` +enum AudioPortDirection AudioPort::dir +``` +**描述:** +音频端口的类型,详情参考[AudioPortDirection](_audio.md#audioportdirection)。 + + +### portId + + +``` +unsigned int AudioPort::portId +``` +**描述:** +音频端口的ID。 + + +### portName + + +``` +String AudioPort::portName +``` +**描述:** +音频端口的名称。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_port_cap.md b/zh-cn/device-dev/reference/hdi-apis/_audio_port_cap.md new file mode 100644 index 0000000000000000000000000000000000000000..f4fa3c9840004ba11a1be6263e55f4afb5ccd5e4 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_port_cap.md @@ -0,0 +1,74 @@ +# AudioPortCap + + +## 概述 + +定义音频编解码能力。 + +**相关模块:** + +[Codec](_codec.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [sampleFormats](#sampleformats) [[SAMPLE_FMT_NUM](_codec.md#sample_fmt_num)] | int32_t
支持的音频采样格式,详见[AudioSampleFormat](_codec.md#audiosampleformat)。 | +| [sampleRate](#samplerate) [[SAMPLE_RATE_NUM](_codec.md#sample_rate_num)] | int32_t
支持的音频采样率,详见[AudioSampleRate](_codec.md#audiosamplerate)。 | +| [channelLayouts](#channellayouts) [[CHANNEL_NUM](_codec.md#channel_num)] | int32_t
支持的音频通道数channel layouts。 | +| [channelCount](#channelcount) [[CHANNEL_NUM](_codec.md#channel_num)] | int32_t
支持的音频通道数。 | + + +## 类成员变量说明 + + +### channelCount + + +``` +int32_t AudioPortCap::channelCount[CHANNEL_NUM] +``` + +**描述:** + +支持的音频通道数。 + + +### channelLayouts + + +``` +int32_t AudioPortCap::channelLayouts[CHANNEL_NUM] +``` + +**描述:** + +支持的音频通道数channel layouts。 + + +### sampleFormats + + +``` +int32_t AudioPortCap::sampleFormats[SAMPLE_FMT_NUM] +``` + +**描述:** + +支持的音频采样格式,详见[AudioSampleFormat](_codec.md#audiosampleformat)。 + + +### sampleRate + + +``` +int32_t AudioPortCap::sampleRate[SAMPLE_RATE_NUM] +``` + +**描述:** + +支持的音频采样率,详见[AudioSampleRate](_codec.md#audiosamplerate)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_port_capability.md b/zh-cn/device-dev/reference/hdi-apis/_audio_port_capability.md index bcd0d457ef2599dde89fc1a3e8d89248800328fb..78665527037ba07d2a6e63a3680bb7f59c0523a6 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_port_capability.md +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_port_capability.md @@ -1,31 +1,123 @@ # AudioPortCapability -## **概述** +## 概述 音频端口的支持能力。 +**Since:** + +3.2 + +**Version:** + +1.0 + **相关模块:** [Audio](_audio.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [deviceType](_audio.md#devicetype) | 设备输出、输入类型。 | -| [deviceId](_audio.md#deviceid) | 绑定(bind)设备ID,唯一的设备识别符。 | -| [hardwareMode](_audio.md#hardwaremode) | 是否支持设备绑定处理。 | -| [formatNum](_audio.md#formatnum) | 支持的音频格式数目。 | -| [formats](_audio.md#formats) | 支持的音频格式。 | -| [sampleRateMasks](_audio.md#sampleratemasks) | 支持的音频采样频率(8k、16k、32k、48k)。 | -| [channelMasks](_audio.md#channelmasks) | 设备的声道布局掩码(mask)。 | -| [channelCount](_audio.md#channelcount-22) | 支持的最大声道总数。 | -| [subPortsNum](_audio.md#subportsnum) | 支持的子端口数目(仅用于输出设备)。 | -| [subPorts](_audio.md#subports) | 支持的子端口列表。 | -| [supportSampleFormatNum](_audio.md#supportsampleformatnum) | 支持的音频样本格式数量。 | -| [supportSampleFormats](_audio.md#supportsampleformats) | 支持的音频样本格式。 | +| [deviceType](#devicetype) | unsigned int
设备输出、输入类型。 | +| [deviceId](#deviceid) | unsigned int
设备ID,唯一的设备识别符。 | +| [hardwareMode](#hardwaremode) | boolean
是否支持设备绑定处理。 | +| [formatNum](#formatnum) | unsigned int
支持的音频格式数目。 | +| [channelMasks](#channelmasks) | enum [AudioFormat](_audio.md#audioformat)[] formats unsigned int sampleRateMasks enum [AudioChannelMask](_audio.md#audiochannelmask)
支持的音频格式,详情参考[AudioFormat](_audio.md#audioformat)。 | +| [channelCount](#channelcount) | unsigned int
最大支持的声道总数。 | +| [subPorts](#subports) | struct [AudioSubPortCapability](_audio_sub_port_capability.md)[]
支持的子端口列表,详情参考[AudioSubPortCapability](_audio_sub_port_capability.md)。 | + + +## 类成员变量说明 + + +### channelCount + + +``` +unsigned int AudioPortCapability::channelCount +``` + +**描述:** + +最大支持的声道总数。 + + +### channelMasks + + +``` +enum AudioFormat [] formats unsigned int sampleRateMasks enum AudioChannelMask AudioPortCapability::channelMasks +``` + +**描述:** + +支持的音频格式,详情参考[AudioFormat](_audio.md#audioformat)。 + +支持的音频采样频率(8k、16k、32k、48k)。 设备的声道布局掩码,详情参考[AudioChannelMask](_audio.md#audiochannelmask)。 + + +### deviceId + + +``` +unsigned int AudioPortCapability::deviceId +``` + +**描述:** + +设备ID,唯一的设备识别符。 + + +### deviceType + + +``` +unsigned int AudioPortCapability::deviceType +``` + +**描述:** + +设备输出、输入类型。 + + +### formatNum + + +``` +unsigned int AudioPortCapability::formatNum +``` + +**描述:** + +支持的音频格式数目。 + + +### hardwareMode + + +``` +boolean AudioPortCapability::hardwareMode +``` + +**描述:** + +是否支持设备绑定处理。 + + +### subPorts + + +``` +struct AudioSubPortCapability [] AudioPortCapability::subPorts +``` + +**描述:** + +支持的子端口列表,详情参考[AudioSubPortCapability](_audio_sub_port_capability.md)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_render.md b/zh-cn/device-dev/reference/hdi-apis/_audio_render.md deleted file mode 100644 index c7aed448a1393871e2325b41f47be8edeae7bfee..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_render.md +++ /dev/null @@ -1,294 +0,0 @@ -# AudioRender - - -## **概述** - -AudioRender音频播放接口。 - -提供音频播放支持的驱动能力,包括音频控制、音频属性、音频场景、音频音量、获取硬件延迟时间、播放音频帧数据(Render frame)等。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - -**参见:** - -[AudioControl](_audio_control.md) - -[AudioAttribute](_audio_attribute.md) - -[AudioScene](_audio_scene.md) - -[AudioVolume](_audio_volume.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| control | 音频控制能力接口,详情参考[AudioControl](_audio_control.md)。 | -| attr | 音频属性能力接口,详情参考[AudioAttribute](_audio_attribute.md)。 | -| scene | 音频场景能力接口,详情参考[AudioScene](_audio_scene.md)。 | -| volume | 音频音量能力接口,详情参考[AudioVolume](_audio_volume.md)。 | -| ([GetLatency](#getlatency))(struct AudioRender \*render, uint32_t \*ms) | 获取音频硬件驱动估计的延迟时间。 | -| ([RenderFrame](#renderframe))(struct AudioRender \*render, const void \*frame, uint64_t requestBytes, uint64_t \*replyBytes) | 往音频驱动中播放(Render)一帧输出数据(放音,音频下行数据)。 | -| ([GetRenderPosition](#getrenderposition))(struct AudioRender \*render, uint64_t \*frames, struct AudioTimeStamp \*time) | 获取音频输出帧数的上一次计数。 | -| ([SetRenderSpeed](#setrenderspeed))(struct AudioRender \*render, float speed) | 设置一个音频的播放速度。 | -| ([GetRenderSpeed](#getrenderspeed))(struct AudioRender \*render, float \*speed) | 获取一个音频当前的播放速度。 | -| ([SetChannelMode](#setchannelmode))(struct AudioRender \*render, enum AudioChannelMode mode) | 设置音频播放的通道模式。 | -| ([GetChannelMode](#getchannelmode))(struct AudioRender \*render, enum AudioChannelMode \*mode) | 获取音频播放当前的通道模式。 | -| ([RegCallback](#regcallback) )(struct AudioRender \*render, RenderCallback callback, void \*cookie) | 注册音频回调函数,用于放音过程中缓冲区数据写、DrainBuffer完成通知。 | -| ([DrainBuffer](#drainbuffer))(struct AudioRender \*render, enum AudioDrainNotifyType \*type) | 排空缓冲区中的数据。 | - - -## **类成员变量说明** - - -### DrainBuffer - - -``` -int32_t(* AudioRender::DrainBuffer) (struct AudioRender *render, enum AudioDrainNotifyType *type) -``` - -**描述:** - -排空缓冲区中的数据。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| render | 输入参数,待操作的音频播放接口对象。 | -| type | 输入参数,DrainBuffer的操作类型,详情请参考[AudioDrainNotifyType](_audio.md#audiodrainnotifytype)。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[RegCallback](#regcallback) - - -### GetChannelMode - - -``` -int32_t(* AudioRender::GetChannelMode) (struct AudioRender *render, enum AudioChannelMode *mode) -``` - -**描述:** - -获取音频播放当前的通道模式。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| render | 输入参数,待操作的音频播放接口对象。| -| mode | 输出参数,获取的通道模式保存到mode中。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[SetChannelMode](#setchannelmode) - - -### GetLatency - - -``` -int32_t(* AudioRender::GetLatency) (struct AudioRender *render, uint32_t *ms) -``` - -**描述:** - -获取音频硬件驱动估计的延迟时间。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| render | 输入参数,待操作的音频播放接口对象。 | -| ms | 输出参数,获取的延迟时间(单位:毫秒)保存到ms中。 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### GetRenderPosition - - -``` -int32_t(* AudioRender::GetRenderPosition) (struct AudioRender *render, uint64_t *frames, struct AudioTimeStamp *time) -``` - -**描述:** - -获取音频输出帧数的上一次计数。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| render | 输入参数,待操作的音频播放接口对象。 | -| frames | 输出参数,获取的音频帧计数保存到frames中。 | -| time | 输出参数,获取的关联时间戳保存到time中。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[RenderFrame](#renderframe) - - -### GetRenderSpeed - - -``` -int32_t(* AudioRender::GetRenderSpeed) (struct AudioRender *render, float *speed) -``` - -**描述:** - -获取一个音频当前的播放速度。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| render | 输入参数,待操作的音频播放接口对象。 | -| speed | 输出参数,获取的播放速度保存到speed中。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[SetRenderSpeed](#setrenderspeed) - - -### RegCallback - - -``` -int32_t(* AudioRender::RegCallback) (struct AudioRender *render, RenderCallback callback, void *cookie) -``` - -**描述:** - -注册音频回调函数,用于放音过程中缓冲区数据写、DrainBuffer完成通知。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| render | 输入参数,待操作的音频播放接口对象。 | -| callback | 输入参数,注册的回调函数。 | -| cookie | 输入参数,回调函数的入参。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[RegCallback](#regcallback) - - -### RenderFrame - - -``` -int32_t(* AudioRender::RenderFrame) (struct AudioRender *render, const void *frame, uint64_t requestBytes, uint64_t *replyBytes) -``` - -**描述:** - -向音频驱动中播放(Render)一帧输出数据(放音,音频下行数据)。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| render | 输入参数,待操作的音频播放接口对象。 | -| frame | 输入参数,待写入的输出数据的音频frame。 | -| requestBytes | 输入参数,待写入的输出数据的音频frame大小(字节数)。 | -| replyBytes | 输出参数,实际写入的音频数据长度(字节数),获取后保存到replyBytes中。 | - -**返回:** - -成功返回值0,失败返回负值。 - - -### SetChannelMode - - -``` -int32_t(* AudioRender::SetChannelMode) (struct AudioRender *render, enum AudioChannelMode mode) -``` - -**描述:** - -设置音频播放的通道模式。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| render | 输入参数,待操作的音频播放接口对象。 | -| speed | 输入参数,待设置的通道模式。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[GetChannelMode](#getchannelmode) - - -### SetRenderSpeed - - -``` -int32_t(* AudioRender::SetRenderSpeed) (struct AudioRender *render, float speed) -``` - -**描述:** - -设置一个音频的播放速度。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| render | 输入参数,待操作的音频播放接口对象。 | -| speed | 输入参数,待设置的播放速度。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[GetRenderSpeed](#getrenderspeed) diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_route.md b/zh-cn/device-dev/reference/hdi-apis/_audio_route.md index 52fe8436dc04d9761877f4a8c652ccc30cfc916d..c6032ed92d5bbcd05b567bfb8c881cd31c6558d8 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_route.md +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_route.md @@ -1,23 +1,48 @@ # AudioRoute -## **概述** +## 概述 音频路由信息。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** [Audio](_audio.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [sourcesNum](_audio.md#sourcesnum) | 发送端节点数量。 | -| [sources](_audio.md#sources) | 发送端列表。 | -| [sinksNum](_audio.md#sinksnum) | 接受端节点数量。 | -| [sinks](_audio.md#sinks) | 接受端列表。 | +| [sources](#sources) | struct [AudioRouteNode](_audio_route_node.md)[]
发送端列表,详情参考[AudioRouteNode](_audio_route_node.md)。  | +| [sinks](#sinks) | struct [AudioRouteNode](_audio_route_node.md)[]
接受端列表,详情参考[AudioRouteNode](_audio_route_node.md)。  | + + +## 类成员变量说明 + + +### sinks + + +``` +struct AudioRouteNode [] AudioRoute::sinks +``` +**描述:** +接受端列表,详情参考[AudioRouteNode](_audio_route_node.md)。 + + +### sources + + +``` +struct AudioRouteNode [] AudioRoute::sources +``` +**描述:** +发送端列表,详情参考[AudioRouteNode](_audio_route_node.md)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_route_node.md b/zh-cn/device-dev/reference/hdi-apis/_audio_route_node.md index ac409be4c4343dfec9cd459820adaaa74bd5ae01..f6eccafc710c2f87fc14fc813de0a3a198de0259 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_route_node.md +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_route_node.md @@ -1,25 +1,70 @@ # AudioRouteNode -## **概述** +## 概述 音频路由节点。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** [Audio](_audio.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [portId](_audio.md#portid-44) | 音频端口ID。 | -| [role](_audio.md#role) | 指定端口角色为sink或source。 | -| [type](_audio.md#type-33) | 指定端口类型。 | -| [device](_audio.md#device) | 设备特定信息。 | -| [mix](_audio.md#mix) | 音轨特定信息。 | -| [session](_audio.md#session) | 会话特定信息。 | +| [portId](#portid) | int
音频端口ID。  | +| [role](#role) | enum [AudioPortRole](_audio.md#audioportrole)
指定端口角色为发送端或接收端,详情参考[AudioPortRole](_audio.md#audioportrole)。  | +| [type](#type) | enum [AudioPortType](_audio.md#audioporttype)
指定端口类型可以为设备类型、复合类型、绘画类型,详情参考[AudioPortType](_audio.md#audioporttype)。  | +| [ext](#ext) | struct [AudioInfo](_audio_info.md)
音频端口特定信息,详情参考[AudioInfo](_audio_info.md)。  | + + +## 类成员变量说明 + + +### ext + + +``` +struct AudioInfo AudioRouteNode::ext +``` +**描述:** +音频端口特定信息,详情参考[AudioInfo](_audio_info.md)。 + + +### portId + + +``` +int AudioRouteNode::portId +``` +**描述:** +音频端口ID。 + + +### role + + +``` +enum AudioPortRole AudioRouteNode::role +``` +**描述:** +指定端口角色为发送端或接收端,详情参考[AudioPortRole](_audio.md#audioportrole)。 + + +### type + + +``` +enum AudioPortType AudioRouteNode::type +``` +**描述:** +指定端口类型可以为设备类型、复合类型、绘画类型,详情参考[AudioPortType](_audio.md#audioporttype)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_sample_attributes.md b/zh-cn/device-dev/reference/hdi-apis/_audio_sample_attributes.md index 4ac66a50a5523a64b15e4f61822c817461bf60c1..2acc68f3c056a37af037c81a7c87451619ebfcd7 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_sample_attributes.md +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_sample_attributes.md @@ -1,32 +1,169 @@ # AudioSampleAttributes -## **概述** +## 概述 音频采样属性。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** [Audio](_audio.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [type](_audio.md#type-13) | 音频类型。 | -| [interleaved](_audio.md#interleaved) | 音频数据交织的标记。 | -| [format](_audio.md#format) | 音频数据格式。 | -| [sampleRate](_audio.md#samplerate) | 音频采样频率。 | -| [channelCount](_audio.md#channelcount-12) | 音频通道数目,如单通道(mono)为1、立体声(stereo)为2。 | -| [period](_audio.md#period) | 音频采样周期。 | -| [frameSize](_audio.md#framesize) | 音频数据的帧大小。 | -| [isBigEndian](_audio.md#isbigendian) | 音频数据的大端标志。 | -| [isSignedData](_audio.md#issigneddata) | 音频数据的有符号或无符号标志。 | -| [startThreshold](_audio.md#startthreshold) | 音频渲染开始阈值。 | -| [stopThreshold](_audio.md#stopthreshold) | 音频渲染停止阈值。 | -| [silenceThreshold](_audio.md#silencethreshold) | 音频捕获缓冲区阈值。 | -| [streamId](_audio.md#streamid-12) | 渲染或捕获的音频标识符。 | +| [type](#type) | enum [AudioCategory](_audio.md#audiocategory)
音频类型,详情参考[AudioCategory](_audio.md#audiocategory)。  | +| [interleaved](#interleaved) | boolean
音频数据交织的标记。  | +| [format](#format) | enum [AudioFormat](_audio.md#audioformat)
音频数据格式,详情参考[AudioFormat](_audio.md#audioformat)。  | +| [sampleRate](#samplerate) | unsigned int
音频采样频率。  | +| [channelCount](#channelcount) | unsigned int
音频通道数目,如单通道为1、立体声为2。  | +| [period](#period) | unsigned int
音频采样周期,单位赫兹。  | +| [frameSize](#framesize) | unsigned int
音频数据的帧大小。  | +| [isBigEndian](#isbigendian) | boolean
音频数据的大端标志。  | +| [isSignedData](#issigneddata) | boolean
音频数据有符号或无符号标志。  | +| [startThreshold](#startthreshold) | unsigned int
音频播放起始阈值。  | +| [stopThreshold](#stopthreshold) | unsigned int
音频播放停止阈值。  | +| [silenceThreshold](#silencethreshold) | unsigned int
录音缓冲区阈值。  | +| [streamId](#streamid) | int
录音或播放的标识符。  | + + +## 类成员变量说明 + + +### channelCount + + +``` +unsigned int AudioSampleAttributes::channelCount +``` +**描述:** +音频通道数目,如单通道为1、立体声为2。 + + +### format + + +``` +enum AudioFormat AudioSampleAttributes::format +``` +**描述:** +音频数据格式,详情参考[AudioFormat](_audio.md#audioformat)。 + + +### frameSize + + +``` +unsigned int AudioSampleAttributes::frameSize +``` +**描述:** +音频数据的帧大小。 + + +### interleaved + + +``` +boolean AudioSampleAttributes::interleaved +``` +**描述:** +音频数据交织的标记。 + + +### isBigEndian + + +``` +boolean AudioSampleAttributes::isBigEndian +``` +**描述:** +音频数据的大端标志。 + + +### isSignedData + + +``` +boolean AudioSampleAttributes::isSignedData +``` +**描述:** +音频数据有符号或无符号标志。 + + +### period + + +``` +unsigned int AudioSampleAttributes::period +``` +**描述:** +音频采样周期,单位赫兹。 + + +### sampleRate + + +``` +unsigned int AudioSampleAttributes::sampleRate +``` +**描述:** +音频采样频率。 + + +### silenceThreshold + + +``` +unsigned int AudioSampleAttributes::silenceThreshold +``` +**描述:** +录音缓冲区阈值。 + + +### startThreshold + + +``` +unsigned int AudioSampleAttributes::startThreshold +``` +**描述:** +音频播放起始阈值。 + + +### stopThreshold + + +``` +unsigned int AudioSampleAttributes::stopThreshold +``` +**描述:** +音频播放停止阈值。 + + +### streamId + + +``` +int AudioSampleAttributes::streamId +``` +**描述:** +录音或播放的标识符。 + + +### type + + +``` +enum AudioCategory AudioSampleAttributes::type +``` +**描述:** +音频类型,详情参考[AudioCategory](_audio.md#audiocategory)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_scene.md b/zh-cn/device-dev/reference/hdi-apis/_audio_scene.md deleted file mode 100644 index f2bf7f3c7639d81dbe4f3ef17c511659dbcf02d3..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_scene.md +++ /dev/null @@ -1,97 +0,0 @@ -# AudioScene - - -## **概述** - -AudioScene音频场景接口。 - -提供音频播放(Render)或录音(Capture)需要的公共场景驱动能力,包括选择音频场景等。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| ([CheckSceneCapability](#checkscenecapability))(AudioHandle handle, const struct AudioSceneDescriptor \*scene, bool \*supported) | 是否支持某个音频场景的配置 | -| ([SelectScene](#selectscene))(AudioHandle handle, const struct AudioSceneDescriptor \*scene) | 选择音频场景 | - - -## **类成员变量说明** - - -### CheckSceneCapability - - -``` -int32_t(* AudioScene::CheckSceneCapability) (AudioHandle handle, const struct AudioSceneDescriptor *scene, bool *supported) -``` - -**描述:** - -是否支持某个音频场景的配置。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| scene | 输入参数,待获取的音频场景描述符。 | -| supported | 输出参数,是否支持的状态保存到supported中,true表示支持,false表示不支持。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[SelectScene](#selectscene) - - -### SelectScene - - -``` -int32_t(* AudioScene::SelectScene) (AudioHandle handle, const struct AudioSceneDescriptor *scene) -``` - -**描述:** - -选择音频场景。 - -- 选择一个非常具体的音频场景(应用场景和输出设备的组合),例如同样是使用手机中的喇叭作为输出设备: - - 在媒体播放场景scene为media_speaker - - 在语音通话免提场景scene为voice_speaker - -- 只是选择一个音频场景,例如使用场景为媒体播放(media)、电影播放(movie)、游戏播放(game)。 - -- 只是选择一个音频输出设备,例如输出设备为听筒(receiver)、喇叭(speaker)、有线耳机(headset)。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| scene | 输入参数,待设置的音频场景描述符。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[CheckSceneCapability](#checkscenecapability) diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_scene_descriptor.md b/zh-cn/device-dev/reference/hdi-apis/_audio_scene_descriptor.md index 3910b9897ea0b8337de6762bd93282530c1620c8..f31b4fb415ea38d32faca812197232215e66c616 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_scene_descriptor.md +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_scene_descriptor.md @@ -1,28 +1,48 @@ # AudioSceneDescriptor -## **概述** +## 概述 音频场景描述符。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** [Audio](_audio.md) -## **汇总** +## 汇总 -### 类 +### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [SceneDesc](union_audio_scene_descriptor_1_1_scene_desc.md) | 音频场景描述 | +| [scene](#scene) | union [SceneDesc](union_scene_desc.md)
音频场景描述,详情参考[SceneDesc](union_scene_desc.md)。  | +| [desc](#desc) | struct [AudioDeviceDescriptor](_audio_device_descriptor.md)
音频设备描述符,详情参考[AudioDeviceDescriptor](_audio_device_descriptor.md)。  | -### Public 属性 +## 类成员变量说明 - | 名称 | 描述 | -| -------- | -------- | -| [scene](_audio.md#scene) | 音频场景的名称。 | -| [desc](_audio.md#desc-25) | 音频设备描述符。 | + +### desc + + +``` +struct AudioDeviceDescriptor AudioSceneDescriptor::desc +``` +**描述:** +音频设备描述符,详情参考[AudioDeviceDescriptor](_audio_device_descriptor.md)。 + + +### scene + + +``` +union SceneDesc AudioSceneDescriptor::scene +``` +**描述:** +音频场景描述,详情参考[SceneDesc](union_scene_desc.md)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_session_ext_info.md b/zh-cn/device-dev/reference/hdi-apis/_audio_session_ext_info.md index dbb96a35bdb71174a5dd356e90dadecc45bb7c75..6f777d5785b9085d3faff8940e8bee2130703ba0 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_session_ext_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_session_ext_info.md @@ -1,20 +1,37 @@ # AudioSessionExtInfo -## **概述** +## 概述 会话拓展信息。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** [Audio](_audio.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [sessionType](_audio.md#sessiontype) | 音频会话类型。 | +| [sessionType](#sessiontype) | enum [AudioSessionType](_audio.md#audiosessiontype)
音频会话类型,详情参考[AudioSessionType](_audio.md#audiosessiontype)。  | + + +## 类成员变量说明 + + +### sessionType + + +``` +enum AudioSessionType AudioSessionExtInfo::sessionType +``` +**描述:** +音频会话类型,详情参考[AudioSessionType](_audio.md#audiosessiontype)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_sub_port_capability.md b/zh-cn/device-dev/reference/hdi-apis/_audio_sub_port_capability.md index 33da2e3ebea88ca10826c778d97f7d71d9904844..51b611ff8e84fee162c6581d234bd0813dc2034e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_sub_port_capability.md +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_sub_port_capability.md @@ -1,22 +1,59 @@ # AudioSubPortCapability -## **概述** +## 概述 音频子端口的支持能力。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** [Audio](_audio.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [portId](_audio.md#portid-34) | 子端口ID。 | -| [desc](_audio.md#desc-45) | 以字符串命名的子端口。 | -| [mask](_audio.md#mask) | 数据透传模式。 | +| [portId](#portid) | unsigned int
子端口ID。  | +| [desc](#desc) | String
以字符串命名的子端口。  | +| [mask](#mask) | enum [AudioPortPassthroughMode](_audio.md#audioportpassthroughmode)
数据透传模式,详情参考[AudioPortPassthroughMode](_audio.md#audioportpassthroughmode)。  | + + +## 类成员变量说明 + + +### desc + + +``` +String AudioSubPortCapability::desc +``` +**描述:** +以字符串命名的子端口。 + + +### mask + + +``` +enum AudioPortPassthroughMode AudioSubPortCapability::mask +``` +**描述:** +数据透传模式,详情参考[AudioPortPassthroughMode](_audio.md#audioportpassthroughmode)。 + + +### portId + + +``` +unsigned int AudioSubPortCapability::portId +``` +**描述:** +子端口ID。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_time_stamp.md b/zh-cn/device-dev/reference/hdi-apis/_audio_time_stamp.md index 72f9c7d1b2bb9ef87d876e46620328874560c25d..d0357959d5851c14930fdbe4b4f39b2ce80bae2f 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_time_stamp.md +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_time_stamp.md @@ -1,23 +1,50 @@ # AudioTimeStamp -## **概述** +## 概述 音频时间戳。 时间定义,POSIX timespec的替代品。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** [Audio](_audio.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [tvSec](_audio.md#tvsec) | tvSec时间,单位:秒。 | -| [tvNSec](_audio.md#tvnsec) | tvNSec时间,单位:纳秒。 | +| [tvSec](#tvsec) | long
tvSec时间,单位:秒。  | +| [tvNSec](#tvnsec) | long
tvNSec时间,单位:纳秒。  | + + +## 类成员变量说明 + + +### tvNSec + + +``` +long AudioTimeStamp::tvNSec +``` +**描述:** +tvNSec时间,单位:纳秒。 + + +### tvSec + + +``` +long AudioTimeStamp::tvSec +``` +**描述:** +tvSec时间,单位:秒。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_audio_types_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..66c6dff7f4a8c5088f51b27e055f69d62286e737 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_audio_types_8idl.md @@ -0,0 +1,75 @@ +# AudioTypes.idl + + +## 概述 + +Audio模块接口定义中使用的数据类型,包括音频端口、适配器描述符、设备描述符、场景描述符、采样属性、时间戳等。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [AudioDeviceStatus](_audio_device_status.md) | struct
音频设备状态。 | +| [SceneDesc](union_scene_desc.md) | union
音频场景描述。 | +| [AudioPort](_audio_port.md) | struct
音频端口。 | +| [AudioAdapterDescriptor](_audio_adapter_descriptor.md) | struct
音频适配器描述符。 | +| [AudioDeviceDescriptor](_audio_device_descriptor.md) | struct
音频设备描述符。 | +| [AudioSceneDescriptor](_audio_scene_descriptor.md) | struct
音频场景描述符。 | +| [AudioSampleAttributes](_audio_sample_attributes.md) | struct
音频采样属性。 | +| [AudioTimeStamp](_audio_time_stamp.md) | struct
音频时间戳。 | +| [AudioSubPortCapability](_audio_sub_port_capability.md) | struct
音频子端口的支持能力。 | +| [AudioPortCapability](_audio_port_capability.md) | struct
音频端口的支持能力。 | +| [AudioMmapBufferDescripter](_audio_mmap_buffer_descripter.md) | struct
mmap缓冲区描述符。 | +| [AudioDevExtInfo](_audio_dev_ext_info.md) | struct
音频设备拓展信息。 | +| [AudioMixExtInfo](_audio_mix_ext_info.md) | struct
音轨拓展信息。 | +| [AudioSessionExtInfo](_audio_session_ext_info.md) | struct
会话拓展信息。 | +| [AudioInfo](_audio_info.md) | struct
音频端口特定信息。 | +| [AudioRouteNode](_audio_route_node.md) | struct
音频路由节点。 | +| [AudioRoute](_audio_route.md) | struct
音频路由信息。 | +| [AudioEvent](_audio_event.md) | struct
音频事件。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [AudioPortDirection](_audio.md#audioportdirection) { PORT_OUT = 1 , PORT_IN = 2 , PORT_OUT_IN = 3 } | 音频端口的类型。 | +| [AudioPortPin](_audio.md#audioportpin) {
PIN_NONE = 0 , PIN_OUT_SPEAKER = 1 , PIN_OUT_HEADSET = 2 , PIN_OUT_LINEOUT = 4 ,
PIN_OUT_HDMI = 8 , PIN_IN_MIC = 134217729 , PIN_IN_HS_MIC = 134217730 , PIN_IN_LINEIN = 134217732 ,
PIN_IN_USB_EXT = 134217736
} | 音频端口上的Pin脚。 | +| [AudioCategory](_audio.md#audiocategory) { AUDIO_IN_MEDIA = 0 , AUDIO_IN_COMMUNICATION = 1 , AUDIO_IN_RINGTONE = 2 , AUDIO_IN_CALL = 3 } | 音频类型(场景)。 | +| [AudioFormat](_audio.md#audioformat) {
AUDIO_FORMAT_PCM_8_BIT = 1 , AUDIO_FORMAT_PCM_16_BIT = 2 , AUDIO_FORMAT_PCM_24_BIT = 3 , AUDIO_FORMAT_PCM_32_BIT = 4 ,
AUDIO_FORMAT_AAC_MAIN = 16777217 , AUDIO_FORMAT_AAC_LC = 16777218 , AUDIO_FORMAT_AAC_LD = 16777219 , AUDIO_FORMAT_AAC_ELD = 16777220 ,
AUDIO_FORMAT_AAC_HE_V1 = 16777221 , AUDIO_FORMAT_AAC_HE_V2 = 16777222 , AUDIO_FORMAT_G711A = 33554433 , AUDIO_FORMAT_G711U = 33554434 ,
AUDIO_FORMAT_G726 = 33554435
} | 音频格式。 | +| [AudioChannelMask](_audio.md#audiochannelmask) { AUDIO_CHANNEL_FRONT_LEFT = 1 , AUDIO_CHANNEL_FRONT_RIGHT = 2 , AUDIO_CHANNEL_MONO = 1 , AUDIO_CHANNEL_STEREO = 3 } | 音频通道掩码。 | +| [AudioSampleRatesMask](_audio.md#audiosampleratesmask) {
AUDIO_SAMPLE_RATE_MASK_8000 = 1 << 0 , AUDIO_SAMPLE_RATE_MASK_12000 = 1 << 1 , AUDIO_SAMPLE_RATE_MASK_11025 = 1 << 2 , AUDIO_SAMPLE_RATE_MASK_16000 = 1 << 3 ,
AUDIO_SAMPLE_RATE_MASK_22050 = 1 << 4 , AUDIO_SAMPLE_RATE_MASK_24000 = 1 << 5 , AUDIO_SAMPLE_RATE_MASK_32000 = 1 << 6 , AUDIO_SAMPLE_RATE_MASK_44100 = 1 << 7 ,
AUDIO_SAMPLE_RATE_MASK_48000 = 1 << 8 , AUDIO_SAMPLE_RATE_MASK_64000 = 1 << 9 , AUDIO_SAMPLE_RATE_MASK_96000 = 1 << 10 , AUDIO_SAMPLE_RATE_MASK_INVALID = 4294967295
} | 音频采样频率掩码。 | +| [AudioPortPassthroughMode](_audio.md#audioportpassthroughmode) { PORT_PASSTHROUGH_LPCM = 1 , PORT_PASSTHROUGH_RAW = 2 , PORT_PASSTHROUGH_HBR2LBR = 4 , PORT_PASSTHROUGH_AUTO = 8 } | 音频端口的数据透传模式。 | +| [AudioDeviceType](_audio.md#audiodevicetype) {
AUDIO_LINEOUT = 1 << 0 , AUDIO_HEADPHONE = 1 << 1 , AUDIO_HEADSET = 1 << 2 , AUDIO_USB_HEADSET = 1 << 3 ,
AUDIO_USB_HEADPHONE = 1 << 4 , AUDIO_USBA_HEADSET = 1 << 5 , AUDIO_USBA_HEADPHONE = 1 << 6 , AUDIO_PRIMARY_DEVICE = 1 << 7 ,
AUDIO_USB_DEVICE = 1 << 8 , AUDIO_A2DP_DEVICE = 1 << 9 , AUDIO_DEVICE_UNKOWN
} | 音频设备类型。 | +| [AudioEventType](_audio.md#audioeventtype) {
AUDIO_DEVICE_ADD = 1 , AUDIO_DEVICE_REMOVE = 2 , AUDIO_LOAD_SUCCESS = 3 , AUDIO_LOAD_FAILURE = 4 ,
AUDIO_UNLOAD = 5 , AUDIO_SERVICE_VALID = 7 , AUDIO_SERVICE_INVALID = 8 , AUDIO_CAPTURE_THRESHOLD = 9 ,
AUDIO_EVENT_UNKOWN = 10
} | 音频事件类型。 | +| [AudioExtParamKey](_audio.md#audioextparamkey) {
AUDIO_EXT_PARAM_KEY_NONE = 0 , AUDIO_EXT_PARAM_KEY_VOLUME = 1 , AUDIO_EXT_PARAM_KEY_FOCUS = 2 , AUDIO_EXT_PARAM_KEY_BUTTON = 3 ,
AUDIO_EXT_PARAM_KEY_EFFECT = 4 , AUDIO_EXT_PARAM_KEY_STATUS = 5 , AUDIO_EXT_PARAM_KEY_LOWPOWER = 1000
} | 音频扩展参数键类型。 | +| [AudioSampleFormat](_audio.md#audiosampleformat) {
AUDIO_SAMPLE_FORMAT_S8 = 0 , AUDIO_SAMPLE_FORMAT_S8P = 1 , AUDIO_SAMPLE_FORMAT_U8 = 2 , AUDIO_SAMPLE_FORMAT_U8P = 3 ,
AUDIO_SAMPLE_FORMAT_S16 = 4 , AUDIO_SAMPLE_FORMAT_S16P = 5 , AUDIO_SAMPLE_FORMAT_U16 = 6 , AUDIO_SAMPLE_FORMAT_U16P = 7 ,
AUDIO_SAMPLE_FORMAT_S24 = 8 , AUDIO_SAMPLE_FORMAT_S24P = 9 , AUDIO_SAMPLE_FORMAT_U24 = 10 , AUDIO_SAMPLE_FORMAT_U24P = 11 ,
AUDIO_SAMPLE_FORMAT_S32 = 12 , AUDIO_SAMPLE_FORMAT_S32P = 13 , AUDIO_SAMPLE_FORMAT_U32 = 14 , AUDIO_SAMPLE_FORMAT_U32P = 15 ,
AUDIO_SAMPLE_FORMAT_S64 = 16 , AUDIO_SAMPLE_FORMAT_S64P = 17 , AUDIO_SAMPLE_FORMAT_U64 = 18 , AUDIO_SAMPLE_FORMAT_U64P = 19 ,
AUDIO_SAMPLE_FORMAT_F32 = 20 , AUDIO_SAMPLE_FORMAT_F32P = 21 , AUDIO_SAMPLE_FORMAT_F64 = 22 , AUDIO_SAMPLE_FORMAT_F64P = 23
} | 原始音频样本格式。 | +| [AudioChannelMode](_audio.md#audiochannelmode) {
AUDIO_CHANNEL_NORMAL = 0 , AUDIO_CHANNEL_BOTH_LEFT , AUDIO_CHANNEL_BOTH_RIGHT , AUDIO_CHANNEL_EXCHANGE ,
AUDIO_CHANNEL_MIX , AUDIO_CHANNEL_LEFT_MUTE , AUDIO_CHANNEL_RIGHT_MUTE , AUDIO_CHANNEL_BOTH_MUTE
} | 音频播放的通道模式。 | +| [AudioDrainNotifyType](_audio.md#audiodrainnotifytype) { AUDIO_DRAIN_NORMAL_MODE , AUDIO_DRAIN_EARLY_MODE } | 音频数据结束类型。 | +| [AudioCallbackType](_audio.md#audiocallbacktype) {
AUDIO_NONBLOCK_WRITE_COMPELETED , AUDIO_DRAIN_COMPELETED , AUDIO_FLUSH_COMPLETED , AUDIO_RENDER_FULL ,
AUDIO_ERROR_OCCUR
} | 回调函数通知事件类型。 | +| [AudioPortRole](_audio.md#audioportrole) { AUDIO_PORT_UNASSIGNED_ROLE = 0 , AUDIO_PORT_SOURCE_ROLE = 1 , AUDIO_PORT_SINK_ROLE = 2 } | 音频端口角色。 | +| [AudioPortType](_audio.md#audioporttype) { AUDIO_PORT_UNASSIGNED_TYPE = 0 , AUDIO_PORT_DEVICE_TYPE = 1 , AUDIO_PORT_MIX_TYPE = 2 , AUDIO_PORT_SESSION_TYPE = 3 } | 音频端口类型。 | +| [AudioSessionType](_audio.md#audiosessiontype) { AUDIO_OUTPUT_STAGE_SESSION = 0 , AUDIO_OUTPUT_MIX_SESSION , AUDIO_ALLOCATE_SESSION , AUDIO_INVALID_SESSION } | 端口会话类型。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.audio.v1_0 | 音频接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_audio_volume.md b/zh-cn/device-dev/reference/hdi-apis/_audio_volume.md deleted file mode 100644 index 677f5f1999aee3d67a1d6ed0df577ca08eafde16..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_audio_volume.md +++ /dev/null @@ -1,239 +0,0 @@ -# AudioVolume - - -## **概述** - -AudioVolume音频音量接口。 - -提供音频播放(Render)或录音(Capture)需要的公共音量驱动能力,包括静音操作、设置音量、设置增益等。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| ([SetMute](#setmute))(AudioHandle handle, bool mute) | 设置音频的静音状态 | -| ([GetMute](#getmute))(AudioHandle handle, bool \*mute) | 获取音频的静音状态 | -| ([SetVolume](#setvolume))(AudioHandle handle, float volume) | 设置一个音频流的音量 | -| ([GetVolume](#getvolume))(AudioHandle handle, float \*volume) | 获取一个音频流的音量 | -| ([GetGainThreshold](#getgainthreshold))(AudioHandle handle, float \*min, float \*max) | 获取音频流增益的阈值 | -| ([GetGain](#getgain))(AudioHandle handle, float \*gain) | 获取音频流的增益 | -| ([SetGain](#setgain))(AudioHandle handle, float gain) | 设置音频流的增益 | - - -## **类成员变量说明** - - -### GetGain - - -``` -int32_t(* AudioVolume::GetGain) (AudioHandle handle, float *gain) -``` - -**描述:** - -获取音频流的增益。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| gain | 输出参数,保存当前获取到的增益到gain中。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[GetGainThreshold](#getgainthreshold) - -[SetGain](#setgain) - - -### GetGainThreshold - - -``` -int32_t(* AudioVolume::GetGainThreshold) (AudioHandle handle, float *min, float *max) -``` - -**描述:** - -获取音频流增益的阈值。 - -在具体的功能实现中,可以根据芯片平台的实际情况来进行处理: - -- 可以使用实际的增益值,例如增益的范围为-50db ~ 6db。 - -- 也可以将增益范围设定为0.0~1.0,如果增益的范围为-50db ~ 6db, 则增益的映射关系为0.0表示静音,1.0表示最大增益(6db)。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| min | 输出参数,获取的音频增益的阈值下限保存到min中。 | -| max | 输出参数,获取的音频增益的阈值上限保存到max中。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[GetGain](#getgain) - -[SetGain](#setgain) - - -### GetMute - - -``` -int32_t(* AudioVolume::GetMute) (AudioHandle handle, bool *mute) -``` - -**描述:** - -获取音频的静音状态。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| mute | 输出参数,获取的静音状态保存到mute中,true表示静音操作,false表示取消静音操作。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[SetMute](#setmute) - - -### GetVolume - - -``` -int32_t(* AudioVolume::GetVolume) (AudioHandle handle, float *volume) -``` - -**描述:** - -获取一个音频流的音量。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| volume | 输出参数,获取的音量保存到volume中,范围0.0~1.0。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[SetVolume](#setvolume) - - -### SetGain - - -``` -int32_t(* AudioVolume::SetGain) (AudioHandle handle, float gain) -``` - -**描述:** - -设置音频流的增益。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| gain | 输入参数,待设置的增益。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[GetGainThreshold](#getgainthreshold) - -[GetGain](#getgain) - - -### SetMute - - -``` -int32_t(* AudioVolume::SetMute) (AudioHandle handle, bool mute) -``` - -**描述:** - -设置音频的静音状态。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| mute | 输入参数,待设置的静音状态,true表示静音操作,false表示取消静音操作。 | - -**返回:** - -成功返回值0,失败返回负值。 - -**参见:** - -[GetMute](#getmute) - - -### SetVolume - - -``` -int32_t(* AudioVolume::SetVolume) (AudioHandle handle, float volume) -``` - -**描述:** - -设置一个音频流的音量。 - -音量的取值范围是0.0~1.0,如果音频服务中的音量等级为15级(0 ~ 15),则音量的映射关系为0.0表示静音,1.0表示最大音量等级(15)。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| handle | 输入参数,待操作的音频句柄。 | -| volume | 输入参数,待设置的音量,范围0.0~1.0。 | - -**返回:** - -成功返回值0,失败返回负值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_auth_result_info.md b/zh-cn/device-dev/reference/hdi-apis/_auth_result_info.md index add4d4a1fa15af78a2eea1d0258a4d3966ff6d63..d80012c865519a39632506a5f2c32fda44b8de08 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_auth_result_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_auth_result_info.md @@ -1,39 +1,35 @@ # AuthResultInfo -## **概述** +## 概述 用户身份认证结果信息。 -**Since:** - +**Since:** 3.2 - -**Version:** - +**Version:** 1.0 - -**所属模块:** +**相关模块:** [HdfUserAuth](_hdf_user_auth.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [result](#result) | 用户身份认证结果。 | -| [freezingTime](#freezingtime) | 认证方式被冻结的时间。 | -| [remainTimes](#remaintimes) | 认证方式距离被冻结的可处理认证请求次数。 | -| [msgs](#msgs) | 执行器发送的消息。 | -| [token](#token) | 用户身份认证令牌。 | -| [rootSecret](#rootsecret) | 保护文件加密密钥的密钥。 | +| [result](#result) | unsigned int
用户身份认证结果。  | +| [freezingTime](#freezingtime) | int
认证方式被冻结的时间。  | +| [remainTimes](#remaintimes) | int
认证方式距离被冻结的可处理认证请求次数。  | +| [msgs](#msgs) | struct [ExecutorSendMsg](_executor_send_msg.md)[]
执行器发送的消息。  | +| [token](#token) | unsigned char[]
用户身份认证令牌。  | +| [rootSecret](#rootsecret) | unsigned char[]
保护文件加密密钥的密钥。  | -## **类成员变量说明** +## 类成员变量说明 ### freezingTime @@ -42,9 +38,7 @@ ``` int AuthResultInfo::freezingTime ``` - -**描述:** - +**描述:** 认证方式被冻结的时间。 @@ -54,9 +48,7 @@ int AuthResultInfo::freezingTime ``` struct ExecutorSendMsg [] AuthResultInfo::msgs ``` - -**描述:** - +**描述:** 执行器发送的消息。 @@ -66,9 +58,7 @@ struct ExecutorSendMsg [] AuthResultInfo::msgs ``` int AuthResultInfo::remainTimes ``` - -**描述:** - +**描述:** 认证方式距离被冻结的可处理认证请求次数。 @@ -78,31 +68,25 @@ int AuthResultInfo::remainTimes ``` unsigned int AuthResultInfo::result ``` - -**描述:** - +**描述:** 用户身份认证结果。 -### token +### rootSecret ``` -unsigned char [] AuthResultInfo::token +unsigned char [] AuthResultInfo::rootSecret ``` - -**描述:** - -用户身份认证令牌。 +**描述:** +保护文件加密密钥的密钥。 -### rootSecret +### token ``` -unsigned char [] AuthResultInfo::rootSecret +unsigned char [] AuthResultInfo::token ``` - -**描述:** - -保护文件加密密钥的密钥。 +**描述:** +用户身份认证令牌。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_auth_solution.md b/zh-cn/device-dev/reference/hdi-apis/_auth_solution.md index 623a2e8497137c71597eaafada3341487173630f..509c9b4dcb935112ebddb398579e37629448439b 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_auth_solution.md +++ b/zh-cn/device-dev/reference/hdi-apis/_auth_solution.md @@ -1,38 +1,34 @@ # AuthSolution -## **概述** +## 概述 认证方案。 -**Since:** - +**Since:** 3.2 - -**Version:** - +**Version:** 1.0 - -**所属模块:** +**相关模块:** [HdfUserAuth](_hdf_user_auth.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [userId](#userid) | 用户ID。 | -| [authTrustLevel](#authtrustlevel) | 认证结果可信等级。 | -| [authType](#authtype) | 用户认证凭据类型。 | -| [executorSensorHint](#executorsensorhint) | 既定用户认证凭据类型的执行器传感器提示,用于找到对应认证方式的传感器。 | -| [challenge](#challenge) | 挑战值,用于签发认证令牌。 | +| [userId](#userid) | int
用户ID。  | +| [authTrustLevel](#authtrustlevel) | unsigned int
认证结果可信等级。  | +| [authType](#authtype) | enum [AuthType](_hdf_user_auth.md#authtype)
用户认证凭据类型AuthType}。  | +| [executorSensorHint](#executorsensorhint) | unsigned int
既定用户认证凭据类型的执行器传感器提示,用于找到对应认证方式的传感器。  | +| [challenge](#challenge) | unsigned char[]
挑战值,用于签发认证令牌。  | -## **类成员变量说明** +## 类成员变量说明 ### authTrustLevel @@ -41,9 +37,7 @@ ``` unsigned int AuthSolution::authTrustLevel ``` - -**描述:** - +**描述:** 认证结果可信等级。 @@ -53,10 +47,8 @@ unsigned int AuthSolution::authTrustLevel ``` enum AuthType AuthSolution::authType ``` - -**描述:** - -用户认证凭据类型[AuthType](_hdf_user_auth.md#authtype)。 +**描述:** +用户认证凭据类型AuthType}。 ### challenge @@ -65,9 +57,7 @@ enum AuthType AuthSolution::authType ``` unsigned char [] AuthSolution::challenge ``` - -**描述:** - +**描述:** 挑战值,用于签发认证令牌。 @@ -77,9 +67,7 @@ unsigned char [] AuthSolution::challenge ``` unsigned int AuthSolution::executorSensorHint ``` - -**描述:** - +**描述:** 既定用户认证凭据类型的执行器传感器提示,用于找到对应认证方式的传感器。 @@ -89,7 +77,5 @@ unsigned int AuthSolution::executorSensorHint ``` int AuthSolution::userId ``` - -**描述:** - +**描述:** 用户ID。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_available_network_info.md b/zh-cn/device-dev/reference/hdi-apis/_available_network_info.md new file mode 100644 index 0000000000000000000000000000000000000000..0329b72ee5c76825fbc5d5e6817bd8dbb7b9fdbf --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_available_network_info.md @@ -0,0 +1,77 @@ +# AvailableNetworkInfo + + +## 概述 + +可用网络信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [longName](#longname) | String
获取注册网络的长字母数字格式名称  | +| [shortName](#shortname) | String
获取注册网络的短字母数字格式名称  | +| [numeric](#numeric) | String
可用网络编号  | +| [status](#status) | int
网络状态,具体查看[RilRegStatus](_ril.md#rilregstatus) | +| [rat](#rat) | int
语音接入技术类型,具体查看[RilRadioTech](_ril.md#rilradiotech) | + + +## 类成员变量说明 + + +### longName + + +``` +String AvailableNetworkInfo::longName +``` +**描述:** +获取注册网络的长字母数字格式名称 + + +### numeric + + +``` +String AvailableNetworkInfo::numeric +``` +**描述:** +可用网络编号 + + +### rat + + +``` +int AvailableNetworkInfo::rat +``` +**描述:** +语音接入技术类型,具体查看[RilRadioTech](_ril.md#rilradiotech) + + +### shortName + + +``` +String AvailableNetworkInfo::shortName +``` +**描述:** +获取注册网络的短字母数字格式名称 + + +### status + + +``` +int AvailableNetworkInfo::status +``` +**描述:** +网络状态,具体查看[RilRegStatus](_ril.md#rilregstatus) diff --git a/zh-cn/device-dev/reference/hdi-apis/_available_network_list.md b/zh-cn/device-dev/reference/hdi-apis/_available_network_list.md new file mode 100644 index 0000000000000000000000000000000000000000..543486402f7281377f91411042551fa8ed7dd5a2 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_available_network_list.md @@ -0,0 +1,61 @@ +# AvailableNetworkList + + +## 概述 + +可用网络列表。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [itemNum](#itemnum) | int
编号 | +| [availableNetworkInfo](#availablenetworkinfo) | List< struct [AvailableNetworkInfo](_available_network_info.md) >
可用网络列表信息, | +| [flag](#flag) | int
网络列表标识位 | + + +## 类成员变量说明 + + +### availableNetworkInfo + + +``` +List AvailableNetworkList::availableNetworkInfo +``` + +**描述:** + +可用网络列表信息 + + +### flag + + +``` +int AvailableNetworkList::flag +``` + +**描述:** + +网络列表标识位 + + +### itemNum + + +``` +int AvailableNetworkList::itemNum +``` + +**描述:** + +编号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_avg_pool_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_avg_pool_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..bee2119d493edbbbd727abe504781b71f770f2fc --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_avg_pool_fusion.md @@ -0,0 +1,146 @@ +# AvgPoolFusion + + +## 概述 + +在输入tensor上应用 2D 平均池化。支持int8量化输入。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_AVGPOOL_FUSION。 + +参数限制:当padMode==PAD_MODE_PAD时,padList的数值必须大于等于0。其他情况下padding的数值必须为0。 + +输入: + +- x,n维张量。 + +输出: + +- output, 输出平均池化后的张量。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [kernelSize](#kernelsize) | long[]
用来取平均值的kernel大小 | +| [strides](#strides) | long[]
kernel移动的距离 | +| [pad](#pad) | long[]
x周围的填充 | +| [padMode](#padmode) | enum [PadMode](_n_n_rt.md#padmode)
填充模式 | +| [roundMode](#roundmode) | enum [RoundMode](_n_n_rt.md#roundmode)
取整数的算法 | +| [format](#format) | enum [Format](_n_n_rt.md#format)
运算时的数据排列排列,详情请参考:[Format](_n_n_rt.md#format) | +| [global](#global) | boolean
是否是全局池化 | +| [activationType](#activationtype) | enum [ActivationType](_n_n_rt.md#activationtype)
激活函数,详情请参考:[ActivationType](_n_n_rt.md#activationtype) | + + +## 类成员变量说明 + + +### activationType + + +``` +enum ActivationType AvgPoolFusion::activationType +``` + +**描述:** + +激活函数,详情请参考:[ActivationType](_n_n_rt.md#activationtype) + + +### format + + +``` +enum Format AvgPoolFusion::format +``` + +**描述:** + +运算时的数据排列排列,详情请参考:[Format](_n_n_rt.md#format) + + +### global + + +``` +boolean AvgPoolFusion::global +``` + +**描述:** + +是否是全局池化 + + +### kernelSize + + +``` +long [] AvgPoolFusion::kernelSize +``` + +**描述:** + +用来取平均值的kernel大小,是一个长度为2的int数组[kernel_height,kernel_weight], 第一个数表示kernel高度,第二个数表示kernel宽度。 + + +### pad + + +``` +long [] AvgPoolFusion::pad +``` + +**描述:** + +x周围的填充,是一个长度为4的int数组[top,bottom,left,right],并且以最近邻的值填充。 + + +### padMode + + +``` +enum PadMode AvgPoolFusion::padMode +``` + +**描述:** + +填充模式 + + +### roundMode + + +``` +enum RoundMode AvgPoolFusion::roundMode +``` + +**描述:** + +取整数的算法 + + +### strides + + +``` +long [] AvgPoolFusion::strides +``` + +**描述:** + +kernel移动的距离,是一个长度为2的int数组[stride_height,stride_weight], 第一个数表示高度上的移动步幅,第二个数表示宽度上的移动步幅。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_batch_to_space_n_d.md b/zh-cn/device-dev/reference/hdi-apis/_batch_to_space_n_d.md new file mode 100644 index 0000000000000000000000000000000000000000..330569cb69209dbf13f636931e137fb94eb0b6ad --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_batch_to_space_n_d.md @@ -0,0 +1,71 @@ +# BatchToSpaceND + + +## 概述 + +将一个4维tensor的batch维度按block_shape切分成小块,并将这些小块拼接到空间维度。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_BATCH_TO_SPACE_ND。 + +输入: + +- x,n维tensor。 + +输出: + +- 输出张量,假设x的形状为(n,h,w,c),output的形状为(n',h',w',c'): + + - $ n' = n / (block_shape[0] \* block_shape[1]) $ + - $ h' = h \* block_shape[0] - crops[0][0] - crops[0][1] $ + - $ w' = w \* block_shape[1] - crops[1][0] - crops[1][1] $ + - $ c'= c $ + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [blockShape](#blockshape) | long[]
一个长度为2的数组[height_block,weight_block],指定切分到空间维度上的block大小。 | +| [crops](#crops) | long[][]
一个shape为(2,2)的2维数组[[crop0_start,crop0_end],[crop1_start,crop1_end]], 表示在output的空间维度上截掉部分元素。 | + + +## 类成员变量说明 + + +### blockShape + + +``` +long [] BatchToSpaceND::blockShape +``` + +**描述:** + +一个长度为2的数组[height_block,weight_block],指定切分到空间维度上的block大小。 + + +### crops + + +``` +long [][] BatchToSpaceND::crops +``` + +**描述:** + +一个shape为(2,2)的2维数组[[crop0_start,crop0_end],[crop1_start,crop1_end]], 表示在output的空间维度上截掉部分元素。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_battery_info.md b/zh-cn/device-dev/reference/hdi-apis/_battery_info.md index adc0e59b43be9c41ad81db6d428b7a3a6f26cbb9..4caca96ce5c036b1ce19c85e67a3ae3ddee8f616 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_battery_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_battery_info.md @@ -1,44 +1,42 @@ # BatteryInfo -## **概述** +## 概述 电池相关信息。 **Since:** - 3.1 - **相关模块:** [Battery](battery.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [capacity](#capacity) | 表示电池的电量百分比。 | -| [voltage](#voltage) | 表示电池的电压。 | -| [temperature](#temperature) | 表示电池的温度。 | -| [healthState](#healthstate) | 表示电池的健康状态。 | -| [pluggedType](#pluggedtype) | 表示电池的充电设备类型。 | -| [pluggedMaxCurrent](#pluggedmaxcurrent) | 表示电池的最大充电电流。 | -| [pluggedMaxVoltage](#pluggedmaxvoltage) | 表示电池的最大充电电压。 | -| [chargeState](#chargestate) | 表示电池的充电状态。 | -| [chargeCounter](#chargecounter) | 表示电池的充电次数。 | -| [totalEnergy](#totalenergy) | 表示电池的总容量。 | -| [curAverage](#curaverage) | 表示电池的平均电流。 | -| [curNow](#curnow) | 表示电池的实时电流。 | -| [remainEnergy](#remainenergy) | 表示电池的剩余容量。 | -| [present](#present) | 表示是否支持电池或者电池是否在位。 | -| [technology](#technology) | 表示电池的技术型号。 | - - -## **类成员变量说明** +| [capacity](#capacity) | int
表示电池的电量百分比。  | +| [voltage](#voltage) | int
表示电池的电压。  | +| [temperature](#temperature) | int
表示电池的温度  | +| [healthState](#healthstate) | int
表示电池的健康状态。  | +| [pluggedType](#pluggedtype) | int
表示电池的充电设备类型。  | +| [pluggedMaxCurrent](#pluggedmaxcurrent) | int
表示电池的最大充电电流。  | +| [pluggedMaxVoltage](#pluggedmaxvoltage) | int
表示电池的最大充电电压。  | +| [chargeState](#chargestate) | int
表示电池的充电状态。  | +| [chargeCounter](#chargecounter) | int
表示电池的充电次数。  | +| [totalEnergy](#totalenergy) | int
表示电池的总容量。  | +| [curAverage](#curaverage) | int
表示电池的平均电流。  | +| [curNow](#curnow) | int
表示电池的实时电流。  | +| [remainEnergy](#remainenergy) | int
表示电池的剩余容量。  | +| [present](#present) | byte
表示是否支持电池或者电池是否在位。  | +| [technology](#technology) | String
表示电池的技术型号。  | + + +## 类成员变量说明 ### capacity @@ -47,9 +45,7 @@ ``` int BatteryInfo::capacity ``` - -**描述:** - +**描述:** 表示电池的电量百分比。 @@ -59,9 +55,7 @@ int BatteryInfo::capacity ``` int BatteryInfo::chargeCounter ``` - -**描述:** - +**描述:** 表示电池的充电次数。 @@ -71,9 +65,7 @@ int BatteryInfo::chargeCounter ``` int BatteryInfo::chargeState ``` - -**描述:** - +**描述:** 表示电池的充电状态。 @@ -83,9 +75,7 @@ int BatteryInfo::chargeState ``` int BatteryInfo::curAverage ``` - -**描述:** - +**描述:** 表示电池的平均电流。 @@ -95,9 +85,7 @@ int BatteryInfo::curAverage ``` int BatteryInfo::curNow ``` - -**描述:** - +**描述:** 表示电池的实时电流。 @@ -107,9 +95,7 @@ int BatteryInfo::curNow ``` int BatteryInfo::healthState ``` - -**描述:** - +**描述:** 表示电池的健康状态。 @@ -119,9 +105,7 @@ int BatteryInfo::healthState ``` int BatteryInfo::pluggedMaxCurrent ``` - -**描述:** - +**描述:** 表示电池的最大充电电流。 @@ -131,9 +115,7 @@ int BatteryInfo::pluggedMaxCurrent ``` int BatteryInfo::pluggedMaxVoltage ``` - -**描述:** - +**描述:** 表示电池的最大充电电压。 @@ -143,9 +125,7 @@ int BatteryInfo::pluggedMaxVoltage ``` int BatteryInfo::pluggedType ``` - -**描述:** - +**描述:** 表示电池的充电设备类型。 @@ -155,9 +135,7 @@ int BatteryInfo::pluggedType ``` byte BatteryInfo::present ``` - -**描述:** - +**描述:** 表示是否支持电池或者电池是否在位。 @@ -167,9 +145,7 @@ byte BatteryInfo::present ``` int BatteryInfo::remainEnergy ``` - -**描述:** - +**描述:** 表示电池的剩余容量。 @@ -179,9 +155,7 @@ int BatteryInfo::remainEnergy ``` String BatteryInfo::technology ``` - -**描述:** - +**描述:** 表示电池的技术型号。 @@ -191,10 +165,8 @@ String BatteryInfo::technology ``` int BatteryInfo::temperature ``` - -**描述:** - -表示电池的温度。 +**描述:** +表示电池的温度 ### totalEnergy @@ -203,9 +175,7 @@ int BatteryInfo::temperature ``` int BatteryInfo::totalEnergy ``` - -**描述:** - +**描述:** 表示电池的总容量。 @@ -215,7 +185,5 @@ int BatteryInfo::totalEnergy ``` int BatteryInfo::voltage ``` - -**描述:** - +**描述:** 表示电池的电压。 diff --git a/zh-cn/device-dev/reference/hdi-apis/battery_types_idl.md b/zh-cn/device-dev/reference/hdi-apis/_battery_types_8idl.md similarity index 82% rename from zh-cn/device-dev/reference/hdi-apis/battery_types_idl.md rename to zh-cn/device-dev/reference/hdi-apis/_battery_types_8idl.md index c44dc0dd1388dcb423b6b57ecb229727d40a01bf..f9f23474c2a99310f53ded859ae4964a09639dc5 100644 --- a/zh-cn/device-dev/reference/hdi-apis/battery_types_idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_battery_types_8idl.md @@ -1,17 +1,17 @@ # Types.idl -## **概述** +## 概述 电池信息相关数据类型。 电池信息中使用的数据类型,包括健康状态、充电状态、充电设备类型和电池信息结构。 -**Since**: +**Since:** 3.1 -**Version**: +**Version:** 1.0 @@ -20,14 +20,14 @@ [Battery](battery.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [BatteryInfo](_battery_info.md) | 电池相关信息。 | +| [BatteryInfo](_battery_info.md) | struct
电池相关信息。 | ### 枚举 @@ -35,7 +35,7 @@ | 名称 | 描述 | | -------- | -------- | | [BatteryHealthState](battery.md#batteryhealthstate) { BATTERY_HEALTH_UNKNOWN = 0, BATTERY_HEALTH_GOOD, BATTERY_HEALTH_OVERHEAT, BATTERY_HEALTH_OVERVOLTAGE,   BATTERY_HEALTH_COLD, BATTERY_HEALTH_DEAD, BATTERY_HEALTH_RESERVED } | 电池的健康状态。 | -| [BatteryChargeState](battery.md#batterychargestate) { CHARGE_STATE_NONE = 0, CHARGE_STATE_ENABLE, CHARGE_STATE_DISABLE, CHARGE_STATE_FULL,   CHARGE_STATE_RESERVED } | 电池的充电状态。 | +| [BatteryChargeState](battery.md#batterychargestate) { CHARGE_STATE_NONE = 0, CHARGE_STATE_ENABLE, CHARGE_STATE_DISABLE, CHARGE_STATE_FULL, CHARGE_STATE_RESERVED } | 电池的充电状态。 | | [BatteryPluggedType](battery.md#batterypluggedtype) { PLUGGED_TYPE_NONE = 0, PLUGGED_TYPE_AC, PLUGGED_TYPE_USB, PLUGGED_TYPE_WIRELESS,   PLUGGED_TYPE_BUTT } | 电池的充电设备类型。 | @@ -43,4 +43,4 @@ | 名称 | 描述 | | -------- | -------- | -| package ohos.hdi.battery.v1_0 | 电池模块接口的包路径 | +| package ohos.hdi.battery.v1_0 | 电池模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_bias_add.md b/zh-cn/device-dev/reference/hdi-apis/_bias_add.md new file mode 100644 index 0000000000000000000000000000000000000000..5ccc80a8c5910684d4d27e276472828a3097a421 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_bias_add.md @@ -0,0 +1,26 @@ +# BiasAdd + + +## 概述 + +对给出的输入张量上的各个维度方向上的数据进行偏置。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_BIAS_ADD。 + +输入: + +- x,n维tensor。 + +- bias,偏置值tensor。 + +输出: + +- 输出张量,根据输入中每个维度方向偏置之后的结果。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_buffer_data.md b/zh-cn/device-dev/reference/hdi-apis/_buffer_data.md index 4d24eb0e40a3453cec07111e758312f454407ddd..4d4c6ba2595b5495af2922fd6d0974c6cf75e9f4 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_buffer_data.md +++ b/zh-cn/device-dev/reference/hdi-apis/_buffer_data.md @@ -1,26 +1,21 @@ # BufferData -## **概述** +## 概述 定义一层的缓冲区数据,包括虚拟和物理内存地址。 -**所属模块:** +**相关模块:** [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [phyAddr](_display.md#phyaddr-13) | 物理内存地址。 | -| [virAddr](_display.md#viraddr-12) | 虚拟内存地址。 | - - -## **详细描述** - -定义一层的缓冲区数据,包括虚拟和物理内存地址。 +| [phyAddr](_display.md#phyaddr-13) | uint64_t
物理内存地址 | +| [virAddr](_display.md#viraddr-12) | void \*
虚拟内存地址 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_c_b_config_info.md b/zh-cn/device-dev/reference/hdi-apis/_c_b_config_info.md new file mode 100644 index 0000000000000000000000000000000000000000..8619419e574fc73b04533b75845d6bdb962c0f09 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_c_b_config_info.md @@ -0,0 +1,81 @@ +# CBConfigInfo + + +## 概述 + +GSM小区广播配置信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [mode](#mode) | int
是否激活  | +| [indicationType](#indicationtype) | int
响应类型 | +| [mids](#mids) | String
消息标识符组合  | +| [dcss](#dcss) | String
数据编码方案组合  | + + +## 类成员变量说明 + + +### dcss + + +``` +String CBConfigInfo::dcss +``` +**描述:** +数据编码方案组合 + + +### indicationType + + +``` +int CBConfigInfo::indicationType +``` +**描述:** +响应类型 + +- 0:查询上报 + +- 1:主动上报 + + +### mids + + +``` +String CBConfigInfo::mids +``` +**描述:** +消息标识符组合 + + +### mode + + +``` +int CBConfigInfo::mode +``` +**描述:** +是否激活 + + +### serial + + +``` +int CBConfigInfo::serial +``` +**描述:** +请求的序列号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_c_b_config_report_info.md b/zh-cn/device-dev/reference/hdi-apis/_c_b_config_report_info.md new file mode 100644 index 0000000000000000000000000000000000000000..9a74c2ec16e3d94eeefa69574d9f819203ff5cb9 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_c_b_config_report_info.md @@ -0,0 +1,125 @@ +# CBConfigReportInfo + + +## 概述 + +小区广播上报信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [indicationType](#indicationtype) | int
响应类型 | +| [sn](#sn) | int
小区广播序列号  | +| [mid](#mid) | int
消息标识符组合  | +| [page](#page) | int
小区广播页序号  | +| [pages](#pages) | int
小区广播总页数  | +| [length](#length) | int
pdu字节数  | +| [data](#data) | String
解码后的小区广播内容  | +| [dcs](#dcs) | String
数据编码方案组合  | +| [pdu](#pdu) | String
协议数据单元  | + + +## 类成员变量说明 + + +### data + + +``` +String CBConfigReportInfo::data +``` +**描述:** +解码后的小区广播内容 + + +### dcs + + +``` +String CBConfigReportInfo::dcs +``` +**描述:** +数据编码方案组合 + + +### indicationType + + +``` +int CBConfigReportInfo::indicationType +``` +**描述:** +响应类型 + +- 0:查询上报 + +- 1:主动上报 + + +### length + + +``` +int CBConfigReportInfo::length +``` +**描述:** +pdu字节数 + + +### mid + + +``` +int CBConfigReportInfo::mid +``` +**描述:** +消息标识符组合 + + +### page + + +``` +int CBConfigReportInfo::page +``` +**描述:** +小区广播页序号 + + +### pages + + +``` +int CBConfigReportInfo::pages +``` +**描述:** +小区广播总页数 + + +### pdu + + +``` +String CBConfigReportInfo::pdu +``` +**描述:** +协议数据单元 + + +### sn + + +``` +int CBConfigReportInfo::sn +``` +**描述:** +小区广播序列号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_call_forward_query_info_list.md b/zh-cn/device-dev/reference/hdi-apis/_call_forward_query_info_list.md new file mode 100644 index 0000000000000000000000000000000000000000..7fd8bff095cbe96216f38c2a86dfa8c510dea616 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_call_forward_query_info_list.md @@ -0,0 +1,55 @@ +# CallForwardQueryInfoList + + +## 概述 + +呼叫转移信息列表。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [callSize](#callsize) | int
总数  | +| [flag](#flag) | int
呼叫转移查询结果信息标识  | +| [calls](#calls) | List< struct [CallForwardQueryResult](_call_forward_query_result.md) >
呼叫转移查询结果信息  | + + +## 类成员变量说明 + + +### calls + + +``` +List CallForwardQueryInfoList::calls +``` +**描述:** +呼叫转移查询结果信息 + + +### callSize + + +``` +int CallForwardQueryInfoList::callSize +``` +**描述:** +总数 + + +### flag + + +``` +int CallForwardQueryInfoList::flag +``` +**描述:** +呼叫转移查询结果信息标识 diff --git a/zh-cn/device-dev/reference/hdi-apis/_call_forward_query_result.md b/zh-cn/device-dev/reference/hdi-apis/_call_forward_query_result.md new file mode 100644 index 0000000000000000000000000000000000000000..a4196991ec698efaa1489f8ef44795d4f2bf3637 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_call_forward_query_result.md @@ -0,0 +1,130 @@ +# CallForwardQueryResult + + +## 概述 + +呼叫转移查询结果信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [result](#result) | int
查询结果,具体查看[RilErrType](_ril.md#rilerrtype) | +| [status](#status) | int
状态 | +| [classx](#classx) | int
业务类别,参考3GPP TS 27.007  | +| [type](#type) | int
号码地址类型 | +| [reason](#reason) | int
呼叫转移类型 | +| [time](#time) | int
等待时长  | +| [number](#number) | String
电话号码  | + + +## 类成员变量说明 + + +### classx + + +``` +int CallForwardQueryResult::classx +``` +**描述:** +业务类别,参考3GPP TS 27.007 + + +### number + + +``` +String CallForwardQueryResult::number +``` +**描述:** +电话号码 + + +### reason + + +``` +int CallForwardQueryResult::reason +``` +**描述:** +呼叫转移类型 + +- 0:无条件转移 + +- 1:遇忙转移 + +- 2:无应答转移 + +- 3:不可达转移(无网络服务或者关机时) + +- 4:所有呼叫转移 + +- 5:所有条件转移 + + +### result + + +``` +int CallForwardQueryResult::result +``` +**描述:** +查询结果,具体查看[RilErrType](_ril.md#rilerrtype) + + +### serial + + +``` +int CallForwardQueryResult::serial +``` +**描述:** +请求的序列号 + + +### status + + +``` +int CallForwardQueryResult::status +``` +**描述:** +状态 + +- 0:未激活 + +- 1:激活 + + +### time + + +``` +int CallForwardQueryResult::time +``` +**描述:** +等待时长 + + +### type + + +``` +int CallForwardQueryResult::type +``` +**描述:** +号码地址类型 + +- 129:普通号码 + +- 145:国际号码 diff --git a/zh-cn/device-dev/reference/hdi-apis/_call_forward_set_info.md b/zh-cn/device-dev/reference/hdi-apis/_call_forward_set_info.md new file mode 100644 index 0000000000000000000000000000000000000000..a23c2ac4d6dd3d178d3e93da549af3852ef27704 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_call_forward_set_info.md @@ -0,0 +1,88 @@ +# CallForwardSetInfo + + +## 概述 + +呼叫转移信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [reason](#reason) | int
呼叫转移类型 | +| [mode](#mode) | int
呼叫转移的操作模式 | +| [classx](#classx) | int
业务类别,参考3GPP TS 27.007  | +| [number](#number) | String
电话号码  | + + +## 类成员变量说明 + + +### classx + + +``` +int CallForwardSetInfo::classx +``` +**描述:** +业务类别,参考3GPP TS 27.007 + + +### mode + + +``` +int CallForwardSetInfo::mode +``` +**描述:** +呼叫转移的操作模式 + +- 0:去激活 + +- 1:激活 + +- 2:状态查询 + +- 3:注册 + +- 4:删除 + + +### number + + +``` +String CallForwardSetInfo::number +``` +**描述:** +电话号码 + + +### reason + + +``` +int CallForwardSetInfo::reason +``` +**描述:** +呼叫转移类型 + +- 0:无条件转移 + +- 1:遇忙转移 + +- 2:无应答转移 + +- 3:不可达转移(无网络服务或者关机时) + +- 4:所有呼叫转移 + +- 5:所有条件转移 diff --git a/zh-cn/device-dev/reference/hdi-apis/_call_info.md b/zh-cn/device-dev/reference/hdi-apis/_call_info.md new file mode 100644 index 0000000000000000000000000000000000000000..92f7db3995927a24a35aa52ded5892f6bb8530fd --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_call_info.md @@ -0,0 +1,168 @@ +# CallInfo + + +## 概述 + +通话状态信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [index](#index) | int
呼叫标识  | +| [dir](#dir) | int
呼叫方向,0表示主叫,1表示被叫  | +| [state](#state) | int
呼叫状态 | +| [mode](#mode) | int
呼叫模式 | +| [mpty](#mpty) | int
多方通话状态 | +| [voiceDomain](#voicedomain) | int
语音电话的呼叫域 | +| [callType](#calltype) | int
通话类型,当前仅可为0,表示语音呼叫  | +| [type](#type) | int
码地址类型 | +| [number](#number) | String
电话号码  | +| [alpha](#alpha) | String
号码在电话本中对应的姓名  | + + +## 类成员变量说明 + + +### alpha + + +``` +String CallInfo::alpha +``` +**描述:** +号码在电话本中对应的姓名 + + +### callType + + +``` +int CallInfo::callType +``` +**描述:** +通话类型,当前仅可为0,表示语音呼叫 + + +### dir + + +``` +int CallInfo::dir +``` +**描述:** +呼叫方向,0表示主叫,1表示被叫 + + +### index + + +``` +int CallInfo::index +``` +**描述:** +呼叫标识 + + +### mode + + +``` +int CallInfo::mode +``` +**描述:** +呼叫模式 + +- 0:语音呼叫 + +- 1:数据呼叫 + +- 2:传真 + + +### mpty + + +``` +int CallInfo::mpty +``` +**描述:** +多方通话状态 + +- 0:不在多方通话中 + +- 1:在多方通话中 + + +### number + + +``` +String CallInfo::number +``` +**描述:** +电话号码 + + +### state + + +``` +int CallInfo::state +``` +**描述:** +呼叫状态 + +- 0:激活状态 + +- 1:呼叫保持状态 + +- 2:主叫,拨号状态 + +- 3:主叫,回铃音状态 + +- 4:被叫,来电状态 + +- 5:被叫,呼叫等待状态 + +- 6:挂断状态 + +- 7:正在挂断状态 + +- 8:空闲状态 + + +### type + + +``` +int CallInfo::type +``` +**描述:** +码地址类型 + +- 129:普通号码 + +- 145:国际号码 + + +### voiceDomain + + +``` +int CallInfo::voiceDomain +``` +**描述:** +语音电话的呼叫域 + +- 0:CS域电话 + +- 1:IP多媒体系统(IMS)域电话 diff --git a/zh-cn/device-dev/reference/hdi-apis/_call_info_list.md b/zh-cn/device-dev/reference/hdi-apis/_call_info_list.md new file mode 100644 index 0000000000000000000000000000000000000000..bad997048fd80cd2b886ccf2fd630cfb7f63bff3 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_call_info_list.md @@ -0,0 +1,55 @@ +# CallInfoList + + +## 概述 + +通话状态信息列表。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [callSize](#callsize) | int
总数  | +| [flag](#flag) | int
通话状态信息列表标识  | +| [calls](#calls) | List< struct [CallInfo](_call_info.md) >
通话状态信息列表  | + + +## 类成员变量说明 + + +### calls + + +``` +List CallInfoList::calls +``` +**描述:** +通话状态信息列表 + + +### callSize + + +``` +int CallInfoList::callSize +``` +**描述:** +总数 + + +### flag + + +``` +int CallInfoList::flag +``` +**描述:** +通话状态信息列表标识 diff --git a/zh-cn/device-dev/reference/hdi-apis/_call_restriction_info.md b/zh-cn/device-dev/reference/hdi-apis/_call_restriction_info.md new file mode 100644 index 0000000000000000000000000000000000000000..c77018abc6c39af4b523bd57fba0efd3143db89b --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_call_restriction_info.md @@ -0,0 +1,59 @@ +# CallRestrictionInfo + + +## 概述 + +呼叫限制信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [mode](#mode) | int
操作模式 | +| [fac](#fac) | String
操作对象  | +| [password](#password) | String
密码  | + + +## 类成员变量说明 + + +### fac + + +``` +String CallRestrictionInfo::fac +``` +**描述:** +操作对象 + + +### mode + + +``` +int CallRestrictionInfo::mode +``` +**描述:** +操作模式 + +- 0:去激活 + +- 1:激活 + + +### password + + +``` +String CallRestrictionInfo::password +``` +**描述:** +密码 diff --git a/zh-cn/device-dev/reference/hdi-apis/_call_restriction_result.md b/zh-cn/device-dev/reference/hdi-apis/_call_restriction_result.md new file mode 100644 index 0000000000000000000000000000000000000000..3f72a824680e221db2325f485d94a4547ea41524 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_call_restriction_result.md @@ -0,0 +1,59 @@ +# CallRestrictionResult + + +## 概述 + +呼叫限制结果信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [result](#result) | int
查询结果,具体查看[RilErrType](_ril.md#rilerrtype) | +| [status](#status) | int
业务状态 | +| [classCw](#classcw) | int
业务类别,参考3GPP TS 27.007  | + + +## 类成员变量说明 + + +### classCw + + +``` +int CallRestrictionResult::classCw +``` +**描述:** +业务类别,参考3GPP TS 27.007 + + +### result + + +``` +int CallRestrictionResult::result +``` +**描述:** +查询结果,具体查看[RilErrType](_ril.md#rilerrtype) + + +### status + + +``` +int CallRestrictionResult::status +``` +**描述:** +业务状态 + +- 0:未激活 + +- 1:激活 diff --git a/zh-cn/device-dev/reference/hdi-apis/_call_wait_result.md b/zh-cn/device-dev/reference/hdi-apis/_call_wait_result.md new file mode 100644 index 0000000000000000000000000000000000000000..8c5a5883b786abd7856c0aeda314b6293deea691 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_call_wait_result.md @@ -0,0 +1,59 @@ +# CallWaitResult + + +## 概述 + +呼叫等待结果信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [result](#result) | int
查询结果,具体查看[RilErrType](_ril.md#rilerrtype) | +| [status](#status) | int
当前呼叫等待的业务状态 | +| [classCw](#classcw) | int
业务类别,参考3GPP TS 27.007  | + + +## 类成员变量说明 + + +### classCw + + +``` +int CallWaitResult::classCw +``` +**描述:** +业务类别,参考3GPP TS 27.007 + + +### result + + +``` +int CallWaitResult::result +``` +**描述:** +查询结果,具体查看[RilErrType](_ril.md#rilerrtype) + + +### status + + +``` +int CallWaitResult::status +``` +**描述:** +当前呼叫等待的业务状态 + +- 0:未激活 + +- 1:激活 diff --git a/zh-cn/device-dev/reference/hdi-apis/camera.md b/zh-cn/device-dev/reference/hdi-apis/_camera.md similarity index 84% rename from zh-cn/device-dev/reference/hdi-apis/camera.md rename to zh-cn/device-dev/reference/hdi-apis/_camera.md index 5b5de306eac29c4a6357dd4b8443981d69ffc592..56a90503a481fa6d29026b9962ae0b3e0e2fac89 100644 --- a/zh-cn/device-dev/reference/hdi-apis/camera.md +++ b/zh-cn/device-dev/reference/hdi-apis/_camera.md @@ -1,22 +1,22 @@ # Camera -## **概述** +## 概述 Camera模块接口定义。 Camera模块涉及相机设备的操作、流的操作、离线流的操作和各种回调等。 -**Since**: +**Since:** 3.2 -**Version**: +**Version:** 1.0 -## **汇总** +## 汇总 ### 文件 @@ -30,25 +30,25 @@ Camera模块涉及相机设备的操作、流的操作、离线流的操作和 | [IOfflineStreamOperator.idl](_i_offline_stream_operator_8idl.md) | 离线流的操作接口。 | | [IStreamOperator.idl](_i_stream_operator_8idl.md) | 流的操作接口。 | | [IStreamOperatorCallback.idl](_i_stream_operator_callback_8idl.md) | [IStreamOperator](interface_i_stream_operator.md)相关的回调,这些回调均由调用者实现。 | -| [Types.idl](camera_2v1__0_2_types_8idl.md) | Camera模块HDI接口使用的数据类型。 | +| [Types.idl](_types_8idl.md) | Camera模块HDI接口使用的数据类型。 | ### 类 | 名称 | 描述 | | -------- | -------- | -| [ICameraDevice](interface_i_camera_device.md) | 定义Camera设备基本的操作。 | -| [ICameraDeviceCallback](interface_i_camera_device_callback.md) | 定义Camera设备回调操作。 | -| [ICameraHost](interface_i_camera_host.md) | 定义Camera设备功能操作。 | -| [ICameraHostCallback](interface_i_camera_host_callback.md) | 定义Camera设备功能回调操作。 | -| [IOfflineStreamOperator](interface_i_offline_stream_operator.md) | 定义Camera设备离线流操作。 | -| [IStreamOperator](interface_i_stream_operator.md) | 定义Camera设备流操作。 | -| [IStreamOperatorCallback](interface_i_stream_operator_callback.md) | 定义Camera设备流回调操作。 | -| [StreamInfo](_stream_info.md) | 流信息,用于创建流时传入相关的配置参数。 | -| [StreamAttribute](_stream_attribute.md) | 流的属性。 | -| [CaptureInfo](_capture_info.md) | 捕获请求的相关信息。 | -| [CaptureEndedInfo](_capture_ended_info.md) | 捕获结束相关信息,用于捕获结束回调[OnCaptureEnded](interface_i_stream_operator_callback.md#oncaptureended)。 | -| [CaptureErrorInfo](_capture_error_info.md) | 流错误信息,用于回调[OnCaptureError](interface_i_stream_operator_callback.md#oncaptureerror)。 | +| [ICameraDevice](interface_i_camera_device.md) | interface
定义Camera设备基本的操作。 | +| [ICameraDeviceCallback](interface_i_camera_device_callback.md) | interface
定义Camera设备回调操作。 | +| [ICameraHost](interface_i_camera_host.md) | interface
定义Camera设备功能操作。 | +| [ICameraHostCallback](interface_i_camera_host_callback.md) | interface
定义Camera设备功能回调操作。 | +| [IOfflineStreamOperator](interface_i_offline_stream_operator.md) | interface
定义Camera设备离线流操作。 | +| [IStreamOperator](interface_i_stream_operator.md) | interface
定义Camera设备流操作。 | +| [IStreamOperatorCallback](interface_i_stream_operator_callback.md) | interface
定义Camera设备流回调操作。 | +| [StreamInfo](_stream_info.md) | struct
流信息,用于创建流时传入相关的配置参数。 | +| [StreamAttribute](_stream_attribute.md) | struct
流的属性。 | +| [CaptureInfo](_capture_info.md) | struct
捕获请求的相关信息。 | +| [CaptureEndedInfo](_capture_ended_info.md) | struct
捕获结束相关信息,用于捕获结束回调[OnCaptureEnded](interface_i_stream_operator_callback.md#oncaptureended)。 | +| [CaptureErrorInfo](_capture_error_info.md) | struct
流错误信息,用于回调[OnCaptureError](interface_i_stream_operator_callback.md#oncaptureerror)。 | ### 枚举 @@ -76,7 +76,7 @@ Camera模块涉及相机设备的操作、流的操作、离线流的操作和 | sequenceable ohos.hdi.camera.v1_0.BufferProducerSequenceable | ohos.hdi.camera.v1_0序列,可用缓冲区生成器。 | -## **枚举类型说明** +## 枚举类型说明 ### CameraEvent @@ -86,7 +86,7 @@ Camera模块涉及相机设备的操作、流的操作、离线流的操作和 enum CameraEvent ``` -**描述:** +**描述:** Camera事件。 @@ -103,7 +103,7 @@ Camera事件。 enum CameraStatus ``` -**描述:** +**描述:** Camera设备状态。 @@ -120,7 +120,7 @@ Camera设备状态。 enum CamRetCode ``` -**描述:** +**描述:** HDI接口的返回值。 @@ -143,7 +143,7 @@ HDI接口的返回值。 enum EncodeType ``` -**描述:** +**描述:** 流数据的编码类型。 @@ -162,7 +162,7 @@ enum EncodeType enum ErrorType ``` -**描述:** +**描述:** 设备错误类型,用于设备错误回调[OnError](interface_i_camera_device_callback.md#onerror)。 @@ -185,7 +185,7 @@ enum ErrorType enum FlashlightStatus ``` -**描述:** +**描述:** 闪光灯状态。 @@ -203,7 +203,7 @@ enum FlashlightStatus enum OperationMode ``` -**描述:** +**描述:** 流的使用模式。 @@ -219,7 +219,7 @@ enum OperationMode enum ResultCallbackMode ``` -**描述:** +**描述:** metadata的上报模式。 @@ -236,7 +236,7 @@ metadata的上报模式。 enum StreamError ``` -**描述:** +**描述:** 流错误类型,用于流错误类型[CaptureErrorInfo](_capture_error_info.md)。 @@ -253,7 +253,7 @@ enum StreamError enum StreamIntent ``` -**描述:** +**描述:** 流的类型。 @@ -274,7 +274,7 @@ enum StreamIntent enum StreamSupportType ``` -**描述:** +**描述:** 对动态配置流的支持类型,使用场景参考[IsStreamsSupported](interface_i_stream_operator.md#isstreamssupported)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_capture_ended_info.md b/zh-cn/device-dev/reference/hdi-apis/_capture_ended_info.md index d7e78cd69f34dee27853269c19d48b5589951e0d..82356349ddd22e19c6f9bd7bb98cdbdc613121e4 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_capture_ended_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_capture_ended_info.md @@ -1,27 +1,27 @@ # CaptureEndedInfo -## **概述** +## 概述 捕获结束相关信息,用于捕获结束回调[OnCaptureEnded](interface_i_stream_operator_callback.md#oncaptureended)。 **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [streamId_](#streamid) | 捕获的流ID。 | -| [frameCount_](#framecount) | 捕获结束时已经抓取的帧数。 | +| [streamId_](#streamid_) | int
捕获的流ID。 | +| [frameCount_](#framecount_) | int
捕获结束时已经抓取的帧数。 | -## **类成员变量说明** +## 类成员变量说明 ### frameCount_ @@ -31,7 +31,7 @@ int CaptureEndedInfo::frameCount_ ``` -**描述:** +**描述:** 捕获结束时已经抓取的帧数。 @@ -43,6 +43,6 @@ int CaptureEndedInfo::frameCount_ int CaptureEndedInfo::streamId_ ``` -**描述:** +**描述:** 捕获的流ID。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_capture_error_info.md b/zh-cn/device-dev/reference/hdi-apis/_capture_error_info.md index 76cda626af0b840ad2d2ebe5e8493c2bfa5714b2..8cda8f6afde4089c7fd140744ffc53fb4b28f0b6 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_capture_error_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_capture_error_info.md @@ -1,27 +1,27 @@ # CaptureErrorInfo -## **概述** +## 概述 流错误信息,用于回调[OnCaptureError](interface_i_stream_operator_callback.md#oncaptureerror)。 **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [streamId_](#streamid) | 流ID。 | -| [error_](#error) | 错误类型。 | +| [streamId_](#streamid_) | int
流Id。 | +| [error_](#error_) | enum [StreamError](_camera.md#streamerror)
错误类型。 | -## **类成员变量说明** +## 类成员变量说明 ### error_ @@ -31,7 +31,7 @@ enum StreamError CaptureErrorInfo::error_ ``` -**描述:** +**描述:** 错误类型。 @@ -43,6 +43,6 @@ enum StreamError CaptureErrorInfo::error_ int CaptureErrorInfo::streamId_ ``` -**描述:** +**描述:** -流ID。 +流Id。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_capture_info.md b/zh-cn/device-dev/reference/hdi-apis/_capture_info.md index b6b69fa0dc996f00361e19f6927c7a48ae7999dc..b41b819cfc3937e4a72d59a65be11f4ed045cde9 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_capture_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_capture_info.md @@ -1,28 +1,28 @@ # CaptureInfo -## **概述** +## 概述 捕获请求的相关信息。 **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [streamIds_](#streamids) | 捕获的流ID集合。 | -| [captureSetting_](#capturesetting) | 捕获的配置信息。 | -| [enableShutterCallback_](#enableshuttercallback) | 使能捕获回调。 | +| [streamIds_](#streamids_) | int[]
捕获的流ID集合。 | +| [captureSetting_](#capturesetting_) | unsigned char[]
捕获的配置信息。 | +| [enableShutterCallback_](#enableshuttercallback_) | boolean
使能捕获回调,每一次捕获后都会触发[OnFrameShutter](interface_i_stream_operator_callback.md#onframeshutter)。 | -## **类成员变量说明** +## 类成员变量说明 ### captureSetting_ @@ -32,7 +32,7 @@ unsigned char [] CaptureInfo::captureSetting_ ``` -**描述:** +**描述:** 捕获的配置信息。 @@ -44,7 +44,7 @@ unsigned char [] CaptureInfo::captureSetting_ boolean CaptureInfo::enableShutterCallback_ ``` -**描述:** +**描述:** 使能捕获回调,每一次捕获后都会触发[OnFrameShutter](interface_i_stream_operator_callback.md#onframeshutter)。 @@ -56,6 +56,6 @@ boolean CaptureInfo::enableShutterCallback_ int [] CaptureInfo::streamIds_ ``` -**描述:** +**描述:** 捕获的流ID集合。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_card_status_info.md b/zh-cn/device-dev/reference/hdi-apis/_card_status_info.md new file mode 100644 index 0000000000000000000000000000000000000000..8b66840b82fd1c0337568e54e9aa2afd0f4b7e84 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_card_status_info.md @@ -0,0 +1,75 @@ +# CardStatusInfo + + +## 概述 + +SIM卡状态信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [index](#index) | int
SIM卡索引  | +| [simType](#simtype) | int
SIM卡类型。 | +| [simState](#simstate) | int
SIM卡状态。 | + + +## 类成员变量说明 + + +### index + + +``` +int CardStatusInfo::index +``` +**描述:** +SIM卡索引 + + +### simState + + +``` +int CardStatusInfo::simState +``` +**描述:** +SIM卡状态。 + +- -1:未知。 + +- 0:SIM卡未插入。 + +- 1:正常识卡。 + +- 2:需要输入PIN码。 + +- 3:需要输入PUK码。 + +- 4:需要输入PIN2码。 + +- 5:需要输入PUK2码 + + +### simType + + +``` +int CardStatusInfo::simType +``` +**描述:** +SIM卡类型。 + +- 0:未知。 + +- 1:普通SIM卡。 + +- 2:USIM,支持4G网络 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cast.md b/zh-cn/device-dev/reference/hdi-apis/_cast.md new file mode 100644 index 0000000000000000000000000000000000000000..d0ef24c0d5ad484bed2d859738f8217ad97ec1b0 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cast.md @@ -0,0 +1,26 @@ +# Cast + + +## 概述 + +根据输出张量的类型对张量数据类型进行转换。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_CAST。 + +输入: + +- x,n维tensor + +- type,输入转换目的的数据类型。 + +输出: + +- output,按照输出tensor的数据类型进行类型转换。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_cdma_c_b_config_info.md b/zh-cn/device-dev/reference/hdi-apis/_cdma_c_b_config_info.md new file mode 100644 index 0000000000000000000000000000000000000000..6564e7f18eed89bf988eaf91762a5b23f5e3cb11 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cdma_c_b_config_info.md @@ -0,0 +1,55 @@ +# CdmaCBConfigInfo + + +## 概述 + +CDMA小区广播配置信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [service](#service) | int
服务  | +| [language](#language) | int
语言  | +| [checked](#checked) | int
是否选中  | + + +## 类成员变量说明 + + +### checked + + +``` +int CdmaCBConfigInfo::checked +``` +**描述:** +是否选中 + + +### language + + +``` +int CdmaCBConfigInfo::language +``` +**描述:** +语言 + + +### service + + +``` +int CdmaCBConfigInfo::service +``` +**描述:** +服务 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cdma_c_b_config_info_list.md b/zh-cn/device-dev/reference/hdi-apis/_cdma_c_b_config_info_list.md new file mode 100644 index 0000000000000000000000000000000000000000..16317eaf70afa4c8eba63dfd26f153a5d2857133 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cdma_c_b_config_info_list.md @@ -0,0 +1,55 @@ +# CdmaCBConfigInfoList + + +## 概述 + +CDMA小区广播配置信息列表。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [size](#size) | int
总数  | +| [list](#list) | List< struct [CdmaCBConfigInfo](_cdma_c_b_config_info.md) >
CDMA小区广播配置信息列表  | + + +## 类成员变量说明 + + +### list + + +``` +List CdmaCBConfigInfoList::list +``` +**描述:** +CDMA小区广播配置信息列表 + + +### serial + + +``` +int CdmaCBConfigInfoList::serial +``` +**描述:** +请求的序列号 + + +### size + + +``` +int CdmaCBConfigInfoList::size +``` +**描述:** +总数 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cdma_rssi.md b/zh-cn/device-dev/reference/hdi-apis/_cdma_rssi.md new file mode 100644 index 0000000000000000000000000000000000000000..665af693cdff18e330a20a808f5f0f74c82d12aa --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cdma_rssi.md @@ -0,0 +1,44 @@ +# CdmaRssi + + +## 概述 + +CDMA信号强度。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [absoluteRssi](#absoluterssi) | int
信号强度的绝对值, 该值是实际信号强度值乘以-1  | +| [ecno](#ecno) | int
PN码(Pseudo-Noise Code)片的接收能量与总接收功率谱密度之比  | + + +## 类成员变量说明 + + +### absoluteRssi + + +``` +int CdmaRssi::absoluteRssi +``` +**描述:** +信号强度的绝对值, 该值是实际信号强度值乘以-1 + + +### ecno + + +``` +int CdmaRssi::ecno +``` +**描述:** +PN码(Pseudo-Noise Code)片的接收能量与总接收功率谱密度之比 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_list_current_info.md b/zh-cn/device-dev/reference/hdi-apis/_cell_list_current_info.md new file mode 100644 index 0000000000000000000000000000000000000000..eaa7ebc7ac6f5cc014f9abd51a7a3b6ec2f23392 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_list_current_info.md @@ -0,0 +1,44 @@ +# CellListCurrentInfo + + +## 概述 + +当前小区信息列表。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [itemNum](#itemnum) | int
小区信息数量  | +| [cellCurrentInfo](#cellcurrentinfo) | List< struct [CurrentCellInfo](_current_cell_info.md) >
当前小区信息  | + + +## 类成员变量说明 + + +### cellCurrentInfo + + +``` +List CellListCurrentInfo::cellCurrentInfo +``` +**描述:** +当前小区信息 + + +### itemNum + + +``` +int CellListCurrentInfo::itemNum +``` +**描述:** +小区信息数量 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_list_nearby_info.md b/zh-cn/device-dev/reference/hdi-apis/_cell_list_nearby_info.md new file mode 100644 index 0000000000000000000000000000000000000000..54568950529bca779579ce04d86b7d61f5439ae0 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_list_nearby_info.md @@ -0,0 +1,44 @@ +# CellListNearbyInfo + + +## 概述 + +附近小区信息列表。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [itemNum](#itemnum) | int
编号  | +| [cellNearbyInfo](#cellnearbyinfo) | List< struct [CellNearbyInfo](_cell_nearby_info.md) >
附近小区信息列表  | + + +## 类成员变量说明 + + +### cellNearbyInfo + + +``` +List CellListNearbyInfo::cellNearbyInfo +``` +**描述:** +附近小区信息列表 + + +### itemNum + + +``` +int CellListNearbyInfo::itemNum +``` +**描述:** +编号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_cdma.md b/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_cdma.md new file mode 100644 index 0000000000000000000000000000000000000000..cac4e6aaf9eee50b3f2a38ca6270d2250d730d0a --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_cdma.md @@ -0,0 +1,121 @@ +# CellListRatCdma + + +## 概述 + +CDMA小区信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [systemId](#systemid) | int
系统标识  | +| [networkId](#networkid) | int
网络标识  | +| [baseId](#baseid) | int
基本标识  | +| [zoneId](#zoneid) | int
区域标识  | +| [pilotPn](#pilotpn) | int
PN导频序列  | +| [pilotStrength](#pilotstrength) | int
导频信号强度  | +| [channel](#channel) | int
信道  | +| [longitude](#longitude) | int
经度  | +| [latitude](#latitude) | int
纬度  | + + +## 类成员变量说明 + + +### baseId + + +``` +int CellListRatCdma::baseId +``` +**描述:** +基本标识 + + +### channel + + +``` +int CellListRatCdma::channel +``` +**描述:** +信道 + + +### latitude + + +``` +int CellListRatCdma::latitude +``` +**描述:** +纬度 + + +### longitude + + +``` +int CellListRatCdma::longitude +``` +**描述:** +经度 + + +### networkId + + +``` +int CellListRatCdma::networkId +``` +**描述:** +网络标识 + + +### pilotPn + + +``` +int CellListRatCdma::pilotPn +``` +**描述:** +PN导频序列 + + +### pilotStrength + + +``` +int CellListRatCdma::pilotStrength +``` +**描述:** +导频信号强度 + + +### systemId + + +``` +int CellListRatCdma::systemId +``` +**描述:** +系统标识 + + +### zoneId + + +``` +int CellListRatCdma::zoneId +``` +**描述:** +区域标识 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_gsm.md b/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_gsm.md new file mode 100644 index 0000000000000000000000000000000000000000..6035145d7cd389ff0a3e5b81c75be6b5712d499c --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_gsm.md @@ -0,0 +1,88 @@ +# CellListRatGsm + + +## 概述 + +GSM小区信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [band](#band) | int
小区的band信息  | +| [arfcn](#arfcn) | int
BCCH(Broadcast Control Channel)载频的绝对射频频道号,取值范围0~1023  | +| [bsic](#bsic) | int
基站识别码  | +| [cellId](#cellid) | int
小区信息标识  | +| [lac](#lac) | int
位置区号,取值范围0~0xFFFF  | +| [rxlev](#rxlev) | int
信号接收强度,取值范围-120~37  | + + +## 类成员变量说明 + + +### arfcn + + +``` +int CellListRatGsm::arfcn +``` +**描述:** +BCCH(Broadcast Control Channel)载频的绝对射频频道号,取值范围0~1023 + + +### band + + +``` +int CellListRatGsm::band +``` +**描述:** +小区的band信息 + + +### bsic + + +``` +int CellListRatGsm::bsic +``` +**描述:** +基站识别码 + + +### cellId + + +``` +int CellListRatGsm::cellId +``` +**描述:** +小区信息标识 + + +### lac + + +``` +int CellListRatGsm::lac +``` +**描述:** +位置区号,取值范围0~0xFFFF + + +### rxlev + + +``` +int CellListRatGsm::rxlev +``` +**描述:** +信号接收强度,取值范围-120~37 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_lte.md b/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_lte.md new file mode 100644 index 0000000000000000000000000000000000000000..7cefeebe4a8ffe902097abf1533486ecdacaf671 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_lte.md @@ -0,0 +1,77 @@ +# CellListRatLte + + +## 概述 + +LTE小区信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [arfcn](#arfcn) | int
BCCH载频的绝对射频频道号,取值范围0~1023  | +| [pci](#pci) | int
物理小区标识  | +| [rsrp](#rsrp) | int
信号接收功率,取值范围-140~-44  | +| [rsrq](#rsrq) | int
信号接收质量,取值范围-19~-3  | +| [rxlev](#rxlev) | int
信号接收强度,取值范围-120~37  | + + +## 类成员变量说明 + + +### arfcn + + +``` +int CellListRatLte::arfcn +``` +**描述:** +BCCH载频的绝对射频频道号,取值范围0~1023 + + +### pci + + +``` +int CellListRatLte::pci +``` +**描述:** +物理小区标识 + + +### rsrp + + +``` +int CellListRatLte::rsrp +``` +**描述:** +信号接收功率,取值范围-140~-44 + + +### rsrq + + +``` +int CellListRatLte::rsrq +``` +**描述:** +信号接收质量,取值范围-19~-3 + + +### rxlev + + +``` +int CellListRatLte::rxlev +``` +**描述:** +信号接收强度,取值范围-120~37 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_nr.md b/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_nr.md new file mode 100644 index 0000000000000000000000000000000000000000..c753daf0804498d40232fdba5b2c1b34e51cc4c9 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_nr.md @@ -0,0 +1,66 @@ +# CellListRatNr + + +## 概述 + +NR小区信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [nrArfcn](#nrarfcn) | int
BCCH载频的绝对射频频道号  | +| [pci](#pci) | int
物理小区标识  | +| [tac](#tac) | int
类型分配码  | +| [nci](#nci) | int
NR小区标识  | + + +## 类成员变量说明 + + +### nci + + +``` +int CellListRatNr::nci +``` +**描述:** +NR小区标识 + + +### nrArfcn + + +``` +int CellListRatNr::nrArfcn +``` +**描述:** +BCCH载频的绝对射频频道号 + + +### pci + + +``` +int CellListRatNr::pci +``` +**描述:** +物理小区标识 + + +### tac + + +``` +int CellListRatNr::tac +``` +**描述:** +类型分配码 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_tdscdma.md b/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_tdscdma.md new file mode 100644 index 0000000000000000000000000000000000000000..6bbda4441b8328fd4f2b4d4674c860e17cc0f29c --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_tdscdma.md @@ -0,0 +1,121 @@ +# CellListRatTdscdma + + +## 概述 + +TDSCDMA小区信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [arfcn](#arfcn) | int
BCCH载频的绝对射频频道号  | +| [syncId](#syncid) | int
同步标识  | +| [sc](#sc) | int
超级小区  | +| [cellId](#cellid) | int
小区标识  | +| [lac](#lac) | int
位置区号,取值范围0~0xFFFF  | +| [rscp](#rscp) | int
接收信号码功率  | +| [drx](#drx) | int
不连续接收周期长度  | +| [rac](#rac) | int
路由区域码  | +| [cpid](#cpid) | int
超级小区标识  | + + +## 类成员变量说明 + + +### arfcn + + +``` +int CellListRatTdscdma::arfcn +``` +**描述:** +BCCH载频的绝对射频频道号 + + +### cellId + + +``` +int CellListRatTdscdma::cellId +``` +**描述:** +小区标识 + + +### cpid + + +``` +int CellListRatTdscdma::cpid +``` +**描述:** +超级小区标识 + + +### drx + + +``` +int CellListRatTdscdma::drx +``` +**描述:** +不连续接收周期长度 + + +### lac + + +``` +int CellListRatTdscdma::lac +``` +**描述:** +位置区号,取值范围0~0xFFFF + + +### rac + + +``` +int CellListRatTdscdma::rac +``` +**描述:** +路由区域码 + + +### rscp + + +``` +int CellListRatTdscdma::rscp +``` +**描述:** +接收信号码功率 + + +### sc + + +``` +int CellListRatTdscdma::sc +``` +**描述:** +超级小区 + + +### syncId + + +``` +int CellListRatTdscdma::syncId +``` +**描述:** +同步标识 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_wcdma.md b/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_wcdma.md new file mode 100644 index 0000000000000000000000000000000000000000..0c986b141bf58f0bcd9fdc5007d7dc09dd67ccf0 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_list_rat_wcdma.md @@ -0,0 +1,66 @@ +# CellListRatWcdma + + +## 概述 + +WCDMA小区信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [arfcn](#arfcn) | int
BCCH载频的绝对射频频道号,取值范围0~16383  | +| [psc](#psc) | int
主扰码, 取值范围0~511  | +| [rscp](#rscp) | int
接收信号码功率, 取值范围-120~25  | +| [ecno](#ecno) | int
每个调制比特的功率与噪声频谱密度之比, 取值范围-25~0  | + + +## 类成员变量说明 + + +### arfcn + + +``` +int CellListRatWcdma::arfcn +``` +**描述:** +BCCH载频的绝对射频频道号,取值范围0~16383 + + +### ecno + + +``` +int CellListRatWcdma::ecno +``` +**描述:** +每个调制比特的功率与噪声频谱密度之比, 取值范围-25~0 + + +### psc + + +``` +int CellListRatWcdma::psc +``` +**描述:** +主扰码, 取值范围0~511 + + +### rscp + + +``` +int CellListRatWcdma::rscp +``` +**描述:** +接收信号码功率, 取值范围-120~25 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_nearby_info.md b/zh-cn/device-dev/reference/hdi-apis/_cell_nearby_info.md new file mode 100644 index 0000000000000000000000000000000000000000..aa9e7c1cb3bfd14abaf54d34d5bb74dbe7f1328b --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_nearby_info.md @@ -0,0 +1,58 @@ +# CellNearbyInfo + + +## 概述 + +相邻小区信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [ratType](#rattype) | int
接入技术类型 | +| [serviceCells](#servicecells) | union [ServiceCellParas](union_service_cell_paras.md)
多种网络模式的小区信息  | + + +## 类成员变量说明 + + +### ratType + + +``` +int CellNearbyInfo::ratType +``` +**描述:** +接入技术类型 + +- 0:未知 + +- 1:GSM + +- 2:CDMA + +- 3:WCDMA + +- 4:TDSCDMA + +- 5:LTE + +- 6:NR + + +### serviceCells + + +``` +union ServiceCellParas CellNearbyInfo::serviceCells +``` +**描述:** +多种网络模式的小区信息 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_rat_cdma.md b/zh-cn/device-dev/reference/hdi-apis/_cell_rat_cdma.md new file mode 100644 index 0000000000000000000000000000000000000000..5cb990d0fb15887f916bb59129973c44b7c01cc1 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_rat_cdma.md @@ -0,0 +1,121 @@ +# CellRatCdma + + +## 概述 + +CDMA蜂窝信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [systemId](#systemid) | int
系统标识  | +| [networkId](#networkid) | int
网络标识  | +| [baseId](#baseid) | int
基础标识  | +| [zoneId](#zoneid) | int
区域标识  | +| [pilotPn](#pilotpn) | int
PN导频序列  | +| [pilotStrength](#pilotstrength) | int
导频信号强度  | +| [channel](#channel) | int
信道  | +| [longitude](#longitude) | int
经度  | +| [latitude](#latitude) | int
纬度  | + + +## 类成员变量说明 + + +### baseId + + +``` +int CellRatCdma::baseId +``` +**描述:** +基础标识 + + +### channel + + +``` +int CellRatCdma::channel +``` +**描述:** +信道 + + +### latitude + + +``` +int CellRatCdma::latitude +``` +**描述:** +纬度 + + +### longitude + + +``` +int CellRatCdma::longitude +``` +**描述:** +经度 + + +### networkId + + +``` +int CellRatCdma::networkId +``` +**描述:** +网络标识 + + +### pilotPn + + +``` +int CellRatCdma::pilotPn +``` +**描述:** +PN导频序列 + + +### pilotStrength + + +``` +int CellRatCdma::pilotStrength +``` +**描述:** +导频信号强度 + + +### systemId + + +``` +int CellRatCdma::systemId +``` +**描述:** +系统标识 + + +### zoneId + + +``` +int CellRatCdma::zoneId +``` +**描述:** +区域标识 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_rat_gsm.md b/zh-cn/device-dev/reference/hdi-apis/_cell_rat_gsm.md new file mode 100644 index 0000000000000000000000000000000000000000..93e92a8be07784a191b9a32eb48f3f2a4d59d5e7 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_rat_gsm.md @@ -0,0 +1,110 @@ +# CellRatGsm + + +## 概述 + +GSM蜂窝信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [band](#band) | int
小区的band信息  | +| [arfcn](#arfcn) | int
BCCH载频的绝对射频频道号,取值范围0~1023  | +| [bsic](#bsic) | int
基站识别码  | +| [cellId](#cellid) | int
小区标识  | +| [lac](#lac) | int
位置区号,取值范围0~0xFFFF  | +| [rxlev](#rxlev) | int
信号接收强度,取值范围-120~37  | +| [rxQuality](#rxquality) | int
信号接收质量,取值范围0~7  | +| [ta](#ta) | int
取值范围0~63  | + + +## 类成员变量说明 + + +### arfcn + + +``` +int CellRatGsm::arfcn +``` +**描述:** +BCCH载频的绝对射频频道号,取值范围0~1023 + + +### band + + +``` +int CellRatGsm::band +``` +**描述:** +小区的band信息 + + +### bsic + + +``` +int CellRatGsm::bsic +``` +**描述:** +基站识别码 + + +### cellId + + +``` +int CellRatGsm::cellId +``` +**描述:** +小区标识 + + +### lac + + +``` +int CellRatGsm::lac +``` +**描述:** +位置区号,取值范围0~0xFFFF + + +### rxlev + + +``` +int CellRatGsm::rxlev +``` +**描述:** +信号接收强度,取值范围-120~37 + + +### rxQuality + + +``` +int CellRatGsm::rxQuality +``` +**描述:** +信号接收质量,取值范围0~7 + + +### ta + + +``` +int CellRatGsm::ta +``` +**描述:** +取值范围0~63 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_rat_lte.md b/zh-cn/device-dev/reference/hdi-apis/_cell_rat_lte.md new file mode 100644 index 0000000000000000000000000000000000000000..823fd16b943496d9d737015ac6122cb8bd7a3016 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_rat_lte.md @@ -0,0 +1,99 @@ +# CellRatLte + + +## 概述 + +LTE蜂窝信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [arfcn](#arfcn) | int
BCCH载频的绝对射频频道号  | +| [cellId](#cellid) | int
小区标识  | +| [pci](#pci) | int
物理小区标识  | +| [tac](#tac) | int
类型分配码  | +| [rsrp](#rsrp) | int
信号接收功率,取值范围-140~-44  | +| [rsrq](#rsrq) | int
信号接收质量,取值范围-19~-3  | +| [rssi](#rssi) | int
接收信号强度dbm,-90~-25  | + + +## 类成员变量说明 + + +### arfcn + + +``` +int CellRatLte::arfcn +``` +**描述:** +BCCH载频的绝对射频频道号 + + +### cellId + + +``` +int CellRatLte::cellId +``` +**描述:** +小区标识 + + +### pci + + +``` +int CellRatLte::pci +``` +**描述:** +物理小区标识 + + +### rsrp + + +``` +int CellRatLte::rsrp +``` +**描述:** +信号接收功率,取值范围-140~-44 + + +### rsrq + + +``` +int CellRatLte::rsrq +``` +**描述:** +信号接收质量,取值范围-19~-3 + + +### rssi + + +``` +int CellRatLte::rssi +``` +**描述:** +接收信号强度dbm,-90~-25 + + +### tac + + +``` +int CellRatLte::tac +``` +**描述:** +类型分配码 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_rat_nr.md b/zh-cn/device-dev/reference/hdi-apis/_cell_rat_nr.md new file mode 100644 index 0000000000000000000000000000000000000000..d8a8dfac0a2e56a8015ae72d5cad8647ca8a7f17 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_rat_nr.md @@ -0,0 +1,66 @@ +# CellRatNr + + +## 概述 + +NR蜂窝信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [nrArfcn](#nrarfcn) | int
BCCH载频的绝对射频频道号  | +| [pci](#pci) | int
物理小区标识  | +| [tac](#tac) | int
类型分配码  | +| [nci](#nci) | int
NR小区标识  | + + +## 类成员变量说明 + + +### nci + + +``` +int CellRatNr::nci +``` +**描述:** +NR小区标识 + + +### nrArfcn + + +``` +int CellRatNr::nrArfcn +``` +**描述:** +BCCH载频的绝对射频频道号 + + +### pci + + +``` +int CellRatNr::pci +``` +**描述:** +物理小区标识 + + +### tac + + +``` +int CellRatNr::tac +``` +**描述:** +类型分配码 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_rat_tdscdma.md b/zh-cn/device-dev/reference/hdi-apis/_cell_rat_tdscdma.md new file mode 100644 index 0000000000000000000000000000000000000000..db882237525be99422fbfbb7b86749c6f65bcb24 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_rat_tdscdma.md @@ -0,0 +1,121 @@ +# CellRatTdscdma + + +## 概述 + +TDSCDMA蜂窝信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [arfcn](#arfcn) | int
BCCH载频的绝对射频频道号  | +| [syncId](#syncid) | int
同步标识  | +| [sc](#sc) | int
超级小区  | +| [cellId](#cellid) | int
小区标识  | +| [lac](#lac) | int
地区区域码  | +| [rscp](#rscp) | int
接收信号码功率  | +| [drx](#drx) | int
不连续接收周期长度  | +| [rac](#rac) | int
路由区域码  | +| [cpid](#cpid) | int
超级小区标识  | + + +## 类成员变量说明 + + +### arfcn + + +``` +int CellRatTdscdma::arfcn +``` +**描述:** +BCCH载频的绝对射频频道号 + + +### cellId + + +``` +int CellRatTdscdma::cellId +``` +**描述:** +小区标识 + + +### cpid + + +``` +int CellRatTdscdma::cpid +``` +**描述:** +超级小区标识 + + +### drx + + +``` +int CellRatTdscdma::drx +``` +**描述:** +不连续接收周期长度 + + +### lac + + +``` +int CellRatTdscdma::lac +``` +**描述:** +地区区域码 + + +### rac + + +``` +int CellRatTdscdma::rac +``` +**描述:** +路由区域码 + + +### rscp + + +``` +int CellRatTdscdma::rscp +``` +**描述:** +接收信号码功率 + + +### sc + + +``` +int CellRatTdscdma::sc +``` +**描述:** +超级小区 + + +### syncId + + +``` +int CellRatTdscdma::syncId +``` +**描述:** +同步标识 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_rat_wcdma.md b/zh-cn/device-dev/reference/hdi-apis/_cell_rat_wcdma.md new file mode 100644 index 0000000000000000000000000000000000000000..e8b3cd7f3a75c002b4718fd416e6098c15b8f5cf --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_rat_wcdma.md @@ -0,0 +1,121 @@ +# CellRatWcdma + + +## 概述 + +WCDMA蜂窝信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [arfcn](#arfcn) | int
BCCH载频的绝对射频频道号,取值范围0~16383  | +| [psc](#psc) | int
主扰码,取值范围0~511  | +| [cellId](#cellid) | int
小区标识  | +| [lac](#lac) | int
位置区号,取值范围0~0xFFFF  | +| [rscp](#rscp) | int
信号接收功率dBm, 取值范围-140~-44  | +| [rxlev](#rxlev) | int
信号接收强度,取值范围-19~-3  | +| [ecno](#ecno) | int
接收信号强度dbm,取值范围-90~-25  | +| [drx](#drx) | int
不连续接收周期长度,取值范围6~9  | +| [ura](#ura) | int
UTRAN(UMTS Terrestrial Radio Access Network)注册区域标识  | + + +## 类成员变量说明 + + +### arfcn + + +``` +int CellRatWcdma::arfcn +``` +**描述:** +BCCH载频的绝对射频频道号,取值范围0~16383 + + +### cellId + + +``` +int CellRatWcdma::cellId +``` +**描述:** +小区标识 + + +### drx + + +``` +int CellRatWcdma::drx +``` +**描述:** +不连续接收周期长度,取值范围6~9 + + +### ecno + + +``` +int CellRatWcdma::ecno +``` +**描述:** +接收信号强度dbm,取值范围-90~-25 + + +### lac + + +``` +int CellRatWcdma::lac +``` +**描述:** +位置区号,取值范围0~0xFFFF + + +### psc + + +``` +int CellRatWcdma::psc +``` +**描述:** +主扰码,取值范围0~511 + + +### rscp + + +``` +int CellRatWcdma::rscp +``` +**描述:** +信号接收功率dBm, 取值范围-140~-44 + + +### rxlev + + +``` +int CellRatWcdma::rxlev +``` +**描述:** +信号接收强度,取值范围-19~-3 + + +### ura + + +``` +int CellRatWcdma::ura +``` +**描述:** +UTRAN(UMTS Terrestrial Radio Access Network)注册区域标识 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cell_trajectory_data.md b/zh-cn/device-dev/reference/hdi-apis/_cell_trajectory_data.md new file mode 100644 index 0000000000000000000000000000000000000000..4d4742b61b0a71795ab44cbd7ecb52ea4bbd2f05 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cell_trajectory_data.md @@ -0,0 +1,117 @@ +# CellTrajectoryData + + +## 概述 + +定义上报的基站轨迹数据的数据结构。 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceCellbatching](_hdi_lpfence_cellbatching.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [timeStampLow](#timestamplow) | unsigned int
时间戳的低32位 | +| [timeStampHigh](#timestamphigh) | unsigned int
时间戳的高32位 | +| [cid](#cid) | unsigned lone
基站号 | +| [lac](#lac) | unsigned int
小区号 | +| [rssi](#rssi) | unsigned short
信号接收强度 | +| [mcc](#mcc) | unsigned short
移动国家码 | +| [mnc](#mnc) | unsigned short
移动网络码 | + + +## 类成员变量说明 + + +### cid + + +``` +unsigned lone CellTrajectoryData::cid +``` + +**描述:** + +基站号 + + +### lac + + +``` +unsigned int CellTrajectoryData::lac +``` + +**描述:** + +小区号 + + +### mcc + + +``` +unsigned short CellTrajectoryData::mcc +``` + +**描述:** + +移动国家码 + + +### mnc + + +``` +unsigned short CellTrajectoryData::mnc +``` + +**描述:** + +移动网络码 + + +### rssi + + +``` +unsigned short CellTrajectoryData::rssi +``` + +**描述:** + +信号接收强度 + + +### timeStampHigh + + +``` +unsigned int CellTrajectoryData::timeStampHigh +``` + +**描述:** + +时间戳的高32位 + + +### timeStampLow + + +``` +unsigned int CellTrajectoryData::timeStampLow +``` + +**描述:** + +时间戳的低32位 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cellbatching_request.md b/zh-cn/device-dev/reference/hdi-apis/_cellbatching_request.md new file mode 100644 index 0000000000000000000000000000000000000000..3827f1c54c6c4eac97a15a0d0ab0606b3e170ca8 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cellbatching_request.md @@ -0,0 +1,52 @@ +# CellbatchingRequest + + +## 概述 + +定义设置基站轨迹数据上报功能的数据结构。 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceCellbatching](_hdi_lpfence_cellbatching.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [status](#status) | int
基站轨迹数据记录功能开关,详见[CellbatchingSwitch](_hdi_lpfence_cellbatching.md#cellbatchingswitch)。 | +| [interval](#interval) | int
设置modem接收基站数据的时间间隔,单位为秒,最小间隔30秒,最大间隔240秒。 | + + +## 类成员变量说明 + + +### interval + + +``` +int CellbatchingRequest::interval +``` + +**描述:** + +设置modem接收基站数据的时间间隔,单位为秒,最小间隔30秒,最大间隔240秒 + + +### status + + +``` +int CellbatchingRequest::status +``` + +**描述:** + +基站轨迹数据记录功能开关,详见[CellbatchingSwitch](_hdi_lpfence_cellbatching.md#cellbatchingswitch)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cellbatching_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_cellbatching_types_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..0b4ef5805b49e04b67d48ab2d48f02c1e69281a8 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cellbatching_types_8idl.md @@ -0,0 +1,43 @@ +# CellbatchingTypes.idl + + +## 概述 + +定义基站轨迹数据记录模块使用的数据类型。 + +**Since:** + +4.0 + +**Version:** + +1.0 + +**相关模块:** + +[HdiLpfenceCellbatching](_hdi_lpfence_cellbatching.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [CellbatchingRequest](_cellbatching_request.md) | struct
定义设置基站轨迹数据上报功能的数据结构。 | +| [CellTrajectoryData](_cell_trajectory_data.md) | struct
定义上报的基站轨迹数据的数据结构。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [CellbatchingSwitch](_hdi_lpfence_cellbatching.md#cellbatchingswitch) { SWITCH_OFF = 0 , SWITCH_ON = 1 } | 枚举对基站轨迹数据记录的开关操作。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.cellbatching.v1_0 | 基站轨迹数据记录模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_cellfence_info.md b/zh-cn/device-dev/reference/hdi-apis/_cellfence_info.md new file mode 100644 index 0000000000000000000000000000000000000000..d7fddf991e50fe5232fb02fa3680a78ccda4b383 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cellfence_info.md @@ -0,0 +1,52 @@ +# CellfenceInfo + + +## 概述 + +定义基站基本信息的数据结构。 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceCellfence](_hdi_lpfence_cellfence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [lac](#lac) | unsigned int
基站号 | +| [cid](#cid) | unsigned long
小区号 | + + +## 类成员变量说明 + + +### cid + + +``` +unsigned long CellfenceInfo::cid +``` + +**描述:** + +小区号 + + +### lac + + +``` +unsigned int CellfenceInfo::lac +``` + +**描述:** + +基站号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cellfence_request.md b/zh-cn/device-dev/reference/hdi-apis/_cellfence_request.md new file mode 100644 index 0000000000000000000000000000000000000000..295d730738f02bb96a3b02423d91eacd4de47a04 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cellfence_request.md @@ -0,0 +1,52 @@ +# CellfenceRequest + + +## 概述 + +定义添加基站围栏的数据结构。 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceCellfence](_hdi_lpfence_cellfence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [cellfenceId](#cellfenceid) | int
基站围栏的ID号,用于标识某个基站围栏,不可重复添加相同ID号的围栏。 | +| [cellInfo](#cellinfo) | struct [CellfenceInfo](_cellfence_info.md)[]
基站围栏信息,详见[CellfenceInfo](_cellfence_info.md)。 | + + +## 类成员变量说明 + + +### cellfenceId + + +``` +int CellfenceRequest::cellfenceId +``` + +**描述:** + +基站围栏的ID号,用于标识某个基站围栏,不可重复添加相同ID号的围栏。 + + +### cellInfo + + +``` +struct CellfenceInfo [] CellfenceRequest::cellInfo +``` + +**描述:** + +基站围栏信息,详见[CellfenceInfo](_cellfence_info.md)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cellfence_size.md b/zh-cn/device-dev/reference/hdi-apis/_cellfence_size.md new file mode 100644 index 0000000000000000000000000000000000000000..812d1f3cb701870fbc1901cb31a441dd45782f40 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cellfence_size.md @@ -0,0 +1,52 @@ +# CellfenceSize + + +## 概述 + +定义基站围栏使用信息的数据结构。 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceCellfence](_hdi_lpfence_cellfence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [maxNum](#maxnum) | unsigned int
设备支持的最大基站围栏个数。 | +| [usedNum](#usednum) | unsigned int
当前设备已添加的基站围栏个数。 | + + +## 类成员变量说明 + + +### maxNum + + +``` +unsigned int CellfenceSize::maxNum +``` + +**描述:** + +设备支持的最大基站围栏个数。 + + +### usedNum + + +``` +unsigned int CellfenceSize::usedNum +``` + +**描述:** + +当前设备已添加的基站围栏个数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cellfence_status.md b/zh-cn/device-dev/reference/hdi-apis/_cellfence_status.md new file mode 100644 index 0000000000000000000000000000000000000000..3483c44d2efc43f63dcbe6cc1a336be4e376702a --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cellfence_status.md @@ -0,0 +1,52 @@ +# CellfenceStatus + + +## 概述 + +定义设备与基站围栏状态关系的数据结构。 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceCellfence](_hdi_lpfence_cellfence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [cellfenceId](#cellfenceid) | int
基站围栏的ID号,用于标识某个基站围栏。 | +| [status](#status) | unsigned short
设备与该基站围栏的位置关系。详见[CellfenceTransition](_hdi_lpfence_cellfence.md#cellfencetransition)。 | + + +## 类成员变量说明 + + +### cellfenceId + + +``` +int CellfenceStatus::cellfenceId +``` + +**描述:** + +基站围栏的ID号,用于标识某个基站围栏。 + + +### status + + +``` +unsigned short CellfenceStatus::status +``` + +**描述:** + +设备与该基站围栏的位置关系。详见[CellfenceTransition](_hdi_lpfence_cellfence.md#cellfencetransition)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cellfence_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_cellfence_types_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..8679bb9e36bac509621fd7a63d432b8c88c77ba7 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cellfence_types_8idl.md @@ -0,0 +1,45 @@ +# CellfenceTypes.idl + + +## 概述 + +定义基站围栏使用的数据类型。 + +**Since:** + +4.0 + +**Version:** + +1.0 + +**相关模块:** + +[HdiLpfenceCellfence](_hdi_lpfence_cellfence.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [CellfenceInfo](_cellfence_info.md) | struct
定义基站基本信息的数据结构。 | +| [CellfenceRequest](_cellfence_request.md) | struct
定义添加基站围栏的数据结构。 | +| [CellfenceStatus](_cellfence_status.md) | struct
定义设备与基站围栏状态关系的数据结构。 | +| [CellfenceSize](_cellfence_size.md) | struct
定义基站围栏使用信息的数据结构。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [CellfenceTransition](_hdi_lpfence_cellfence.md#cellfencetransition) { FENCE_ENTER = 0 , FENCE_EXIT = 3 } | 枚举设备与基站围栏的位置关系。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.cellfence.v1_0 | 基站围栏模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_channel_config_info_list.md b/zh-cn/device-dev/reference/hdi-apis/_channel_config_info_list.md new file mode 100644 index 0000000000000000000000000000000000000000..f730b55556bac7b44dbf651906931faee23d39a6 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_channel_config_info_list.md @@ -0,0 +1,55 @@ +# ChannelConfigInfoList + + +## 概述 + +通道配置信息列表。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [itemNum](#itemnum) | int
编号  | +| [channelConfigInfos](#channelconfiginfos) | List< struct [PhysicalChannelConfig](_physical_channel_config.md) >
物理通道配置  | +| [flag](#flag) | int
通道配置标识  | + + +## 类成员变量说明 + + +### channelConfigInfos + + +``` +List ChannelConfigInfoList::channelConfigInfos +``` +**描述:** +物理通道配置 + + +### flag + + +``` +int ChannelConfigInfoList::flag +``` +**描述:** +通道配置标识 + + +### itemNum + + +``` +int ChannelConfigInfoList::itemNum +``` +**描述:** +编号 diff --git a/zh-cn/device-dev/reference/hdi-apis/codec.md b/zh-cn/device-dev/reference/hdi-apis/_codec.md similarity index 55% rename from zh-cn/device-dev/reference/hdi-apis/codec.md rename to zh-cn/device-dev/reference/hdi-apis/_codec.md index 94f2cc468c9d22a470f36129b1b182ff16b7d5ba..4e4636bbe3503b66756636aa37ffb65d5cf34bfd 100644 --- a/zh-cn/device-dev/reference/hdi-apis/codec.md +++ b/zh-cn/device-dev/reference/hdi-apis/_codec.md @@ -1,69 +1,69 @@ # Codec -## **概述** +## 概述 Codec模块接口定义。 Codec模块涉及自定义类型、音视频编解码组件初始化、参数设置、数据的轮转和控制等。 -**Since**: +**Since:** 3.1 -**Version**: +**Version:** 2.0 -## **汇总** +## 汇总 ### 文件 | 名称 | 描述 | | -------- | -------- | -| [codec_callback_if.h](codec_callback_if_h.md) | 主要包括回调函数接口定义。 | -| [codec_common_type.h](codec_common_type_h.md) | Codec模块接口定义中使用的自定义数据类型。 | -| [codec_component_if.h](codec_component_if_h.md) | 主要包括Codec组件接口定义。 | -| [codec_component_manager.h](codec__component__manager_h.md) | 主要包括Codec组件管理类接口。 | -| [codec_component_type.h](codec__component__type_h.md) | Codec模块接口定义中使用的自定义数据类型。 | +| [codec_callback_if.h](codec__callback__if_8h.md) | 主要包括回调函数接口定义。 | +| [codec_common_type.h](codec__common__type_8h.md) | Codec模块接口定义中使用的自定义数据类型。 | +| [codec_component_if.h](codec__component__if_8h.md) | 主要包括Codec组件接口定义。 | +| [codec_component_manager.h](codec__component__manager_8h.md) | 主要包括Codec组件管理类接口。 | +| [codec_component_type.h](codec__component__type_8h.md) | Codec模块接口定义中使用的自定义数据类型。 | ### 类 | 名称 | 描述 | | -------- | -------- | -| [CodecCallbackType](_codec_callback_type.md) | Codec回调接口定义。 | -| [Alignment](_alignment.md) | 对齐结构定义,包含宽高的对齐值。 | -| [Rect](_rect.md) | 矩形的定义。 | -| [RangeValue](_range_value.md) | 取值范围的定义。 | -| [CodecComponentType](_codec_component_type.md) | Codec组件接口定义。 | -| [CodecComponentManager](_codec_component_manager.md) | Codec组件管理类接口定义。 | -| [VideoPortCap](_video_port_cap.md) | 定义视频编解码能力。 | -| [AudioPortCap](audio_portcap.md) | 定义音频编解码能力。 | -| [PortCap](union_port_cap.md) | 定义音视频编解码能力。 | -| [CodecCompCapability](_codec_comp_capability.md) | 定义Codec编解码能力。 | -| [OmxCodecBuffer](_omx_codec_buffer.md) | Codec buffer信息的定义。 | -| [CompVerInfo](_comp_ver_info.md) | 定义组件版本信息。 | -| [EventInfo](_event_info.md) | 定义事件上报信息。 | -| [SupportBufferType](_support_buffer_type.md) | SupportBuffer类型定义。 | -| [UseBufferType](_use_buffer_type.md) | UseBuffer类型定义。 | -| [GetBufferHandleUsageParams](_get_buffer_handle_usage_params.md) | BufferHandleUsage类型定义。 | +| [CodecCallbackType](_codec_callback_type.md) | struct
Codec回调接口定义。 | +| [Alignment](_alignment.md) | struct
对齐结构定义,包含宽高的对齐值。 | +| [Rect](_rect.md) | struct
矩形的定义。 | +| [RangeValue](_range_value.md) | struct
取值范围的定义。 | +| [CodecComponentType](_codec_component_type.md) | struct
Codec组件接口定义。 | +| [CodecComponentManager](_codec_component_manager.md) | struct
Codec组件管理类接口定义。 | +| [VideoPortCap](_video_port_cap.md) | struct
定义视频编解码能力。 | +| [AudioPortCap](_audio_port_cap.md) | struct
定义音频编解码能力。 | +| [PortCap](union_port_cap.md) | union
定义音视频编解码能力。 | +| [CodecCompCapability](_codec_comp_capability.md) | struct
定义Codec编解码能力。 | +| [OmxCodecBuffer](_omx_codec_buffer.md) | struct
Codec buffer信息的定义。 | +| [CompVerInfo](_comp_ver_info.md) | struct
定义组件版本信息。 | +| [EventInfo](_event_info.md) | struct
定义事件上报信息。 | +| [SupportBufferType](_support_buffer_type.md) | struct
SupportBuffer类型定义。 | +| [UseBufferType](_use_buffer_type.md) | struct
UseBuffer类型定义。 | +| [GetBufferHandleUsageParams](_get_buffer_handle_usage_params.md) | struct
BufferHandleUsage类型定义。 | ### 宏定义 | 名称 | 描述 | | -------- | -------- | -| SAMPLE_FMT_NUM    32 | 采样格式最大值。 | -| UUID_LENGTH    128 | 定义UUID长度。 | -| PIX_FORMAT_NUM    16 | 支持的像素格式数组大小。 | -| SAMPLE_FORMAT_NUM    12 | 支持的音频采样格式数组大小。 | -| SAMPLE_RATE_NUM    16 | 支持的音频采样率数组大小。 | -| CHANNEL_NUM    16 | 支持的音频通道数组大小。 | -| NAME_LENGTH    32 | 组件名称大小。 | -| PROFILE_NUM    256 | 支持的profile数组大小。 | +| [SAMPLE_FMT_NUM](#sample_fmt_num)   32 | 采样格式最大值。 | +| [UUID_LENGTH](#uuid_length)   128 | 定义UUID长度。 | +| [PIX_FORMAT_NUM](#pix_format_num)   16 | 支持的像素格式数组大小。 | +| [SAMPLE_FORMAT_NUM](#sample_format_num)   12 | 支持的音频采样格式数组大小。 | +| [SAMPLE_RATE_NUM](#sample_rate_num)   16 | 支持的音频采样率数组大小。 | +| [CHANNEL_NUM](#channel_num)   16 | 支持的音频通道数组大小。 | +| [NAME_LENGTH](#name_length)   32 | 组件名称大小。 | +| [PROFILE_NUM](#profile_num)   256 | 支持的profile数组大小。 | ### 枚举 @@ -75,9 +75,9 @@ Codec模块涉及自定义类型、音视频编解码组件初始化、参数设 | [AudioSampleRate](#audiosamplerate) { AUD_SAMPLE_RATE_8000 = 8000, AUD_SAMPLE_RATE_12000 = 12000, AUD_SAMPLE_RATE_11025 = 11025, AUD_SAMPLE_RATE_16000 = 16000,   AUD_SAMPLE_RATE_22050 = 22050, AUD_SAMPLE_RATE_24000 = 24000, AUD_SAMPLE_RATE_32000 = 32000, AUD_SAMPLE_RATE_44100 = 44100,   AUD_SAMPLE_RATE_48000 = 48000, AUD_SAMPLE_RATE_64000 = 64000, AUD_SAMPLE_RATE_96000 = 96000, AUD_SAMPLE_RATE_INVALID } | 枚举音频采样率。 | | [CodecCapsMask](#codeccapsmask) { CODEC_CAP_ADAPTIVE_PLAYBACK = 0x1, CODEC_CAP_SECURE_PLAYBACK = 0x2, CODEC_CAP_TUNNEL_PLAYBACK = 0x4, CODEC_CAP_MULTI_PLANE = 0x10000 } | 枚举播放能力。 | | [CodecProcessMode](#codecprocessmode) { PROCESS_BLOCKING_INPUT_BUFFER = 0X1, PROCESS_BLOCKING_OUTPUT_BUFFER = 0X2, PROCESS_BLOCKING_CONTROL_FLOW = 0X4, PROCESS_NONBLOCKING_INPUT_BUFFER = 0X100,   PROCESS_NONBLOCKING_OUTPUT_BUFFER = 0X200, PROCESS_NONBLOCKING_CONTROL_FLOW = 0X400 } | 枚举编解码处理模式。 | -| [AvCodecRole](#avcodecrole) {   MEDIA_ROLETYPE_IMAGE_JPEG = 0, MEDIA_ROLETYPE_VIDEO_AVC, MEDIA_ROLETYPE_VIDEO_HEVC, MEDIA_ROLETYPE_AUDIO_FIRST = 0x10000,   MEDIA_ROLETYPE_AUDIO_AAC = 0x10000, MEDIA_ROLETYPE_AUDIO_G711A, MEDIA_ROLETYPE_AUDIO_G711U, MEDIA_ROLETYPE_AUDIO_G726,   MEDIA_ROLETYPE_AUDIO_PCM, MEDIA_ROLETYPE_AUDIO_MP3, MEDIA_ROLETYPE_INVALID } | 枚举音视频编解码组件类型。 | -| [AudioSampleFormat](#audiosampleformat) {  AUDIO_SAMPLE_FORMAT_S8 = 0, AUDIO_SAMPLE_FORMAT_S8P = 1, AUDIO_SAMPLE_FORMAT_U8 = 2, AUDIO_SAMPLE_FORMAT_U8P = 3,   AUDIO_SAMPLE_FORMAT_S16 = 4, AUDIO_SAMPLE_FORMAT_S16P = 5, AUDIO_SAMPLE_FORMAT_U16 = 6, AUDIO_SAMPLE_FORMAT_U16P = 7,   AUDIO_SAMPLE_FORMAT_S24 = 8, AUDIO_SAMPLE_FORMAT_S24P = 9, AUDIO_SAMPLE_FORMAT_U24 = 10, AUDIO_SAMPLE_FORMAT_U24P = 11,   AUDIO_SAMPLE_FORMAT_S32 = 12, AUDIO_SAMPLE_FORMAT_S32P = 13, AUDIO_SAMPLE_FORMAT_U32 = 14, AUDIO_SAMPLE_FORMAT_U32P = 15,   AUDIO_SAMPLE_FORMAT_S64 = 16, AUDIO_SAMPLE_FORMAT_S64P = 17, AUDIO_SAMPLE_FORMAT_U64 = 18, AUDIO_SAMPLE_FORMAT_U64P = 19,   AUDIO_SAMPLE_FORMAT_F32 = 20, AUDIO_SAMPLE_FORMAT_F32P = 21, AUDIO_SAMPLE_FORMAT_F64 = 22, AUDIO_SAMPLE_FORMAT_F64P = 23,   AUDIO_SAMPLE_FMT_U8, AUDIO_SAMPLE_FMT_S16, AUDIO_SAMPLE_FMT_S32, AUDIO_SAMPLE_FMT_FLOAT,   AUDIO_SAMPLE_FMT_DOUBLE, AUDIO_SAMPLE_FMT_U8P, AUDIO_SAMPLE_FMT_S16P, AUDIO_SAMPLE_FMT_S32P,   AUDIO_SAMPLE_FMT_FLOATP, AUDIO_SAMPLE_FMT_DOUBLEP, AUDIO_SAMPLE_FMT_INVALID } | 枚举音频采样格式。 | -| [CodecBufferType](#codecbuffertype) {   CODEC_BUFFER_TYPE_INVALID = 0, CODEC_BUFFER_TYPE_VIRTUAL_ADDR = 0x1, CODEC_BUFFER_TYPE_AVSHARE_MEM_FD = 0x2, CODEC_BUFFER_TYPE_HANDLE = 0x4,   CODEC_BUFFER_TYPE_DYNAMIC_HANDLE = 0x8 } | 定义buffer类型。 | +| [AvCodecRole](#avcodecrole) { MEDIA_ROLETYPE_IMAGE_JPEG = 0, MEDIA_ROLETYPE_VIDEO_AVC, MEDIA_ROLETYPE_VIDEO_HEVC, MEDIA_ROLETYPE_AUDIO_FIRST = 0x10000,   MEDIA_ROLETYPE_AUDIO_AAC = 0x10000, MEDIA_ROLETYPE_AUDIO_G711A, MEDIA_ROLETYPE_AUDIO_G711U, MEDIA_ROLETYPE_AUDIO_G726,   MEDIA_ROLETYPE_AUDIO_PCM, MEDIA_ROLETYPE_AUDIO_MP3, MEDIA_ROLETYPE_INVALID } | 枚举音视频编解码组件类型。 | +| [AudioSampleFormat](#audiosampleformat) {
AUDIO_SAMPLE_FMT_U8 , AUDIO_SAMPLE_FMT_S16 , AUDIO_SAMPLE_FMT_S32 , AUDIO_SAMPLE_FMT_FLOAT ,
AUDIO_SAMPLE_FMT_DOUBLE , AUDIO_SAMPLE_FMT_U8P , AUDIO_SAMPLE_FMT_S16P , AUDIO_SAMPLE_FMT_S32P ,
AUDIO_SAMPLE_FMT_FLOATP , AUDIO_SAMPLE_FMT_DOUBLEP , AUDIO_SAMPLE_FMT_INVALID
} | 枚举音频采样格式。 | +| [CodecBufferType](#codecbuffertype) { CODEC_BUFFER_TYPE_INVALID = 0, CODEC_BUFFER_TYPE_VIRTUAL_ADDR = 0x1, CODEC_BUFFER_TYPE_AVSHARE_MEM_FD = 0x2, CODEC_BUFFER_TYPE_HANDLE = 0x4,   CODEC_BUFFER_TYPE_DYNAMIC_HANDLE = 0x8 } | 定义buffer类型。 | | [ShareMemTypes](#sharememtypes) { READ_WRITE_TYPE = 0x1, READ_ONLY_TYPE = 0x2 } | 枚举共享内存类型。 | | [OmxIndexCodecExType](#omxindexcodecextype) { OMX_IndexExtBufferTypeStartUnused = OMX_IndexKhronosExtensions + 0x00a00000, OMX_IndexParamSupportBufferType, OMX_IndexParamUseBufferType, OMX_IndexParamGetBufferHandleUsage } | 枚举Codec扩展index。 | | [OmxVideoExType](#omxvideoextype) { OMX_VIDEO_CodingHEVC = 11 } | 枚举Codec扩展编码类型。 | @@ -87,15 +87,114 @@ Codec模块涉及自定义类型、音视频编解码组件初始化、参数设 | 名称 | 描述 | | -------- | -------- | -| [CodecCallbackTypeGet](#codeccallbacktypeget) (struct HdfRemoteService \*remote) | 实例化CodecCallbackType对象。 | -| [CodecCallbackTypeRelease](#codeccallbacktyperelease) (struct [CodecCallbackType](_codec_callback_type.md) \*instance) | 释放CodecCallbackType对象。 | -| [CodecComponentTypeGet](#codeccomponenttypeget) (struct HdfRemoteService \*remote) | 实例化CodecComponentType对象。 | -| [CodecComponentTypeRelease](#codeccomponenttyperelease) (struct [CodecComponentType](_codec_component_type.md) \*instance) | 释放CodecComponentType对象。 | -| [GetCodecComponentManager](#getcodeccomponentmanager) (void) | 实例化CodecComponentManager对象。 | -| [CodecComponentManagerRelease](#codeccomponentmanagerrelease) (void) | 释放CodecComponentManager对象。 | +| [CodecCallbackTypeGet](#codeccallbacktypeget) (struct HdfRemoteService \*remote) | struct [CodecCallbackType](_codec_callback_type.md) \*
实例化CodecCallbackType对象。 | +| [CodecCallbackTypeRelease](#codeccallbacktyperelease) (struct [CodecCallbackType](_codec_callback_type.md) \*instance) | void
释放CodecCallbackType对象。 | +| [CodecComponentTypeGet](#codeccomponenttypeget) (struct HdfRemoteService \*remote) | struct [CodecComponentType](_codec_component_type.md) \*
实例化CodecComponentType对象。 | +| [CodecComponentTypeRelease](#codeccomponenttyperelease) (struct [CodecComponentType](_codec_component_type.md) \*instance) | void
释放CodecComponentType对象。 | +| [GetCodecComponentManager](#getcodeccomponentmanager) (void) | struct [CodecComponentManager](_codec_component_manager.md) \*
实例化CodecComponentManager对象。 | +| [CodecComponentManagerRelease](#codeccomponentmanagerrelease) (void) | void
释放CodecComponentManager对象。 | -## **枚举类型说明** +## 宏定义说明 + + +### CHANNEL_NUM + + +``` +#define CHANNEL_NUM 16 +``` + +**描述:** + +支持的音频通道数组大小。 + + +### NAME_LENGTH + + +``` +#define NAME_LENGTH 32 +``` + +**描述:** + +组件名称大小。 + + +### PIX_FORMAT_NUM + + +``` +#define PIX_FORMAT_NUM 16 +``` + +**描述:** + +支持的像素格式数组大小。 + + +### PROFILE_NUM + + +``` +#define PROFILE_NUM 256 +``` + +**描述:** + +支持的profile数组大小。 + + +### SAMPLE_FMT_NUM + + +``` +#define SAMPLE_FMT_NUM 32 +``` + +**描述:** + +采样格式最大值。 + + +### SAMPLE_FORMAT_NUM + + +``` +#define SAMPLE_FORMAT_NUM 12 +``` + +**描述:** + +支持的音频采样格式数组大小。 + + +### SAMPLE_RATE_NUM + + +``` +#define SAMPLE_RATE_NUM 16 +``` + +**描述:** + +支持的音频采样率数组大小。 + + +### UUID_LENGTH + + +``` +#define UUID_LENGTH 128 +``` + +**描述:** + +定义UUID长度。 + + +## 枚举类型说明 ### AudioSampleFormat @@ -105,48 +204,24 @@ Codec模块涉及自定义类型、音视频编解码组件初始化、参数设 enum AudioSampleFormat ``` -**描述:** +**描述:** 枚举音频采样格式。 -对于planar的采样格式,每个声道的数据是独立存储在data中;对于packed的采样格式,只使用第一个data,每个声道的数据是交错存储的。 +对于planar的采样格式,每个声道的数据是独立存储在data中; 对于packed的采样格式,只使用第一个data,每个声道的数据是交错存储的。 | 枚举值 | 描述 | | -------- | -------- | -| AUDIO_SAMPLE_FORMAT_S8 | 8bit位宽有符号交织样本。 | -| AUDIO_SAMPLE_FORMAT_S8P | 8bit位宽有符号非交织样本。 | -| AUDIO_SAMPLE_FORMAT_U8 | 8bit位宽无符号交织样本。 | -| AUDIO_SAMPLE_FORMAT_U8P | 8bit位宽无符号非交织样本。 | -| AUDIO_SAMPLE_FORMAT_S16 | 16bit位宽有符号交织样本。 | -| AUDIO_SAMPLE_FORMAT_S16P | 16bit位宽有符号非交织样本。 | -| AUDIO_SAMPLE_FORMAT_U16 | 16bit位宽无符号交织样本。 | -| AUDIO_SAMPLE_FORMAT_U16P | 16bit位宽无符号非交织样本。 | -| AUDIO_SAMPLE_FORMAT_S24 | 24bit位宽有符号交织样本。 | -| AUDIO_SAMPLE_FORMAT_S24P | 24bit位宽有符号非交织样本。 | -| AUDIO_SAMPLE_FORMAT_U24 | 24bit位宽无符号交织样本。 | -| AUDIO_SAMPLE_FORMAT_U24P | 24bit位宽无符号非交织样本。 | -| AUDIO_SAMPLE_FORMAT_S32 | 32bit位宽有符号交织样本。 | -| AUDIO_SAMPLE_FORMAT_S32P | 32bit位宽有符号非交织样本。 | -| AUDIO_SAMPLE_FORMAT_U32 | 32bit位宽无符号交织样本。 | -| AUDIO_SAMPLE_FORMAT_U32P | 32bit位宽无符号非交织样本。 | -| AUDIO_SAMPLE_FORMAT_S64 | 64bit位宽有符号交织样本。 | -| AUDIO_SAMPLE_FORMAT_S64P | 64bit位宽有符号非交织样本。 | -| AUDIO_SAMPLE_FORMAT_U64 | 64bit位宽无符号交织样本。 | -| AUDIO_SAMPLE_FORMAT_U64P | 64bit位宽无符号非交织样本。 | -| AUDIO_SAMPLE_FORMAT_F32 | 32bit位宽浮点型交织样本。 | -| AUDIO_SAMPLE_FORMAT_F32P | 64bit位宽浮点型非交织样本。 | -| AUDIO_SAMPLE_FORMAT_F64 | 64bit位宽双精度浮点型交织样本。 | -| AUDIO_SAMPLE_FORMAT_F64P | 64bit位宽双精度浮点型非交织样本。 | | AUDIO_SAMPLE_FMT_U8 | 无符号8位整型,打包格式。 | -| AUDIO_SAMPLE_FMT_S16 | 带符号16位整型,打包格式。 | -| AUDIO_SAMPLE_FMT_S32 | 带符号32位整型,打包格式。 | -| AUDIO_SAMPLE_FMT_FLOAT | 浮点型,打包格式。 | -| AUDIO_SAMPLE_FMT_DOUBLE | 双精度浮点型,打包格式。 | -| AUDIO_SAMPLE_FMT_U8P | 无符号8位整型,平面格式。 | -| AUDIO_SAMPLE_FMT_S16P | 带符号16位整型,平面格式。 | -| AUDIO_SAMPLE_FMT_S32P | 带符号32位整型,平面格式。 | -| AUDIO_SAMPLE_FMT_FLOATP | 浮点型,平面格式。 | -| AUDIO_SAMPLE_FMT_DOUBLEP | 双精度浮点型,平面格式。 | +| AUDIO_SAMPLE_FMT_S16 | 带符号16位整型, 打包格式。 | +| AUDIO_SAMPLE_FMT_S32 | 带符号32位整型, 打包格式。 | +| AUDIO_SAMPLE_FMT_FLOAT | 浮点型, 打包格式。 | +| AUDIO_SAMPLE_FMT_DOUBLE | 双精度浮点型, 打包格式。 | +| AUDIO_SAMPLE_FMT_U8P | 无符号8位整型, 平面格式。 | +| AUDIO_SAMPLE_FMT_S16P | 带符号16位整型, 平面格式。 | +| AUDIO_SAMPLE_FMT_S32P | 带符号32位整型, 平面格式。 | +| AUDIO_SAMPLE_FMT_FLOATP | 浮点型, 平面格式。 | +| AUDIO_SAMPLE_FMT_DOUBLEP | 双精度浮点型, 平面格式。 | | AUDIO_SAMPLE_FMT_INVALID | 无效采样格式。 | @@ -157,7 +232,7 @@ enum AudioSampleFormat enum AudioSampleRate ``` -**描述:** +**描述:** 枚举音频采样率。 @@ -184,7 +259,7 @@ enum AudioSampleRate enum AvCodecRole ``` -**描述:** +**描述:** 枚举音视频编解码组件类型。 @@ -210,7 +285,7 @@ enum AvCodecRole enum CodecBufferType ``` -**描述:** +**描述:** 定义buffer类型。 @@ -230,7 +305,7 @@ enum CodecBufferType enum CodecCapsMask ``` -**描述:** +**描述:** 枚举播放能力。 @@ -249,7 +324,7 @@ enum CodecCapsMask enum CodecProcessMode ``` -**描述:** +**描述:** 枚举编解码处理模式。 @@ -270,7 +345,7 @@ enum CodecProcessMode enum CodecType ``` -**描述:** +**描述:** 枚举编解码的类型。 @@ -290,7 +365,7 @@ enum CodecType enum OmxIndexCodecExType ``` -**描述:** +**描述:** 枚举Codec扩展index。 @@ -309,7 +384,7 @@ enum OmxIndexCodecExType enum OmxVideoExType ``` -**描述:** +**描述:** 枚举Codec扩展编码类型。 @@ -325,7 +400,7 @@ enum OmxVideoExType enum Profile ``` -**描述:** +**描述:** 枚举Codec规格。 @@ -352,7 +427,7 @@ enum Profile enum ShareMemTypes ``` -**描述:** +**描述:** 枚举共享内存类型。 @@ -362,17 +437,17 @@ enum ShareMemTypes | READ_ONLY_TYPE | 可读的共享内存类型。 | -## **函数说明** +## 函数说明 ### CodecCallbackTypeGet() ``` -struct CodecCallbackType* CodecCallbackTypeGet (struct HdfRemoteService * remote) +struct CodecCallbackType * CodecCallbackTypeGet (struct HdfRemoteService * remote) ``` -**描述:** +**描述:** 实例化CodecCallbackType对象。 @@ -394,7 +469,7 @@ struct CodecCallbackType* CodecCallbackTypeGet (struct HdfRemoteService * remote void CodecCallbackTypeRelease (struct CodecCallbackType * instance) ``` -**描述:** +**描述:** 释放CodecCallbackType对象。 @@ -412,7 +487,7 @@ void CodecCallbackTypeRelease (struct CodecCallbackType * instance) void CodecComponentManagerRelease (void ) ``` -**描述:** +**描述:** 释放CodecComponentManager对象。 @@ -421,10 +496,10 @@ void CodecComponentManagerRelease (void ) ``` -struct CodecComponentType* CodecComponentTypeGet (struct HdfRemoteService * remote) +struct CodecComponentType * CodecComponentTypeGet (struct HdfRemoteService * remote) ``` -**描述:** +**描述:** 实例化CodecComponentType对象。 @@ -446,7 +521,7 @@ struct CodecComponentType* CodecComponentTypeGet (struct HdfRemoteService * remo void CodecComponentTypeRelease (struct CodecComponentType * instance) ``` -**描述:** +**描述:** 释放CodecComponentType对象。 @@ -461,10 +536,10 @@ void CodecComponentTypeRelease (struct CodecComponentType * instance) ``` -struct CodecComponentManager* GetCodecComponentManager (void ) +struct CodecComponentManager * GetCodecComponentManager (void ) ``` -**描述:** +**描述:** 实例化CodecComponentManager对象。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_codec_callback_type.md b/zh-cn/device-dev/reference/hdi-apis/_codec_callback_type.md index a8e953b4c83018037268342dcbe6d7abf7d5e3c5..b7c5baeae74657a068bace75bd33de7137152d9f 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_codec_callback_type.md +++ b/zh-cn/device-dev/reference/hdi-apis/_codec_callback_type.md @@ -1,7 +1,7 @@ # CodecCallbackType -## **概述** +## 概述 Codec回调接口定义。 @@ -17,23 +17,23 @@ Codec回调接口定义。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [remote](#remote) | 指向HdfRemoteService的指针。 | -| ([EventHandler](#eventhandler) )(struct CodecCallbackType \*self, enum OMX_EVENTTYPE event, struct EventInfo \*info) | 事件上报。 | -| ([EmptyBufferDone](#emptybufferdone) )(struct CodecCallbackType \*self, int8_t \*appData, uint32_t appDataLen, const struct OmxCodecBuffer \*buffer) | 上报输入buffer编码或者解码处理完毕。 | -| ([FillBufferDone](#fillbufferdone) )(struct CodecCallbackType \*self, int8_t \*appData, uint32_t appDataLen, struct OmxCodecBuffer \*buffer) | 上报输出buffer填充完毕。 | +| [remote](#remote) | struct HdfRemoteService \*
指向HdfRemoteService的指针。 | +| (\* [EventHandler](#eventhandler) )(struct [CodecCallbackType](zh-cn_topic_0000001602431713.xml) \*self, enum OMX_EVENTTYPE event, struct [EventInfo](_event_info.md) \*info) | int32_t
事件上报。 | +| (\* [EmptyBufferDone](#emptybufferdone) )(struct [CodecCallbackType](zh-cn_topic_0000001602431713.xml) \*self, int8_t \*appData, uint32_t appDataLen, const struct [OmxCodecBuffer](_omx_codec_buffer.md) \*buffer) | int32_t
上报输入buffer编码或者解码处理完毕。 | +| (\* [FillBufferDone](#fillbufferdone) )(struct [CodecCallbackType](zh-cn_topic_0000001602431713.xml) \*self, int8_t \*appData, uint32_t appDataLen, struct [OmxCodecBuffer](_omx_codec_buffer.md) \*buffer) | int32_t
上报输出buffer填充完毕。 | -## **类成员变量说明** +## 类成员变量说明 ### EmptyBufferDone @@ -43,7 +43,7 @@ Codec回调接口定义。 int32_t(* CodecCallbackType::EmptyBufferDone) (struct CodecCallbackType *self, int8_t *appData, uint32_t appDataLen, const struct OmxCodecBuffer *buffer) ``` -**描述:** +**描述:** 上报输入buffer编码或者解码处理完毕。 @@ -76,7 +76,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,上报失败。 int32_t(* CodecCallbackType::EventHandler) (struct CodecCallbackType *self, enum OMX_EVENTTYPE event, struct EventInfo *info) ``` -**描述:** +**描述:** 事件上报。 @@ -120,7 +120,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,事件上报失败。 int32_t(* CodecCallbackType::FillBufferDone) (struct CodecCallbackType *self, int8_t *appData, uint32_t appDataLen, struct OmxCodecBuffer *buffer) ``` -**描述:** +**描述:** 上报输出buffer填充完毕。 @@ -153,6 +153,6 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,上报失败。 struct HdfRemoteService* CodecCallbackType::remote ``` -**描述:** +**描述:** 指向HdfRemoteService的指针。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_codec_comp_capability.md b/zh-cn/device-dev/reference/hdi-apis/_codec_comp_capability.md index 90cf2509f95cad1c5cfbb92dc82241320c9a1aa0..fc795d664b7a48c7d2f5c01806ad05f9f2a7ee9b 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_codec_comp_capability.md +++ b/zh-cn/device-dev/reference/hdi-apis/_codec_comp_capability.md @@ -1,35 +1,35 @@ # CodecCompCapability -## **概述** +## 概述 定义Codec编解码能力。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [role](#role) | 媒体类型。 | -| [type](#type) | 编解码类型。 | -| [compName](#compname) [NAME_LENGTH] | 编解码组件名称。 | -| [supportProfiles](#supportprofiles) [PROFILE_NUM] | 支持的profiles。 | -| [maxInst](#maxinst) | 最大实例。 | -| [isSoftwareCodec](#issoftwarecodec) | 软件编解码还是硬件编解码。 | -| [processModeMask](#processmodemask) | 编解码处理模式掩码。 | -| [capsMask](#capsmask) | 编解码播放能力掩码。 | -| [bitRate](#bitrate) | 支持的码率范围。 | -| [port](#port) | 支持的音视频编解码能力。 | +| [role](#role) | [AvCodecRole](_codec.md#avcodecrole)
媒体类型。  | +| [type](#type) | [CodecType](_codec.md#codectype)
编解码类型。  | +| [compName](#compname) [[NAME_LENGTH](_codec.md#name_length)] | char
编解码组件名称。  | +| [supportProfiles](#supportprofiles) [[PROFILE_NUM](_codec.md#profile_num)] | int32_t
支持的profiles,详见[Profile](_codec.md#profile)。  | +| [maxInst](#maxinst) | int32_t
最大实例。  | +| [isSoftwareCodec](#issoftwarecodec) | bool
软件编解码还是硬件编解码。  | +| [processModeMask](#processmodemask) | int32_t
编解码处理模式掩码,详见[CodecProcessMode](_codec.md#codecprocessmode)。  | +| [capsMask](#capsmask) | uint32_t
编解码播放能力掩码,详见[CodecCapsMask](_codec.md#codeccapsmask)。  | +| [bitRate](#bitrate) | [RangeValue](_range_value.md)
支持的码率范围。  | +| [port](#port) | [PortCap](union_port_cap.md)
支持的音视频编解码能力。  | -## **类成员变量说明** +## 类成员变量说明 ### bitRate @@ -38,9 +38,7 @@ ``` RangeValue CodecCompCapability::bitRate ``` - -**描述:** - +**描述:** 支持的码率范围。 @@ -50,10 +48,8 @@ RangeValue CodecCompCapability::bitRate ``` uint32_t CodecCompCapability::capsMask ``` - -**描述:** - -编解码播放能力掩码,详见[CodecCapsMask](codec.md#codeccapsmask)。 +**描述:** +编解码播放能力掩码,详见[CodecCapsMask](_codec.md#codeccapsmask)。 ### compName @@ -62,9 +58,7 @@ uint32_t CodecCompCapability::capsMask ``` char CodecCompCapability::compName[NAME_LENGTH] ``` - -**描述:** - +**描述:** 编解码组件名称。 @@ -74,9 +68,7 @@ char CodecCompCapability::compName[NAME_LENGTH] ``` bool CodecCompCapability::isSoftwareCodec ``` - -**描述:** - +**描述:** 软件编解码还是硬件编解码。 @@ -86,9 +78,7 @@ bool CodecCompCapability::isSoftwareCodec ``` int32_t CodecCompCapability::maxInst ``` - -**描述:** - +**描述:** 最大实例。 @@ -98,9 +88,7 @@ int32_t CodecCompCapability::maxInst ``` PortCap CodecCompCapability::port ``` - -**描述:** - +**描述:** 支持的音视频编解码能力。 @@ -110,10 +98,8 @@ PortCap CodecCompCapability::port ``` int32_t CodecCompCapability::processModeMask ``` - -**描述:** - -编解码处理模式掩码,详见[CodecProcessMode](codec.md#codecprocessmode)。 +**描述:** +编解码处理模式掩码,详见[CodecProcessMode](_codec.md#codecprocessmode)。 ### role @@ -122,9 +108,7 @@ int32_t CodecCompCapability::processModeMask ``` AvCodecRole CodecCompCapability::role ``` - -**描述:** - +**描述:** 媒体类型。 @@ -134,10 +118,8 @@ AvCodecRole CodecCompCapability::role ``` int32_t CodecCompCapability::supportProfiles[PROFILE_NUM] ``` - -**描述:** - -支持的profiles,详见[Profile](codec.md#profile)。 +**描述:** +支持的profiles,详见[Profile](_codec.md#profile)。 ### type @@ -146,7 +128,5 @@ int32_t CodecCompCapability::supportProfiles[PROFILE_NUM] ``` CodecType CodecCompCapability::type ``` - -**描述:** - +**描述:** 编解码类型。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_codec_component_manager.md b/zh-cn/device-dev/reference/hdi-apis/_codec_component_manager.md index 00ea99f6b089455040d9aadc8234222404cabc28..665cc69a12d86e2e7c35b6b162c2f59f8e352f1e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_codec_component_manager.md +++ b/zh-cn/device-dev/reference/hdi-apis/_codec_component_manager.md @@ -1,7 +1,7 @@ # CodecComponentManager -## **概述** +## 概述 Codec组件管理类接口定义。 @@ -13,23 +13,23 @@ Codec组件管理类接口定义。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| ([GetComponentNum](#getcomponentnum) )() | 获取Codec编解码组件数量。 | -| ([GetComponentCapabilityList](#getcomponentcapabilitylist) )(CodecCompCapability \*capList, int32_t count) | 获取编解码能力集表。 | -| ([CreateComponent](#createcomponent) )(struct CodecComponentType \*\*component, char \*compName, void \*appData, int32_t appDataSize, struct CodecCallbackType \*callbacks) | 创建Codec组件实例。 | -| ([DestroyComponent](#destroycomponent) )(struct CodecComponentType \*component) | 销毁组件实例。 | +| (\* [GetComponentNum](#getcomponentnum) )() | int32_t
获取Codec编解码组件数量。 | +| (\* [GetComponentCapabilityList](#getcomponentcapabilitylist) )([CodecCompCapability](_codec_comp_capability.md) \*capList, int32_t count) | int32_t
获取编解码能力集表。 | +| (\* [CreateComponent](#createcomponent) )(struct [CodecComponentType](_codec_component_type.md) \*\*component, char \*compName, void \*appData, int32_t appDataSize, struct [CodecCallbackType](_codec_callback_type.md) \*callbacks) | int32_t
创建Codec组件实例。 | +| (\* [DestroyComponent](#destroycomponent) )(struct [CodecComponentType](_codec_component_type.md) \*component) | int32_t
销毁组件实例。 | -## **类成员变量说明** +## 类成员变量说明 ### CreateComponent @@ -39,7 +39,7 @@ Codec组件管理类接口定义。 int32_t(* CodecComponentManager::CreateComponent) (struct CodecComponentType **component, char *compName, void *appData, int32_t appDataSize, struct CodecCallbackType *callbacks) ``` -**描述:** +**描述:** 创建Codec组件实例。 @@ -73,7 +73,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,创建组件失败。 int32_t(* CodecComponentManager::DestroyComponent) (struct CodecComponentType *component) ``` -**描述:** +**描述:** 销毁组件实例。 @@ -103,7 +103,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,销毁组件失败。 int32_t(* CodecComponentManager::GetComponentCapabilityList) (CodecCompCapability *capList, int32_t count) ``` -**描述:** +**描述:** 获取编解码能力集表。 @@ -134,7 +134,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,获取能力集表失败。 int32_t(* CodecComponentManager::GetComponentNum) () ``` -**描述:** +**描述:** 获取Codec编解码组件数量。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_codec_component_type.md b/zh-cn/device-dev/reference/hdi-apis/_codec_component_type.md index 3840fc5721763eb96cff3ff7d070b3f85ed5fbeb..527429edcc47d8029c226698ce0acee383143a75 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_codec_component_type.md +++ b/zh-cn/device-dev/reference/hdi-apis/_codec_component_type.md @@ -1,57 +1,57 @@ # CodecComponentType -## **概述** +## 概述 Codec组件接口定义。 -主要提供以下功能: +主要提供以下功能: -- 获取组件的版本。 +- 获取组件的版本 -- 组件参数配置的获取和设置。 +- 组件参数配置的获取和设置 -- 发送命令至组件及获取组件状态。 +- 发送命令至组件及获取组件状态 -- 设置回调函数。 +- 设置回调函数 -- 设置/释放组件使用的buffer。 +- 设置/释放组件使用的buffer -- 编解码输入输出buffer处理 具体方法使用详见函数说明。 +- 编解码输入输出buffer处理,具体方法使用详见函数说明。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| ([GetComponentVersion](#getcomponentversion) )(struct CodecComponentType \*self, struct CompVerInfo \*verInfo) | 获取Codec组件版本号。 | -| ([SendCommand](#sendcommand) )(struct CodecComponentType \*self, enum OMX_COMMANDTYPE cmd, uint32_t param, int8_t \*cmdData, uint32_t cmdDataLen) | 发送命令给组件。 | -| ([GetParameter](#getparameter) )(struct CodecComponentType \*self, uint32_t paramIndex, int8_t \*paramStruct, uint32_t paramStructLen) | 获取组件参数设置。 | -| ([SetParameter](#setparameter) )(struct CodecComponentType \*self, uint32_t index, int8_t \*paramStruct, uint32_t paramStructLen) | 设置组件需要的参数。 | -| ([GetConfig](#getconfig) )(struct CodecComponentType \*self, uint32_t index, int8_t \*cfgStruct, uint32_t cfgStructLen) | 获取组件的配置结构。 | -| ([SetConfig](#setconfig) )(struct CodecComponentType \*self, uint32_t index, int8_t \*cfgStruct, uint32_t cfgStructLen) | 设置组件的配置。 | -| ([GetExtensionIndex](#getextensionindex) )(struct CodecComponentType \*self, const char \*paramName, uint32_t \*indexType) | 根据字符串获取组件的扩展索引。 | -| ([GetState](#getstate) )(struct CodecComponentType \*self, enum OMX_STATETYPE \*state) | 获取组件的当前状态。 | -| ([ComponentTunnelRequest](#componenttunnelrequest) )(struct CodecComponentType \*self, uint32_t port, int32_t tunneledComp, uint32_t tunneledPort, struct OMX_TUNNELSETUPTYPE \*tunnelSetup) | 设置组件采用Tunnel方式通信。 | -| ([UseBuffer](#usebuffer) )(struct CodecComponentType \*self, uint32_t portIndex, struct OmxCodecBuffer \*buffer) | 指定组件端口的buffer。 | -| ([AllocateBuffer](#allocatebuffer) )(struct CodecComponentType \*self, uint32_t portIndex, struct OmxCodecBuffer \*buffer) | 向组件申请端口buffer。 | -| ([FreeBuffer](#freebuffer) )(struct CodecComponentType \*self, uint32_t portIndex, const struct OmxCodecBuffer \*buffer) | 释放buffer。 | -| ([EmptyThisBuffer](#emptythisbuffer) )(struct CodecComponentType \*self, const struct OmxCodecBuffer \*buffer) | 编解码输入待处理buffer。 | -| ([FillThisBuffer](#fillthisbuffer) )(struct CodecComponentType \*self, const struct OmxCodecBuffer \*buffer) | 编解码输出填充buffer。 | -| ([SetCallbacks](#setcallbacks) )(struct CodecComponentType \*self, struct CodecCallbackType \*callback, int8_t \*appData, uint32_t appDataLen) | 设置Codec组件的回调函数。 | -| ([ComponentDeInit](#componentdeinit) )(struct CodecComponentType \*self) | 组件去初始化。 | -| ([UseEglImage](#useeglimage) )(struct CodecComponentType \*self, struct OmxCodecBuffer \*buffer, uint32_t portIndex, int8_t \*eglImage, uint32_t eglImageLen) | 使用已在EGL中申请的空间。 | -| ([ComponentRoleEnum](#componentroleenum) )(struct CodecComponentType \*self, uint8_t \*role, uint32_t roleLen, uint32_t index) | 获取组件角色。 | - - -## **类成员变量说明** +| (\* [GetComponentVersion](#getcomponentversion) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, struct [CompVerInfo](_comp_ver_info.md) \*verInfo) | int32_t
获取Codec组件版本号。 | +| (\* [SendCommand](#sendcommand) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, enum OMX_COMMANDTYPE cmd, uint32_t param, int8_t \*cmdData, uint32_t cmdDataLen) | int32_t
发送命令给组件。 | +| (\* [GetParameter](#getparameter) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, uint32_t paramIndex, int8_t \*paramStruct, uint32_t paramStructLen) | int32_t
获取组件参数设置。 | +| (\* [SetParameter](#setparameter) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, uint32_t index, int8_t \*paramStruct, uint32_t paramStructLen) | int32_t
设置组件需要的参数。 | +| (\* [GetConfig](#getconfig) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, uint32_t index, int8_t \*cfgStruct, uint32_t cfgStructLen) | int32_t
获取组件的配置结构。 | +| (\* [SetConfig](#setconfig) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, uint32_t index, int8_t \*cfgStruct, uint32_t cfgStructLen) | int32_t
设置组件的配置。 | +| (\* [GetExtensionIndex](#getextensionindex) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, const char \*paramName, uint32_t \*indexType) | int32_t
根据字符串获取组件的扩展索引。 | +| (\* [GetState](#getstate) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, enum OMX_STATETYPE \*state) | int32_t
获取组件的当前状态。 | +| (\* [ComponentTunnelRequest](#componenttunnelrequest) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, uint32_t port, int32_t tunneledComp, uint32_t tunneledPort, struct OMX_TUNNELSETUPTYPE \*tunnelSetup) | int32_t
设置组件采用Tunnel方式通信。 | +| (\* [UseBuffer](#usebuffer) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, uint32_t portIndex, struct [OmxCodecBuffer](_omx_codec_buffer.md) \*buffer) | int32_t
指定组件端口的buffer。 | +| (\* [AllocateBuffer](#allocatebuffer) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, uint32_t portIndex, struct [OmxCodecBuffer](_omx_codec_buffer.md) \*buffer) | int32_t
向组件申请端口buffer。 | +| (\* [FreeBuffer](#freebuffer) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, uint32_t portIndex, const struct [OmxCodecBuffer](_omx_codec_buffer.md) \*buffer) | int32_t
释放buffer。 | +| (\* [EmptyThisBuffer](#emptythisbuffer) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, const struct [OmxCodecBuffer](_omx_codec_buffer.md) \*buffer) | int32_t
编解码输入待处理buffer。 | +| (\* [FillThisBuffer](#fillthisbuffer) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, const struct [OmxCodecBuffer](_omx_codec_buffer.md) \*buffer) | int32_t
编解码输出填充buffer。 | +| (\* [SetCallbacks](#setcallbacks) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, struct [CodecCallbackType](_codec_callback_type.md) \*callback, int8_t \*appData, uint32_t appDataLen) | int32_t
设置Codec组件的回调函数。 | +| (\* [ComponentDeInit](#componentdeinit) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self) | int32_t
组件去初始化。 | +| (\* [UseEglImage](#useeglimage) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, struct [OmxCodecBuffer](_omx_codec_buffer.md) \*buffer, uint32_t portIndex, int8_t \*eglImage, uint32_t eglImageLen) | int32_t
使用已在EGL中申请的空间。 | +| (\* [ComponentRoleEnum](#componentroleenum) )(struct [CodecComponentType](zh-cn_topic_0000001602591461.xml) \*self, uint8_t \*role, uint32_t roleLen, uint32_t index) | int32_t
获取组件角色。 | + + +## 类成员变量说明 ### AllocateBuffer @@ -61,7 +61,7 @@ Codec组件接口定义。 int32_t(* CodecComponentType::AllocateBuffer) (struct CodecComponentType *self, uint32_t portIndex, struct OmxCodecBuffer *buffer) ``` -**描述:** +**描述:** 向组件申请端口buffer。 @@ -99,7 +99,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,申请buffer失败。 int32_t(* CodecComponentType::ComponentDeInit) (struct CodecComponentType *self) ``` -**描述:** +**描述:** 组件去初始化。 @@ -129,7 +129,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,去初始化失败。 int32_t(* CodecComponentType::ComponentRoleEnum) (struct CodecComponentType *self, uint8_t *role, uint32_t roleLen, uint32_t index) ``` -**描述:** +**描述:** 获取组件角色。 @@ -162,7 +162,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,获取角色失败。 int32_t(* CodecComponentType::ComponentTunnelRequest) (struct CodecComponentType *self, uint32_t port, int32_t tunneledComp, uint32_t tunneledPort, struct OMX_TUNNELSETUPTYPE *tunnelSetup) ``` -**描述:** +**描述:** 设置组件采用Tunnel方式通信。 @@ -176,7 +176,7 @@ int32_t(* CodecComponentType::ComponentTunnelRequest) (struct CodecComponentType | port | 输入参数,组件设置的端口。 | | tunneledComp | 输入参数,组件的tunnel handle。 | | tunneledPort | 输入参数,组件用来Tunnel通信的端口。 | -| tunnelSetup | 输入输出参数,指向Tunnel设置的结构体**OMX_TUNNELSETUPTYPE**指针。 | +| tunnelSetup | 输入输出参数,指向Tunnel设置的结构体OMX_TUNNELSETUPTYPE指针。 | **返回:** @@ -196,7 +196,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,设置失败。 int32_t(* CodecComponentType::EmptyThisBuffer) (struct CodecComponentType *self, const struct OmxCodecBuffer *buffer) ``` -**描述:** +**描述:** 编解码输入待处理buffer。 @@ -227,7 +227,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,输入buffer失败。 int32_t(* CodecComponentType::FillThisBuffer) (struct CodecComponentType *self, const struct OmxCodecBuffer *buffer) ``` -**描述:** +**描述:** 编解码输出填充buffer。 @@ -258,7 +258,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,填充buffer失败。 int32_t(* CodecComponentType::FreeBuffer) (struct CodecComponentType *self, uint32_t portIndex, const struct OmxCodecBuffer *buffer) ``` -**描述:** +**描述:** 释放buffer。 @@ -296,7 +296,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,释放buffer失败。 int32_t(* CodecComponentType::GetComponentVersion) (struct CodecComponentType *self, struct CompVerInfo *verInfo) ``` -**描述:** +**描述:** 获取Codec组件版本号。 @@ -327,7 +327,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,获取版本号失败。 int32_t(* CodecComponentType::GetConfig) (struct CodecComponentType *self, uint32_t index, int8_t *cfgStruct, uint32_t cfgStructLen) ``` -**描述:** +**描述:** 获取组件的配置结构。 @@ -338,7 +338,7 @@ int32_t(* CodecComponentType::GetConfig) (struct CodecComponentType *self, uint3 | 名称 | 描述 | | -------- | -------- | | self | 输入参数,指向要操作的Codec组件指针。 | -| index | 输入参数,待填充结构的索引,详见**OMX_INDEXTYPE**。 | +| index | 输入参数,待填充结构的索引,详见OMX_INDEXTYPE。 | | cfgStruct | 输入输出参数,指向由组件填充的应用程序分配的结构体指针。 | | cfgStructLen | 输入参数,上层传入的cfgStruct字节数。 | @@ -360,7 +360,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,获取配置失败。 int32_t(* CodecComponentType::GetExtensionIndex) (struct CodecComponentType *self, const char *paramName, uint32_t *indexType) ``` -**描述:** +**描述:** 根据字符串获取组件的扩展索引。 @@ -372,7 +372,7 @@ int32_t(* CodecComponentType::GetExtensionIndex) (struct CodecComponentType *sel | -------- | -------- | | self | 输入参数,指向要操作的Codec组件指针。 | | paramName | 输入参数,组件用来转换为配置索引的字符串。 | -| indexType | 输出参数,由paramName转换的配置索引,详见**OMX_INDEXTYPE**。 | +| indexType | 输出参数,由paramName转换的配置索引,详见OMX_INDEXTYPE。 | **返回:** @@ -392,7 +392,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,获取扩展索引失败。 int32_t(* CodecComponentType::GetParameter) (struct CodecComponentType *self, uint32_t paramIndex, int8_t *paramStruct, uint32_t paramStructLen) ``` -**描述:** +**描述:** 获取组件参数设置。 @@ -403,7 +403,7 @@ int32_t(* CodecComponentType::GetParameter) (struct CodecComponentType *self, ui | 名称 | 描述 | | -------- | -------- | | self | 输入参数,指向要操作的Codec组件指针。 | -| paramIndex | 输入参数,待填充结构的索引,详见**OMX_INDEXTYPE**。 | +| paramIndex | 输入参数,待填充结构的索引,详见OMX_INDEXTYPE。 | | paramStruct | 输入输出参数,指向由组件填充的应用程序分配的结构体指针。 | | paramStructLen | 输入参数,paramStruct字节数。 | @@ -425,18 +425,18 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,获取参数失败。 int32_t(* CodecComponentType::GetState) (struct CodecComponentType *self, enum OMX_STATETYPE *state) ``` -**描述:** +**描述:** 获取组件的当前状态。 -用户可调用此接口获取组件的当前状态,组件状态详见**OMX_STATETYPE**。 +用户可调用此接口获取组件的当前状态,组件状态详见OMX_STATETYPE。 **参数:** | 名称 | 描述 | | -------- | -------- | | self | 输入参数,指向要操作的Codec组件指针。 | -| state | 输出参数,指向获取到的状态指针,组件状态详见**OMX_STATETYPE**。 | +| state | 输出参数,指向获取到的状态指针,组件状态详见OMX_STATETYPE。 | **返回:** @@ -456,11 +456,11 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,获取状态失败。 int32_t(* CodecComponentType::SendCommand) (struct CodecComponentType *self, enum OMX_COMMANDTYPE cmd, uint32_t param, int8_t *cmdData, uint32_t cmdDataLen) ``` -**描述:** +**描述:** 发送命令给组件。 -当命令为设置状态时,会有事件回调通知结果给上层,其他命令则没有事件上报。 +发送命令给组件,当命令为设置状态时,会有事件回调通知结果给上层,其他命令则没有事件上报。 **参数:** @@ -490,7 +490,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,发送命令失败。 int32_t(* CodecComponentType::SetCallbacks) (struct CodecComponentType *self, struct CodecCallbackType *callback, int8_t *appData, uint32_t appDataLen) ``` -**描述:** +**描述:** 设置Codec组件的回调函数。 @@ -523,7 +523,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,设置回调失败。 int32_t(* CodecComponentType::SetConfig) (struct CodecComponentType *self, uint32_t index, int8_t *cfgStruct, uint32_t cfgStructLen) ``` -**描述:** +**描述:** 设置组件的配置。 @@ -534,7 +534,7 @@ int32_t(* CodecComponentType::SetConfig) (struct CodecComponentType *self, uint3 | 名称 | 描述 | | -------- | -------- | | self | 输入参数,指向要操作的Codec组件指针。 | -| index | 输入参数,要设置的结构索引,详见**OMX_INDEXTYPE**。 | +| index | 输入参数,要设置的结构索引,详见OMX_INDEXTYPE。 | | cfgStruct | 输入参数,指向组件用于初始化的应用程序分配结构的指针。 | | cfgStructLen | 输入参数,cfgStruct字节数。 | @@ -556,7 +556,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,设置失败。 int32_t(* CodecComponentType::SetParameter) (struct CodecComponentType *self, uint32_t index, int8_t *paramStruct, uint32_t paramStructLen) ``` -**描述:** +**描述:** 设置组件需要的参数。 @@ -567,7 +567,7 @@ int32_t(* CodecComponentType::SetParameter) (struct CodecComponentType *self, ui | 名称 | 描述 | | -------- | -------- | | self | 输入参数,指向要操作的Codec组件指针。 | -| index | 输入参数,要设置的结构索引,详见**OMX_INDEXTYPE**。 | +| index | 输入参数,要设置的结构索引,详见OMX_INDEXTYPE。 | | paramStruct | 输入参数,指向组件用于初始化的应用程序分配结构的指针。 | | paramStructLen | 输入参数,paramStruct字节数。 | @@ -589,7 +589,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,设置参数失败。 int32_t(* CodecComponentType::UseBuffer) (struct CodecComponentType *self, uint32_t portIndex, struct OmxCodecBuffer *buffer) ``` -**描述:** +**描述:** 指定组件端口的buffer。 @@ -627,7 +627,7 @@ HDF_ERR_MALLOC_FAIL 表示申请内存失败,指定失败。 int32_t(* CodecComponentType::UseEglImage) (struct CodecComponentType *self, struct OmxCodecBuffer *buffer, uint32_t portIndex, int8_t *eglImage, uint32_t eglImageLen) ``` -**描述:** +**描述:** 使用已在EGL中申请的空间。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_comp_ver_info.md b/zh-cn/device-dev/reference/hdi-apis/_comp_ver_info.md index debad98682d7b7c71cb85127947c7af43b5cb1e4..b23cb5a1ebd5ca0e4257078f4169dfd65183b79d 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_comp_ver_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_comp_ver_info.md @@ -1,29 +1,29 @@ # CompVerInfo -## **概述** +## 概述 定义组件版本信息。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [compName](#compname) [[NAME_LENGTH](codec.md#gaf71324c57f05ff9e24bd384925dd6b17)] | 组件名称。 | -| [compUUID](#compuuid) [[UUID_LENGTH](codec.md#ga9226162b034cc837cd977f0fcf611c2c)] | 组件的UUID标识符。 | -| [compVersion](#compversion) | OMX组件版本信息。 | -| [specVersion](#specversion) | 构建组件所依据的规范的版本信息。 | +| [compName](#compname) [[NAME_LENGTH](_codec.md#name_length)] | char
组件名称。  | +| [compUUID](#compuuid) [[UUID_LENGTH](_codec.md#uuid_length)] | uint8_t
组件的UUID标识符。  | +| [compVersion](#compversion) | union OMX_VERSIONTYPE
OMX组件版本信息。  | +| [specVersion](#specversion) | union OMX_VERSIONTYPE
构建组件所依据的规范的版本信息。  | -## **类成员变量说明** +## 类成员变量说明 ### compName @@ -32,9 +32,7 @@ ``` char CompVerInfo::compName[NAME_LENGTH] ``` - -**描述:** - +**描述:** 组件名称。 @@ -44,9 +42,7 @@ char CompVerInfo::compName[NAME_LENGTH] ``` uint8_t CompVerInfo::compUUID[UUID_LENGTH] ``` - -**描述:** - +**描述:** 组件的UUID标识符。 @@ -56,9 +52,7 @@ uint8_t CompVerInfo::compUUID[UUID_LENGTH] ``` union OMX_VERSIONTYPE CompVerInfo::compVersion ``` - -**描述:** - +**描述:** OMX组件版本信息。 @@ -68,7 +62,5 @@ OMX组件版本信息。 ``` union OMX_VERSIONTYPE CompVerInfo::specVersion ``` - -**描述:** - +**描述:** 构建组件所依据的规范的版本信息。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_concat.md b/zh-cn/device-dev/reference/hdi-apis/_concat.md new file mode 100644 index 0000000000000000000000000000000000000000..704039bf90f03299ddc707172ff722bf4280c5b8 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_concat.md @@ -0,0 +1,47 @@ +# Concat + + +## 概述 + +在指定轴上连接张量,将输入张量按给定的轴连接起来。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_CONCAT。 + +输入: + +- 多个维度相同的tensor。 + +输出: + +- output,多个张量按axis轴连接的结果。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [axis](#axis) | long
拼接的轴,axis必须小于输入张量的维度数量。  | + + +## 类成员变量说明 + + +### axis + + +``` +long Concat::axis +``` +**描述:** +拼接的轴,axis必须小于输入张量的维度数量。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_conv2_d_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_conv2_d_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..2127cefcdf70c8361774b74db4a9bde4404fd173 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_conv2_d_fusion.md @@ -0,0 +1,141 @@ +# Conv2DFusion + + +## 概述 + +对将4维的tensor执行带有偏置的二维卷积运算。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_CONV2D_FUSION。 + +参数限制:当padMode==PAD_MODE_PAD时,padList的数值必须大于等于0。其他情况下padding的数值必须为0。 + +输入: + +- x,4维tensor,并按照NHWC进行排列。 + +- weight,卷积的权重,要求weight排布为[outChannel,kernelHeight,kernelWidth,inChannel/group], inChannel必须要能整除group。 + +- bias,卷积的偏置,是长度为[outChannel]的数组。在量化场景下,bias 参数不需要量化参数,其量化 版本要求输入 int32 类型数据,实际量化参数由 x 和 weight 共同决定。 + +输出: + +- output,卷积的输出。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [kernelSize](#kernelsize) | long[]
卷积核大小。  | +| [stride](#stride) | long[]
卷积核在height和weight上的步幅,是一个长度为2的int数组[strideHeight,strideWidth]。  | +| [dilation](#dilation) | long[]
表示扩张卷积在height和weight上的扩张率,是一个长度为2的int数组[dilationHeight,dilationWidth], 值必须大于或等于1,并且不能超过x的height和width。  | +| [padMode](#padmode) | enum [PadMode](_n_n_rt.md#padmode)
填充类型,详情请参考:[PadMode](_n_n_rt.md#padmode)。  | +| [padList](#padlist) | long[]
输入x周围的填充,是一个长度为4的int数组[top,bottom,left,right]。  | +| [group](#group) | long
group,将输入x按inChannel分组,int类型。 group等于1,这是常规卷积。 group等于inChannel,这是depthwiseConv2d,此时group==in_channel==out_channel。 group大于1且小于inChannel,这是分组卷积,此时out_channel==group。  | +| [inChannel](#inchannel) | long
输入通道数量。  | +| [outChannel](#outchannel) | long
输出通道数量。  | +| [activationType](#activationtype) | enum [ActivationType](_n_n_rt.md#activationtype)
激活函数类型,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。  | + + +## 类成员变量说明 + + +### activationType + + +``` +enum ActivationType Conv2DFusion::activationType +``` +**描述:** +激活函数类型,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。 + + +### dilation + + +``` +long [] Conv2DFusion::dilation +``` +**描述:** +表示扩张卷积在height和weight上的扩张率,是一个长度为2的int数组[dilationHeight,dilationWidth], 值必须大于或等于1,并且不能超过x的height和width。 + + +### group + + +``` +long Conv2DFusion::group +``` +**描述:** +group,将输入x按inChannel分组,int类型。 group等于1,这是常规卷积。 group等于inChannel,这是depthwiseConv2d,此时group==in_channel==out_channel。 group大于1且小于inChannel,这是分组卷积,此时out_channel==group。 + + +### inChannel + + +``` +long Conv2DFusion::inChannel +``` +**描述:** +输入通道数量。 + + +### kernelSize + + +``` +long [] Conv2DFusion::kernelSize +``` +**描述:** +卷积核大小。 + + +### outChannel + + +``` +long Conv2DFusion::outChannel +``` +**描述:** +输出通道数量。 + + +### padList + + +``` +long [] Conv2DFusion::padList +``` +**描述:** +输入x周围的填充,是一个长度为4的int数组[top,bottom,left,right]。 + + +### padMode + + +``` +enum PadMode Conv2DFusion::padMode +``` +**描述:** +填充类型,详情请参考:[PadMode](_n_n_rt.md#padmode)。 + + +### stride + + +``` +long [] Conv2DFusion::stride +``` +**描述:** +卷积核在height和weight上的步幅,是一个长度为2的int数组[strideHeight,strideWidth]。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_conv2d_transpose_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_conv2d_transpose_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..5391f07b062f39f2e29080a4bf944c2be8d47833 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_conv2d_transpose_fusion.md @@ -0,0 +1,152 @@ +# Conv2dTransposeFusion + + +## 概述 + +对一个4维的tensor执行带有偏置的二维反卷积。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_CONV2D_TRANSPOSE_FUSION。 + +参数限制:当padMode==PAD_MODE_PAD时,padList的数值必须大于等于0。其他情况下padding的数值必须为0。 + +输入: + +- x,4维tensor,并按照NHWC进行排列。 + +- weight,卷积的权重,要求weight排布为[outChannel,kernelHeight,kernelWidth,inChannel/group], inChannel必须要能整除group。 + +- bias,卷积的偏置,是长度为[outChannel]的数组。在量化场景下,bias 参数不需要量化参数,其量化 版本要求输入 int32 类型数据,实际量化参数由 x 和 weight 共同决定。 + +输出: + +- output,n维tensor。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [kernelSize](#kernelsize) | long[]
卷积核大小。  | +| [stride](#stride) | long[]
卷积核在height和weight上的步幅,是一个长度为2的int数组[strideHeight,strideWidth]。  | +| [dilation](#dilation) | long[]
表示扩张卷积在height和weight上的扩张率,是一个长度为2的int数组[dilationHeight,dilationWidth], 值必须大于或等于1,并且不能超过x的height和width。  | +| [padMode](#padmode) | enum [PadMode](_n_n_rt.md#padmode)
填充类型,详情请参考:[PadMode](_n_n_rt.md#padmode) | +| [padList](#padlist) | long[]
输入x周围的填充,是一个长度为4的int数组[top,bottom,left,right]。  | +| [group](#group) | long
group,将输入x按inChannel分组。 group等于1,这是常规卷积; group大于1且小于或等于inChannel,这是分组卷积。  | +| [inChannel](#inchannel) | long
输入通道数。  | +| [outChannel](#outchannel) | long
输出通道数。  | +| [activationType](#activationtype) | enum [ActivationType](_n_n_rt.md#activationtype)
激活函数类型,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。  | +| [outputPaddings](#outputpaddings) | long[]
一个长度为的2整数列表,指定沿输出张量的高度和宽度的填充量。  | + + +## 类成员变量说明 + + +### activationType + + +``` +enum ActivationType Conv2dTransposeFusion::activationType +``` +**描述:** +激活函数类型,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。 + + +### dilation + + +``` +long [] Conv2dTransposeFusion::dilation +``` +**描述:** +表示扩张卷积在height和weight上的扩张率,是一个长度为2的int数组[dilationHeight,dilationWidth], 值必须大于或等于1,并且不能超过x的height和width。 + + +### group + + +``` +long Conv2dTransposeFusion::group +``` +**描述:** +group,将输入x按inChannel分组。 group等于1,这是常规卷积; group大于1且小于或等于inChannel,这是分组卷积。 + + +### inChannel + + +``` +long Conv2dTransposeFusion::inChannel +``` +**描述:** +输入通道数。 + + +### kernelSize + + +``` +long [] Conv2dTransposeFusion::kernelSize +``` +**描述:** +卷积核大小。 + + +### outChannel + + +``` +long Conv2dTransposeFusion::outChannel +``` +**描述:** +输出通道数。 + + +### outputPaddings + + +``` +long [] Conv2dTransposeFusion::outputPaddings +``` +**描述:** +一个长度为的2整数列表,指定沿输出张量的高度和宽度的填充量。 + + +### padList + + +``` +long [] Conv2dTransposeFusion::padList +``` +**描述:** +输入x周围的填充,是一个长度为4的int数组[top,bottom,left,right]。 + + +### padMode + + +``` +enum PadMode Conv2dTransposeFusion::padMode +``` +**描述:** +填充类型,详情请参考:[PadMode](_n_n_rt.md#padmode) + + +### stride + + +``` +long [] Conv2dTransposeFusion::stride +``` +**描述:** +卷积核在height和weight上的步幅,是一个长度为2的int数组[strideHeight,strideWidth]。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_credential_info.md b/zh-cn/device-dev/reference/hdi-apis/_credential_info.md index 0d892d6244b3c69d8bef954895b02886b2f42271..b4d9cf5a2043499979978a61d41327d67154c81c 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_credential_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_credential_info.md @@ -1,39 +1,35 @@ # CredentialInfo -## **概述** +## 概述 认证凭据信息。 -**自动:** - +**Since:** 3.2 - -**Version:** - +**Version:** 1.0 - -**所属模块:** +**相关模块:** [HdfUserAuth](_hdf_user_auth.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [credentialId](#credentialid) | 认证凭据ID。 | -| [index](#index) | 用户认证框架的执行器索引。 | -| [templateId](#templateid) | 认证凭据模版ID。 | -| [authType](#authtype) | 用户认证凭据类型。 | -| [executorMatcher](#executormatcher) | 执行器匹配器。 | -| [executorSensorHint](#executorsensorhint) | 既定用户认证凭据类型的执行器传感器提示,用于找到对应认证方式的传感器。 | +| [credentialId](#credentialid) | unsigned long
认证凭据ID。  | +| [index](#index) | unsigned long
用户认证框架的执行器索引。  | +| [templateId](#templateid) | unsigned long
认证凭据模版ID。  | +| [authType](#authtype) | enum [AuthType](_hdf_user_auth.md#authtype)
用户认证凭据类型AuthType}。  | +| [executorMatcher](#executormatcher) | unsigned int
执行器匹配器。  | +| [executorSensorHint](#executorsensorhint) | unsigned int
既定用户认证凭据类型的执行器传感器提示,用于找到对应认证方式的传感器。  | -## **类成员变量说明** +## 类成员变量说明 ### authType @@ -42,10 +38,8 @@ ``` enum AuthType CredentialInfo::authType ``` - -**描述:** - -用户认证凭据类型。 +**描述:** +用户认证凭据类型AuthType}。 ### credentialId @@ -54,34 +48,28 @@ enum AuthType CredentialInfo::authType ``` unsigned long CredentialInfo::credentialId ``` - -**描述:** - +**描述:** 认证凭据ID。 -### executorSensorHint +### executorMatcher ``` -unsigned int CredentialInfo::executorSensorHint +unsigned int CredentialInfo::executorMatcher ``` - -**描述:** - -既定用户认证凭据类型的执行器传感器提示,用于找到对应认证方式的传感器。 +**描述:** +执行器匹配器。 -### executorMatcher +### executorSensorHint ``` -unsigned int CredentialInfo::executorMatcher +unsigned int CredentialInfo::executorSensorHint ``` - -**描述:** - -执行器匹配器。 +**描述:** +既定用户认证凭据类型的执行器传感器提示,用于找到对应认证方式的传感器。 ### index @@ -90,9 +78,7 @@ unsigned int CredentialInfo::executorMatcher ``` unsigned long CredentialInfo::index ``` - -**描述:** - +**描述:** 用户认证框架的执行器索引。 @@ -102,7 +88,5 @@ unsigned long CredentialInfo::index ``` unsigned long CredentialInfo::templateId ``` - -**描述:** - +**描述:** 认证凭据模版ID。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_cs_reg_status_info.md b/zh-cn/device-dev/reference/hdi-apis/_cs_reg_status_info.md new file mode 100644 index 0000000000000000000000000000000000000000..02b5d4c81b4a526a2fc059060517433df0a29703 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_cs_reg_status_info.md @@ -0,0 +1,94 @@ +# CsRegStatusInfo + + +## 概述 + +CS注册状态信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [notifyType](#notifytype) | int
通知类型 | +| [regStatus](#regstatus) | enum [RilRegStatus](_ril.md#rilregstatus)
注册状态,具体查看[RilRegStatus](_ril.md#rilregstatus) | +| [lacCode](#laccode) | int
地区区域码  | +| [cellId](#cellid) | int
小区标识  | +| [radioTechnology](#radiotechnology) | enum [RilRadioTech](_ril.md#rilradiotech)
语音接入技术类型,具体查看[RilRadioTech](_ril.md#rilradiotech) | +| [flag](#flag) | int
标志,由搜网管理在响应中使用  | + + +## 类成员变量说明 + + +### cellId + + +``` +int CsRegStatusInfo::cellId +``` +**描述:** +小区标识 + + +### flag + + +``` +int CsRegStatusInfo::flag +``` +**描述:** +标志,由搜网管理在响应中使用 + + +### lacCode + + +``` +int CsRegStatusInfo::lacCode +``` +**描述:** +地区区域码 + + +### notifyType + + +``` +int CsRegStatusInfo::notifyType +``` +**描述:** +通知类型 + +- 0:禁止主动上报 + +- 1:使用格式1上报,格式具体由芯片自定义 + +- 2:使用格式2上报,格式具体由芯片自定义 + + +### radioTechnology + + +``` +enum RilRadioTech CsRegStatusInfo::radioTechnology +``` +**描述:** +语音接入技术类型,具体查看[RilRadioTech](_ril.md#rilradiotech) + + +### regStatus + + +``` +enum RilRegStatus CsRegStatusInfo::regStatus +``` +**描述:** +注册状态,具体查看[RilRegStatus](_ril.md#rilregstatus) diff --git a/zh-cn/device-dev/reference/hdi-apis/_current_cell.md b/zh-cn/device-dev/reference/hdi-apis/_current_cell.md new file mode 100644 index 0000000000000000000000000000000000000000..676be6b526dfd542327578547a9cf9c09fe76f8e --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_current_cell.md @@ -0,0 +1,123 @@ +# CurrentCell + + +## 概述 + +定义设备驻留的基站主区信息的数据结构。 + +**Since:** +4.0 +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [cellId](#cellid) | long
小区号  | +| [lac](#lac) | int
基站号  | +| [mcc](#mcc) | unsigned short
移动国家码  | +| [mnc](#mnc) | unsigned short
移动网络码  | +| [rssi](#rssi) | short
信号接收强度  | +| [rat](#rat) | unsigned short
网络制式,1代表GSM,2代表WCDMA或TD-CDMA,3代表LTE,4代表5G NR。  | +| [pci](#pci) | unsigned int
物理小区识别码  | +| [bootTimeLow](#boottimelow) | int
时间戳的低32位  | +| [bootTimeHigh](#boottimehigh) | int
时间戳的高32位  | + + +## 类成员变量说明 + + +### bootTimeHigh + + +``` +int CurrentCell::bootTimeHigh +``` +**描述:** +时间戳的高32位 + + +### bootTimeLow + + +``` +int CurrentCell::bootTimeLow +``` +**描述:** +时间戳的低32位 + + +### cellId + + +``` +long CurrentCell::cellId +``` +**描述:** +小区号 + + +### lac + + +``` +int CurrentCell::lac +``` +**描述:** +基站号 + + +### mcc + + +``` +unsigned short CurrentCell::mcc +``` +**描述:** +移动国家码 + + +### mnc + + +``` +unsigned short CurrentCell::mnc +``` +**描述:** +移动网络码 + + +### pci + + +``` +unsigned int CurrentCell::pci +``` +**描述:** +物理小区识别码 + + +### rat + + +``` +unsigned short CurrentCell::rat +``` +**描述:** +网络制式,1代表GSM,2代表WCDMA或TD-CDMA,3代表LTE,4代表5G NR。 + + +### rssi + + +``` +short CurrentCell::rssi +``` +**描述:** +信号接收强度 diff --git a/zh-cn/device-dev/reference/hdi-apis/_current_cell_info.md b/zh-cn/device-dev/reference/hdi-apis/_current_cell_info.md new file mode 100644 index 0000000000000000000000000000000000000000..4d1b038ec2c4853ae63b0d4a4e9a923d049cfafa --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_current_cell_info.md @@ -0,0 +1,66 @@ +# CurrentCellInfo + + +## 概述 + +当前小区信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [ratType](#rattype) | int
语音接入技术类型,具体查看[RilRadioTech](_ril.md#rilradiotech) | +| [mcc](#mcc) | int
移动国家码  | +| [mnc](#mnc) | int
移动网络码  | +| [serviceCells](#servicecells) | union [CurrentServiceCellParas](union_current_service_cell_paras.md)
小区信息参数,具体查看[CurrentServiceCellParas](union_current_service_cell_paras.md) | + + +## 类成员变量说明 + + +### mcc + + +``` +int CurrentCellInfo::mcc +``` +**描述:** +移动国家码 + + +### mnc + + +``` +int CurrentCellInfo::mnc +``` +**描述:** +移动网络码 + + +### ratType + + +``` +int CurrentCellInfo::ratType +``` +**描述:** +语音接入技术类型,具体查看[RilRadioTech](_ril.md#rilradiotech) + + +### serviceCells + + +``` +union CurrentServiceCellParas CurrentCellInfo::serviceCells +``` +**描述:** +小区信息参数,具体查看[CurrentServiceCellParas](union_current_service_cell_paras.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_data_call_info.md b/zh-cn/device-dev/reference/hdi-apis/_data_call_info.md new file mode 100644 index 0000000000000000000000000000000000000000..766e4f8211a4ed6eb4eb9667f508d52d5031e3e1 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_data_call_info.md @@ -0,0 +1,88 @@ +# DataCallInfo + + +## 概述 + +数据业务信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [radioTechnology](#radiotechnology) | int
无线接入技术,具体查看[RilRadioTech](_ril.md#rilradiotech) | +| [modemCognitive](#modemcognitive) | boolean
是否modem设置PDP上下文  | +| [roamingAllowed](#roamingallowed) | boolean
是否允许漫游,true表示允许,false表示禁止  | +| [isRoaming](#isroaming) | boolean
是否漫游,true表示漫游,false表示非漫游  | +| [dataProfileInfo](#dataprofileinfo) | struct [DataProfileDataInfo](_data_profile_data_info.md)
PDP上下文信息  | + + +## 类成员变量说明 + + +### dataProfileInfo + + +``` +struct DataProfileDataInfo DataCallInfo::dataProfileInfo +``` +**描述:** +PDP上下文信息 + + +### isRoaming + + +``` +boolean DataCallInfo::isRoaming +``` +**描述:** +是否漫游,true表示漫游,false表示非漫游 + + +### modemCognitive + + +``` +boolean DataCallInfo::modemCognitive +``` +**描述:** +是否modem设置PDP上下文 + + +### radioTechnology + + +``` +int DataCallInfo::radioTechnology +``` +**描述:** +无线接入技术,具体查看[RilRadioTech](_ril.md#rilradiotech) + + +### roamingAllowed + + +``` +boolean DataCallInfo::roamingAllowed +``` +**描述:** +是否允许漫游,true表示允许,false表示禁止 + + +### serial + + +``` +int DataCallInfo::serial +``` +**描述:** +请求的序列号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_data_call_result_list.md b/zh-cn/device-dev/reference/hdi-apis/_data_call_result_list.md new file mode 100644 index 0000000000000000000000000000000000000000..28396727eab205068f8eb560e42b3bd8c0adfbef --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_data_call_result_list.md @@ -0,0 +1,44 @@ +# DataCallResultList + + +## 概述 + +数据业务激活结果列表。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [size](#size) | int
数据业务激活结果信息数量  | +| [dcList](#dclist) | List< struct [SetupDataCallResultInfo](_setup_data_call_result_info.md) >
数据业务激活结果列表  | + + +## 类成员变量说明 + + +### dcList + + +``` +List DataCallResultList::dcList +``` +**描述:** +数据业务激活结果列表 + + +### size + + +``` +int DataCallResultList::size +``` +**描述:** +数据业务激活结果信息数量 diff --git a/zh-cn/device-dev/reference/hdi-apis/_data_link_bandwidth_info.md b/zh-cn/device-dev/reference/hdi-apis/_data_link_bandwidth_info.md new file mode 100644 index 0000000000000000000000000000000000000000..e8a38b82dffafc4d204b328310650ec4c6b8fbd5 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_data_link_bandwidth_info.md @@ -0,0 +1,132 @@ +# DataLinkBandwidthInfo + + +## 概述 + +网络频率信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [cid](#cid) | int
PDP上下文标识符  | +| [qi](#qi) | int
服务质量(QoS)类别指示  | +| [dlGfbr](#dlgfbr) | int
下行方向保证比特速率(GBR)  | +| [ulGfbr](#ulgfbr) | int
上行方向GBR  | +| [dlMfbr](#dlmfbr) | int
下行方向最大比特速率(MBR)  | +| [ulMfbr](#ulmfbr) | int
上行方向MBR  | +| [ulSambr](#ulsambr) | int
上行方向聚合最大比特速率(AMBR)  | +| [dlSambr](#dlsambr) | int
下行方向AMBR  | +| [averagingWindow](#averagingwindow) | int
时间单位  | + + +## 类成员变量说明 + + +### averagingWindow + + +``` +int DataLinkBandwidthInfo::averagingWindow +``` +**描述:** +时间单位 + + +### cid + + +``` +int DataLinkBandwidthInfo::cid +``` +**描述:** +PDP上下文标识符 + + +### dlGfbr + + +``` +int DataLinkBandwidthInfo::dlGfbr +``` +**描述:** +下行方向保证比特速率(GBR) + + +### dlMfbr + + +``` +int DataLinkBandwidthInfo::dlMfbr +``` +**描述:** +下行方向最大比特速率(MBR) + + +### dlSambr + + +``` +int DataLinkBandwidthInfo::dlSambr +``` +**描述:** +下行方向AMBR + + +### qi + + +``` +int DataLinkBandwidthInfo::qi +``` +**描述:** +服务质量(QoS)类别指示 + + +### serial + + +``` +int DataLinkBandwidthInfo::serial +``` +**描述:** +请求的序列号 + + +### ulGfbr + + +``` +int DataLinkBandwidthInfo::ulGfbr +``` +**描述:** +上行方向GBR + + +### ulMfbr + + +``` +int DataLinkBandwidthInfo::ulMfbr +``` +**描述:** +上行方向MBR + + +### ulSambr + + +``` +int DataLinkBandwidthInfo::ulSambr +``` +**描述:** +上行方向聚合最大比特速率(AMBR) diff --git a/zh-cn/device-dev/reference/hdi-apis/_data_link_bandwidth_reporting_rule.md b/zh-cn/device-dev/reference/hdi-apis/_data_link_bandwidth_reporting_rule.md new file mode 100644 index 0000000000000000000000000000000000000000..91c7cb535fd20c0204c1020a19b2b52556549ac3 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_data_link_bandwidth_reporting_rule.md @@ -0,0 +1,121 @@ +# DataLinkBandwidthReportingRule + + +## 概述 + +网络频率上报规则。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [rat](#rat) | int
无线接入技术,具体查看[RilRadioTech](_ril.md#rilradiotech) | +| [delayMs](#delayms) | int
迟滞时间  | +| [delayUplinkKbps](#delayuplinkkbps) | int
上行迟滞  | +| [delayDownlinkKbps](#delaydownlinkkbps) | int
下行迟滞  | +| [maximumUplinkKbpsSize](#maximumuplinkkbpssize) | int
最大上行参数数量  | +| [maximumDownlinkKbpsSize](#maximumdownlinkkbpssize) | int
最大下行参数数量  | +| [maximumUplinkKbps](#maximumuplinkkbps) | List< int >
最大上行参数列表  | +| [maximumDownlinkKbps](#maximumdownlinkkbps) | List< int >
最大下行参数列表  | + + +## 类成员变量说明 + + +### delayDownlinkKbps + + +``` +int DataLinkBandwidthReportingRule::delayDownlinkKbps +``` +**描述:** +下行迟滞 + + +### delayMs + + +``` +int DataLinkBandwidthReportingRule::delayMs +``` +**描述:** +迟滞时间 + + +### delayUplinkKbps + + +``` +int DataLinkBandwidthReportingRule::delayUplinkKbps +``` +**描述:** +上行迟滞 + + +### maximumDownlinkKbps + + +``` +List DataLinkBandwidthReportingRule::maximumDownlinkKbps +``` +**描述:** +最大下行参数列表 + + +### maximumDownlinkKbpsSize + + +``` +int DataLinkBandwidthReportingRule::maximumDownlinkKbpsSize +``` +**描述:** +最大下行参数数量 + + +### maximumUplinkKbps + + +``` +List DataLinkBandwidthReportingRule::maximumUplinkKbps +``` +**描述:** +最大上行参数列表 + + +### maximumUplinkKbpsSize + + +``` +int DataLinkBandwidthReportingRule::maximumUplinkKbpsSize +``` +**描述:** +最大上行参数数量 + + +### rat + + +``` +int DataLinkBandwidthReportingRule::rat +``` +**描述:** +无线接入技术,具体查看[RilRadioTech](_ril.md#rilradiotech) + + +### serial + + +``` +int DataLinkBandwidthReportingRule::serial +``` +**描述:** +请求的序列号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_data_performance_info.md b/zh-cn/device-dev/reference/hdi-apis/_data_performance_info.md new file mode 100644 index 0000000000000000000000000000000000000000..6252096ab45adb8d6c0e8c3af408e3c850b0a364 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_data_performance_info.md @@ -0,0 +1,44 @@ +# DataPerformanceInfo + + +## 概述 + +数据业务性能模式。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [performanceEnable](#performanceenable) | int
开启性能模式  | +| [enforce](#enforce) | int
强制开启  | + + +## 类成员变量说明 + + +### enforce + + +``` +int DataPerformanceInfo::enforce +``` +**描述:** +强制开启 + + +### performanceEnable + + +``` +int DataPerformanceInfo::performanceEnable +``` +**描述:** +开启性能模式 diff --git a/zh-cn/device-dev/reference/hdi-apis/_data_profile_data_info.md b/zh-cn/device-dev/reference/hdi-apis/_data_profile_data_info.md new file mode 100644 index 0000000000000000000000000000000000000000..32c13d31ced902c9efbff1d584fb3b6a4e754307 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_data_profile_data_info.md @@ -0,0 +1,116 @@ +# DataProfileDataInfo + + +## 概述 + +PDP上下文信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [profileId](#profileid) | int
数据业务类型号,0表示默认数据业务,1表示彩信数据业务  | +| [authenticationType](#authenticationtype) | int
鉴权类型 | +| [apn](#apn) | String
接入点名称  | +| [protocol](#protocol) | String
网际协议版本  | +| [roamingProtocol](#roamingprotocol) | String
漫游网际协议版本  | +| [userName](#username) | String
用户名  | +| [password](#password) | String
密码  | + + +## 类成员变量说明 + + +### apn + + +``` +String DataProfileDataInfo::apn +``` +**描述:** +接入点名称 + + +### authenticationType + + +``` +int DataProfileDataInfo::authenticationType +``` +**描述:** +鉴权类型 + +- 0:无 + +- 1:密码认证协议(PAP) + +- 2:质询握手认证协议(CHAP) + + +### password + + +``` +String DataProfileDataInfo::password +``` +**描述:** +密码 + + +### profileId + + +``` +int DataProfileDataInfo::profileId +``` +**描述:** +数据业务类型号,0表示默认数据业务,1表示彩信数据业务 + + +### protocol + + +``` +String DataProfileDataInfo::protocol +``` +**描述:** +网际协议版本 + + +### roamingProtocol + + +``` +String DataProfileDataInfo::roamingProtocol +``` +**描述:** +漫游网际协议版本 + + +### serial + + +``` +int DataProfileDataInfo::serial +``` +**描述:** +请求的序列号 + + +### userName + + +``` +String DataProfileDataInfo::userName +``` +**描述:** +用户名 diff --git a/zh-cn/device-dev/reference/hdi-apis/_data_profiles_info.md b/zh-cn/device-dev/reference/hdi-apis/_data_profiles_info.md new file mode 100644 index 0000000000000000000000000000000000000000..2bd05f83b71a82b389349902b8df80f3d853fa89 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_data_profiles_info.md @@ -0,0 +1,66 @@ +# DataProfilesInfo + + +## 概述 + +PDP上下文信息列表。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [profilesSize](#profilessize) | int
PDP上下文数量  | +| [isRoaming](#isroaming) | boolean
是否漫游  | +| [profiles](#profiles) | List< struct [DataProfileDataInfo](_data_profile_data_info.md) >
PDP上下文信息列表  | + + +## 类成员变量说明 + + +### isRoaming + + +``` +boolean DataProfilesInfo::isRoaming +``` +**描述:** +是否漫游 + + +### profiles + + +``` +List DataProfilesInfo::profiles +``` +**描述:** +PDP上下文信息列表 + + +### profilesSize + + +``` +int DataProfilesInfo::profilesSize +``` +**描述:** +PDP上下文数量 + + +### serial + + +``` +int DataProfilesInfo::serial +``` +**描述:** +请求的序列号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_data_sleep_info.md b/zh-cn/device-dev/reference/hdi-apis/_data_sleep_info.md new file mode 100644 index 0000000000000000000000000000000000000000..195978fb94d67d3387bf7bc0472bdaf62b16f74b --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_data_sleep_info.md @@ -0,0 +1,33 @@ +# DataSleepInfo + + +## 概述 + +数据业务睡眠模式。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [sleepEnable](#sleepenable) | int
开启睡眠模式  | + + +## 类成员变量说明 + + +### sleepEnable + + +``` +int DataSleepInfo::sleepEnable +``` +**描述:** +开启睡眠模式 diff --git a/zh-cn/device-dev/reference/hdi-apis/_device_funcs.md b/zh-cn/device-dev/reference/hdi-apis/_device_funcs.md index 4d03b1911cff0d4acde50b7e3379574ca1c454c7..57dd59ba0526839d91666cbac3bf7ed8e5ec8b66 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_device_funcs.md +++ b/zh-cn/device-dev/reference/hdi-apis/_device_funcs.md @@ -1,7 +1,7 @@ # DeviceFuncs -## **概述** +## 概述 显示设备控制接口结构体,定义显示设备控制接口函数指针。 @@ -10,53 +10,53 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| ([DeviceFuncs::RegHotPlugCallback](_display.md#reghotplugcallback) )(HotPlugCallback callback, void \*data) | 注册热插拔事件回调。 | -| ([DeviceFuncs::RegDisplayVBlankCallback](_display.md#regdisplayvblankcallback) )(uint32_t devId, VBlankCallback callback, void \*data) | 注册VBlank事件回调。 | -| ([DeviceFuncs::RegDisplayRefreshCallback](_display.md#regdisplayrefreshcallback) )(uint32_t devId, RefreshCallback callback, void \*data) | 刷新请求回调。 | -| ([DeviceFuncs::GetDisplayCapability](_display.md#getdisplaycapability) )(uint32_t devId, DisplayCapability \*info) | 获取显示设备能力集。 | -| ([DeviceFuncs::GetDisplaySupportedModes](_display.md#getdisplaysupportedmodes) )(uint32_t devId, uint32_t \*num, DisplayModeInfo \*modes) | 获取显示设备支持的显示模式信息。 | -| ([DeviceFuncs::GetDisplayMode](_display.md#getdisplaymode) )(uint32_t devId, uint32_t \*modeId) | 获取显示设备当前的显示模式。 | -| ([DeviceFuncs::SetDisplayMode](_display.md#setdisplaymode) )(uint32_t devId, uint32_t modeId) | 设置显示设备的显示模式。 | -| ([DeviceFuncs::GetDisplayPowerStatus](_display.md#getdisplaypowerstatus) )(uint32_t devId, DispPowerStatus \*status) | 获取显示设备当前的电源状态。 | -| ([DeviceFuncs::SetDisplayPowerStatus](_display.md#setdisplaypowerstatus) )(uint32_t devId, DispPowerStatus status) | 设置显示设备当前的电源状态。 | -| ([DeviceFuncs::GetDisplayBacklight](_display.md#getdisplaybacklight) )(uint32_t devId, uint32_t \*level) | 获取显示设备当前的背光值。 | -| ([DeviceFuncs::SetDisplayBacklight](_display.md#setdisplaybacklight) )(uint32_t devId, uint32_t level) | 设置显示设备当前的背光值。 | -| ([DeviceFuncs::GetDisplayProperty](_display.md#getdisplayproperty) )(uint32_t devId, uint32_t id, uint64_t \*value) | 获取显示设备属性值。 | -| ([DeviceFuncs::SetDisplayProperty](_display.md#setdisplayproperty) )(uint32_t devId, uint32_t id, uint64_t value) | 设置显示设备属性值。 | -| ([DeviceFuncs::PrepareDisplayLayers](_display.md#preparedisplaylayers) )(uint32_t devId, bool \*needFlushFb) | 显示设备合成前准备。 | -| ([DeviceFuncs::GetDisplayCompChange](_display.md#getdisplaycompchange) )(uint32_t devId, uint32_t \*num, uint32_t \*Layers, int32_t \*type) | 获取显示设备合成类型有变化的layer。 | -| ([DeviceFuncs::SetDisplayClientCrop](_display.md#setdisplayclientcrop) )(uint32_t devId, IRect \*rect) | 设置显示设备的裁剪区域。 | -| ([DeviceFuncs::SetDisplayClientDestRect](_display.md#setdisplayclientdestrect) )(uint32_t devId, IRect \*rect) | 设置显示设备的显示区域。 | -| ([DeviceFuncs::SetDisplayClientBuffer](_display.md#setdisplayclientbuffer) )(uint32_t devId, const BufferHandle \*buffer, int32_t fence) | 设置显示设备的显示缓存。 | -| ([DeviceFuncs::SetDisplayClientDamage](_display.md#setdisplayclientdamage) )(uint32_t devId, uint32_t num, IRect \*rect) | 设置显示设备的显示脏区。 | -| ([DeviceFuncs::SetDisplayVsyncEnabled](_display.md#setdisplayvsyncenabled) )(uint32_t devId, bool enabled) | 使能垂直同步信号。 | -| ([DeviceFuncs::GetDisplayReleaseFence](_display.md#getdisplayreleasefence) )(uint32_t devId, uint32_t \*num, uint32_t \*layers, int32_t \*fences) | 获取显示图层fence。 | -| ([DeviceFuncs::GetDisplaySupportedColorGamuts](_display.md#getdisplaysupportedcolorgamuts) )(uint32_t devId, uint32_t \*num, ColorGamut \*gamuts) | 获取显示设备支持的色域信息。 | -| ([DeviceFuncs::GetDisplayColorGamut](_display.md#getdisplaycolorgamut) )(uint32_t devId, ColorGamut \*gamut) | 获取显示设备当前的色域模式。 | -| ([DeviceFuncs::SetDisplayColorGamut](_display.md#setdisplaycolorgamut) )(uint32_t devId, ColorGamut gamut) | 设置显示设备当前的色域模式。 | -| ([DeviceFuncs::GetDisplayGamutMap](_display.md#getdisplaygamutmap) )(uint32_t devId, GamutMap \*gamutMap) | 获取显示设备当前的色域映射模式。 | -| ([DeviceFuncs::SetDisplayGamutMap](_display.md#setdisplaygamutmap) )(uint32_t devId, GamutMap gamutMap) | 设置显示设备当前的色域映射模式。 | -| ([DeviceFuncs::SetDisplayColorTransform](_display.md#setdisplaycolortransform) )(uint32_t devId, const float \*matrix) | 设置显示设备当前的4x4的颜色转换矩阵。 | -| ([DeviceFuncs::GetHDRCapabilityInfos](_display.md#gethdrcapabilityinfos) )(uint32_t devId, HDRCapability \*info) | 获取显示设备支持的HDR属性信息。 | -| ([DeviceFuncs::GetSupportedMetadataKey](_display.md#getsupportedmetadatakey) )(uint32_t devId, uint32_t \*num, DisplayInfo::widthHDRMetadataKey \*keys) | 获取显示设备支持的 HDRMetadataKey。 | -| ([DeviceFuncs::Commit](_display.md#commit) )(uint32_t devId, int32_t \*fence) | 提交合成送显请求。 | -| ([DeviceFuncs::InvokeDisplayCmd](_display.md#invokedisplaycmd) )(uint32_t devId,...) | 调用显示设备命令。 | -| ([DeviceFuncs::CreateVirtualDisplay](_display.md#createvirtualdisplay) )(uint32_t width, uint32_t height, int32_t \*format, uint32_t \*devId) | 创建虚拟显示设备。 | -| ([DeviceFuncs::DestroyVirtualDisplay](_display.md#destroyvirtualdisplay) )(uint32_t devId) | 销毁虚拟显示设备。 | -| ([DeviceFuncs::SetVirtualDisplayBuffer](_display.md#setvirtualdisplaybuffer) )(uint32_t devId, BufferHandle \*buffer, int32_t fence) | 设置虚拟屏的输出缓存。 | -| ([DeviceFuncs::GetWriteBackFrame](_display.md#getwritebackframe) )(uint32_t devId, BufferHandle \*buffer, int32_t \*fence) | 获取显示设备的回写帧。 | -| ([DeviceFuncs::CreateWriteBack](#createwriteback)DeviceFuncs::CreateWriteBack)(uint32_t \*devId, uint32_t width, uint32_t height, int32_t \*format) | PixelFormat, 接口实现层可以根据硬件需求,修改format并返回给图形服务。 | -| ([DeviceFuncs::DestroyWriteBack](#destroywriteback) )(uint32_t devId) | 销毁指定显示设备的回写点。 | - - -## **类成员变量说明** +| (\* [RegHotPlugCallback](_display.md#reghotplugcallback) )([HotPlugCallback](_display.md#hotplugcallback) callback, void \*data) | int32_t
注册热插拔事件回调。 | +| (\* [RegDisplayVBlankCallback](_display.md#regdisplayvblankcallback) )(uint32_t devId, [VBlankCallback](_display.md#vblankcallback) callback, void \*data) | int32_t
注册VBlank事件回调。 | +| (\* [RegDisplayRefreshCallback](_display.md#regdisplayrefreshcallback) )(uint32_t devId, [RefreshCallback](_display.md#refreshcallback) callback, void \*data) | int32_t
刷新请求回调。 | +| (\* [GetDisplayCapability](_display.md#getdisplaycapability) )(uint32_t devId, [DisplayCapability](_display_capability.md) \*info) | int32_t
获取显示设备能力集。 | +| (\* [GetDisplaySupportedModes](_display.md#getdisplaysupportedmodes) )(uint32_t devId, uint32_t \*num, [DisplayModeInfo](_display_mode_info.md) \*modes) | int32_t
获取显示设备支持的显示模式信息。 | +| (\* [GetDisplayMode](_display.md#getdisplaymode) )(uint32_t devId, uint32_t \*modeId) | int32_t
获取显示设备当前的显示模式。 | +| (\* [SetDisplayMode](_display.md#setdisplaymode) )(uint32_t devId, uint32_t modeId) | int32_t
设置显示设备的显示模式。 | +| (\* [GetDisplayPowerStatus](_display.md#getdisplaypowerstatus) )(uint32_t devId, [DispPowerStatus](_display.md#disppowerstatus) \*status) | int32_t
获取显示设备当前的电源状态。 | +| (\* [SetDisplayPowerStatus](_display.md#setdisplaypowerstatus) )(uint32_t devId, [DispPowerStatus](_display.md#disppowerstatus) status) | int32_t
设置显示设备当前的电源状态。 | +| (\* [GetDisplayBacklight](_display.md#getdisplaybacklight) )(uint32_t devId, uint32_t \*level) | int32_t
获取显示设备当前的背光值。 | +| (\* [SetDisplayBacklight](_display.md#setdisplaybacklight) )(uint32_t devId, uint32_t level) | int32_t
设置显示设备当前的背光值。 | +| (\* [GetDisplayProperty](_display.md#getdisplayproperty) )(uint32_t devId, uint32_t id, uint64_t \*value) | int32_t
获取显示设备属性值。 | +| (\* [SetDisplayProperty](_display.md#setdisplayproperty) )(uint32_t devId, uint32_t id, uint64_t value) | int32_t
设置显示设备属性值。 | +| (\* [PrepareDisplayLayers](_display.md#preparedisplaylayers) )(uint32_t devId, bool \*needFlushFb) | int32_t
显示设备合成前准备。 | +| (\* [GetDisplayCompChange](_display.md#getdisplaycompchange) )(uint32_t devId, uint32_t \*num, uint32_t \*Layers, int32_t \*type) | int32_t
获取显示设备合成类型有变化的layer。 | +| (\* [SetDisplayClientCrop](_display.md#setdisplayclientcrop) )(uint32_t devId, [IRect](_i_rect.md) \*rect) | int32_t
设置显示设备的裁剪区域。 | +| (\* [SetDisplayClientDestRect](_display.md#setdisplayclientdestrect) )(uint32_t devId, [IRect](_i_rect.md) \*rect) | int32_t
设置显示设备的显示区域。 | +| (\* [SetDisplayClientBuffer](_display.md#setdisplayclientbuffer) )(uint32_t devId, const BufferHandle \*buffer, int32_t fence) | int32_t
设置显示设备的显示缓存。 | +| (\* [SetDisplayClientDamage](_display.md#setdisplayclientdamage) )(uint32_t devId, uint32_t num, [IRect](_i_rect.md) \*rect) | int32_t
设置显示设备的显示脏区。 | +| (\* [SetDisplayVsyncEnabled](_display.md#setdisplayvsyncenabled) )(uint32_t devId, bool enabled) | int32_t
使能垂直同步信号。 | +| (\* [GetDisplayReleaseFence](_display.md#getdisplayreleasefence) )(uint32_t devId, uint32_t \*num, uint32_t \*layers, int32_t \*fences) | int32_t
获取显示图层fence。 | +| (\* [GetDisplaySupportedColorGamuts](_display.md#getdisplaysupportedcolorgamuts) )(uint32_t devId, uint32_t \*num, [ColorGamut](_display.md#colorgamut) \*gamuts) | int32_t
获取显示设备支持的色域信息。 | +| (\* [GetDisplayColorGamut](_display.md#getdisplaycolorgamut) )(uint32_t devId, [ColorGamut](_display.md#colorgamut) \*gamut) | int32_t
获取显示设备当前的色域模式。 | +| (\* [SetDisplayColorGamut](_display.md#setdisplaycolorgamut) )(uint32_t devId, [ColorGamut](_display.md#colorgamut) gamut) | int32_t
设置显示设备当前的色域模式。 | +| (\* [GetDisplayGamutMap](_display.md#getdisplaygamutmap) )(uint32_t devId, [GamutMap](_display.md#gamutmap) \*gamutMap) | int32_t
获取显示设备当前的色域映射模式。 | +| (\* [SetDisplayGamutMap](_display.md#setdisplaygamutmap) )(uint32_t devId, [GamutMap](_display.md#gamutmap) gamutMap) | int32_t
设置显示设备当前的色域映射模式。 | +| (\* [SetDisplayColorTransform](_display.md#setdisplaycolortransform) )(uint32_t devId, const float \*matrix) | int32_t
设置显示设备当前的4x4的颜色转换矩阵。 | +| (\* [GetHDRCapabilityInfos](_display.md#gethdrcapabilityinfos) )(uint32_t devId, [HDRCapability](_h_d_r_capability.md) \*info) | int32_t
获取显示设备支持的HDR属性信息。 | +| (\* [GetSupportedMetadataKey](_display.md#getsupportedmetadatakey) )(uint32_t devId, uint32_t \*num, [HDRMetadataKey](_display.md#hdrmetadatakey) \*keys) | int32_t
获取显示设备支持的 HDRMetadataKey。 | +| (\* [Commit](_display.md#commit) )(uint32_t devId, int32_t \*fence) | int32_t
提交合成送显请求。 | +| (\* [InvokeDisplayCmd](_display.md#invokedisplaycmd) )(uint32_t devId,...) | int32_t
调用显示设备命令。 | +| (\* [CreateVirtualDisplay](_display.md#createvirtualdisplay) )(uint32_t width, uint32_t height, int32_t \*format, uint32_t \*devId) | int32_t
创建虚拟显示设备。 | +| (\* [DestroyVirtualDisplay](_display.md#destroyvirtualdisplay) )(uint32_t devId) | int32_t
销毁虚拟显示设备。 | +| (\* [SetVirtualDisplayBuffer](_display.md#setvirtualdisplaybuffer) )(uint32_t devId, BufferHandle \*buffer, int32_t fence) | int32_t
设置虚拟屏的输出缓存。 | +| (\* [GetWriteBackFrame](_display.md#getwritebackframe) )(uint32_t devId, BufferHandle \*buffer, int32_t \*fence) | int32_t
获取显示设备的回写帧。 | +| (\* [CreateWriteBack](#createwriteback) )(uint32_t \*devId, uint32_t width, uint32_t height, int32_t \*format) | int32_t
PixelFormat, 接口实现层可以根据硬件需求,修改format并返回给图形服务。 | +| (\* [DestroyWriteBack](#destroywriteback) )(uint32_t devId) | int32_t
销毁指定显示设备的回写点。 | + + +## 类成员变量说明 ### CreateWriteBack @@ -66,19 +66,10 @@ int32_t(* DeviceFuncs::CreateWriteBack) (uint32_t *devId, uint32_t width, uint32_t height, int32_t *format) ``` -**描述:** +**描述:** PixelFormat, 接口实现层可以根据硬件需求,修改format并返回给图形服务。 -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| devId | 输入参数,指示需要操作的设备ID,接口实现层在创建完回写点后将回写点设备ID存放在该参数中返回给图形服务。 | -| width | 输入参数,回写像素宽度。 | -| height | 输入参数,回写像素高度。 | -| format | 输入参数,回写点数据格式,详情参考[PixelFormat](_display.md#pixelformat),接口实现层可以根据硬件需求,修改format并返回给图形服务。 | - **返回:** DISPLAY_SUCCESS 表示执行成功。 @@ -93,12 +84,10 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::DestroyWriteBack) (uint32_t devId) ``` -**描述:** +**描述:** 销毁指定显示设备的回写点。 -该接口用來销毁指定的回写点。 - **参数:** | 名称 | 描述 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_dial_info.md b/zh-cn/device-dev/reference/hdi-apis/_dial_info.md new file mode 100644 index 0000000000000000000000000000000000000000..176de00e66e0909b851642ccf7fafe28558a6822 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_dial_info.md @@ -0,0 +1,61 @@ +# DialInfo + + +## 概述 + +拨号信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [clir](#clir) | int
CLIR模式 | +| [address](#address) | String
电话号码  | + + +## 类成员变量说明 + + +### address + + +``` +String DialInfo::address +``` +**描述:** +电话号码 + + +### clir + + +``` +int DialInfo::clir +``` +**描述:** +CLIR模式 + +- 0:默认 + +- 1:开启 + +- 2:关闭 + + +### serial + + +``` +int DialInfo::serial +``` +**描述:** +请求的序列号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_display.md b/zh-cn/device-dev/reference/hdi-apis/_display.md index ec7e8d4bb789a1542ebe49aaadbbd2371f01d053..e20a8b6a276f572af59ef59508666afcb4bcd302 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_display.md +++ b/zh-cn/device-dev/reference/hdi-apis/_display.md @@ -1,24 +1,24 @@ # Display -## **汇总** - - -## **概述** +## 概述 显示模块驱动接口定义。 提供给图形系统使用的驱动接口,包括图层管理、设备控制、图形硬件加速、显示内存管理和回调接口等。 -**Since**: +**Since:** 1.0 -**Version**:。 +**Version:** 2.0 +## 汇总 + + ### 文件 | 名称 | 描述 | @@ -35,50 +35,50 @@ | 名称 | 描述 | | -------- | -------- | -| [DeviceFuncs](_device_funcs.md) | 显示设备控制接口结构体,定义显示设备控制接口函数指针。 | -| [GfxFuncs](_gfx_funcs.md) | 显示硬件加速驱动接口结构体,定义硬件加速驱动接口函数指针。 | -| [GrallocFuncs](_gralloc_funcs.md) | 显示内存驱动接口结构体,定义显示内存驱动接口函数指针。 | -| [LayerFuncs](_layer_funcs.md) | 显示图层驱动接口结构体,定义显示图层驱动接口函数指针。 | -| [DisplayInfo](_display_info.md) | 定义显示信息结构体 | -| [LayerInfo](_layer_info.md) | 定义图层信息结构体 | -| [LayerAlpha](_layer_alpha.md) | 定义图层Alpha信息的结构体 | -| [BufferData](_buffer_data.md) | 定义一层的缓冲区数据,包括虚拟和物理内存地址。 | -| [LayerBuffer](_layer_buffer.md) | 图层Buffer,用于存放图层数据。 | -| [IRect](_i_rect.md) | 定义矩形信息。 | -| [ISurface](_i_surface.md) | 用于存放窗口相关信息的结构体定义,提供给硬件加速使用,例如图像合成,位图搬移等操作。 | -| [ILine](_i_line.md) | 线条描述结构体定义,用于硬件加速绘制直线。 | -| [ICircle](_i_circle.md) | 圆形描述结构体定义,用于硬件加速绘制圆形。 | -| [Rectangle](_rectangle.md) | 矩形描述结构体定义,用于硬件加速绘制矩形。 | -| [GfxOpt](_gfx_opt.md) | 图像硬件加速相关的操作选项结构体定义,用于图像硬件加速时的操作选项。 | -| [PropertyObject](_property_object.md) | 定义包含名称、属性ID和值的属性对象。 | -| [DisplayCapability](_display_capability.md) | 定义输出性能。 | -| [DisplayModeInfo](_display_mode_info.md) | 定义输出模式信息。 | -| [AllocInfo](_alloc_info.md) | 定义关于要分配的内存的信息。 | -| [HDRCapability](_h_d_r_capability.md) | HDR属性结构体定义。 | -| [HDRMetaData](_h_d_r_meta_data.md) | HDR元数据结构体定义。 | -| [VerifyAllocInfo](_verify_alloc_info.md) | 用于验证内存分配信息的结构体定义。 | -| [PresentTimestamp](_present_timestamp.md) | 上屏时间戳结构体定义。 | -| [ExtDataHandle](_ext_data_handle.md) | 扩展数据句柄结构体定义。 | -| [YUVDescInfo](_yun_desc_info_.md) | YUV描述信息结构体定义。 | -| [VGUPoint](_v_g_u_point.md) | 坐标点对象。 | -| [VGURect](_v_g_u_rect.md) | 矩形对象。 | -| [VGUPath](_v_g_u_path.md) | 路径对象,存放路径命令和坐标数据。 | -| [VGUMatrix3](_v_g_u_matrix3.md) | 变换矩阵。 | -| [VGUBuffer](_v_g_u_buffer.md) | 硬件加速渲染位图缓存。 | -| [VGUMaskLayer](_v_g_u_mask_layer.md) | 定义蒙版图层。 | -| [VGUSurface](_v_g_u_surface.md) | 2D硬件加速绘制目标表面。 | -| [VGUColorStop](_v_g_u_color_stop.md) | 渐变颜色分布位置。 | -| [VGULinear](_v_g_u_linear.md) | 线性渐变。 | -| [VGURadial](_v_g_u_radial.md) | 辐射渐变。 | -| [VGUConic](_v_g_u_conic.md) | 圆锥渐变。 | -| [VGUImage](_v_g_u_image.md) | 图像对象。 | -| [VGUPattern](_v_g_u_pattern.md) | 图片模式对象。 | -| [VGUGradient](_v_g_u_gradient.md) | 渐变对象。 | -| [VGUSolid](_v_g_u_solid.md) | 颜色对象。 | -| [VGUPaintStyle](_v_g_u_paint_style.md) | 填充或描边路径的渲染风格。 | -| [VGUFillAttr](_v_g_u_fill_attr.md) | 填充路径的属性。 | -| [VGUStrokeAttr](_v_g_u_stroke_attr.md) | 描边路径的属性。 | -| [VGUFuncs](_v_g_u_funcs.md) | 定义2D硬件加速驱动函数。 | +| [DeviceFuncs](_device_funcs.md) | struct
显示设备控制接口结构体,定义显示设备控制接口函数指针。 | +| [ExtDataHandle](_ex_data_handle.md) | struct
扩展数据句柄结构体定义。 | +| [GfxFuncs](_gfx_funcs.md) | struct
显示硬件加速驱动接口结构体,定义硬件加速驱动接口函数指针。 | +| [GrallocFuncs](_gralloc_funcs.md) | struct
显示内存驱动接口结构体,定义显示内存驱动接口函数指针。 | +| [LayerFuncs](_layer_funcs.md) | struct
显示图层驱动接口结构体,定义显示图层驱动接口函数指针。 | +| [DisplayInfo](_display_info.md) | struct
定义显示信息结构体 | +| [LayerInfo](_layer_info.md) | struct
定义图层信息结构体 | +| [LayerAlpha](_layer_alpha.md) | struct
定义图层Alpha信息的结构体 | +| [BufferData](_buffer_data.md) | struct
定义一层的缓冲区数据,包括虚拟和物理内存地址。 | +| [LayerBuffer](_layer_buffer.md) | struct
图层Buffer,用于存放图层数据。 | +| [IRect](_i_rect.md) | struct
定义矩形信息 | +| [ISurface](_i_surface.md) | struct
用于存放窗口相关信息的结构体定义,提供给硬件加速使用,例如图像合成,位图搬移等操作。 | +| [ILine](_i_line.md) | struct
线条描述结构体定义,用于硬件加速绘制直线。 | +| [ICircle](_i_circle.md) | struct
圆形描述结构体定义,用于硬件加速绘制圆形。 | +| [Rectangle](_rectangle.md) | struct
矩形描述结构体定义,用于硬件加速绘制矩形。 | +| [GfxOpt](_gfx_opt.md) | struct
图像硬件加速相关的操作选项结构体定义,用于图像硬件加速时的操作选项。 | +| [PropertyObject](_property_object.md) | struct
定义包含名称、属性ID和值的属性对象。 | +| [DisplayCapability](_display_capability.md) | struct
定义输出性能。 | +| [DisplayModeInfo](_display_mode_info.md) | struct
定义输出模式信息。 | +| [AllocInfo](_alloc_info.md) | struct
定义关于要分配的内存的信息。 | +| [HDRCapability](_h_d_r_capability.md) | struct
HDR属性结构体定义 | +| [HDRMetaData](_h_d_r_meta_data.md) | struct
HDR元数据结构体定义 | +| [VerifyAllocInfo](_verify_alloc_info.md) | struct
用于验证内存分配信息的结构体定义 | +| [PresentTimestamp](_present_timestamp.md) | struct
上屏时间戳结构体定义 | +| [VGUPoint](_v_g_u_point.md) | struct
坐标点对象。 | +| [VGURect](_v_g_u_rect.md) | struct
矩形对象。 | +| [VGUPath](_v_g_u_path.md) | struct
路径对象,存放路径命令和坐标数据。 | +| [VGUMatrix3](_v_g_u_matrix3.md) | struct
变换矩阵。 | +| [VGUBuffer](_v_g_u_buffer.md) | struct
硬件加速渲染位图缓存。 | +| [VGUMaskLayer](_v_g_u_mask_layer.md) | struct
定义蒙版图层。 | +| [VGUSurface](_v_g_u_surface.md) | struct
2D硬件加速绘制目标表面。 | +| [VGUColorStop](_v_g_u_color_stop.md) | struct
渐变颜色分布位置。 | +| [VGULinear](_v_g_u_linear.md) | struct
线性渐变。 | +| [VGURadial](_v_g_u_radial.md) | struct
辐射渐变。 | +| [VGUConic](_v_g_u_conic.md) | struct
圆锥渐变。 | +| [VGUImage](_v_g_u_image.md) | struct
图像对象。 | +| [VGUPattern](_v_g_u_pattern.md) | struct
图片模式对象。 | +| [VGUGradient](_v_g_u_gradient.md) | struct
渐变对象。 | +| [VGUSolid](_v_g_u_solid.md) | struct
颜色对象 | +| [VGUPaintStyle](_v_g_u_paint_style.md) | struct
填充或描边路径的渲染风格。 | +| [VGUFillAttr](_v_g_u_fill_attr.md) | struct
填充路径的属性。 | +| [VGUStrokeAttr](_v_g_u_stroke_attr.md) | struct
描边路径的属性。 | +| [VGUFuncs](_v_g_u_funcs.md) | struct
定义2D硬件加速驱动函数。 | +| [YUVDescInfo](_yuv_desc_info.md) | struct
YUV描述信息结构体定义 | ### 宏定义 @@ -86,382 +86,340 @@ | 名称 | 描述 | | -------- | -------- | | [PROPERTY_NAME_LEN](#property_name_len)   50 | 属性名字长度。 | -| [HDI_VGU_SCALAR_IS_FLOAT](#hdi_vgu_scalar_is_float)   1 | VGU标量是否为浮点型 | +| [HDI_VGU_SCALAR_IS_FLOAT](#hdi_vgu_scalar_is_float)   1 | VGU标量是否为浮点型。 | ### 类型定义 | 名称 | 描述 | | -------- | -------- | -| ([HotPlugCallback](#hotplugcallback)) (uint32_t devId, bool connected, void \*data) | 热插拔事件回调 。 | -| ([VBlankCallback](#vblankcallback)) (unsigned int sequence, uint64_t ns, void \*data) | VBlank 事件回调。 | -| ([RefreshCallback](#refreshcallback)) (uint32_t devId, void \*data) | 刷新请求回调 。 | -| [VGUScalar](#vguscalar) | VGU标量。 | -| [VGUPixelFormat](#vgupixelformat) | 像素格式。 | -| [VGUBlendType](#vgublendtype) | 混合操作类型。 | +| (\* [HotPlugCallback](#hotplugcallback)) (uint32_t devId, bool connected, void \*data) | typedef void
热插拔事件回调 | +| (\* [VBlankCallback](#vblankcallback)) (unsigned int sequence, uint64_t ns, void \*data) | typedef void
VBlank事件回调。 | +| (\* [RefreshCallback](#refreshcallback)) (uint32_t devId, void \*data) | typedef void
刷新请求回调 | +| [VGUScalar](#vguscalar) | typedef float
VGU标量。 | +| [VGUPixelFormat](#vgupixelformat) | typedef [PixelFormat](#pixelformat)
像素格式。 | +| [VGUBlendType](#vgublendtype) | typedef [BlendType](#blendtype)
混合操作类型。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [DispErrCode](#disperrcode){ DISPLAY_SUCCESS = 0, DISPLAY_FAILURE = -1, DISPLAY_FD_ERR = -2, DISPLAY_PARAM_ERR = -3,   DISPLAY_NULL_PTR = -4, DISPLAY_NOT_SUPPORT = -5, DISPLAY_NOMEM = -6, DISPLAY_SYS_BUSY = -7,   DISPLAY_NOT_PERM = -8 } | 返回值类型定义。 | -| [LayerType](#layertype){ LAYER_TYPE_GRAPHIC, LAYER_TYPE_OVERLAY, LAYER_TYPE_SDIEBAND, LAYER_TYPE_CURSOR,   LAYER_TYPE_BUTT } | 图层类型定义。 | +| [DispErrCode](#disperrcode) { DISPLAY_SUCCESS = 0, DISPLAY_FAILURE = -1, DISPLAY_FD_ERR = -2, DISPLAY_PARAM_ERR = -3,   DISPLAY_NULL_PTR = -4, DISPLAY_NOT_SUPPORT = -5, DISPLAY_NOMEM = -6, DISPLAY_SYS_BUSY = -7,   DISPLAY_NOT_PERM = -8 } | 返回值类型定义。 | +| [LayerType](#layertype) { LAYER_TYPE_GRAPHIC, LAYER_TYPE_OVERLAY, LAYER_TYPE_SDIEBAND, LAYER_TYPE_CURSOR, LAYER_TYPE_BUTT } | 图层类型定义。 | | { HBM_USE_CPU_READ = (1 << 0), HBM_USE_CPU_WRITE = (1 << 1), HBM_USE_MEM_MMZ = (1 << 2), HBM_USE_MEM_DMA = (1 << 3),   HBM_USE_MEM_SHARE = (1 << 4), HBM_USE_MEM_MMZ_CACHE = (1 << 5), HBM_USE_MEM_FB = (1 << 6), HBM_USE_ASSIGN_SIZE = (1 << 7) } | 定义缓冲区使用。 | -| [PixelFormat](#pixelformat){ PIXEL_FMT_CLUT8 = 0, PIXEL_FMT_CLUT1, PIXEL_FMT_CLUT4, PIXEL_FMT_RGB_565,   PIXEL_FMT_RGBA_5658, PIXEL_FMT_RGBX_4444, PIXEL_FMT_RGBA_4444, PIXEL_FMT_RGB_444,   PIXEL_FMT_RGBX_5551, PIXEL_FMT_RGBA_5551, PIXEL_FMT_RGB_555, PIXEL_FMT_RGBX_8888,   PIXEL_FMT_RGBA_8888, PIXEL_FMT_RGB_888, PIXEL_FMT_BGR_565, PIXEL_FMT_BGRX_4444,   PIXEL_FMT_BGRA_4444, PIXEL_FMT_BGRX_5551, PIXEL_FMT_BGRA_5551, PIXEL_FMT_BGRX_8888,   PIXEL_FMT_BGRA_8888, PIXEL_FMT_YUV_422_I, PIXEL_FMT_YCBCR_422_SP, PIXEL_FMT_YCRCB_422_SP,   PIXEL_FMT_YCBCR_420_SP, PIXEL_FMT_YCRCB_420_SP, PIXEL_FMT_YCBCR_422_P, PIXEL_FMT_YCRCB_422_P,   PIXEL_FMT_YCBCR_420_P, PIXEL_FMT_YCRCB_420_P, PIXEL_FMT_YUYV_422_PKG, PIXEL_FMT_UYVY_422_PKG,   PIXEL_FMT_YVYU_422_PKG, PIXEL_FMT_VYUY_422_PKG, PIXEL_FMT_VENDER_MASK = 0X7FFF0000, PIXEL_FMT_BUTT = 0X7FFFFFFF } | 像素格式类型定义。 | -| [TransformType](#transformtype){ ROTATE_NONE = 0, ROTATE_90, ROTATE_180, ROTATE_270,   ROTATE_BUTT } | 图层变换类型定义。 | -| [BlendType](#blendtype){ BLEND_NONE = 0, BLEND_CLEAR, BLEND_SRC, BLEND_SRCOVER,   BLEND_DSTOVER, BLEND_SRCIN, BLEND_DSTIN, BLEND_SRCOUT,   BLEND_DSTOUT, BLEND_SRCATOP, BLEND_DSTATOP, BLEND_ADD,   BLEND_XOR, BLEND_DST, BLEND_AKS, BLEND_AKD,   BLEND_BUTT } | 支持的图像混合类型。 | -| [RopType](#roptype){ ROP_BLACK = 0, ROP_NOTMERGEPEN, ROP_MASKNOTPEN, ROP_NOTCOPYPEN,   ROP_MASKPENNOT, ROP_NOT, ROP_XORPEN, ROP_NOTMASKPEN,   ROP_MASKPEN, ROP_NOTXORPEN, ROP_NOP, ROP_MERGENOTPEN,   ROP_COPYPE, ROP_MERGEPENNOT, ROP_MERGEPEN, ROP_WHITE,   ROP_BUTT } | 硬件加速支持的ROP操作类型。 | +| [PixelFormat](#pixelformat) { PIXEL_FMT_CLUT8 = 0, PIXEL_FMT_CLUT1, PIXEL_FMT_CLUT4, PIXEL_FMT_RGB_565,   PIXEL_FMT_RGBA_5658, PIXEL_FMT_RGBX_4444, PIXEL_FMT_RGBA_4444, PIXEL_FMT_RGB_444,   PIXEL_FMT_RGBX_5551, PIXEL_FMT_RGBA_5551, PIXEL_FMT_RGB_555, PIXEL_FMT_RGBX_8888,   PIXEL_FMT_RGBA_8888, PIXEL_FMT_RGB_888, PIXEL_FMT_BGR_565, PIXEL_FMT_BGRX_4444,   PIXEL_FMT_BGRA_4444, PIXEL_FMT_BGRX_5551, PIXEL_FMT_BGRA_5551, PIXEL_FMT_BGRX_8888,   PIXEL_FMT_BGRA_8888, PIXEL_FMT_YUV_422_I, PIXEL_FMT_YCBCR_422_SP, PIXEL_FMT_YCRCB_422_SP,   PIXEL_FMT_YCBCR_420_SP, PIXEL_FMT_YCRCB_420_SP, PIXEL_FMT_YCBCR_422_P, PIXEL_FMT_YCRCB_422_P,   PIXEL_FMT_YCBCR_420_P, PIXEL_FMT_YCRCB_420_P, PIXEL_FMT_YUYV_422_PKG, PIXEL_FMT_UYVY_422_PKG,   PIXEL_FMT_YVYU_422_PKG, PIXEL_FMT_VYUY_422_PKG, PIXEL_FMT_VENDER_MASK = 0X7FFF0000, PIXEL_FMT_BUTT = 0X7FFFFFFF } | 像素格式类型定义。 | +| [TransformType](#transformtype) { ROTATE_NONE = 0, ROTATE_90, ROTATE_180, ROTATE_270, ROTATE_BUTT } | 图层变换类型定义。 | +| [BlendType](#blendtype) { BLEND_NONE = 0, BLEND_CLEAR, BLEND_SRC, BLEND_SRCOVER,   BLEND_DSTOVER, BLEND_SRCIN, BLEND_DSTIN, BLEND_SRCOUT,   BLEND_DSTOUT, BLEND_SRCATOP, BLEND_DSTATOP, BLEND_ADD,   BLEND_XOR, BLEND_DST, BLEND_AKS, BLEND_AKD,   BLEND_BUTT } | 支持的图像混合类型。 | +| [RopType](#roptype) { ROP_BLACK = 0, ROP_NOTMERGEPEN, ROP_MASKNOTPEN, ROP_NOTCOPYPEN,   ROP_MASKPENNOT, ROP_NOT, ROP_XORPEN, ROP_NOTMASKPEN,   ROP_MASKPEN, ROP_NOTXORPEN, ROP_NOP, ROP_MERGENOTPEN,   ROP_COPYPE, ROP_MERGEPENNOT, ROP_MERGEPEN, ROP_WHITE,   ROP_BUTT } | 硬件加速支持的ROP操作类型。 | | [ColorKey](#colorkey) { CKEY_NONE = 0, CKEY_SRC, CKEY_DST, CKEY_BUTT } | Color key操作类型定义,即硬件加速支持的Color key操作类型。 | -| [MirrorType](#mirrortype){ MIRROR_NONE = 0, MIRROR_LR, MIRROR_TB, MIRROR_BUTT } | 硬件加速支持的镜像操作类型定义。 | -| [Connection](#connection){ CON_INVALID = 0, CONNECTED, DISCONNECTED } | 热插拔连接类型定义。 | -| [InterfaceType](#interfacetype){ DISP_INTF_HDMI = 0, DISP_INTF_LCD, DISP_INTF_BT1120, DISP_INTF_BT656,   DISP_INTF_YPBPR, DISP_INTF_RGB, DISP_INTF_CVBS, DISP_INTF_SVIDEO,   DISP_INTF_VGA, DISP_INTF_MIPI, DISP_INTF_PANEL, DISP_INTF_BUTT } | 枚举接口类型。 | -| [DispPowerStatus](#disppowerstatus){ POWER_STATUS_ON, POWER_STATUS_STANDBY, POWER_STATUS_SUSPEND, POWER_STATUS_OFF,   POWER_STATUS_BUTT } | 枚举显示状态。 | -| [CompositionType](#compositiontype){ COMPOSITION_CLIENT, COMPOSITION_DEVICE, COMPOSITION_CURSOR, COMPOSITION_VIDEO,   COMPOSITION_DEVICE_CLEAR, COMPOSITION_CLIENT_CLEAR, COMPOSITION_TUNNEL, COMPOSITION_BUTT } | 枚举特殊层的组合类型。 | -| [ColorGamut](#colorgamut){ COLOR_GAMUT_INVALID = -1, COLOR_GAMUT_NATIVE = 0, COLOR_GAMUT_SATNDARD_BT601 = 1, COLOR_GAMUT_STANDARD_BT709 = 2,   COLOR_GAMUT_DCI_P3 = 3, COLOR_GAMUT_SRGB = 4, COLOR_GAMUT_ADOBE_RGB = 5, COLOR_GAMUT_DISPLAY_P3 = 6,   COLOR_GAMUT_BT2020 = 7, COLOR_GAMUT_BT2100_PQ = 8, COLOR_GAMUT_BT2100_HLG = 9, COLOR_GAMUT_DISPLAY_BT2020 = 10 } | 色域类型枚举值。 | -| [GamutMap](#gamutmap){ GAMUT_MAP_CONSTANT = 0, GAMUT_MAP_EXPANSION = 1, GAMUT_MAP_HDR_CONSTANT = 2, GAMUT_MAP_HDR_EXPANSION = 3 } | 枚举色域的映射类型。 | -| [ColorDataSpace](#colordataspace){  COLOR_DATA_SPACE_UNKNOWN = 0, GAMUT_BT601 = 0x00000001, GAMUT_BT709 = 0x00000002, GAMUT_DCI_P3 = 0x00000003,   GAMUT_SRGB = 0x00000004, GAMUT_ADOBE_RGB = 0x00000005, GAMUT_DISPLAY_P3 = 0x00000006, GAMUT_BT2020 = 0x00000007,   GAMUT_BT2100_PQ = 0x00000008, GAMUT_BT2100_HLG = 0x00000009, GAMUT_DISPLAY_BT2020 = 0x0000000a, TRANSFORM_FUNC_UNSPECIFIED = 0x00000100,   TRANSFORM_FUNC_LINEAR = 0x00000200, TRANSFORM_FUNC_SRGB = 0x00000300, TRANSFORM_FUNC_SMPTE_170M = 0x00000400, TRANSFORM_FUNC_GM2_2 = 0x00000500,   TRANSFORM_FUNC_GM2_6 = 0x00000600, TRANSFORM_FUNC_GM2_8 = 0x00000700, TRANSFORM_FUNC_ST2084 = 0x00000800, TRANSFORM_FUNC_HLG = 0x00000900,   PRECISION_UNSPECIFIED = 0x00010000, PRECISION_FULL = 0x00020000, PRESION_LIMITED = 0x00030000, PRESION_EXTENDED = 0x00040000,   BT601_SMPTE170M_FULL = GAMUT_BT601 \| TRANSFORM_FUNC_SMPTE_170M \| PRECISION_FULL, BT601_SMPTE170M_LIMITED = GAMUT_BT601 \| TRANSFORM_FUNC_SMPTE_170M \| PRESION_LIMITED, BT709_LINEAR_FULL = GAMUT_BT709 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL, BT709_LINEAR_EXTENDED = GAMUT_BT709 \| TRANSFORM_FUNC_LINEAR \| PRESION_EXTENDED,   BT709_SRGB_FULL = GAMUT_BT709 \| TRANSFORM_FUNC_SRGB \| PRECISION_FULL, BT709_SRGB_EXTENDED = GAMUT_BT709 \| TRANSFORM_FUNC_SRGB \| PRESION_EXTENDED, BT709_SMPTE170M_LIMITED = GAMUT_BT709 \| TRANSFORM_FUNC_SMPTE_170M \| PRESION_LIMITED, DCI_P3_LINEAR_FULL = GAMUT_DCI_P3 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL,   DCI_P3_GAMMA26_FULL = GAMUT_DCI_P3 \| TRANSFORM_FUNC_GM2_6 \| PRECISION_FULL, DISPLAY_P3_LINEAR_FULL = GAMUT_DISPLAY_P3 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL, DCI_P3_SRGB_FULL = GAMUT_DCI_P3 \| TRANSFORM_FUNC_SRGB \| PRECISION_FULL, ADOBE_RGB_GAMMA22_FULL = GAMUT_ADOBE_RGB \| TRANSFORM_FUNC_GM2_2 \| PRECISION_FULL,   BT2020_LINEAR_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL, BT2020_SRGB_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_SRGB \| PRECISION_FULL, BT2020_SMPTE170M_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_SMPTE_170M \| PRECISION_FULL, BT2020_ST2084_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_ST2084 \| PRECISION_FULL,   BT2020_HLG_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_HLG \| PRECISION_FULL, BT2020_ST2084_LIMITED = GAMUT_BT2020 \| TRANSFORM_FUNC_ST2084 \| PRESION_LIMITED } | 枚举颜色空间的类型。 | -| [HDRFormat](#hdrformat){ NOT_SUPPORT_HDR = 0, DOLBY_VISION = 1, HDR10 = 2, HLG = 3,   HDR10_PLUS = 4, HDR_VIVID = 5 } | 枚举HDR格式。 | -| [HDRMetadataKey](#hdrmetadatakey){  MATAKEY_RED_PRIMARY_X = 0, MATAKEY_RED_PRIMARY_Y = 1, MATAKEY_GREEN_PRIMARY_X = 2, MATAKEY_GREEN_PRIMARY_Y = 3,   MATAKEY_BLUE_PRIMARY_X = 4, MATAKEY_BLUE_PRIMARY_Y = 5, MATAKEY_WHITE_PRIMARY_X = 6, MATAKEY_WHITE_PRIMARY_Y = 7,   MATAKEY_MAX_LUMINANCE = 8, MATAKEY_MIN_LUMINANCE = 9, MATAKEY_MAX_CONTENT_LIGHT_LEVEL = 10, MATAKEY_MAX_FRAME_AVERAGE_LIGHT_LEVEL = 11,   MATAKEY_HDR10_PLUS = 12, MATAKEY_HDR_VIVID = 13 } | 枚举HDR元数据关键字。 | -| [PresentTimestampType](#presenttimestamptype){ HARDWARE_DISPLAY_PTS_UNSUPPORTED = 0, HARDWARE_DISPLAY_PTS_DELAY = 1 << 0, HARDWARE_DISPLAY_PTS_TIMESTAMP = 1 << 1 } | 上屏时间戳类型枚举值。 | -| [VGUPathDataType](#vgupathdatatype){ VGU_DATA_TYPE_S16 = 0, VGU_DATA_TYPE_S32, VGU_DATA_TYPE_F32 } | 路径坐标数据类型。 | -| [VGUCapability](#vgucapability){ VGU_CAP_BLIT = (1 << 0), VGU_CAP_BLIT_NUM = (1 << 1), VGU_CAP_PATH = (1 << 2), VGU_CAP_FILTER_BLUR = (1 << 3) } | 硬件加速能力。 | -| [VGUResult](#vguresult){   VGU_SUCCESS = 0, VGU_NO_SUPPORT = -1, VGU_OPERATION_FAILED = -2, VGU_OUT_OF_MEMORY = -3,   VGU_TIMEOUT = -4, VGU_INVALID_PARAMETER = -5, VGU_BUSY = -6, VGU_NO_CONTEXT = -7 } | 错误码定义。 | -| [VGULineCap](#vgulinecap){ VGU_LINECAP_BUTT = 0, VGU_LINECAP_ROUND, VGU_LINECAP_SQUARE } | 线帽。 | -| [VGUJointType](#vgujointtype){ VGU_LINE_JOIN_MITER = 0, VGU_LINE_JOIN_ROUND, VGU_LINE_JOIN_BEVEL, VGU_LINE_JOIN_BUTT } | 联接类型。 | -| [VGUFilter](#vgufilter){ VGU_FILTER_BILINEAR = 0, VGU_FILTER_NEAREST, VGU_FILTER_LINEAR, VGU_FILTER_BUTT } | 图像滤波类型。 | -| [VGUFillRule](#vgufillrule){ VGU_RULE_WINDING = 0, VGU_RULE_EVEN_ODD, VGU_RULE_BUTT } | 填充规则定义。 | -| [VGUFillSpread](#vgufillspread){ VGU_SPREAD_PAD = 0, VGU_SPREAD_REFLECT, VGU_SPREAD_REPEAT, VGU_SPREAD_BUTT } | 渐变填充区域外的延展类型。 | -| [VGUWrapType](#vguwraptype){ VGU_WRAP_REFLECT = 0, VGU_WRAP_REPEAT, VGU_WRAP_BUTT } | 图像模式填充延展类型。 | -| [VGUPathCmd](#vgupathcmd){   VGU_PATH_CMD_CLOSE = 0, VGU_PATH_CMD_MOVE, VGU_PATH_CMD_LINE, VGU_PATH_CMD_HLINE,   VGU_PATH_CMD_VLINE, VGU_PATH_CMD_QUAD, VGU_PATH_CMD_CUBIC, VGU_PATH_CMD_SQUAD,   VGU_PATH_CMD_SCUBIC, VGU_PATH_CMD_BUTT } | 路径绘制指令类型。 | -| [VGUTransformType](#vgutransformtype){ VGU_TRANSFORM_TRANSLATE = (1 << 0), VGU_TRANSFORM_SCALE = (1 << 1), VGU_TRANSFORM_ROTATE_90 = (1 << 2), VGU_TRANSFORM_ROTATE_180 = (1 << 3),   VGU_TRANSFORM_ROTATE_270 = (1 << 4), VGU_TRANSFORM_OTHER = (1 << 16) } | 变换类型。 | -| [VGUClipType](#vgucliptype){ VGU_CLIP_RECT = 0, VGU_CLIP_PATH, VGU_CLIP_BUTT } | 绘制表面剪切类型。 | -| [VGUGradientType](#vgugradienttype){ VGU_GRADIENT_LINEAR = 0, VGU_GRADIENT_RADIAL, VGU_GRADIENT_CONIC, VGU_GRADIENT_BUTT } | 渐变类型。 | -| [VGUPaintType](#vgupainttype){ VGU_PAINT_SOLID = 0, VGU_PAINT_GRADIENT, VGU_PAINT_PATTERN, VGU_PAINT_BUTT } | 渲染对象。 | +| [MirrorType](#mirrortype) { MIRROR_NONE = 0, MIRROR_LR, MIRROR_TB, MIRROR_BUTT } | 硬件加速支持的镜像操作类型定义 | +| [Connection](#connection) { CON_INVALID = 0, CONNECTED, DISCONNECTED } | 热插拔连接类型定义 | +| [InterfaceType](#interfacetype) { DISP_INTF_HDMI = 0, DISP_INTF_LCD, DISP_INTF_BT1120, DISP_INTF_BT656,   DISP_INTF_YPBPR, DISP_INTF_RGB, DISP_INTF_CVBS, DISP_INTF_SVIDEO,   DISP_INTF_VGA, DISP_INTF_MIPI, DISP_INTF_PANEL, DISP_INTF_BUTT } | 枚举接口类型。 | +| [DispPowerStatus](#disppowerstatus) { POWER_STATUS_ON, POWER_STATUS_STANDBY, POWER_STATUS_SUSPEND, POWER_STATUS_OFF,   POWER_STATUS_BUTT } | 枚举显示状态 | +| [CompositionType](#compositiontype) { COMPOSITION_CLIENT, COMPOSITION_DEVICE, COMPOSITION_CURSOR, COMPOSITION_VIDEO,   COMPOSITION_DEVICE_CLEAR, COMPOSITION_CLIENT_CLEAR, COMPOSITION_TUNNEL, COMPOSITION_BUTT } | 枚举特殊层的组合类型。 | +| [ColorGamut](#colorgamut) { COLOR_GAMUT_INVALID = -1, COLOR_GAMUT_NATIVE = 0, COLOR_GAMUT_SATNDARD_BT601 = 1, COLOR_GAMUT_STANDARD_BT709 = 2,   COLOR_GAMUT_DCI_P3 = 3, COLOR_GAMUT_SRGB = 4, COLOR_GAMUT_ADOBE_RGB = 5, COLOR_GAMUT_DISPLAY_P3 = 6,   COLOR_GAMUT_BT2020 = 7, COLOR_GAMUT_BT2100_PQ = 8, COLOR_GAMUT_BT2100_HLG = 9, COLOR_GAMUT_DISPLAY_BT2020 = 10 } | 色域类型枚举值 | +| [GamutMap](#gamutmap) { GAMUT_MAP_CONSTANT = 0, GAMUT_MAP_EXPANSION = 1, GAMUT_MAP_HDR_CONSTANT = 2, GAMUT_MAP_HDR_EXPANSION = 3 } | 枚举色域的映射类型 | +| [ColorDataSpace](#colordataspace) { COLOR_DATA_SPACE_UNKNOWN = 0, GAMUT_BT601 = 0x00000001, GAMUT_BT709 = 0x00000002, GAMUT_DCI_P3 = 0x00000003,   GAMUT_SRGB = 0x00000004, GAMUT_ADOBE_RGB = 0x00000005, GAMUT_DISPLAY_P3 = 0x00000006, GAMUT_BT2020 = 0x00000007,   GAMUT_BT2100_PQ = 0x00000008, GAMUT_BT2100_HLG = 0x00000009, GAMUT_DISPLAY_BT2020 = 0x0000000a, TRANSFORM_FUNC_UNSPECIFIED = 0x00000100,   TRANSFORM_FUNC_LINEAR = 0x00000200, TRANSFORM_FUNC_SRGB = 0x00000300, TRANSFORM_FUNC_SMPTE_170M = 0x00000400, TRANSFORM_FUNC_GM2_2 = 0x00000500,   TRANSFORM_FUNC_GM2_6 = 0x00000600, TRANSFORM_FUNC_GM2_8 = 0x00000700, TRANSFORM_FUNC_ST2084 = 0x00000800, TRANSFORM_FUNC_HLG = 0x00000900,   PRECISION_UNSPECIFIED = 0x00010000, PRECISION_FULL = 0x00020000, PRESION_LIMITED = 0x00030000, PRESION_EXTENDED = 0x00040000,   BT601_SMPTE170M_FULL = GAMUT_BT601 \| TRANSFORM_FUNC_SMPTE_170M \| PRECISION_FULL, BT601_SMPTE170M_LIMITED = GAMUT_BT601 \| TRANSFORM_FUNC_SMPTE_170M \| PRESION_LIMITED, BT709_LINEAR_FULL = GAMUT_BT709 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL, BT709_LINEAR_EXTENDED = GAMUT_BT709 \| TRANSFORM_FUNC_LINEAR \| PRESION_EXTENDED,   BT709_SRGB_FULL = GAMUT_BT709 \| TRANSFORM_FUNC_SRGB \| PRECISION_FULL, BT709_SRGB_EXTENDED = GAMUT_BT709 \| TRANSFORM_FUNC_SRGB \| PRESION_EXTENDED, BT709_SMPTE170M_LIMITED = GAMUT_BT709 \| TRANSFORM_FUNC_SMPTE_170M \| PRESION_LIMITED, DCI_P3_LINEAR_FULL = GAMUT_DCI_P3 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL,   DCI_P3_GAMMA26_FULL = GAMUT_DCI_P3 \| TRANSFORM_FUNC_GM2_6 \| PRECISION_FULL, DISPLAY_P3_LINEAR_FULL = GAMUT_DISPLAY_P3 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL, DCI_P3_SRGB_FULL = GAMUT_DCI_P3 \| TRANSFORM_FUNC_SRGB \| PRECISION_FULL, ADOBE_RGB_GAMMA22_FULL = GAMUT_ADOBE_RGB \| TRANSFORM_FUNC_GM2_2 \| PRECISION_FULL,   BT2020_LINEAR_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL, BT2020_SRGB_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_SRGB \| PRECISION_FULL, BT2020_SMPTE170M_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_SMPTE_170M \| PRECISION_FULL, BT2020_ST2084_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_ST2084 \| PRECISION_FULL,   BT2020_HLG_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_HLG \| PRECISION_FULL, BT2020_ST2084_LIMITED = GAMUT_BT2020 \| TRANSFORM_FUNC_ST2084 \| PRESION_LIMITED } | 枚举颜色空间的类型 | +| [HDRFormat](#hdrformat) { NOT_SUPPORT_HDR = 0, DOLBY_VISION = 1, HDR10 = 2, HLG = 3,   HDR10_PLUS = 4, HDR_VIVID = 5 } | 枚举HDR格式 | +| [HDRMetadataKey](#hdrmetadatakey) { MATAKEY_RED_PRIMARY_X = 0, MATAKEY_RED_PRIMARY_Y = 1, MATAKEY_GREEN_PRIMARY_X = 2, MATAKEY_GREEN_PRIMARY_Y = 3,   MATAKEY_BLUE_PRIMARY_X = 4, MATAKEY_BLUE_PRIMARY_Y = 5, MATAKEY_WHITE_PRIMARY_X = 6, MATAKEY_WHITE_PRIMARY_Y = 7,   MATAKEY_MAX_LUMINANCE = 8, MATAKEY_MIN_LUMINANCE = 9, MATAKEY_MAX_CONTENT_LIGHT_LEVEL = 10, MATAKEY_MAX_FRAME_AVERAGE_LIGHT_LEVEL = 11,   MATAKEY_HDR10_PLUS = 12, MATAKEY_HDR_VIVID = 13 } | 枚举HDR元数据关键字 | +| [PresentTimestampType](#presenttimestamptype) { HARDWARE_DISPLAY_PTS_UNSUPPORTED = 0, HARDWARE_DISPLAY_PTS_DELAY = 1 << 0, HARDWARE_DISPLAY_PTS_TIMESTAMP = 1 << 1 } | 上屏时间戳类型枚举值 | +| [VGUPathDataType](#vgupathdatatype) { VGU_DATA_TYPE_S16 = 0, VGU_DATA_TYPE_S32, VGU_DATA_TYPE_F32 } | 路径坐标数据类型。 | +| [VGUCapability](#vgucapability) { VGU_CAP_BLIT = (1 << 0), VGU_CAP_BLIT_NUM = (1 << 1), VGU_CAP_PATH = (1 << 2), VGU_CAP_FILTER_BLUR = (1 << 3) } | 硬件加速能力。 | +| [VGUResult](#vguresult) { VGU_SUCCESS = 0, VGU_NO_SUPPORT = -1, VGU_OPERATION_FAILED = -2, VGU_OUT_OF_MEMORY = -3,   VGU_TIMEOUT = -4, VGU_INVALID_PARAMETER = -5, VGU_BUSY = -6, VGU_NO_CONTEXT = -7 } | 错误码定义。 | +| [VGULineCap](#vgulinecap) { VGU_LINECAP_BUTT = 0, VGU_LINECAP_ROUND, VGU_LINECAP_SQUARE } | 线帽。 | +| [VGUJointType](#vgujointtype) { VGU_LINE_JOIN_MITER = 0, VGU_LINE_JOIN_ROUND, VGU_LINE_JOIN_BEVEL, VGU_LINE_JOIN_BUTT } | 联接类型。 | +| [VGUFilter](#vgufilter) { VGU_FILTER_BILINEAR = 0, VGU_FILTER_NEAREST, VGU_FILTER_LINEAR, VGU_FILTER_BUTT } | 图像滤波类型。 | +| [VGUFillRule](#vgufillrule) { VGU_RULE_WINDING = 0, VGU_RULE_EVEN_ODD, VGU_RULE_BUTT } | 填充规则定义。 | +| [VGUFillSpread](#vgufillspread) { VGU_SPREAD_PAD = 0, VGU_SPREAD_REFLECT, VGU_SPREAD_REPEAT, VGU_SPREAD_BUTT } | 渐变填充区域外的延展类型。 | +| [VGUWrapType](#vguwraptype) { VGU_WRAP_REFLECT = 0, VGU_WRAP_REPEAT, VGU_WRAP_BUTT } | 图像模式填充延展类型。 | +| [VGUPathCmd](#vgupathcmd) { VGU_PATH_CMD_CLOSE = 0, VGU_PATH_CMD_MOVE, VGU_PATH_CMD_LINE, VGU_PATH_CMD_HLINE,   VGU_PATH_CMD_VLINE, VGU_PATH_CMD_QUAD, VGU_PATH_CMD_CUBIC, VGU_PATH_CMD_SQUAD,   VGU_PATH_CMD_SCUBIC, VGU_PATH_CMD_BUTT } | 路径绘制指令类型。 | +| [VGUTransformType](#vgutransformtype) { VGU_TRANSFORM_TRANSLATE = (1 << 0), VGU_TRANSFORM_SCALE = (1 << 1), VGU_TRANSFORM_ROTATE_90 = (1 << 2), VGU_TRANSFORM_ROTATE_180 = (1 << 3),   VGU_TRANSFORM_ROTATE_270 = (1 << 4), VGU_TRANSFORM_OTHER = (1 << 16) } | 变换类型。 | +| [VGUClipType](#vgucliptype) { VGU_CLIP_RECT = 0, VGU_CLIP_PATH, VGU_CLIP_BUTT } | 绘制表面剪切类型。 | +| [VGUGradientType](#vgugradienttype) { VGU_GRADIENT_LINEAR = 0, VGU_GRADIENT_RADIAL, VGU_GRADIENT_CONIC, VGU_GRADIENT_BUTT } | 渐变类型。 | +| [VGUPaintType](#vgupainttype) { VGU_PAINT_SOLID = 0, VGU_PAINT_GRADIENT, VGU_PAINT_PATTERN, VGU_PAINT_BUTT } | 渲染对象 | ### 函数 | 名称 | 描述 | | -------- | -------- | -| [DeviceInitialize](#deviceinitialize)(DeviceFuncs \*\*funcs) | 实现显示设备控制接口的初始化,申请操作显示设备控制接口的资源,并获取对应的操作接口。 | -| [DeviceUninitialize](#deviceuninitialize)(DeviceFuncs \*funcs) | 取消显示设备控制接口的初始化,释放控制接口使用到的资源。 | -| [GfxInitialize](#gfxinitialize)(GfxFuncs \*\*funcs) | 获取硬件加速相关的操作接口指针。 | -| [GfxUninitialize](#gfxuninitialize)(GfxFuncs \*funcs) | 释放硬件加速相关的操作接口指针。 | -| [GrallocInitialize](#grallocinitialize)(GrallocFuncs \*\*funcs) | 初始化内存模块,并获取内存提供的操作接口。 | -| [GrallocUninitialize](#grallocuninitialize)(GrallocFuncs \*funcs) | 取消初始化内存模块,并释放内存操作接口指针。 | -| [LayerInitialize](#layerinitialize)(LayerFuncs \*\*funcs) | 实现图层初始化功能,申请图层使用的资源,并获取图层提供的操作接口。 | -| [LayerUninitialize](#layeruninitialize)(LayerFuncs \*funcs) | 取消图层初始化功能,释放图层使用到的资源,并释放图层操作接口指针。 | -| [VGUPathInit](#vgupathinit)(VGUPath \*path, VGUPathDataType type, const uint8_t \*segments, int numSegments, const uint8_t \*data, bool enAlias, VGURect boundBox) | 初始化路径对象。 | -| [VGUPathAppend](#vgupathappend)(VGUPath \*path, const VGUPath \*subpath) | 添加子路径到当前路径中。 | -| [VGUPathClear](#vgupathclear)(VGUPath \*path) | 清除路径对象内存。 | -| [VGUMatrixIdentity](#vgumatrixidentity)(VGUMatrix3 \*matrix) | 初始化矩阵对象为单位矩阵。 | -| [VGUMatrixScale](#vgumatrixscale)(VGUMatrix3 \*matrix, float xScale, float yScale) | 矩阵变换缩放。 | -| [VGUMatrixRotate](#vgumatrixrotate)(VGUMatrix3 \*matrix, float degree) | 矩阵变换旋转。 | -| [VGUMatrixTranslate](#vgumatrixtranslate)(VGUMatrix3 \*matrix, float x, float y) | 矩阵变换平移。 | -| [VGUGradientColorStop](#vgugradientcolorstop)(VGUGradient \*gradient, const VGUColorStop \*colorStop, uint32_t count) | 对渐变添加ColorStop。 | -| [VGUGradientClearStop](#vgugradientclearstop)(VGUGradient \*gradient) | 清除ColorStop。 | -| [VGUGradientMatrix](#vgugradientmatrix)(VGUGradient \*gradient, const VGUMatrix3 \*matrix) | 设置渐变对象的变换矩阵。 | -| [VGUGradientLinear](#vgugradientlinear)(VGUGradient \*gradient, const VGUPoint \*p1, const VGUPoint \*p2) | 创建线性渐变对象。 | -| [VGUGradientRadial](#vgugradientradial)(VGUGradient \*gradient, const VGUPoint \*p1, VGUScalar r1, const VGUPoint \*p2, VGUScalar r2) | 创建辐射渐变对象 | -| [VGUGradientConic](#vgugradientconic)(VGUGradient \*gradient, VGUScalar cx, VGUScalar cy) | 创建圆锥渐变对象。 | -| [VGUInitialize](#vguinitialize)(VGUFuncs \*\*funcs) | 获取硬件加速相关的操作接口指针。 | -| [VGUUninitialize](#vguuninitialize)(VGUFuncs \*funcs) | 去初始化硬件加速模块,同时释放硬件加速模块操作函数指针。 | +| [DeviceInitialize](#deviceinitialize) ([DeviceFuncs](_device_funcs.md) \*\*funcs) | int32_t
实现显示设备控制接口的初始化,申请操作显示设备控制接口的资源,并获取对应的操作接口。 | +| [DeviceUninitialize](#deviceuninitialize) ([DeviceFuncs](_device_funcs.md) \*funcs) | int32_t
取消显示设备控制接口的初始化,释放控制接口使用到的资源。 | +| [GfxInitialize](#gfxinitialize) ([GfxFuncs](_gfx_funcs.md) \*\*funcs) | int32_t
获取硬件加速相关的操作接口指针。 | +| [GfxUninitialize](#gfxuninitialize) ([GfxFuncs](_gfx_funcs.md) \*funcs) | int32_t
释放硬件加速相关的操作接口指针。 | +| [GrallocInitialize](#grallocinitialize) ([GrallocFuncs](_gralloc_funcs.md) \*\*funcs) | int32_t
初始化内存模块,并获取内存提供的操作接口。 | +| [GrallocUninitialize](#grallocuninitialize) ([GrallocFuncs](_gralloc_funcs.md) \*funcs) | int32_t
取消初始化内存模块,并释放内存操作接口指针。 | +| [LayerInitialize](#layerinitialize) ([LayerFuncs](_layer_funcs.md) \*\*funcs) | int32_t
实现图层初始化功能,申请图层使用的资源,并获取图层提供的操作接口。 | +| [LayerUninitialize](#layeruninitialize) ([LayerFuncs](_layer_funcs.md) \*funcs) | int32_t
取消图层初始化功能,释放图层使用到的资源,并释放图层操作接口指针。 | +| [VGUPathInit](#vgupathinit) ([VGUPath](_v_g_u_path.md) \*path, [VGUPathDataType](#vgupathdatatype) type, const uint8_t \*segments, int numSegments, const uint8_t \*data, bool enAlias, [VGURect](_v_g_u_rect.md) boundBox) | [VGUResult](#vguresult)
初始化路径对象。 | +| [VGUPathAppend](#vgupathappend) ([VGUPath](_v_g_u_path.md) \*path, const [VGUPath](_v_g_u_path.md) \*subpath) | [VGUResult](#vguresult)
添加子路径到当前路径中。 | +| [VGUPathClear](#vgupathclear) ([VGUPath](_v_g_u_path.md) \*path) | [VGUResult](#vguresult)
清除路径对象内存。 | +| [VGUMatrixIdentity](#vgumatrixidentity) ([VGUMatrix3](_v_g_u_matrix3.md) \*matrix) | [VGUResult](#vguresult)
初始化矩阵对象为单位矩阵。 | +| [VGUMatrixScale](#vgumatrixscale) ([VGUMatrix3](_v_g_u_matrix3.md) \*matrix, float xScale, float yScale) | [VGUResult](#vguresult)
矩阵变换缩放。 | +| [VGUMatrixRotate](#vgumatrixrotate) ([VGUMatrix3](_v_g_u_matrix3.md) \*matrix, float degree) | [VGUResult](#vguresult)
矩阵变换旋转。 | +| [VGUMatrixTranslate](#vgumatrixtranslate) ([VGUMatrix3](_v_g_u_matrix3.md) \*matrix, float x, float y) | [VGUResult](#vguresult)
矩阵变换平移。 | +| [VGUGradientColorStop](#vgugradientcolorstop) ([VGUGradient](_v_g_u_gradient.md) \*gradient, const [VGUColorStop](_v_g_u_color_stop.md) \*colorStop, uint32_t count) | [VGUResult](#vguresult)
对渐变添加ColorStop。 | +| [VGUGradientClearStop](#vgugradientclearstop) ([VGUGradient](_v_g_u_gradient.md) \*gradient) | [VGUResult](#vguresult)
清除ColorStop。 | +| [VGUGradientMatrix](#vgugradientmatrix) ([VGUGradient](_v_g_u_gradient.md) \*gradient, const [VGUMatrix3](_v_g_u_matrix3.md) \*matrix) | [VGUResult](#vguresult)
设置渐变对象的变换矩阵。 | +| [VGUGradientLinear](#vgugradientlinear) ([VGUGradient](_v_g_u_gradient.md) \*gradient, const [VGUPoint](_v_g_u_point.md) \*p1, const [VGUPoint](_v_g_u_point.md) \*p2) | [VGUResult](#vguresult)
创建线性渐变对象。 | +| [VGUGradientRadial](#vgugradientradial) ([VGUGradient](_v_g_u_gradient.md) \*gradient, const [VGUPoint](_v_g_u_point.md) \*p1, [VGUScalar](#vguscalar) r1, const [VGUPoint](_v_g_u_point.md) \*p2, [VGUScalar](#vguscalar) r2) | [VGUResult](#vguresult)
创建辐射渐变对象 | +| [VGUGradientConic](#vgugradientconic) ([VGUGradient](_v_g_u_gradient.md) \*gradient, [VGUScalar](#vguscalar) cx, [VGUScalar](#vguscalar) cy) | [VGUResult](#vguresult)
创建圆锥渐变对象。 | +| [VGUInitialize](#vguinitialize) ([VGUFuncs](_v_g_u_funcs.md) \*\*funcs) | [VGUResult](#vguresult)
获取硬件加速相关的操作接口指针。 | +| [VGUUninitialize](#vguuninitialize) ([VGUFuncs](_v_g_u_funcs.md) \*funcs) | [VGUResult](#vguresult)
去初始化硬件加速模块,同时释放硬件加速模块操作函数指针。 | ### 变量 | 名称 | 描述 | | -------- | -------- | -| ([DeviceFuncs::RegHotPlugCallback](#reghotplugcallback) )(HotPlugCallback callback, void \*data) | 注册热插拔事件回调。 | -| ([DeviceFuncs::RegDisplayVBlankCallback](#regdisplayvblankcallback) )(uint32_t devId, VBlankCallback callback, void \*data) | 注册VBlank事件回调。 | -| ([DeviceFuncs::RegDisplayRefreshCallback](#regdisplayrefreshcallback) )(uint32_t devId, RefreshCallback callback, void \*data) | 刷新请求回调。 | -| ([DeviceFuncs::GetDisplayCapability](#getdisplaycapability) )(uint32_t devId, DisplayCapability \*info) | 获取显示设备能力集。 | -| ([DeviceFuncs::GetDisplaySupportedModes](#getdisplaysupportedmodes) )(uint32_t devId, uint32_t \*num, DisplayModeInfo \*modes) | 获取显示设备支持的显示模式信息。 | -| ([DeviceFuncs::GetDisplayMode](#getdisplaymode) )(uint32_t devId, uint32_t \*modeId) | 获取显示设备当前的显示模式。 | -| ([DeviceFuncs::SetDisplayMode](#setdisplaymode) )(uint32_t devId, uint32_t modeId) | 设置显示设备的显示模式。 | -| ([DeviceFuncs::GetDisplayPowerStatus](#getdisplaypowerstatus) )(uint32_t devId, DispPowerStatus \*status) | 获取显示设备当前的电源状态。 | -| ([DeviceFuncs::SetDisplayPowerStatus](#setdisplaypowerstatus) )(uint32_t devId, DispPowerStatus status) | 设置显示设备当前的电源状态。 | -| ([DeviceFuncs::GetDisplayBacklight](#getdisplaybacklight) )(uint32_t devId, uint32_t \*level) | 获取显示设备当前的背光值。 | -| ([DeviceFuncs::SetDisplayBacklight](#setdisplaybacklight) )(uint32_t devId, uint32_t level) | 设置显示设备当前的背光值。 | -| ([DeviceFuncs::GetDisplayProperty](#getdisplayproperty) )(uint32_t devId, uint32_t id, uint64_t \*value) | 获取显示设备属性值。 | -| ([DeviceFuncs::SetDisplayProperty](#setdisplayproperty) )(uint32_t devId, uint32_t id, uint64_t value) | 设置显示设备属性值。 | -| ([DeviceFuncs::PrepareDisplayLayers](#preparedisplaylayers) )(uint32_t devId, bool \*needFlushFb) | 显示设备合成前准备。 | -| ([DeviceFuncs::GetDisplayCompChange](#getdisplaycompchange) )(uint32_t devId, uint32_t \*num, uint32_t \*Layers, int32_t \*type) | 获取显示设备合成类型有变化的layer。 | -| ([DeviceFuncs::SetDisplayClientCrop](#setdisplayclientcrop) )(uint32_t devId, IRect \*rect) | 设置显示设备的裁剪区域。 | -| ([DeviceFuncs::SetDisplayClientDestRect](#setdisplayclientdestrect) )(uint32_t devId, IRect \*rect) | 设置显示设备的显示区域。 | -| ([DeviceFuncs::SetDisplayClientBuffer](#setdisplayclientbuffer) )(uint32_t devId, const BufferHandle \*buffer, int32_t fence) | 设置显示设备的显示缓存。 | -| ([DeviceFuncs::SetDisplayClientDamage](#setdisplayclientdamage) )(uint32_t devId, uint32_t num, IRect \*rect) | 设置显示设备的显示脏区。 | -| ([DeviceFuncs::SetDisplayVsyncEnabled](#setdisplayvsyncenabled) )(uint32_t devId, bool enabled) | 使能垂直同步信号。 | -| ([DeviceFuncs::GetDisplayReleaseFence](#getdisplayreleasefence) )(uint32_t devId, uint32_t \*num, uint32_t \*layers, int32_t \*fences) | 获取显示图层fence。 | -| ([DeviceFuncs::GetDisplaySupportedColorGamuts](#getdisplaysupportedcolorgamuts) )(uint32_t devId, uint32_t \*num, ColorGamut \*gamuts) | 获取显示设备支持的色域信息。 | -| ([DeviceFuncs::GetDisplayColorGamut](#getdisplaycolorgamut) )(uint32_t devId, ColorGamut \*gamut) | 获取显示设备当前的色域模式。 | -| ([DeviceFuncs::SetDisplayColorGamut](#setdisplaycolorgamut) )(uint32_t devId, ColorGamut gamut) | 设置显示设备当前的色域模式。 | -| ([DeviceFuncs::GetDisplayGamutMap](#getdisplaygamutmap) )(uint32_t devId, GamutMap \*gamutMap) | 获取显示设备当前的色域映射模式。 | -| ([DeviceFuncs::SetDisplayGamutMap](#setdisplaygamutmap) )(uint32_t devId, GamutMap gamutMap) | 设置显示设备当前的色域映射模式。 | -| ([DeviceFuncs::SetDisplayColorTransform](#setdisplaycolortransform) )(uint32_t devId, const float \*matrix) | 设置显示设备当前的4x4的颜色转换矩阵。 | -| ([DeviceFuncs::GetHDRCapabilityInfos](#gethdrcapabilityinfos) )(uint32_t devId, HDRCapability \*info) | 获取显示设备支持的HDR属性信息。 | -| ([DeviceFuncs::GetSupportedMetadataKey](#getsupportedmetadatakey) )(uint32_t devId, uint32_t \*num, DisplayInfo::widthHDRMetadataKey \*keys) | 获取显示设备支持的 HDRMetadataKey。 | -| ([DeviceFuncs::Commit](#commit) )(uint32_t devId, int32_t \*fence) | 提交合成送显请求。 | -| ([DeviceFuncs::InvokeDisplayCmd](#invokedisplaycmd) )(uint32_t devId,...) | 调用显示设备命令。 | -| ([DeviceFuncs::CreateVirtualDisplay](#createvirtualdisplay) )(uint32_t width, uint32_t height, int32_t \*format, uint32_t \*devId) | 创建虚拟显示设备。 | -| ([DeviceFuncs::DestroyVirtualDisplay](#destroyvirtualdisplay) )(uint32_t devId) | 销毁虚拟显示设备。 | -| ([DeviceFuncs::SetVirtualDisplayBuffer](#setvirtualdisplaybuffer) )(uint32_t devId, BufferHandle \*buffer, int32_t fence) | 设置虚拟屏的输出缓存。 | -| ([DeviceFuncs::GetWriteBackFrame](#getwritebackframe) )(uint32_t devId, BufferHandle \*buffer, int32_t \*fence) | 获取显示设备的回写帧。 | -| [DisplayInfo::width](#width-19) | 显示屏宽度 | -| [DisplayInfo::height](#height-18) | 显示屏高度 | -| [DisplayInfo::rotAngle](#rotangle) | 显示屏旋转角度 | -| [LayerInfo::width](#width-29) | 图层宽度 | -| [LayerInfo::height](#height-28) | 图层高度 | -| [LayerInfo::type](#type-17) | 图层类型,包括图形层、视频层和媒体播放模式。 | -| [LayerInfo::bpp](#bpp) | 每像素所占bit数 | -| [LayerInfo::pixFormat](#pixformat-12) | 图层像素格式 | -| [LayerAlpha::enGlobalAlpha](#englobalalpha-12) | 全局Alpha使能标志 | -| [LayerAlpha::enPixelAlpha](#enpixelalpha-12) | 像素Alpha使能标志 | -| [LayerAlpha::alpha0](#alpha0-12) | Alpha0值,取值范围:[0, 255] | -| [LayerAlpha::alpha1](#alpha1-12) | Alpha1值,取值范围:[0, 255] | -| [LayerAlpha::gAlpha](#galpha) | 全局alpha值,取值范围:[0, 255] | -| [BufferData::phyAddr](#phyaddr-13) | 物理内存地址 | -| [BufferData::virAddr](#viraddr-12) | 虚拟内存地址 | -| [LayerBuffer::fenceId](#fenceid) | buffer 的fence号 | -| [LayerBuffer::width](#width-39) | buffer宽度 | -| [LayerBuffer::height](#height-38) | buffer高度 | -| [LayerBuffer::pitch](#pitch) | 一行数据所占字节数 | -| [LayerBuffer::pixFormat](#pixformat-22) | buffer像素格式 | -| [LayerBuffer::data](#data-12) | 图层buffer数据 | -| [LayerBuffer::hdl](#hdl) | 图层buffer句柄 | -| [IRect::x](#x-14) | 矩形框起始x坐标 | -| [IRect::y](#y-14) | 矩形框起始y坐标 | -| [IRect::w](#w-12) | 矩形框宽度 | -| [IRect::h](#h-12) | 矩形框高度 | -| [ISurface::phyAddr](#phyaddr-23) | 图像首地址 | -| [ISurface::height](#height-48) | 图像高度 | -| [ISurface::width](#width-49) | 图像宽度 | -| [ISurface::stride](#stride-12) | 图像跨度 | -| [ISurface::enColorFmt](#encolorfmt) | 图像格式 | -| [ISurface::bYCbCrClut](#bycbcrclut) | CLUT表是否位于YCbCr 空间 | -| [ISurface::bAlphaMax255](#balphamax255) | 图像Alpha最大值为255还是128 | -| [ISurface::bAlphaExt1555](#balphaext1555) | 是否使能1555的Alpha扩展 | -| [ISurface::alpha0](#alpha0-22) | Alpha0值,取值范围:[0,255] | -| [ISurface::alpha1](#alpha1-22) | Alpha1值,取值范围:[0,255] | -| [ISurface::cbcrPhyAddr](#clutphyaddr) | CbCr分量地址 | -| [ISurface::cbcrStride](#cbcrstride) | CbCr分量跨度 | -| [ISurface::clutPhyAddr](#clutphyaddr) | CLUT表首地址,用作颜色扩展或颜色校正。 | -| [ILine::x0](#x0-12) | 线条起点的x坐标 | -| [ILine::y0](#y0-12) | 线条起点的y坐标 | -| [ILine::x1](#x1-13) | 线条终点的x坐标 | -| [ILine::y1](#y1-13) | 线条终点的y坐标 | -| [ILine::color](#color-15) | 线条颜色 | -| [ICircle::x](#x-24) | 圆心x坐标 | -| [ICircle::y](#y-24) | 圆心y坐标r | -| [ICircle::r](#r) | 圆的半径 | -| [ICircle::color](#color-25) | 圆的颜色 | -| [Rectangle::rect](#rect-13) | 矩形区域 | -| [Rectangle::color](#color-35) | 矩形颜色 | -| [GfxOpt::enGlobalAlpha](#englobalalpha-22) | 全局Alpha使能位 | -| [GfxOpt::globalAlpha](#globalalpha) | 全局Alpha的值 | -| [GfxOpt::enPixelAlpha](#enpixelalpha-22) | 像素Alpha使能位 | -| [GfxOpt::blendType](#blendtype) | 混合方式 | -| [GfxOpt::colorKeyFrom](#colorkeyfrom) | 色键模式 | -| [GfxOpt::enableRop](#enablerop) | Rop功能使能位 | -| [GfxOpt::colorRopType](#colorroptype) | 颜色的Rop类型 | -| [GfxOpt::alphaRopType](#alpharoptype) | Alpha的Rop类型 | -| [GfxOpt::enableScale](#enablescale) | 缩放功能使能位 | -| [GfxOpt::rotateType](#rotatetype) | 旋转类型 | -| [GfxOpt::mirrorType](#mirrortype) | 镜像类型 | -| [PropertyObject::name](#name-12) | 属性名称 | -| [PropertyObject::propId](#propid) | 属性ID | -| [PropertyObject::value](#value-12) | 属性值 | -| [DisplayCapability::name](#name-22) | 显示设备名称 | -| [DisplayCapability::type](#type-27) | 显示屏接口类型 | -| [DisplayCapability::phyWidth](#phywidth) | 物理宽度 | -| [DisplayCapability::phyHeight](#phyheight) | 物理高度 | -| [DisplayCapability::supportLayers](#supportlayers) | 支持的图层数 | -| [DisplayCapability::virtualDispCount](#virtualdispcount) | 支持的虚拟屏数 | -| [DisplayCapability::supportWriteBack](#supportwriteback) | 是否支持回写 | -| [DisplayCapability::propertyCount](#propertycount) | 属性数组大小 | -| [DisplayCapability::props](#props) | 属性数组 | -| [DisplayModeInfo::width](#width-59) | 像素宽度 | -| [DisplayModeInfo::height](#height-58) | 像素高度 | -| [DisplayModeInfo::freshRate](#freshrate) | 刷新速率 | -| [DisplayModeInfo::id](#id) | 模式ID | -| [AllocInfo::width](#width-69) | 申请内存宽度 | -| [AllocInfo::height](#height-68) | 申请内存高度 | -| [AllocInfo::usage](#usage-12) | 申请内存的使用场景 | -| [AllocInfo::format](#format-12) | 申请内存格式 | -| [AllocInfo::expectedSize](#expectedsize) | 申请内存大小 | -| [HDRCapability::formatCount](#formatcount) | 支持的HDR格式的数量 | -| [HDRCapability::formats](#formats) | 支持的HDR格式的数组首地址 | -| [HDRCapability::maxLum](#maxlum) | 最大的光亮度luminance值 | -| [HDRCapability::maxAverageLum](#maxaveragelum) | 最大的平均光亮度luminance值 | -| [HDRCapability::minLum](#minlum) | 最小的光亮度luminance值 | -| [HDRMetaData::key](#key) | HDR元数据关键字 | -| [HDRMetaData::value](#value-22) | 关键字对应的值 | -| [VerifyAllocInfo::width](#width-79) | 分配内存的宽度 | -| [VerifyAllocInfo::height](#height-78) | 分配内存的高度 | -| [VerifyAllocInfo::usage](#usage-22) | 内存的用处 | -| [VerifyAllocInfo::format](#format-22) | 分配内存的像素格式 | -| [PresentTimestamp::type](#type-37) | 上屏时间戳类型 | -| [PresentTimestamp::time](#time) | 类型对应的值 | -| [ExtDataHandle::fd](#fd) | 句柄 fd,-1代表不支持 | -| [ExtDataHandle::reserveInts](#reserveints) | reserve数组的个数 | -| [ExtDataHandle::reserve](#reserve) [0] | reserve数组 | -| [YUVDescInfo::baseAddr](#baseaddr) | 内存的初始地址 | -| [YUVDescInfo::yOffset](#yoffset) | Y的偏移量 | -| [YUVDescInfo::uOffset](#uoffset) | U的偏移量 | -| [YUVDescInfo::vOffset](#voffset) | V的偏移量 | -| [YUVDescInfo::yStride](#ystride) | Y的stride信息 | -| [YUVDescInfo::uvStride](#uvstride) | UV的stride信息 | -| [YUVDescInfo::uvStep](#uvstep) | UV的step信息 | -| [VGUPoint::x](#x-34) | 点水平坐标 | -| [VGUPoint::y](#y-34) | 点垂直坐标 | -| [VGURect::x](#x-44) | 矩形水平起始坐标 | -| [VGURect::y](#y-44) | 矩形垂直起始坐标 | -| [VGURect::w](#w-22) | 矩形宽度 | -| [VGURect::h](#h-22) | 矩形高度 | -| [VGUPath::segment](#segment) | 存放路径命令数据 | -| [VGUPath::numSegments](#numsegments) | 路径命令总数 | -| [VGUPath::data](#data-22) | 存放路径命令对应坐标数据 | -| [VGUPath::type](#type-47) | 路径数据存储类型 | -| [VGUPath::enAlias](#enalias) | 抗锯齿开关 | -| [VGUPath::boundBox](#boundbox) | 路径最大边界 | -| [VGUMatrix3::m](#m) [3][3] | 3x3变换矩阵 | -| [VGUMatrix3::type](#type-57) | 矩阵变换类型,简单变换为缩放,平移,90度倍数旋转。 | -| [VGUBuffer::pixelFormat](#pixelformat) | 像素格式 | -| [VGUBuffer::width](#width-89) | 位图宽度 | -| [VGUBuffer::height](#height-88) | 位图高度 | -| [VGUBuffer::stride](#stride-22) | 位图stride | -| [VGUBuffer::virAddr](#viraddr-22) | 位图缓存的虚拟地址 | -| [VGUBuffer::phyAddr](#phyaddr-33) | 位图缓存的物理地址 | -| [VGUMaskLayer::buffer](#buffer-13) | 蒙版缓存 | -| [VGUMaskLayer::rect](#rect-23) | 蒙版矩形 | -| [VGUSurface::buffer](#buffer-23) | 位图缓存 | -| [VGUSurface::clipRect](#cliprect) | 矩形剪切域,如果为空,整个表面直接渲染。 | -| [VGUSurface::clipPath](#clippath) | 路径剪切域,如果为空,整个表面直接渲染。 | -| [VGUSurface::clipType](#cliptype) | 表面剪切类型 | -| [VGUSurface::mask](#mask) | 蒙版图层, 可以为空。 | -| [VGUSurface::blend](#blend) | 混合叠加模式 | -| [VGUSurface::filter](#filter) | 图像滤波类型 | -| [VGUColorStop::stop](#stop) | 颜色偏移位置, 值范围是 0.0 ~ 1.0。 | -| [VGUColorStop::color](#color-45) | 偏移位置对应颜色 | -| [VGULinear::x1](#x1-23) | 线性渐变起点水平坐标 | -| [VGULinear::y1](#y1-23) | 线性渐变起点垂直坐标 | -| [VGULinear::x2](#x2) | 线性渐变终点水平坐标 | -| [VGULinear::y2](#y2) | 线性渐变起点垂直坐标 | -| [VGURadial::x0](#x0-22) | 内圈圆心水平坐标 | -| [VGURadial::y0](#y0-22) | 内圈圆心垂直坐标 | -| [VGURadial::r0](#r0) | 内圈圆半径 | -| [VGURadial::x1](#x1-33) | 外圈圆心水平坐标 | -| [VGURadial::y1](#y1-33) | 外圈圆心垂直坐标 | -| [VGURadial::r1](#r1) | 外圈圆半径 | -| [VGUConic::cx](#cx) | 圆弧中心x坐标 | -| [VGUConic::cy](#cy) | 圆弧中心y坐标 | -| [VGUImage::buffer](#buffer-33) | 图像存储缓存 | -| [VGUImage::matrix](#matrix-12) | 图像矩阵变换,该参数为空,则内部使用单位变换矩阵。 | -| [VGUImage::rect](#rect-33) | 图像截取矩形,该参数为空,则截取整个图像。 | -| [VGUImage::opacity](#opacity-13) | 透明度,范围0~255。 | -| [VGUPattern::image](#image) | 图像对象 | -| [VGUPattern::wrapx](#wrapx) | 图像水平方向平铺类型 | -| [VGUPattern::wrapy](#wrapy) | 图像垂直方向平铺类型 | -| [VGUGradient::matrix](#matrix-22) | 针对渐变对象的变换矩阵 | -| [VGUGradient::colorStops](#colorstops) | 渐变停止颜色数组指针 | -| [VGUGradient::stopCount](#stopcount) | 渐变停止颜色个数 | -| [VGUGradient::linear](#linear) | 线性渐变对象 | -| [VGUGradient::radial](#radial) | 辐射渐变对象 | -| [VGUGradient::conic](#conic) | 圆锥渐变对象 | -| [VGUGradient::type](#type-67) | 渐变类型 | -| [VGUGradient::spread](#spread) | 渐变延伸模式 | -| [VGUGradient::opacity](#opacity-23) | 透明度,范围0~255。 | -| [VGUSolid::color](#color-55) | 颜色值 | -| [VGUSolid::opacity](#opacity-33) | 透明度. 值范围 0 ~ 255。 | -| [VGUPaintStyle::gradient](#gradient) | 渐变对象 | -| [VGUPaintStyle::pattern](#pattern) | 图片模式对象 | -| [VGUPaintStyle::solid](#solid) | 颜色对象 | -| [VGUPaintStyle::type](#type-77) | 渲染类型 | -| [VGUFillAttr::rule](#rule) | 填充规格 | -| [VGUStrokeAttr::cap](#cap) | 线帽类型 | -| [VGUStrokeAttr::join](#join) | 联结类型 | -| [VGUStrokeAttr::miterLimit](#miterlimit) | 最大斜切长度 | -| [VGUStrokeAttr::width](#width-99) | 线宽 | -| ([VGUFuncs::InitVgu](#initvgu) )(void) | 初始化硬件加速。 | -| ([VGUFuncs::DeinitVgu](#deinitvgu) )(void) | 去初始化硬件加速。 | -| ([VGUFuncs::QueryCapability](#querycapability))(uint32_t cap) | 查询硬件能力集。 | -| ([VGUFuncs::RenderFill](#renderfill))(VGUSurface \*target, const VGUPath \*path, const VGUMatrix3 \*matrix, const VGUFillAttr \*attr, const VGUPaintStyle \*style) | 使用指定的渲染对象来填充路径。 | -| ([VGUFuncs::RenderStroke](#renderstroke) )(VGUSurface \*target, const VGUPath \*path, const VGUMatrix3 \*matrix, const VGUStrokeAttr \*attr, const VGUPaintStyle \*style) | 使用指定的渲染对象来描边路径。 | -| ([VGUFuncs::RenderBlur](#renderblur) )(VGUSurface \*target, uint16_t blur) | 对目标表面进行模糊处理。 | -| ([VGUFuncs::RenderBlit](#renderblit) )(VGUSurface \*target, const VGUImage \*src, uint32_t color) | 对图像进行搬移操作。 | -| ([VGUFuncs::RenderBlitN](#renderblitn) )(VGUSurface \*target, const VGUImage \*src, uint16_t count, uint32_t color) | 对多个源图像进行叠加操作。 | -| ([VGUFuncs::RenderClearRect](#renderclearrect) )(VGUSurface \*target, const VGURect \*rect, uint32_t color, uint8_t opacity) | 对指定矩形进行颜色清除操作。 | -| ([VGUFuncs::RenderCancel](#rendercancel) )() | 取消硬件加速渲染。 | -| ([VGUFuncs::RenderSync](#rendersync) )(int32_t timeOut) | 同步硬件加速模块绘制或搬移操作。 | - - -## **宏定义说明** - - -### PROPERTY_NAME_LEN - - -``` -#define PROPERTY_NAME_LEN 50 -``` - -**描述:** - -属性名称长度 - -### HDI_VGU_SCALAR_IS_FLOAT +| (\* [DeviceFuncs::RegHotPlugCallback](#reghotplugcallback) )([HotPlugCallback](#hotplugcallback) callback, void \*data) | int32_t
注册热插拔事件回调。 | +| (\* [DeviceFuncs::RegDisplayVBlankCallback](#regdisplayvblankcallback) )(uint32_t devId, [VBlankCallback](#vblankcallback) callback, void \*data) | int32_t
注册VBlank事件回调。 | +| (\* [DeviceFuncs::RegDisplayRefreshCallback](#regdisplayrefreshcallback) )(uint32_t devId, [RefreshCallback](#refreshcallback) callback, void \*data) | int32_t
刷新请求回调。 | +| (\* [DeviceFuncs::GetDisplayCapability](#getdisplaycapability) )(uint32_t devId, [DisplayCapability](_display_capability.md) \*info) | int32_t
获取显示设备能力集。 | +| (\* [DeviceFuncs::GetDisplaySupportedModes](#getdisplaysupportedmodes) )(uint32_t devId, uint32_t \*num, [DisplayModeInfo](_display_mode_info.md) \*modes) | int32_t
获取显示设备支持的显示模式信息。 | +| (\* [DeviceFuncs::GetDisplayMode](#getdisplaymode) )(uint32_t devId, uint32_t \*modeId) | int32_t
获取显示设备当前的显示模式。 | +| (\* [DeviceFuncs::SetDisplayMode](#setdisplaymode) )(uint32_t devId, uint32_t modeId) | int32_t
设置显示设备的显示模式。 | +| (\* [DeviceFuncs::GetDisplayPowerStatus](#getdisplaypowerstatus) )(uint32_t devId, [DispPowerStatus](#disppowerstatus) \*status) | int32_t
获取显示设备当前的电源状态。 | +| (\* [DeviceFuncs::SetDisplayPowerStatus](#setdisplaypowerstatus) )(uint32_t devId, [DispPowerStatus](#disppowerstatus) status) | int32_t
设置显示设备当前的电源状态。 | +| (\* [DeviceFuncs::GetDisplayBacklight](#getdisplaybacklight) )(uint32_t devId, uint32_t \*level) | int32_t
获取显示设备当前的背光值。 | +| (\* [DeviceFuncs::SetDisplayBacklight](#setdisplaybacklight) )(uint32_t devId, uint32_t level) | int32_t
设置显示设备当前的背光值。 | +| (\* [DeviceFuncs::GetDisplayProperty](#getdisplayproperty) )(uint32_t devId, uint32_t id, uint64_t \*value) | int32_t
获取显示设备属性值。 | +| (\* [DeviceFuncs::SetDisplayProperty](#setdisplayproperty) )(uint32_t devId, uint32_t id, uint64_t value) | int32_t
设置显示设备属性值。 | +| (\* [DeviceFuncs::PrepareDisplayLayers](#preparedisplaylayers) )(uint32_t devId, bool \*needFlushFb) | int32_t
显示设备合成前准备。 | +| (\* [DeviceFuncs::GetDisplayCompChange](#getdisplaycompchange) )(uint32_t devId, uint32_t \*num, uint32_t \*Layers, int32_t \*type) | int32_t
获取显示设备合成类型有变化的layer。 | +| (\* [DeviceFuncs::SetDisplayClientCrop](#setdisplayclientcrop) )(uint32_t devId, [IRect](_i_rect.md) \*rect) | int32_t
设置显示设备的裁剪区域。 | +| (\* [DeviceFuncs::SetDisplayClientDestRect](#setdisplayclientdestrect) )(uint32_t devId, [IRect](_i_rect.md) \*rect) | int32_t
设置显示设备的显示区域。 | +| (\* [DeviceFuncs::SetDisplayClientBuffer](#setdisplayclientbuffer) )(uint32_t devId, const BufferHandle \*buffer, int32_t fence) | int32_t
设置显示设备的显示缓存。 | +| (\* [DeviceFuncs::SetDisplayClientDamage](#setdisplayclientdamage) )(uint32_t devId, uint32_t num, [IRect](_i_rect.md) \*rect) | int32_t
设置显示设备的显示脏区。 | +| (\* [DeviceFuncs::SetDisplayVsyncEnabled](#setdisplayvsyncenabled) )(uint32_t devId, bool enabled) | int32_t
使能垂直同步信号。 | +| (\* [DeviceFuncs::GetDisplayReleaseFence](#getdisplayreleasefence) )(uint32_t devId, uint32_t \*num, uint32_t \*layers, int32_t \*fences) | int32_t
获取显示图层fence。 | +| (\* [DeviceFuncs::GetDisplaySupportedColorGamuts](#getdisplaysupportedcolorgamuts) )(uint32_t devId, uint32_t \*num, [ColorGamut](#colorgamut) \*gamuts) | int32_t
获取显示设备支持的色域信息。 | +| (\* [DeviceFuncs::GetDisplayColorGamut](#getdisplaycolorgamut) )(uint32_t devId, [ColorGamut](#colorgamut) \*gamut) | int32_t
获取显示设备当前的色域模式。 | +| (\* [DeviceFuncs::SetDisplayColorGamut](#setdisplaycolorgamut) )(uint32_t devId, [ColorGamut](#colorgamut) gamut) | int32_t
设置显示设备当前的色域模式。 | +| (\* [DeviceFuncs::GetDisplayGamutMap](#getdisplaygamutmap) )(uint32_t devId, [GamutMap](#gamutmap) \*gamutMap) | int32_t
获取显示设备当前的色域映射模式。 | +| (\* [DeviceFuncs::SetDisplayGamutMap](#setdisplaygamutmap) )(uint32_t devId, [GamutMap](#gamutmap) gamutMap) | int32_t
设置显示设备当前的色域映射模式。 | +| (\* [DeviceFuncs::SetDisplayColorTransform](#setdisplaycolortransform) )(uint32_t devId, const float \*matrix) | int32_t
设置显示设备当前的4x4的颜色转换矩阵。 | +| (\* [DeviceFuncs::GetHDRCapabilityInfos](#gethdrcapabilityinfos) )(uint32_t devId, [HDRCapability](_h_d_r_capability.md) \*info) | int32_t
获取显示设备支持的HDR属性信息。 | +| (\* [DeviceFuncs::GetSupportedMetadataKey](#getsupportedmetadatakey) )(uint32_t devId, uint32_t \*num, [HDRMetadataKey](#hdrmetadatakey) \*keys) | int32_t
获取显示设备支持的HDRMetadataKey。 | +| (\* [DeviceFuncs::Commit](#commit) )(uint32_t devId, int32_t \*fence) | int32_t
提交合成送显请求。 | +| (\* [DeviceFuncs::InvokeDisplayCmd](#invokedisplaycmd) )(uint32_t devId,...) | int32_t
调用显示设备命令。 | +| (\* [DeviceFuncs::CreateVirtualDisplay](#createvirtualdisplay) )(uint32_t width, uint32_t height, int32_t \*format, uint32_t \*devId) | int32_t
创建虚拟显示设备。 | +| (\* [DeviceFuncs::DestroyVirtualDisplay](#destroyvirtualdisplay) )(uint32_t devId) | int32_t
销毁虚拟显示设备。 | +| (\* [DeviceFuncs::SetVirtualDisplayBuffer](#setvirtualdisplaybuffer) )(uint32_t devId, BufferHandle \*buffer, int32_t fence) | int32_t
设置虚拟屏的输出缓存。 | +| (\* [DeviceFuncs::GetWriteBackFrame](#getwritebackframe) )(uint32_t devId, BufferHandle \*buffer, int32_t \*fence) | int32_t
获取显示设备的回写帧。 | +| [DisplayInfo::width](#width-19) | uint32_t
显示屏宽度 | +| [DisplayInfo::height](#height-18) | uint32_t
显示屏高度 | +| [DisplayInfo::rotAngle](#rotangle) | int32_t
显示屏旋转角度 | +| [LayerInfo::width](#width-29) | int32_t
图层宽度 | +| [LayerInfo::height](#height-28) | int32_t
图层高度 | +| [LayerInfo::type](#type-17) | [LayerType](#layertype)
图层类型,包括图形层、视频层和媒体播放模式 | +| [LayerInfo::bpp](#bpp) | int32_t
每像素所占bit数 | +| [LayerInfo::pixFormat](#pixformat-12) | [PixelFormat](#pixelformat)
图层像素格式 | +| [LayerAlpha::enGlobalAlpha](#englobalalpha-12) | bool
全局alpha使能标志 | +| [LayerAlpha::enPixelAlpha](#enpixelalpha-12) | bool
像素alpha使能标志 | +| [LayerAlpha::alpha0](#alpha0-12) | uint8_t
alpha0值,取值范围:[0, 255] | +| [LayerAlpha::alpha1](#alpha1-12) | uint8_t
alpha1值,取值范围:[0, 255] | +| [LayerAlpha::gAlpha](#galpha) | uint8_t
全局alpha值,取值范围:[0, 255] | +| [BufferData::phyAddr](#phyaddr-13) | uint64_t
物理内存地址 | +| [BufferData::virAddr](#viraddr-12) | void \*
虚拟内存地址 | +| [LayerBuffer::fenceId](#fenceid) | int32_t
buffer的fence号 | +| [LayerBuffer::width](#width-39) | int32_t
buffer宽度 | +| [LayerBuffer::height](#height-38) | int32_t
buffer高度 | +| [LayerBuffer::pitch](#pitch) | int32_t
一行数据所占字节数 | +| [LayerBuffer::pixFormat](#pixformat-22) | [PixelFormat](#pixelformat)
buffer像素格式r | +| [LayerBuffer::data](#data-12) | [BufferData](_buffer_data.md)
图层buffer数据 | +| [LayerBuffer::hdl](#hdl) | BufferHandle \*
图层buffer句柄 | +| [IRect::x](#x-14) | int32_t
矩形框起始x坐标 | +| [IRect::y](#y-14) | int32_t
矩形框起始y坐标 | +| [IRect::w](#w-12) | int32_t
矩形框宽度 | +| [IRect::h](#h-12) | int32_t
矩形框高度 | +| [ISurface::phyAddr](#phyaddr-23) | uint64_t
图像首地址 | +| [ISurface::height](#height-48) | int32_t
图像高度 | +| [ISurface::width](#width-49) | int32_t
图像宽度 | +| [ISurface::stride](#stride-12) | int32_t
图像跨度 | +| [ISurface::enColorFmt](#encolorfmt) | [PixelFormat](#pixelformat)
图像格式 | +| [ISurface::bYCbCrClut](#bycbcrclut) | bool
CLUT表是否位于 YCbCr 空间 | +| [ISurface::bAlphaMax255](#balphamax255) | bool
图像alpha最大值为255还是128 | +| [ISurface::bAlphaExt1555](#balphaext1555) | bool
是否使能1555的Alpha扩展 | +| [ISurface::alpha0](#alpha0-22) | uint8_t
Alpha0值,取值范围:[0,255] | +| [ISurface::alpha1](#alpha1-22) | uint8_t
Alpha1值,取值范围:[0,255] | +| [ISurface::cbcrPhyAddr](#cbcrphyaddr) | uint64_t
CbCr分量地址 | +| [ISurface::cbcrStride](#cbcrstride) | int32_t
CbCr分量跨度 | +| [ISurface::clutPhyAddr](#clutphyaddr) | uint64_t
Clut表首地址,用作颜色扩展或颜色校正 | +| [ILine::x0](#x0-12) | int32_t
线条起点的x坐标 | +| [ILine::y0](#y0-12) | int32_t
线条起点的y坐标 | +| [ILine::x1](#x1-13) | int32_t
线条终点的x坐标 | +| [ILine::y1](#y1-13) | int32_t
线条终点的y坐标 | +| [ILine::color](#color-15) | uint32_t
线条颜色 | +| [ICircle::x](#x-24) | int32_t
圆心x坐标 | +| [ICircle::y](#y-24) | int32_t
圆心y坐标r | +| [ICircle::r](#r) | int32_t
圆的半径 | +| [ICircle::color](#color-25) | uint32_t
圆的颜色 | +| [Rectangle::rect](#rect-13) | [IRect](_i_rect.md)
矩形区域 | +| [Rectangle::color](#color-35) | uint32_t
矩形颜色 | +| [GfxOpt::enGlobalAlpha](#englobalalpha-22) | bool
全局alpha使能位 | +| [GfxOpt::globalAlpha](#globalalpha) | uint32_t
全局alpha的值 | +| [GfxOpt::enPixelAlpha](#enpixelalpha-22) | bool
像素alpha使能位 | +| [GfxOpt::blendType](#blendtype) | [BlendType](#blendtype)
混合方式 | +| [GfxOpt::colorKeyFrom](#colorkeyfrom) | [ColorKey](#colorkey)
色键模式 | +| [GfxOpt::enableRop](#enablerop) | bool
Rop功能使能位 | +| [GfxOpt::colorRopType](#colorroptype) | [RopType](#roptype)
颜色的Rop类型 | +| [GfxOpt::alphaRopType](#alpharoptype) | [RopType](#roptype)
Alpha的Rop类型 | +| [GfxOpt::enableScale](#enablescale) | bool
缩放功能使能位 | +| [GfxOpt::rotateType](#rotatetype) | [TransformType](#transformtype)
旋转类型 | +| [GfxOpt::mirrorType](#mirrortype) | [MirrorType](#mirrortype)
镜像类型 | +| [PropertyObject::name](#name-12) [[PROPERTY_NAME_LEN](#property_name_len)] | char
属性名称 | +| [PropertyObject::propId](#propid) | uint32_t
属性ID | +| [PropertyObject::value](#value-12) | uint64_t
属性值 | +| [DisplayCapability::name](#name-22) [[PROPERTY_NAME_LEN](#property_name_len)] | char
显示设备名称 | +| [DisplayCapability::type](#type-27) | [InterfaceType](#interfacetype)
显示屏接口类型 | +| [DisplayCapability::phyWidth](#phywidth) | uint32_t
物理宽度 | +| [DisplayCapability::phyHeight](#phyheight) | uint32_t
物理高度 | +| [DisplayCapability::supportLayers](#supportlayers) | uint32_t
支持的图层数 | +| [DisplayCapability::virtualDispCount](#virtualdispcount) | uint32_t
支持的虚拟屏数 | +| [DisplayCapability::supportWriteBack](#supportwriteback) | bool
是否支持回写 | +| [DisplayCapability::propertyCount](#propertycount) | uint32_t
属性数组大小 | +| [DisplayCapability::props](#props) | [PropertyObject](_property_object.md) \*
属性数组 | +| [DisplayModeInfo::width](#width-59) | int32_t
像素宽度 | +| [DisplayModeInfo::height](#height-58) | int32_t
像素高度 | +| [DisplayModeInfo::freshRate](#freshrate) | uint32_t
刷新速率 | +| [DisplayModeInfo::id](#id) | int32_t
模式ID | +| [AllocInfo::width](#width-69) | uint32_t
申请内存宽度 | +| [AllocInfo::height](#height-68) | uint32_t
申请内存高度 | +| [AllocInfo::usage](#usage-12) | uint64_t
申请内存的使用场景 | +| [AllocInfo::format](#format-12) | [PixelFormat](#pixelformat)
申请内存格式 | +| [AllocInfo::expectedSize](#expectedsize) | uint32_t
申请内存大小 | +| [HDRCapability::formatCount](#formatcount) | uint32_t
支持的HDR格式的数量 | +| [HDRCapability::formats](#formats) | [HDRFormat](#hdrformat) \*
支持的HDR格式的数组首地址 | +| [HDRCapability::maxLum](#maxlum) | float
最大的光亮度luminance值 | +| [HDRCapability::maxAverageLum](#maxaveragelum) | float
最大的平均光亮度luminance值 | +| [HDRCapability::minLum](#minlum) | float
最小的光亮度luminance值 | +| [HDRMetaData::key](#key) | [HDRMetadataKey](#hdrmetadatakey)
HDR元数据关键字 | +| [HDRMetaData::value](#value-22) | float
关键字对应的值 | +| [VerifyAllocInfo::width](#width-79) | uint32_t
分配内存的宽度 | +| [VerifyAllocInfo::height](#height-78) | uint32_t
分配内存的高度 | +| [VerifyAllocInfo::usage](#usage-22) | uint64_t
内存的用处 | +| [VerifyAllocInfo::format](#format-22) | [PixelFormat](#pixelformat)
分配内存的像素格式 | +| [PresentTimestamp::type](#type-37) | [PresentTimestampType](#presenttimestamptype)
上屏时间戳类型 | +| [PresentTimestamp::time](#time) | int64_t
类型对应的值 | +| [ExtDataHandle::fd](#fd) | int32_t
句柄 fd, -1代表不支持 | +| [ExtDataHandle::reserveInts](#reserveints) | uint32_t
reserve数组的个数 | +| [ExtDataHandle::reserve[0]](#reserve0) | int32_t
reserve数组 | +| [YUVDescInfo::baseAddr](#baseaddr) | void \*
内存的初始地址 | +| [YUVDescInfo::yOffset](#yoffset) | size_t
Y的偏移量 | +| [YUVDescInfo::uOffset](#uoffset) | size_t
U的偏移量 | +| [YUVDescInfo::vOffset](#voffset) | size_t
V的偏移量 | +| [YUVDescInfo::yStride](#ystride) | size_t
Y的stride信息 | +| [YUVDescInfo::uvStride](#uvstride) | size_t
UV的stride信息 | +| [YUVDescInfo::uvStep](#uvstep) | size_t
UV的step信息 | +| [VGUPoint::x](#x-34) | [VGUScalar](#vguscalar)
点水平坐标 | +| [VGUPoint::y](#y-34) | [VGUScalar](#vguscalar)
点垂直坐标 | +| [VGURect::x](#x-44) | [VGUScalar](#vguscalar)
矩形水平起始坐标 | +| [VGURect::y](#y-44) | [VGUScalar](#vguscalar)
矩形垂直起始坐标 | +| [VGURect::w](#w-22) | [VGUScalar](#vguscalar)
矩形宽度 | +| [VGURect::h](#h-22) | [VGUScalar](#vguscalar)
矩形高度 | +| [VGUPath::segment](#segment) | uint8_t \*
存放路径命令数据 | +| [VGUPath::numSegments](#numsegments) | int32_t
路径命令总数 | +| [VGUPath::data](#data-22) | uint8_t \*
存放路径命令对应坐标数据 | +| [VGUPath::type](#type-47) | [VGUPathDataType](#vgupathdatatype)
路径数据存储类型 | +| [VGUPath::enAlias](#enalias) | bool
抗锯齿开关 | +| [VGUPath::boundBox](#boundbox) | [VGURect](_v_g_u_rect.md)
路径最大边界 | +| [VGUMatrix3::m](#m) [3][3] | float
3x3变换矩阵 | +| [VGUMatrix3::type](#type-57) | uint32_t
矩阵变换类型,简单变换为缩放,平移,90度倍数旋转 | +| [VGUBuffer::pixelFormat](#pixelformat) | [VGUPixelFormat](#pixelformat)
像素格式 | +| [VGUBuffer::width](#width-89) | uint32_t
位图宽度 | +| [VGUBuffer::height](#height-88) | uint32_t
位图高度 | +| [VGUBuffer::stride](#stride-22) | uint32_t
位图stride | +| [VGUBuffer::virAddr](#viraddr-22) | void \*
位图缓存的虚拟地址 | +| [VGUBuffer::phyAddr](#phyaddr-33) | uint64_t
位图缓存的物理地址 | +| [VGUMaskLayer::buffer](#buffer-13) | [VGUBuffer](_v_g_u_buffer.md) \*
蒙版缓存 | +| [VGUMaskLayer::rect](#rect-23) | [VGURect](_v_g_u_rect.md) \*
蒙版矩形 | +| [VGUSurface::buffer](#buffer-23) | [VGUBuffer](_v_g_u_buffer.md) \*
位图缓存 | +| [VGUSurface::clipRect](#cliprect) | [VGURect](_v_g_u_rect.md) \*
矩形剪切域,如果为空,整个表面直接渲染。 | +| [VGUSurface::clipPath](#clippath) | [VGUPath](_v_g_u_path.md) \*
路径剪切域,如果为空,整个表面直接渲染。 | +| [VGUSurface::clipType](#cliptype) | [VGUClipType](#vgucliptype)
表面剪切类型 | +| [VGUSurface::mask](#mask) | [VGUMaskLayer](_v_g_u_mask_layer.md) \*
蒙版图层, 可以为空 | +| [VGUSurface::blend](#blend) | [VGUBlendType](#blendtype)
混合叠加模式 | +| [VGUSurface::filter](#filter) | [VGUFilter](#vgufilter)
图像滤波类型 | +| [VGUColorStop::stop](#stop) | float
颜色偏移位置,值范围是 0.0 ~ 1.0 | +| [VGUColorStop::color](#color-45) | uint32_t
偏移位置对应颜色 | +| [VGULinear::x1](#x1-23) | [VGUScalar](#vguscalar)
线性渐变起点水平坐标 | +| [VGULinear::y1](#y1-23) | [VGUScalar](#vguscalar)
线性渐变起点垂直坐标 | +| [VGULinear::x2](#x2) | [VGUScalar](#vguscalar)
线性渐变终点水平坐标 | +| [VGULinear::y2](#y2) | [VGUScalar](#vguscalar)
线性渐变终点垂直坐标 | +| [VGURadial::x0](#x0-22) | [VGUScalar](#vguscalar)
内圈圆心水平坐标 | +| [VGURadial::y0](#y0-22) | [VGUScalar](#vguscalar)
内圈圆心垂直坐标 | +| [VGURadial::r0](#r0) | [VGUScalar](#vguscalar)
内圈圆半径 | +| [VGURadial::x1](#x1-33) | [VGUScalar](#vguscalar)
外圈圆心水平坐标 | +| [VGURadial::y1](#y1-33) | [VGUScalar](#vguscalar)
外圈圆心垂直坐标 | +| [VGURadial::r1](#r1) | [VGUScalar](#vguscalar)
外圈圆半径 | +| [VGUConic::cx](#cx) | [VGUScalar](#vguscalar)
圆弧中心x坐标 | +| [VGUConic::cy](#cy) | [VGUScalar](#vguscalar)
圆弧中心y坐标 | +| [VGUImage::buffer](#buffer-33) | [VGUBuffer](_v_g_u_buffer.md) \*
图像存储缓存 | +| [VGUImage::matrix](#matrix-12) | [VGUMatrix3](_v_g_u_matrix3.md) \*
图像矩阵变换,该参数为空,则内部使用单位变换矩阵 | +| [VGUImage::rect](#rect-33) | [VGURect](_v_g_u_rect.md) \*
图像截取矩形,该参数为空,则截取整个图像 | +| [VGUImage::opacity](#opacity-13) | uint8_t
透明度,范围0~255 | +| [VGUPattern::image](#image) | [VGUImage](_v_g_u_image.md) \*
图像对象 | +| [VGUPattern::wrapx](#wrapx) | [VGUWrapType](#vguwraptype)
图像水平方向平铺类型 | +| [VGUPattern::wrapy](#wrapy) | [VGUWrapType](#vguwraptype)
图像垂直方向平铺类型 | +| [VGUGradient::matrix](#matrix-22) | [VGUMatrix3](_v_g_u_matrix3.md) \*
针对渐变对象的变换矩阵 | +| [VGUGradient::colorStops](#colorstops) | [VGUColorStop](_v_g_u_color_stop.md) \*
渐变停止颜色数组指针 | +| [VGUGradient::stopCount](#stopcount) | uint16_t
渐变停止颜色个数 | +| [VGUGradient::linear](#linear) | [VGULinear](_v_g_u_linear.md)
线性渐变对象 | +| [VGUGradient::radial](#radial) | [VGURadial](_v_g_u_radial.md)
辐射渐变对象 | +| [VGUGradient::conic](#conic) | [VGUConic](_v_g_u_conic.md)
圆锥渐变对象 | +| [VGUGradient::type](#type-67) | [VGUGradientType](#vgugradienttype)
渐变类型 | +| [VGUGradient::spread](#spread) | [VGUFillSpread](#vgufillspread)
渐变延伸模式 | +| [VGUGradient::opacity](#opacity-23) | uint8_t
透明度,范围0~255 | +| [VGUSolid::color](#color-55) | uint32_t
颜色值 | +| [VGUSolid::opacity](#opacity-33) | uint8_t
透明度. 值范围 0 ~ 255 | +| [VGUPaintStyle::gradient](#gradient) | [VGUGradient](_v_g_u_gradient.md) \*
渐变对象 | +| [VGUPaintStyle::pattern](#pattern) | [VGUPattern](_v_g_u_pattern.md) \*
图片模式对象 | +| [VGUPaintStyle::solid](#solid) | [VGUSolid](_v_g_u_solid.md) \*
颜色对象 | +| [VGUPaintStyle::type](#type-77) | [VGUPaintType](#vgupainttype)
渲染类型 | +| [VGUFillAttr::rule](#rule) | [VGUFillRule](#vgufillrule)
填充规格 | +| [VGUStrokeAttr::cap](#cap) | [VGULineCap](#vgulinecap)
线帽类型 | +| [VGUStrokeAttr::join](#join) | [VGUJointType](#vgujointtype)
联结类型 | +| [VGUStrokeAttr::miterLimit](#miterlimit) | float
最大斜切长度 | +| [VGUStrokeAttr::width](#width-99) | float
线宽 | +| (\* [VGUFuncs::InitVgu](#initvgu) )(void) | [VGUResult](#vguresult)
初始化硬件加速。 | +| (\* [VGUFuncs::DeinitVgu](#deinitvgu) )(void) | [VGUResult](#vguresult)
去初始化硬件加速。 | +| (\* [VGUFuncs::QueryCapability](#querycapability) )(uint32_t cap) | int32_t
查询硬件能力集。 | +| (\* [VGUFuncs::RenderFill](#renderfill) )([VGUSurface](_v_g_u_surface.md) \*target, const [VGUPath](_v_g_u_path.md) \*path, const [VGUMatrix3](_v_g_u_matrix3.md) \*matrix, const [VGUFillAttr](_v_g_u_fill_attr.md) \*attr, const [VGUPaintStyle](_v_g_u_paint_style.md) \*style) | [VGUResult](#vguresult)
使用指定的渲染对象来填充路径。 | +| (\* [VGUFuncs::RenderStroke](#renderstroke) )([VGUSurface](_v_g_u_surface.md) \*target, const [VGUPath](_v_g_u_path.md) \*path, const [VGUMatrix3](_v_g_u_matrix3.md) \*matrix, const [VGUStrokeAttr](_v_g_u_stroke_attr.md) \*attr, const [VGUPaintStyle](_v_g_u_paint_style.md) \*style) | [VGUResult](#vguresult)
使用指定的渲染对象来描边路径。 | +| (\* [VGUFuncs::RenderBlur](#renderblur) )([VGUSurface](_v_g_u_surface.md) \*target, uint16_t blur) | [VGUResult](#vguresult)
对目标表面进行模糊处理。 | +| (\* [VGUFuncs::RenderBlit](#renderblit) )([VGUSurface](_v_g_u_surface.md) \*target, const [VGUImage](_v_g_u_image.md) \*src, uint32_t color) | [VGUResult](#vguresult)
对图像进行搬移操作。 | +| (\* [VGUFuncs::RenderBlitN](#renderblitn) )([VGUSurface](_v_g_u_surface.md) \*target, const [VGUImage](_v_g_u_image.md) \*src, uint16_t count, uint32_t color) | [VGUResult](#vguresult)
对多个源图像进行叠加操作。 | +| (\* [VGUFuncs::RenderClearRect](#renderclearrect) )([VGUSurface](_v_g_u_surface.md) \*target, const [VGURect](_v_g_u_rect.md) \*rect, uint32_t color, uint8_t opacity) | [VGUResult](#vguresult)
对指定矩形进行颜色清除操作。 | +| (\* [VGUFuncs::RenderCancel](#rendercancel) )() | [VGUResult](#vguresult)
取消硬件加速渲染。 | +| (\* [VGUFuncs::RenderSync](#rendersync) )(int32_t timeOut) | [VGUResult](#vguresult)
同步硬件加速模块绘制或搬移操作。 | + + +## 宏定义说明 + + +### HDI_VGU_SCALAR_IS_FLOAT ``` #define HDI_VGU_SCALAR_IS_FLOAT 1 ``` -**描述:** - -VGU标量是否为浮点型 - - -## **类型定义说明** - - -### VGUPixelFormat - - -``` -typedef PixelFormat VGUPixelFormat; -``` - -**描述:** - -像素格式 - -### VGUBlendType +### PROPERTY_NAME_LEN ``` -typedef BlendType VGUBlendType; +#define PROPERTY_NAME_LEN 50 ``` -**描述:** - -混合操作类型 +**描述:** -### VGUScalar - - -``` -#ifdef HDI_VGU_SCALAR_IS_FLOAT -typedef float VGUScalar; -#else -typedef int32_t VGUScalar; -#endif -``` +属性名称长度 -**描述:** -VGU标量 +## 类型定义说明 ### HotPlugCallback @@ -471,9 +429,9 @@ VGU标量 typedef void(* HotPlugCallback) (uint32_t devId, bool connected, void *data) ``` -**描述:** +**描述:** -热插拔事件回调。 +热插拔事件回调 当有热插拔事件发生时,会回调该接口,需要通过[RegHotPlugCallback](#reghotplugcallback)注册该回调接口。 @@ -482,8 +440,8 @@ typedef void(* HotPlugCallback) (uint32_t devId, bool connected, void *data) | 名称 | 描述 | | -------- | -------- | | devId | 输入参数,显示设备ID,此ID由HDI实现层生成,并通过当前回调接口传递给图形服务使用,用以标记当前连接的显示设备。 | -| connected | 输入参数,指明设备的连接状态,true代表连接,false代表断开。 | -| data | 输出参数,图形服务携带的私有数据,该参数携带的是[RegHotPlugCallback](#reghotplugcallback)接口注册时传递的私有数据地址。 | +| connected | 输入参数,指明设备的连接状态,ture代表连接,false代表断开。 | +| data | 输出参数,图形服务携带的私有数据,该参数携带的是RegHotPlugCallback接口注册时传递的私有数据地址, 详情参考[RegHotPlugCallback](#reghotplugcallback)接口注册时传递的地址。 | ### RefreshCallback @@ -493,9 +451,9 @@ typedef void(* HotPlugCallback) (uint32_t devId, bool connected, void *data) typedef void(* RefreshCallback) (uint32_t devId, void *data) ``` -**描述:** +**描述:** -刷新请求回调。 +刷新请求回调 当接口实现层需要图形服务刷新数据帧时会回调该接口,需要通过[RegDisplayRefreshCallback](#regdisplayrefreshcallback)注册该回调接口。 @@ -514,7 +472,7 @@ typedef void(* RefreshCallback) (uint32_t devId, void *data) typedef void(* VBlankCallback) (unsigned int sequence, uint64_t ns, void *data) ``` -**描述:** +**描述:** VBlank 事件回调。 @@ -529,7 +487,31 @@ VBlank 事件回调。 | data | 输出参数,图形服务携带的私有数据,该参数携带的是[RegDisplayVBlankCallback](#regdisplayvblankcallback)接口注册时传递的地址。 | -## **枚举类型说明** +### VGUBlendType + + +``` +typedef BlendTypeVGUBlendType +``` + + +### VGUPixelFormat + + +``` +typedef PixelFormatVGUPixelFormat +``` + + +### VGUScalar + + +``` +typedef float VGUScalar +``` + + +## 枚举类型说明 ### anonymous enum @@ -539,7 +521,7 @@ VBlank 事件回调。 anonymous enum ``` -**描述:** +**描述:** 定义缓冲区使用。 @@ -562,7 +544,7 @@ anonymous enum enum BlendType ``` -**描述:** +**描述:** 支持的图像混合类型。 @@ -596,7 +578,7 @@ enum BlendType enum ColorDataSpace ``` -**描述:** +**描述:** 枚举颜色空间的类型 @@ -653,7 +635,7 @@ enum ColorDataSpace enum ColorGamut ``` -**描述:** +**描述:** 色域类型枚举值 @@ -680,7 +662,7 @@ enum ColorGamut enum ColorKey ``` -**描述:** +**描述:** Color key操作类型定义,即硬件加速支持的Color key操作类型。 @@ -699,20 +681,20 @@ Color key操作类型定义,即硬件加速支持的Color key操作类型。 enum CompositionType ``` -**描述:** +**描述:** 枚举特殊层的组合类型。 | 枚举值 | 描述 | | -------- | -------- | -| COMPOSITION_CLIENT | Client 合成类型,使用CPU或者GPU合成 | -| COMPOSITION_DEVICE | Device 合成类型,使用Device合成 | +| COMPOSITION_CLIENT | Client 合成类型,使用CPU或者GPU合成 | +| COMPOSITION_DEVICE | Device合成类型,使用Device合成 | | COMPOSITION_CURSOR | Cursor合成类型,用于光标合成 | | COMPOSITION_VIDEO | Video合成类型,用于视频层合成 | -| COMPOSITION_DEVICE_CLEAR | Device clear 合成类型,device会清除目标区域 | -| COMPOSITION_CLIENT_CLEAR | Client clear 合成类型,service会清除目标区域 | -| COMPOSITION_TUNNEL | Tunnel 合成类型,用于tunnel | -| COMPOSITION_BUTT | 合成类型,一个不可用类型,用于默认初始化 | +| COMPOSITION_DEVICE_CLEAR | Device clear 合成类型, device会清除目标区域 | +| COMPOSITION_CLIENT_CLEAR | Client clear 合成类型, service会清除目标区域 | +| COMPOSITION_TUNNEL | Tunnel 合成类型, 用于tunnel. | +| COMPOSITION_BUTT | 合成类型, 一个不可用类型, 用于默认初始化 | ### Connection @@ -722,7 +704,7 @@ enum CompositionType enum Connection ``` -**描述:** +**描述:** 热插拔连接类型定义 @@ -740,7 +722,7 @@ enum Connection enum DispErrCode ``` -**描述:** +**描述:** 返回值类型定义。 @@ -764,7 +746,7 @@ enum DispErrCode enum DispPowerStatus ``` -**描述:** +**描述:** 枚举显示状态 @@ -784,7 +766,7 @@ enum DispPowerStatus enum GamutMap ``` -**描述:** +**描述:** 枚举色域的映射类型 @@ -793,7 +775,7 @@ enum GamutMap | GAMUT_MAP_CONSTANT | 不变 | | GAMUT_MAP_EXPANSION | 映射增强 | | GAMUT_MAP_HDR_CONSTANT | 不变,用于HDR | -| GAMUT_MAP_HDR_EXPANSION | 映射增强,用于HDR | +| GAMUT_MAP_HDR_EXPANSION | 映射增强, 用于HDR | ### HDRFormat @@ -803,7 +785,7 @@ enum GamutMap enum HDRFormat ``` -**描述:** +**描述:** 枚举HDR格式 @@ -824,7 +806,7 @@ enum HDRFormat enum HDRMetadataKey ``` -**描述:** +**描述:** 枚举HDR元数据关键字 @@ -853,7 +835,7 @@ enum HDRMetadataKey enum InterfaceType ``` -**描述:** +**描述:** 枚举接口类型。 @@ -870,7 +852,7 @@ enum InterfaceType | DISP_INTF_VGA | VGA 接口 | | DISP_INTF_MIPI | MIPI 接口 | | DISP_INTF_PANEL | PANEL 接口 | -| DISP_INTF_BUTT | BUTT 接口,一个不可用类型,用于默认初始化。 | +| DISP_INTF_BUTT | BUTT 接口, 一个不可用类型, 用于默认初始化 | ### LayerType @@ -880,7 +862,7 @@ enum InterfaceType enum LayerType ``` -**描述:** +**描述:** 图层类型定义。 @@ -900,7 +882,7 @@ enum LayerType enum MirrorType ``` -**描述:** +**描述:** 硬件加速支持的镜像操作类型定义 @@ -919,7 +901,7 @@ enum MirrorType enum PixelFormat ``` -**描述:** +**描述:** 像素格式类型定义。 @@ -970,7 +952,7 @@ enum PixelFormat enum PresentTimestampType ``` -**描述:** +**描述:** 上屏时间戳类型枚举值 @@ -988,11 +970,11 @@ enum PresentTimestampType enum RopType ``` -**描述:** +**描述:** 硬件加速支持的ROP操作类型。 -硬件加速支持的ROP操作类型,在将前景位图的RGB颜色分量和Alpha分量值与背景位图的RGB颜色分量值和Alpha分量值进行按位的布尔运算(包括按位与,按位或等),将结果输出。 +在将前景位图的RGB颜色分量和Alpha分量值与背景位图的RGB颜色分量值和Alpha分量值进行按位的布尔运算(包括按位与,按位或等),将结果输出。 | 枚举值 | 描述 | | -------- | -------- | @@ -1022,7 +1004,7 @@ enum RopType enum TransformType ``` -**描述:** +**描述:** 图层变换类型定义。 @@ -1042,7 +1024,7 @@ enum TransformType enum VGUCapability ``` -**描述:** +**描述:** 硬件加速能力。 @@ -1061,7 +1043,7 @@ enum VGUCapability enum VGUClipType ``` -**描述:** +**描述:** 绘制表面剪切类型。 @@ -1079,7 +1061,7 @@ enum VGUClipType enum VGUFillRule ``` -**描述:** +**描述:** 填充规则定义。 @@ -1097,7 +1079,7 @@ enum VGUFillRule enum VGUFillSpread ``` -**描述:** +**描述:** 渐变填充区域外的延展类型。 @@ -1116,7 +1098,7 @@ enum VGUFillSpread enum VGUFilter ``` -**描述:** +**描述:** 图像滤波类型。 @@ -1135,7 +1117,7 @@ enum VGUFilter enum VGUGradientType ``` -**描述:** +**描述:** 渐变类型。 @@ -1154,7 +1136,7 @@ enum VGUGradientType enum VGUJointType ``` -**描述:** +**描述:** 联接类型。 @@ -1173,7 +1155,7 @@ enum VGUJointType enum VGULineCap ``` -**描述:** +**描述:** 线帽。 @@ -1191,7 +1173,7 @@ enum VGULineCap enum VGUPaintType ``` -**描述:** +**描述:** 渲染对象 @@ -1210,21 +1192,21 @@ enum VGUPaintType enum VGUPathCmd ``` -**描述:** +**描述:** 路径绘制指令类型。 | 枚举值 | 描述 | | -------- | -------- | -| VGU_PATH_CMD_CLOSE | 线段关闭,坐标数据:none | -| VGU_PATH_CMD_MOVE | 移动到指定位置,坐标数据:x0, y0 | -| VGU_PATH_CMD_LINE | 线条,坐标数据:x0, y0 | -| VGU_PATH_CMD_HLINE | 水平线,坐标数据:x0 | -| VGU_PATH_CMD_VLINE | 垂直线,坐标数据:y0 | -| VGU_PATH_CMD_QUAD | 二次贝塞尔曲线,坐标数据:x0, y0, x1, y1 | -| VGU_PATH_CMD_CUBIC | 三次贝塞尔曲线,坐标数据:x0, y0, x1, y1, x2, y2 | -| VGU_PATH_CMD_SQUAD | 平滑二次贝塞尔曲线,坐标数据:x1, y1 | -| VGU_PATH_CMD_SCUBIC | 平滑三次贝塞尔曲线,坐标数据:x1, y1, x2, y2 | +| VGU_PATH_CMD_CLOSE | 线段关闭,坐标数据: none | +| VGU_PATH_CMD_MOVE | 移动到指定位置,坐标数据: x0, y0 | +| VGU_PATH_CMD_LINE | 线条,坐标数据: x0, y0 | +| VGU_PATH_CMD_HLINE | 水平线,坐标数据: x0 | +| VGU_PATH_CMD_VLINE | 垂直线,坐标数据: y0 | +| VGU_PATH_CMD_QUAD | 二次贝塞尔曲线,坐标数据: x0, y0, x1, y1 | +| VGU_PATH_CMD_CUBIC | 三次贝塞尔曲线,坐标数据: x0, y0, x1, y1, x2, y2 | +| VGU_PATH_CMD_SQUAD | 平滑二次贝塞尔曲线,坐标数据: x1, y1 | +| VGU_PATH_CMD_SCUBIC | 平滑三次贝塞尔曲线,坐标数据: x1, y1, x2, y2 | | VGU_PATH_CMD_BUTT | 无效定义 | @@ -1235,7 +1217,7 @@ enum VGUPathCmd enum VGUPathDataType ``` -**描述:** +**描述:** 路径坐标数据类型。 @@ -1253,7 +1235,7 @@ enum VGUPathDataType enum VGUResult ``` -**描述:** +**描述:** 错误码定义。 @@ -1276,7 +1258,7 @@ enum VGUResult enum VGUTransformType ``` -**描述:** +**描述:** 变换类型。 @@ -1297,7 +1279,7 @@ enum VGUTransformType enum VGUWrapType ``` -**描述:** +**描述:** 图像模式填充延展类型。 @@ -1308,7 +1290,7 @@ enum VGUWrapType | VGU_WRAP_BUTT | 无效定义 | -## **函数说明** +## 函数说明 ### DeviceInitialize() @@ -1318,7 +1300,7 @@ enum VGUWrapType int32_t DeviceInitialize (DeviceFuncs ** funcs) ``` -**描述:** +**描述:** 实现显示设备控制接口的初始化,申请操作显示设备控制接口的资源,并获取对应的操作接口。 @@ -1342,7 +1324,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t DeviceUninitialize (DeviceFuncs * funcs) ``` -**描述:** +**描述:** 取消显示设备控制接口的初始化,释放控制接口使用到的资源。 @@ -1366,7 +1348,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t GfxInitialize (GfxFuncs ** funcs) ``` -**描述:** +**描述:** 获取硬件加速相关的操作接口指针。 @@ -1390,7 +1372,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t GfxUninitialize (GfxFuncs * funcs) ``` -**描述:** +**描述:** 释放硬件加速相关的操作接口指针。 @@ -1414,7 +1396,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t GrallocInitialize (GrallocFuncs ** funcs) ``` -**描述:** +**描述:** 初始化内存模块,并获取内存提供的操作接口。 @@ -1438,7 +1420,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t GrallocUninitialize (GrallocFuncs * funcs) ``` -**描述:** +**描述:** 取消初始化内存模块,并释放内存操作接口指针。 @@ -1462,7 +1444,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t LayerInitialize (LayerFuncs ** funcs) ``` -**描述:** +**描述:** 实现图层初始化功能,申请图层使用的资源,并获取图层提供的操作接口。 @@ -1490,7 +1472,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t LayerUninitialize (LayerFuncs * funcs) ``` -**描述:** +**描述:** 取消图层初始化功能,释放图层使用到的资源,并释放图层操作接口指针。 @@ -1518,7 +1500,7 @@ DISPLAY_SUCCESS 表示执行成功。 VGUResult VGUGradientClearStop (VGUGradient * gradient) ``` -**描述:** +**描述:** 清除ColorStop。 @@ -1542,7 +1524,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult VGUGradientColorStop (VGUGradient * gradient, const VGUColorStop * colorStop, uint32_t count ) ``` -**描述:** +**描述:** 对渐变添加ColorStop。 @@ -1568,7 +1550,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult VGUGradientConic (VGUGradient * gradient, VGUScalar cx, VGUScalar cy ) ``` -**描述:** +**描述:** 创建圆锥渐变对象。 @@ -1594,7 +1576,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult VGUGradientLinear (VGUGradient * gradient, const VGUPoint * p1, const VGUPoint * p2 ) ``` -**描述:** +**描述:** 创建线性渐变对象。 @@ -1620,7 +1602,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult VGUGradientMatrix (VGUGradient * gradient, const VGUMatrix3 * matrix ) ``` -**描述:** +**描述:** 设置渐变对象的变换矩阵。 @@ -1645,7 +1627,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult VGUGradientRadial (VGUGradient * gradient, const VGUPoint * p1, VGUScalar r1, const VGUPoint * p2, VGUScalar r2 ) ``` -**描述:** +**描述:** 创建辐射渐变对象 @@ -1673,7 +1655,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult VGUInitialize (VGUFuncs ** funcs) ``` -**描述:** +**描述:** 获取硬件加速相关的操作接口指针。 @@ -1697,7 +1679,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult VGUMatrixIdentity (VGUMatrix3 * matrix) ``` -**描述:** +**描述:** 初始化矩阵对象为单位矩阵。 @@ -1721,7 +1703,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult VGUMatrixRotate (VGUMatrix3 * matrix, float degree ) ``` -**描述:** +**描述:** 矩阵变换旋转。 @@ -1746,7 +1728,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult VGUMatrixScale (VGUMatrix3 * matrix, float xScale, float yScale ) ``` -**描述:** +**描述:** 矩阵变换缩放。 @@ -1772,7 +1754,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult VGUMatrixTranslate (VGUMatrix3 * matrix, float x, float y ) ``` -**描述:** +**描述:** 矩阵变换平移。 @@ -1798,7 +1780,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult VGUPathAppend (VGUPath * path, const VGUPath * subpath ) ``` -**描述:** +**描述:** 添加子路径到当前路径中。 @@ -1823,7 +1805,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult VGUPathClear (VGUPath * path) ``` -**描述:** +**描述:** 清除路径对象内存。 @@ -1847,7 +1829,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult VGUPathInit (VGUPath * path, VGUPathDataType type, const uint8_t * segments, int numSegments, const uint8_t * data, bool enAlias, VGURect boundBox ) ``` -**描述:** +**描述:** 初始化路径对象。 @@ -1877,7 +1859,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult VGUUninitialize (VGUFuncs * funcs) ``` -**描述:** +**描述:** 去初始化硬件加速模块,同时释放硬件加速模块操作函数指针。 @@ -1894,7 +1876,7 @@ VGU_SUCCESS 表示执行成功。 其他值表示执行失败,具体错误码查看[VGUResult](#vguresult)。 -## **变量说明** +## 变量说明 ### alpha0 [1/2] @@ -1904,7 +1886,7 @@ VGU_SUCCESS 表示执行成功。 uint8_t LayerAlpha::alpha0 ``` -**描述:** +**描述:** alpha0值,取值范围:[0, 255] @@ -1916,7 +1898,7 @@ alpha0值,取值范围:[0, 255] uint8_t ISurface::alpha0 ``` -**描述:** +**描述:** Alpha0值,取值范围:[0,255] @@ -1928,7 +1910,7 @@ Alpha0值,取值范围:[0,255] uint8_t LayerAlpha::alpha1 ``` -**描述:** +**描述:** alpha1值,取值范围:[0, 255] @@ -1940,7 +1922,7 @@ alpha1值,取值范围:[0, 255] uint8_t ISurface::alpha1 ``` -**描述:** +**描述:** Alpha1值,取值范围:[0,255] @@ -1952,7 +1934,7 @@ Alpha1值,取值范围:[0,255] RopType GfxOpt::alphaRopType ``` -**描述:** +**描述:** Alpha的Rop类型 @@ -1964,7 +1946,7 @@ Alpha的Rop类型 bool ISurface::bAlphaExt1555 ``` -**描述:** +**描述:** 是否使能1555的Alpha扩展 @@ -1976,7 +1958,7 @@ bool ISurface::bAlphaExt1555 bool ISurface::bAlphaMax255 ``` -**描述:** +**描述:** 图像alpha最大值为255还是128 @@ -1988,7 +1970,7 @@ bool ISurface::bAlphaMax255 void* YUVDescInfo::baseAddr ``` -**描述:** +**描述:** 内存的初始地址 @@ -2000,7 +1982,7 @@ void* YUVDescInfo::baseAddr VGUBlendType VGUSurface::blend ``` -**描述:** +**描述:** 混合叠加模式 @@ -2012,7 +1994,7 @@ VGUBlendType VGUSurface::blend BlendType GfxOpt::blendType ``` -**描述:** +**描述:** 混合方式 @@ -2024,7 +2006,7 @@ BlendType GfxOpt::blendType VGURect VGUPath::boundBox ``` -**描述:** +**描述:** 路径最大边界 @@ -2036,7 +2018,7 @@ VGURect VGUPath::boundBox int32_t LayerInfo::bpp ``` -**描述:** +**描述:** 每像素所占bit数 @@ -2048,7 +2030,7 @@ int32_t LayerInfo::bpp VGUBuffer* VGUMaskLayer::buffer ``` -**描述:** +**描述:** 蒙版缓存 @@ -2060,12 +2042,10 @@ VGUBuffer* VGUMaskLayer::buffer VGUBuffer* VGUSurface::buffer ``` -**描述:** +**描述:** 位图缓存 -VGUSurface::clipRect - ### buffer [3/3] @@ -2074,7 +2054,7 @@ VGUSurface::clipRect VGUBuffer* VGUImage::buffer ``` -**描述:** +**描述:** 图像存储缓存 @@ -2086,7 +2066,7 @@ VGUBuffer* VGUImage::buffer bool ISurface::bYCbCrClut ``` -**描述:** +**描述:** CLUT表是否位于 YCbCr 空间 @@ -2098,7 +2078,7 @@ CLUT表是否位于 YCbCr 空间 VGULineCap VGUStrokeAttr::cap ``` -**描述:** +**描述:** 线帽类型 @@ -2110,7 +2090,7 @@ VGULineCap VGUStrokeAttr::cap uint64_t ISurface::cbcrPhyAddr ``` -**描述:** +**描述:** CbCr分量地址 @@ -2122,7 +2102,7 @@ CbCr分量地址 int32_t ISurface::cbcrStride ``` -**描述:** +**描述:** CbCr分量跨度 @@ -2134,7 +2114,7 @@ CbCr分量跨度 VGUPath* VGUSurface::clipPath ``` -**描述:** +**描述:** 路径剪切域,如果为空,整个表面直接渲染 @@ -2146,7 +2126,7 @@ VGUPath* VGUSurface::clipPath VGURect* VGUSurface::clipRect ``` -**描述:** +**描述:** 矩形剪切域,如果为空,整个表面直接渲染 @@ -2158,7 +2138,7 @@ VGURect* VGUSurface::clipRect VGUClipType VGUSurface::clipType ``` -**描述:** +**描述:** 表面剪切类型 @@ -2170,7 +2150,7 @@ VGUClipType VGUSurface::clipType uint64_t ISurface::clutPhyAddr ``` -**描述:** +**描述:** Clut表首地址,用作颜色扩展或颜色校正 @@ -2182,7 +2162,7 @@ Clut表首地址,用作颜色扩展或颜色校正 uint32_t ILine::color ``` -**描述:** +**描述:** 线条颜色 @@ -2194,7 +2174,7 @@ uint32_t ILine::color uint32_t ICircle::color ``` -**描述:** +**描述:** 圆的颜色 @@ -2206,7 +2186,7 @@ uint32_t ICircle::color uint32_t Rectangle::color ``` -**描述:** +**描述:** 矩形颜色 @@ -2218,7 +2198,7 @@ uint32_t Rectangle::color uint32_t VGUColorStop::color ``` -**描述:** +**描述:** 偏移位置对应颜色 @@ -2230,7 +2210,7 @@ uint32_t VGUColorStop::color uint32_t VGUSolid::color ``` -**描述:** +**描述:** 颜色值 @@ -2242,7 +2222,7 @@ uint32_t VGUSolid::color ColorKey GfxOpt::colorKeyFrom ``` -**描述:** +**描述:** 色键模式 @@ -2254,7 +2234,7 @@ ColorKey GfxOpt::colorKeyFrom RopType GfxOpt::colorRopType ``` -**描述:** +**描述:** 颜色的Rop类型 @@ -2266,7 +2246,7 @@ RopType GfxOpt::colorRopType VGUColorStop* VGUGradient::colorStops ``` -**描述:** +**描述:** 渐变停止颜色数组指针 @@ -2278,7 +2258,7 @@ VGUColorStop* VGUGradient::colorStops int32_t(* DeviceFuncs::Commit) (uint32_t devId, int32_t *fence) ``` -**描述:** +**描述:** 提交合成送显请求。 @@ -2305,7 +2285,7 @@ DISPLAY_SUCCESS 表示执行成功。 VGUConic VGUGradient::conic ``` -**描述:** +**描述:** 圆锥渐变对象 @@ -2317,7 +2297,7 @@ VGUConic VGUGradient::conic int32_t(* DeviceFuncs::CreateVirtualDisplay) (uint32_t width, uint32_t height, int32_t *format, uint32_t *devId) ``` -**描述:** +**描述:** 创建虚拟显示设备。 @@ -2346,7 +2326,7 @@ DISPLAY_SUCCESS 表示执行成功。 VGUScalar VGUConic::cx ``` -**描述:** +**描述:** 圆弧中心x坐标 @@ -2358,7 +2338,7 @@ VGUScalar VGUConic::cx VGUScalar VGUConic::cy ``` -**描述:** +**描述:** 圆弧中心y坐标 @@ -2370,7 +2350,7 @@ VGUScalar VGUConic::cy BufferData LayerBuffer::data ``` -**描述:** +**描述:** 图层buffer数据 @@ -2382,7 +2362,7 @@ BufferData LayerBuffer::data uint8_t* VGUPath::data ``` -**描述:** +**描述:** 存放路径命令对应坐标数据 @@ -2394,7 +2374,7 @@ uint8_t* VGUPath::data VGUResult(* VGUFuncs::DeinitVgu) (void) ``` -**描述:** +**描述:** 去初始化硬件加速。 @@ -2416,7 +2396,7 @@ VGU_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::DestroyVirtualDisplay) (uint32_t devId) ``` -**描述:** +**描述:** 销毁虚拟显示设备。 @@ -2442,7 +2422,7 @@ DISPLAY_SUCCESS 表示执行成功。 bool GfxOpt::enableRop ``` -**描述:** +**描述:** Rop功能使能位 @@ -2454,7 +2434,7 @@ Rop功能使能位 bool GfxOpt::enableScale ``` -**描述:** +**描述:** 缩放功能使能位 @@ -2466,7 +2446,7 @@ bool GfxOpt::enableScale bool VGUPath::enAlias ``` -**描述:** +**描述:** 抗锯齿开关 @@ -2478,7 +2458,7 @@ bool VGUPath::enAlias PixelFormat ISurface::enColorFmt ``` -**描述:** +**描述:** 图像格式 @@ -2490,7 +2470,7 @@ PixelFormat ISurface::enColorFmt bool LayerAlpha::enGlobalAlpha ``` -**描述:** +**描述:** 全局alpha使能标志 @@ -2502,7 +2482,7 @@ bool LayerAlpha::enGlobalAlpha bool GfxOpt::enGlobalAlpha ``` -**描述:** +**描述:** 全局alpha使能位 @@ -2514,7 +2494,7 @@ bool GfxOpt::enGlobalAlpha bool LayerAlpha::enPixelAlpha ``` -**描述:** +**描述:** 像素alpha使能标志 @@ -2526,7 +2506,7 @@ bool LayerAlpha::enPixelAlpha bool GfxOpt::enPixelAlpha ``` -**描述:** +**描述:** 像素alpha使能位 @@ -2538,7 +2518,7 @@ bool GfxOpt::enPixelAlpha uint32_t AllocInfo::expectedSize ``` -**描述:** +**描述:** 申请内存大小 @@ -2550,7 +2530,7 @@ uint32_t AllocInfo::expectedSize int32_t ExtDataHandle::fd ``` -**描述:** +**描述:** 句柄 fd, -1代表不支持 @@ -2562,9 +2542,9 @@ int32_t ExtDataHandle::fd int32_t LayerBuffer::fenceId ``` -**描述:** +**描述:** -buffer 的fence号r +buffer 的fence号。 ### filter @@ -2574,7 +2554,7 @@ buffer 的fence号r VGUFilter VGUSurface::filter ``` -**描述:** +**描述:** 图像滤波类型 @@ -2586,7 +2566,7 @@ VGUFilter VGUSurface::filter PixelFormat AllocInfo::format ``` -**描述:** +**描述:** 申请内存格式 @@ -2598,7 +2578,7 @@ PixelFormat AllocInfo::format PixelFormat VerifyAllocInfo::format ``` -**描述:** +**描述:** 分配内存的像素格式 @@ -2610,7 +2590,7 @@ PixelFormat VerifyAllocInfo::format uint32_t HDRCapability::formatCount ``` -**描述:** +**描述:** 支持的HDR格式的数量 @@ -2622,7 +2602,7 @@ uint32_t HDRCapability::formatCount HDRFormat* HDRCapability::formats ``` -**描述:** +**描述:** 支持的HDR格式的数组首地址 @@ -2634,7 +2614,7 @@ HDRFormat* HDRCapability::formats uint32_t DisplayModeInfo::freshRate ``` -**描述:** +**描述:** 刷新速率 @@ -2646,7 +2626,7 @@ uint32_t DisplayModeInfo::freshRate uint8_t LayerAlpha::gAlpha ``` -**描述:** +**描述:** 全局alpha值,取值范围:[0, 255] @@ -2658,7 +2638,7 @@ uint8_t LayerAlpha::gAlpha int32_t(* DeviceFuncs::GetDisplayBacklight) (uint32_t devId, uint32_t *level) ``` -**描述:** +**描述:** 获取显示设备当前的背光值。 @@ -2685,7 +2665,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::GetDisplayCapability) (uint32_t devId, DisplayCapability *info) ``` -**描述:** +**描述:** 获取显示设备能力集。 @@ -2696,7 +2676,7 @@ int32_t(* DeviceFuncs::GetDisplayCapability) (uint32_t devId, DisplayCapability | 名称 | 描述 | | -------- | -------- | | devId | 输入参数,指示需要操作的设备ID。 | -| info | 输出参数,设备支持的能力级信息,详情参考[DisplayCapability](_display_capability.md)。 | +| info | 输出参数,设备支持的能力级信息,详情参考 [DisplayCapability](_display_capability.md)。 | **返回:** @@ -2712,7 +2692,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::GetDisplayColorGamut) (uint32_t devId, ColorGamut *gamut) ``` -**描述:** +**描述:** 获取显示设备当前的色域模式。 @@ -2737,7 +2717,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::GetDisplayCompChange) (uint32_t devId, uint32_t *num, uint32_t *Layers, int32_t *type) ``` -**描述:** +**描述:** 获取显示设备合成类型有变化的layer。 @@ -2766,7 +2746,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::GetDisplayGamutMap) (uint32_t devId, GamutMap *gamutMap) ``` -**描述:** +**描述:** 获取显示设备当前的色域映射模式。 @@ -2791,7 +2771,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::GetDisplayMode) (uint32_t devId, uint32_t *modeId) ``` -**描述:** +**描述:** 获取显示设备当前的显示模式。 @@ -2818,7 +2798,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::GetDisplayPowerStatus) (uint32_t devId, DispPowerStatus *status) ``` -**描述:** +**描述:** 获取显示设备当前的电源状态。 @@ -2845,7 +2825,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::GetDisplayProperty) (uint32_t devId, uint32_t id, uint64_t *value) ``` -**描述:** +**描述:** 获取显示设备属性值。 @@ -2873,7 +2853,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::GetDisplayReleaseFence) (uint32_t devId, uint32_t *num, uint32_t *layers, int32_t *fences) ``` -**描述:** +**描述:** 获取显示图层fence。 @@ -2902,7 +2882,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::GetDisplaySupportedColorGamuts) (uint32_t devId, uint32_t *num, ColorGamut *gamuts) ``` -**描述:** +**描述:** 获取显示设备支持的色域信息。 @@ -2928,7 +2908,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::GetDisplaySupportedModes) (uint32_t devId, uint32_t *num, DisplayModeInfo *modes) ``` -**描述:** +**描述:** 获取显示设备支持的显示模式信息。 @@ -2956,7 +2936,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::GetHDRCapabilityInfos) (uint32_t devId, HDRCapability *info) ``` -**描述:** +**描述:** 获取显示设备支持的HDR属性信息。 @@ -2981,7 +2961,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::GetSupportedMetadataKey) (uint32_t devId, uint32_t *num, HDRMetadataKey *keys) ``` -**描述:** +**描述:** 获取显示设备支持的 HDRMetadataKey。 @@ -2991,7 +2971,7 @@ int32_t(* DeviceFuncs::GetSupportedMetadataKey) (uint32_t devId, uint32_t *num, | -------- | -------- | | devId | 输入参数,指示需要操作的设备ID。 | | num | 输出参数,设备支持的HDRMetadataKey数组个数。 | -| keys | 输出参数,HDRMetadataKey首地址, 指向HDRMetadataKey数组首地址。 | +| keys | 输出参数,HDRMetadataKey首地址,指向HDRMetadataKey数组首地址。 | **返回:** @@ -3007,7 +2987,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::GetWriteBackFrame) (uint32_t devId, BufferHandle *buffer, int32_t *fence) ``` -**描述:** +**描述:** 获取显示设备的回写帧。 @@ -3035,7 +3015,7 @@ DISPLAY_SUCCESS 表示执行成功。 uint32_t GfxOpt::globalAlpha ``` -**描述:** +**描述:** 全局alpha的值 @@ -3047,7 +3027,7 @@ uint32_t GfxOpt::globalAlpha VGUGradient* VGUPaintStyle::gradient ``` -**描述:** +**描述:** 渐变对象 @@ -3059,7 +3039,7 @@ VGUGradient* VGUPaintStyle::gradient int32_t IRect::h ``` -**描述:** +**描述:** 矩形框高度 @@ -3071,7 +3051,7 @@ int32_t IRect::h VGUScalar VGURect::h ``` -**描述:** +**描述:** 矩形高度 @@ -3083,7 +3063,7 @@ VGUScalar VGURect::h BufferHandle* LayerBuffer::hdl ``` -**描述:** +**描述:** 图层buffer句柄 @@ -3095,7 +3075,7 @@ BufferHandle* LayerBuffer::hdl uint32_t DisplayInfo::height ``` -**描述:** +**描述:** 显示屏高度 @@ -3107,7 +3087,7 @@ uint32_t DisplayInfo::height int32_t LayerInfo::height ``` -**描述:** +**描述:** 图层高度 @@ -3119,7 +3099,7 @@ int32_t LayerInfo::height int32_t LayerBuffer::height ``` -**描述:** +**描述:** buffer高度 @@ -3131,7 +3111,7 @@ buffer高度 int32_t ISurface::height ``` -**描述:** +**描述:** 图像高度 @@ -3143,7 +3123,7 @@ int32_t ISurface::height int32_t DisplayModeInfo::height ``` -**描述:** +**描述:** 像素高度 @@ -3155,7 +3135,7 @@ int32_t DisplayModeInfo::height uint32_t AllocInfo::height ``` -**描述:** +**描述:** 申请内存高度 @@ -3167,7 +3147,7 @@ uint32_t AllocInfo::height uint32_t VerifyAllocInfo::height ``` -**描述:** +**描述:** 分配内存的高度 @@ -3179,7 +3159,7 @@ uint32_t VerifyAllocInfo::height uint32_t VGUBuffer::height ``` -**描述:** +**描述:** 位图高度 @@ -3191,7 +3171,7 @@ uint32_t VGUBuffer::height int32_t DisplayModeInfo::id ``` -**描述:** +**描述:** 模式ID @@ -3203,7 +3183,7 @@ int32_t DisplayModeInfo::id VGUImage* VGUPattern::image ``` -**描述:** +**描述:** 图像对象 @@ -3215,7 +3195,7 @@ VGUImage* VGUPattern::image VGUResult(* VGUFuncs::InitVgu) (void) ``` -**描述:** +**描述:** 初始化硬件加速。 @@ -3237,11 +3217,11 @@ VGU_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::InvokeDisplayCmd) (uint32_t devId,...) ``` -**描述:** +**描述:** 调用显示设备命令。 -该接口用于图形服务和接口实现层之间的接口扩展,如果由临时接口新增可以通过该接口进行扩展,不用增加新的接口定义。 +该接口用于图形服务和接口实现层之间的的接口扩展,如果由临时接口新增可以通过该接口进行扩展,不用增加新的接口定义。 **参数:** @@ -3263,7 +3243,7 @@ DISPLAY_SUCCESS 表示执行成功。 VGUJointType VGUStrokeAttr::join ``` -**描述:** +**描述:** 联结类型 @@ -3275,7 +3255,7 @@ VGUJointType VGUStrokeAttr::join HDRMetadataKey HDRMetaData::key ``` -**描述:** +**描述:** HDR元数据关键字 @@ -3287,7 +3267,7 @@ HDR元数据关键字 VGULinear VGUGradient::linear ``` -**描述:** +**描述:** 线性渐变对象 @@ -3299,7 +3279,7 @@ VGULinear VGUGradient::linear float VGUMatrix3::m[3][3] ``` -**描述:** +**描述:** 3x3变换矩阵 @@ -3311,7 +3291,7 @@ float VGUMatrix3::m[3][3] VGUMaskLayer* VGUSurface::mask ``` -**描述:** +**描述:** 蒙版图层,可以为空 @@ -3323,7 +3303,7 @@ VGUMaskLayer* VGUSurface::mask VGUMatrix3* VGUImage::matrix ``` -**描述:** +**描述:** 图像矩阵变换,该参数为空,则内部使用单位变换矩阵 @@ -3335,7 +3315,7 @@ VGUMatrix3* VGUImage::matrix VGUMatrix3* VGUGradient::matrix ``` -**描述:** +**描述:** 针对渐变对象的变换矩阵 @@ -3347,7 +3327,7 @@ VGUMatrix3* VGUGradient::matrix float HDRCapability::maxAverageLum ``` -**描述:** +**描述:** 最大的平均光亮度luminance值 @@ -3359,7 +3339,7 @@ float HDRCapability::maxAverageLum float HDRCapability::maxLum ``` -**描述:** +**描述:** 最大的光亮度luminance值 @@ -3371,7 +3351,7 @@ float HDRCapability::maxLum float HDRCapability::minLum ``` -**描述:** +**描述:** 最小的光亮度luminance值 @@ -3383,7 +3363,7 @@ float HDRCapability::minLum MirrorType GfxOpt::mirrorType ``` -**描述:** +**描述:** 镜像类型 @@ -3395,7 +3375,7 @@ MirrorType GfxOpt::mirrorType float VGUStrokeAttr::miterLimit ``` -**描述:** +**描述:** 最大斜切长度 @@ -3407,7 +3387,7 @@ float VGUStrokeAttr::miterLimit char PropertyObject::name[PROPERTY_NAME_LEN] ``` -**描述:** +**描述:** 属性名称 @@ -3419,7 +3399,7 @@ char PropertyObject::name[PROPERTY_NAME_LEN] char DisplayCapability::name[PROPERTY_NAME_LEN] ``` -**描述:** +**描述:** 显示设备名称 @@ -3431,7 +3411,7 @@ char DisplayCapability::name[PROPERTY_NAME_LEN] int32_t VGUPath::numSegments ``` -**描述:** +**描述:** 路径命令总数 @@ -3443,7 +3423,7 @@ int32_t VGUPath::numSegments uint8_t VGUImage::opacity ``` -**描述:** +**描述:** 透明度,范围0~255 @@ -3455,7 +3435,7 @@ uint8_t VGUImage::opacity uint8_t VGUGradient::opacity ``` -**描述:** +**描述:** 透明度,范围0~255 @@ -3467,9 +3447,9 @@ uint8_t VGUGradient::opacity uint8_t VGUSolid::opacity ``` -**描述:** +**描述:** -透明度,取值范围 0 ~ 255。 +透明度,值范围 0 ~ 255 ### pattern @@ -3479,7 +3459,7 @@ uint8_t VGUSolid::opacity VGUPattern* VGUPaintStyle::pattern ``` -**描述:** +**描述:** 图片模式对象 @@ -3491,7 +3471,7 @@ VGUPattern* VGUPaintStyle::pattern uint64_t BufferData::phyAddr ``` -**描述:** +**描述:** 物理内存地址 @@ -3503,7 +3483,7 @@ uint64_t BufferData::phyAddr uint64_t ISurface::phyAddr ``` -**描述:** +**描述:** 图像首地址 @@ -3515,7 +3495,7 @@ uint64_t ISurface::phyAddr uint64_t VGUBuffer::phyAddr ``` -**描述:** +**描述:** 位图缓存的物理地址 @@ -3527,7 +3507,7 @@ uint64_t VGUBuffer::phyAddr uint32_t DisplayCapability::phyHeight ``` -**描述:** +**描述:** 物理高度 @@ -3539,7 +3519,7 @@ uint32_t DisplayCapability::phyHeight uint32_t DisplayCapability::phyWidth ``` -**描述:** +**描述:** 物理宽度 @@ -3551,7 +3531,7 @@ uint32_t DisplayCapability::phyWidth int32_t LayerBuffer::pitch ``` -**描述:** +**描述:** 一行数据所占字节数 @@ -3563,7 +3543,7 @@ int32_t LayerBuffer::pitch VGUPixelFormat VGUBuffer::pixelFormat ``` -**描述:** +**描述:** 像素格式 @@ -3575,7 +3555,7 @@ VGUPixelFormat VGUBuffer::pixelFormat PixelFormat LayerInfo::pixFormat ``` -**描述:** +**描述:** 图层像素格式 @@ -3587,7 +3567,7 @@ PixelFormat LayerInfo::pixFormat PixelFormat LayerBuffer::pixFormat ``` -**描述:** +**描述:** buffer像素格式r @@ -3599,7 +3579,7 @@ buffer像素格式r int32_t(* DeviceFuncs::PrepareDisplayLayers) (uint32_t devId, bool *needFlushFb) ``` -**描述:** +**描述:** 显示设备合成前准备。 @@ -3626,7 +3606,7 @@ DISPLAY_SUCCESS 表示执行成功。 uint32_t DisplayCapability::propertyCount ``` -**描述:** +**描述:** 属性数组大小 @@ -3638,7 +3618,7 @@ uint32_t DisplayCapability::propertyCount uint32_t PropertyObject::propId ``` -**描述:** +**描述:** 属性ID @@ -3650,7 +3630,7 @@ uint32_t PropertyObject::propId PropertyObject* DisplayCapability::props ``` -**描述:** +**描述:** 属性数组 @@ -3662,7 +3642,7 @@ PropertyObject* DisplayCapability::props int32_t(* VGUFuncs::QueryCapability) (uint32_t cap) ``` -**描述:** +**描述:** 查询硬件能力集。 @@ -3670,7 +3650,7 @@ int32_t(* VGUFuncs::QueryCapability) (uint32_t cap) | 名称 | 描述 | | -------- | -------- | -| cap | 输入参数,待查询能力。该参数类型定义参考 [VGUCapability](#vgucapability)。 | +| cap | 输入参数,待查询能力。该参数类型定义参考[VGUCapability](#vgucapability)。 | **返回:** @@ -3686,7 +3666,7 @@ VGU_SUCCESS 表示执行成功。 int32_t ICircle::r ``` -**描述:** +**描述:** 圆的半径 @@ -3698,7 +3678,7 @@ int32_t ICircle::r VGUScalar VGURadial::r0 ``` -**描述:** +**描述:** 内圈圆半径 @@ -3710,7 +3690,7 @@ VGUScalar VGURadial::r0 VGUScalar VGURadial::r1 ``` -**描述:** +**描述:** 外圈圆半径 @@ -3722,7 +3702,7 @@ VGUScalar VGURadial::r1 VGURadial VGUGradient::radial ``` -**描述:** +**描述:** 辐射渐变对象 @@ -3734,7 +3714,7 @@ VGURadial VGUGradient::radial IRect Rectangle::rect ``` -**描述:** +**描述:** 矩形区域 @@ -3746,7 +3726,7 @@ IRect Rectangle::rect VGURect* VGUMaskLayer::rect ``` -**描述:** +**描述:** 蒙版矩形 @@ -3758,7 +3738,7 @@ VGURect* VGUMaskLayer::rect VGURect* VGUImage::rect ``` -**描述:** +**描述:** 图像截取矩形,该参数为空,则截取整个图像 @@ -3770,7 +3750,7 @@ VGURect* VGUImage::rect int32_t(* DeviceFuncs::RegDisplayRefreshCallback) (uint32_t devId, RefreshCallback callback, void *data) ``` -**描述:** +**描述:** 刷新请求回调。 @@ -3798,7 +3778,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::RegDisplayVBlankCallback) (uint32_t devId, VBlankCallback callback, void *data) ``` -**描述:** +**描述:** 注册VBlank事件回调。 @@ -3826,7 +3806,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::RegHotPlugCallback) (HotPlugCallback callback, void *data) ``` -**描述:** +**描述:** 注册热插拔事件回调。 @@ -3853,7 +3833,7 @@ DISPLAY_SUCCESS 表示执行成功。 VGUResult(* VGUFuncs::RenderBlit) (VGUSurface *target, const VGUImage *src, uint32_t color) ``` -**描述:** +**描述:** 对图像进行搬移操作。 @@ -3881,14 +3861,15 @@ VGU_SUCCESS 表示执行成功。 VGUResult(* VGUFuncs::RenderBlitN) (VGUSurface *target, const VGUImage *src, uint16_t count, uint32_t color) ``` -**描述:** +**描述:** 对多个源图像进行叠加操作。 -搬移过程中同时进行颜色空间转换,矩阵变换操作。该接口支持多个源图形同时叠加到目标表面, 对于硬件支持源图像数目可以通过[QueryCapability](#querycapability)接口查询**。** +搬移过程中同时进行颜色空间转换,矩阵变换操作。该接口支持多个源图形同时叠加到目标表面, -**参数**: +对于硬件支持源图像数目可以通过[QueryCapability](#querycapability)接口查询。 +**参数:** | 名称 | 描述 | | -------- | -------- | @@ -3897,13 +3878,10 @@ VGUResult(* VGUFuncs::RenderBlitN) (VGUSurface *target, const VGUImage *src, uin | count | 输入参数,待叠加源图像个数。 | | color | 输入参数,参与混合的颜色值。如果颜色值为0,则不参与混合操作。 | - -**返回**: - +**返回:** VGU_SUCCESS 表示执行成功。 - 其他值表示执行失败,具体错误码查看[VGUResult](#vguresult)。 @@ -3914,7 +3892,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult(* VGUFuncs::RenderBlur) (VGUSurface *target, uint16_t blur) ``` -**描述:** +**描述:** 对目标表面进行模糊处理。 @@ -3939,7 +3917,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult(* VGUFuncs::RenderCancel) () ``` -**描述:** +**描述:** 取消硬件加速渲染。 @@ -3957,7 +3935,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult(* VGUFuncs::RenderClearRect) (VGUSurface *target, const VGURect *rect, uint32_t color, uint8_t opacity) ``` -**描述:** +**描述:** 对指定矩形进行颜色清除操作。 @@ -3984,7 +3962,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult(* VGUFuncs::RenderFill) (VGUSurface *target, const VGUPath *path, const VGUMatrix3 *matrix, const VGUFillAttr *attr, const VGUPaintStyle *style) ``` -**描述:** +**描述:** 使用指定的渲染对象来填充路径。 @@ -4012,7 +3990,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult(* VGUFuncs::RenderStroke) (VGUSurface *target, const VGUPath *path, const VGUMatrix3 *matrix, const VGUStrokeAttr *attr, const VGUPaintStyle *style) ``` -**描述:** +**描述:** 使用指定的渲染对象来描边路径。 @@ -4040,7 +4018,7 @@ VGU_SUCCESS 表示执行成功。 VGUResult(* VGUFuncs::RenderSync) (int32_t timeOut) ``` -**描述:** +**描述:** 同步硬件加速模块绘制或搬移操作。 @@ -4059,14 +4037,14 @@ VGU_SUCCESS 表示执行成功。 其他值表示执行失败,具体错误码查看[VGUResult](#vguresult)。 -### reserve +### reserve[0] ``` int32_t ExtDataHandle::reserve[0] ``` -**描述:** +**描述:** reserve数组 @@ -4078,7 +4056,7 @@ reserve数组 uint32_t ExtDataHandle::reserveInts ``` -**描述:** +**描述:** reserve数组的个数 @@ -4090,7 +4068,7 @@ reserve数组的个数 int32_t DisplayInfo::rotAngle ``` -**描述:** +**描述:** 显示屏旋转角度 @@ -4102,7 +4080,7 @@ int32_t DisplayInfo::rotAngle TransformType GfxOpt::rotateType ``` -**描述:** +**描述:** 旋转类型 @@ -4114,7 +4092,7 @@ TransformType GfxOpt::rotateType VGUFillRule VGUFillAttr::rule ``` -**描述:** +**描述:** 填充规格 @@ -4126,7 +4104,7 @@ VGUFillRule VGUFillAttr::rule uint8_t* VGUPath::segment ``` -**描述:** +**描述:** 存放路径命令数据 @@ -4138,7 +4116,7 @@ uint8_t* VGUPath::segment int32_t(* DeviceFuncs::SetDisplayBacklight) (uint32_t devId, uint32_t level) ``` -**描述:** +**描述:** 设置显示设备当前的背光值。 @@ -4165,7 +4143,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::SetDisplayClientBuffer) (uint32_t devId, const BufferHandle *buffer, int32_t fence) ``` -**描述:** +**描述:** 设置显示设备的显示缓存。 @@ -4193,7 +4171,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::SetDisplayClientCrop) (uint32_t devId, IRect *rect) ``` -**描述:** +**描述:** 设置显示设备的裁剪区域。 @@ -4220,7 +4198,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::SetDisplayClientDamage) (uint32_t devId, uint32_t num, IRect *rect) ``` -**描述:** +**描述:** 设置显示设备的显示脏区。 @@ -4248,7 +4226,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::SetDisplayClientDestRect) (uint32_t devId, IRect *rect) ``` -**描述:** +**描述:** 设置显示设备的显示区域。 @@ -4275,7 +4253,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::SetDisplayColorGamut) (uint32_t devId, ColorGamut gamut) ``` -**描述:** +**描述:** 设置显示设备当前的色域模式。 @@ -4300,7 +4278,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::SetDisplayColorTransform) (uint32_t devId, const float *matrix) ``` -**描述:** +**描述:** 设置显示设备当前的4x4的颜色转换矩阵。 @@ -4325,7 +4303,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::SetDisplayGamutMap) (uint32_t devId, GamutMap gamutMap) ``` -**描述:** +**描述:** 设置显示设备当前的色域映射模式。 @@ -4350,7 +4328,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::SetDisplayMode) (uint32_t devId, uint32_t modeId) ``` -**描述:** +**描述:** 设置显示设备的显示模式。 @@ -4377,7 +4355,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::SetDisplayPowerStatus) (uint32_t devId, DispPowerStatus status) ``` -**描述:** +**描述:** 设置显示设备当前的电源状态。 @@ -4404,7 +4382,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::SetDisplayProperty) (uint32_t devId, uint32_t id, uint64_t value) ``` -**描述:** +**描述:** 设置显示设备属性值。 @@ -4432,7 +4410,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::SetDisplayVsyncEnabled) (uint32_t devId, bool enabled) ``` -**描述:** +**描述:** 使能垂直同步信号。 @@ -4459,7 +4437,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* DeviceFuncs::SetVirtualDisplayBuffer) (uint32_t devId, BufferHandle *buffer, int32_t fence) ``` -**描述:** +**描述:** 设置虚拟屏的输出缓存。 @@ -4487,7 +4465,7 @@ DISPLAY_SUCCESS 表示执行成功。 VGUSolid* VGUPaintStyle::solid ``` -**描述:** +**描述:** 颜色对象 @@ -4499,7 +4477,7 @@ VGUSolid* VGUPaintStyle::solid VGUFillSpread VGUGradient::spread ``` -**描述:** +**描述:** 渐变延伸模式 @@ -4511,9 +4489,9 @@ VGUFillSpread VGUGradient::spread float VGUColorStop::stop ``` -**描述:** +**描述:** -颜色偏移位置,取值范围是 0.0 ~ 1.0。 +颜色偏移位置,值范围是 0.0 ~ 1.0 ### stopCount @@ -4523,7 +4501,7 @@ float VGUColorStop::stop uint16_t VGUGradient::stopCount ``` -**描述:** +**描述:** 渐变停止颜色个数 @@ -4535,7 +4513,7 @@ uint16_t VGUGradient::stopCount int32_t ISurface::stride ``` -**描述:** +**描述:** 图像跨度 @@ -4547,7 +4525,7 @@ int32_t ISurface::stride uint32_t VGUBuffer::stride ``` -**描述:** +**描述:** 位图stride @@ -4559,7 +4537,7 @@ uint32_t VGUBuffer::stride uint32_t DisplayCapability::supportLayers ``` -**描述:** +**描述:** 支持的图层数 @@ -4571,7 +4549,7 @@ uint32_t DisplayCapability::supportLayers bool DisplayCapability::supportWriteBack ``` -**描述:** +**描述:** 是否支持回写 @@ -4583,7 +4561,7 @@ bool DisplayCapability::supportWriteBack int64_t PresentTimestamp::time ``` -**描述:** +**描述:** 类型对应的值 @@ -4595,7 +4573,7 @@ int64_t PresentTimestamp::time LayerType LayerInfo::type ``` -**描述:** +**描述:** 图层类型,包括图形层、视频层和媒体播放模式 @@ -4607,7 +4585,7 @@ LayerType LayerInfo::type InterfaceType DisplayCapability::type ``` -**描述:** +**描述:** 显示屏接口类型 @@ -4619,7 +4597,7 @@ InterfaceType DisplayCapability::type PresentTimestampType PresentTimestamp::type ``` -**描述:** +**描述:** 上屏时间戳类型 @@ -4631,7 +4609,7 @@ PresentTimestampType PresentTimestamp::type VGUPathDataType VGUPath::type ``` -**描述:** +**描述:** 路径数据存储类型 @@ -4643,7 +4621,7 @@ VGUPathDataType VGUPath::type uint32_t VGUMatrix3::type ``` -**描述:** +**描述:** 矩阵变换类型,简单变换为缩放,平移,90度倍数旋转 @@ -4655,7 +4633,7 @@ uint32_t VGUMatrix3::type VGUGradientType VGUGradient::type ``` -**描述:** +**描述:** 渐变类型 @@ -4667,7 +4645,7 @@ VGUGradientType VGUGradient::type VGUPaintType VGUPaintStyle::type ``` -**描述:** +**描述:** 渲染类型 @@ -4679,7 +4657,7 @@ VGUPaintType VGUPaintStyle::type size_t YUVDescInfo::uOffset ``` -**描述:** +**描述:** U的偏移量 @@ -4691,7 +4669,7 @@ U的偏移量 uint64_t AllocInfo::usage ``` -**描述:** +**描述:** 申请内存的使用场景 @@ -4703,7 +4681,7 @@ uint64_t AllocInfo::usage uint64_t VerifyAllocInfo::usage ``` -**描述:** +**描述:** 内存的用处 @@ -4715,7 +4693,7 @@ uint64_t VerifyAllocInfo::usage size_t YUVDescInfo::uvStep ``` -**描述:** +**描述:** UV的step信息 @@ -4724,10 +4702,10 @@ UV的step信息 ``` -size_t __attribute__::uvStride +size_t YUVDescInfo::uvStride ``` -**描述:** +**描述:** UV的stride信息 @@ -4739,7 +4717,7 @@ UV的stride信息 uint64_t PropertyObject::value ``` -**描述:** +**描述:** 属性值 @@ -4751,7 +4729,7 @@ uint64_t PropertyObject::value float HDRMetaData::value ``` -**描述:** +**描述:** 关键字对应的值 @@ -4763,7 +4741,7 @@ float HDRMetaData::value void* BufferData::virAddr ``` -**描述:** +**描述:** 虚拟内存地址 @@ -4775,7 +4753,7 @@ void* BufferData::virAddr void* VGUBuffer::virAddr ``` -**描述:** +**描述:** 位图缓存的虚拟地址 @@ -4787,7 +4765,7 @@ void* VGUBuffer::virAddr uint32_t DisplayCapability::virtualDispCount ``` -**描述:** +**描述:** 支持的虚拟屏数 @@ -4799,7 +4777,7 @@ uint32_t DisplayCapability::virtualDispCount size_t YUVDescInfo::vOffset ``` -**描述:** +**描述:** V的偏移量 @@ -4811,7 +4789,7 @@ V的偏移量 int32_t IRect::w ``` -**描述:** +**描述:** 矩形框宽度 @@ -4823,7 +4801,7 @@ int32_t IRect::w VGUScalar VGURect::w ``` -**描述:** +**描述:** 矩形宽度 @@ -4835,7 +4813,7 @@ VGUScalar VGURect::w uint32_t DisplayInfo::width ``` -**描述:** +**描述:** 显示屏宽度 @@ -4847,7 +4825,7 @@ uint32_t DisplayInfo::width int32_t LayerInfo::width ``` -**描述:** +**描述:** 图层宽度 @@ -4859,7 +4837,7 @@ int32_t LayerInfo::width int32_t LayerBuffer::width ``` -**描述:** +**描述:** buffer宽度 @@ -4871,7 +4849,7 @@ buffer宽度 int32_t ISurface::width ``` -**描述:** +**描述:** 图像宽度 @@ -4883,7 +4861,7 @@ int32_t ISurface::width int32_t DisplayModeInfo::width ``` -**描述:** +**描述:** 像素宽度 @@ -4895,7 +4873,7 @@ int32_t DisplayModeInfo::width uint32_t AllocInfo::width ``` -**描述:** +**描述:** 申请内存宽度 @@ -4907,7 +4885,7 @@ uint32_t AllocInfo::width uint32_t VerifyAllocInfo::width ``` -**描述:** +**描述:** 分配内存的宽度 @@ -4919,7 +4897,7 @@ uint32_t VerifyAllocInfo::width uint32_t VGUBuffer::width ``` -**描述:** +**描述:** 位图宽度 @@ -4931,7 +4909,7 @@ uint32_t VGUBuffer::width float VGUStrokeAttr::width ``` -**描述:** +**描述:** 线宽 @@ -4943,7 +4921,7 @@ float VGUStrokeAttr::width VGUWrapType VGUPattern::wrapx ``` -**描述:** +**描述:** 图像水平方向平铺类型 @@ -4955,7 +4933,7 @@ VGUWrapType VGUPattern::wrapx VGUWrapType VGUPattern::wrapy ``` -**描述:** +**描述:** 图像垂直方向平铺类型 @@ -4967,7 +4945,7 @@ VGUWrapType VGUPattern::wrapy int32_t IRect::x ``` -**描述:** +**描述:** 矩形框起始x坐标 @@ -4979,7 +4957,7 @@ int32_t IRect::x int32_t ICircle::x ``` -**描述:** +**描述:** 圆心x坐标 @@ -4991,7 +4969,7 @@ int32_t ICircle::x VGUScalar VGUPoint::x ``` -**描述:** +**描述:** 点水平坐标 @@ -5003,7 +4981,7 @@ VGUScalar VGUPoint::x VGUScalar VGURect::x ``` -**描述:** +**描述:** 矩形水平起始坐标 @@ -5015,7 +4993,7 @@ VGUScalar VGURect::x int32_t ILine::x0 ``` -**描述:** +**描述:** 线条起点的x坐标 @@ -5027,7 +5005,7 @@ int32_t ILine::x0 VGUScalar VGURadial::x0 ``` -**描述:** +**描述:** 内圈圆心水平坐标 @@ -5039,7 +5017,7 @@ VGUScalar VGURadial::x0 int32_t ILine::x1 ``` -**描述:** +**描述:** 线条终点的x坐标 @@ -5051,7 +5029,7 @@ int32_t ILine::x1 VGUScalar VGULinear::x1 ``` -**描述:** +**描述:** 线性渐变起点水平坐标 @@ -5063,7 +5041,7 @@ VGUScalar VGULinear::x1 VGUScalar VGURadial::x1 ``` -**描述:** +**描述:** 外圈圆心水平坐标 @@ -5075,7 +5053,7 @@ VGUScalar VGURadial::x1 VGUScalar VGULinear::x2 ``` -**描述:** +**描述:** 线性渐变终点水平坐标 @@ -5087,7 +5065,7 @@ VGUScalar VGULinear::x2 int32_t IRect::y ``` -**描述:** +**描述:** 矩形框起始y坐标 @@ -5099,7 +5077,7 @@ int32_t IRect::y int32_t ICircle::y ``` -**描述:** +**描述:** 圆心y坐标r @@ -5111,7 +5089,7 @@ int32_t ICircle::y VGUScalar VGUPoint::y ``` -**描述:** +**描述:** 点垂直坐标 @@ -5123,7 +5101,7 @@ VGUScalar VGUPoint::y VGUScalar VGURect::y ``` -**描述:** +**描述:** 矩形垂直起始坐标 @@ -5135,7 +5113,7 @@ VGUScalar VGURect::y int32_t ILine::y0 ``` -**描述:** +**描述:** 线条起点的y坐标 @@ -5147,7 +5125,7 @@ int32_t ILine::y0 VGUScalar VGURadial::y0 ``` -**描述:** +**描述:** 内圈圆心垂直坐标 @@ -5159,7 +5137,7 @@ VGUScalar VGURadial::y0 int32_t ILine::y1 ``` -**描述:** +**描述:** 线条终点的y坐标 @@ -5171,7 +5149,7 @@ int32_t ILine::y1 VGUScalar VGULinear::y1 ``` -**描述:** +**描述:** 线性渐变起点垂直坐标 @@ -5183,7 +5161,7 @@ VGUScalar VGULinear::y1 VGUScalar VGURadial::y1 ``` -**描述:** +**描述:** 外圈圆心垂直坐标 @@ -5195,7 +5173,7 @@ VGUScalar VGURadial::y1 VGUScalar VGULinear::y2 ``` -**描述:** +**描述:** 线性渐变终点垂直坐标 @@ -5207,7 +5185,7 @@ VGUScalar VGULinear::y2 size_t YUVDescInfo::yOffset ``` -**描述:** +**描述:** Y的偏移量 @@ -5219,6 +5197,6 @@ Y的偏移量 size_t YUVDescInfo::yStride ``` -**描述:** +**描述:** Y的stride信息 diff --git a/zh-cn/device-dev/reference/hdi-apis/_display_capability.md b/zh-cn/device-dev/reference/hdi-apis/_display_capability.md index dc9fb8e076741b999ee98f403c7c5e563d2e7ffc..e7e4a9706e83a16cf37c9a4de0e44dee26b8a39e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_display_capability.md +++ b/zh-cn/device-dev/reference/hdi-apis/_display_capability.md @@ -1,7 +1,7 @@ # DisplayCapability -## **概述** +## 概述 定义输出性能。 @@ -10,19 +10,19 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [name [PROPERTY_NAME_LEN]](_display.md#name-22) | 显示设备名称 | -| [type](_display.md#type-27) | 显示屏接口类型 | -| [phyWidth](_display.md#phywidth) | 物理宽度 | -| [phyHeight](_display.md#phyheight) | 物理高度 | -| [supportLayers](_display.md#supportlayers) | 支持的图层数 | -| [virtualDispCount](_display.md#virtualdispcount) | 支持的虚拟屏数 | -| [supportWriteBack](_display.md#supportwriteback) | 是否支持回写 | -| [propertyCount](_display.md#propertycount) | 属性数组大小 | -| [props](_display.md#props) | 属性数组 | +| [name](_display.md#name-22) [[PROPERTY_NAME_LEN](_display.md#property_name_len)] | char
显示设备名称 | +| [type](_display.md#type-27) | [InterfaceType](_display.md#interfacetype)
显示屏接口类型 | +| [phyWidth](_display.md#phywidth) | uint32_t
物理宽度 | +| [phyHeight](_display.md#phyheight) | uint32_t
物理高度 | +| [supportLayers](_display.md#supportlayers) | uint32_t
支持的图层数 | +| [virtualDispCount](_display.md#virtualdispcount) | uint32_t
支持的虚拟屏数 | +| [supportWriteBack](_display.md#supportwriteback) | bool
是否支持回写 | +| [propertyCount](_display.md#propertycount) | uint32_t
属性数组大小 | +| [props](_display.md#props) | [PropertyObject](_property_object.md) \*
属性数组 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_display_info.md b/zh-cn/device-dev/reference/hdi-apis/_display_info.md index daaa760ad656a45a7877199274a37ddf1b369f11..956de749039a198cc898eac85236ade0c368bf0e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_display_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_display_info.md @@ -1,22 +1,22 @@ # DisplayInfo -## **概述** +## 概述 -定义显示信息结构体。 +定义显示信息结构体 **相关模块:** [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [width](_display.md#width-19) | 显示屏宽度 | -| [height](_display.md#height-18) | 显示屏高度 | -| [rotAngle](_display.md#rotangle) | 显示屏旋转角度 | +| [width](_display.md#width-19) | uint32_t
显示屏宽度 | +| [height](_display.md#height-18) | uint32_t
显示屏高度 | +| [rotAngle](_display.md#rotangle) | int32_t
显示屏旋转角度 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_display_mode_info.md b/zh-cn/device-dev/reference/hdi-apis/_display_mode_info.md index a89c6e0ff77a5b9bf8d183a17539c9ea4f651919..2573c915996568b4597b84d499e5c6eee11c9736 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_display_mode_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_display_mode_info.md @@ -1,7 +1,7 @@ # DisplayModeInfo -## **概述** +## 概述 定义输出模式信息。 @@ -10,14 +10,14 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [width](_display.md#width-59) | 像素宽度 | -| [height](_display.md#height-58) | 像素高度 | -| [freshRate](_display.md#freshrate) | 刷新速率 | -| [id](_display.md#id) | 模式ID | +| [width](_display.md#width-59) | int32_t
像素宽度 | +| [height](_display.md#height-58) | int32_t
像素高度 | +| [freshRate](_display.md#freshrate) | uint32_t
刷新速率 | +| [id](_display.md#id) | int32_t
模式ID | diff --git a/zh-cn/device-dev/reference/hdi-apis/_div_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_div_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..80f6ab5e158a9e2d92cdaeede7782fd8c5c4b767 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_div_fusion.md @@ -0,0 +1,49 @@ +# DivFusion + + +## 概述 + +将两个tensor执行除法运算。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_DIV_FUSION。 + +输入: + +- x1,int或float类型的张量。 + +- x2,int或float类型的张量。 + +输出: + +- output, 输出两输入相除后的结果。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [activationType](#activationtype) | enum [ActivationType](_n_n_rt.md#activationtype)
激活函数类型,详情请参考:[Activation](_activation.md)。  | + + +## 类成员变量说明 + + +### activationType + + +``` +enum ActivationType DivFusion::activationType +``` +**描述:** +激活函数类型,详情请参考:[Activation](_activation.md)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_dtmf_info.md b/zh-cn/device-dev/reference/hdi-apis/_dtmf_info.md new file mode 100644 index 0000000000000000000000000000000000000000..17c2945f4f7cf063cc426e5deba9a4563bbdc77c --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_dtmf_info.md @@ -0,0 +1,77 @@ +# DtmfInfo + + +## 概述 + +发送双音多频(DTMF)信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [callId](#callid) | int
呼叫 ID  | +| [onLength](#onlength) | int
DTMF音播放的时长  | +| [offLength](#offlength) | int
DTMF发送的间隔  | +| [stringLength](#stringlength) | int
DTMF字符串长度  | +| [dtmfKey](#dtmfkey) | String
DTMF关键字  | + + +## 类成员变量说明 + + +### callId + + +``` +int DtmfInfo::callId +``` +**描述:** +呼叫 ID + + +### dtmfKey + + +``` +String DtmfInfo::dtmfKey +``` +**描述:** +DTMF关键字 + + +### offLength + + +``` +int DtmfInfo::offLength +``` +**描述:** +DTMF发送的间隔 + + +### onLength + + +``` +int DtmfInfo::onLength +``` +**描述:** +DTMF音播放的时长 + + +### stringLength + + +``` +int DtmfInfo::stringLength +``` +**描述:** +DTMF字符串长度 diff --git a/zh-cn/device-dev/reference/hdi-apis/_eltwise.md b/zh-cn/device-dev/reference/hdi-apis/_eltwise.md new file mode 100644 index 0000000000000000000000000000000000000000..692f87e77cff8d8ea25e4ba248ae70224207516f --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_eltwise.md @@ -0,0 +1,49 @@ +# Eltwise + + +## 概述 + +元素级别操作的算子。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_ELTWISE。 + +输入: + +- x1,第一个输入张量。 + +- x2,第二个输入张量。 + +输出: + +- output,与x1有相同的数据类型和形状。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [mode](#mode) | enum [EltwiseMode](_n_n_rt.md#eltwisemode)
元素级别操作的类型,详情请参考:[EltwiseMode](_n_n_rt.md#eltwisemode)。  | + + +## 类成员变量说明 + + +### mode + + +``` +enum EltwiseMode Eltwise::mode +``` +**描述:** +元素级别操作的类型,详情请参考:[EltwiseMode](_n_n_rt.md#eltwisemode)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_emergency_call.md b/zh-cn/device-dev/reference/hdi-apis/_emergency_call.md new file mode 100644 index 0000000000000000000000000000000000000000..7ae78e8c2c5968a59432cc815c9c82e96b6f8c5c --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_emergency_call.md @@ -0,0 +1,99 @@ +# EmergencyCall + + +## 概述 + +紧急呼叫号码。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [index](#index) | int
号码条数索引  | +| [total](#total) | int
号码总条数  | +| [eccNum](#eccnum) | String
号码  | +| [mcc](#mcc) | String
国家码  | +| [eccType](#ecctype) | enum [EccType](_ril.md#ecctype)
紧急呼叫类型,具体查看[EccType](_ril.md#ecctype) | +| [simpresent](#simpresent) | enum [SimpresentType](_ril.md#simpresenttype)
表示号码是有卡时生效还是无卡生效,具体查看[SimpresentType](_ril.md#simpresenttype) | +| [abnormalService](#abnormalservice) | enum [AbnormalServiceType](_ril.md#abnormalservicetype)
表示号码有效性是否区分CS域非正常服务状态,具体查看**AbnormalService** | + + +## 类成员变量说明 + + +### abnormalService + + +``` +enum AbnormalServiceType EmergencyCall::abnormalService +``` +**描述:** +表示号码有效性是否区分CS域非正常服务状态,具体查看**AbnormalService** + + +### eccNum + + +``` +String EmergencyCall::eccNum +``` +**描述:** +号码 + + +### eccType + + +``` +enum EccType EmergencyCall::eccType +``` +**描述:** +紧急呼叫类型,具体查看[EccType](_ril.md#ecctype) + + +### index + + +``` +int EmergencyCall::index +``` +**描述:** +号码条数索引 + + +### mcc + + +``` +String EmergencyCall::mcc +``` +**描述:** +国家码 + + +### simpresent + + +``` +enum SimpresentType EmergencyCall::simpresent +``` +**描述:** +表示号码是有卡时生效还是无卡生效,具体查看[SimpresentType](_ril.md#simpresenttype) + + +### total + + +``` +int EmergencyCall::total +``` +**描述:** +号码总条数 diff --git a/zh-cn/device-dev/reference/hdi-apis/_emergency_info_list.md b/zh-cn/device-dev/reference/hdi-apis/_emergency_info_list.md new file mode 100644 index 0000000000000000000000000000000000000000..ace398558a4ec449c6fe4472ba314a8989b0c7ad --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_emergency_info_list.md @@ -0,0 +1,55 @@ +# EmergencyInfoList + + +## 概述 + +紧急呼叫号码列表。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [callSize](#callsize) | int
总数  | +| [flag](#flag) | int
号码列表标识  | +| [calls](#calls) | List< struct [EmergencyCall](_emergency_call.md) >
号码列表  | + + +## 类成员变量说明 + + +### calls + + +``` +List EmergencyInfoList::calls +``` +**描述:** +号码列表 + + +### callSize + + +``` +int EmergencyInfoList::callSize +``` +**描述:** +总数 + + +### flag + + +``` +int EmergencyInfoList::flag +``` +**描述:** +号码列表标识 diff --git a/zh-cn/device-dev/reference/hdi-apis/_enroll_param.md b/zh-cn/device-dev/reference/hdi-apis/_enroll_param.md index df3fc98fbc8e6a2a2938fc0d6435ac6459b38677..0bdf64c814a2434c0036c85593bacd8d4970a798 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_enroll_param.md +++ b/zh-cn/device-dev/reference/hdi-apis/_enroll_param.md @@ -1,36 +1,32 @@ # EnrollParam -## **概述** +## 概述 -录入结果信息。 - -**Since:** +注册认证凭据参数。 +**Since:** 3.2 - -**Version:** - +**Version:** 1.0 - -**所属模块:** +**相关模块:** [HdfUserAuth](_hdf_user_auth.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [authType](#authtype) | 用户认证凭据类型。 | -| [executorType](#executortype) | 执行器类型。 | -| [executorSensorHint](#executorsensorhint) | 既定用户认证凭据类型的执行器传感器提示,用于找到对应认证方式的传感器。 | +| [authType](#authtype) | enum [AuthType](_hdf_user_auth.md#authtype)
用户认证凭据类型AuthType}。  | +| [executorType](#executortype) | unsigned int
执行器类型。  | +| [executorSensorHint](#executorsensorhint) | unsigned int
既定用户认证凭据类型的执行器传感器提示,用于找到对应认证方式的传感器。  | -## **类成员变量说明** +## 类成员变量说明 ### authType @@ -39,10 +35,8 @@ ``` enum AuthType EnrollParam::authType ``` - -**描述:** - -用户认证凭据类型。 +**描述:** +用户认证凭据类型AuthType}。 ### executorSensorHint @@ -51,9 +45,7 @@ enum AuthType EnrollParam::authType ``` unsigned int EnrollParam::executorSensorHint ``` - -**描述:** - +**描述:** 既定用户认证凭据类型的执行器传感器提示,用于找到对应认证方式的传感器。 @@ -63,7 +55,5 @@ unsigned int EnrollParam::executorSensorHint ``` unsigned int EnrollParam::executorType ``` - -**描述:** - +**描述:** 执行器类型。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_enroll_result_info.md b/zh-cn/device-dev/reference/hdi-apis/_enroll_result_info.md new file mode 100644 index 0000000000000000000000000000000000000000..45242651b033c2b78a2d6b770bbd73cf00ad5701 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_enroll_result_info.md @@ -0,0 +1,59 @@ +# EnrollResultInfo + + +## 概述 + +录入结果信息。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[HdfUserAuth](_hdf_user_auth.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [credentialId](#credentialid) | unsigned long
认证凭据ID  | +| [oldInfo](#oldinfo) | struct [CredentialInfo](_credential_info.md)
旧凭据信息[CredentialInfo](_credential_info.md)。  | +| [rootSecret](#rootsecret) | unsigned char[]
保护文件加密密钥的密钥。  | + + +## 类成员变量说明 + + +### credentialId + + +``` +unsigned long EnrollResultInfo::credentialId +``` +**描述:** +认证凭据ID + + +### oldInfo + + +``` +struct CredentialInfo EnrollResultInfo::oldInfo +``` +**描述:** +旧凭据信息[CredentialInfo](_credential_info.md)。 + + +### rootSecret + + +``` +unsigned char [] EnrollResultInfo::rootSecret +``` +**描述:** +保护文件加密密钥的密钥。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_enroll_resultinfo.md b/zh-cn/device-dev/reference/hdi-apis/_enroll_resultinfo.md deleted file mode 100644 index c16294b124fd10052766e2eec171eefcc2c388d8..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_enroll_resultinfo.md +++ /dev/null @@ -1,69 +0,0 @@ -# EnrollResultInfo - - -## **概述** - -注册认证凭据参数。 - -**Since:** - -3.2 - -**Version:** - -1.0 - -**所属模块:** - -[HdfUserAuth](_hdf_user_auth.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| [credentialId](#credentialid) | 认证凭据ID。 | -| [oldInfo](#oldinfo) | 旧凭据信息。 | -| [rootSecret](#rootsecret) | 保护文件加密密钥的密钥。 | - - -## **类成员变量说明** - - -### credentialId - - -``` -unsigned long EnrollResultInfo::credentialId -``` - -**描述:** - -认证凭据ID。 - - -### oldInfo - - -``` -struct CredentialInfo EnrollParam::oldInfo -``` - -**描述:** - -旧凭据信息[CredentialInfo](_credential_info.md)。 - - -### rootSecret - - -``` -unsigned char[] EnrollParam::rootSecret -``` - -**描述:** - -保护文件加密密钥的密钥。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_enrolled_info.md b/zh-cn/device-dev/reference/hdi-apis/_enrolled_info.md index 63fe13082c82824a84d862b0c6ce7acd0798553f..421e72fb52260dd2b1723cd2b97b9a76b65b0f09 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_enrolled_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_enrolled_info.md @@ -1,35 +1,31 @@ # EnrolledInfo -## **概述** +## 概述 注册信息。 -**Since:** - +**Since:** 3.2 - -**Version:** - +**Version:** 1.0 - -**所属模块:** +**相关模块:** [HdfUserAuth](_hdf_user_auth.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [enrolledId](#enrolledid) | 注册ID,用户注册新的认证凭据时会更新注册ID。 | -| [authType](#authtype) | 用户认证凭据类型。 | +| [enrolledId](#enrolledid) | unsigned long
注册ID,用户注册新的认证凭据时会更新注册ID。  | +| [authType](#authtype) | enum [AuthType](_hdf_user_auth.md#authtype)
用户认证凭据类型AuthType}。  | -## **类成员变量说明** +## 类成员变量说明 ### authType @@ -38,10 +34,8 @@ ``` enum AuthType EnrolledInfo::authType ``` - -**描述:** - -用户认证凭据类型[AuthType](_hdf_user_auth.md#authtype)。 +**描述:** +用户认证凭据类型AuthType}。 ### enrolledId @@ -50,7 +44,5 @@ enum AuthType EnrolledInfo::authType ``` unsigned long EnrolledInfo::enrolledId ``` - -**描述:** - +**描述:** 注册ID,用户注册新的认证凭据时会更新注册ID。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_event_info.md b/zh-cn/device-dev/reference/hdi-apis/_event_info.md index 93032444d007f364a50ec8e287d948efa8702e38..8681bb54e77682cbc653554b59544ef218b3a299 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_event_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_event_info.md @@ -1,31 +1,31 @@ # EventInfo -## **概述** +## 概述 定义事件上报信息。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [appData](#appdata) | 设置回调时给入的上层实例。 | -| [appDataLen](#appdatalen) | appData字节数。 | -| [data1](#data1) | 事件上报携带的数据1。 | -| [data2](#data2) | 事件上报携带的数据2。 | -| [eventData](#eventdata) | 事件上报携带的数据信息。 | -| [eventDataLen](#eventdatalen) | eventData字节数。 | +| [appData](#appdata) | int8_t \*
设置回调时给入的上层实例。  | +| [appDataLen](#appdatalen) | uint32_t
appData字节数。  | +| [data1](#data1) | uint32_t
事件上报携带的数据1。  | +| [data2](#data2) | uint32_t
事件上报携带的数据2。  | +| [eventData](#eventdata) | int8_t \*
事件上报携带的数据信息。  | +| [eventDataLen](#eventdatalen) | uint32_t
eventData字节数。  | -## **类成员变量说明** +## 类成员变量说明 ### appData @@ -34,9 +34,7 @@ ``` int8_t* EventInfo::appData ``` - -**描述:** - +**描述:** 设置回调时给入的上层实例。 @@ -46,9 +44,7 @@ int8_t* EventInfo::appData ``` uint32_t EventInfo::appDataLen ``` - -**描述:** - +**描述:** appData字节数。 @@ -58,9 +54,7 @@ appData字节数。 ``` uint32_t EventInfo::data1 ``` - -**描述:** - +**描述:** 事件上报携带的数据1。 @@ -70,9 +64,7 @@ uint32_t EventInfo::data1 ``` uint32_t EventInfo::data2 ``` - -**描述:** - +**描述:** 事件上报携带的数据2。 @@ -82,9 +74,7 @@ uint32_t EventInfo::data2 ``` int8_t* EventInfo::eventData ``` - -**描述:** - +**描述:** 事件上报携带的数据信息。 @@ -94,7 +84,5 @@ int8_t* EventInfo::eventData ``` uint32_t EventInfo::eventDataLen ``` - -**描述:** - +**描述:** eventData字节数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_ex_data_handle.md b/zh-cn/device-dev/reference/hdi-apis/_ex_data_handle.md new file mode 100644 index 0000000000000000000000000000000000000000..c5a731ea5e761a1549f4bc25cfd7366a615ca62e --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_ex_data_handle.md @@ -0,0 +1,22 @@ +# ExtDataHandle + + +## 概述 + +扩展数据句柄结构体定义 + +**相关模块:** + +[Display](_display.md) + + +## 汇总 + + +### Public 属性 + +| 名称 | 描述 | +| -------- | -------- | +| [fd](_display.md#fd) | int32_t
句柄 fd,-1代表不支持 | +| [reserveInts](_display.md#reserveints) | uint32_t
reserve数组的个数 | +| [reserve[0]](_display.md#reserve0) | int32_t
reserve数组 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_executor_info.md b/zh-cn/device-dev/reference/hdi-apis/_executor_info.md deleted file mode 100644 index c67700a04747ebc6a061cf7cb6cab70699090524..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_executor_info.md +++ /dev/null @@ -1,147 +0,0 @@ -# ExecutorInfo - - -## **概述** - -执行器信息。 - -**Since:** - -3.2 - -**Version:** - -1.0 - -**所属模块:** - -[HdfFaceAuth](_hdf_face_auth.md) | [HdfPinAuth](_hdf_pin_auth.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| [sensorId](#sensorid) | 传感器ID,不同传感器在人脸/口令认证驱动内的唯一标识。 | -| [executorType](#executortype) | 执行器类型,根据执行器支持的能力/算法类型进行分类。 | -| [index](#index) | 用户认证框架的执行器索引。 | -| [executorRole](#executorrole) | 执行器角色。 | -| [authType](#authtype) | 用户认证凭据类型。 | -| [esl](#esl) | 执行器安全等级。 | -| [publicKey](#publickey) | 执行器公钥,用于校验该执行器私钥签名的信息。 | -| [extraInfo](#extrainfo) | 其他相关信息,用于支持信息扩展。 | -| [info](#info) | 执行器注册信息。 | - - -## **类成员变量说明** - - -### authType - - -``` -enum AuthType ExecutorInfo::authType -``` - -**描述:** - -用户认证凭据类型。 - - -### esl - - -``` -enum ExecutorSecureLevel ExecutorInfo::esl -``` - -**描述:** - -执行器安全等级[ExecutorSecureLevel](_hdf_face_auth.md#executorsecurelevel)。 - - -### executorRole - - -``` -enum ExecutorRole ExecutorInfo::executorRole -``` - -**描述:** - -执行器角色[ExecutorRole](_hdf_face_auth.md#executorrole)。 - - -### executorType - - -``` -unsigned int ExecutorInfo::executorType -``` - -**描述:** - -执行器类型,根据执行器支持的能力/算法类型进行分类。 - - -### extraInfo - - -``` -unsigned char [] ExecutorInfo::extraInfo -``` - -**描述:** - -其他相关信息,用于支持信息扩展。 - - -### index - - -``` -unsigned long ExecutorInfo::index -``` - -**描述:** - -用户认证框架的执行器索引。 - - -### info - - -``` -struct ExecutorRegisterInfo ExecutorInfo::info -``` - -**描述:** - -执行器注册信息ExecutorRegisterInfo。 - - -### publicKey - - -``` -unsigned char [] ExecutorInfo::publicKey -``` - -**描述:** - -执行器公钥,用于校验该执行器私钥签名的信息。 - - -### sensorId - - -``` -unsigned short ExecutorInfo::sensorId -``` - -**描述:** - -传感器ID,不同传感器在人脸认证驱动、口令认证驱动内的唯一标识。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_executor_info_faceauth.md b/zh-cn/device-dev/reference/hdi-apis/_executor_info_faceauth.md new file mode 100644 index 0000000000000000000000000000000000000000..86a02978abcdf8b7f4a300d068cc4d05b35b3b03 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_executor_info_faceauth.md @@ -0,0 +1,121 @@ +# ExecutorInfo + + +## 概述 + +执行器信息。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[HdfFaceAuth](_hdf_face_auth.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [sensorId](#sensorid) | unsigned short
传感器ID,不同传感器在人脸认证驱动内的唯一标识。 | +| [executorType](#executortype) | unsigned int
执行器类型,根据执行器支持的能力进行分类。 | +| [executorRole](#executorrole) | enum [ExecutorRole](_hdf_face_auth.md#executorrole)
执行器角色ExecutorRole}。 | +| [authType](#authtype) | enum [AuthType](_hdf_face_auth.md#authtype)
用户认证凭据类型。 | +| [esl](#esl) | enum [ExecutorSecureLevel](_hdf_face_auth.md#executorsecurelevel)
执行器安全等级。 | +| [publicKey](#publickey) | unsigned char[]
执行器公钥,用于校验该执行器私钥签名的信息。 | +| [extraInfo](#extrainfo) | unsigned char[]
其他相关信息,用于支持信息扩展。 | + + +## 类成员变量说明 + + +### authType + + +``` +enum AuthType ExecutorInfo::authType +``` + +**描述:** + +用户认证凭据类型[AuthType](_hdf_face_auth.md#authtype)。 + + +### esl + + +``` +enum ExecutorSecureLevel ExecutorInfo::esl +``` + +**描述:** + +执行器安全等级[ExecutorSecureLevel](_hdf_face_auth.md#executorsecurelevel)。 + + +### executorRole + + +``` +enum ExecutorRole ExecutorInfo::executorRole +``` + +**描述:** + +执行器角色[ExecutorRole](_hdf_face_auth.md#executorrole)。 + + +### executorType + + +``` +unsigned int ExecutorInfo::executorType +``` + +**描述:** + +执行器类型,根据执行器支持的能力进行分类。 + + +### extraInfo + + +``` +unsigned char [] ExecutorInfo::extraInfo +``` + +**描述:** + +其他相关信息,用于支持信息扩展。 + + +### publicKey + + +``` +unsigned char [] ExecutorInfo::publicKey +``` + +**描述:** + +执行器公钥,用于校验该执行器私钥签名的信息。 + + +### sensorId + + +``` +unsigned short ExecutorInfo::sensorId +``` + +**描述:** + +传感器ID,不同传感器在人脸认证驱动内的唯一标识。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_executor_info_pinauth.md b/zh-cn/device-dev/reference/hdi-apis/_executor_info_pinauth.md new file mode 100644 index 0000000000000000000000000000000000000000..9e190484ae621b08ebb349c8097d90e2db867e8e --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_executor_info_pinauth.md @@ -0,0 +1,121 @@ +# ExecutorInfo + + +## 概述 + +执行器信息。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[HdfPinAuth](_hdf_pin_auth.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [sensorId](#sensorid) | unsigned short
传感器ID,不同传感器在口令认证驱动内的唯一标识。 | +| [executorType](#executortype) | unsigned int
执行器类型,根据执行器支持的算法类型进行分类。 | +| [executorRole](#executorrole) | enum [ExecutorRole](_hdf_pin_auth.md#executorrole)
执行器角色。 | +| [authType](#authtype) | enum [AuthType](_hdf_pin_auth.md#authtype)
用户认证凭据类型。 | +| [esl](#esl) | enum [ExecutorSecureLevel](_hdf_pin_auth.md#executorsecurelevel)
执行器安全等级。 | +| [publicKey](#publickey) | unsigned char[]
执行器公钥,用于校验该执行器私钥签名的信息。 | +| [extraInfo](#extrainfo) | unsigned char[]
其他相关信息,用户支持信息扩展。 | + + +## 类成员变量说明 + + +### authType + + +``` +enum AuthType ExecutorInfo::authType +``` + +**描述:** + +用户认证凭据类型[AuthType](_hdf_pin_auth.md#authtype)。 + + +### esl + + +``` +enum ExecutorSecureLevel ExecutorInfo::esl +``` + +**描述:** + +执行器安全等级[ExecutorSecureLevel](_hdf_pin_auth.md#executorsecurelevel)。 + + +### executorRole + + +``` +enum ExecutorRole ExecutorInfo::executorRole +``` + +**描述:** + +执行器角色[ExecutorRole](_hdf_pin_auth.md#executorrole)。 + + +### executorType + + +``` +unsigned int ExecutorInfo::executorType +``` + +**描述:** + +执行器类型,根据执行器支持的算法类型进行分类。 + + +### extraInfo + + +``` +unsigned char [] ExecutorInfo::extraInfo +``` + +**描述:** + +其他相关信息,用户支持信息扩展。 + + +### publicKey + + +``` +unsigned char [] ExecutorInfo::publicKey +``` + +**描述:** + +执行器公钥,用于校验该执行器私钥签名的信息。 + + +### sensorId + + +``` +unsigned short ExecutorInfo::sensorId +``` + +**描述:** + +传感器ID,不同传感器在口令认证驱动内的唯一标识。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_executor_info_userauth.md b/zh-cn/device-dev/reference/hdi-apis/_executor_info_userauth.md new file mode 100644 index 0000000000000000000000000000000000000000..bba0bb7fcf8135720d0456301d8dcf0cb0c35bb5 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_executor_info_userauth.md @@ -0,0 +1,56 @@ +# ExecutorInfo + + +## 概述 + +执行器信息。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[HdfUserAuth](_hdf_user_auth.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [executorIndex](#executorindex) | unsigned long
用户认证框架的执行器索引。 | +| [info](#info) | struct [ExecutorRegisterInfo](_executor_register_info.md)
执行器注册信息ExecutorRegisterInfo}。 | + + +## 类成员变量说明 + + +### executorIndex + + +``` +unsigned long ExecutorInfo::executorIndex +``` + +**描述:** + +用户认证框架的执行器索引。 + + +### info + + +``` +struct ExecutorRegisterInfo ExecutorInfo::info +``` + +**描述:** + +执行器注册信息ExecutorRegisterInfo}。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_executor_register_info.md b/zh-cn/device-dev/reference/hdi-apis/_executor_register_info.md index a0ee3deb5f7e7e0ae97a1c5f3ce6db95bd42bc88..44c727b4973c35369348e2421f044f24fb532a50 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_executor_register_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_executor_register_info.md @@ -1,39 +1,39 @@ # ExecutorRegisterInfo -## **概述** +## 概述 执行器注册信息。 -**Since:** +**Since:** 3.2 -**Version:** +**Version:** 1.0 -**所属模块:** +**相关模块:** [HdfUserAuth](_hdf_user_auth.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [authType](#authtype) | 用户认证凭据类型。 | -| [executorRole](#executorrole) | 执行器角色。 | -| [executorSensorHint](#executorsensorhint) | 既定用户认证凭据类型的执行器ID。 | -| [executorMatcher](#executormatcher) | 执行器类型,根据执行器支持的认证能力进行分类。 | -| [esl](#esl) | 执行器安全等级。 | -| [publicKey](#publickey) | 执行器公钥,用于校验该执行器私钥签名的信息。 | +| [authType](#authtype) | enum [AuthType](_hdf_user_auth.md#authtype)
用户认证凭据类型。 | +| [executorRole](#executorrole) | enum [ExecutorRole](_hdf_user_auth.md#executorrole)
执行器角色。 | +| [executorSensorHint](#executorsensorhint) | unsigned int
既定用户认证凭据类型的执行器传感器提示,用于找到对应认证方式的传感器。 | +| [executorMatcher](#executormatcher) | unsigned int
执行器匹配器,根据执行器支持的认证能力进行分类。 | +| [esl](#esl) | enum [ExecutorSecureLevel](_hdf_user_auth.md#executorsecurelevel)
执行器安全等级。 | +| [publicKey](#publickey) | unsigned char[]
执行器公钥,用于校验该执行器私钥签名的信息。 | -## **类成员变量说明** +## 类成员变量说明 ### authType @@ -43,9 +43,9 @@ enum AuthType ExecutorRegisterInfo::authType ``` -**描述:** +**描述:** -用户认证凭据类型。 +用户认证凭据类型[AuthType](_hdf_user_auth.md#authtype)。 ### esl @@ -55,21 +55,21 @@ enum AuthType ExecutorRegisterInfo::authType enum ExecutorSecureLevel ExecutorRegisterInfo::esl ``` -**描述:** +**描述:** 执行器安全等级[ExecutorSecureLevel](_hdf_user_auth.md#executorsecurelevel)。 -### executorSensorHint +### executorMatcher ``` -unsigned int ExecutorRegisterInfo::executorSensorHint +unsigned int ExecutorRegisterInfo::executorMatcher ``` -**描述:** +**描述:** -既定用户认证凭据类型的执行器传感器提示,用于找到对应认证方式的传感器。 +执行器匹配器,根据执行器支持的认证能力进行分类。 ### executorRole @@ -79,21 +79,21 @@ unsigned int ExecutorRegisterInfo::executorSensorHint enum ExecutorRole ExecutorRegisterInfo::executorRole ``` -**描述:** +**描述:** 执行器角色[ExecutorRole](_hdf_user_auth.md#executorrole)。 -### executorMatcher +### executorSensorHint ``` -unsigned int ExecutorRegisterInfo::executorMatcher +unsigned int ExecutorRegisterInfo::executorSensorHint ``` -**描述:** +**描述:** -执行器匹配器,根据执行器支持的认证能力进行分类。 +既定用户认证凭据类型的执行器传感器提示,用于找到对应认证方式的传感器。 ### publicKey @@ -103,6 +103,6 @@ unsigned int ExecutorRegisterInfo::executorMatcher unsigned char [] ExecutorRegisterInfo::publicKey ``` -**描述:** +**描述:** 执行器公钥,用于校验该执行器私钥签名的信息。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_executor_send_msg.md b/zh-cn/device-dev/reference/hdi-apis/_executor_send_msg.md index ba9ea1bf58db81a19ebdff5a34eb0a5e0031563f..415e5d0da81e31f64ec9c5b92636a2cc64ca868a 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_executor_send_msg.md +++ b/zh-cn/device-dev/reference/hdi-apis/_executor_send_msg.md @@ -1,60 +1,52 @@ # ExecutorSendMsg -## **概述** +## 概述 执行器发送的消息。 -**Since:** - +**Since:** 3.2 - -**Version:** - +**Version:** 1.0 - -**所属模块:** +**相关模块:** [HdfUserAuth](_hdf_user_auth.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [executorIndex](#executorindex) | 用户认证框架的执行器索引。 | -| [commandId](#commandid) | 消息命令ID。 | -| [msg](#msg) | 执行器发送的消息。 | +| [executorIndex](#executorindex) | unsigned long
用户认证框架的执行器索引。  | +| [commandId](#commandid) | int
消息命令ID。  | +| [msg](#msg) | unsigned char[]
执行器发送的消息。  | -## **类成员变量说明** +## 类成员变量说明 -### executorIndex +### commandId ``` -unsigned long ExecutorSendMsg::executorIndex +int ExecutorSendMsg::commandId ``` - -**描述:** - -用户认证框架的执行器索引。 +**描述:** +消息命令ID。 -### commandId +### executorIndex ``` -unsigned int ExecutorSendMsg::commandId +unsigned long ExecutorSendMsg::executorIndex ``` - -**描述:** - -消息命令ID。 +**描述:** +用户认证框架的执行器索引。 ### msg @@ -63,7 +55,5 @@ unsigned int ExecutorSendMsg::commandId ``` unsigned char [] ExecutorSendMsg::msg ``` - -**描述:** - +**描述:** 执行器发送的消息。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_expand_dims.md b/zh-cn/device-dev/reference/hdi-apis/_expand_dims.md new file mode 100644 index 0000000000000000000000000000000000000000..132202d7620c4a91eb0ce4c2d215248e695927d7 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_expand_dims.md @@ -0,0 +1,26 @@ +# ExpandDims + + +## 概述 + +在给定轴上为tensor添加一个额外的维度。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_EXPAND_DIMS。 + +输入: + +- x,n维tensor + +- axis,需要添加的维度的index,int32_t类型,值必须在[-dim-1,dim],且只允许常量值。 + +输出: + +- output,给定轴上添加了额外额度的算子。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_ext_data_handle.md b/zh-cn/device-dev/reference/hdi-apis/_ext_data_handle.md deleted file mode 100644 index eb120bcd201dd27759e96c7dd73872c7f004b28e..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_ext_data_handle.md +++ /dev/null @@ -1,22 +0,0 @@ -# ExtDataHandle - - -## **概述** - -扩展数据句柄结构体定义。 - -**相关模块:** - -[Display](_display.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| [fd](_display.md#fd) | 句柄fd,-1代表不支持。 | -| [reserveInts](_display.md#reserveints) | reserve数组的个数。 | -| [reserve](_display.md#reserve) [0] | reserve数组。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_face_auth_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_face_auth_types_8idl.md index 580e403779f4246547b52d2e90534a6c230ad0ae..77e033bd74b7bb7b716e1ae314f7f7c69530f882 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_face_auth_types_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_face_auth_types_8idl.md @@ -1,43 +1,43 @@ # FaceAuthTypes.idl -## **概述** +## 概述 定义人脸认证驱动的枚举类和数据结构。 -**Since:** +**Since:** 3.2 -**所属模块:** +**相关模块:** [HdfFaceAuth](_hdf_face_auth.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [ExecutorInfo](_executor_info.md) | 执行器信息。 | -| [TemplateInfo](_template_info.md) | 凭据模版信息。 | +| [ExecutorInfo](_executor_info_faceauth.md) | struct
执行器信息。 | +| [TemplateInfo](_template_info_faceauth.md) | struct
凭据模版信息。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [AuthType](_hdf_face_auth.md#authtype): int { PIN = 1, FACE = 2, FINGERPRINT = 4 } | 枚举用户认证凭据类型。 | -| [ExecutorRole](_hdf_face_auth.md#executorrole): int { COLLECTOR = 1, VERIFIER = 2, ALL_IN_ONE = 3 } | 枚举执行器角色。 | -| [ExecutorSecureLevel](_hdf_face_auth.md#executorsecurelevel): int { ESL0 = 0, ESL1 = 1, ESL2 = 2, ESL3 = 3 } | 枚举执行器安全等级。 | -| [CommandId](_hdf_face_auth.md#commandid): int { LOCK_TEMPLATE = 1, UNLOCK_TEMPLATE = 2, VENDOR_COMMAND_BEGIN = 10000 } | 枚举人脸认证功能相关操作命令。 | -| [FaceTipsCode](_hdf_face_auth.md#facetipscode): int { FACE_AUTH_TIP_TOO_BRIGHT = 1, FACE_AUTH_TIP_TOO_DARK = 2, FACE_AUTH_TIP_TOO_CLOSE = 3, FACE_AUTH_TIP_TOO_FAR = 4,   FACE_AUTH_TIP_TOO_HIGH = 5, FACE_AUTH_TIP_TOO_LOW = 6, FACE_AUTH_TIP_TOO_RIGHT = 7, FACE_AUTH_TIP_TOO_LEFT = 8,   FACE_AUTH_TIP_TOO_MUCH_MOTION = 9, FACE_AUTH_TIP_POOR_GAZE = 10, FACE_AUTH_TIP_NOT_DETECTED = 11, VENDOR_FACE_AUTH_TIP_BEGIN = 10000 } | 枚举提示信息编码。 | +| [AuthType](_hdf_face_auth.md#authtype) : int { PIN = 1, FACE = 2, FINGERPRINT = 4 } | 枚举用户认证凭据类型。 | +| [ExecutorRole](_hdf_face_auth.md#executorrole) : int { COLLECTOR = 1, VERIFIER = 2, ALL_IN_ONE = 3 } | 枚举执行器角色。 | +| [ExecutorSecureLevel](_hdf_face_auth.md#executorsecurelevel) : int { ESL0 = 0, ESL1 = 1, ESL2 = 2, ESL3 = 3 } | 枚举执行器安全等级。 | +| [CommandId](_hdf_face_auth.md#commandid) : int { LOCK_TEMPLATE = 1, UNLOCK_TEMPLATE = 2, VENDOR_COMMAND_BEGIN = 10000 } | 枚举人脸认证功能相关操作命令。 | +| [FaceTipsCode](_hdf_face_auth.md#facetipscode) : int { FACE_AUTH_TIP_TOO_BRIGHT = 1, FACE_AUTH_TIP_TOO_DARK = 2, FACE_AUTH_TIP_TOO_CLOSE = 3, FACE_AUTH_TIP_TOO_FAR = 4,   FACE_AUTH_TIP_TOO_HIGH = 5, FACE_AUTH_TIP_TOO_LOW = 6, FACE_AUTH_TIP_TOO_RIGHT = 7, FACE_AUTH_TIP_TOO_LEFT = 8,   FACE_AUTH_TIP_TOO_MUCH_MOTION = 9, FACE_AUTH_TIP_POOR_GAZE = 10, FACE_AUTH_TIP_NOT_DETECTED = 11, VENDOR_FACE_AUTH_TIP_BEGIN = 10000 } | 枚举提示信息编码。 | ### 关键字 | 名称 | 描述 | | -------- | -------- | -| package ohos.hdi.face_auth.v1_0 | 人脸认证接口的包路径 | +| package ohos.hdi.face_auth.v1_0 | 人脸认证接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_fill.md b/zh-cn/device-dev/reference/hdi-apis/_fill.md new file mode 100644 index 0000000000000000000000000000000000000000..fd04cd8d974358b4331af9b838cd38f3188b5688 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_fill.md @@ -0,0 +1,30 @@ +# Fill + + +## 概述 + +根据指定的维度,创建由一个标量填充的tensor。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_FILL。 + +输入: + +- value,填充的标量。 + +- shape,指定创建张量的维度。 + +输出: + +- output,填充之后的tensor。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_full_connection.md b/zh-cn/device-dev/reference/hdi-apis/_full_connection.md new file mode 100644 index 0000000000000000000000000000000000000000..d94d7bc5eccffedc80a95eeea1030a5bace3eabc --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_full_connection.md @@ -0,0 +1,98 @@ +# FullConnection + + +## 概述 + +对输入数据做全连接。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_FULL_CONNECTION。 + +参数限制:useAxis为true的时候axis必须设置,useAxis为false的时候axis为0。 + +输入: + +- x,n维tensor + +- weight,全连接的权重张量。 + +- bias,全连接的偏置,在量化场景下不需要量化参数,其量化版本要求输入 int32 类型数据,实际量化参数由 x 和 weight 共同决定。 + +输出: + +- output,输出运算后的张量。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [hasBias](#hasbias) | boolean
是否使用bias。 | +| [useAxis](#useaxis) | boolean
是否使用轴。 | +| [axis](#axis) | long
指定输入张量做全连接的轴,从指定轴axis开始,将axis和axis之后的轴展开成1维张量之后再做全连接。 | +| [activationType](#activationtype) | enum [ActivationType](_n_n_rt.md#activationtype)
激活函数类型,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。 | + + +## 类成员变量说明 + + +### activationType + + +``` +enum ActivationType FullConnection::activationType +``` + +**描述:** + +激活函数类型,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。 + + +### axis + + +``` +long FullConnection::axis +``` + +**描述:** + +指定输入张量做全连接的轴,从指定轴axis开始,将axis和axis之后的轴展开成1维张量之后再做全连接。 + + +### hasBias + + +``` +boolean FullConnection::hasBias +``` + +**描述:** + +是否使用bias。 + + +### useAxis + + +``` +boolean FullConnection::useAxis +``` + +**描述:** + +是否使用轴。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_fused_batch_norm.md b/zh-cn/device-dev/reference/hdi-apis/_fused_batch_norm.md new file mode 100644 index 0000000000000000000000000000000000000000..a0d68de8b4900329f26e84aae1aa08b1a75a65c1 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_fused_batch_norm.md @@ -0,0 +1,55 @@ +# FusedBatchNorm + + +## 概述 + +对一个tensor进行批标准化的运算。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_FUSED_BATCH_NORM。 + +输入: + +- x,n维tensor,要求形状为[N,...,C],即第n维是通道数(channel)。 + +- scale,缩放因子的1D张量,用于缩放归一化的第一个张量。 + +- offset,用于偏移的1D张量,以移动到归一化的第一个张量。 + +- mean,总体均值的一维张量,仅用于推理;对于训练,必须为空。 + +- variance,用于总体方差的一维张量。仅用于推理;对于训练,必须为空。 + +输出: + +- output,输出运算后的张量。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [epsilon](#epsilon) | float
趋于零的极小值,用于保证除数不为0。  | + + +## 类成员变量说明 + + +### epsilon + + +``` +float FusedBatchNorm::epsilon +``` +**描述:** +趋于零的极小值,用于保证除数不为0。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_gather.md b/zh-cn/device-dev/reference/hdi-apis/_gather.md new file mode 100644 index 0000000000000000000000000000000000000000..1d314e4b5a18709989a7624079ca406815bbdfef --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_gather.md @@ -0,0 +1,28 @@ +# Gather + + +## 概述 + +根据指定的索引和轴返回输入tensor的切片。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_GATHER。 + +输入: + +- x,n维tensor。 + +- inputIndices,指定输入x在axis上的索引,是一个int类型的数组,值必须在[0,x.shape[axis])范围内。 + +- axis,指定x被切片的轴,int32_t类型的数组,数组长度为1。 + +输出: + +- output,输出切片后的tensor。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_geo_location_info.md b/zh-cn/device-dev/reference/hdi-apis/_geo_location_info.md new file mode 100644 index 0000000000000000000000000000000000000000..062cef440bd0b4f8a6bb9fbee64b38737b447191 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_geo_location_info.md @@ -0,0 +1,112 @@ +# GeoLocationInfo + + +## 概述 + +定义设备具体位置信息的数据结构。 + +**Since:** +4.0 +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [flags](#flags) | unsigned short
bit0表示经纬度是否有效,bit5表示精度是否有效。0表示无效,1表示有效。  | +| [latitude](#latitude) | double
纬度  | +| [longitude](#longitude) | double
经度  | +| [altitude](#altitude) | double
海拔高度,单位米  | +| [accuracy](#accuracy) | float
精度,单位米  | +| [speed](#speed) | float
移动速度,单位米/秒  | +| [bearing](#bearing) | float
导向  | +| [timeStamp](#timestamp) | long
时间戳,单位纳秒  | + + +## 类成员变量说明 + + +### accuracy + + +``` +float GeoLocationInfo::accuracy +``` +**描述:** +精度,单位米 + + +### altitude + + +``` +double GeoLocationInfo::altitude +``` +**描述:** +海拔高度,单位米 + + +### bearing + + +``` +float GeoLocationInfo::bearing +``` +**描述:** +导向 + + +### flags + + +``` +unsigned short GeoLocationInfo::flags +``` +**描述:** +bit0表示经纬度是否有效,bit5表示精度是否有效。0表示无效,1表示有效。 + + +### latitude + + +``` +double GeoLocationInfo::latitude +``` +**描述:** +纬度 + + +### longitude + + +``` +double GeoLocationInfo::longitude +``` +**描述:** +经度 + + +### speed + + +``` +float GeoLocationInfo::speed +``` +**描述:** +移动速度,单位米/秒 + + +### timeStamp + + +``` +long GeoLocationInfo::timeStamp +``` +**描述:** +时间戳,单位纳秒 diff --git a/zh-cn/device-dev/reference/hdi-apis/_geofence_cell_info.md b/zh-cn/device-dev/reference/hdi-apis/_geofence_cell_info.md new file mode 100644 index 0000000000000000000000000000000000000000..50dafd2ba54be30f7235d181f347507500f44291 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_geofence_cell_info.md @@ -0,0 +1,52 @@ +# GeofenceCellInfo + + +## 概述 + +定义设备驻留的基站小区信息的数据结构。 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [cell](#cell) | struct [CurrentCell](_current_cell.md)
设备驻留的基站主区信息。详见[CurrentCell](_current_cell.md)。 | +| [neighborCells](#neighborcells) | struct [NeighborCell](_neighbor_cell.md)[]
设备驻留的基站邻区信息。详见[NeighborCell](_neighbor_cell.md)。 | + + +## 类成员变量说明 + + +### cell + + +``` +struct CurrentCell GeofenceCellInfo::cell +``` + +**描述:** + +设备驻留的基站主区信息。详见[CurrentCell](_current_cell.md)。 + + +### neighborCells + + +``` +struct NeighborCell [] GeofenceCellInfo::neighborCells +``` + +**描述:** + +设备驻留的基站邻区信息。详见[NeighborCell](_neighbor_cell.md)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_geofence_circle_request.md b/zh-cn/device-dev/reference/hdi-apis/_geofence_circle_request.md new file mode 100644 index 0000000000000000000000000000000000000000..999f5ae0c22535e48540aa2884f5b82a8f02dcca --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_geofence_circle_request.md @@ -0,0 +1,117 @@ +# GeofenceCircleRequest + + +## 概述 + +定义添加圆形地理围栏的数据结构。 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [geofenceId](#geofenceid) | int
地理围栏的ID号,用于标识某个地理围栏,不可重复添加相同ID号的围栏。 | +| [point](#point) | struct [Point](_point.md)
圆形地理围栏的中心点坐标。详见[Point](_point.md)。 | +| [radius](#radius) | double
圆形地理围栏的半径,单位为米。 | +| [accuracy](#accuracy) | unsigned short
圆形地理围栏的精度。详见[GeofenceAccuracy](_hdi_lpfence_geofence.md#geofenceaccuracy)。 | +| [loiterTimeMs](#loitertimems) | unsigned int
徘徊时间,单位为毫秒,需关注[GEOFENCE_TRANSITION_DWELL](_hdi_lpfence_geofence.md#geofencetransition)事件。若设备在圆形围栏内徘徊时间达到该值,则上报[GEOFENCE_TRANSITION_DWELL](_hdi_lpfence_geofence.md#geofencetransition)事件。 | +| [monitorTransitions](#monitortransitions) | unsigned char
关注的圆形围栏事件,若设备满足关注的事件则会进行上报。详见[GeofenceTransition](_hdi_lpfence_geofence.md#geofencetransition)。 | +| [attribute](#attribute) | unsigned int
设置圆形地理围栏。详见[GeofenceAttribute](_hdi_lpfence_geofence.md#geofenceattribute)。 | + + +## 类成员变量说明 + + +### accuracy + + +``` +unsigned short GeofenceCircleRequest::accuracy +``` + +**描述:** + +圆形地理围栏的精度。详见[GeofenceAccuracy](_hdi_lpfence_geofence.md#geofenceaccuracy)。 + + +### attribute + + +``` +unsigned int GeofenceCircleRequest::attribute +``` + +**描述:** + +设置圆形地理围栏。详见[GeofenceAttribute](_hdi_lpfence_geofence.md#geofenceattribute)。 + + +### geofenceId + + +``` +int GeofenceCircleRequest::geofenceId +``` + +**描述:** + +地理围栏的ID号,用于标识某个地理围栏,不可重复添加相同ID号的围栏。 + + +### loiterTimeMs + + +``` +unsigned int GeofenceCircleRequest::loiterTimeMs +``` + +**描述:** + +徘徊时间,单位为毫秒,需关注[GEOFENCE_TRANSITION_DWELL](_hdi_lpfence_geofence.md#geofencetransition)事件。若设备在圆形围栏内徘徊时间达到该值,则上报[GEOFENCE_TRANSITION_DWELL](_hdi_lpfence_geofence.md#geofencetransition)事件。 + + +### monitorTransitions + + +``` +unsigned char GeofenceCircleRequest::monitorTransitions +``` + +**描述:** + +关注的圆形围栏事件,若设备满足关注的事件则会进行上报。详见[GeofenceTransition](_hdi_lpfence_geofence.md#geofencetransition)。 + + +### point + + +``` +struct Point GeofenceCircleRequest::point +``` + +**描述:** + +圆形地理围栏的中心点坐标。详见[Point](_point.md)。 + + +### radius + + +``` +double GeofenceCircleRequest::radius +``` + +**描述:** + +圆形地理围栏的半径,单位为米。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_geofence_polygon_request.md b/zh-cn/device-dev/reference/hdi-apis/_geofence_polygon_request.md new file mode 100644 index 0000000000000000000000000000000000000000..001ed2293689e838aca6913b46f0f76eb038e3b4 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_geofence_polygon_request.md @@ -0,0 +1,104 @@ +# GeofencePolygonRequest + + +## 概述 + +定义添加多边形地理围栏的数据结构。 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [geofenceId](#geofenceid) | int
地理围栏的ID号,用于标识某个地理围栏,不可重复添加相同ID号的围栏。 | +| [points](#points) | struct [Point](_point.md)[]
多边形地理围栏的边界坐标,仅支持凸多边形。详见[Point](_point.md)。 | +| [accuracy](#accuracy) | unsigned short
多边形地理围栏的精度。详见[GeofenceAccuracy](_hdi_lpfence_geofence.md#geofenceaccuracy)。 | +| [loiterTimeMs](#loitertimems) | unsigned int
徘徊时间,单位为毫秒,需关注[GEOFENCE_TRANSITION_DWELL](_hdi_lpfence_geofence.md#geofencetransition)事件。若设备在多边形围栏内徘徊时间达到该值,则上报[GEOFENCE_TRANSITION_DWELL](_hdi_lpfence_geofence.md#geofencetransition)事件。 | +| [monitorTransitions](#monitortransitions) | unsigned char
关注的多边形围栏事件,若设备满足关注的事件则会进行上报。详见[GeofenceTransition](_hdi_lpfence_geofence.md#geofencetransition)。 | +| [attribute](#attribute) | unsigned int
设置多边形地理围栏。详见[GeofenceAttribute](_hdi_lpfence_geofence.md#geofenceattribute)。 | + + +## 类成员变量说明 + + +### accuracy + + +``` +unsigned short GeofencePolygonRequest::accuracy +``` + +**描述:** + +多边形地理围栏的精度。详见[GeofenceAccuracy](_hdi_lpfence_geofence.md#geofenceaccuracy)。 + + +### attribute + + +``` +unsigned int GeofencePolygonRequest::attribute +``` + +**描述:** + +设置多边形地理围栏。详见[GeofenceAttribute](_hdi_lpfence_geofence.md#geofenceattribute)。 + + +### geofenceId + + +``` +int GeofencePolygonRequest::geofenceId +``` + +**描述:** + +地理围栏的ID号,用于标识某个地理围栏,不可重复添加相同ID号的围栏。 + + +### loiterTimeMs + + +``` +unsigned int GeofencePolygonRequest::loiterTimeMs +``` + +**描述:** + +徘徊时间,单位为毫秒,需关注[GEOFENCE_TRANSITION_DWELL](_hdi_lpfence_geofence.md#geofencetransition)事件。若设备在多边形围栏内徘徊时间达到该值,则上报[GEOFENCE_TRANSITION_DWELL](_hdi_lpfence_geofence.md#geofencetransition)事件。 + + +### monitorTransitions + + +``` +unsigned char GeofencePolygonRequest::monitorTransitions +``` + +**描述:** + +关注的多边形围栏事件,若设备满足关注的事件则会进行上报。详见[GeofenceTransition](_hdi_lpfence_geofence.md#geofencetransition)。 + + +### points + + +``` +struct Point [] GeofencePolygonRequest::points +``` + +**描述:** + +多边形地理围栏的边界坐标,仅支持凸多边形。详见[Point](_point.md)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_geofence_result.md b/zh-cn/device-dev/reference/hdi-apis/_geofence_result.md new file mode 100644 index 0000000000000000000000000000000000000000..cff40f4929c0828c94b8855c9708754f0b0cb649 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_geofence_result.md @@ -0,0 +1,46 @@ +# GeofenceResult + + +## 概述 + +定义添加或删除地理围栏执行结果的数据结构。 + +**Since:** +4.0 +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [geofenceId](#geofenceid) | int
地理围栏的ID号。  | +| [result](#result) | int
返回值。0表示操作成功,负数表示操作失败。  | + + +## 类成员变量说明 + + +### geofenceId + + +``` +int GeofenceResult::geofenceId +``` +**描述:** +地理围栏的ID号。 + + +### result + + +``` +int GeofenceResult::result +``` +**描述:** +返回值。0表示操作成功,负数表示操作失败。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_geofence_size.md b/zh-cn/device-dev/reference/hdi-apis/_geofence_size.md new file mode 100644 index 0000000000000000000000000000000000000000..477d8a345ffa45ea455d957365a572a5e5746e38 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_geofence_size.md @@ -0,0 +1,68 @@ +# GeofenceSize + + +## 概述 + +定义地理围栏使用信息的数据结构。 + +**Since:** +4.0 +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [circleMaxNum](#circlemaxnum) | unsigned int
设备支持添加圆形围栏的最大个数。  | +| [polygonMaxNum](#polygonmaxnum) | unsigned int
设备支持添加多边形围栏的最大个数。  | +| [circleUsedNum](#circleusednum) | unsigned int
设备当前已添加的圆形围栏个数。  | +| [polygonUsedNum](#polygonusednum) | unsigned int
设备当前已添加的多边形围栏个数。  | + + +## 类成员变量说明 + + +### circleMaxNum + + +``` +unsigned int GeofenceSize::circleMaxNum +``` +**描述:** +设备支持添加圆形围栏的最大个数。 + + +### circleUsedNum + + +``` +unsigned int GeofenceSize::circleUsedNum +``` +**描述:** +设备当前已添加的圆形围栏个数。 + + +### polygonMaxNum + + +``` +unsigned int GeofenceSize::polygonMaxNum +``` +**描述:** +设备支持添加多边形围栏的最大个数。 + + +### polygonUsedNum + + +``` +unsigned int GeofenceSize::polygonUsedNum +``` +**描述:** +设备当前已添加的多边形围栏个数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_geofence_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_geofence_types_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..98122f104b5fc80780f9f4c7967c0bdb8a0231cf --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_geofence_types_8idl.md @@ -0,0 +1,56 @@ +# GeofenceTypes.idl + + +## 概述 + +定义地理围栏使用的数据类型。 + +**Since:** + +4.0 + +**Version:** + +1.0 + +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [Point](_point.md) | struct
定义位置坐标的数据结构。 | +| [GeofenceCircleRequest](_geofence_circle_request.md) | struct
定义添加圆形地理围栏的数据结构。 | +| [GeofencePolygonRequest](_geofence_polygon_request.md) | struct
定义添加多边形地理围栏的数据结构。 | +| [GeofenceResult](_geofence_result.md) | struct
定义添加或删除地理围栏执行结果的数据结构。 | +| [OfflineDb](_offline_db.md) | struct
定义下发基站离线数据库的数据结构。 | +| [GeoLocationInfo](_geo_location_info.md) | struct
定义设备具体位置信息的数据结构。 | +| [GeofenceSize](_geofence_size.md) | struct
定义地理围栏使用信息的数据结构。 | +| [CurrentCell](_current_cell.md) | struct
定义设备驻留的基站主区信息的数据结构。 | +| [NeighborCell](_neighbor_cell.md) | struct
定义设备驻留的基站邻区信息的数据结构。 | +| [GeofenceCellInfo](_geofence_cell_info.md) | struct
定义设备驻留的基站小区信息的数据结构。 | +| [RequestCellDb](_request_cell_db.md) | struct
定义请求基站离线数据库数据的数据结构。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [GeofenceTransition](_hdi_lpfence_geofence.md#geofencetransition) {
GEOFENCE_TRANSITION_ENTERED = (1 << 0) , GEOFENCE_TRANSITION_EXITED = (1 << 1) , GEOFENCE_TRANSITION_UNCERTAIN = (1 << 2) , GEOFENCE_TRANSITION_DWELL = (1 << 3) ,
GEOFENCE_TRANSITION_INDOOR = (1 << 4) , GEOFENCE_TRANSITION_OUTDOOR = (1 << 5)
} | 枚举可关注的地理围栏状态事件。 | +| [GeofenceAttribute](_hdi_lpfence_geofence.md#geofenceattribute) { GEOFENCE_ATTRI_COORDINATE_WGS84 = 16 } | 枚举地理围栏支持的设置项。 | +| [GeofenceAccuracy](_hdi_lpfence_geofence.md#geofenceaccuracy) { ACCURACY_FINE = 1 , ACCURACY_BALANCE = 2 , ACCURACY_COARSE = 3 } | 枚举地理围栏支持的精度模式。 | +| [GeofenceCellType](_hdi_lpfence_geofence.md#geofencecelltype) { GEOFENCE_CELL_G4 = 0 , GEOFENCE_CELL_NR = 1 } | 枚举移动通信技术代。 | +| [GeofenceLocSource](_hdi_lpfence_geofence.md#geofencelocsource) {
GEOFENCE_GNSS = 1 , GEOFENCE_WIFI = 2 , GEOFENCE_SENSOR = 4 , GEOFENCE_CELL = 8 ,
GEOFENCE_BT = 16
} | 枚举位置信息来源。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.geofence.v1_0 | 地理围栏模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_get_buffer_handle_usage_params.md b/zh-cn/device-dev/reference/hdi-apis/_get_buffer_handle_usage_params.md index da5ba0c838ea4dd4d13bf64034bddf6e2697a401..89ce997b4a305094ee25c2b027ad3f93d0b3e2ca 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_get_buffer_handle_usage_params.md +++ b/zh-cn/device-dev/reference/hdi-apis/_get_buffer_handle_usage_params.md @@ -1,29 +1,29 @@ # GetBufferHandleUsageParams -## **概述** +## 概述 BufferHandleUsage类型定义。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [size](#size) | 结构体大小。 | -| [version](#version) | 组件版本信息。 | -| [portIndex](#portindex) | 端口索引。 | -| [usage](#usage) | 申请内存的使用场景。 | +| [size](#size) | uint32_t
结构体大小。  | +| [version](#version) | union OMX_VERSIONTYPE
组件版本信息。  | +| [portIndex](#portindex) | uint32_t
端口索引。  | +| [usage](#usage) | uint32_t
申请内存的使用场景。  | -## **类成员变量说明** +## 类成员变量说明 ### portIndex @@ -32,9 +32,7 @@ BufferHandleUsage类型定义。 ``` uint32_t GetBufferHandleUsageParams::portIndex ``` - -**描述:** - +**描述:** 端口索引。 @@ -44,9 +42,7 @@ uint32_t GetBufferHandleUsageParams::portIndex ``` uint32_t GetBufferHandleUsageParams::size ``` - -**描述:** - +**描述:** 结构体大小。 @@ -56,9 +52,7 @@ uint32_t GetBufferHandleUsageParams::size ``` uint32_t GetBufferHandleUsageParams::usage ``` - -**描述:** - +**描述:** 申请内存的使用场景。 @@ -68,7 +62,5 @@ uint32_t GetBufferHandleUsageParams::usage ``` union OMX_VERSIONTYPE GetBufferHandleUsageParams::version ``` - -**描述:** - +**描述:** 组件版本信息。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_get_clip_result.md b/zh-cn/device-dev/reference/hdi-apis/_get_clip_result.md new file mode 100644 index 0000000000000000000000000000000000000000..b97df3b0a7a28830ba6d6ef2fc0bd7a9700a2b55 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_get_clip_result.md @@ -0,0 +1,61 @@ +# GetClipResult + + +## 概述 + +主叫号码显示结果信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [result](#result) | int
查询结果,具体查看[RilErrType](_ril.md#rilerrtype) | +| [action](#action) | int
禁止或使能CLIP(Calling line Identification Presentation Supplementary Service)功能  | +| [clipStat](#clipstat) | int
CLIP业务在网络的签约状态 | + + +## 类成员变量说明 + + +### action + + +``` +int GetClipResult::action +``` +**描述:** +禁止或使能CLIP(Calling line Identification Presentation Supplementary Service)功能 + + +### clipStat + + +``` +int GetClipResult::clipStat +``` +**描述:** +CLIP业务在网络的签约状态 + +- 0:CLIP业务未提供 + +- 1:CLIP业务已提供 + +- 2:未知(网络原因) + + +### result + + +``` +int GetClipResult::result +``` +**描述:** +查询结果,具体查看[RilErrType](_ril.md#rilerrtype) diff --git a/zh-cn/device-dev/reference/hdi-apis/_get_clir_result.md b/zh-cn/device-dev/reference/hdi-apis/_get_clir_result.md new file mode 100644 index 0000000000000000000000000000000000000000..d127bb94cb44893cc3f56034bddabea05d1bc19c --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_get_clir_result.md @@ -0,0 +1,65 @@ +# GetClirResult + + +## 概述 + +主叫号码显示限制结果信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [result](#result) | int
查询结果,具体查看[RilErrType](_ril.md#rilerrtype) | +| [action](#action) | int
禁止或使能CLIR功能  | +| [clirStat](#clirstat) | int
CLIR业务在网络的签约状态。 | + + +## 类成员变量说明 + + +### action + + +``` +int GetClirResult::action +``` +**描述:** +禁止或使能CLIR功能 + + +### clirStat + + +``` +int GetClirResult::clirStat +``` +**描述:** +CLIR业务在网络的签约状态。 + +- 0:CLIR业务未提供 + +- 1:CLIR业务以永久模式提供 + +- 2:未知(网络原因) + +- 3:CLIR业务临时限制 + +- 4:CLIR业务临时允许 + + +### result + + +``` +int GetClirResult::result +``` +**描述:** +查询结果,具体查看[RilErrType](_ril.md#rilerrtype) diff --git a/zh-cn/device-dev/reference/hdi-apis/_gfx_funcs.md b/zh-cn/device-dev/reference/hdi-apis/_gfx_funcs.md index fcc1c2a22e5cb89102134fe227a7c38a29c82ac2..00d762d69650981dd67e427bb83b281387114b40 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_gfx_funcs.md +++ b/zh-cn/device-dev/reference/hdi-apis/_gfx_funcs.md @@ -1,7 +1,7 @@ # GfxFuncs -## **概述** +## 概述 显示硬件加速驱动接口结构体,定义硬件加速驱动接口函数指针。 @@ -10,24 +10,24 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| ([InitGfx](#initgfx))(void) | 初始化硬件加速。 | -| ([DeinitGfx](#deinitgfx))(void) | 去初始化硬件加速。 | -| ([FillRect](#fillrect))(ISurface \*surface, IRect \*rect, uint32_t color, GfxOpt \*opt) | 填充矩形,用一种颜色填充画布上指定矩形区域的矩形框。 | -| ([DrawRectangle](#drawrectangle))(ISurface \*surface, Rectangle \*rect, uint32_t color, GfxOpt \*opt) | 绘制矩形框,用一种颜色在画布上绘制指定区域的矩形框。 | -| ([DrawLine](#drawline))(ISurface \*surface, ILine \*line, GfxOpt \*opt) | 绘制直线,使用一种颜色在画布上绘制一条直线。 | -| ([DrawCircle](#drawcircle))(ISurface \*surface, ICircle \*circle, GfxOpt \*opt) | 绘制圆形,使用一种颜色在画布上绘制指定圆心和半径的圆。 | -| ([Blit](#blit))(ISurface \*srcSurface, IRect \*srcRect, ISurface \*dstSurface, IRect \*dstRect, GfxOpt \*opt) | 位图搬移 | -| ([Sync](#sync))(int32_t timeOut) | 硬件加速同步。 | +| (\* [InitGfx](#initgfx) )(void) | int32_t
初始化硬件加速。 | +| (\* [DeinitGfx](#deinitgfx) )(void) | int32_t
去初始化硬件加速。 | +| (\* [FillRect](#fillrect) )([ISurface](_i_surface.md) \*surface, [IRect](_i_rect.md) \*rect, uint32_t color, [GfxOpt](_gfx_opt.md) \*opt) | int32_t
填充矩形,用一种颜色填充画布上指定矩形区域的矩形框。 | +| (\* [DrawRectangle](#drawrectangle) )([ISurface](_i_surface.md) \*surface, [Rectangle](_rectangle.md) \*rect, uint32_t color, [GfxOpt](_gfx_opt.md) \*opt) | int32_t
绘制矩形框,用一种颜色在画布上绘制指定区域的矩形框。 | +| (\* [DrawLine](#drawline) )([ISurface](_i_surface.md) \*surface, [ILine](_i_line.md) \*line, [GfxOpt](_gfx_opt.md) \*opt) | int32_t
绘制直线,使用一种颜色在画布上绘制一条直线。 | +| (\* [DrawCircle](#drawcircle) )([ISurface](_i_surface.md) \*surface, [ICircle](_i_circle.md) \*circle, [GfxOpt](_gfx_opt.md) \*opt) | int32_t
绘制圆形,使用一种颜色在画布上绘制指定圆心和半径的圆。 | +| (\* [Blit](#blit) )([ISurface](_i_surface.md) \*srcSurface, [IRect](_i_rect.md) \*srcRect, [ISurface](_i_surface.md) \*dstSurface, [IRect](_i_rect.md) \*dstRect, [GfxOpt](_gfx_opt.md) \*opt) | int32_t
位图搬移 | +| (\* [Sync](#sync) )(int32_t timeOut) | int32_t
硬件加速同步。 | -## **类成员变量说明** +## 类成员变量说明 ### Blit @@ -37,9 +37,9 @@ int32_t(* GfxFuncs::Blit) (ISurface *srcSurface, IRect *srcRect, ISurface *dstSurface, IRect *dstRect, GfxOpt *opt) ``` -**描述:** +**描述:** -位图搬移。 +位图搬移 在位图搬移过程中,可以实现色彩空间转换、缩放、旋转等功能。 @@ -67,7 +67,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* GfxFuncs::DeinitGfx) (void) ``` -**描述:** +**描述:** 去初始化硬件加速。 @@ -89,7 +89,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* GfxFuncs::DrawCircle) (ISurface *surface, ICircle *circle, GfxOpt *opt) ``` -**描述:** +**描述:** 绘制圆形,使用一种颜色在画布上绘制指定圆心和半径的圆。 @@ -115,7 +115,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* GfxFuncs::DrawLine) (ISurface *surface, ILine *line, GfxOpt *opt) ``` -**描述:** +**描述:** 绘制直线,使用一种颜色在画布上绘制一条直线。 @@ -141,7 +141,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* GfxFuncs::DrawRectangle) (ISurface *surface, Rectangle *rect, uint32_t color, GfxOpt *opt) ``` -**描述:** +**描述:** 绘制矩形框,用一种颜色在画布上绘制指定区域的矩形框。 @@ -168,7 +168,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* GfxFuncs::FillRect) (ISurface *surface, IRect *rect, uint32_t color, GfxOpt *opt) ``` -**描述:** +**描述:** 填充矩形,用一种颜色填充画布上指定矩形区域的矩形框。 @@ -195,7 +195,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* GfxFuncs::InitGfx) (void) ``` -**描述:** +**描述:** 初始化硬件加速。 @@ -217,7 +217,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* GfxFuncs::Sync) (int32_t timeOut) ``` -**描述:** +**描述:** 硬件加速同步。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_gfx_opt.md b/zh-cn/device-dev/reference/hdi-apis/_gfx_opt.md index a278028b82892474e27285b6f08fcfc9a72c3cd4..8857c31f6fdd1793fc4d570fd4d02e0fc6640ca0 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_gfx_opt.md +++ b/zh-cn/device-dev/reference/hdi-apis/_gfx_opt.md @@ -1,7 +1,7 @@ # GfxOpt -## **概述** +## 概述 图像硬件加速相关的操作选项结构体定义,用于图像硬件加速时的操作选项。 @@ -10,21 +10,21 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [enGlobalAlpha](_display.md#englobalalpha-22) | 全局Alpha使能标志 | -| [globalAlpha](_display.md#globalalpha) | 全局Alpha的值 | -| [enPixelAlpha](_display.md#enpixelalpha-22) | 像素Alpha使能标志 | -| [blendType](_display.md#blendtype) | 混合方式 | -| [colorKeyFrom](_display.md#colorkeyfrom) | 色键模式 | -| [enableRop](_display.md#enablerop) | Rop功能使能位 | -| [colorRopType](_display.md#colorroptype) | 颜色的Rop类型 | -| [alphaRopType](_display.md#alpharoptype) | Alpha的Rop类型 | -| [enableScale](_display.md#enablescale) | 缩放功能使能位 | -| [rotateType](_display.md#rotatetype) | 旋转类型 | -| [mirrorType](_display.md#mirrortype) | 镜像类型 | +| [enGlobalAlpha](_display.md#englobalalpha-22) | bool
全局alpha使能位 | +| [globalAlpha](_display.md#globalalpha) | uint32_t
全局alpha的值 | +| [enPixelAlpha](_display.md#enpixelalpha-22) | bool
像素alpha使能位 | +| [blendType](_display.md#blendtype) | [BlendType](_display.md#blendtype)
混合方式 | +| [colorKeyFrom](_display.md#colorkeyfrom) | [ColorKey](_display.md#colorkey)
色键模式 | +| [enableRop](_display.md#enablerop) | bool
Rop功能使能位 | +| [colorRopType](_display.md#colorroptype) | [RopType](_display.md#roptype)
颜色的Rop类型 | +| [alphaRopType](_display.md#alpharoptype) | [RopType](_display.md#roptype)
Alpha的Rop类型 | +| [enableScale](_display.md#enablescale) | bool
缩放功能使能位 | +| [rotateType](_display.md#rotatetype) | [TransformType](_display.md#transformtype)
旋转类型 | +| [mirrorType](_display.md#mirrortype) | [MirrorType](_display.md#mirrortype)
镜像类型 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_gralloc_funcs.md b/zh-cn/device-dev/reference/hdi-apis/_gralloc_funcs.md index db86f4424e237c419c2860fd1e64b4f50feeb2b1..92de3a807fc81dcfb677a9d56ca93bb79d76c7fb 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_gralloc_funcs.md +++ b/zh-cn/device-dev/reference/hdi-apis/_gralloc_funcs.md @@ -1,7 +1,7 @@ # GrallocFuncs -## **概述** +## 概述 显示内存驱动接口结构体,定义显示内存驱动接口函数指针。 @@ -10,26 +10,26 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| ([AllocMem](#allocmem))(const AllocInfo \*info, BufferHandle \*\*handle) | 显示内存分配。 | -| ([FreeMem](#freemem))(BufferHandle \*handle) | 显示内存释放。 | -| ([Mmap](#mmap))(BufferHandle \*handle) | 显示内存映射,将内存映射到对应的进程地址空间中。 | -| ([MmapYUV](#mmapyuv))(BufferHandle \*handle, YUVDescInfo \*info) | YUV 内存映射。 | -| ([MmapCache](#mmapcache))(BufferHandle \*handle) | 显示内存映射,将内映射为cache内存到对应的进程地址空间中。 | -| ([Unmap](#unmap))(BufferHandle \*handle) | 内存反映射,将内存进行反映射。 | -| ([FlushCache](#flushcache))(BufferHandle \*handle) | 刷新cache,刷新cache里的内容到内存并且使cache里的内容无效。 | -| ([FlushMCache](#flushmcache))(BufferHandle \*handle) | 刷新Mmap映射的cache,刷新Mmap映射的cache里的内容到内存并且使cache里的内容无效。 | -| ([InvalidateCache](#invalidatecache))(BufferHandle \*handle) | 使cache中的内容无效用以存储更新内存内容。 | -| ([IsSupportedAlloc](#issupportedalloc))(uint32_t num, const VerifyAllocInfo \*infos, bool \*supporteds) | 检测给定的VerifyAllocInfo数组信息能否申请内存成功。 | +| (\* [AllocMem](#allocmem) )(const [AllocInfo](_alloc_info.md) \*info, BufferHandle \*\*handle) | int32_t
显示内存分配。 | +| (\* [FreeMem](#freemem) )(BufferHandle \*handle) | void
显示内存释放。 | +| (\* [Mmap](#mmap) )(BufferHandle \*handle) | void \*
显示内存映射,将内存映射到对应的进程地址空间中。 | +| (\* [MmapYUV](#mmapyuv) )(BufferHandle \*handle, YUVDescInfo \*info) | void \*
YUV 内存映射。 | +| (\* [MmapCache](#mmapcache) )(BufferHandle \*handle) | void \*
显示内存映射,将内存映射为 cache 内存到对应的进程地址空间中。 | +| (\* [Unmap](#unmap) )(BufferHandle \*handle) | int32_t
内存反映射,将内存进行反映射。 | +| (\* [FlushCache](#flushcache) )(BufferHandle \*handle) | int32_t
刷新cache,刷新cache里的内容到内存并且使cache里的内容无效。 | +| (\* [FlushMCache](#flushmcache) )(BufferHandle \*handle) | int32_t
刷新Mmap映射的cache,刷新Mmap映射的cache里的内容到内存并且使cache里的内容无效。 | +| (\* [InvalidateCache](#invalidatecache) )(BufferHandle \*handle) | int32_t
使cache中的内容无效用以存储更新内存内容。 | +| (\* [IsSupportedAlloc](#issupportedalloc) )(uint32_t num, const [VerifyAllocInfo](_verify_alloc_info.md) \*infos, bool \*supporteds) | int32_t
检测给定的VerifyAllocInfo数组信息能否申请内存成功。 | -## **类成员变量说明** +## 类成员变量说明 ### AllocMem @@ -39,7 +39,7 @@ int32_t(* GrallocFuncs::AllocMem) (const AllocInfo *info, BufferHandle **handle) ``` -**描述:** +**描述:** 显示内存分配。 @@ -66,7 +66,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* GrallocFuncs::FlushCache) (BufferHandle *handle) ``` -**描述:** +**描述:** 刷新cache,刷新cache里的内容到内存并且使cache里的内容无效。 @@ -90,7 +90,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* GrallocFuncs::FlushMCache) (BufferHandle *handle) ``` -**描述:** +**描述:** 刷新Mmap映射的cache,刷新Mmap映射的cache里的内容到内存并且使cache里的内容无效。 @@ -114,7 +114,7 @@ DISPLAY_SUCCESS 表示执行成功。 void(* GrallocFuncs::FreeMem) (BufferHandle *handle) ``` -**描述:** +**描述:** 显示内存释放。 @@ -136,7 +136,7 @@ void(* GrallocFuncs::FreeMem) (BufferHandle *handle) int32_t(* GrallocFuncs::InvalidateCache) (BufferHandle *handle) ``` -**描述:** +**描述:** 使cache中的内容无效用以存储更新内存内容。 @@ -160,7 +160,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* GrallocFuncs::IsSupportedAlloc) (uint32_t num, const VerifyAllocInfo *infos, bool *supporteds) ``` -**描述:** +**描述:** 检测给定的VerifyAllocInfo数组信息能否申请内存成功。 @@ -168,8 +168,8 @@ int32_t(* GrallocFuncs::IsSupportedAlloc) (uint32_t num, const VerifyAllocInfo * | 名称 | 描述 | | -------- | -------- | -| num | 输入参数,[VerifyAllocInfo](_verify_alloc_info.md)数组个数。 | -| infos | 输出参数,[VerifyAllocInfo](_verify_alloc_info.md)数组首地址。 | +| num | 输入参数,VerifyAllocInfo数组个数。 | +| infos | 输出参数,VerifyAllocInfo数组首地址。 | | supporteds | 输出参数,supporteds数组首地址, 表示能否申请成功。 | **返回:** @@ -183,10 +183,10 @@ DISPLAY_SUCCESS 表示执行成功。 ``` -void*(* GrallocFuncs::Mmap) (BufferHandle *handle) +void *(* GrallocFuncs::Mmap) (BufferHandle *handle) ``` -**描述:** +**描述:** 显示内存映射,将内存映射到对应的进程地址空间中。 @@ -205,10 +205,10 @@ void*(* GrallocFuncs::Mmap) (BufferHandle *handle) ``` -void*(* GrallocFuncs::MmapCache) (BufferHandle *handle) +void *(* GrallocFuncs::MmapCache) (BufferHandle *handle) ``` -**描述:** +**描述:** 显示内存映射,将内存映射为 cache 内存到对应的进程地址空间中。 @@ -227,10 +227,10 @@ void*(* GrallocFuncs::MmapCache) (BufferHandle *handle) ``` -void*(* GrallocFuncs::MmapYUV) (BufferHandle *handle, YUVDescInfo *info) +void *(* GrallocFuncs::MmapYUV) (BufferHandle *handle, YUVDescInfo *info) ``` -**描述:** +**描述:** YUV 内存映射。 @@ -239,7 +239,7 @@ YUV 内存映射。 | 名称 | 描述 | | -------- | -------- | | handle | 输出参数,指示内存映射的输出缓存。 | -| info | 输出参数,指示内存映射的[YUVDescInfo](_yun_desc_info_.md)信息。 | +| info | 输出参数,指示内存映射的YUVDescInfo信息。 | **返回:** @@ -253,7 +253,7 @@ YUV 内存映射。 int32_t(* GrallocFuncs::Unmap) (BufferHandle *handle) ``` -**描述:** +**描述:** 内存反映射,将内存进行反映射。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_gsm_rssi.md b/zh-cn/device-dev/reference/hdi-apis/_gsm_rssi.md new file mode 100644 index 0000000000000000000000000000000000000000..be0afa4dff064c2e0d1847bc460bca0fa2682a4e --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_gsm_rssi.md @@ -0,0 +1,44 @@ +# GsmRssi + + +## 概述 + +GSM信号强度。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [rxlev](#rxlev) | int
信号接收强度,取值范围0~31  | +| [ber](#ber) | int
误码率,取值范围0~7  | + + +## 类成员变量说明 + + +### ber + + +``` +int GsmRssi::ber +``` +**描述:** +误码率,取值范围0~7 + + +### rxlev + + +``` +int GsmRssi::rxlev +``` +**描述:** +信号接收强度,取值范围0~31 diff --git a/zh-cn/device-dev/reference/hdi-apis/_gsm_sms_message_info.md b/zh-cn/device-dev/reference/hdi-apis/_gsm_sms_message_info.md new file mode 100644 index 0000000000000000000000000000000000000000..b139805bc61f0e5801b64325d27e168dd6374d0a --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_gsm_sms_message_info.md @@ -0,0 +1,66 @@ +# GsmSmsMessageInfo + + +## 概述 + +发送GSM短信信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [state](#state) | int
状态  | +| [smscPdu](#smscpdu) | String
短信业务中心  | +| [pdu](#pdu) | String
协议数据单元  | + + +## 类成员变量说明 + + +### pdu + + +``` +String GsmSmsMessageInfo::pdu +``` +**描述:** +协议数据单元 + + +### serial + + +``` +int GsmSmsMessageInfo::serial +``` +**描述:** +请求的序列号 + + +### smscPdu + + +``` +String GsmSmsMessageInfo::smscPdu +``` +**描述:** +短信业务中心 + + +### state + + +``` +int GsmSmsMessageInfo::state +``` +**描述:** +状态 diff --git a/zh-cn/device-dev/reference/hdi-apis/_h_d_r_capability.md b/zh-cn/device-dev/reference/hdi-apis/_h_d_r_capability.md index a82e3058421ea0160df98b4cfcadb2c127dbf3ea..072d545829576b7ae0e0a15aa0557ca7a7b0d94e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_h_d_r_capability.md +++ b/zh-cn/device-dev/reference/hdi-apis/_h_d_r_capability.md @@ -1,24 +1,24 @@ # HDRCapability -## **概述** +## 概述 -HDR属性结构体定义。 +HDR属性结构体定义 **相关模块:** [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [formatCount](_display.md#formatcount) | 支持的HDR格式的数量 | -| [formats](_display.md#formats) | 支持的HDR格式的数组首地址 | -| [maxLum](_display.md#maxlum) | 最大的光亮度luminance值 | -| [maxAverageLum](_display.md#maxaveragelum) | 最大的平均光亮度luminance值 | -| [minLum](_display.md#minlum) | 最小的光亮度luminance值 | +| [formatCount](_display.md#formatcount) | uint32_t
支持的HDR格式的数量 | +| [formats](_display.md#formats) | [HDRFormat](_display.md#hdrformat) \*
支持的HDR格式的数组首地址 | +| [maxLum](_display.md#maxlum) | float
最大的光亮度luminance值 | +| [maxAverageLum](_display.md#maxaveragelum) | float
最大的平均光亮度luminance值 | +| [minLum](_display.md#minlum) | float
最小的光亮度luminance值 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_h_d_r_meta_data.md b/zh-cn/device-dev/reference/hdi-apis/_h_d_r_meta_data.md index 44610a551845f6df58cf94c74cf994c9dcd40e27..da86e1fa62a23b57680218416d2e1e7f7d47f360 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_h_d_r_meta_data.md +++ b/zh-cn/device-dev/reference/hdi-apis/_h_d_r_meta_data.md @@ -1,21 +1,21 @@ # HDRMetaData -## **概述** +## 概述 -HDR元数据结构体定义。 +HDR元数据结构体定义 **相关模块:** [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [key](_display.md#key) | HDR元数据关键字。 | -| [value](_display.md#value-22) | 关键字对应的值。 | +| [key](_display.md#key) | [HDRMetadataKey](_display.md#hdrmetadatakey)
HDR元数据关键字 | +| [value](_display.md#value-22) | float
关键字对应的值 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_face_auth.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_face_auth.md index 7ef609b97adf64a1cc7546e0e84012a6a6ce0f0b..83f3ff65b01826ea1ce481c69ee064fcec493ec9 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_face_auth.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_face_auth.md @@ -1,18 +1,18 @@ # HdfFaceAuth -## **概述** +## 概述 提供人脸认证驱动的标准API接口。 -人脸认证驱动为人脸认证服务提供统一的访问接口。获取人脸认证驱动代理后,人脸认证服务可以调用相关接口获取执行器,获取人脸认证执行器后, 人脸认证服务可以调用相关接口获取执行器,获取凭据模版信息,注册人脸特征模版,进行用户人脸认证,删除人脸特征模版等。 +人脸认证驱动为人脸认证服务提供统一的访问接口。获取人脸认证驱动代理后,人脸认证服务可以调用相关接口获取执行器,获取人脸认证执行器后,人脸认证服务可以调用相关接口获取执行器,获取凭据模版信息,注册人脸特征模版,进行用户人脸认证,删除人脸特征模版等。 -**Since:** +**Since:** 3.2 -## **汇总** +## 汇总 ### 文件 @@ -20,8 +20,8 @@ | 名称 | 描述 | | -------- | -------- | | [FaceAuthTypes.idl](_face_auth_types_8idl.md) | 定义人脸认证驱动的枚举类和数据结构。 | -| [IExecutor.idl](face__auth_2_i_executor_8idl.md) | 定义执行器接口,用于获取执行器,获取凭据模版信息,注册人脸特征模版,进行用户人脸认证,删除人脸特征模版等。 | -| [IExecutorCallback.idl](face__auth_2_i_executor_callback_8idl.md) | 定义异步API接口回调,用于返回异步接口的请求处理结果和信息。 | +| [IExecutor.idl](_i_executor_8idl_faceauth.md) | 定义执行器接口,用于获取执行器,获取凭据模版信息,注册人脸特征模版,进行用户人脸认证,删除人脸特征模版等。 | +| [IExecutorCallback.idl](_i_executor_callback_8idl_faceauth.md) | 定义异步API接口回调,用于返回异步接口的请求处理结果和信息。 | | [IFaceAuthInterface.idl](_i_face_auth_interface_8idl.md) | 定义获取人脸认证驱动的执行器列表接口,用于从人脸认证驱动获取执行器对象列表。 | @@ -29,32 +29,32 @@ | 名称 | 描述 | | -------- | -------- | -| [ExecutorInfo](_executor_info.md) | 执行器信息。 | -| [TemplateInfo](_template_info.md) | 凭据模版信息。 | -| [IExecutor](interface_i_executor.md) | 定义执行器接口,用于获取执行器,获取凭据模版信息,注册人脸特征模版,进行用户人脸认证,删除人脸特征模版等。 | -| [IExecutorCallback](interface_i_executor_callback.md) | 定义异步API接口回调,用于返回异步接口的请求处理结果和信息。使用细节见[IExecutor](interface_i_executor.md)。 | -| [IFaceAuthInterface](interface_i_face_auth_interface.md) | 定义获取人脸认证驱动的执行器列表接口。 | +| [ExecutorInfo](_executor_info_faceauth.md) | struct
执行器信息。 | +| [TemplateInfo](_template_info_faceauth.md) | struct
凭据模版信息。 | +| [IExecutor](interface_i_executor_faceauth.md) | interface
定义执行器接口,用于获取执行器,获取凭据模版信息,注册人脸特征模版,进行用户人脸认证,删除人脸特征模版等。 | +| [IExecutorCallback](interface_i_executor_callback_faceauth.md) | interface
定义异步API接口回调,用于返回异步接口的请求处理结果和信息。使用细节见[IExecutor](interface_i_executor_faceauth.md)。 | +| [IFaceAuthInterface](interface_i_face_auth_interface.md) | interface
定义获取人脸认证驱动的执行器列表接口。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [AuthType](#authtype): int { PIN = 1, FACE = 2, FINGERPRINT = 4 } | 枚举用户认证凭据类型。 | -| [ExecutorRole](#executorrole): int { COLLECTOR = 1, VERIFIER = 2, ALL_IN_ONE = 3 } | 枚举执行器角色。 | -| [ExecutorSecureLevel](#executorsecurelevel): int { ESL0 = 0, ESL1 = 1, ESL2 = 2, ESL3 = 3 } | 枚举执行器安全等级。 | -| [CommandId](#commandid): int { LOCK_TEMPLATE = 1, UNLOCK_TEMPLATE = 2, VENDOR_COMMAND_BEGIN = 10000 } | 枚举人脸认证功能相关操作命令。 | -| [FaceTipsCode](#facetipscode): int { FACE_AUTH_TIP_TOO_BRIGHT = 1, FACE_AUTH_TIP_TOO_DARK = 2, FACE_AUTH_TIP_TOO_CLOSE = 3, FACE_AUTH_TIP_TOO_FAR = 4,   FACE_AUTH_TIP_TOO_HIGH = 5, FACE_AUTH_TIP_TOO_LOW = 6, FACE_AUTH_TIP_TOO_RIGHT = 7, FACE_AUTH_TIP_TOO_LEFT = 8,   FACE_AUTH_TIP_TOO_MUCH_MOTION = 9, FACE_AUTH_TIP_POOR_GAZE = 10, FACE_AUTH_TIP_NOT_DETECTED = 11, VENDOR_FACE_AUTH_TIP_BEGIN = 10000 } | 枚举提示信息编码。 | +| [AuthType](#authtype) : int { PIN = 1, FACE = 2, FINGERPRINT = 4 } | 枚举用户认证凭据类型。 | +| [ExecutorRole](#executorrole) : int { COLLECTOR = 1, VERIFIER = 2, ALL_IN_ONE = 3 } | 枚举执行器角色。 | +| [ExecutorSecureLevel](#executorsecurelevel) : int { ESL0 = 0, ESL1 = 1, ESL2 = 2, ESL3 = 3 } | 枚举执行器安全等级。 | +| [CommandId](#commandid) : int { LOCK_TEMPLATE = 1, UNLOCK_TEMPLATE = 2, VENDOR_COMMAND_BEGIN = 10000 } | 枚举人脸认证功能相关操作命令。 | +| [FaceTipsCode](#facetipscode) : int { FACE_AUTH_TIP_TOO_BRIGHT = 1, FACE_AUTH_TIP_TOO_DARK = 2, FACE_AUTH_TIP_TOO_CLOSE = 3, FACE_AUTH_TIP_TOO_FAR = 4,   FACE_AUTH_TIP_TOO_HIGH = 5, FACE_AUTH_TIP_TOO_LOW = 6, FACE_AUTH_TIP_TOO_RIGHT = 7, FACE_AUTH_TIP_TOO_LEFT = 8,   FACE_AUTH_TIP_TOO_MUCH_MOTION = 9, FACE_AUTH_TIP_POOR_GAZE = 10, FACE_AUTH_TIP_NOT_DETECTED = 11, VENDOR_FACE_AUTH_TIP_BEGIN = 10000 } | 枚举提示信息编码。 | ### 关键字 | 名称 | 描述 | | -------- | -------- | -| package ohos.hdi.face_auth.v1_0 | 人脸认证接口的包路径 | +| package ohos.hdi.face_auth.v1_0 | 人脸认证接口的包路径。 | -## **枚举类型说明** +## 枚举类型说明 ### AuthType @@ -64,7 +64,7 @@ enum AuthType : int ``` -**描述:** +**描述:** 枚举用户认证凭据类型。 @@ -82,7 +82,7 @@ enum AuthType : int enum CommandId : int ``` -**描述:** +**描述:** 枚举人脸认证功能相关操作命令。 @@ -100,7 +100,7 @@ enum CommandId : int enum ExecutorRole : int ``` -**描述:** +**描述:** 枚举执行器角色。 @@ -118,7 +118,7 @@ enum ExecutorRole : int enum ExecutorSecureLevel : int ``` -**描述:** +**描述:** 枚举执行器安全等级。 @@ -137,7 +137,7 @@ enum ExecutorSecureLevel : int enum FaceTipsCode : int ``` -**描述:** +**描述:** 枚举提示信息编码。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_feature_info.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_feature_info.md index a70f0222d87c4633abcb243913540b3fd9b6fb97..264819bf5e2f833983c0f71affb111f7abbc0847 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_feature_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_feature_info.md @@ -1,27 +1,31 @@ # HdfFeatureInfo -## **概述** +## 概述 feature对象信息。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [ifName](#ifname) | feature对象的网卡名称。 | -| [type](#type) | feature对象的类型。 | +| [ifName](#ifname) | String
feature对象的网卡名称。  | +| [type](#type) | int
feature对象的类型。  | -## **类成员变量说明** +## 类成员变量说明 ### ifName @@ -30,9 +34,7 @@ feature对象信息。 ``` String HdfFeatureInfo::ifName ``` - -**描述:** - +**描述:** feature对象的网卡名称。 @@ -42,7 +44,5 @@ feature对象的网卡名称。 ``` int HdfFeatureInfo::type ``` - -**描述:** - +**描述:** feature对象的类型。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_light_color.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_light_color.md index 6dc7205e01de6bb66bf73bb9eebbf8c8737a0efc..e247187ce7a0a33b81b56e968f7e5863501c1bc1 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_light_color.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_light_color.md @@ -1,28 +1,32 @@ # HdfLightColor -## **概述** +## 概述 定义亮灯参数。 参数包括灯的模式设置。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** -[Light](light.md) +[Light](_light.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [colorValue](#colorvalue) | 设置灯的模式 | +| [colorValue](#colorvalue) | union [ColorValue](union_color_value.md)
设置灯的模式, 详见[ColorValue](union_color_value.md)。  | -## **类成员变量说明** +## 类成员变量说明 ### colorValue @@ -31,7 +35,5 @@ ``` union ColorValue HdfLightColor::colorValue ``` - -**描述:** - +**描述:** 设置灯的模式, 详见[ColorValue](union_color_value.md)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_light_effect.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_light_effect.md index 341b2fb7f29860c5bd48a843f233b9b22516cf16..eb4b887f74f54fc1c01c7a29b76102469f6f0c80 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_light_effect.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_light_effect.md @@ -1,29 +1,37 @@ # HdfLightEffect -## **概述** +## 概述 定义灯的效果参数。 参数包括设置灯的亮度、闪烁模式。 +**Since:** + +3.1 + +**Version:** + +1.0 + **相关模块:** -[Light](light.md) +[Light](_light.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [lightBrightness](#lightbrightness) | 亮度值。 | -| [flashEffect](#flasheffect) | 闪烁模式。 | +| [lightBrightness](#lightbrightness) | int
亮度值:Bits 24–31为扩展位,Bits 16–23为红色,Bits 8–15为绿色,Bits 0–7为蓝色。 如果字节段等于0时,灯的亮度根据HCS配置的默认亮度进行设置。 | +| [flashEffect](#flasheffect) | struct [HdfLightFlashEffect](_hdf_light_flash_effect.md)
闪烁模式。 | -## **类成员变量说明** +## 类成员变量说明 ### flashEffect @@ -33,9 +41,9 @@ struct HdfLightFlashEffect HdfLightEffect::flashEffect ``` -**描述:** +**描述:** -闪烁模式。详见**[HdfLightFlashEffect](_hdf_light_flash_effect.md)**。 +闪烁模式。详见[HdfLightFlashEffect](_hdf_light_flash_effect.md)。 ### lightBrightness @@ -45,6 +53,6 @@ struct HdfLightFlashEffect HdfLightEffect::flashEffect int HdfLightEffect::lightBrightness ``` -**描述:** +**描述:** 亮度值:Bits 24–31为扩展位,Bits 16–23为红色,Bits 8–15为绿色,Bits 0–7为蓝色。 如果字节段等于0时,灯的亮度根据HCS配置的默认亮度进行设置。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_light_flash_effect.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_light_flash_effect.md index 2d853ebaab83a9eed7c4fe87c32e706da4c0b38a..0af880b9749bb00d4479d5980acbe166f93b7789 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_light_flash_effect.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_light_flash_effect.md @@ -1,30 +1,38 @@ # HdfLightFlashEffect -## **概述** +## 概述 定义灯的闪烁参数。 这些参数包括闪烁模式以及闪烁期间指示灯的打开和关闭时间。 +**Since:** + +3.1 + +**Version:** + +1.0 + **相关模块:** -[Light](light.md) +[Light](_light.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [flashMode](#flashmode) | 闪烁模式。 | -| [onTime](#ontime) | 表示在一个闪烁周期内灯持续点亮的时间,单位毫秒。 | -| [offTime](#offtime) | 表示在一个闪烁周期内灯持续熄灭的时间,单位毫秒。 | +| [flashMode](#flashmode) | int
闪烁模式。 | +| [onTime](#ontime) | int
表示在一个闪烁周期内灯持续点亮的时间,单位毫秒。 | +| [offTime](#offtime) | int
表示在一个闪烁周期内灯持续熄灭的时间,单位毫秒。 | -## **类成员变量说明** +## 类成员变量说明 ### flashMode @@ -34,9 +42,9 @@ int HdfLightFlashEffect::flashMode ``` -**描述:** +**描述:** -闪烁模式。详见[HdfLightFlashMode](light.md#hdflightflashmode)。 +闪烁模式。详见[HdfLightFlashMode](_light.md#hdflightflashmode)。 ### offTime @@ -46,7 +54,7 @@ int HdfLightFlashEffect::flashMode int HdfLightFlashEffect::offTime ``` -**描述:** +**描述:** 表示在一个闪烁周期内灯持续熄灭的时间,单位毫秒。 @@ -58,6 +66,6 @@ int HdfLightFlashEffect::offTime int HdfLightFlashEffect::onTime ``` -**描述:** +**描述:** 表示在一个闪烁周期内灯持续点亮的时间,单位毫秒。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_light_info.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_light_info.md index 8674b13b2368719c859becac7cc845613fbfc560..bbd9d9fa4c3d4ab68efaa5af6e7c86e2d6bccd9f 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_light_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_light_info.md @@ -1,31 +1,35 @@ # HdfLightInfo -## **概述** +## 概述 定义灯的基本信息。 参数包括灯类型ID、逻辑灯的名称、逻辑控制器中物理灯的数量和自定义扩展信息。 +**Since:** +3.1 +**Version:** +1.0 **相关模块:** -[Light](light.md) +[Light](_light.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [lightName](#lightname) | 逻辑灯的名称。 | -| [lightId](#lightid) | 灯类型ID。 | -| [lightNumber](#lightnumber) | 逻辑控制器中物理灯的数量。 | -| [reserved](#reserved) | 自定义扩展信息。 | +| [lightName](#lightname) | String
逻辑灯的名称。  | +| [lightId](#lightid) | int
灯类型ID。详见[HdfLightId](_light.md#hdflightid)。  | +| [lightNumber](#lightnumber) | int
逻辑控制器中物理灯的数量。  | +| [reserved](#reserved) | int
自定义扩展信息。  | -## **类成员变量说明** +## 类成员变量说明 ### lightId @@ -34,10 +38,8 @@ ``` int HdfLightInfo::lightId ``` - -**描述:** - -灯类型ID。详见[HdfLightId](light.md#hdflightid)。 +**描述:** +灯类型ID。详见[HdfLightId](_light.md#hdflightid)。 ### lightName @@ -46,9 +48,7 @@ int HdfLightInfo::lightId ``` String HdfLightInfo::lightName ``` - -**描述:** - +**描述:** 逻辑灯的名称。 @@ -58,9 +58,7 @@ String HdfLightInfo::lightName ``` int HdfLightInfo::lightNumber ``` - -**描述:** - +**描述:** 逻辑控制器中物理灯的数量。 @@ -70,7 +68,5 @@ int HdfLightInfo::lightNumber ``` int HdfLightInfo::reserved ``` - -**描述:** - +**描述:** 自定义扩展信息。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_motion_event.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_motion_event.md index cdf6b6de73a224d141a63e61054f03cb318f0c1c..e81d7271b4d6de8a880156ebf7aeeb6f11a54f27 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_motion_event.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_motion_event.md @@ -1,32 +1,36 @@ # HdfMotionEvent -## **概述** +## 概述 上报手势识别数据结构。 上报手势识别数据事件信息包括手势识别类型、手势识别结果、手势识别状态、手势识别数据长度、手势识别数据。 +**Since:** + +3.2 + **相关模块:** -[Motion](motion.md) +[Motion](_motion.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [motion](#motion) | 手势识别类型。 | -| [result](#result) | 手势识别结果。 | -| [status](#status) | 手势识别状态。 | -| [datalen](#datalen) | 手势识别数据长度。 | -| [data](#data) | 手势识别数据。 | +| [motion](#motion) | int
手势识别类型。 | +| [result](#result) | int
手势识别结果。 | +| [status](#status) | int
手势识别状态。 | +| [datalen](#datalen) | int
手势识别数据长度。 | +| [data](#data) | int[]
手势识别数据。 | -## **类成员变量说明** +## 类成员变量说明 ### data @@ -36,7 +40,7 @@ int [] HdfMotionEvent::data ``` -**描述:** +**描述:** 手势识别数据。 @@ -48,7 +52,7 @@ int [] HdfMotionEvent::data int HdfMotionEvent::datalen ``` -**描述:** +**描述:** 手势识别数据长度。 @@ -60,7 +64,7 @@ int HdfMotionEvent::datalen int HdfMotionEvent::motion ``` -**描述:** +**描述:** 手势识别类型。 @@ -72,7 +76,7 @@ int HdfMotionEvent::motion int HdfMotionEvent::result ``` -**描述:** +**描述:** 手势识别结果。 @@ -84,6 +88,6 @@ int HdfMotionEvent::result int HdfMotionEvent::status ``` -**描述:** +**描述:** 手势识别状态。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_net_device_info.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_net_device_info.md index c865bc30d915523c671a2979d1f10d2b1417c9b5..ace41fab355aa5036a3c711448fac66fdc79f006 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_net_device_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_net_device_info.md @@ -1,30 +1,34 @@ # HdfNetDeviceInfo -## **概述** +## 概述 网络设备信息。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [index](#index) | 网络设备索引。 | -| [ifName](#ifname) | 网卡名称。 | -| [ifNameLen](#ifnamelen) | 网卡名称长度。 | -| [iftype](#iftype) | 网卡类型。 | -| [mac](#mac) | 网络设备MAC地址。 | +| [index](#index) | unsigned int
网络设备索引。  | +| [ifName](#ifname) | String
网卡名称。  | +| [ifNameLen](#ifnamelen) | unsigned int
网卡名称长度。  | +| [iftype](#iftype) | unsigned char
网卡类型。  | +| [mac](#mac) | unsigned char[]
网络设备MAC地址。  | -## **类成员变量说明** +## 类成员变量说明 ### ifName @@ -33,9 +37,7 @@ ``` String HdfNetDeviceInfo::ifName ``` - -**描述:** - +**描述:** 网卡名称。 @@ -45,9 +47,7 @@ String HdfNetDeviceInfo::ifName ``` unsigned int HdfNetDeviceInfo::ifNameLen ``` - -**描述:** - +**描述:** 网卡名称长度。 @@ -57,9 +57,7 @@ unsigned int HdfNetDeviceInfo::ifNameLen ``` unsigned char HdfNetDeviceInfo::iftype ``` - -**描述:** - +**描述:** 网卡类型。 @@ -69,9 +67,7 @@ unsigned char HdfNetDeviceInfo::iftype ``` unsigned int HdfNetDeviceInfo::index ``` - -**描述:** - +**描述:** 网络设备索引。 @@ -81,7 +77,5 @@ unsigned int HdfNetDeviceInfo::index ``` unsigned char [] HdfNetDeviceInfo::mac ``` - -**描述:** - +**描述:** 网络设备MAC地址。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_net_device_info_result.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_net_device_info_result.md index d48f209f60a14cc68c2e966173192a5018b49d5a..2abb49fec2211de047a697aa3272825689a9e425 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_net_device_info_result.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_net_device_info_result.md @@ -1,26 +1,30 @@ # HdfNetDeviceInfoResult -## **概述** +## 概述 网络设备信息集合。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [deviceInfos](#deviceinfos) | 网络设备信息集合。 | +| [deviceInfos](#deviceinfos) | struct [HdfNetDeviceInfo](_hdf_net_device_info.md)[]
网络设备信息集合。  | -## **类成员变量说明** +## 类成员变量说明 ### deviceInfos @@ -29,7 +33,5 @@ ``` struct HdfNetDeviceInfo [] HdfNetDeviceInfoResult::deviceInfos ``` - -**描述:** - +**描述:** 网络设备信息集合。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_pin_auth.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_pin_auth.md index b5a0a2ce3457fe5f5a1208b51d0cf9d3933efa5f..1e2d58b8206830b3c31a4528fc5c7cc72e105f89 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_pin_auth.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_pin_auth.md @@ -1,59 +1,58 @@ # HdfPinAuth -## **概述** +## 概述 提供口令认证驱动的标准API接口。 口令认证驱动为口令认证服务提供统一的访问接口。获取口令认证驱动代理后,口令认证服务可以调用相关接口获取执行器,获取口令认证执行器后, 口令认证服务可以调用相关接口获取执行器信息,获取凭据模版信息,注册口令,认证口令,删除口令等。 -**Since:** +**Since:** 3.2 -## **汇总** +## 汇总 ### 文件 | 名称 | 描述 | | -------- | -------- | -| [IExecutor.idl](pin__auth_2_i_executor_8idl.md) | 定义执行器标准API接口。接口可用于获取执行器信息,获取凭据模版信息,注册口令,认证口令,删除口令等。 | -| [IExecutorCallback.idl](pin__auth_2_i_executor_callback_8idl.md) | 定义异步API接口回调,用于返回异步接口的请求处理结果和获取信息。 | +| [IExecutor.idl](_i_executor_8idl_pinauth.md) | 定义执行器标准API接口。接口可用于获取执行器信息,获取凭据模版信息,注册口令,认证口令,删除口令等。 | +| [IExecutorCallback.idl](_i_executor_callback_8idl_pinauth.md) | 定义异步API接口回调,用于返回异步接口的请求处理结果和获取信息。 | | [IPinAuthInterface.idl](_i_pin_auth_interface_8idl.md) | 定义获取口令认证驱动的执行器列表接口,用于从口令认证驱动获取执行器对象列表。 | -| [PinAuthTypes.idl](_pin_auth_types_8idl.md) | 定义口令认证驱动的枚举类和数据结构。 | ### 类 | 名称 | 描述 | | -------- | -------- | -| [IExecutor](interface_pin_i_executor.md) | 定义执行器标准API接口。接口可用于获取执行器信息,获取凭据模版信息,注册口令,认证口令,删除口令等。 | -| [IExecutorCallback](interface_pin_i_executor_callback.md) | 定义异步API接口回调,用于返回异步接口的请求处理结果和信息。使用细节见[IExecutor](interface_pin_i_executor.md)。 | -| [IPinAuthInterface](interface_i_pin_auth_interface.md) | 定义获取口令认证驱动的执行器列表接口。 | -| [ExecutorInfo](_executor_info.md) | 执行器信息。 | -| [TemplateInfo](_template_info.md) | 凭据模版信息。 | +| [IExecutor](interface_i_executor_pinauth.md) | interface
定义执行器标准API接口。接口可用于获取执行器信息,获取凭据模版信息,注册口令,认证口令,删除口令等。 | +| [IExecutorCallback](interface_i_executor_callback_pinauth.md) | interface
定义异步API接口回调,用于返回异步接口的请求处理结果和获取信息。使用细节见[IExecutor](interface_i_executor_pinauth.md)。 | +| [IPinAuthInterface](interface_i_pin_auth_interface.md) | interface
定义获取口令认证驱动的执行器列表接口。 | +| [ExecutorInfo](_executor_info_pinauth.md) | struct
执行器信息。 | +| [TemplateInfo](_template_info_pinauth.md) | struct
凭据模版信息,口令模版在用户注册口令认证凭据时生成并存储,用于支持通过口令认证方式验证用户身份。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [AuthType](#authtype): int {   PIN = 1, FACE = 2, FINGERPRINT = 4 } | 枚举用户认证凭据类型。 | -| [ExecutorRole](#executorrole): int {   COLLECTOR = 1, VERIFIER = 2, ALL_IN_ONE = 3 } | 枚举执行器角色。 | -| [ExecutorSecureLevel](#executorsecurelevel): int {   ESL0 = 0, ESL1 = 1, ESL2 = 2, ESL3 = 3 } | 枚举执行器安全等级。 | -| [CommandId](#commandid): int { DEFAULT = 0 } | 枚举口令认证相关功能操作命令。 | +| [AuthType](#authtype) : int {   PIN = 1, FACE = 2, FINGERPRINT = 4 } | 枚举用户认证凭据类型。 | +| [ExecutorRole](#executorrole) : int {   COLLECTOR = 1, VERIFIER = 2, ALL_IN_ONE = 3 } | 枚举执行器角色。 | +| [ExecutorSecureLevel](#executorsecurelevel) : int {   ESL0 = 0, ESL1 = 1, ESL2 = 2, ESL3 = 3 } | 枚举执行器安全等级。 | +| [CommandId](#commandid) : int { DEFAULT = 0 } | 枚举口令认证相关功能操作命令。 | ### 关键字 | 名称 | 描述 | | -------- | -------- | -| package ohos.hdi.pin_auth.v1_0 | 口令认证接口的包路径 | +| package ohos.hdi.pin_auth.v1_0 | 口令认证接口的包路径。 | -## **枚举类型说明** +## 枚举类型说明 ### AuthType @@ -63,7 +62,7 @@ enum AuthType : int ``` -**描述:** +**描述:** 枚举用户认证凭据类型。 @@ -81,7 +80,7 @@ enum AuthType : int enum CommandId : int ``` -**描述:** +**描述:** 枚举口令认证相关功能操作命令。 @@ -97,7 +96,7 @@ enum CommandId : int enum ExecutorRole : int ``` -**描述:** +**描述:** 枚举执行器角色。 @@ -115,7 +114,7 @@ enum ExecutorRole : int enum ExecutorSecureLevel : int ``` -**描述:** +**描述:** 枚举执行器安全等级。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_sensor_events.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_sensor_events.md index e736441a261b43df836741365219889894a43d75..bee809490b418c65e62431aebeee3e13e89c1e6e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_sensor_events.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_sensor_events.md @@ -1,34 +1,38 @@ # HdfSensorEvents -## **概述** +## 概述 定义传感器上报的数据。 上报的传感器数据包括传感器ID、传感器算法版本号、数据生成时间、传感器类型ID、 数据选项(如测量范围和精度)、数据上报模式、数据地址、数据长度。 +**Since:** +2.2 +**Version:** +1.0 **相关模块:** -[Sensor](sensor.md) +[Sensor](_sensor.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [sensorId](#sensorid) | 传感器ID。 | -| [version](#version) | 传感器算法版本号。 | -| [timestamp](#timestamp) | 传感器数据生成时间。 | -| [option](#option) | 传感器数据选项,包括测量范围和精度。 | -| [mode](#mode) | 传感器数据上报模式。 | -| [data](#data) | 传感器数据地址。 | -| [dataLen](#datalen) | 传感器数据长度。 | +| [sensorId](#sensorid) | int
传感器ID。  | +| [version](#version) | int
传感器算法版本号。  | +| [timestamp](#timestamp) | long
传感器数据生成时间。  | +| [option](#option) | unsigned int
传感器数据选项,包括测量范围和精度。  | +| [mode](#mode) | int
传感器数据上报模式。  | +| [data](#data) | unsigned char[]
传感器数据地址。  | +| [dataLen](#datalen) | unsigned int
传感器数据长度。  | -## **类成员变量说明** +## 类成员变量说明 ### data @@ -37,9 +41,7 @@ ``` unsigned char [] HdfSensorEvents::data ``` - -**描述:** - +**描述:** 传感器数据地址。 @@ -49,9 +51,7 @@ unsigned char [] HdfSensorEvents::data ``` unsigned int HdfSensorEvents::dataLen ``` - -**描述:** - +**描述:** 传感器数据长度。 @@ -61,9 +61,7 @@ unsigned int HdfSensorEvents::dataLen ``` int HdfSensorEvents::mode ``` - -**描述:** - +**描述:** 传感器数据上报模式。 @@ -73,9 +71,7 @@ int HdfSensorEvents::mode ``` unsigned int HdfSensorEvents::option ``` - -**描述:** - +**描述:** 传感器数据选项,包括测量范围和精度。 @@ -85,9 +81,7 @@ unsigned int HdfSensorEvents::option ``` int HdfSensorEvents::sensorId ``` - -**描述:** - +**描述:** 传感器ID。 @@ -97,9 +91,7 @@ int HdfSensorEvents::sensorId ``` long HdfSensorEvents::timestamp ``` - -**描述:** - +**描述:** 传感器数据生成时间。 @@ -109,7 +101,5 @@ long HdfSensorEvents::timestamp ``` int HdfSensorEvents::version ``` - -**描述:** - +**描述:** 传感器算法版本号。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_sensor_information.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_sensor_information.md index ae9c37c451081576d74ad35cd807c07f9f82c80a..13fb20e624b3d731d8b27b05979bcba3b895670b 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_sensor_information.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_sensor_information.md @@ -1,36 +1,44 @@ # HdfSensorInformation -## **概述** +## 概述 定义传感器的基本信息。 传感器的信息包括传感器名称、供应商、固件版本、硬件版本、传感器类型ID、传感器ID、最大测量范围、精度和功率。 +**Since:** + +2.2 + +**Version:** + +1.0 + **相关模块:** -[Sensor](sensor.md) +[Sensor](_sensor.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [sensorName](#sensorname) | 传感器名称。 | -| [vendorName](#vendorname) | 传感器供应商。 | -| [firmwareVersion](#firmwareversion) | 传感器固件版本。 | -| [hardwareVersion](#hardwareversion) | 传感器硬件版本。 | -| [sensorTypeId](#sensortypeid) | 传感器类型ID。 | -| [sensorId](#sensorid) | 传感器ID,由传感器驱动程序开发人员定义。 | -| [maxRange](#maxrange) | 传感器的最大测量范围。 | -| [accuracy](#accuracy) | 传感器精度。 | -| [power](#power) | 传感器功率。 | +| [sensorName](#sensorname) | String
传感器名称。 | +| [vendorName](#vendorname) | String
传感器供应商。 | +| [firmwareVersion](#firmwareversion) | String
传感器固件版本。 | +| [hardwareVersion](#hardwareversion) | String
传感器硬件版本。 | +| [sensorTypeId](#sensortypeid) | int
传感器类型ID(在[HdfSensorTypeTag](_sensor.md#hdfsensortypetag)中描述)**。** | +| [sensorId](#sensorid) | int
传感器ID,由传感器驱动程序开发人员定义。 | +| [maxRange](#maxrange) | float
传感器的最大测量范围。 | +| [accuracy](#accuracy) | float
传感器精度。 | +| [power](#power) | float
传感器功率。 | -## **类成员变量说明** +## 类成员变量说明 ### accuracy @@ -40,7 +48,7 @@ float HdfSensorInformation::accuracy ``` -**描述:** +**描述:** 传感器精度。 @@ -52,7 +60,7 @@ float HdfSensorInformation::accuracy String HdfSensorInformation::firmwareVersion ``` -**描述:** +**描述:** 传感器固件版本。 @@ -64,7 +72,7 @@ String HdfSensorInformation::firmwareVersion String HdfSensorInformation::hardwareVersion ``` -**描述:** +**描述:** 传感器硬件版本。 @@ -76,7 +84,7 @@ String HdfSensorInformation::hardwareVersion float HdfSensorInformation::maxRange ``` -**描述:** +**描述:** 传感器的最大测量范围。 @@ -88,7 +96,7 @@ float HdfSensorInformation::maxRange float HdfSensorInformation::power ``` -**描述:** +**描述:** 传感器功率。 @@ -100,7 +108,7 @@ float HdfSensorInformation::power int HdfSensorInformation::sensorId ``` -**描述:** +**描述:** 传感器ID,由传感器驱动程序开发人员定义。 @@ -112,7 +120,7 @@ int HdfSensorInformation::sensorId String HdfSensorInformation::sensorName ``` -**描述:** +**描述:** 传感器名称。 @@ -124,9 +132,9 @@ String HdfSensorInformation::sensorName int HdfSensorInformation::sensorTypeId ``` -**描述:** +**描述:** -传感器类型ID(在[HdfSensorTypeTag](sensor.md#hdfsensortypetag)中描述)**。** +传感器类型ID(在[HdfSensorTypeTag](_sensor.md#hdfsensortypetag)中描述)。 ### vendorName @@ -136,6 +144,6 @@ int HdfSensorInformation::sensorTypeId String HdfSensorInformation::vendorName ``` -**描述:** +**描述:** 传感器供应商。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_sta_info.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_sta_info.md index 05d24dd843d57a33be7655c3d921bd681b4a36e9..d8cefd9cf2ba7987aadc15b83a71c0bf761471cf 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_sta_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_sta_info.md @@ -1,26 +1,30 @@ # HdfStaInfo -## **概述** +## 概述 STA的信息。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [mac](#mac) | STA的MAC地址。 | +| [mac](#mac) | unsigned char[]
STA的MAC地址。  | -## **类成员变量说明** +## 类成员变量说明 ### mac @@ -29,7 +33,5 @@ STA的信息。 ``` unsigned char [] HdfStaInfo::mac ``` - -**描述:** - +**描述:** STA的MAC地址。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_thermal_callback_info.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_thermal_callback_info.md index ba1f6fd2b244795392c49f9bd994bc27fb3298c2..e21b1699f641e59d77f8a84ea5f687b87d49fcd9 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_thermal_callback_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_thermal_callback_info.md @@ -1,26 +1,28 @@ # HdfThermalCallbackInfo -## **概述** +## 概述 设备发热的信息列表。 +**Since:** +3.1 **相关模块:** [Thermal](thermal.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [info](#info) | 设备发热的信息列表。 | +| [info](#info) | List< struct [ThermalZoneInfo](_thermal_zone_info.md) >
设备发热的信息列表。  | -## **类成员变量说明** +## 类成员变量说明 ### info @@ -29,7 +31,5 @@ ``` List HdfThermalCallbackInfo::info ``` - -**描述:** - +**描述:** 设备发热的信息列表。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_user_auth.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_user_auth.md index 2fbbca3bfa3acb1cfe8f629664d9347ab8386d2e..57ea3ed3a194502428047fa52c1fdbb0373f2466 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_user_auth.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_user_auth.md @@ -1,18 +1,18 @@ # HdfUserAuth -## **概述** +## 概述 提供用户认证驱动的标准API接口。 -用户认证驱动为用户认证服务提供统一的访问接口。获取用户认证驱动代理后,用户认证服务可以调用相关接口注册执行器,管理用户认证凭据, 完成PIN码和生物特征。 +用户认证驱动为用户认证服务提供统一的访问接口。获取用户认证驱动代理后,用户认证服务可以调用相关接口注册执行器,管理用户认证凭据, 完成PIN码和生物特征认证。 -**Since:** +**Since:** 3.2 -## **汇总** +## 汇总 ### 文件 @@ -27,27 +27,27 @@ | 名称 | 描述 | | -------- | -------- | -| [IUserAuthInterface](interface_i_user_auth_interface.md) | 声明用户认证驱动的API接口。 | -| [ExecutorRegisterInfo](_executor_register_info.md) | 执行器注册信息。 | -| [ExecutorInfo](_user_executor_info.md) | 执行器信息。 | -| [ScheduleInfo](_schedule_info.md) | 调度信息。 | -| [AuthSolution](_auth_solution.md) | 认证方案。 | -| [ExecutorSendMsg](_executor_send_msg.md) | 执行器发送的消息。 | -| [AuthResultInfo](_auth_result_info.md) | 用户身份认证结果信息。 | -| [IdentifyResultInfo](_identify_result_info.md) | 用户身份识别结果信息。 | -| [EnrollParam](_enroll_param.md) | 注册认证凭据参数。 | -| [CredentialInfo](_credential_info.md) | 认证凭据信息。 | -| [EnrolledInfo](_enrolled_info.md) | 注册信息。 | -| [EnrollResultInfo](_enroll_resultinfo.md) | 录入结果信息。 | +| [IUserAuthInterface](interface_i_user_auth_interface.md) | interface
声明用户认证驱动的API接口。 | +| [ExecutorRegisterInfo](_executor_register_info.md) | struct
执行器注册信息。 | +| [ExecutorInfo](_executor_info_userauth.md) | struct
执行器信息。 | +| [ScheduleInfo](_schedule_info.md) | struct
调度信息。 | +| [AuthSolution](_auth_solution.md) | struct
认证方案。 | +| [ExecutorSendMsg](_executor_send_msg.md) | struct
执行器发送的消息。 | +| [AuthResultInfo](_auth_result_info.md) | struct
用户身份认证结果信息。 | +| [IdentifyResultInfo](_identify_result_info.md) | struct
用户身份识别结果信息。 | +| [EnrollParam](_enroll_param.md) | struct
注册认证凭据参数。 | +| [CredentialInfo](_credential_info.md) | struct
认证凭据信息。 | +| [EnrolledInfo](_enrolled_info.md) | struct
注册信息。 | +| [EnrollResultInfo](_enroll_result_info.md) | struct
录入结果信息。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [AuthType](#authtype): int { PIN = 1, FACE = 2, FINGERPRINT = 4, ALL = 0 } | 枚举用户认证凭据类型。 | -| [ExecutorRole](#executorrole): int { COLLECTOR = 1, VERIFIER = 2, ALL_IN_ONE = 3 } | 枚举执行器角色。 | -| [ExecutorSecureLevel](#executorsecurelevel): int { ESL0 = 0, ESL1 = 1, ESL2 = 2, ESL3 = 3 } | 枚举执行器安全等级。 | +| [AuthType](#authtype) : int {  ALL = 0, PIN = 1, FACE = 2, FINGERPRINT = 4 } | 枚举用户认证凭据类型。 | +| [ExecutorRole](#executorrole) : int { COLLECTOR = 1, VERIFIER = 2, ALL_IN_ONE = 3 } | 枚举执行器角色。 | +| [ExecutorSecureLevel](#executorsecurelevel) : int { ESL0 = 0, ESL1 = 1, ESL2 = 2, ESL3 = 3 } | 枚举执行器安全等级。 | | [PinSubType](#pinsubtype) : int { PIN_SIX = 10000, PIN_NUMBER = 10001, PIN_MIX = 10002 } | 口令认证子类型。 | @@ -58,7 +58,7 @@ | package ohos.hdi.user_auth.v1_0 | 用户认证接口的包路径 | -## **枚举类型说明** +## 枚举类型说明 ### AuthType @@ -68,16 +68,16 @@ enum AuthType : int ``` -**描述:** +**描述:** 枚举用户认证凭据类型。 | 枚举值 | 描述 | | -------- | -------- | +| ALL | 表示包含所有认证凭据类型。 | | PIN | 认证凭据类型为口令。 | | FACE | 认证凭据类型为人脸。 | | FINGERPRINT | 认证凭据类型为指纹。 | -| ALL | 表示包含所有认证凭据类型。 | ### ExecutorRole @@ -87,7 +87,7 @@ enum AuthType : int enum ExecutorRole : int ``` -**描述:** +**描述:** 枚举执行器角色。 @@ -105,7 +105,7 @@ enum ExecutorRole : int enum ExecutorSecureLevel : int ``` -**描述:** +**描述:** 枚举执行器安全等级。 @@ -124,7 +124,7 @@ enum ExecutorSecureLevel : int enum PinSubType : int ``` -**描述:** +**描述:** 口令认证子类型。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_vibrator_info.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_vibrator_info.md index f176936bc9025a917b58ec1c130041f4ad96026a..2adcdc1816795b347fd5f38fe848f1a145238ded 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_vibrator_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_vibrator_info.md @@ -1,33 +1,37 @@ # HdfVibratorInfo -## **概述** +## 概述 定义马达参数。 参数包括设置马达振幅和频率以及振幅和频率的范围。 +**Since:** +3.2 +**Version:** +1.1 **相关模块:** -[Vibrator](vibrator.md) +[Vibrator](_vibrator.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [isSupportIntensity](#issupportintensity) | 设置马达振幅。1表示支持,0表示不支持。 | -| [isSupportFrequency](#issupportfrequency) | 设置马达频率。1表示支持,0表示不支持。 | -| [intensityMaxValue](#intensitymaxvalue) | 最大振幅。 | -| [intensityMinValue](#intensityminvalue) | 最小振幅。 | -| [frequencyMaxValue](#frequencymaxvalue) | 最大频率。 | -| [frequencyMinValue](#frequencyminvalue) | 最小频率。 | +| [isSupportIntensity](#issupportintensity) | int
设置马达振幅。1表示支持,0表示不支持。  | +| [isSupportFrequency](#issupportfrequency) | int
设置马达频率。1表示支持,0表示不支持。  | +| [intensityMaxValue](#intensitymaxvalue) | int
最大振幅。  | +| [intensityMinValue](#intensityminvalue) | int
最小振幅。  | +| [frequencyMaxValue](#frequencymaxvalue) | int
最大频率。  | +| [frequencyMinValue](#frequencyminvalue) | int
最小频率。  | -## **类成员变量说明** +## 类成员变量说明 ### frequencyMaxValue @@ -36,9 +40,7 @@ ``` int HdfVibratorInfo::frequencyMaxValue ``` - -**描述:** - +**描述:** 最大频率。 @@ -48,9 +50,7 @@ int HdfVibratorInfo::frequencyMaxValue ``` int HdfVibratorInfo::frequencyMinValue ``` - -**描述:** - +**描述:** 最小频率。 @@ -60,9 +60,7 @@ int HdfVibratorInfo::frequencyMinValue ``` int HdfVibratorInfo::intensityMaxValue ``` - -**描述:** - +**描述:** 最大振幅。 @@ -72,9 +70,7 @@ int HdfVibratorInfo::intensityMaxValue ``` int HdfVibratorInfo::intensityMinValue ``` - -**描述:** - +**描述:** 最小振幅。 @@ -84,9 +80,7 @@ int HdfVibratorInfo::intensityMinValue ``` int HdfVibratorInfo::isSupportFrequency ``` - -**描述:** - +**描述:** 设置马达频率。1表示支持,0表示不支持。 @@ -96,7 +90,5 @@ int HdfVibratorInfo::isSupportFrequency ``` int HdfVibratorInfo::isSupportIntensity ``` - -**描述:** - +**描述:** 设置马达振幅。1表示支持,0表示不支持。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_driver_scan_ssid.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_driver_scan_ssid.md index 7fb2e4b79eb9895f1dcba5b2ee8be56b94294721..9d8d540aba64956f73580531f907631b53d74f12 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_driver_scan_ssid.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_driver_scan_ssid.md @@ -1,27 +1,31 @@ # HdfWifiDriverScanSsid -## **概述** +## 概述 WiFi扫描参数SSID信息。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [ssid](#ssid) | WiFi扫描的SSID。 | -| [ssidLen](#ssidlen) | WiFi扫描的SSID长度。 | +| [ssid](#ssid) | String
WiFi扫描的SSID。  | +| [ssidLen](#ssidlen) | int
WiFi扫描的SSID长度。  | -## **类成员变量说明** +## 类成员变量说明 ### ssid @@ -30,9 +34,7 @@ WiFi扫描参数SSID信息。 ``` String HdfWifiDriverScanSsid::ssid ``` - -**描述:** - +**描述:** WiFi扫描的SSID。 @@ -42,7 +44,5 @@ WiFi扫描的SSID。 ``` int HdfWifiDriverScanSsid::ssidLen ``` - -**描述:** - +**描述:** WiFi扫描的SSID长度。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_info.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_info.md index 9adcd49e7bfdfaded903d9535971b586d944b3ca..69cc166158c67265ce3d4795a815961688c71b3d 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_info.md @@ -1,27 +1,31 @@ # HdfWifiInfo -## **概述** +## 概述 WiFi频段信息。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [band](#band) | WiFi频段。 | -| [size](#size) | WiFi频段下支持的频率个数。 | +| [band](#band) | int
WiFi频段。  | +| [size](#size) | unsigned int
WiFi频段下支持的频率个数。  | -## **类成员变量说明** +## 类成员变量说明 ### band @@ -30,9 +34,7 @@ WiFi频段信息。 ``` int HdfWifiInfo::band ``` - -**描述:** - +**描述:** WiFi频段。 @@ -42,7 +44,5 @@ WiFi频段。 ``` unsigned int HdfWifiInfo::size ``` - -**描述:** - +**描述:** WiFi频段下支持的频率个数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_scan.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_scan.md index 8f86e02e5da124f5a357b345a7705d5ba83222d1..3d3a7f97e34f86239493a97a7da80f96e92fe9c0 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_scan.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_scan.md @@ -1,31 +1,35 @@ # HdfWifiScan -## **概述** +## 概述 WiFi扫描参数。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [ssids](#ssids) | WiFi扫描的SSID集合。 | -| [freqs](#freqs) | WiFi扫描的频率集合。 | -| [extraIes](#extraies) | WiFi扫描请求中携带的扩展IE。 | -| [bssid](#bssid) | WiFi扫描的BSSID。 | -| [prefixSsidScanFlag](#prefixssidscanflag) | SSID扫描的前缀标志。 | -| [fastConnectFlag](#fastconnectflag) | 快速连接标志。 | +| [ssids](#ssids) | struct [HdfWifiDriverScanSsid](_hdf_wifi_driver_scan_ssid.md)[]
WiFi扫描的SSID集合。  | +| [freqs](#freqs) | int[]
WiFi扫描的频率集合。  | +| [extraIes](#extraies) | unsigned char[]
WiFi扫描请求中携带的扩展IE。  | +| [bssid](#bssid) | unsigned char[]
WiFi扫描的BSSID。  | +| [prefixSsidScanFlag](#prefixssidscanflag) | unsigned char
SSID扫描的前缀标志。  | +| [fastConnectFlag](#fastconnectflag) | unsigned char
快速连接标志。  | -## **类成员变量说明** +## 类成员变量说明 ### bssid @@ -34,9 +38,7 @@ WiFi扫描参数。 ``` unsigned char [] HdfWifiScan::bssid ``` - -**描述:** - +**描述:** WiFi扫描的BSSID。 @@ -46,9 +48,7 @@ WiFi扫描的BSSID。 ``` unsigned char [] HdfWifiScan::extraIes ``` - -**描述:** - +**描述:** WiFi扫描请求中携带的扩展IE。 @@ -58,9 +58,7 @@ WiFi扫描请求中携带的扩展IE。 ``` unsigned char HdfWifiScan::fastConnectFlag ``` - -**描述:** - +**描述:** 快速连接标志。 @@ -70,9 +68,7 @@ unsigned char HdfWifiScan::fastConnectFlag ``` int [] HdfWifiScan::freqs ``` - -**描述:** - +**描述:** WiFi扫描的频率集合。 @@ -82,9 +78,7 @@ WiFi扫描的频率集合。 ``` unsigned char HdfWifiScan::prefixSsidScanFlag ``` - -**描述:** - +**描述:** SSID扫描的前缀标志。 @@ -94,7 +88,5 @@ SSID扫描的前缀标志。 ``` struct HdfWifiDriverScanSsid [] HdfWifiScan::ssids ``` - -**描述:** - +**描述:** WiFi扫描的SSID集合。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_scan_result.md b/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_scan_result.md index 3c752f70abebab38485fe2885322b0644b05fad3..36ba9a8d9fad0df1358015e1a59bd7d029ca7536 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_scan_result.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdf_wifi_scan_result.md @@ -1,36 +1,40 @@ # HdfWifiScanResult -## **概述** +## 概述 WiFi扫描结果。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [flags](#flags) | BSS/IBSS的标志位。 | -| [bssid](#bssid) | BSSID信息。 | -| [caps](#caps) | Capability信息字段(主机字节序排列)。 | -| [freq](#freq) | 信道频率。 | -| [beaconInt](#beaconint) | Beacon帧间隔。 | -| [qual](#qual) | 信号质量。 | -| [level](#level) | 信号强度。 | -| [age](#age) | 收到最新的Beacon或者探测响应帧数据的时间长度,单位为毫秒。 | -| [variable](#variable) | 扫描结果中的变量值。 | -| [ie](#ie) | 紧跟的Probe Response中IE字段。 | -| [beaconIe](#beaconie) | 紧跟的Beacon中IE字段。 | +| [flags](#flags) | int
BSS/IBSS的标志位。  | +| [bssid](#bssid) | unsigned char[]
BSSID信息。  | +| [caps](#caps) | short
Capability信息字段(主机字节序排列)。  | +| [freq](#freq) | int
信道频率。  | +| [beaconInt](#beaconint) | short
Beacon帧间隔。  | +| [qual](#qual) | int
信号质量。  | +| [level](#level) | int
信号强度。  | +| [age](#age) | unsigned int
收到最新的Beacon或者探测响应帧数据的时间长度,单位为毫秒。  | +| [variable](#variable) | unsigned char[]
扫描结果中的变量值。  | +| [ie](#ie) | unsigned char[]
紧跟的Probe Response中IE字段。  | +| [beaconIe](#beaconie) | unsigned char[]
紧跟的Beacon中IE字段。  | -## **类成员变量说明** +## 类成员变量说明 ### age @@ -39,9 +43,7 @@ WiFi扫描结果。 ``` unsigned int HdfWifiScanResult::age ``` - -**描述:** - +**描述:** 收到最新的Beacon或者探测响应帧数据的时间长度,单位为毫秒。 @@ -51,9 +53,7 @@ unsigned int HdfWifiScanResult::age ``` unsigned char [] HdfWifiScanResult::beaconIe ``` - -**描述:** - +**描述:** 紧跟的Beacon中IE字段。 @@ -63,9 +63,7 @@ unsigned char [] HdfWifiScanResult::beaconIe ``` short HdfWifiScanResult::beaconInt ``` - -**描述:** - +**描述:** Beacon帧间隔。 @@ -75,9 +73,7 @@ Beacon帧间隔。 ``` unsigned char [] HdfWifiScanResult::bssid ``` - -**描述:** - +**描述:** BSSID信息。 @@ -87,9 +83,7 @@ BSSID信息。 ``` short HdfWifiScanResult::caps ``` - -**描述:** - +**描述:** Capability信息字段(主机字节序排列)。 @@ -99,9 +93,7 @@ Capability信息字段(主机字节序排列)。 ``` int HdfWifiScanResult::flags ``` - -**描述:** - +**描述:** BSS/IBSS的标志位。 @@ -111,9 +103,7 @@ BSS/IBSS的标志位。 ``` int HdfWifiScanResult::freq ``` - -**描述:** - +**描述:** 信道频率。 @@ -123,9 +113,7 @@ int HdfWifiScanResult::freq ``` unsigned char [] HdfWifiScanResult::ie ``` - -**描述:** - +**描述:** 紧跟的Probe Response中IE字段。 @@ -135,9 +123,7 @@ unsigned char [] HdfWifiScanResult::ie ``` int HdfWifiScanResult::level ``` - -**描述:** - +**描述:** 信号强度。 @@ -147,9 +133,7 @@ int HdfWifiScanResult::level ``` int HdfWifiScanResult::qual ``` - -**描述:** - +**描述:** 信号质量。 @@ -159,7 +143,5 @@ int HdfWifiScanResult::qual ``` unsigned char [] HdfWifiScanResult::variable ``` - -**描述:** - +**描述:** 扫描结果中的变量值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/activity_recognition.md b/zh-cn/device-dev/reference/hdi-apis/_hdi_activity_recognition.md similarity index 72% rename from zh-cn/device-dev/reference/hdi-apis/activity_recognition.md rename to zh-cn/device-dev/reference/hdi-apis/_hdi_activity_recognition.md index d7eb2ef08f3d82c16c9b20a8859c8080d90dfbca..453ebd7a70a5cdad8f540d0130d3b2ea8a5525f2 100644 --- a/zh-cn/device-dev/reference/hdi-apis/activity_recognition.md +++ b/zh-cn/device-dev/reference/hdi-apis/_hdi_activity_recognition.md @@ -1,29 +1,28 @@ # HdiActivityRecognition - -## **概述** +## 概述 提供订阅和获取用户行为的API。 MSDP(Multimodal Sensor Data Platform)可以获取行为识别驱动程序的对象或代理,然后调用该对象或代理提供的API, 获取设备支持的行为类型,订阅或取消订阅不同的行为事件,获取当前的行为事件,以及获取设备缓存的行为事件。 -**Since**: +**Since:** 3.2 -**Version**: +**Version:** 1.0 -## **汇总** +## 汇总 ### 文件 | 名称 | 描述 | | -------- | -------- | -| [ActivityRecognitionTypes.idl](activity_recognition_types_idl.md) | 定义行为识别模块使用的数据类型。 | +| [ActivityRecognitionTypes.idl](_activity_recognition_types_8idl.md) | 定义行为识别模块使用的数据类型。 | | [IActivityChangedCallback.idl](_i_activity_changed_callback_8idl.md) | 定义行为识别数据上报回调函数接口。 | | [IActivityInterface.idl](_i_activity_interface_8idl.md) | 声明行为识别模块提供的API,用于获取设备支持的行为类型,订阅或取消订阅不同的行为事件,获取当前的行为事件,以及获取设备缓存的行为事件。 | @@ -32,17 +31,17 @@ MSDP(Multimodal Sensor Data Platform)可以获取行为识别驱动程序的 | 名称 | 描述 | | -------- | -------- | -| [ActRecognitionEvent](_act_recognition_event.md) | 定义行为事件上报的数据结构。 | -| [IActivityChangedCallback](interface_i_activity_changed_callback.md) | 定义上报行为事件的回调函数。 | -| [IActivityInterface](interface_i_activity_interface.md) | 定义对行为识别进行基本操作的接口。 | +| [ActRecognitionEvent](_act_recognition_event.md) | struct
定义行为事件上报的数据结构。 | +| [IActivityChangedCallback](interface_i_activity_changed_callback.md) | interface
定义上报行为事件的回调函数 | +| [IActivityInterface](interface_i_activity_interface.md) | interface
定义对行为识别进行基本操作的接口。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [ActRecognitionEventType](#actrecognitioneventtype) { ACT_RECOGNITION_EVENT_ENTER = 0x01, ACT_RECOGNITION_EVENT_EXIT = 0x02 } | 枚举行为事件的类型。 | -| [ActRecognitionPowerMode](#actrecognitionpowermode) { ACT_RECOGNITION_NORMAL_MODE = 0, ACT_RECOGNITION_LOW_POWER_MODE = 1 } | 枚举功耗模式的类型。 | +| [ActRecognitionEventType](#actrecognitioneventtype) { ACT_RECOGNITION_EVENT_ENTER = 0x01 , ACT_RECOGNITION_EVENT_EXIT = 0x02 } | 枚举行为事件的类型。 | +| [ActRecognitionPowerMode](#actrecognitionpowermode) { ACT_RECOGNITION_NORMAL_MODE = 0 , ACT_RECOGNITION_LOW_POWER_MODE = 1 } | 枚举功耗模式的类型。 | ### 关键字 @@ -52,7 +51,7 @@ MSDP(Multimodal Sensor Data Platform)可以获取行为识别驱动程序的 | package ohos.hdi.activity_recognition.v1_0 | 行为识别模块接口的包路径。 | -## **枚举类型说明** +## 枚举类型说明 ### ActRecognitionEventType @@ -62,7 +61,7 @@ MSDP(Multimodal Sensor Data Platform)可以获取行为识别驱动程序的 enum ActRecognitionEventType ``` -**描述:** +**描述:** 枚举行为事件的类型。 @@ -81,7 +80,7 @@ enum ActRecognitionEventType enum ActRecognitionPowerMode ``` -**描述:** +**描述:** 枚举功耗模式的类型。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdi_lpfence_cellbatching.md b/zh-cn/device-dev/reference/hdi-apis/_hdi_lpfence_cellbatching.md new file mode 100644 index 0000000000000000000000000000000000000000..2c7b76741c1306d0741d6f7bd36ecdc6017cc6a5 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_hdi_lpfence_cellbatching.md @@ -0,0 +1,74 @@ +# HdiLpfenceCellbatching + + +## 概述 + +为低功耗围栏服务提供基站轨迹数据记录的API。 + +本模块能够控制设备对接收的基站数据进行缓存和上报。 + +应用场景:根据设备接收的基站轨迹数据,判断用户的大致活动区域,进而进行一些服务提醒。 + +**Since:** + +4.0 + +**Version:** + +1.0 + + +## 汇总 + + +### 文件 + + | 名称 | 描述 | +| -------- | -------- | +| [CellbatchingTypes.idl](_cellbatching_types_8idl.md) | 定义基站轨迹数据记录模块使用的数据类型。 | +| [ICellbatchingCallback.idl](_i_cellbatching_callback_8idl.md) | 定义基站轨迹数据记录模块回调接口。 | +| [ICellbatchingInterface.idl](_i_cellbatching_interface_8idl.md) | 声明基站轨迹数据记录模块提供的API,用于使能和去使能基站轨迹数据记录功能,主动获取基站轨迹数据。 | + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [CellbatchingRequest](_cellbatching_request.md) | struct
定义设置基站轨迹数据上报功能的数据结构。 | +| [CellTrajectoryData](_cell_trajectory_data.md) | struct
定义上报的基站轨迹数据的数据结构。 | +| [ICellbatchingCallback](interface_i_cellbatching_callback.md) | interface
导入基站轨迹数据记录模块的数据类型。 | +| [ICellbatchingInterface](interface_i_cellbatching_interface.md) | interface
导入基站轨迹数据记录模块的数据类型。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [CellbatchingSwitch](#cellbatchingswitch) { SWITCH_OFF = 0 , SWITCH_ON = 1 } | 枚举对基站轨迹数据记录的开关操作。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.cellbatching.v1_0 | 基站轨迹数据记录模块接口的包路径。 | + + +## 枚举类型说明 + + +### CellbatchingSwitch + + +``` +enum CellbatchingSwitch +``` + +**描述:** + +枚举对基站轨迹数据记录的开关操作。 + + | 枚举值 | 描述 | +| -------- | -------- | +| SWITCH_OFF | 关闭基站轨迹数据记录功能。 | +| SWITCH_ON | 打开基站轨迹数据记录功能。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdi_lpfence_cellfence.md b/zh-cn/device-dev/reference/hdi-apis/_hdi_lpfence_cellfence.md new file mode 100644 index 0000000000000000000000000000000000000000..fbfb4a16929e73aaae6b816606c2b675adce4895 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_hdi_lpfence_cellfence.md @@ -0,0 +1,76 @@ +# HdiLpfenceCellfence + + +## 概述 + +为低功耗围栏服务提供基站围栏的API。 + +本模块接口提供添加基站围栏、删除基站围栏和获取基站围栏使用信息的功能。 + +应用场景:判断用户设备是否达到某个较大范围的位置区域,从而进行一些后续服务,如景区服务介绍等。 + +**Since:** + +4.0 + +**Version:** + +1.0 + + +## 汇总 + + +### 文件 + + | 名称 | 描述 | +| -------- | -------- | +| [CellfenceTypes.idl](_cellfence_types_8idl.md) | 定义基站围栏使用的数据类型。 | +| [ICellfenceCallback.idl](_i_cellfence_callback_8idl.md) | 定义基站围栏模块回调接口。 | +| [ICellfenceInterface.idl](_i_cellfence_interface_8idl.md) | 声明基站围栏模块提供的API,用于添加基站围栏,删除基站围栏和获取基站围栏使用信息。 | + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [CellfenceInfo](_cellfence_info.md) | struct
定义基站基本信息的数据结构。 | +| [CellfenceRequest](_cellfence_request.md) | struct
定义添加基站围栏的数据结构。 | +| [CellfenceStatus](_cellfence_status.md) | struct
定义设备与基站围栏状态关系的数据结构。 | +| [CellfenceSize](_cellfence_size.md) | struct
定义基站围栏使用信息的数据结构。 | +| [ICellfenceCallback](interface_i_cellfence_callback.md) | interface
导入基站围栏模块的数据类型。 | +| [ICellfenceInterface](interface_i_cellfence_interface.md) | interface
导入基站围栏模块的数据类型。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [CellfenceTransition](#cellfencetransition) { FENCE_ENTER = 0 , FENCE_EXIT = 3 } | 枚举设备与基站围栏的位置关系。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.cellfence.v1_0 | 基站围栏模块接口的包路径。 | + + +## 枚举类型说明 + + +### CellfenceTransition + + +``` +enum CellfenceTransition +``` + +**描述:** + +枚举设备与基站围栏的位置关系。 + + | 枚举值 | 描述 | +| -------- | -------- | +| FENCE_ENTER | 设备在基站围栏范围内。 | +| FENCE_EXIT | 设备不在基站围栏范围内。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdi_lpfence_geofence.md b/zh-cn/device-dev/reference/hdi-apis/_hdi_lpfence_geofence.md new file mode 100644 index 0000000000000000000000000000000000000000..a2ba16cc20f886fd651b2c779f224a737e67f2df --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_hdi_lpfence_geofence.md @@ -0,0 +1,162 @@ +# HdiLpfenceGeofence + + +## 概述 + +为低功耗围栏服务提供地理围栏的API。 + +本模块接口提供添加圆形和多边形地理围栏,删除地理围栏,获取地理围栏状态信息,获取设备地理位置等功能。本模块可在AP休眠状态下持续工作。 + +应用场景:判断用户设备是否达到某个精确地理位置区域,从而进行一些后续服务,如门禁卡的切换、定制消息的提醒等。 + +**Since:** + +4.0 + +**Version:** + +1.0 + + +## 汇总 + + +### 文件 + + | 名称 | 描述 | +| -------- | -------- | +| [GeofenceTypes.idl](_geofence_types_8idl.md) | 定义地理围栏使用的数据类型。 | +| [IGeofenceCallback.idl](_i_geofence_callback_8idl.md) | 定义地理围栏模块回调接口。 | +| [IGeofenceIntf.idl](_i_geofence_intf_8idl.md) | 声明基站围栏模块提供的API,用于添加多种地理围栏,删除地理围栏,获取地理围栏状态信息,获取设备地理位置,下发基站离线数据库。 | + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [Point](_point.md) | struct
定义位置坐标的数据结构。 | +| [GeofenceCircleRequest](_geofence_circle_request.md) | struct
定义添加圆形地理围栏的数据结构。 | +| [GeofencePolygonRequest](_geofence_polygon_request.md) | struct
定义添加多边形地理围栏的数据结构。 | +| [GeofenceResult](_geofence_result.md) | struct
定义添加或删除地理围栏执行结果的数据结构。 | +| [OfflineDb](_offline_db.md) | struct
定义下发基站离线数据库的数据结构。 | +| [GeoLocationInfo](_geo_location_info.md) | struct
定义设备具体位置信息的数据结构。 | +| [GeofenceSize](_geofence_size.md) | struct
定义地理围栏使用信息的数据结构。 | +| [CurrentCell](_current_cell.md) | struct
定义设备驻留的基站主区信息的数据结构。 | +| [NeighborCell](_neighbor_cell.md) | struct
定义设备驻留的基站邻区信息的数据结构。 | +| [GeofenceCellInfo](_geofence_cell_info.md) | struct
定义设备驻留的基站小区信息的数据结构。 | +| [RequestCellDb](_request_cell_db.md) | struct
定义请求基站离线数据库数据的数据结构。 | +| [IGeofenceCallback](interface_i_geofence_callback.md) | interface
导入地理围栏模块的数据类型。 | +| [IGeofenceInterface](interface_i_geofence_interface.md) | interface
导入地理围栏模块的数据类型。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [GeofenceTransition](#geofencetransition) {
GEOFENCE_TRANSITION_ENTERED = (1 << 0) , GEOFENCE_TRANSITION_EXITED = (1 << 1) , GEOFENCE_TRANSITION_UNCERTAIN = (1 << 2) , GEOFENCE_TRANSITION_DWELL = (1 << 3) ,
GEOFENCE_TRANSITION_INDOOR = (1 << 4) , GEOFENCE_TRANSITION_OUTDOOR = (1 << 5)
} | 枚举可关注的地理围栏状态事件。 | +| [GeofenceAttribute](#geofenceattribute) { GEOFENCE_ATTRI_COORDINATE_WGS84 = 16 } | 枚举地理围栏支持的设置项。 | +| [GeofenceAccuracy](#geofenceaccuracy) { ACCURACY_FINE = 1 , ACCURACY_BALANCE = 2 , ACCURACY_COARSE = 3 } | 枚举地理围栏支持的精度模式。 | +| [GeofenceCellType](#geofencecelltype) { GEOFENCE_CELL_G4 = 0 , GEOFENCE_CELL_NR = 1 } | 枚举移动通信技术代。 | +| [GeofenceLocSource](#geofencelocsource) {
GEOFENCE_GNSS = 1 , GEOFENCE_WIFI = 2 , GEOFENCE_SENSOR = 4 , GEOFENCE_CELL = 8 ,
GEOFENCE_BT = 16
} | 枚举位置信息来源。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.geofence.v1_0 | 地理围栏模块接口的包路径。 | + + +## 枚举类型说明 + + +### GeofenceAccuracy + + +``` +enum GeofenceAccuracy +``` + +**描述:** + +枚举地理围栏支持的精度模式。 + + | 枚举值 | 描述 | +| -------- | -------- | +| ACCURACY_FINE | 高精度模式,GNSS模块接收GPS定位信号频率为1秒1次,功耗较高。 | +| ACCURACY_BALANCE | 中精度模式,GNSS模块接收GPS定位信号频率为60秒1次,功耗较低。 | +| ACCURACY_COARSE | 低精度模式,只使用基站定位,不依赖GNSS模块。 | + + +### GeofenceAttribute + + +``` +enum GeofenceAttribute +``` + +**描述:** + +枚举地理围栏支持的设置项。 + + | 枚举值 | 描述 | +| -------- | -------- | +| GEOFENCE_ATTRI_COORDINATE_WGS84 | 地理位置使用WGS-84地心坐标系。 | + + +### GeofenceCellType + + +``` +enum GeofenceCellType +``` + +**描述:** + +枚举移动通信技术代。 + + | 枚举值 | 描述 | +| -------- | -------- | +| GEOFENCE_CELL_G4 | 第2、3、4代移动通信技术 | +| GEOFENCE_CELL_NR | 第5代移动通信技术 | + + +### GeofenceLocSource + + +``` +enum GeofenceLocSource +``` + +**描述:** + +枚举位置信息来源。 + + | 枚举值 | 描述 | +| -------- | -------- | +| GEOFENCE_GNSS | 位置信息来源于GNSS模块 | +| GEOFENCE_WIFI | 位置信息来源于Wi-Fi模块 | +| GEOFENCE_SENSOR | 位置信息来源于Sensor模块 | +| GEOFENCE_CELL | 位置信息来源于基站模块 | +| GEOFENCE_BT | 位置信息来源于蓝牙模块 | + + +### GeofenceTransition + + +``` +enum GeofenceTransition +``` + +**描述:** + +枚举可关注的地理围栏状态事件。 + + | 枚举值 | 描述 | +| -------- | -------- | +| GEOFENCE_TRANSITION_ENTERED | 设备在地理围栏范围内。 | +| GEOFENCE_TRANSITION_EXITED | 设备在地理围栏范围外。 | +| GEOFENCE_TRANSITION_UNCERTAIN | 无法确定设备与地理围栏位置关系。 | +| GEOFENCE_TRANSITION_DWELL | 设备在地理围栏内,且持续徘徊一段时间。 | +| GEOFENCE_TRANSITION_INDOOR | 设备在地理围栏内,且在室内。 | +| GEOFENCE_TRANSITION_OUTDOOR | 设备在地理围栏内,且在室外。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_hdi_lpfence_wififence.md b/zh-cn/device-dev/reference/hdi-apis/_hdi_lpfence_wififence.md new file mode 100644 index 0000000000000000000000000000000000000000..8f724ea99e9bb200b859a2cb4afd73732b525018 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_hdi_lpfence_wififence.md @@ -0,0 +1,92 @@ +# HdiLpfenceWififence + + +## 概述 + +为低功耗围栏服务提供Wi-Fi围栏的API。 + +本模块接口提供添加Wi-Fi围栏,删除Wi-Fi围栏,获取Wi-Fi围栏状态,获取Wi-Fi围栏使用信息的功能。 + +应用场景:一般用于判断设备是否在室内特定位置,如居所内或商场的某个店铺内。 + +**Since:** + +4.0 + +**Version:** + +1.0 + + +## 汇总 + + +### 文件 + + | 名称 | 描述 | +| -------- | -------- | +| [IWififenceCallback.idl](_i_wififence_callback_8idl.md) | 定义Wi-Fi围栏模块回调接口。 | +| [IWififenceInterface.idl](_i_wififence_interface_8idl.md) | 定义Wi-Fi围栏模块回调接口。 | +| [WififenceTypes.idl](_wififence_types_8idl.md) | 定义Wi-Fi围栏使用的数据类型。 | + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IWififenceCallback](interface_i_wififence_callback.md) | interface
导入Wi-Fi围栏模块的数据类型。 | +| [IWififenceInterface](interface_i_wififence_interface.md) | interface
导入Wi-Fi围栏模块的数据类型。 | +| [WififenceRequest](_wififence_request.md) | struct
定义添加Wi-Fi围栏的数据结构。 | +| [WififenceSize](_wififence_size.md) | struct
定义Wi-Fi围栏使用信息的数据结构。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [WififenceTransition](#wififencetransition) { WIFIFENCE_TRANSITION_ENTERED = (1 << 0) , WIFIFENCE_TRANSITION_EXITED = (1 << 1) } | 枚举Wi-Fi围栏状态事件。 | +| [WififenceAlgoType](#wififencealgotype) { TYPE_ONE_BSSID = 1 , TYPE_FP_MATCH = 2 } | 枚举Wi-Fi围栏的匹配算法。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.wififence.v1_0 | Wi-Fi围栏模块接口的包路径。 | + + +## 枚举类型说明 + + +### WififenceAlgoType + + +``` +enum WififenceAlgoType +``` + +**描述:** + +枚举Wi-Fi围栏的匹配算法。 + + | 枚举值 | 描述 | +| -------- | -------- | +| TYPE_ONE_BSSID | Wi-Fi围栏中MAC地址与设备扫描的MAC地址有交集时,即认为设备在围栏内。 | +| TYPE_FP_MATCH | Wi-Fi围栏中MAC地址和RSSI值与设备扫描的MAC地址和RSSI值相似度达到一定阈值时,即认为设备在围栏内。 | + + +### WififenceTransition + + +``` +enum WififenceTransition +``` + +**描述:** + +枚举Wi-Fi围栏状态事件。 + + | 枚举值 | 描述 | +| -------- | -------- | +| WIFIFENCE_TRANSITION_ENTERED | 设备在Wi-Fi围栏范围内。 | +| WIFIFENCE_TRANSITION_EXITED | 设备在Wi-Fi围栏范围外。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_activity_changed_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_activity_changed_callback_8idl.md index 512c1de4667f228022002ae3532680b03b471cb2..025b7b8c25f938d741c891ef70e6149a6ea7aabf 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_activity_changed_callback_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_activity_changed_callback_8idl.md @@ -1,33 +1,33 @@ # IActivityChangedCallback.idl -## **概述** +## 概述 定义行为识别数据上报回调函数接口。 在行为识别用户订阅行为识别数据时需要注册这个回调函数接口的实例。 -**Since**: +**Since:** 3.2 -**Version**: +**Version:** 1.0 **相关模块:** -[HdiActivityRecognition](activity_recognition.md) +[HdiActivityRecognition](_hdi_activity_recognition.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IActivityChangedCallback](interface_i_activity_changed_callback.md) | 定义上报行为事件的回调函数 | +| [IActivityChangedCallback](interface_i_activity_changed_callback.md) | interface
定义上报行为事件的回调函数 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_activity_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_activity_interface_8idl.md index 1115b0560274f44133152ce9dacc3ca6910f019b..18b2c898409c74c8d6050832254e5e574f523cce 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_activity_interface_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_activity_interface_8idl.md @@ -1,31 +1,31 @@ # IActivityInterface.idl -## **概述** +## 概述 声明行为识别模块提供的API,用于获取设备支持的行为类型,订阅或取消订阅不同的行为事件,获取当前的行为事件,以及获取设备缓存的行为事件。 -**Since**: +**Since:** 3.2 -**Version**: +**Version:** 1.0 **相关模块:** -[HdiActivityRecognition](activity_recognition.md) +[HdiActivityRecognition](_hdi_activity_recognition.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IActivityInterface](interface_i_activity_interface.md) | 定义对行为识别进行基本操作的接口。 | +| [IActivityInterface](interface_i_activity_interface.md) | interface
定义对行为识别进行基本操作的接口。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_audio_adapter_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_audio_adapter_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..16ca81638f55e3f2cf48592cf8eae9d4843d0796 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_audio_adapter_8idl.md @@ -0,0 +1,35 @@ +# IAudioAdapter.idl + + +## 概述 + +Audio适配器的接口定义文件。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IAudioAdapter](interface_i_audio_adapter.md) | interface
AudioAdapter音频适配器接口。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.audio.v1_0 | 音频接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_audio_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_audio_callback_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..0ac04c908dbe961cc254219e478c11a94cd86897 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_audio_callback_8idl.md @@ -0,0 +1,35 @@ +# IAudioCallback.idl + + +## 概述 + +Audio播放的回调函数定义文件。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IAudioCallback](interface_i_audio_callback.md) | interface
Audio回调接口。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.audio.v1_0 | 音频接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_audio_capture_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_audio_capture_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..4d2fd76313e6cb70b466679024cbc28956c19347 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_audio_capture_8idl.md @@ -0,0 +1,35 @@ +# IAudioCapture.idl + + +## 概述 + +Audio录音的接口定义文件。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IAudioCapture](interface_i_audio_capture.md) | interface
AudioCapture音频录音接口。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.audio.v1_0 | 音频接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_audio_manager_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_audio_manager_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..cd81444cd42e5f6149497a5525a39ae76fc535b2 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_audio_manager_8idl.md @@ -0,0 +1,35 @@ +# IAudioManager.idl + + +## 概述 + +Audio适配器管理及加载的接口定义文件。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IAudioManager](interface_i_audio_manager.md) | interface
AudioManager音频适配器管理接口。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.audio.v1_0 | 音频接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_audio_render_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_audio_render_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..eb39b43a25ee7c90b64ddaf5795e99b40b7668d2 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_audio_render_8idl.md @@ -0,0 +1,35 @@ +# IAudioRender.idl + + +## 概述 + +Audio播放的接口定义文件。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IAudioRender](interface_i_audio_render.md) | interface
AudioRender音频播放接口。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.audio.v1_0 | 音频接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_battery_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_battery_callback_8idl.md index 7b87b968efd6452fef859f9392e44af4e1ff2797..4699652adbe5046ecac40ceb421550e475963f5e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_battery_callback_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_battery_callback_8idl.md @@ -1,7 +1,7 @@ # IBatteryCallback.idl -## **概述** +## 概述 电池信息的回调。 @@ -20,18 +20,18 @@ [Battery](battery.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IBatteryCallback](interface_i_battery_callback.md) | 电池信息的回调。 | +| [IBatteryCallback](interface_i_battery_callback.md) | interface
电池信息的回调。 | ### 关键字 | 名称 | 描述 | | -------- | -------- | -| package ohos.hdi.battery.v1_0 | 电池模块接口的包路径 | +| package ohos.hdi.battery.v1_0 | 电池模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_battery_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_battery_interface_8idl.md index 662cabfcd0b933eb19f6919c278e149ffd712b34..72e25925d2de4477c587dd88d1371d418605a455 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_battery_interface_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_battery_interface_8idl.md @@ -1,7 +1,7 @@ # IBatteryInterface.idl -## **概述** +## 概述 获取、订阅电池信息的接口。 @@ -20,18 +20,18 @@ [Battery](battery.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IBatteryInterface](interface_i_battery_interface.md) | 获取、订阅电池信息的接口。 | +| [IBatteryInterface](interface_i_battery_interface.md) | interface
获取、订阅电池信息的接口。 | ### 关键字 | 名称 | 描述 | | -------- | -------- | -| package ohos.hdi.battery.v1_0 | 电池模块接口的包路径 | +| package ohos.hdi.battery.v1_0 | 电池模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_camera_device_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_camera_device_8idl.md index 0c641e4aeb1d2785a18aeaa78ab38c30e4c49b54..85852e5b35a67818cc441758176f52ba1b7af569 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_camera_device_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_camera_device_8idl.md @@ -1,7 +1,7 @@ # ICameraDevice.idl -## **概述** +## 概述 Camera设备操作接口。 @@ -15,17 +15,17 @@ Camera设备操作接口。 **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [ICameraDevice](interface_i_camera_device.md) | 定义Camera设备基本的操作。 | +| [ICameraDevice](interface_i_camera_device.md) | interface
定义Camera设备基本的操作。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_camera_device_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_camera_device_callback_8idl.md index 944d0a957e8a806e67b2eb1a7c3bd7dc10d40a91..8c80f84d456ac84bf9ba0746442f1d301e9eed53 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_camera_device_callback_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_camera_device_callback_8idl.md @@ -1,7 +1,7 @@ # ICameraDeviceCallback.idl -## **概述** +## 概述 Camera设备的回调接口,主要包含Camera设备发生错误时和上报metadata的回调函数。 @@ -15,20 +15,20 @@ Camera设备的回调接口,主要包含Camera设备发生错误时和上报me **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [ICameraDeviceCallback](interface_i_camera_device_callback.md) | 定义Camera设备回调操作。 | +| [ICameraDeviceCallback](interface_i_camera_device_callback.md) | interface
定义Camera设备回调操作。 | -### 关键字 +### 变量 | 名称 | 描述 | | -------- | -------- | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_camera_host_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_camera_host_8idl.md index 8a2434a865bed0af4cd3ab98ca7cbc91ee15b333..a6c07f3716f2a6f19577cd8a00d97dbd2c4c17af 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_camera_host_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_camera_host_8idl.md @@ -1,7 +1,7 @@ # ICameraHost.idl -## **概述** +## 概述 Camera服务的管理类,对上层提供HDI接口。 @@ -15,20 +15,20 @@ Camera服务的管理类,对上层提供HDI接口。 **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [ICameraHost](interface_i_camera_host.md) | 定义Camera设备功能操作。 | +| [ICameraHost](interface_i_camera_host.md) | interface
定义Camera设备功能操作。 | -### 关键字 +### 变量 | 名称 | 描述 | | -------- | -------- | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_camera_host_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_camera_host_callback_8idl.md index c77ad0f79b94cd58cf9c658b89bbb1b8a9343616..c20eb7521b58ada33369b361b026f756e416cf0f 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_camera_host_callback_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_camera_host_callback_8idl.md @@ -1,7 +1,7 @@ # ICameraHostCallback.idl -## **概述** +## 概述 ICameraHost的回调接口,提供Camera设备和闪关灯状态变化的回调函数,回调函数由调用者实现。 @@ -15,20 +15,20 @@ ICameraHost的回调接口,提供Camera设备和闪关灯状态变化的回调 **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [ICameraHostCallback](interface_i_camera_host_callback.md) | 定义Camera设备功能回调操作。 | +| [ICameraHostCallback](interface_i_camera_host_callback.md) | interface
定义Camera设备功能回调操作。 | -### 关键字 +### 变量 | 名称 | 描述 | | -------- | -------- | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_cellbatching_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_cellbatching_callback_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..d0d6b3a608bfa1e275296a3a9389b101a3023da8 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_cellbatching_callback_8idl.md @@ -0,0 +1,37 @@ +# ICellbatchingCallback.idl + + +## 概述 + +定义基站轨迹数据记录模块回调接口。 + +在用户订阅基站轨迹数据记录功能时需要注册这个回调函数接口的实例。 + +**Since:** + +4.0 + +**Version:** + +1.0 + +**相关模块:** + +[HdiLpfenceCellbatching](_hdi_lpfence_cellbatching.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [ICellbatchingCallback](interface_i_cellbatching_callback.md) | interface
导入基站轨迹数据记录模块的数据类型。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.cellbatching.v1_0 | 基站轨迹数据记录模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_cellbatching_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_cellbatching_interface_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..20183e21fecebf0587fa608e2448e40904339dab --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_cellbatching_interface_8idl.md @@ -0,0 +1,35 @@ +# ICellbatchingInterface.idl + + +## 概述 + +声明基站轨迹数据记录模块提供的API,用于使能和去使能基站轨迹数据记录功能,主动获取基站轨迹数据。 + +**Since:** + +4.0 + +**Version:** + +1.0 + +**相关模块:** + +[HdiLpfenceCellbatching](_hdi_lpfence_cellbatching.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [ICellbatchingInterface](interface_i_cellbatching_interface.md) | interface
导入基站轨迹数据记录模块的数据类型。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.cellbatching.v1_0 | 基站轨迹数据记录模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_cellfence_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_cellfence_callback_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..281bd0396df93235ddcf7fdf9261bd8d713449ec --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_cellfence_callback_8idl.md @@ -0,0 +1,35 @@ +# ICellfenceCallback.idl + + +## 概述 + +定义基站围栏模块回调接口。 + +**Since:** + +4.0 + +**Version:** + +1.0 + +**相关模块:** + +[HdiLpfenceCellfence](_hdi_lpfence_cellfence.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [ICellfenceCallback](interface_i_cellfence_callback.md) | interface
导入基站围栏模块的数据类型。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.cellfence.v1_0 | 基站围栏模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_cellfence_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_cellfence_interface_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..0182142e3f157b5613383e7353f3df1803f4bc36 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_cellfence_interface_8idl.md @@ -0,0 +1,35 @@ +# ICellfenceInterface.idl + + +## 概述 + +声明基站围栏模块提供的API,用于添加基站围栏,删除基站围栏和获取基站围栏使用信息。 + +**Since:** + +4.0 + +**Version:** + +1.0 + +**相关模块:** + +[HdiLpfenceCellfence](_hdi_lpfence_cellfence.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [ICellfenceInterface](interface_i_cellfence_interface.md) | interface
导入基站围栏模块的数据类型。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.cellfence.v1_0 | 基站围栏模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_circle.md b/zh-cn/device-dev/reference/hdi-apis/_i_circle.md index 2293ef4912ae0d72e8cf9aa7ecea55cf098cde01..d8532c54d8f208b37f028cb5a612bb258113706d 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_circle.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_circle.md @@ -1,7 +1,7 @@ # ICircle -## **概述** +## 概述 圆形描述结构体定义,用于硬件加速绘制圆形。 @@ -10,14 +10,14 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [x](_display.md#x-24) | 矩形框起始X坐标。 | -| [y](_display.md#y-24) | 矩形框起始Y坐标。 | -| [r](_display.md#r) | 圆的半径。 | -| [color](_display.md#color-25) | 圆的颜色。 | +| [x](_display.md#x-24) | int32_t
圆心x坐标 | +| [y](_display.md#y-24) | int32_t
圆心y坐标r | +| [r](_display.md#r) | int32_t
圆的半径 | +| [color](_display.md#color-25) | uint32_t
圆的颜色 | diff --git a/zh-cn/device-dev/reference/hdi-apis/face__auth_2_i_executor_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_executor_8idl_faceauth.md similarity index 60% rename from zh-cn/device-dev/reference/hdi-apis/face__auth_2_i_executor_8idl.md rename to zh-cn/device-dev/reference/hdi-apis/_i_executor_8idl_faceauth.md index f10ada48070e6ba28b3e710c710f13cf97c6608f..bce94c0700755cfbb8627d77fe39683b4d7cc549 100644 --- a/zh-cn/device-dev/reference/hdi-apis/face__auth_2_i_executor_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_executor_8idl_faceauth.md @@ -1,27 +1,27 @@ # IExecutor.idl -## **概述** +## 概述 定义执行器接口,用于获取执行器,获取凭据模版信息,注册人脸特征模版,进行用户人脸认证,删除人脸特征模版等。 -**Since:** +**Since:** 3.2 -**所属模块:** +**相关模块:** [HdfFaceAuth](_hdf_face_auth.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IExecutor](interface_i_executor.md) | 定义执行器接口,用于获取执行器,获取凭据模版信息,注册人脸特征模版,进行用户人脸认证,删除人脸特征模版等。 | +| [IExecutor](interface_i_executor_faceauth.md) | interface
定义执行器接口,用于获取执行器,获取凭据模版信息,注册人脸特征模版,进行用户人脸认证,删除人脸特征模版等。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/pin__auth_2_i_executor_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_executor_8idl_pinauth.md similarity index 58% rename from zh-cn/device-dev/reference/hdi-apis/pin__auth_2_i_executor_8idl.md rename to zh-cn/device-dev/reference/hdi-apis/_i_executor_8idl_pinauth.md index c521e57491dce8ea817583370c6219278cfe6051..1ad18256a76a0cd08d75b4bd145fb8188acc47eb 100644 --- a/zh-cn/device-dev/reference/hdi-apis/pin__auth_2_i_executor_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_executor_8idl_pinauth.md @@ -1,31 +1,31 @@ # IExecutor.idl -## **概述** +## 概述 定义执行器标准API接口。接口可用于获取执行器信息,获取凭据模版信息,注册口令,认证口令,删除口令等。 -**Since:** +**Since:** 3.2 -**所属模块:** +**相关模块:** [HdfPinAuth](_hdf_pin_auth.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IExecutor](interface_pin_i_executor.md) | 定义执行器标准API接口。接口可用于获取执行器信息,获取凭据模版信息,注册口令,认证口令,删除口令等。 | +| [IExecutor](interface_i_executor_pinauth.md) | interface
定义执行器标准API接口。接口可用于获取执行器信息,获取凭据模版信息,注册口令,认证口令,删除口令等。 | ### 关键字 | 名称 | 描述 | | -------- | -------- | -| package ohos.hdi.pin_auth.v1_0 | 口令认证接口的包路径 | +| package ohos.hdi.pin_auth.v1_0 | 口令认证接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/face__auth_2_i_executor_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_executor_callback_8idl_faceauth.md similarity index 53% rename from zh-cn/device-dev/reference/hdi-apis/face__auth_2_i_executor_callback_8idl.md rename to zh-cn/device-dev/reference/hdi-apis/_i_executor_callback_8idl_faceauth.md index 89c668dc7fcf495eb6d5710d3fcb68b36b87686e..993c87d5fa2b5dd1413021d17790288e26097d6e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/face__auth_2_i_executor_callback_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_executor_callback_8idl_faceauth.md @@ -1,31 +1,31 @@ # IExecutorCallback.idl -## **概述** +## 概述 定义异步API接口回调,用于返回异步接口的请求处理结果和信息。 -**Since:** +**Since:** 3.2 -**所属模块:** +**相关模块:** [HdfFaceAuth](_hdf_face_auth.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IExecutorCallback](interface_i_executor_callback.md) | 定义异步API接口回调,用于返回异步接口的请求处理结果和信息。使用细节见[IExecutor](interface_i_executor.md)。 | +| [IExecutorCallback](interface_i_executor_callback_faceauth.md) | interface
定义异步API接口回调,用于返回异步接口的请求处理结果和信息。使用细节见[IExecutor](interface_i_executor_faceauth.md)。 | ### 关键字 | 名称 | 描述 | | -------- | -------- | -| package ohos.hdi.face_auth.v1_0 | 人脸认证接口的包路径 | +| package ohos.hdi.face_auth.v1_0 | 人脸认证接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_executor_callback_8idl_pinauth.md b/zh-cn/device-dev/reference/hdi-apis/_i_executor_callback_8idl_pinauth.md new file mode 100644 index 0000000000000000000000000000000000000000..8f910b040b69a32dac4bc6bfac237bf86436dd3e --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_executor_callback_8idl_pinauth.md @@ -0,0 +1,31 @@ +# IExecutorCallback.idl + + +## 概述 + +定义异步API接口回调,用于返回异步接口的请求处理结果和获取信息。 + +**Since:** + +3.2 + +**相关模块:** + +[HdfPinAuth](_hdf_pin_auth.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IExecutorCallback](interface_i_executor_callback_pinauth.md) | interface
定义异步API接口回调,用于返回异步接口的请求处理结果和获取信息。使用细节见[IExecutor](interface_i_executor_pinauth.md)。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.pin_auth.v1_0 | 口令认证接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_face_auth_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_face_auth_interface_8idl.md index 9a2f845c20dafdb59bbdc5f7bba0550e9691c864..bb93f5cc907066b51323be4c2db29d89e3907f69 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_face_auth_interface_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_face_auth_interface_8idl.md @@ -1,31 +1,31 @@ # IFaceAuthInterface.idl -## **概述** +## 概述 定义获取人脸认证驱动的执行器列表接口,用于从人脸认证驱动获取执行器对象列表。 -**Since:** +**Since:** 3.2 -**所属模块:** +**相关模块:** [HdfFaceAuth](_hdf_face_auth.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IFaceAuthInterface](interface_i_face_auth_interface.md) | 定义获取人脸认证驱动的执行器列表接口。 | +| [IFaceAuthInterface](interface_i_face_auth_interface.md) | interface
定义获取人脸认证驱动的执行器列表接口。 | ### 关键字 | 名称 | 描述 | | -------- | -------- | -| package ohos.hdi.face_auth.v1_0 | 人脸认证接口的包路径 | +| package ohos.hdi.face_auth.v1_0 | 人脸认证接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_geofence_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_geofence_callback_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..2953a14bc933acc7d038b233497eb7b916f2ae15 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_geofence_callback_8idl.md @@ -0,0 +1,35 @@ +# IGeofenceCallback.idl + + +## 概述 + +定义地理围栏模块回调接口。 + +**Since:** + +4.0 + +**Version:** + +1.0 + +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IGeofenceCallback](interface_i_geofence_callback.md) | interface
导入地理围栏模块的数据类型。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.geofence.v1_0 | 地理围栏模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_geofence_intf_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_geofence_intf_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..cd146d6aa6bd88777e5731cfeb05fcf78a285bf7 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_geofence_intf_8idl.md @@ -0,0 +1,35 @@ +# IGeofenceIntf.idl + + +## 概述 + +声明基站围栏模块提供的API,用于添加多种地理围栏,删除地理围栏,获取地理围栏状态信息,获取设备地理位置,下发基站离线数据库。 + +**Since:** + +4.0 + +**Version:** + +1.0 + +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IGeofenceInterface](interface_i_geofence_interface.md) | interface
导入地理围栏模块的数据类型。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.geofence.v1_0 | 地理围栏模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_input_interface.md b/zh-cn/device-dev/reference/hdi-apis/_i_input_interface.md index 8c20b1df852f9663f11f9810664778f527c65541..30a8e54edf3a730ae66522324a1a05177d91d250 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_input_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_input_interface.md @@ -1,28 +1,28 @@ # IInputInterface -## **概述** +## 概述 定义用于提供Input设备驱动程序功能的接口。 **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [iInputManager](#iinputmanager) | Input设备的设备管理接口 | -| [iInputController](#iinputcontroller) | Input设备的业务控制接口 | -| [iInputReporter](#iinputreporter) | Input设备的数据上报接口 | +| [iInputManager](#iinputmanager) | [InputManager](_input_manager.md) \*
Input设备的设备管理接口  | +| [iInputController](#iinputcontroller) | [InputController](_input_controller.md) \*
Input设备的业务控制接口  | +| [iInputReporter](#iinputreporter) | [InputReporter](_input_reporter.md) \*
Input设备的数据上报接口  | -## **类成员变量说明** +## 类成员变量说明 ### iInputController @@ -31,9 +31,7 @@ ``` InputController* IInputInterface::iInputController ``` - -**描述:** - +**描述:** Input设备的业务控制接口 @@ -43,9 +41,7 @@ Input设备的业务控制接口 ``` InputManager* IInputInterface::iInputManager ``` - -**描述:** - +**描述:** Input设备的设备管理接口 @@ -55,7 +51,5 @@ Input设备的设备管理接口 ``` InputReporter* IInputInterface::iInputReporter ``` - -**描述:** - +**描述:** Input设备的数据上报接口 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_light_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_light_interface_8idl.md index aca373cfa7d9f8ce752380cdec2ec7e0466188ee..848b3b0d2816a0d8338a54e84aa9ef759d82fa48 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_light_interface_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_light_interface_8idl.md @@ -1,7 +1,7 @@ # ILightInterface.idl -## **概述** +## 概述 定义灯模块的通用接口能力,包括获取灯类型ID、打开或关闭灯光、设置灯的亮度和闪烁模式。 @@ -15,17 +15,17 @@ **相关模块:** -[Light](light.md) +[Light](_light.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [ILightInterface](interface_i_light_interface.md) | 提供灯模块基本操作接口。 | +| [ILightInterface](interface_i_light_interface.md) | interface
提供灯模块基本操作接口。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_line.md b/zh-cn/device-dev/reference/hdi-apis/_i_line.md index 5862171b3cf32ca39b0a60adf34cf1f13729464d..ecf51d93fe590a3ae0b11e3f1d0cb0b18b0bff4c 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_line.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_line.md @@ -1,7 +1,7 @@ # ILine -## **概述** +## 概述 线条描述结构体定义,用于硬件加速绘制直线。 @@ -10,15 +10,15 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [x0](_display.md#x0-12) | 线条起点的X坐标。 | -| [y0](_display.md#y0-12) | 线条起点的Y坐标。 | -| [x1](_display.md#x1-13) | 线条终点的X坐标。 | -| [y1](_display.md#y1-13) | 线条终点的Y坐标。 | -| [color](_display.md#color-15) | 线条颜色。 | +| [x0](_display.md#x0-12) | int32_t
线条起点的x坐标 | +| [y0](_display.md#y0-12) | int32_t
线条起点的y坐标 | +| [x1](_display.md#x1-13) | int32_t
线条终点的x坐标 | +| [y1](_display.md#y1-13) | int32_t
线条终点的y坐标 | +| [color](_display.md#color-15) | uint32_t
线条颜色 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_motion_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_motion_callback_8idl.md index 08483942ca8df59eb0513ecef2444a4cab4337d0..26b3b974ed2f62d5a8a9c27e1754db0a856f9d72 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_motion_callback_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_motion_callback_8idl.md @@ -1,7 +1,7 @@ # IMotionCallback.idl -## **概述** +## 概述 定义上报手势识别数据回调函数接口。 @@ -17,17 +17,17 @@ **相关模块:** -[Motion](motion.md) +[Motion](_motion.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IMotionCallback](interface_i_motion_callback.md) | 定义上报手势识别数据回调函数。 | +| [IMotionCallback](interface_i_motion_callback.md) | interface
定义上报手势识别数据回调函数。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_motion_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_motion_interface_8idl.md index 92fd912be4c749fd3e0af1668131c13ccc2c8729..863b811feb7cc71f0772d9ac43210cece804e9fa 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_motion_interface_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_motion_interface_8idl.md @@ -1,7 +1,7 @@ # IMotionInterface.idl -## **概述** +## 概述 定义使能/去使能手势识别、订阅/取消订阅手势识别数据的接口。 @@ -17,17 +17,17 @@ **相关模块:** -[Motion](motion.md) +[Motion](_motion.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IMotionInterface](interface_i_motion_interface.md) | 提供Motion设备基本控制操作接口。 | +| [IMotionInterface](interface_i_motion_interface.md) | interface
提供Motion设备基本控制操作接口。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_nnrt_device_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_nnrt_device_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..995cd340295fd1507f04d22de6ca099228b90ff3 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_nnrt_device_8idl.md @@ -0,0 +1,37 @@ +# INnrtDevice.idl + + +## 概述 + +该文件定义芯片设备相关的接口。 + +该文件包含对芯片设备的信息查询、AI模型编译接口。 + +**Since:** + +3.2 + +**Version:** + +2.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [INnrtDevice](interface_i_nnrt_device.md) | interface
定义了与设备相关的接口,实现设备管理和模型编译等操作。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.nnrt.v2_0 | NNRt模块的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_o_tensor.md b/zh-cn/device-dev/reference/hdi-apis/_i_o_tensor.md new file mode 100644 index 0000000000000000000000000000000000000000..7fdb326dd0d86512de1235df0fa744c3afa9225e --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_o_tensor.md @@ -0,0 +1,81 @@ +# IOTensor + + +## 概述 + +AI模型的输入输出张量。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [name](#name) | String
张量的名称  | +| [dataType](#datatype) | enum [DataType](_n_n_rt.md#datatype)
张量的数据类型, 数据类型定义请查看[DataType](_n_n_rt.md#datatype) | +| [dimensions](#dimensions) | int[]
张量的形状  | +| [format](#format) | enum [Format](_n_n_rt.md#format)
张量的数据排列格式,排列格式的定义请查看[Format](_n_n_rt.md#format) | +| [data](#data) | struct [SharedBuffer](_shared_buffer.md)
张量的数据,数据保存在共享内存中,共享内存的定义请查看[SharedBuffer](_shared_buffer.md) | + + +## 类成员变量说明 + + +### data + + +``` +struct SharedBuffer IOTensor::data +``` +**描述:** +张量的数据,数据保存在共享内存中,共享内存的定义请查看[SharedBuffer](_shared_buffer.md) + + +### dataType + + +``` +enum DataType IOTensor::dataType +``` +**描述:** +张量的数据类型, 数据类型定义请查看[DataType](_n_n_rt.md#datatype) + + +### dimensions + + +``` +int [] IOTensor::dimensions +``` +**描述:** +张量的形状 + + +### format + + +``` +enum Format IOTensor::format +``` +**描述:** +张量的数据排列格式,排列格式的定义请查看[Format](_n_n_rt.md#format) + + +### name + + +``` +String IOTensor::name +``` +**描述:** +张量的名称 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_offline_stream_operator_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_offline_stream_operator_8idl.md index 4328c264226967bd3e8853dd2b5f9e084dea7b55..169a4a97fac101efe6264566aa46e8f959017c54 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_offline_stream_operator_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_offline_stream_operator_8idl.md @@ -1,7 +1,7 @@ # IOfflineStreamOperator.idl -## **概述** +## 概述 离线流的操作接口。 @@ -15,20 +15,20 @@ **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IOfflineStreamOperator](interface_i_offline_stream_operator.md) | 定义Camera设备离线流操作。 | +| [IOfflineStreamOperator](interface_i_offline_stream_operator.md) | interface
定义Camera设备离线流操作。 | -### 关键字 +### 变量 | 名称 | 描述 | | -------- | -------- | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_pin_auth_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_pin_auth_interface_8idl.md index 4a1362ac9401a1f682c0f0ef0e61fb6cac9ecfe2..95466b91b8146d74f17156625fccd0fefcae0d8d 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_pin_auth_interface_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_pin_auth_interface_8idl.md @@ -1,31 +1,31 @@ # IPinAuthInterface.idl -## **概述** +## 概述 定义获取口令认证驱动的执行器列表接口,用于从口令认证驱动获取执行器对象列表。 -**Since:** +**Since:** 3.2 -**所属模块:** +**相关模块:** [HdfPinAuth](_hdf_pin_auth.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IPinAuthInterface](interface_i_pin_auth_interface.md) | 定义获取口令认证驱动的执行器列表接口。 | +| [IPinAuthInterface](interface_i_pin_auth_interface.md) | interface
定义获取口令认证驱动的执行器列表接口。 | ### 关键字 | 名称 | 描述 | | -------- | -------- | -| package ohos.hdi.pin_auth.v1_0 | 口令认证接口的包路径 | +| package ohos.hdi.pin_auth.v1_0 | 口令认证接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_power_hdi_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_power_hdi_callback_8idl.md index 3336fcba06cf6ec28189e14c35300c7d6b3eedd2..3fd942d407b6a546b30eba26f5221ff0936b0798 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_power_hdi_callback_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_power_hdi_callback_8idl.md @@ -1,13 +1,13 @@ # IPowerHdiCallback.idl -## **概述** +## 概述 休眠/唤醒状态的回调。 电源模块为电源服务提供的订阅休眠/唤醒状态的回调。 -**Since:** +**Since:** 3.1 @@ -20,14 +20,14 @@ [Power](power.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IPowerHdiCallback](interface_i_power_hdi_callback.md) | 休眠/唤醒状态的回调。 | +| [IPowerHdiCallback](interface_i_power_hdi_callback.md) | interface
休眠/唤醒状态的回调。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_power_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_power_interface_8idl.md index dc9da2e90b44e572eece17d102853495bb91e7a2..d0648c50c4eaec940a1a93c35460571b7e650fdc 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_power_interface_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_power_interface_8idl.md @@ -1,13 +1,13 @@ # IPowerInterface.idl -## **概述** +## 概述 休眠/唤醒操作、订阅休眠/唤醒状态、运行锁管理的接口。 电源模块为电源服务提供休眠/唤醒操作、订阅休眠/唤醒状态和运行锁管理的接口。 -**Since:** +**Since:** 3.1 @@ -20,14 +20,14 @@ [Power](power.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IPowerInterface](interface_i_power_interface.md) | 休眠/唤醒操作、订阅休眠/唤醒状态、运行锁管理的接口。 | +| [IPowerInterface](interface_i_power_interface.md) | interface
休眠/唤醒操作、订阅休眠/唤醒状态、运行锁管理的接口。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_prepared_model_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_prepared_model_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..1e7fd7783d9712411ee42e8d1d48cb0df5f2a9c6 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_prepared_model_8idl.md @@ -0,0 +1,35 @@ +# IPreparedModel.idl + + +## 概述 + +该文件定义了AI模型推理、获取模型输入tensor维度范围、导出编译后模型等接口。 + +**Since:** + +3.2 + +**Version:** + +2.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IPreparedModel](interface_i_prepared_model.md) | interface
定义模型编译后的对象,包含编译后模型导出、模型推理接口。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.nnrt.v2_0 | NNRt模块的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_rect.md b/zh-cn/device-dev/reference/hdi-apis/_i_rect.md index f9085f24e11c14e4ef55d9b4c02f27e8bd7e4b97..ec72624f51e3a6b9dfe5d3e2151ad70653e12d85 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_rect.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_rect.md @@ -1,23 +1,23 @@ # IRect -## **概述** +## 概述 -定义矩形信息。 +定义矩形信息 **相关模块:** [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [x](_display.md#x-14) | 矩形框起始X坐标。 | -| [y](_display.md#y-14) | 矩形框起始Y坐标。 | -| [w](_display.md#w-12) | 矩形框宽度。 | -| [h](_display.md#h-12) | 矩形框高度。 | +| [x](_display.md#x-14) | int32_t
矩形框起始x坐标 | +| [y](_display.md#y-14) | int32_t
矩形框起始y坐标 | +| [w](_display.md#w-12) | int32_t
矩形框宽度 | +| [h](_display.md#h-12) | int32_t
矩形框高度 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_ril_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_ril_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..c78949f41c6481d6ee1731805b59fd5d2adddc01 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_ril_8idl.md @@ -0,0 +1,35 @@ +# IRil.idl + + +## 概述 + +Ril模块的请求接口。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IRil](interface_i_ril.md) | interface
Ril模块的请求接口。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.ril.v1_0 | Ril模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_ril_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_ril_callback_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..909e4026fabe04e2f00cc22409fafb10486da64f --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_ril_callback_8idl.md @@ -0,0 +1,35 @@ +# IRilCallback.idl + + +## 概述 + +Ril模块的回调接口 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IRilCallback](interface_i_ril_callback.md) | interface
Ril模块的回调接口。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.ril.v1_0 | Ril模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_sensor_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_sensor_callback_8idl.md index 90176ba6c0d139069118cc31184af63e7d5c8158..de8e511dff94ca2011d9919e97c7dca27d0dd9ac 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_sensor_callback_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_sensor_callback_8idl.md @@ -1,11 +1,11 @@ # ISensorCallback.idl -## **概述** +## 概述 Sensor模块为Sensor服务提供数据上报的回调函数。 -**Since:** +**Since:** 2.2 @@ -15,17 +15,17 @@ Sensor模块为Sensor服务提供数据上报的回调函数。 **相关模块:** -[Sensor](sensor.md) +[Sensor](_sensor.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [ISensorCallback](interface_i_sensor_callback.md) | 定义用于上报传感器数据的回调函数。 | +| [ISensorCallback](interface_i_sensor_callback.md) | interface
定义用于上报传感器数据的回调函数。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_sensor_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_sensor_interface_8idl.md index 9b93aadd9a598ef7f112ba15e6d775a9b074ced5..37d319717c07a16b5857c5939425f89692572e4f 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_sensor_interface_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_sensor_interface_8idl.md @@ -1,11 +1,11 @@ # ISensorInterface.idl -## **概述** +## 概述 Sensor模块对外通用的接口声明文件,提供获取传感器设备信息、订阅/取消订阅传感器数据、 使能/去使能传感器、设置传感器模式、设置传感器精度,量程等可选配置接口定义。 -**Since:** +**Since:** 2.2 @@ -15,17 +15,17 @@ Sensor模块对外通用的接口声明文件,提供获取传感器设备信 **相关模块:** -[Sensor](sensor.md) +[Sensor](_sensor.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [ISensorInterface](interface_i_sensor_interface.md) | 提供Sensor设备基本控制操作接口。 | +| [ISensorInterface](interface_i_sensor_interface.md) | interface
提供Sensor设备基本控制操作接口。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_stream_operator_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_stream_operator_8idl.md index 1ee2bebbcae25ee741c7f52362cfc1cd8a3e3a57..70cfefd536f0b3cfe1e05dfd2232d18bfc04b559 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_stream_operator_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_stream_operator_8idl.md @@ -1,11 +1,11 @@ # IStreamOperator.idl -## **概述** +## 概述 流的操作接口。 -**Since:** +**Since:** 3.2 @@ -15,22 +15,22 @@ **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IStreamOperator](interface_i_stream_operator.md) | 定义Camera设备流操作。 | +| [IStreamOperator](interface_i_stream_operator.md) | interface
定义Camera设备流操作。 | -### 关键字 +### 变量 | 名称 | 描述 | | -------- | -------- | | package ohos.hdi.camera.v1_0 | Camera设备接口的包路径。 | -| sequenceable ohos.hdi.camera.v1_0.BufferProducerSequenceable | ohos.hdi.camera.v1_0序列,可用缓冲区生成器。 | +| sequenceable ohos.hdi.camera.v1_0.BufferProducerSequenceable | ohos.hdi.camera.v1_0序列,可用缓冲区生成器。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_stream_operator_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_stream_operator_callback_8idl.md index f349924e485b58083362b1641a013ba2252ede13..68b19a851b9d4818ccd86a6cf9e33ecea76f9a6b 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_stream_operator_callback_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_stream_operator_callback_8idl.md @@ -1,11 +1,11 @@ # IStreamOperatorCallback.idl -## **概述** +## 概述 [IStreamOperator](interface_i_stream_operator.md)相关的回调,这些回调均由调用者实现。 -**Since:** +**Since:** 3.2 @@ -15,20 +15,20 @@ **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IStreamOperatorCallback](interface_i_stream_operator_callback.md) | 定义Camera设备流回调操作。 | +| [IStreamOperatorCallback](interface_i_stream_operator_callback.md) | interface
定义Camera设备流回调操作。 | -### 关键字 +### 变量 | 名称 | 描述 | | -------- | -------- | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_surface.md b/zh-cn/device-dev/reference/hdi-apis/_i_surface.md index 8006305430c09c9e3f97b5731cf0b882e3ee9f4c..a5ca123687c102bd5a8ae26b46cfadf361779ecb 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_surface.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_surface.md @@ -1,7 +1,7 @@ # ISurface -## **概述** +## 概述 用于存放窗口相关信息的结构体定义,提供给硬件加速使用,例如图像合成,位图搬移等操作。 @@ -10,23 +10,23 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [phyAddr](_display.md#phyaddr-23) | 图像首地址 | -| [height](_display.md#height-48) | 图像高度 | -| [width](_display.md#width-49) | 图像宽度 | -| [stride](_display.md#stride-12) | 图像跨度 | -| [enColorFmt](_display.md#encolorfmt) | 图像格式 | -| [bYCbCrClut](_display.md#bycbcrclut) | CLUT表是否位于 YCbCr 空间 | -| [bAlphaMax255](_display.md#balphamax255) | 图像Alpha最大值为255还是128 | -| [bAlphaExt1555](_display.md#balphaext1555) | 是否使能1555的Alpha扩展 | -| [alpha0](_display.md#alpha0-22) | Alpha0值,取值范围:[0,255] | -| [alpha1](_display.md#alpha1-22) | Alpha1值,取值范围:[0,255] | -| [clutPhyAddr](_display.md#clutphyaddr) | CbCr分量地址 | -| [cbcrStride](_display.md#cbcrstride) | CbCr分量跨度 | -| [clutPhyAddr](_display.md#clutphyaddr) | CLUT表首地址,用作颜色扩展或颜色校正 | +| [phyAddr](_display.md#phyaddr-23) | uint64_t
图像首地址 | +| [height](_display.md#height-48) | int32_t
图像高度 | +| [width](_display.md#width-49) | int32_t
图像宽度 | +| [stride](_display.md#stride-12) | int32_t
图像跨度 | +| [enColorFmt](_display.md#encolorfmt) | [PixelFormat](_display.md#pixelformat)
图像格式 | +| [bYCbCrClut](_display.md#bycbcrclut) | bool
CLUT表是否位于 YCbCr 空间 | +| [bAlphaMax255](_display.md#balphamax255) | bool
图像alpha最大值为255还是128 | +| [bAlphaExt1555](_display.md#balphaext1555) | bool
是否使能1555的Alpha扩展 | +| [alpha0](_display.md#alpha0-22) | uint8_t
Alpha0值,取值范围:[0,255] | +| [alpha1](_display.md#alpha1-22) | uint8_t
Alpha1值,取值范围:[0,255] | +| [cbcrPhyAddr](_display.md#cbcrphyaddr) | uint64_t
CbCr分量地址 | +| [cbcrStride](_display.md#cbcrstride) | int32_t
CbCr分量跨度 | +| [clutPhyAddr](_display.md#clutphyaddr) | uint64_t
Clut表首地址,用作颜色扩展或颜色校正 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_thermal_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_thermal_callback_8idl.md index 67ec77493039b8de2a3a97be1063c2945c4c968a..51b3c103cad2e0595fefd2dbfdfae9ee1e4a4ac2 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_thermal_callback_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_thermal_callback_8idl.md @@ -1,7 +1,7 @@ # IThermalCallback.idl -## **概述** +## 概述 设备发热状态的回调。 @@ -20,14 +20,14 @@ [Thermal](thermal.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IThermalCallback](interface_i_thermal_callback.md) | 订阅设备发热状态的回调。 | +| [IThermalCallback](interface_i_thermal_callback.md) | interface
订阅设备发热状态的回调。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_thermal_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_thermal_interface_8idl.md index 94f01ad5540cbeb24513fed7cab2573ee21ac077..b6bc811df10cfeea34d2de775f0d52fdb4c60287 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_thermal_interface_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_thermal_interface_8idl.md @@ -1,7 +1,7 @@ # IThermalInterface.idl -## **概述** +## 概述 设备温度管理、控制及订阅接口。 @@ -20,14 +20,14 @@ [Thermal](thermal.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IThermalInterface](interface_i_thermal_interface.md) | 设备温度管理、控制及订阅接口。 | +| [IThermalInterface](interface_i_thermal_interface.md) | interface
设备温度管理、控制及订阅接口。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_usb_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_usb_interface_8idl.md index b7dad51734962b8a92cdac7544341552bb0c51c6..78619bd4bd24d50ebb6815f107f0f2383862f099 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_usb_interface_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_usb_interface_8idl.md @@ -1,7 +1,7 @@ # IUsbInterface.idl -## **概述** +## 概述 声明标准的USB驱动接口函数。 @@ -15,17 +15,17 @@ **相关模块:** -[USB](usb.md) +[USB](_u_s_b.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IUsbInterface](interface_i_usb_interface.md) | 定义USB驱动基本的操作功能。 | +| [IUsbInterface](interface_i_usb_interface.md) | interface
定义USB驱动基本的操作功能。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_usbd_bulk_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_usbd_bulk_callback_8idl.md index 0c86dd008f370412921b5187ee2498c4c62b529a..fc629fcae1335a4bf76e62e9c30c01ee30df06c3 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_usbd_bulk_callback_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_usbd_bulk_callback_8idl.md @@ -1,7 +1,7 @@ # IUsbdBulkCallback.idl -## **概述** +## 概述 USB驱动批量传输读/写数据的回调。 @@ -15,17 +15,17 @@ USB驱动批量传输读/写数据的回调。 **相关模块:** -[USB](usb.md) +[USB](_u_s_b.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IUsbdBulkCallback](interface_i_usbd_bulk_callback.md) | USB驱动的回调函数。 | +| [IUsbdBulkCallback](interface_i_usbd_bulk_callback.md) | interface
USB驱动的回调函数。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_usbd_subscriber_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_usbd_subscriber_8idl.md index 6a7bdfc81009ef635e3bf85ea770726963a073fc..d9ea98b74cc03613fab84a6d3e5ba8bb4e13d367 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_usbd_subscriber_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_usbd_subscriber_8idl.md @@ -1,7 +1,7 @@ # IUsbdSubscriber.idl -## **概述** +## 概述 USB驱动的订阅函数。 @@ -15,17 +15,17 @@ USB驱动的订阅函数。 **相关模块:** -[USB](usb.md) +[USB](_u_s_b.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IUsbdSubscriber](interface_i_usbd_subscriber.md) | 定义USB驱动的订阅类相关函数。 | +| [IUsbdSubscriber](interface_i_usbd_subscriber.md) | interface
定义USB驱动的订阅类相关函数。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_user_auth_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_user_auth_interface_8idl.md index 65a42d5ab47817d5f689becba8a863a3595d9667..6f4f9cc391a8260c35bf8d1ea570d7e5b9cbf448 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_user_auth_interface_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_user_auth_interface_8idl.md @@ -1,27 +1,27 @@ # IUserAuthInterface.idl -## **概述** +## 概述 声明用户认证驱动的API接口。接口可用于注册执行器,管理用户认证凭据,完成PIN码和生物特征认证。 -**Since:** +**Since:** 3.2 -**所属模块:** +**相关模块:** [HdfUserAuth](_hdf_user_auth.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IUserAuthInterface](interface_i_user_auth_interface.md) | 声明用户认证驱动的API接口。 | +| [IUserAuthInterface](interface_i_user_auth_interface.md) | interface
声明用户认证驱动的API接口。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_vibrator_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_vibrator_interface_8idl.md index bd1f6b90c2b08b8e9b58193eafea768589d6836e..6a44f066c33a79a8f265aef01a5fb8c33bb15e02 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_vibrator_interface_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_vibrator_interface_8idl.md @@ -1,7 +1,7 @@ # IVibratorInterface.idl -## **概述** +## 概述 定义马达的通用API,可用于控制马达执行单次或周期性振动、设置马达振幅与频率。 @@ -15,17 +15,17 @@ **相关模块:** -[Vibrator](vibrator.md) +[Vibrator](_vibrator.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IVibratorInterface](interface_i_vibrator_interface.md) | Vibrator模块向上层服务提供统一的接口。 | +| [IVibratorInterface](interface_i_vibrator_interface.md) | interface
Vibrator模块向上层服务提供统一的接口。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_wififence_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_wififence_callback_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..6ccb9d6c281192aa7b8702cd004523919c601e90 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_wififence_callback_8idl.md @@ -0,0 +1,35 @@ +# IWififenceCallback.idl + + +## 概述 + +定义Wi-Fi围栏模块回调接口。 + +**Since:** + +4.0 + +**Version:** + +1.0 + +**相关模块:** + +[HdiLpfenceWififence](_hdi_lpfence_wififence.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IWififenceCallback](interface_i_wififence_callback.md) | interface
导入Wi-Fi围栏模块的数据类型。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.wififence.v1_0 | Wi-Fi围栏模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_wififence_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_wififence_interface_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..f473171a739fcc146835b6a4dfd2f770a5ece651 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_i_wififence_interface_8idl.md @@ -0,0 +1,35 @@ +# IWififenceInterface.idl + + +## 概述 + +定义Wi-Fi围栏模块回调接口。 + +**Since:** + +4.0 + +**Version:** + +1.0 + +**相关模块:** + +[HdiLpfenceWififence](_hdi_lpfence_wififence.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IWififenceInterface](interface_i_wififence_interface.md) | interface
导入Wi-Fi围栏模块的数据类型。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.wififence.v1_0 | Wi-Fi围栏模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_wlan_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_wlan_callback_8idl.md index beb6dbd85a0accf901c36f1212d4e1a5747c95f6..10a8f12dc97ba18c212ee001cfb9e83e16ac79ed 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_wlan_callback_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_wlan_callback_8idl.md @@ -1,7 +1,7 @@ # IWlanCallback.idl -## **概述** +## 概述 WLAN模块为WLAN服务提供的重启驱动、扫描结果、Netlink消息处理的回调。 @@ -15,17 +15,17 @@ WLAN模块为WLAN服务提供的重启驱动、扫描结果、Netlink消息处 **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IWlanCallback](interface_i_wlan_callback.md) | 定义WLAN模块的回调函数。 | +| [IWlanCallback](interface_i_wlan_callback.md) | interface
定义WLAN模块的回调函数。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_i_wlan_interface_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_i_wlan_interface_8idl.md index adaa08cb01c1d4e01d58f984623fd0d762a7a56e..92e29bad5036400f6b07b81508bd38aeddb79eda 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_i_wlan_interface_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_i_wlan_interface_8idl.md @@ -1,9 +1,11 @@ # IWlanInterface.idl -## **概述** +## 概述 -WLAN模块操作接口,上层服务调用相关的接口可实现:建立/关闭WLAN热点,扫描/关联/去关联WLAN热点,设置国家码,管理网络设备等功能。 +建立/关闭WLAN热点,扫描/关联/去关联WLAN热点,设置国家码,管理网络设备等操作的接口。 + +上层服务调用相关的接口实现:建立/关闭WLAN热点,扫描/关联/去关联WLAN热点,设置国家码,管理网络设备等功能。 **Since:** @@ -15,17 +17,17 @@ WLAN模块操作接口,上层服务调用相关的接口可实现:建立/关 **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [IWlanInterface](interface_i_wlan_interface.md) | WLAN模块向上层WLAN服务提供了统一接口。 | +| [IWlanInterface](interface_i_wlan_interface.md) | interface
WLAN模块向上层WLAN服务提供了统一接口。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_icc_io_result_info.md b/zh-cn/device-dev/reference/hdi-apis/_icc_io_result_info.md new file mode 100644 index 0000000000000000000000000000000000000000..35f7f0a28942a6c04d5c85077e9148a6aed65899 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_icc_io_result_info.md @@ -0,0 +1,55 @@ +# IccIoResultInfo + + +## 概述 + +SIM数据的响应结果信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [sw1](#sw1) | int
SIM卡状态字1,命令执行后SIM卡返回的响应  | +| [sw2](#sw2) | int
SIM卡状态字2,命令执行后SIM卡返回的响应  | +| [response](#response) | String
响应信息  | + + +## 类成员变量说明 + + +### response + + +``` +String IccIoResultInfo::response +``` +**描述:** +响应信息 + + +### sw1 + + +``` +int IccIoResultInfo::sw1 +``` +**描述:** +SIM卡状态字1,命令执行后SIM卡返回的响应 + + +### sw2 + + +``` +int IccIoResultInfo::sw2 +``` +**描述:** +SIM卡状态字2,命令执行后SIM卡返回的响应 diff --git a/zh-cn/device-dev/reference/hdi-apis/_identify_result_info.md b/zh-cn/device-dev/reference/hdi-apis/_identify_result_info.md index 7de20781d4853dcc55f0a24b127939d5abc0c241..0033407fb4d7f270bbf961d4b432e8be7d1fc663 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_identify_result_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_identify_result_info.md @@ -1,36 +1,32 @@ # IdentifyResultInfo -## **概述** +## 概述 用户身份识别结果信息。 -**Since:** - +**Since:** 3.2 - **Version:** - 1.0 - -**所属模块:** +**相关模块:** [HdfUserAuth](_hdf_user_auth.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [result](#result) | 用户身份识别结果。 | -| [userId](#userid) | 用户ID。 | -| [token](#token) | 用户身份识别令牌。 | +| [result](#result) | int
用户身份识别结果。  | +| [userId](#userid) | int
用户ID。  | +| [token](#token) | unsigned char[]
用户身份识别令牌。  | -## **类成员变量说明** +## 类成员变量说明 ### result @@ -39,9 +35,7 @@ ``` int IdentifyResultInfo::result ``` - -**描述:** - +**描述:** 用户身份识别结果。 @@ -51,9 +45,7 @@ int IdentifyResultInfo::result ``` unsigned char [] IdentifyResultInfo::token ``` - -**描述:** - +**描述:** 用户身份识别令牌。 @@ -63,7 +55,5 @@ unsigned char [] IdentifyResultInfo::token ``` int IdentifyResultInfo::userId ``` - -**描述:** - +**描述:** 用户ID。 diff --git a/zh-cn/device-dev/reference/hdi-apis/input.md b/zh-cn/device-dev/reference/hdi-apis/_input.md similarity index 66% rename from zh-cn/device-dev/reference/hdi-apis/input.md rename to zh-cn/device-dev/reference/hdi-apis/_input.md index 4e58d0dde9250ce07d777c7e2192f2f08f27753a..774ec22b1a87e88c6c57bea7b5ed4789dca6529f 100644 --- a/zh-cn/device-dev/reference/hdi-apis/input.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input.md @@ -1,22 +1,22 @@ # Input -## **概述** +## 概述 Input模块驱动接口声明。 本模块为Input服务提供相关驱动接口,包括Input设备的打开和关闭、Input事件获取、设备信息查询、回调函数注册、特性状态控制等接口。 -**Since**: +**Since:** 1.0 -**Version**: +**Version:** 1.0 -## **汇总** +## 汇总 ### 文件 @@ -33,21 +33,21 @@ Input模块驱动接口声明。 | 名称 | 描述 | | -------- | -------- | -| [InputController](_input_controller.md) | 提供Input设备业务控制相关的接口。 | -| [InputManager](_input_manager.md) | 提供Input设备管理相关的接口。 | -| [IInputInterface](_i_input_interface.md) | 定义用于提供Input设备驱动程序功能的接口。 | -| [InputReporter](_input_reporter.md) | 提供Input设备数据上报相关的接口。 | -| [InputEventPackage](_input_event_package.md) | Input事件数据包结构。 | -| [InputHotPlugEvent](_input_hot_plug_event.md) | 热插拔事件数据包结构。 | -| [InputDevDesc](_input_dev_desc.md) | Input设备描述信息。 | -| [InputEventCb](_input_event_cb.md) | 此结构体定义了输入事件回调函数并提供给Input服务使用。 | -| [InputHostCb](_input_host_cb.md) | 此结构体定义了热插拔事件上报回调函数并提供给Input服务使用。 | -| [InputDevAbility](_input_dev_ability.md) | Input设备的能力属性,存储支持事件的位图。 | -| [InputDimensionInfo](_input_dimension_info.md) | Input设备的维度信息。 | -| [InputDevIdentify](_input_dev_identify.md) | Input设备的识别信息。 | -| [InputDevAttr](_input_dev_attr.md) | Input设备属性。 | -| [InputDeviceInfo](_input_device_info.md) | Input设备基础设备信息。 | -| [InputExtraCmd](_input_extra_cmd.md) | 扩展指令的数据结构。 | +| [InputController](_input_controller.md) | struct
提供Input设备业务控制相关的接口。 | +| [InputManager](_input_manager.md) | struct
提供Input设备管理相关的接口。 | +| [IInputInterface](_i_input_interface.md) | struct
定义用于提供Input设备驱动程序功能的接口。 | +| [InputReporter](_input_reporter.md) | struct
提供Input设备数据上报相关的接口。 | +| [InputEventPackage](_input_event_package.md) | struct
Input事件数据包结构。 | +| [InputHotPlugEvent](_input_hot_plug_event.md) | struct
热插拔事件数据包结构。 | +| [InputDevDesc](_input_dev_desc.md) | struct
Input设备描述信息。 | +| [InputEventCb](_input_event_cb.md) | struct
此结构体定义了输入事件回调函数并提供给Input服务使用。 | +| [InputHostCb](_input_host_cb.md) | struct
此结构体定义了热插拔事件上报回调函数并提供给Input服务使用。 | +| [InputDevAbility](_input_dev_ability.md) | struct
Input设备的能力属性,存储支持事件的位图。 | +| [InputDimensionInfo](_input_dimension_info.md) | struct
Input设备的维度信息。 | +| [InputDevIdentify](_input_dev_identify.md) | struct
Input设备的识别信息。 | +| [InputDevAttr](_input_dev_attr.md) | struct
Input设备属性。 | +| [InputDeviceInfo](_input_device_info.md) | struct
Input设备基础设备信息。 | +| [InputExtraCmd](_input_extra_cmd.md) | struct
扩展指令的数据结构。 | ### 宏定义 @@ -71,20 +71,20 @@ Input模块驱动接口声明。 | 名称 | 描述 | | -------- | -------- | -| [RetStatus](#retstatus) {   INPUT_SUCCESS = 0, INPUT_FAILURE = -1, INPUT_INVALID_PARAM = -2, INPUT_NOMEM = -3,   INPUT_NULL_PTR = -4, INPUT_TIMEOUT = -5, INPUT_UNSUPPORTED = -6 } | 定义返回值类型。 | -| [InputDevType](#inputdevtype) {   INDEV_TYPE_TOUCH, INDEV_TYPE_KEY, INDEV_TYPE_KEYBOARD, INDEV_TYPE_MOUSE,   INDEV_TYPE_BUTTON, INDEV_TYPE_CROWN, INDEV_TYPE_ENCODER, INDEV_TYPE_UNKNOWN } | 定义Input设备类型。 | +| [RetStatus](#retstatus) { INPUT_SUCCESS = 0, INPUT_FAILURE = -1, INPUT_INVALID_PARAM = -2, INPUT_NOMEM = -3,   INPUT_NULL_PTR = -4, INPUT_TIMEOUT = -5, INPUT_UNSUPPORTED = -6 } | 定义返回值类型。 | +| [InputDevType](#inputdevtype) { INDEV_TYPE_TOUCH, INDEV_TYPE_KEY, INDEV_TYPE_KEYBOARD, INDEV_TYPE_MOUSE,   INDEV_TYPE_BUTTON, INDEV_TYPE_CROWN, INDEV_TYPE_ENCODER, INDEV_TYPE_UNKNOWN } | 定义Input设备类型。 | | [PowerStatus](#powerstatus) { INPUT_RESUME, INPUT_SUSPEND, INPUT_LOW_POWER, INPUT_POWER_STATUS_UNKNOWN } | 定义电源状态。 | -| [CapacitanceTest](#capacitancetest) {   BASE_TEST, FULL_TEST, MMI_TEST, RUNNING_TEST,   TEST_TYPE_UNKNOWN } | 定义容值测试类型。 | +| [CapacitanceTest](#capacitancetest) { BASE_TEST, FULL_TEST, MMI_TEST, RUNNING_TEST,   TEST_TYPE_UNKNOWN } | 定义容值测试类型。 | ### 函数 | 名称 | 描述 | | -------- | -------- | -| [GetInputInterface](#getinputinterface) ([IInputInterface](_i_input_interface.md) \*\*interface) | Input服务通过调用此接口获取操作Input设备的所有接口。 | +| [GetInputInterface](#getinputinterface) ([IInputInterface](_i_input_interface.md) \*\*interface) | int32_t
Input服务通过调用此接口获取操作Input设备的所有接口。 | -## **宏定义说明** +## 宏定义说明 ### BITS_TO_UINT64 @@ -94,7 +94,7 @@ Input模块驱动接口声明。 #define BITS_TO_UINT64( count) DIV_ROUND_UP(count, BYTE_HAS_BITS * sizeof(uint64_t)) ``` -**描述:** +**描述:** 比特与64位无符号整数的转换公式 @@ -106,7 +106,7 @@ Input模块驱动接口声明。 #define BYTE_HAS_BITS 8 ``` -**描述:** +**描述:** 一个字节所包含的比特数 @@ -118,7 +118,7 @@ Input模块驱动接口声明。 #define CHIP_INFO_LEN 10 ``` -**描述:** +**描述:** 芯片信息长度 @@ -130,7 +130,7 @@ Input模块驱动接口声明。 #define CHIP_NAME_LEN 10 ``` -**描述:** +**描述:** 芯片名称长度 @@ -142,7 +142,7 @@ Input模块驱动接口声明。 #define DEV_MANAGER_SERVICE_NAME "hdf_input_host" ``` -**描述:** +**描述:** Input设备节点服务名称 @@ -154,7 +154,7 @@ Input设备节点服务名称 #define DEV_NAME_LEN 64 ``` -**描述:** +**描述:** Input设备名称长度 @@ -166,7 +166,7 @@ Input设备名称长度 #define DIV_ROUND_UP( nr, d ) (((nr) + (d) - 1) / (d)) ``` -**描述:** +**描述:** 向上取整计算公式 @@ -178,7 +178,7 @@ Input设备名称长度 #define HDF_FF_CNT (0x7f + 1) ``` -**描述:** +**描述:** Input设备发送力反馈命令的数量最大值 @@ -190,7 +190,7 @@ Input设备发送力反馈命令的数量最大值 #define MAX_INPUT_DEV_NUM 32 ``` -**描述:** +**描述:** Input设备数量的最大值 @@ -202,7 +202,7 @@ Input设备数量的最大值 #define SELF_TEST_RESULT_LEN 20 ``` -**描述:** +**描述:** 自测试结果长度 @@ -214,12 +214,12 @@ Input设备数量的最大值 #define VENDOR_NAME_LEN 10 ``` -**描述:** +**描述:** 厂商名称长度 -## **枚举类型说明** +## 枚举类型说明 ### CapacitanceTest @@ -229,7 +229,7 @@ Input设备数量的最大值 enum CapacitanceTest ``` -**描述:** +**描述:** 定义容值测试类型。 @@ -249,7 +249,7 @@ enum CapacitanceTest enum InputDevType ``` -**描述:** +**描述:** 定义Input设备类型。 @@ -272,7 +272,7 @@ enum InputDevType enum PowerStatus ``` -**描述:** +**描述:** 定义电源状态。 @@ -291,7 +291,7 @@ enum PowerStatus enum RetStatus ``` -**描述:** +**描述:** 定义返回值类型。 @@ -306,7 +306,7 @@ enum RetStatus | INPUT_UNSUPPORTED | 特性不支持 | -## **函数说明** +## 函数说明 ### GetInputInterface() @@ -316,7 +316,7 @@ enum RetStatus int32_t GetInputInterface (IInputInterface ** interface) ``` -**描述:** +**描述:** Input服务通过调用此接口获取操作Input设备的所有接口。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_controller.md b/zh-cn/device-dev/reference/hdi-apis/_input_controller.md index 34ed01cf05b1a3ccbf1c59fe78ea25dd1a2d19bb..8c1d658571dc35d3c335d068c4f70e3f32639fc5 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_controller.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_controller.md @@ -1,7 +1,7 @@ # InputController -## **概述** +## 概述 提供Input设备业务控制相关的接口。 @@ -9,28 +9,28 @@ **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| ([SetPowerStatus](#setpowerstatus) )(uint32_t devIndex, uint32_t status) | 设置电源状态。 | -| ([GetPowerStatus](#getpowerstatus) )(uint32_t devIndex, uint32_t \*status) | 获取电源状态。 | -| ([GetDeviceType](#getdevicetype) )(uint32_t devIndex, uint32_t \*deviceType) | 获取devIndex对应的Input设备的类型。 | -| ([GetChipInfo](#getchipinfo) )(uint32_t devIndex, char \*chipInfo, uint32_t length) | 获取器件对应的编码信息。 | -| ([GetVendorName](#getvendorname) )(uint32_t devIndex, char \*vendorName, uint32_t length) | 获取devIndex对应的模组厂商名。 | -| ([GetChipName](#getchipname) )(uint32_t devIndex, char \*chipName, uint32_t length) | 获取devIndex对应的驱动芯片名。 | -| ([SetGestureMode](#setgesturemode) )(uint32_t devIndex, uint32_t gestureMode) | 设置手势模式。 | -| ([RunCapacitanceTest](#runcapacitancetest) )(uint32_t devIndex, uint32_t testType, char \*result, uint32_t length) | 执行容值自检测试。 | -| ([RunExtraCommand](#runextracommand) )(uint32_t devIndex, [InputExtraCmd](_input_extra_cmd.md) \*cmd) | 执行拓展指令。 | +| (\* [SetPowerStatus](#setpowerstatus) )(uint32_t devIndex, uint32_t status) | int32_t
设置电源状态。 | +| (\* [GetPowerStatus](#getpowerstatus) )(uint32_t devIndex, uint32_t \*status) | int32_t
获取电源状态。 | +| (\* [GetDeviceType](#getdevicetype) )(uint32_t devIndex, uint32_t \*deviceType) | int32_t
获取devIndex对应的Input设备的类型。 | +| (\* [GetChipInfo](#getchipinfo) )(uint32_t devIndex, char \*chipInfo, uint32_t length) | int32_t
获取器件对应的编码信息。 | +| (\* [GetVendorName](#getvendorname) )(uint32_t devIndex, char \*vendorName, uint32_t length) | int32_t
获取devIndex对应的模组厂商名。 | +| (\* [GetChipName](#getchipname) )(uint32_t devIndex, char \*chipName, uint32_t length) | int32_t
获取devIndex对应的驱动芯片名。 | +| (\* [SetGestureMode](#setgesturemode) )(uint32_t devIndex, uint32_t gestureMode) | int32_t
设置手势模式。 | +| (\* [RunCapacitanceTest](#runcapacitancetest) )(uint32_t devIndex, uint32_t testType, char \*result, uint32_t length) | int32_t
执行容值自检测试。 | +| (\* [RunExtraCommand](#runextracommand) )(uint32_t devIndex, [InputExtraCmd](_input_extra_cmd.md) \*cmd) | int32_t
执行拓展指令。 | -## **类成员变量说明** +## 类成员变量说明 ### GetChipInfo @@ -40,7 +40,7 @@ int32_t(* InputController::GetChipInfo) (uint32_t devIndex, char *chipInfo, uint32_t length) ``` -**描述:** +**描述:** 获取器件对应的编码信息。 @@ -58,7 +58,7 @@ int32_t(* InputController::GetChipInfo) (uint32_t devIndex, char *chipInfo, uint INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### GetChipName @@ -68,7 +68,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputController::GetChipName) (uint32_t devIndex, char *chipName, uint32_t length) ``` -**描述:** +**描述:** 获取devIndex对应的驱动芯片名。 @@ -84,7 +84,7 @@ int32_t(* InputController::GetChipName) (uint32_t devIndex, char *chipName, uint INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### GetDeviceType @@ -94,7 +94,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputController::GetDeviceType) (uint32_t devIndex, uint32_t *deviceType) ``` -**描述:** +**描述:** 获取devIndex对应的Input设备的类型。 @@ -103,13 +103,13 @@ int32_t(* InputController::GetDeviceType) (uint32_t devIndex, uint32_t *deviceTy | 名称 | 描述 | | -------- | -------- | | devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | -| deviceType | 输出参数,获取的对应设备索引的设备类型,具体参考[InputDevType](input.md#inputdevtype)。 | +| deviceType | 输出参数,获取的对应设备索引的设备类型,具体参考[InputDevType](_input.md#inputdevtype)。 | **返回:** INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### GetPowerStatus @@ -119,7 +119,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputController::GetPowerStatus) (uint32_t devIndex, uint32_t *status) ``` -**描述:** +**描述:** 获取电源状态。 @@ -130,13 +130,13 @@ int32_t(* InputController::GetPowerStatus) (uint32_t devIndex, uint32_t *status) | 名称 | 描述 | | -------- | -------- | | devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | -| status | 输出参数,获取的对应设备索引的电源状态,具体参考[PowerStatus](input.md#powerstatus)。 | +| status | 输出参数,获取的对应设备索引的电源状态,具体参考[PowerStatus](_input.md#powerstatus)。 | **返回:** INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### GetVendorName @@ -146,7 +146,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputController::GetVendorName) (uint32_t devIndex, char *vendorName, uint32_t length) ``` -**描述:** +**描述:** 获取devIndex对应的模组厂商名。 @@ -162,7 +162,7 @@ int32_t(* InputController::GetVendorName) (uint32_t devIndex, char *vendorName, INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### RunCapacitanceTest @@ -172,7 +172,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputController::RunCapacitanceTest) (uint32_t devIndex, uint32_t testType, char *result, uint32_t length) ``` -**描述:** +**描述:** 执行容值自检测试。 @@ -183,7 +183,7 @@ int32_t(* InputController::RunCapacitanceTest) (uint32_t devIndex, uint32_t test | 名称 | 描述 | | -------- | -------- | | devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | -| testType | 输入参数,容值测试的测试类型,具体参考[CapacitanceTest](input.md#capacitancetest)。 | +| testType | 输入参数,容值测试的测试类型,具体参考[CapacitanceTest](_input.md#capacitancetest)。 | | result | 输出参数,容值测试的结果,成功则输出“SUCC”,失败则返回对应的错误提示。 | | length | 输入参数,保存容值测试结果的内存长度。 | @@ -191,7 +191,7 @@ int32_t(* InputController::RunCapacitanceTest) (uint32_t devIndex, uint32_t test INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### RunExtraCommand @@ -201,7 +201,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputController::RunExtraCommand) (uint32_t devIndex, InputExtraCmd *cmd) ``` -**描述:** +**描述:** 执行拓展指令。 @@ -216,7 +216,7 @@ int32_t(* InputController::RunExtraCommand) (uint32_t devIndex, InputExtraCmd *c INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### SetGestureMode @@ -226,7 +226,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputController::SetGestureMode) (uint32_t devIndex, uint32_t gestureMode) ``` -**描述:** +**描述:** 设置手势模式。 @@ -243,7 +243,7 @@ int32_t(* InputController::SetGestureMode) (uint32_t devIndex, uint32_t gestureM INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### SetPowerStatus @@ -253,7 +253,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputController::SetPowerStatus) (uint32_t devIndex, uint32_t status) ``` -**描述:** +**描述:** 设置电源状态。 @@ -264,10 +264,10 @@ int32_t(* InputController::SetPowerStatus) (uint32_t devIndex, uint32_t status) | 名称 | 描述 | | -------- | -------- | | devIndex | 输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。 | -| status | 输入参数,设置的电源状态,Input服务控制Input设备进入resume或者suspend等状态[PowerStatus](input.md#powerstatus)。 | +| status | 输入参数,设置的电源状态,Input服务控制Input设备进入resume或者suspend等状态[PowerStatus](_input.md#powerstatus)。 | **返回:** INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_dev_ability.md b/zh-cn/device-dev/reference/hdi-apis/_input_dev_ability.md index fc6af49701af96bf471528f33c670fabffa8f03e..acf49d3cae019a26c82223e703b2b7b43199ae05 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_dev_ability.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_dev_ability.md @@ -1,39 +1,41 @@ # InputDevAbility -## **概述** +## 概述 -Input设备的能力属性,存储支持事件的位图。用位的方式来表示该Input设备能够上报的事件类型。 +Input设备的能力属性,存储支持事件的位图。 + +用位的方式来表示该Input设备能够上报的事件类型。 **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [devProp](#devprop) [[BITS_TO_UINT64](input.md#bitstouint64)(INPUT_PROP_CNT)] | 设备属性 | -| [eventType](#eventtype) [[BITS_TO_UINT64](input.md#bitstouint64)(EV_CNT)] | 记录支持的事件类型的位图 | -| [absCode](#abscode) [[BITS_TO_UINT64](input.md#bitstouint64)(ABS_CNT)] | 记录支持的绝对坐标的位图 | -| [relCode](#relcode) [[BITS_TO_UINT64](input.md#bitstouint64)(REL_CNT)] | 记录支持的相对坐标的位图 | -| [keyCode](#keycode) [[BITS_TO_UINT64](input.md#bitstouint64)(KEY_CNT)] | 记录支持的按键值的位图 | -| [ledCode](#ledcode) [[BITS_TO_UINT64](input.md#bitstouint64)(LED_CNT)] | 记录设备支持的指示灯的位图 | -| [miscCode](#misccode) [[BITS_TO_UINT64](input.md#bitstouint64)(MSC_CNT)] | 记录设备支持的其他功能的位图 | -| [soundCode](#soundcode) [[BITS_TO_UINT64](input.md#bitstouint64)(SND_CNT)] | 记录设备支持的声音或警报的位图 | -| [forceCode](#forcecode) [[BITS_TO_UINT64](input.md#bitstouint64)([HDF_FF_CNT](input.md#hdf_ff_cnt))] | 记录设备支持的作用力功能的位图 | -| [switchCode](#switchcode) [[BITS_TO_UINT64](input.md#bitstouint64)(SW_CNT)] | 记录设备支持的开关功能的位图 | -| [keyType](#keytype) [[BITS_TO_UINT64](input.md#bitstouint64)(KEY_CNT)] | 按键状态的位图 | -| [ledType](#ledtype) [[BITS_TO_UINT64](input.md#bitstouint64)(LED_CNT)] | LED状态的位图 | -| [soundType](#soundtype) [[BITS_TO_UINT64](input.md#bitstouint64)(SND_CNT)] | 声音状态的位图 | -| [switchType](#switchtype) [[BITS_TO_UINT64](input.md#bitstouint64)(SW_CNT)] | 开关状态的位图 | +| [devProp](#devprop) [[BITS_TO_UINT64](_input.md#bits_to_uint64)(INPUT_PROP_CNT)] | uint64_t
设备属性  | +| [eventType](#eventtype) [[BITS_TO_UINT64](_input.md#bits_to_uint64)(EV_CNT)] | uint64_t
用于记录支持的事件类型的位图  | +| [absCode](#abscode) [[BITS_TO_UINT64](_input.md#bits_to_uint64)(ABS_CNT)] | uint64_t
记录支持的绝对坐标的位图  | +| [relCode](#relcode) [[BITS_TO_UINT64](_input.md#bits_to_uint64)(REL_CNT)] | uint64_t
记录支持的相对坐标的位图  | +| [keyCode](#keycode) [[BITS_TO_UINT64](_input.md#bits_to_uint64)(KEY_CNT)] | uint64_t
记录支持的按键值的位图  | +| [ledCode](#ledcode) [[BITS_TO_UINT64](_input.md#bits_to_uint64)(LED_CNT)] | uint64_t
记录设备支持的指示灯的位图  | +| [miscCode](#misccode) [[BITS_TO_UINT64](_input.md#bits_to_uint64)(MSC_CNT)] | uint64_t
记录设备支持的其他功能的位图  | +| [soundCode](#soundcode) [[BITS_TO_UINT64](_input.md#bits_to_uint64)(SND_CNT)] | uint64_t
记录设备支持的声音或警报的位图  | +| [forceCode](#forcecode) [[BITS_TO_UINT64](_input.md#bits_to_uint64)([HDF_FF_CNT](_input.md#hdf_ff_cnt))] | uint64_t
记录设备支持的作用力功能的位图  | +| [switchCode](#switchcode) [[BITS_TO_UINT64](_input.md#bits_to_uint64)(SW_CNT)] | uint64_t
记录设备支持的开关功能的位图  | +| [keyType](#keytype) [[BITS_TO_UINT64](_input.md#bits_to_uint64)(KEY_CNT)] | uint64_t
按键状态的位图  | +| [ledType](#ledtype) [[BITS_TO_UINT64](_input.md#bits_to_uint64)(LED_CNT)] | uint64_t
led状态的位图  | +| [soundType](#soundtype) [[BITS_TO_UINT64](_input.md#bits_to_uint64)(SND_CNT)] | uint64_t
声音状态的位图  | +| [switchType](#switchtype) [[BITS_TO_UINT64](_input.md#bits_to_uint64)(SW_CNT)] | uint64_t
开关状态的位图  | -## **类成员变量说明** +## 类成员变量说明 ### absCode @@ -42,9 +44,7 @@ Input设备的能力属性,存储支持事件的位图。用位的方式来表 ``` uint64_t InputDevAbility::absCode[BITS_TO_UINT64(ABS_CNT)] ``` - -**描述:** - +**描述:** 记录支持的绝对坐标的位图 @@ -54,9 +54,7 @@ uint64_t InputDevAbility::absCode[BITS_TO_UINT64(ABS_CNT)] ``` uint64_t InputDevAbility::devProp[BITS_TO_UINT64(INPUT_PROP_CNT)] ``` - -**描述:** - +**描述:** 设备属性 @@ -66,9 +64,7 @@ uint64_t InputDevAbility::devProp[BITS_TO_UINT64(INPUT_PROP_CNT)] ``` uint64_t InputDevAbility::eventType[BITS_TO_UINT64(EV_CNT)] ``` - -**描述:** - +**描述:** 用于记录支持的事件类型的位图 @@ -78,9 +74,7 @@ uint64_t InputDevAbility::eventType[BITS_TO_UINT64(EV_CNT)] ``` uint64_t InputDevAbility::forceCode[BITS_TO_UINT64(HDF_FF_CNT)] ``` - -**描述:** - +**描述:** 记录设备支持的作用力功能的位图 @@ -90,9 +84,7 @@ uint64_t InputDevAbility::forceCode[BITS_TO_UINT64(HDF_FF_CNT)] ``` uint64_t InputDevAbility::keyCode[BITS_TO_UINT64(KEY_CNT)] ``` - -**描述:** - +**描述:** 记录支持的按键值的位图 @@ -102,9 +94,7 @@ uint64_t InputDevAbility::keyCode[BITS_TO_UINT64(KEY_CNT)] ``` uint64_t InputDevAbility::keyType[BITS_TO_UINT64(KEY_CNT)] ``` - -**描述:** - +**描述:** 按键状态的位图 @@ -114,9 +104,7 @@ uint64_t InputDevAbility::keyType[BITS_TO_UINT64(KEY_CNT)] ``` uint64_t InputDevAbility::ledCode[BITS_TO_UINT64(LED_CNT)] ``` - -**描述:** - +**描述:** 记录设备支持的指示灯的位图 @@ -126,9 +114,7 @@ uint64_t InputDevAbility::ledCode[BITS_TO_UINT64(LED_CNT)] ``` uint64_t InputDevAbility::ledType[BITS_TO_UINT64(LED_CNT)] ``` - -**描述:** - +**描述:** led状态的位图 @@ -138,9 +124,7 @@ led状态的位图 ``` uint64_t InputDevAbility::miscCode[BITS_TO_UINT64(MSC_CNT)] ``` - -**描述:** - +**描述:** 记录设备支持的其他功能的位图 @@ -150,9 +134,7 @@ uint64_t InputDevAbility::miscCode[BITS_TO_UINT64(MSC_CNT)] ``` uint64_t InputDevAbility::relCode[BITS_TO_UINT64(REL_CNT)] ``` - -**描述:** - +**描述:** 记录支持的相对坐标的位图 @@ -162,9 +144,7 @@ uint64_t InputDevAbility::relCode[BITS_TO_UINT64(REL_CNT)] ``` uint64_t InputDevAbility::soundCode[BITS_TO_UINT64(SND_CNT)] ``` - -**描述:** - +**描述:** 记录设备支持的声音或警报的位图 @@ -174,9 +154,7 @@ uint64_t InputDevAbility::soundCode[BITS_TO_UINT64(SND_CNT)] ``` uint64_t InputDevAbility::soundType[BITS_TO_UINT64(SND_CNT)] ``` - -**描述:** - +**描述:** 声音状态的位图 @@ -186,9 +164,7 @@ uint64_t InputDevAbility::soundType[BITS_TO_UINT64(SND_CNT)] ``` uint64_t InputDevAbility::switchCode[BITS_TO_UINT64(SW_CNT)] ``` - -**描述:** - +**描述:** 记录设备支持的开关功能的位图 @@ -198,7 +174,5 @@ uint64_t InputDevAbility::switchCode[BITS_TO_UINT64(SW_CNT)] ``` uint64_t InputDevAbility::switchType[BITS_TO_UINT64(SW_CNT)] ``` - -**描述:** - +**描述:** 开关状态的位图 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_dev_attr.md b/zh-cn/device-dev/reference/hdi-apis/_input_dev_attr.md index 27ffb8c84c6882fdecde230d24023d0ead5bade6..599cb39761e51b14ac6b2de6a6c1822e9019d0e2 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_dev_attr.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_dev_attr.md @@ -1,28 +1,28 @@ # InputDevAttr -## **概述** +## 概述 Input设备属性。 **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [devName](#devname) [DEV_NAME_LEN] | 设备名 | -| [id](#id) | 设备识别信息 | -| [axisInfo](#axisinfo) [ABS_CNT] | 设备维度信息 | +| [devName](#devname) [[DEV_NAME_LEN](_input.md#dev_name_len)] | char
设备名  | +| [id](#id) | [InputDevIdentify](_input_dev_identify.md)
设备识别信息  | +| [axisInfo](#axisinfo) [ABS_CNT] | [InputDimensionInfo](_input_dimension_info.md)
设备维度信息  | -## **类成员变量说明** +## 类成员变量说明 ### axisInfo @@ -31,9 +31,7 @@ Input设备属性。 ``` InputDimensionInfo InputDevAttr::axisInfo[ABS_CNT] ``` - -**描述:** - +**描述:** 设备维度信息 @@ -43,9 +41,7 @@ InputDimensionInfo InputDevAttr::axisInfo[ABS_CNT] ``` char InputDevAttr::devName[DEV_NAME_LEN] ``` - -**描述:** - +**描述:** 设备名 @@ -55,7 +51,5 @@ char InputDevAttr::devName[DEV_NAME_LEN] ``` InputDevIdentify InputDevAttr::id ``` - -**描述:** - +**描述:** 设备识别信息 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_dev_desc.md b/zh-cn/device-dev/reference/hdi-apis/_input_dev_desc.md index 89b51c3c3dde76f178fcee194062fde0dea4d740..9d9fbf85a8435f9164f2728e2431b13c0cdb81bc 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_dev_desc.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_dev_desc.md @@ -1,27 +1,27 @@ # InputDevDesc -## **概述** +## 概述 Input设备描述信息。 **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [devIndex](#devindex) | 设备索引。 | -| [devType](#devtype) | 设备类型。 | +| [devIndex](#devindex) | uint32_t
设备索引  | +| [devType](#devtype) | uint32_t
设备类型  | -## **类成员变量说明** +## 类成员变量说明 ### devIndex @@ -30,9 +30,7 @@ Input设备描述信息。 ``` uint32_t InputDevDesc::devIndex ``` - -**描述:** - +**描述:** 设备索引 @@ -42,7 +40,5 @@ uint32_t InputDevDesc::devIndex ``` uint32_t InputDevDesc::devType ``` - -**描述:** - +**描述:** 设备类型 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_dev_identify.md b/zh-cn/device-dev/reference/hdi-apis/_input_dev_identify.md index 1470ec653c305b4fc2d1fe79aba276a557ea4c30..af6198fbe8b4ce1a1ace98a04d20df5c5870e847 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_dev_identify.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_dev_identify.md @@ -1,29 +1,29 @@ # InputDevIdentify -## **概述** +## 概述 Input设备的识别信息。 **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [busType](#bustype) | 总线类型 | -| [vendor](#vendor) | 生产商编号 | -| [product](#product) | 产品编号 | -| [version](#version) | 版本号 | +| [busType](#bustype) | uint16_t
总线类型  | +| [vendor](#vendor) | uint16_t
生产商编号  | +| [product](#product) | uint16_t
产品编号  | +| [version](#version) | uint16_t
版本号  | -## **类成员变量说明** +## 类成员变量说明 ### busType @@ -32,9 +32,7 @@ Input设备的识别信息。 ``` uint16_t InputDevIdentify::busType ``` - -**描述:** - +**描述:** 总线类型 @@ -44,9 +42,7 @@ uint16_t InputDevIdentify::busType ``` uint16_t InputDevIdentify::product ``` - -**描述:** - +**描述:** 产品编号 @@ -56,9 +52,7 @@ uint16_t InputDevIdentify::product ``` uint16_t InputDevIdentify::vendor ``` - -**描述:** - +**描述:** 生产商编号 @@ -68,7 +62,5 @@ uint16_t InputDevIdentify::vendor ``` uint16_t InputDevIdentify::version ``` - -**描述:** - +**描述:** 版本号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_device_info.md b/zh-cn/device-dev/reference/hdi-apis/_input_device_info.md index 46d0ccbb683ebbeff26b184da4525c295562f601..9151c102fb96af61a311c3c20dc296bbee938d32 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_device_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_device_info.md @@ -1,32 +1,32 @@ # InputDeviceInfo -## **概述** +## 概述 Input设备基础设备信息。 **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [devIndex](#devindex) | 设备索引 | -| [devType](#devtype) | 设备类型 | -| [chipInfo](#chipinfo) [CHIP_INFO_LEN] | 驱动芯片编码信息 | -| [vendorName](#vendorname) [VENDOR_NAME_LEN] | 模组厂商名 | -| [chipName](#chipname) [CHIP_NAME_LEN] | 驱动芯片型号 | -| [attrSet](#attrset) | 设备属性 | -| [abilitySet](#abilityset) | 设备能力属性 | +| [devIndex](#devindex) | uint32_t
设备索引  | +| [devType](#devtype) | uint32_t
设备类型  | +| [chipInfo](#chipinfo) [[CHIP_INFO_LEN](_input.md#chip_info_len)] | char
驱动芯片编码信息  | +| [vendorName](#vendorname) [[VENDOR_NAME_LEN](_input.md#vendor_name_len)] | char
模组厂商名  | +| [chipName](#chipname) [[CHIP_NAME_LEN](_input.md#chip_name_len)] | char
驱动芯片型号  | +| [attrSet](#attrset) | [InputDevAttr](_input_dev_attr.md)
设备属性  | +| [abilitySet](#abilityset) | [InputDevAbility](_input_dev_ability.md)
设备能力属性  | -## **类成员变量说明** +## 类成员变量说明 ### abilitySet @@ -35,9 +35,7 @@ Input设备基础设备信息。 ``` InputDevAbility InputDeviceInfo::abilitySet ``` - -**描述:** - +**描述:** 设备能力属性 @@ -47,9 +45,7 @@ InputDevAbility InputDeviceInfo::abilitySet ``` InputDevAttr InputDeviceInfo::attrSet ``` - -**描述:** - +**描述:** 设备属性 @@ -59,9 +55,7 @@ InputDevAttr InputDeviceInfo::attrSet ``` char InputDeviceInfo::chipInfo[CHIP_INFO_LEN] ``` - -**描述:** - +**描述:** 驱动芯片编码信息 @@ -71,9 +65,7 @@ char InputDeviceInfo::chipInfo[CHIP_INFO_LEN] ``` char InputDeviceInfo::chipName[CHIP_NAME_LEN] ``` - -**描述:** - +**描述:** 驱动芯片型号 @@ -83,9 +75,7 @@ char InputDeviceInfo::chipName[CHIP_NAME_LEN] ``` uint32_t InputDeviceInfo::devIndex ``` - -**描述:** - +**描述:** 设备索引 @@ -95,9 +85,7 @@ uint32_t InputDeviceInfo::devIndex ``` uint32_t InputDeviceInfo::devType ``` - -**描述:** - +**描述:** 设备类型 @@ -107,7 +95,5 @@ uint32_t InputDeviceInfo::devType ``` char InputDeviceInfo::vendorName[VENDOR_NAME_LEN] ``` - -**描述:** - +**描述:** 模组厂商名 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_dimension_info.md b/zh-cn/device-dev/reference/hdi-apis/_input_dimension_info.md index 16919c614433d3d3781a4618a1aafb2d04a49272..36f628a827c710cdae4aa320a7e3f9a2d0087903 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_dimension_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_dimension_info.md @@ -1,31 +1,31 @@ # InputDimensionInfo -## **概述** +## 概述 Input设备的维度信息。 **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [axis](#axis) | 坐标轴 | -| [min](#min) | 记录各个坐标的最小值 | -| [max](#max) | 记录各个坐标的最大值 | -| [fuzz](#fuzz) | 记录各个坐标的分辨率 | -| [flat](#flat) | 记录各个坐标的基准值 | -| [range](#range) | 范围 | +| [axis](#axis) | int32_t
坐标轴  | +| [min](#min) | int32_t
记录各个坐标的最小值  | +| [max](#max) | int32_t
记录各个坐标的最大值  | +| [fuzz](#fuzz) | int32_t
记录各个坐标的分辨率  | +| [flat](#flat) | int32_t
记录各个坐标的基准值  | +| [range](#range) | int32_t
范围  | -## **类成员变量说明** +## 类成员变量说明 ### axis @@ -34,9 +34,7 @@ Input设备的维度信息。 ``` int32_t InputDimensionInfo::axis ``` - -**描述:** - +**描述:** 坐标轴 @@ -46,9 +44,7 @@ int32_t InputDimensionInfo::axis ``` int32_t InputDimensionInfo::flat ``` - -**描述:** - +**描述:** 记录各个坐标的基准值 @@ -58,9 +54,7 @@ int32_t InputDimensionInfo::flat ``` int32_t InputDimensionInfo::fuzz ``` - -**描述:** - +**描述:** 记录各个坐标的分辨率 @@ -70,9 +64,7 @@ int32_t InputDimensionInfo::fuzz ``` int32_t InputDimensionInfo::max ``` - -**描述:** - +**描述:** 记录各个坐标的最大值 @@ -82,9 +74,7 @@ int32_t InputDimensionInfo::max ``` int32_t InputDimensionInfo::min ``` - -**描述:** - +**描述:** 记录各个坐标的最小值 @@ -94,7 +84,5 @@ int32_t InputDimensionInfo::min ``` int32_t InputDimensionInfo::range ``` - -**描述:** - +**描述:** 范围 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_event_cb.md b/zh-cn/device-dev/reference/hdi-apis/_input_event_cb.md index b91f20bfafd8c53c43ce9a481a9d368572730044..3fa9b50838d74e2084ae1f2d6e03ba71178c1e54 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_event_cb.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_event_cb.md @@ -1,26 +1,26 @@ # InputEventCb -## **概述** +## 概述 此结构体定义了输入事件回调函数并提供给Input服务使用。 **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| ([EventPkgCallback](#eventpkgcallback) )(const [InputEventPackage](_input_event_package.md) \*\*pkgs, uint32_t count, uint32_t devIndex) | 输入事件数据上报的回调函数。 | +| (\* [EventPkgCallback](#eventpkgcallback) )(const [InputEventPackage](_input_event_package.md) \*\*pkgs, uint32_t count, uint32_t devIndex) | void
输入事件数据上报的回调函数。 | -## **类成员变量说明** +## 类成员变量说明 ### EventPkgCallback @@ -30,7 +30,7 @@ void(* InputEventCb::EventPkgCallback) (const InputEventPackage **pkgs, uint32_t count, uint32_t devIndex) ``` -**描述:** +**描述:** 输入事件数据上报的回调函数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_event_package.md b/zh-cn/device-dev/reference/hdi-apis/_input_event_package.md index 402db456d3bfe64396d9441dc458292e260e9a18..600b0fb8e5f9c2a8ff8494ebd7487d11d7538b4b 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_event_package.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_event_package.md @@ -1,29 +1,29 @@ # InputEventPackage -## **概述** +## 概述 Input事件数据包结构。 **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [type](#type) | 输入事件的属性 | -| [code](#code) | 输入事件的特定编码项 | -| [value](#value) | 输入事件编码项对应的值 | -| [timestamp](#timestamp) | 输入事件对应的时间戳 | +| [type](#type) | uint32_t
输入事件的属性  | +| [code](#code) | uint32_t
输入事件的特定编码项  | +| [value](#value) | int32_t
输入事件编码项对应的值  | +| [timestamp](#timestamp) | uint64_t
输入事件对应的时间戳  | -## **类成员变量说明** +## 类成员变量说明 ### code @@ -32,9 +32,7 @@ Input事件数据包结构。 ``` uint32_t InputEventPackage::code ``` - -**描述:** - +**描述:** 输入事件的特定编码项 @@ -44,9 +42,7 @@ uint32_t InputEventPackage::code ``` uint64_t InputEventPackage::timestamp ``` - -**描述:** - +**描述:** 输入事件对应的时间戳 @@ -56,9 +52,7 @@ uint64_t InputEventPackage::timestamp ``` uint32_t InputEventPackage::type ``` - -**描述:** - +**描述:** 输入事件的属性 @@ -68,7 +62,5 @@ uint32_t InputEventPackage::type ``` int32_t InputEventPackage::value ``` - -**描述:** - +**描述:** 输入事件编码项对应的值 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_extra_cmd.md b/zh-cn/device-dev/reference/hdi-apis/_input_extra_cmd.md index 15f6265f62ba0cbecfe9168947ea9d38d228de6d..c9f5a5f50ba1cac71303c31cb300fccbc886ea35 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_extra_cmd.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_extra_cmd.md @@ -1,27 +1,27 @@ # InputExtraCmd -## **概述** +## 概述 扩展指令的数据结构。 **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [cmdCode](#cmdcode) | 指令对应的编码。 | -| [cmdValue](#cmdvalue) | 指令传输的数据。 | +| [cmdCode](#cmdcode) | const char \*
指令对应的编码  | +| [cmdValue](#cmdvalue) | const char \*
指令传输的数据  | -## **类成员变量说明** +## 类成员变量说明 ### cmdCode @@ -30,9 +30,7 @@ ``` const char* InputExtraCmd::cmdCode ``` - -**描述:** - +**描述:** 指令对应的编码 @@ -42,7 +40,5 @@ const char* InputExtraCmd::cmdCode ``` const char* InputExtraCmd::cmdValue ``` - -**描述:** - +**描述:** 指令传输的数据 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_host_cb.md b/zh-cn/device-dev/reference/hdi-apis/_input_host_cb.md index 9fa62eb2d7cb0ddf78799b6be36ac01ec01ec69d..3ff4a39a0d3c63b164212e64864802d66f72dcb6 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_host_cb.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_host_cb.md @@ -1,23 +1,26 @@ # InputHostCb -## **概述** +## 概述 此结构体定义了热插拔事件上报回调函数并提供给Input服务使用。 **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| ([HotPlugCallback](#hotplugcallback) )(const [InputHotPlugEvent](_input_hot_plug_event.md) \*event) | 热插拔事件上报的回调函数。 | +| (\* [HotPlugCallback](#hotplugcallback) )(const [InputHotPlugEvent](_input_hot_plug_event.md) \*event) | void
热插拔事件上报的回调函数。 | + + +## 类成员变量说明 ### HotPlugCallback @@ -27,7 +30,7 @@ void(* InputHostCb::HotPlugCallback) (const InputHotPlugEvent *event) ``` -**描述:** +**描述:** 热插拔事件上报的回调函数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_hot_plug_event.md b/zh-cn/device-dev/reference/hdi-apis/_input_hot_plug_event.md index 120da873657221d2f2301b1f9caa4d8e7ec76543..9c8ad3e3528da62c8b2393af190188d0380b1980 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_hot_plug_event.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_hot_plug_event.md @@ -1,28 +1,28 @@ # InputHotPlugEvent -## **概述** +## 概述 热插拔事件数据包结构。 **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [devIndex](#devindex) | 设备索引。 | -| [devType](#devtype) | 设备类型。 | -| [status](#status) | 设备状态。 | +| [devIndex](#devindex) | uint32_t
设备索引 | +| [devType](#devtype) | uint32_t
设备类型 | +| [status](#status) | uint32_t
设备状态。 | -## **类成员变量说明** +## 类成员变量说明 ### devIndex @@ -32,7 +32,7 @@ uint32_t InputHotPlugEvent::devIndex ``` -**描述:** +**描述:** 设备索引 @@ -44,7 +44,7 @@ uint32_t InputHotPlugEvent::devIndex uint32_t InputHotPlugEvent::devType ``` -**描述:** +**描述:** 设备类型 @@ -56,8 +56,10 @@ uint32_t InputHotPlugEvent::devType uint32_t InputHotPlugEvent::status ``` -**描述:** +**描述:** 设备状态。 -1: 离线。 0: 在线。 +- 1:离线。 + +- 0:在线。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_manager.md b/zh-cn/device-dev/reference/hdi-apis/_input_manager.md index f3ba8b6b97959e9cc7cde4292f23be594c589155..f3796ec7683a659ca52f346c2957d2945093e0cc 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_manager.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_manager.md @@ -1,7 +1,7 @@ # InputManager -## **概述** +## 概述 提供Input设备管理相关的接口。 @@ -9,24 +9,24 @@ **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| ([ScanInputDevice](#scaninputdevice) )([InputDevDesc](_input_dev_desc.md) \*staArr, uint32_t arrLen) | Input服务用于扫描所有在线设备。 | -| ([OpenInputDevice](#openinputdevice) )(uint32_t devIndex) | Input服务打开对应设备的设备文件。 | -| ([CloseInputDevice](#closeinputdevice) )(uint32_t devIndex) | Input服务关闭对应设备的设备文件。 | -| ([GetInputDevice](#getinputdevice) )(uint32_t devIndex, [InputDeviceInfo](_input_device_info.md) \*\*devInfo) | Input服务获取对应ID的设备信息。 | -| ([GetInputDeviceList](#getinputdevicelist) )(uint32_t \*devNum, [InputDeviceInfo](_input_device_info.md) \*\*devList, uint32_t size) | Input服务获取所有Input设备列表的设备信息。 | +| (\* [ScanInputDevice](#scaninputdevice) )([InputDevDesc](_input_dev_desc.md) \*staArr, uint32_t arrLen) | int32_t
Input服务用于扫描所有在线设备。 | +| (\* [OpenInputDevice](#openinputdevice) )(uint32_t devIndex) | int32_t
Input服务打开对应设备的设备文件。 | +| (\* [CloseInputDevice](#closeinputdevice) )(uint32_t devIndex) | int32_t
Input服务关闭对应设备的设备文件。 | +| (\* [GetInputDevice](#getinputdevice) )(uint32_t devIndex, [InputDeviceInfo](_input_device_info.md) \*\*devInfo) | int32_t
Input服务获取对应ID的设备信息。 | +| (\* [GetInputDeviceList](#getinputdevicelist) )(uint32_t \*devNum, [InputDeviceInfo](_input_device_info.md) \*\*devList, uint32_t size) | int32_t
Input服务获取所有Input设备列表的设备信息。 | -## **类成员变量说明** +## 类成员变量说明 ### CloseInputDevice @@ -36,7 +36,7 @@ int32_t(* InputManager::CloseInputDevice) (uint32_t devIndex) ``` -**描述:** +**描述:** Input服务关闭对应设备的设备文件。 @@ -50,7 +50,7 @@ Input服务关闭对应设备的设备文件。 INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### GetInputDevice @@ -60,7 +60,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputManager::GetInputDevice) (uint32_t devIndex, InputDeviceInfo **devInfo) ``` -**描述:** +**描述:** Input服务获取对应ID的设备信息。 @@ -75,7 +75,7 @@ Input服务获取对应ID的设备信息。 INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### GetInputDeviceList @@ -85,7 +85,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputManager::GetInputDeviceList) (uint32_t *devNum, InputDeviceInfo **devList, uint32_t size) ``` -**描述:** +**描述:** Input服务获取所有Input设备列表的设备信息。 @@ -101,7 +101,7 @@ Input服务获取所有Input设备列表的设备信息。 INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### OpenInputDevice @@ -111,7 +111,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputManager::OpenInputDevice) (uint32_t devIndex) ``` -**描述:** +**描述:** Input服务打开对应设备的设备文件。 @@ -125,7 +125,7 @@ Input服务打开对应设备的设备文件。 INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### ScanInputDevice @@ -135,7 +135,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputManager::ScanInputDevice) (InputDevDesc *staArr, uint32_t arrLen) ``` -**描述:** +**描述:** Input服务用于扫描所有在线设备。 @@ -150,4 +150,4 @@ Input服务用于扫描所有在线设备。 INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_input_reporter.md b/zh-cn/device-dev/reference/hdi-apis/_input_reporter.md index 05a265bcd9663ff490143df88032c8cc19bf972a..c4c5333e9b36851a03a7cb93bbc154d888c7c4f9 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_input_reporter.md +++ b/zh-cn/device-dev/reference/hdi-apis/_input_reporter.md @@ -1,31 +1,31 @@ # InputReporter -## **概述** +## 概述 提供Input设备数据上报相关的接口。 -此类接口包含input设备的数据上报回调函数的注册和注销。 +此类接口包含Input设备的数据上报回调函数的注册和注销。 **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| ([RegisterReportCallback](#registerreportcallback) )(uint32_t devIndex, [InputEventCb](_input_event_cb.md) \*callback) | 注册对应设备的回调函数。 | -| ([UnregisterReportCallback](#unregisterreportcallback) )(uint32_t devIndex) | 注销对应设备的回调函数。 | -| ([RegisterHotPlugCallback](#registerhotplugcallback) )([InputHostCb](_input_host_cb.md) \*callback) | 注册Input设备的热插拔回调函数。 | -| ([UnregisterHotPlugCallback](#unregisterhotplugcallback) )(void) | 注销Input设备的热插拔回调函数。 | +| (\* [RegisterReportCallback](#registerreportcallback) )(uint32_t devIndex, [InputEventCb](_input_event_cb.md) \*callback) | int32_t
注册对应设备的回调函数。 | +| (\* [UnregisterReportCallback](#unregisterreportcallback) )(uint32_t devIndex) | int32_t
注销对应设备的回调函数。 | +| (\* [RegisterHotPlugCallback](#registerhotplugcallback) )([InputHostCb](_input_host_cb.md) \*callback) | int32_t
注册Input设备的热插拔回调函数。 | +| (\* [UnregisterHotPlugCallback](#unregisterhotplugcallback) )(void) | int32_t
注销Input设备的热插拔回调函数。 | -## **类成员变量说明** +## 类成员变量说明 ### RegisterHotPlugCallback @@ -35,7 +35,7 @@ int32_t(* InputReporter::RegisterHotPlugCallback) (InputHostCb *callback) ``` -**描述:** +**描述:** 注册Input设备的热插拔回调函数。 @@ -51,7 +51,7 @@ Input服务通过此接口注册回调函数到hdi中,所有Input设备由此 INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### RegisterReportCallback @@ -61,7 +61,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputReporter::RegisterReportCallback) (uint32_t devIndex, InputEventCb *callback) ``` -**描述:** +**描述:** 注册对应设备的回调函数。 @@ -78,7 +78,7 @@ Input服务通过此接口注册数据回调函数到hdi中,hdi通过此回调 INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### UnregisterHotPlugCallback @@ -88,7 +88,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputReporter::UnregisterHotPlugCallback) (void) ``` -**描述:** +**描述:** 注销Input设备的热插拔回调函数。 @@ -96,7 +96,7 @@ int32_t(* InputReporter::UnregisterHotPlugCallback) (void) INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 ### UnregisterReportCallback @@ -106,7 +106,7 @@ INPUT_SUCCESS 表示执行成功。 int32_t(* InputReporter::UnregisterReportCallback) (uint32_t devIndex) ``` -**描述:** +**描述:** 注销对应设备的回调函数。 @@ -120,4 +120,4 @@ int32_t(* InputReporter::UnregisterReportCallback) (uint32_t devIndex) INPUT_SUCCESS 表示执行成功。 -其他值表示执行失败,具体错误码查看[RetStatus](input.md#retstatus)。 +其他值表示执行失败,具体错误码查看[RetStatus](_input.md#retstatus)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_layer_alpha.md b/zh-cn/device-dev/reference/hdi-apis/_layer_alpha.md index 2e941168a2d4917bc64becf9fea5d23769db931e..1957c3b31d8058bca6e154eee6ed38a04ddcab05 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_layer_alpha.md +++ b/zh-cn/device-dev/reference/hdi-apis/_layer_alpha.md @@ -1,24 +1,24 @@ # LayerAlpha -## **概述** +## 概述 -定义图层Alpha信息的结构体。 +定义图层Alpha信息的结构体 **相关模块:** [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [enGlobalAlpha](_display.md#englobalalpha-12) | 全局Alpha使能标志 | -| [enPixelAlpha](_display.md#enpixelalpha-12) | 像素Alpha使能标志 | -| [alpha0](_display.md#alpha0-12) | Alpha0值,取值范围:[0, 255] | -| [alpha1](_display.md#alpha1-12) | Alpha1值,取值范围:[0, 255] | -| [gAlpha](_display.md#galpha) | 全局Alpha值,取值范围:[0, 255] | +| [enGlobalAlpha](_display.md#englobalalpha-12) | bool
全局alpha使能标志 | +| [enPixelAlpha](_display.md#enpixelalpha-12) | bool
像素alpha使能标志 | +| [alpha0](_display.md#alpha0-12) | uint8_t
alpha0值,取值范围:[0, 255] | +| [alpha1](_display.md#alpha1-12) | uint8_t
alpha1值,取值范围:[0, 255] | +| [gAlpha](_display.md#galpha) | uint8_t
全局alpha值,取值范围:[0, 255] | diff --git a/zh-cn/device-dev/reference/hdi-apis/_layer_buffer.md b/zh-cn/device-dev/reference/hdi-apis/_layer_buffer.md index 6f19f9bbb6d40719f9c9725735b455b0577bb6fe..f47d4eb0af9f2161b77a1a4b94961895e917baf2 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_layer_buffer.md +++ b/zh-cn/device-dev/reference/hdi-apis/_layer_buffer.md @@ -1,7 +1,7 @@ # LayerBuffer -## **概述** +## 概述 图层Buffer,用于存放图层数据。 @@ -10,17 +10,17 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [fenceId](_display.md#fenceid) | buffer的fence号 | -| [width](_display.md#width-39) | buffer宽度 | -| [height](_display.md#height-38) | buffer高度 | -| [pitch](_display.md#pitch) | 一行数据所占字节数 | -| [pixFormat](_display.md#pixformat-22) | 图层像素格式 | -| [data](_display.md#data-12) | 图层buffer数据 | -| [hdl](_display.md#hdl) | 图层buffer句柄 | +| [fenceId](_display.md#fenceid) | int32_t
buffer 的fence号 | +| [width](_display.md#width-39) | int32_t
buffer宽度 | +| [height](_display.md#height-38) | int32_t
buffer高度 | +| [pitch](_display.md#pitch) | int32_t
一行数据所占字节数 | +| [pixFormat](_display.md#pixformat-22) | [PixelFormat](_display.md#pixelformat)
buffer像素格式r | +| [data](_display.md#data-12) | [BufferData](_buffer_data.md)
图层buffer数据 | +| [hdl](_display.md#hdl) | BufferHandle \*
图层buffer句柄 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_layer_funcs.md b/zh-cn/device-dev/reference/hdi-apis/_layer_funcs.md index 95fb4bf8040f3a5fac4b3ba9eab25ce0b900d31d..8ad42c4f940c80f88bd2c54b95491234b84c9e33 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_layer_funcs.md +++ b/zh-cn/device-dev/reference/hdi-apis/_layer_funcs.md @@ -1,7 +1,7 @@ # LayerFuncs -## **概述** +## 概述 显示图层驱动接口结构体,定义显示图层驱动接口函数指针。 @@ -10,58 +10,58 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| ([InitDisplay](#initdisplay))(uint32_t devId) | 初始化显示设备。 | -| ([DeinitDisplay](#deinitdisplay))(uint32_t devId) | 取消初始化显示设备。 | -| ([GetDisplayInfo](#getdisplayinfo))(uint32_t devId, DisplayInfo \*dispInfo) | 获取显示设备相关信息。 | -| ([CreateLayer](#createlayer))(uint32_t devId, const LayerInfo \*layerInfo, uint32_t \*layerId) | 打开图层。 | -| ([CloseLayer](#closelayer))(uint32_t devId, uint32_t layerId) | 关闭图层。 | -| ([SetLayerVisible](#setlayervisible))(uint32_t devId, uint32_t layerId, bool visible) | 设置图层是否可见。 | -| ([GetLayerVisibleState](#getlayervisiblestate))(uint32_t devId, uint32_t layerId, bool \*visible) | 获取图层是否可见状态。 | -| ([SetLayerSize](#setlayersize))(uint32_t devId, uint32_t layerId, IRect \*rect) | 设置图层大小。 | -| ([GetLayerSize](#getlayersize))(uint32_t devId, uint32_t layerId, IRect \*rect) | 获取图层大小。 | -| ([SetLayerCrop](#setlayercrop))(uint32_t devId, uint32_t layerId, IRect \*rect) | 设置图层裁剪区域。 | -| ([SetLayerZorder](#setlayerzorder))(uint32_t devId, uint32_t layerId, uint32_t zorder) | 设置图层Z轴次序。 | -| ([GetLayerZorder](#getlayerzorder))(uint32_t devId, uint32_t layerId, uint32_t \*zorder) | 获取图层Z轴次序。 | -| ([SetLayerPreMulti](#setlayerpremulti))(uint32_t devId, uint32_t layerId, bool preMul) | 设置图层预乘。 | -| ([GetLayerPreMulti](#getlayerpremulti))(uint32_t devId, uint32_t layerId, bool \*preMul) | 获取图层预乘标识。 | -| ([SetLayerAlpha](#setlayeralpha))(uint32_t devId, uint32_t layerId, LayerAlpha \*alpha) | 设置图层Alpha值。 | -| ([GetLayerAlpha](#getlayeralpha))(uint32_t devId, uint32_t layerId, LayerAlpha \*alpha) | 获取图层Alpha值。 | -| ([SetLayerColorKey](#setlayercolorkey))(uint32_t devId, uint32_t layerId, bool enable, uint32_t key) | 设置图层colorkey属性,在图层叠加时使用。 | -| ([GetLayerColorKey](#getlayercolorkey))(uint32_t devId, uint32_t layerId, bool \*enable, uint32_t \*key) | 获取图层colorkey。 | -| ([SetLayerPalette](#setlayerpalette))(uint32_t devId, uint32_t layerId, uint32_t \*palette, uint32_t len) | 设置图层调色板。 | -| ([GetLayerPalette](#getlayerpalette))(uint32_t devId, uint32_t layerId, uint32_t \*palette, uint32_t len) | 获取图层调色板。 | -| ([SetTransformMode](#settransformmode))(uint32_t devId, uint32_t layerId, TransformType type) | 设置图层变换模式,根据不同的场景设置图层的旋转、缩放、移位等。 | -| ([SetLayerCompression](#setlayercompression))(uint32_t devId, uint32_t layerId, int32_t compType) | 设置图层压缩功能。 | -| ([GetLayerCompression](#getlayercompression))(uint32_t devId, uint32_t layerId, int32_t \*compType) | 获取图层压缩功能是否打开。 | -| ([SetLayerDirtyRegion](#setlayerdirtyregion))(uint32_t devId, uint32_t layerId, IRect \*region) | 设置图层刷新区域。 | -| ([GetLayerBuffer](#getlayerbuffer))(uint32_t devId, uint32_t layerId, LayerBuffer \*buffer) | 获取图层的buffer。 | -| ([Flush](#flush))(uint32_t devId, uint32_t layerId, LayerBuffer \*buffer) | 刷新图层。 | -| ([WaitForVBlank](#waitforvblank))(uint32_t devId, uint32_t layerId, int32_t timeOut) | 实现等待帧消隐期到来功能。 | -| ([SnapShot](#snapshot))(uint32_t devId, LayerBuffer \*buffer) | 实现抓图功能。 | -| ([SetLayerVisibleRegion](#setlayervisibleregion))(uint32_t devId, uint32_t layerId, uint32_t num, IRect \*rect) | 设置一个图层的可见区域。 | -| ([SetLayerBuffer](#setlayerbuffer))(uint32_t devId, uint32_t layerId, const BufferHandle \*buffer, int32_t fence) | 设置一个层的缓冲区。 | -| ([InvokeLayerCmd](#invokelayercmd))(uint32_t devId, uint32_t layerId, uint32_t cmd,...) | 扩展接口。 | -| ([SetLayerCompositionType](#setlayercompositiontype))(uint32_t devId, uint32_t layerId, CompositionType type) | 设置客户端期望的组合类型。 | -| ([SetLayerBlendType](#setlayerblendtype))(uint32_t devId, uint32_t layerId, BlendType type) | 设置混合类型。 | -| ([SetLayerColorTransform](#setlayercolortransform))(uint32_t devId, uint32_t layerId, const float \*matrix) | 设置图层当前的颜色转换矩阵。 | -| ([SetLayerColorDataSpace](#setlayercolordataspace))(uint32_t devId, uint32_t layerId, ColorDataSpace colorSpace) | 设置图层的颜色数据空间。 | -| ([GetLayerColorDataSpace](#getlayercolordataspace))(uint32_t devId, uint32_t layerId, ColorDataSpace \*colorSpace) | 获取图层当前的颜色数据空间。 | -| ([SetLayerMetaData](#setlayermetadata))(uint32_t devId, uint32_t layerId, uint32_t num, const HDRMetaData \*metaData) | 设置图层的HDRmetaData。 | -| ([SetLayerMetaDataSet](#setlayermetadataset))(uint32_t devId, uint32_t layerId, HDRMetadataKey key, uint32_t num, const uint8_t \*metaData) | 设置图层的metaData set。 | -| ([GetSupportedPresentTimestamp](#getsupportedpresenttimestamp))(uint32_t devId, uint32_t layerId, PresentTimestampType \*type) | 获取图层支持的上屏时间戳类型。 | -| ([GetHwPresentTimestamp](#gethwpresenttimestamp))(uint32_t devId, uint32_t layerId, PresentTimestamp \*pts) | 获取图层的上屏时间戳信息。 | -| ([SetLayerTunnelHandle](#setlayertunnelhandle))(uint32_t devId, uint32_t layerId, ExtDataHandle \*handle) | 设置图层的tunnel句柄。 | -| ([GetLayerReleaseFence](#getlayerreleasefence))(uint32_t devId, uint32_t layerId, int32_t \*fence) | 获取图层的同步栅栏。 | - - -## **类成员变量说明** +| (\* [InitDisplay](#initdisplay) )(uint32_t devId) | int32_t
初始化显示设备。 | +| (\* [DeinitDisplay](#deinitdisplay) )(uint32_t devId) | int32_t
取消初始化显示设备。 | +| (\* [GetDisplayInfo](#getdisplayinfo) )(uint32_t devId, [DisplayInfo](_display_info.md) \*dispInfo) | int32_t
获取显示设备相关信息。 | +| (\* [CreateLayer](#createlayer) )(uint32_t devId, const [LayerInfo](_layer_info.md) \*layerInfo, uint32_t \*layerId) | int32_t
打开图层。 | +| (\* [CloseLayer](#closelayer) )(uint32_t devId, uint32_t layerId) | int32_t
关闭图层。 | +| (\* [SetLayerVisible](#setlayervisible) )(uint32_t devId, uint32_t layerId, bool visible) | int32_t
设置图层是否可见。 | +| (\* [GetLayerVisibleState](#getlayervisiblestate) )(uint32_t devId, uint32_t layerId, bool \*visible) | int32_t
获取图层是否可见状态。 | +| (\* [SetLayerSize](#setlayersize) )(uint32_t devId, uint32_t layerId, [IRect](_i_rect.md) \*rect) | int32_t
设置图层大小。 | +| (\* [GetLayerSize](#getlayersize) )(uint32_t devId, uint32_t layerId, [IRect](_i_rect.md) \*rect) | int32_t
获取图层大小。 | +| (\* [SetLayerCrop](#setlayercrop) )(uint32_t devId, uint32_t layerId, [IRect](_i_rect.md) \*rect) | int32_t
设置图层裁剪区域。 | +| (\* [SetLayerZorder](#setlayerzorder) )(uint32_t devId, uint32_t layerId, uint32_t zorder) | int32_t
设置图层Z轴次序。 | +| (\* [GetLayerZorder](#getlayerzorder) )(uint32_t devId, uint32_t layerId, uint32_t \*zorder) | int32_t
获取图层Z轴次序。 | +| (\* [SetLayerPreMulti](#setlayerpremulti) )(uint32_t devId, uint32_t layerId, bool preMul) | int32_t
设置图层预乘。 | +| (\* [GetLayerPreMulti](#getlayerpremulti) )(uint32_t devId, uint32_t layerId, bool \*preMul) | int32_t
获取图层预乘标识。 | +| (\* [SetLayerAlpha](#setlayeralpha) )(uint32_t devId, uint32_t layerId, [LayerAlpha](_layer_alpha.md) \*alpha) | int32_t
设置图层alpha值。 | +| (\* [GetLayerAlpha](#getlayeralpha) )(uint32_t devId, uint32_t layerId, [LayerAlpha](_layer_alpha.md) \*alpha) | int32_t
获取图层alpha值。 | +| (\* [SetLayerColorKey](#setlayercolorkey) )(uint32_t devId, uint32_t layerId, bool enable, uint32_t key) | int32_t
设置图层colorkey属性,在图层叠加时使用。 | +| (\* [GetLayerColorKey](#getlayercolorkey) )(uint32_t devId, uint32_t layerId, bool \*enable, uint32_t \*key) | int32_t
获取图层colorkey。 | +| (\* [SetLayerPalette](#setlayerpalette) )(uint32_t devId, uint32_t layerId, uint32_t \*palette, uint32_t len) | int32_t
设置图层调色板。 | +| (\* [GetLayerPalette](#getlayerpalette) )(uint32_t devId, uint32_t layerId, uint32_t \*palette, uint32_t len) | int32_t
获取图层调色板。 | +| (\* [SetTransformMode](#settransformmode) )(uint32_t devId, uint32_t layerId, [TransformType](_display.md#transformtype) type) | int32_t
设置图层变换模式,根据不同的场景设置图层的旋转、缩放、移位等。 | +| (\* [SetLayerCompression](#setlayercompression) )(uint32_t devId, uint32_t layerId, int32_t compType) | int32_t
设置图层压缩功能 | +| (\* [GetLayerCompression](#getlayercompression) )(uint32_t devId, uint32_t layerId, int32_t \*compType) | int32_t
获取图层压缩功能是否打开。 | +| (\* [SetLayerDirtyRegion](#setlayerdirtyregion) )(uint32_t devId, uint32_t layerId, [IRect](_i_rect.md) \*region) | int32_t
设置图层刷新区域。 | +| (\* [GetLayerBuffer](#getlayerbuffer) )(uint32_t devId, uint32_t layerId, [LayerBuffer](_layer_buffer.md) \*buffer) | int32_t
获取图层的buffer。 | +| (\* [Flush](#flush) )(uint32_t devId, uint32_t layerId, [LayerBuffer](_layer_buffer.md) \*buffer) | int32_t
刷新图层。 | +| (\* [WaitForVBlank](#waitforvblank) )(uint32_t devId, uint32_t layerId, int32_t timeOut) | int32_t
实现等待帧消隐期到来功能。 | +| (\* [SnapShot](#snapshot) )(uint32_t devId, [LayerBuffer](_layer_buffer.md) \*buffer) | int32_t
实现抓图功能。 | +| (\* [SetLayerVisibleRegion](#setlayervisibleregion) )(uint32_t devId, uint32_t layerId, uint32_t num, [IRect](_i_rect.md) \*rect) | int32_t
设置一个图层的可见区域 | +| (\* [SetLayerBuffer](#setlayerbuffer) )(uint32_t devId, uint32_t layerId, const BufferHandle \*buffer, int32_t fence) | int32_t
设置一个层的缓冲区。 | +| (\* [InvokeLayerCmd](#invokelayercmd) )(uint32_t devId, uint32_t layerId, uint32_t cmd,...) | int32_t
扩展接口 | +| (\* [SetLayerCompositionType](#setlayercompositiontype) )(uint32_t devId, uint32_t layerId, [CompositionType](_display.md#compositiontype) type) | int32_t
设置客户端期望的组合类型 | +| (\* [SetLayerBlendType](#setlayerblendtype) )(uint32_t devId, uint32_t layerId, [BlendType](_display.md#blendtype) type) | int32_t
设置混合类型 | +| (\* [SetLayerColorTransform](#setlayercolortransform) )(uint32_t devId, uint32_t layerId, const float \*matrix) | int32_t
设置图层当前的颜色转换矩阵。 | +| (\* [SetLayerColorDataSpace](#setlayercolordataspace) )(uint32_t devId, uint32_t layerId, [ColorDataSpace](_display.md#colordataspace) colorSpace) | int32_t
设置图层的颜色数据空间。 | +| (\* [GetLayerColorDataSpace](#getlayercolordataspace) )(uint32_t devId, uint32_t layerId, [ColorDataSpace](_display.md#colordataspace) \*colorSpace) | int32_t
获取图层当前的颜色数据空间。 | +| (\* [SetLayerMetaData](#setlayermetadata) )(uint32_t devId, uint32_t layerId, uint32_t num, const [HDRMetaData](_h_d_r_meta_data.md) \*metaData) | int32_t
设置图层的HDRmetaData。 | +| (\* [SetLayerMetaDataSet](#setlayermetadataset) )(uint32_t devId, uint32_t layerId, [HDRMetadataKey](_display.md#hdrmetadatakey) key, uint32_t num, const uint8_t \*metaData) | int32_t
设置图层的metaData set。 | +| (\* [GetSupportedPresentTimestamp](#getsupportedpresenttimestamp) )(uint32_t devId, uint32_t layerId, [PresentTimestampType](_display.md#presenttimestamptype) \*type) | int32_t
获取图层支持的上屏时间戳类型。 | +| (\* [GetHwPresentTimestamp](#gethwpresenttimestamp) )(uint32_t devId, uint32_t layerId, [PresentTimestamp](_present_timestamp.md) \*pts) | int32_t
获取图层的上屏时间戳信息。 | +| (\* [SetLayerTunnelHandle](#setlayertunnelhandle) )(uint32_t devId, uint32_t layerId, ExtDataHandle \*handle) | int32_t
设置图层的tunnel句柄。 | +| (\* [GetLayerReleaseFence](#getlayerreleasefence) )(uint32_t devId, uint32_t layerId, int32_t \*fence) | int32_t
获取图层的同步栅栏。 | + + +## 类成员变量说明 ### CloseLayer @@ -71,7 +71,7 @@ int32_t(* LayerFuncs::CloseLayer) (uint32_t devId, uint32_t layerId) ``` -**描述:** +**描述:** 关闭图层。 @@ -102,7 +102,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::CreateLayer) (uint32_t devId, const LayerInfo *layerInfo, uint32_t *layerId) ``` -**描述:** +**描述:** 打开图层。 @@ -134,7 +134,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::DeinitDisplay) (uint32_t devId) ``` -**描述:** +**描述:** 取消初始化显示设备。 @@ -162,7 +162,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::Flush) (uint32_t devId, uint32_t layerId, LayerBuffer *buffer) ``` -**描述:** +**描述:** 刷新图层。 @@ -190,7 +190,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::GetDisplayInfo) (uint32_t devId, DisplayInfo *dispInfo) ``` -**描述:** +**描述:** 获取显示设备相关信息。 @@ -215,7 +215,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::GetHwPresentTimestamp) (uint32_t devId, uint32_t layerId, PresentTimestamp *pts) ``` -**描述:** +**描述:** 获取图层的上屏时间戳信息。 @@ -225,7 +225,7 @@ int32_t(* LayerFuncs::GetHwPresentTimestamp) (uint32_t devId, uint32_t layerId, | -------- | -------- | | devId | 输入参数,指示需要操作的设备ID。 | | layerId | 输入参数,指示需要操作的图层ID。 | -| pts | 输出参数,保存图层的上屏时间戳信息, 由接口实现层进行写入。 | +| pts | 输出参数,保存图层的上屏时间戳信息,由接口实现层进行写入。 | **返回:** @@ -241,7 +241,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::GetLayerAlpha) (uint32_t devId, uint32_t layerId, LayerAlpha *alpha) ``` -**描述:** +**描述:** 获取图层alpha值。 @@ -271,7 +271,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::GetLayerBuffer) (uint32_t devId, uint32_t layerId, LayerBuffer *buffer) ``` -**描述:** +**描述:** 获取图层的buffer。 @@ -303,7 +303,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::GetLayerColorDataSpace) (uint32_t devId, uint32_t layerId, ColorDataSpace *colorSpace) ``` -**描述:** +**描述:** 获取图层当前的颜色数据空间。 @@ -329,7 +329,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::GetLayerColorKey) (uint32_t devId, uint32_t layerId, bool *enable, uint32_t *key) ``` -**描述:** +**描述:** 获取图层colorkey。 @@ -360,7 +360,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::GetLayerCompression) (uint32_t devId, uint32_t layerId, int32_t *compType) ``` -**描述:** +**描述:** 获取图层压缩功能是否打开。 @@ -390,7 +390,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::GetLayerPalette) (uint32_t devId, uint32_t layerId, uint32_t *palette, uint32_t len) ``` -**描述:** +**描述:** 获取图层调色板。 @@ -421,7 +421,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::GetLayerPreMulti) (uint32_t devId, uint32_t layerId, bool *preMul) ``` -**描述:** +**描述:** 获取图层预乘标识。 @@ -451,7 +451,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::GetLayerReleaseFence) (uint32_t devId, uint32_t layerId, int32_t *fence) ``` -**描述:** +**描述:** 获取图层的同步栅栏。 @@ -461,7 +461,7 @@ int32_t(* LayerFuncs::GetLayerReleaseFence) (uint32_t devId, uint32_t layerId, i | -------- | -------- | | devId | 输入参数,指示需要操作的设备ID。 | | layerId | 输入参数,指示需要操作的图层ID。 | -| fence | 输出参数,保存图层的 release fence, 由接口实现层进行写入。 | +| fence | 输出参数,保存图层的 release fence,由接口实现层进行写入。 | **返回:** @@ -477,7 +477,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::GetLayerSize) (uint32_t devId, uint32_t layerId, IRect *rect) ``` -**描述:** +**描述:** 获取图层大小。 @@ -507,7 +507,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::GetLayerVisibleState) (uint32_t devId, uint32_t layerId, bool *visible) ``` -**描述:** +**描述:** 获取图层是否可见状态。 @@ -537,7 +537,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::GetLayerZorder) (uint32_t devId, uint32_t layerId, uint32_t *zorder) ``` -**描述:** +**描述:** 获取图层Z轴次序。 @@ -567,7 +567,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::GetSupportedPresentTimestamp) (uint32_t devId, uint32_t layerId, PresentTimestampType *type) ``` -**描述:** +**描述:** 获取图层支持的上屏时间戳类型。 @@ -577,7 +577,7 @@ int32_t(* LayerFuncs::GetSupportedPresentTimestamp) (uint32_t devId, uint32_t la | -------- | -------- | | devId | 输入参数,指示需要操作的设备ID。 | | layerId | 输入参数,指示需要操作的图层ID。 | -| type | 输出参数,保存图层支持的上屏时间戳类型, 由接口实现层进行写入。 | +| type | 输出参数,保存图层支持的上屏时间戳类型,由接口实现层进行写入。 | **返回:** @@ -593,7 +593,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::InitDisplay) (uint32_t devId) ``` -**描述:** +**描述:** 初始化显示设备。 @@ -621,7 +621,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::InvokeLayerCmd) (uint32_t devId, uint32_t layerId, uint32_t cmd,...) ``` -**描述:** +**描述:** 扩展接口 @@ -647,7 +647,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerAlpha) (uint32_t devId, uint32_t layerId, LayerAlpha *alpha) ``` -**描述:** +**描述:** 设置图层alpha值。 @@ -677,7 +677,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerBlendType) (uint32_t devId, uint32_t layerId, BlendType type) ``` -**描述:** +**描述:** 设置混合类型 @@ -703,7 +703,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerBuffer) (uint32_t devId, uint32_t layerId, const BufferHandle *buffer, int32_t fence) ``` -**描述:** +**描述:** 设置一个层的缓冲区。 @@ -730,7 +730,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerColorDataSpace) (uint32_t devId, uint32_t layerId, ColorDataSpace colorSpace) ``` -**描述:** +**描述:** 设置图层的颜色数据空间。 @@ -756,9 +756,9 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerColorKey) (uint32_t devId, uint32_t layerId, bool enable, uint32_t key) ``` -**描述:** +**描述:** -设置图层colorkey属性,在图层叠加时使用。 +设置图层colorkey属性,在图层叠加时使用。 **参数:** @@ -787,7 +787,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerColorTransform) (uint32_t devId, uint32_t layerId, const float *matrix) ``` -**描述:** +**描述:** 设置图层当前的颜色转换矩阵。 @@ -813,9 +813,9 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerCompositionType) (uint32_t devId, uint32_t layerId, CompositionType type) ``` -**描述:** +**描述:** -设置客户端期望的组合类型。 +设置客户端期望的组合类型 **参数:** @@ -839,9 +839,9 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerCompression) (uint32_t devId, uint32_t layerId, int32_t compType) ``` -**描述:** +**描述:** -设置图层压缩功能。 +设置图层压缩功能 在特定场景下,需要对图像数据进行压缩,可设置启动或关闭图层压缩功能。 @@ -871,7 +871,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerCrop) (uint32_t devId, uint32_t layerId, IRect *rect) ``` -**描述:** +**描述:** 设置图层裁剪区域。 @@ -897,7 +897,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerDirtyRegion) (uint32_t devId, uint32_t layerId, IRect *region) ``` -**描述:** +**描述:** 设置图层刷新区域。 @@ -925,7 +925,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerMetaData) (uint32_t devId, uint32_t layerId, uint32_t num, const HDRMetaData *metaData) ``` -**描述:** +**描述:** 设置图层的HDRmetaData。 @@ -952,7 +952,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerMetaDataSet) (uint32_t devId, uint32_t layerId, HDRMetadataKey key, uint32_t num, const uint8_t *metaData) ``` -**描述:** +**描述:** 设置图层的metaData set。 @@ -962,9 +962,9 @@ int32_t(* LayerFuncs::SetLayerMetaDataSet) (uint32_t devId, uint32_t layerId, HD | -------- | -------- | | devId | 输入参数,指示需要操作的设备ID。 | | layerId | 输入参数,指示需要操作的图层ID。 | -| key | 输入参数,表示需要设置的[HDRMetadataKey](_display.md#hdrmetadatakey)。 | +| key | 输入参数,表示需要设置的 HDRMetadataKey。 | | num | 输入参数,metadata 数组个数。 | -| metaData | 输入参数,表示需要设置的 metadata 数组首地址, 数据类型为uint8_t。 | +| metaData | 输入参数,表示需要设置的 metadata 数组首地址,数据类型为uint8_t。 | **返回:** @@ -980,7 +980,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerPalette) (uint32_t devId, uint32_t layerId, uint32_t *palette, uint32_t len) ``` -**描述:** +**描述:** 设置图层调色板。 @@ -1011,7 +1011,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerPreMulti) (uint32_t devId, uint32_t layerId, bool preMul) ``` -**描述:** +**描述:** 设置图层预乘。 @@ -1041,7 +1041,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerSize) (uint32_t devId, uint32_t layerId, IRect *rect) ``` -**描述:** +**描述:** 设置图层大小。 @@ -1071,7 +1071,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerTunnelHandle) (uint32_t devId, uint32_t layerId, ExtDataHandle *handle) ``` -**描述:** +**描述:** 设置图层的tunnel句柄。 @@ -1097,7 +1097,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerVisible) (uint32_t devId, uint32_t layerId, bool visible) ``` -**描述:** +**描述:** 设置图层是否可见。 @@ -1129,7 +1129,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerVisibleRegion) (uint32_t devId, uint32_t layerId, uint32_t num, IRect *rect) ``` -**描述:** +**描述:** 设置一个图层的可见区域 @@ -1156,7 +1156,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetLayerZorder) (uint32_t devId, uint32_t layerId, uint32_t zorder) ``` -**描述:** +**描述:** 设置图层Z轴次序。 @@ -1188,7 +1188,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SetTransformMode) (uint32_t devId, uint32_t layerId, TransformType type) ``` -**描述:** +**描述:** 设置图层变换模式,根据不同的场景设置图层的旋转、缩放、移位等。 @@ -1214,14 +1214,12 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::SnapShot) (uint32_t devId, LayerBuffer *buffer) ``` -**描述:** +**描述:** 实现抓图功能。 本函数将显示设备上的图像数据截图保存到buffer中,用于调试、应用截图等场景。 -otherwise. - **参数:** | 名称 | 描述 | @@ -1243,7 +1241,7 @@ DISPLAY_SUCCESS 表示执行成功。 int32_t(* LayerFuncs::WaitForVBlank) (uint32_t devId, uint32_t layerId, int32_t timeOut) ``` -**描述:** +**描述:** 实现等待帧消隐期到来功能。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_layer_info.md b/zh-cn/device-dev/reference/hdi-apis/_layer_info.md index 2a37f273707a9af958cdac308f26f6cabf525855..ce540ba23b1f0b395ae546c3ede0c7703c7b0ed4 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_layer_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_layer_info.md @@ -1,9 +1,9 @@ # LayerInfo -## **概述** +## 概述 -定义图层信息结构体。 +定义图层信息结构体 在创建图层时,需要将LayerInfo传递给创建图层接口,创建图层接口根据图层信息创建相应图层。 @@ -12,15 +12,15 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [width](_display.md#width-29) | 图层宽度 | -| [height](_display.md#height-28) | 图层高度 | -| [type](_display.md#type-17) | 图层类型,包括图形层、视频层和媒体播放模式。 | -| [bpp](_display.md#bpp) | 每像素所占bit数 | -| [pixFormat](_display.md#pixformat-12) | 图层像素格式 | +| [width](_display.md#width-29) | int32_t
图层宽度 | +| [height](_display.md#height-28) | int32_t
图层高度 | +| [type](_display.md#type-17) | [LayerType](_display.md#layertype)
图层类型,包括图形层、视频层和媒体播放模式 | +| [bpp](_display.md#bpp) | int32_t
每像素所占bit数 | +| [pixFormat](_display.md#pixformat-12) | [PixelFormat](_display.md#pixelformat)
图层像素格式 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_layer_norm_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_layer_norm_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..ae1d00b44499b6fb6f4e15136384d615cd0c57cc --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_layer_norm_fusion.md @@ -0,0 +1,84 @@ +# LayerNormFusion + + +## 概述 + +对一个tensor从某一axis开始做层归一化。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_LAYER_NORM_FUSION。 + +输入: + +- x,n维tensor。 + +- gamma,一个m维tensor,gamma维度应该与input做归一化部分的shape一致。 + +- beta,一个m维tensor,shape与gamma一样。 + +输出: + +- output,n维输出tensor,数据类型和shape和input一致。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [beginNormAxis](#beginnormaxis) | long
指定x需进行层归一化的起始维度。  | +| [epsilon](#epsilon) | float
为数值稳定性定义一个加到分母上的值。  | +| [elementwiseAffine](#elementwiseaffine) | boolean
是否为元素级别的操作。  | +| [beginParamsAxis](#beginparamsaxis) | long
指定输入参数gamma,beta需进行层归一化的开始维度,其值必须在[-n, n)范围内。  | + + +## 类成员变量说明 + + +### beginNormAxis + + +``` +long LayerNormFusion::beginNormAxis +``` +**描述:** +指定x需进行层归一化的起始维度。 + + +### beginParamsAxis + + +``` +long LayerNormFusion::beginParamsAxis +``` +**描述:** +指定输入参数gamma,beta需进行层归一化的开始维度,其值必须在[-n, n)范围内。 + + +### elementwiseAffine + + +``` +boolean LayerNormFusion::elementwiseAffine +``` +**描述:** +是否为元素级别的操作。 + + +### epsilon + + +``` +float LayerNormFusion::epsilon +``` +**描述:** +为数值稳定性定义一个加到分母上的值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_less_equal.md b/zh-cn/device-dev/reference/hdi-apis/_less_equal.md new file mode 100644 index 0000000000000000000000000000000000000000..a9b47416e56c6c4468466c1be7461a3919e44568 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_less_equal.md @@ -0,0 +1,26 @@ +# LessEqual + + +## 概述 + +对输入x1和x2,计算每对元素的x1<=x2的结果。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_LESS_EQUAL。 + +输入: + +- x1,可以是实数、布尔值或数据类型是实数或者布尔类型的tensor。 + +- x2,如果x1是tensor,x2可以是实数、布尔值,否则只能是tensor,其数据类型是实数或DATA_TYPE_BOOL。 + +输出: + +- output,数据类型为DATA_TYPE_BOOL的tensor;使用量化模型时,output的量化参数不可省略,但量化参数的数值不会对输入结果产生影响。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/light.md b/zh-cn/device-dev/reference/hdi-apis/_light.md similarity index 71% rename from zh-cn/device-dev/reference/hdi-apis/light.md rename to zh-cn/device-dev/reference/hdi-apis/_light.md index adab9f4230644c23ae3c35d389ea821bd7b537bf..09477d091c072c8221579861685da785874b0bc8 100644 --- a/zh-cn/device-dev/reference/hdi-apis/light.md +++ b/zh-cn/device-dev/reference/hdi-apis/_light.md @@ -1,22 +1,22 @@ # Light -## **概述** +## 概述 灯驱动对灯服务提供通用的接口能力。 灯模块为灯服务提供通用的接口去访问灯驱动,服务获取灯驱动对象或代理后,可以通过调用的APIs接口获取相关的灯信息。 例如打开或关闭灯、根据灯类型ID设置灯闪烁模式。 -**Since**: +**Since:** 3.1 -**Version**: +**Version:** 1.0 -## **汇总** +## 汇总 ### 文件 @@ -31,14 +31,14 @@ | 名称 | 描述 | | -------- | -------- | -| [ILightInterface](interface_i_light_interface.md) | 提供灯模块基本操作接口。 | -| [HdfLightInfo](_hdf_light_info.md) | 定义灯的基本信息。 | -| [HdfLightFlashEffect](_hdf_light_flash_effect.md) | 定义灯的闪烁参数。 | -| [RGBColor](_r_g_b_color.md) | 定义灯的RGB模式。 | -| [WRGBColor](_w_r_g_b_color.md) | 定义灯的WRGB模式。 | -| [ColorValue](union_color_value.md) | 定义灯的颜色模式。 | -| [HdfLightColor](_hdf_light_color.md) | 定义亮灯参数。 | -| [HdfLightEffect](_hdf_light_effect.md) | 定义灯的效果参数。 | +| [ILightInterface](interface_i_light_interface.md) | interface
提供灯模块基本操作接口。 | +| [HdfLightInfo](_hdf_light_info.md) | struct
定义灯的基本信息。 | +| [HdfLightFlashEffect](_hdf_light_flash_effect.md) | struct
定义灯的闪烁参数。 | +| [RGBColor](_r_g_b_color.md) | struct
定义灯的RGB模式。 | +| [WRGBColor](_w_r_g_b_color.md) | struct
定义灯的WRGB模式。 | +| [ColorValue](union_color_value.md) | union
定义灯的颜色模式。 | +| [HdfLightColor](_hdf_light_color.md) | struct
定义亮灯参数。 | +| [HdfLightEffect](_hdf_light_effect.md) | struct
定义灯的效果参数。 | ### 枚举 @@ -46,7 +46,7 @@ | 名称 | 描述 | | -------- | -------- | | [HdfLightId](#hdflightid) { HDF_LIGHT_ID_BATTERY = 1, HDF_LIGHT_ID_NOTIFICATIONS = 2, HDF_LIGHT_ID_ATTENTION = 3, HDF_LIGHT_ID_BUTT = 4 } | 枚举灯类型。 | -| [HdfLightFlashMode](#hdflightflashmode) { HDF_LIGHT_FLASH_NONE = 0, HDF_LIGHT_FLASH_BLINK = 1, HDF_LIGHT_FLASH_GRADIENT = 2, HDF_LIGHT_FLASH_BUTT = 3 } | 枚举灯的模式。 | +| [HdfLightFlashMode](#hdflightflashmode) { HDF_LIGHT_FLASH_NONE = 0, HDF_LIGHT_FLASH_TIMED = 1, HDF_LIGHT_FLASH_GRADIENT = 2, HDF_LIGHT_FLASH_BUTT = 3 } | 枚举灯的模式。 | ### 关键字 @@ -56,7 +56,7 @@ | package ohos.hdi.light.v1_0 | 灯模块接口的包路径。 | -## **枚举类型说明** +## 枚举类型说明 ### HdfLightFlashMode @@ -66,7 +66,7 @@ enum HdfLightFlashMode ``` -**描述:** +**描述:** 枚举灯的模式。 @@ -85,7 +85,7 @@ enum HdfLightFlashMode enum HdfLightId ``` -**描述:** +**描述:** 枚举灯类型。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_light_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_light_types_8idl.md index 7ba20d9db066445089a3964a8a8e83175583dd9a..9ac672f6b45f481864809105144eac6f80af7e90 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_light_types_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_light_types_8idl.md @@ -1,7 +1,7 @@ # LightTypes.idl -## **概述** +## 概述 定义灯的数据结构,包括灯类型ID、灯的基本信息、灯的模式、灯的闪烁参数、灯的颜色模式和灯的效果参数。 @@ -15,31 +15,31 @@ **相关模块:** -[Light](light.md) +[Light](_light.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [HdfLightInfo](_hdf_light_info.md) | 定义灯的基本信息。 | -| [HdfLightFlashEffect](_hdf_light_flash_effect.md) | 定义灯的闪烁参数。 | -| [RGBColor](_r_g_b_color.md) | 定义灯的RGB模式。 | -| [WRGBColor](_w_r_g_b_color.md) | 定义灯的WRGB模式。 | -| [ColorValue](union_color_value.md) | 定义灯的颜色模式。 | -| [HdfLightColor](_hdf_light_color.md) | 定义亮灯参数。 | -| [HdfLightEffect](_hdf_light_effect.md) | 定义灯的效果参数。 | +| [HdfLightInfo](_hdf_light_info.md) | struct
定义灯的基本信息。 | +| [HdfLightFlashEffect](_hdf_light_flash_effect.md) | struct
定义灯的闪烁参数。 | +| [RGBColor](_r_g_b_color.md) | struct
定义灯的RGB模式。 | +| [WRGBColor](_w_r_g_b_color.md) | struct
定义灯的WRGB模式。 | +| [ColorValue](union_color_value.md) | union
定义灯的颜色模式。 | +| [HdfLightColor](_hdf_light_color.md) | struct
定义亮灯参数。 | +| [HdfLightEffect](_hdf_light_effect.md) | struct
定义灯的效果参数。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [HdfLightId](light.md#hdflightid) { HDF_LIGHT_ID_BATTERY = 1, HDF_LIGHT_ID_NOTIFICATIONS = 2, HDF_LIGHT_ID_ATTENTION = 3, HDF_LIGHT_ID_BUTT = 4 } | 枚举灯类型。 | -| [HdfLightFlashMode](light.md#hdflightflashmode) { HDF_LIGHT_FLASH_NONE = 0, HDF_LIGHT_FLASH_BLINK = 1, HDF_LIGHT_FLASH_GRADIENT = 2, HDF_LIGHT_FLASH_BUTT = 3 } | 枚举灯的模式。 | +| [HdfLightId](_light.md#hdflightid) { HDF_LIGHT_ID_BATTERY = 1, HDF_LIGHT_ID_NOTIFICATIONS = 2, HDF_LIGHT_ID_ATTENTION = 3, HDF_LIGHT_ID_BUTT = 4 } | 枚举灯类型。 | +| [HdfLightFlashMode](_light.md#hdflightflashmode) { HDF_LIGHT_FLASH_NONE = 0, HDF_LIGHT_FLASH_TIMED = 1, HDF_LIGHT_FLASH_GRADIENT = 2, HDF_LIGHT_FLASH_BUTT = 3 } | 枚举灯的模式。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_lock_status_resp.md b/zh-cn/device-dev/reference/hdi-apis/_lock_status_resp.md new file mode 100644 index 0000000000000000000000000000000000000000..2bff688b410808160d4c130d4142690ef075c355 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_lock_status_resp.md @@ -0,0 +1,44 @@ +# LockStatusResp + + +## 概述 + +SIM卡解锁响应 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [result](#result) | int
查询结果,具体查看[RilErrType](_ril.md#rilerrtype) | +| [remain](#remain) | int
剩余次数  | + + +## 类成员变量说明 + + +### remain + + +``` +int LockStatusResp::remain +``` +**描述:** +剩余次数 + + +### result + + +``` +int LockStatusResp::result +``` +**描述:** +查询结果,具体查看[RilErrType](_ril.md#rilerrtype) diff --git a/zh-cn/device-dev/reference/hdi-apis/_lte_rssi.md b/zh-cn/device-dev/reference/hdi-apis/_lte_rssi.md new file mode 100644 index 0000000000000000000000000000000000000000..1ad28ed81e96066fa16daf36601af7d673ac6ef3 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_lte_rssi.md @@ -0,0 +1,66 @@ +# LteRssi + + +## 概述 + +LTE信号强度。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [rxlev](#rxlev) | int
信号接收强度,取值范围0~99  | +| [rsrq](#rsrq) | int
表示信号接收质量,取值范围0~33  | +| [rsrp](#rsrp) | int
表示接收信号码功率,取值范围0~97  | +| [snr](#snr) | int
表示信号干扰噪声比,适用于LTE模式,取值范围0~251  | + + +## 类成员变量说明 + + +### rsrp + + +``` +int LteRssi::rsrp +``` +**描述:** +表示接收信号码功率,取值范围0~97 + + +### rsrq + + +``` +int LteRssi::rsrq +``` +**描述:** +表示信号接收质量,取值范围0~33 + + +### rxlev + + +``` +int LteRssi::rxlev +``` +**描述:** +信号接收强度,取值范围0~99 + + +### snr + + +``` +int LteRssi::snr +``` +**描述:** +表示信号干扰噪声比,适用于LTE模式,取值范围0~251 diff --git a/zh-cn/device-dev/reference/hdi-apis/_mat_mul_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_mat_mul_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..a18999c319ca6da84f9e84f7a98f5b3a2f177f71 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_mat_mul_fusion.md @@ -0,0 +1,71 @@ +# MatMulFusion + + +## 概述 + +对输入x1和x2,计算x1和x2的内积。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_MATMUL_FUSION。 + +输入: + +- x1,n维输入tensor,实数或DATA_TYPE_BOOL类型的tensor。 + +- x2,n维输入tensor,实数或DATA_TYPE_BOOL类型的tensor。 + +输出: + +- output,计算得到内积,当type!=DATA_TYPE_UNKNOWN时,output数据类型由type决定;当type==DATA_TYPE_UNKNOWN时, output的数据类型取决于x1和x2进行计算时转化的数据类型。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [transposeA](#transposea) | boolean
是否对x1矩阵进行转置。  | +| [transposeB](#transposeb) | boolean
是否对x2矩阵进行转置。  | +| [activationType](#activationtype) | enum [ActivationType](_n_n_rt.md#activationtype)
激活函数,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。  | + + +## 类成员变量说明 + + +### activationType + + +``` +enum ActivationType MatMulFusion::activationType +``` +**描述:** +激活函数,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。 + + +### transposeA + + +``` +boolean MatMulFusion::transposeA +``` +**描述:** +是否对x1矩阵进行转置。 + + +### transposeB + + +``` +boolean MatMulFusion::transposeB +``` +**描述:** +是否对x2矩阵进行转置。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_max_pool_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_max_pool_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..cd4c7d80d937f56ac84b1c780cb9a549524685dc --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_max_pool_fusion.md @@ -0,0 +1,115 @@ +# MaxPoolFusion + + +## 概述 + +对输入x,计算 2D 最大值池化。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_MAX_POOL_FUSION。 + +参数限制:当padMode==PAD_MODE_PAD时,padList的数值必须大于等于0。其他情况下padding的数值必须为0。 + +输入: + +- x,n维tensor + +输出: + +- output,x1和x2两个tensor对应元素的最大值。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [kernelSize](#kernelsize) | long[]
取最大值的kernel大小,是一个长度为2的int数组[kernel_height,kernel_weight]。  | +| [strides](#strides) | long[]
池化核步长,kernel移动的距离,是一个长度为2的int数组。  | +| [pad](#pad) | long[]
填充数组。  | +| [padMode](#padmode) | enum [PadMode](_n_n_rt.md#padmode)
填充类型,详情请参考:[PadMode](_n_n_rt.md#padmode)。  | +| [format](#format) | enum [Format](_n_n_rt.md#format)
运算时数据的排列,详情请参考:[Format](_n_n_rt.md#format)。  | +| [global](#global) | boolean
是否是全局池化。  | +| [activationType](#activationtype) | enum [ActivationType](_n_n_rt.md#activationtype)
激活函数,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。  | + + +## 类成员变量说明 + + +### activationType + + +``` +enum ActivationType MaxPoolFusion::activationType +``` +**描述:** +激活函数,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。 + + +### format + + +``` +enum Format MaxPoolFusion::format +``` +**描述:** +运算时数据的排列,详情请参考:[Format](_n_n_rt.md#format)。 + + +### global + + +``` +boolean MaxPoolFusion::global +``` +**描述:** +是否是全局池化。 + + +### kernelSize + + +``` +long [] MaxPoolFusion::kernelSize +``` +**描述:** +取最大值的kernel大小,是一个长度为2的int数组[kernel_height,kernel_weight]。 + + +### pad + + +``` +long [] MaxPoolFusion::pad +``` +**描述:** +填充数组。 + + +### padMode + + +``` +enum PadMode MaxPoolFusion::padMode +``` +**描述:** +填充类型,详情请参考:[PadMode](_n_n_rt.md#padmode)。 + + +### strides + + +``` +long [] MaxPoolFusion::strides +``` +**描述:** +池化核步长,kernel移动的距离,是一个长度为2的int数组。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_maximum.md b/zh-cn/device-dev/reference/hdi-apis/_maximum.md new file mode 100644 index 0000000000000000000000000000000000000000..bac47e4576aeadfa455270525b8be38bc29d8a1b --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_maximum.md @@ -0,0 +1,28 @@ +# Maximum + + +## 概述 + +对输入x1和x2,计算x1和x2对应元素最大值,x1和x2的输入遵守隐式类型转换规则,使数据类型一致。 + +输入必须是两个张量或一个张量和一个标量。当输入是两个张量时,它们的数据类型不能同时为DATA_TYPE_BOOL。它们的形状支持 broadcast成相同的大小。当输入是一个张量和一个标量时,标量只能是一个常数。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_MAXIMUM。 + +输入: + +- x1,n维输入tensor,实数或DATA_TYPE_BOOL类型。 + +- x2,n维输入tensor,实数或DATA_TYPE_BOOL类型。 + +输出: + +- output,x1和x2两个tensor对应元素的最大值。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_meas_channel_param.md b/zh-cn/device-dev/reference/hdi-apis/_meas_channel_param.md index f79fa1a599c8747f62b908285f98f36075bb59b8..802e5522167896fd73b16906e153e5cdda08942f 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_meas_channel_param.md +++ b/zh-cn/device-dev/reference/hdi-apis/_meas_channel_param.md @@ -1,35 +1,31 @@ # MeasChannelParam -## **概述** +## 概述 信道测量参数。 **Since:** - 3.2 - **Version:** - 1.0 - **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [channelId](#channelid) | 信道号。 | -| [measTime](#meastime) | 测量时间。 | +| [channelId](#channelid) | int
信道号。  | +| [measTime](#meastime) | int
测量时间。  | -## **类成员变量说明** +## 类成员变量说明 ### channelId @@ -38,9 +34,7 @@ ``` int MeasChannelParam::channelId ``` - -**描述:** - +**描述:** 信道号。 @@ -50,7 +44,5 @@ int MeasChannelParam::channelId ``` int MeasChannelParam::measTime ``` - -**描述:** - +**描述:** 测量时间。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_meas_channel_result.md b/zh-cn/device-dev/reference/hdi-apis/_meas_channel_result.md index 58c05d98f1424fcd8821a7ac425df7ee2acdbb5d..95f44286f60b671cf12e380255d8bac009545c8e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_meas_channel_result.md +++ b/zh-cn/device-dev/reference/hdi-apis/_meas_channel_result.md @@ -1,36 +1,32 @@ # MeasChannelResult -## **概述** +## 概述 信道测量结果。 **Since:** - 3.2 - **Version:** - 1.0 - **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [channelId](#channelid) | 信道号。 | -| [chload](#chload) | 信道负载。 | -| [noise](#noise) | 信道噪声。 | +| [channelId](#channelid) | int
信道号。  | +| [chload](#chload) | int
信道负载。  | +| [noise](#noise) | int
信道噪声。  | -## **类成员变量说明** +## 类成员变量说明 ### channelId @@ -39,9 +35,7 @@ ``` int MeasChannelResult::channelId ``` - -**描述:** - +**描述:** 信道号。 @@ -51,9 +45,7 @@ int MeasChannelResult::channelId ``` int MeasChannelResult::chload ``` - -**描述:** - +**描述:** 信道负载。 @@ -63,7 +55,5 @@ int MeasChannelResult::chload ``` int MeasChannelResult::noise ``` - -**描述:** - +**描述:** 信道噪声。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_mode_data.md b/zh-cn/device-dev/reference/hdi-apis/_mode_data.md new file mode 100644 index 0000000000000000000000000000000000000000..154fd589fb60a86e3a4797c1dbe8164cf98500d7 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_mode_data.md @@ -0,0 +1,74 @@ +# ModeData + + +## 概述 + +接收短信处理模式。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号 | +| [result](#result) | boolean
是否接收短信 | +| [mode](#mode) | int
接收短信处理模式 | +| [pdu](#pdu) | String
协议数据单元 | + + +## 类成员变量说明 + + +### mode + + +``` +int ModeData::mode +``` + +**描述:** + +接收短信处理模式 + + +### pdu + + +``` +String ModeData::pdu +``` + +**描述:** + +协议数据单元 + + +### result + + +``` +boolean ModeData::result +``` + +**描述:** + +是否接收短信 + + +### serial + + +``` +int ModeData::serial +``` + +**描述:** + +请求的序列号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_model.md b/zh-cn/device-dev/reference/hdi-apis/_model.md new file mode 100644 index 0000000000000000000000000000000000000000..e74d871f5d737f9058efd0aa0859d516bdd05e53 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_model.md @@ -0,0 +1,94 @@ +# Model + + +## 概述 + +模型结构体。 + +该结构体中存储了模型推理时所有的信息,每一个Model的第0个子图都是主子图,一般情况下一个Model仅有一个subGraph(其他情况目前暂不支持)。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [name](#name) | String
模型名称。  | +| [inputIndex](#inputindex) | unsigned int[]
模型的输入张量在allTensors数组中的下标。  | +| [outputIndex](#outputindex) | unsigned int[]
模型的输出张量在allTensors数组中的下标。  | +| [nodes](#nodes) | struct [Node](_node.md)[]
模型中所有的算子节点组成的数组,详情请参考:[Node](_node.md)。  | +| [allTensors](#alltensors) | struct [Tensor](_tensor.md)[]
模型中所有的张量组成的数组,该数组中包括输入张量,输出张量和常量张量,详情请参考:[Tensor](_tensor.md)。  | +| [subGraph](#subgraph) | struct [SubGraph](_sub_graph.md)[]
模型中所有的子图组成的数组,详情请参考:[SubGraph](_sub_graph.md)。  | + + +## 类成员变量说明 + + +### allTensors + + +``` +struct Tensor [] Model::allTensors +``` +**描述:** +模型中所有的张量组成的数组,该数组中包括输入张量,输出张量和常量张量,详情请参考:[Tensor](_tensor.md)。 + + +### inputIndex + + +``` +unsigned int [] Model::inputIndex +``` +**描述:** +模型的输入张量在allTensors数组中的下标。 + + +### name + + +``` +String Model::name +``` +**描述:** +模型名称。 + + +### nodes + + +``` +struct Node [] Model::nodes +``` +**描述:** +模型中所有的算子节点组成的数组,详情请参考:[Node](_node.md)。 + + +### outputIndex + + +``` +unsigned int [] Model::outputIndex +``` +**描述:** +模型的输出张量在allTensors数组中的下标。 + + +### subGraph + + +``` +struct SubGraph [] Model::subGraph +``` +**描述:** +模型中所有的子图组成的数组,详情请参考:[SubGraph](_sub_graph.md)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_model_config.md b/zh-cn/device-dev/reference/hdi-apis/_model_config.md new file mode 100644 index 0000000000000000000000000000000000000000..f37070026d608365688734ca007f9db38afb0987 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_model_config.md @@ -0,0 +1,70 @@ +# ModelConfig + + +## 概述 + +定义编译模型需要的参数配置。 + +**Since:** +3.2 +**Version:** +2.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [enableFloat16](#enablefloat16) | boolean
float32浮点模型是否以float16浮点运行  | +| [mode](#mode) | enum [PerformanceMode](_n_n_rt.md#performancemode)
计算任务的性能模式,性能模式定义请查看[PerformanceMode](_n_n_rt.md#performancemode) | +| [priority](#priority) | enum [Priority](_n_n_rt.md#priority)
计算任务的优先级,优先级详情请看[Priority](_n_n_rt.md#priority) | +| [extensions](#extensions) | Map< String, byte[]>
底层硬件自定义属性,按照“名称:二进制值”来存储,由HDI服务自行解析  | + + +## 类成员变量说明 + + +### enableFloat16 + + +``` +boolean ModelConfig::enableFloat16 +``` +**描述:** +float32浮点模型是否以float16浮点运行 + + +### extensions + + +``` +Map ModelConfig::extensions +``` +**描述:** +底层硬件自定义属性,按照“名称:二进制值”来存储,由HDI服务自行解析 + + +### mode + + +``` +enum PerformanceMode ModelConfig::mode +``` +**描述:** +计算任务的性能模式,性能模式定义请查看[PerformanceMode](_n_n_rt.md#performancemode) + + +### priority + + +``` +enum Priority ModelConfig::priority +``` +**描述:** +计算任务的优先级,优先级详情请看[Priority](_n_n_rt.md#priority) diff --git a/zh-cn/device-dev/reference/hdi-apis/_model_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_model_types_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..58170ce499b6db1f3ce837faf966e6eee981cc79 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_model_types_8idl.md @@ -0,0 +1,48 @@ +# ModelTypes.idl + + +## 概述 + +该文件定义AI模型相关的结构体。 + +在**PrepareModel**阶段,需要解析Model并将其转换为用于推理的模型结构,在**Run**阶段则会执行模型推理。大致流程如下: + +1. 编写[NodeAttrTypes.idl](_node_attr_types_8idl.md)文件中每一个算子的函数,并将函数与[NodeType](_n_n_rt.md#nodetype)进行关联。 + +2. 遍历[Model](_model.md)的subGraph参数,然后从子图的nodeIndecies中获得该子图包含的算子节点以及算子的输入输出张量和整个[Model](_model.md)的输入输出张量。 + +3. 通过[Node](_node.md)的nodeType参数找到算子函数,并构建用于运行时的模型结构。 + +4. 执行模型推理时,通过用户输入张量传递给模型并执行模型推理,最终输出模型推理的结果。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [Tensor](_tensor.md) | struct
张量结构体。 | +| [Node](_node.md) | struct
算子节点结构体。 | +| [SubGraph](_sub_graph.md) | struct
子图结构体。 | +| [Model](_model.md) | struct
模型结构体。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.nnrt.v2_0 | NNRt模块的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/motion.md b/zh-cn/device-dev/reference/hdi-apis/_motion.md similarity index 63% rename from zh-cn/device-dev/reference/hdi-apis/motion.md rename to zh-cn/device-dev/reference/hdi-apis/_motion.md index 4662cf421979b9d24c5be1ca2143d2c649104b93..199086927343a45815689bac3a445aee54874e02 100644 --- a/zh-cn/device-dev/reference/hdi-apis/motion.md +++ b/zh-cn/device-dev/reference/hdi-apis/_motion.md @@ -1,18 +1,18 @@ # Motion -## **概述** +## 概述 手势识别设备驱动对硬件服务提供通用的接口能力。 -模块提供硬件服务对手势识别驱动模块访问统一接口,服务获取驱动对象或者代理后,通过其提供的各类方法,实现使能手势识别/ 去使能手势识别、订阅/取消订阅手势识别数据。 +模块提供硬件服务对手势识别驱动模块访问统一接口,服务获取驱动对象或者代理后,通过其提供的各类方法,实现使能手势识别/去使能手势识别、订阅/取消订阅手势识别数据。 -**Since**: +**Since:** 3.2 -## **汇总** +## 汇总 ### 文件 @@ -28,16 +28,16 @@ | 名称 | 描述 | | -------- | -------- | -| [IMotionCallback](interface_i_motion_callback.md) | 定义上报手势识别数据回调函数。 | -| [IMotionInterface](interface_i_motion_interface.md) | 提供Motion设备基本控制操作接口。 | -| [HdfMotionEvent](_hdf_motion_event.md) | 上报手势识别数据结构。 | +| [IMotionCallback](interface_i_motion_callback.md) | interface
定义上报手势识别数据回调函数。 | +| [IMotionInterface](interface_i_motion_interface.md) | interface
提供Motion设备基本控制操作接口。 | +| [HdfMotionEvent](_hdf_motion_event.md) | struct
上报手势识别数据结构。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [HdfMotionTypeTag](#hdfmotiontypetag) {   HDF_MOTION_TYPE_PICKUP = 0, HDF_MOTION_TYPE_FLIP, HDF_MOTION_CLOSE_TO_EAR, HDF_MOTION_TYPE_SHAKE,   HDF_MOTION_TYPE_ROTATION, HDF_MOTION_TYPE_POCKET_MODE, HDF_MOTION_TYPE_LEAVE_EAR, HDF_MOTION_TYPE_WRIST_UP,   HDF_MOTION_TYPE_WRIST_DOWN, HDF_MOTION_TYPE_MAX } | 枚举手势识别类型。 | +| [HdfMotionTypeTag](#hdfmotiontypetag) { HDF_MOTION_TYPE_PICKUP = 0, HDF_MOTION_TYPE_FLIP, HDF_MOTION_CLOSE_TO_EAR, HDF_MOTION_TYPE_SHAKE,   HDF_MOTION_TYPE_ROTATION, HDF_MOTION_TYPE_POCKET_MODE, HDF_MOTION_TYPE_LEAVE_EAR, HDF_MOTION_TYPE_WRIST_UP,   HDF_MOTION_TYPE_WRIST_DOWN, HDF_MOTION_TYPE_MAX } | 枚举手势识别类型。 | ### 关键字 @@ -47,7 +47,7 @@ | package ohos.hdi.motion.v1_0 | 手势识别模块接口的包路径。 | -## **枚举类型说明** +## 枚举类型说明 ### HdfMotionTypeTag @@ -57,7 +57,7 @@ enum HdfMotionTypeTag ``` -**描述:** +**描述:** 枚举手势识别类型。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_motion_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_motion_types_8idl.md index 2f1c31dce3a06a64e8cba139bb0ec3235c4b5b06..1d4093706c44d4fcb9229ad89eaa559c9aa06512 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_motion_types_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_motion_types_8idl.md @@ -1,7 +1,7 @@ # MotionTypes.idl -## **概述** +## 概述 定义手势识别模块用到的数据结构,包括手势识别类型、上报的手势识别数据结构。 @@ -15,21 +15,28 @@ **相关模块:** -[Motion](motion.md) +[Motion](_motion.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [HdfMotionEvent](_hdf_motion_event.md) | 上报手势识别数据结构。 | +| [HdfMotionEvent](_hdf_motion_event.md) | struct
上报手势识别数据结构。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [HdfMotionTypeTag](motion.md#hdfmotiontypetag) {   HDF_MOTION_TYPE_PICKUP = 0, HDF_MOTION_TYPE_FLIP, HDF_MOTION_CLOSE_TO_EAR, HDF_MOTION_TYPE_SHAKE,   HDF_MOTION_TYPE_ROTATION, HDF_MOTION_TYPE_POCKET_MODE, HDF_MOTION_TYPE_LEAVE_EAR, HDF_MOTION_TYPE_WRIST_UP,   HDF_MOTION_TYPE_WRIST_DOWN, HDF_MOTION_TYPE_MAX } | 枚举手势识别类型。 | +| [HdfMotionTypeTag](_motion.md#hdfmotiontypetag) { HDF_MOTION_TYPE_PICKUP = 0, HDF_MOTION_TYPE_FLIP, HDF_MOTION_CLOSE_TO_EAR, HDF_MOTION_TYPE_SHAKE,   HDF_MOTION_TYPE_ROTATION, HDF_MOTION_TYPE_POCKET_MODE, HDF_MOTION_TYPE_LEAVE_EAR, HDF_MOTION_TYPE_WRIST_UP,   HDF_MOTION_TYPE_WRIST_DOWN, HDF_MOTION_TYPE_MAX } | 枚举手势识别类型。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.motion.v1_0 | 手势识别模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_mul_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_mul_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..d04f950a1db50c276084dfff72bbfe6091053cb1 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_mul_fusion.md @@ -0,0 +1,49 @@ +# MulFusion + + +## 概述 + +对输入x1和x2,将x1和x2相同的位置的元素相乘得到output。 + +如果x1和x2类型shape不同,要求x1和x2可以通过broadcast扩充成相同的shape进行相乘。 该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_MUL_FUSION。 + +输入: + +- x1,int或float类型的张量。 + +- x2,int或float类型的张量。 + +输出: + +- x1和x2每个元素的乘积。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [activationType](#activationtype) | enum [ActivationType](_n_n_rt.md#activationtype)
激活函数,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。  | + + +## 类成员变量说明 + + +### activationType + + +``` +enum ActivationType MulFusion::activationType +``` +**描述:** +激活函数,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_n_n_rt.md b/zh-cn/device-dev/reference/hdi-apis/_n_n_rt.md new file mode 100644 index 0000000000000000000000000000000000000000..92e23f3790e74806f96e4106cd9c71b736f88198 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_n_n_rt.md @@ -0,0 +1,592 @@ +# NNRt + + +## 概述 + +NNRt(Neural Network Runtime,神经网络运行时)是面向AI领域的跨芯片推理计算运行时,作为中间桥梁连通上层AI推理框架和底层加速芯片,实现AI模型的跨芯片推理计算。提供统一AI芯片驱动接口,实现AI芯片驱动接入OpenHarmony。 + +**Since:** + +3.2 + +**Version:** + +2.0 + + +## 汇总 + + +### 文件 + + | 名称 | 描述 | +| -------- | -------- | +| [INnrtDevice.idl](_i_nnrt_device_8idl.md) | 该文件定义芯片设备相关的接口。 | +| [IPreparedModel.idl](_i_prepared_model_8idl.md) | 该文件定义了AI模型推理、获取模型输入tensor维度范围、导出编译后模型等接口。 | +| [ModelTypes.idl](_model_types_8idl.md) | 该文件定义AI模型相关的结构体。 | +| [NnrtTypes.idl](_nnrt_types_8idl.md) | 该文件定义了HDI接口中用到的类型。 | +| [NodeAttrTypes.idl](_node_attr_types_8idl.md) | 该文件定义AI模型算子的参数和功能。 | + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [INnrtDevice](interface_i_nnrt_device.md) | interface
定义了与设备相关的接口,实现设备管理和模型编译等操作。 | +| [IPreparedModel](interface_i_prepared_model.md) | interface
定义模型编译后的对象,包含编译后模型导出、模型推理接口。 | +| [Tensor](_tensor.md) | struct
张量结构体。 | +| [Node](_node.md) | struct
算子节点结构体。 | +| [SubGraph](_sub_graph.md) | struct
子图结构体。 | +| [Model](_model.md) | struct
模型结构体。 | +| [SharedBuffer](_shared_buffer.md) | struct
共享内存数据的结构体。 | +| [ModelConfig](_model_config.md) | struct
定义编译模型需要的参数配置。 | +| [QuantParam](_quant_param.md) | struct
量化参数结构体。 | +| [IOTensor](_i_o_tensor.md) | struct
AI模型的输入输出张量。 | +| [Activation](_activation.md) | struct
激活类型的算子,所有的激活函数都属于该算子,具体的激活函数类型一句参数来确定。 | +| [AddFusion](_add_fusion.md) | struct
输入Tensor逐元素相加, 输出x和y的和,数据形状与输入broadcast之后一样,数据类型与较高精度的输入精度一致。 | +| [ArgMaxFusion](_arg_max_fusion.md) | struct
返回跨轴的tensor前K个索引或者是数值。 | +| [AvgPoolFusion](_avg_pool_fusion.md) | struct
在输入tensor上应用 2D 平均池化。支持int8量化输入。 | +| [BatchToSpaceND](_batch_to_space_n_d.md) | struct
将一个4维tensor的batch维度按block_shape切分成小块,并将这些小块拼接到空间维度。 | +| [BiasAdd](_bias_add.md) | struct
对给出的输入张量上的各个维度方向上的数据进行偏置。 | +| [Cast](_cast.md) | struct
根据输出张量的类型对张量数据类型进行转换。 | +| [Concat](_concat.md) | struct
在指定轴上连接张量,将输入张量按给定的轴连接起来。 | +| [Conv2DFusion](_conv2_d_fusion.md) | struct
对将4维的tensor执行带有偏置的二维卷积运算。 | +| [Conv2dTransposeFusion](_conv2d_transpose_fusion.md) | struct
对一个4维的tensor执行带有偏置的二维反卷积。 | +| [DivFusion](_div_fusion.md) | struct
将两个tensor执行除法运算。 | +| [Eltwise](_eltwise.md) | struct
元素级别操作的算子。 | +| [ExpandDims](_expand_dims.md) | struct
在给定轴上为tensor添加一个额外的维度。 | +| [Fill](_fill.md) | struct
根据指定的维度,创建由一个标量填充的tensor。 | +| [FullConnection](_full_connection.md) | struct
对输入数据做全连接。 | +| [FusedBatchNorm](_fused_batch_norm.md) | struct
对一个tensor进行批标准化的运算。 | +| [Gather](_gather.md) | struct
根据指定的索引和轴返回输入tensor的切片。 | +| [LayerNormFusion](_layer_norm_fusion.md) | struct
对一个tensor从某一axis开始做层归一化。 | +| [LessEqual](_less_equal.md) | struct
对输入x1和x2,计算每对元素的x1<=x2的结果。 | +| [MatMulFusion](_mat_mul_fusion.md) | struct
对输入x1和x2,计算x1和x2的内积。 | +| [Maximum](_maximum.md) | struct
对输入x1和x2,计算x1和x2对应元素最大值,x1和x2的输入遵守隐式类型转换规则,使数据类型一致。 | +| [MaxPoolFusion](_max_pool_fusion.md) | struct
对输入x,计算 2D 最大值池化。 | +| [MulFusion](_mul_fusion.md) | struct
对输入x1和x2,将x1和x2相同的位置的元素相乘得到output。 | +| [OneHot](_one_hot.md) | struct
根据indices指定的位置,生成一个由one-hot向量构成的tensor。 | +| [PadFusion](_pad_fusion.md) | struct
在x指定维度的数据前后,添加指定数值进行增广。 | +| [PowFusion](_pow_fusion.md) | struct
求x的y次幂,输入必须是两个tensor或一个tensor和一个标量。 | +| [PReLUFusion](_p_re_l_u_fusion.md) | struct
计算x和weight的PReLU激活值。 | +| [QuantDTypeCast](_quant_d_type_cast.md) | struct
数据类型转换。 | +| [ReduceFusion](_reduce_fusion.md) | struct
减小x张量的维度。 | +| [Reshape](_reshape.md) | struct
根据inputShape调整input的形状。 | +| [Resize](_resize.md) | struct
按给定的参数对输入的张量进行变形。 | +| [Rsqrt](_rsqrt.md) | struct
求x的平方根的倒数。 | +| [ScaleFusion](_scale_fusion.md) | struct
给定一个tensor,计算其缩放后的值。 | +| [Shape](_shape.md) | struct
输出输入tensor的形状。 | +| [SliceFusion](_slice_fusion.md) | struct
在x各维度,在axes维度中,以begin为起点,截取size长度的切片。 | +| [Softmax](_softmax.md) | struct
给定一个tensor,计算其softmax结果。 | +| [SpaceToBatchND](_space_to_batch_n_d.md) | struct
将4维张量在空间维度上进行切分成多个小块,然后在batch维度上拼接这些小块。 | +| [Split](_split.md) | struct
算子沿 axis 维度将x拆分成多个张量,张量数量由outputNum指定。 | +| [Sqrt](_sqrt.md) | struct
给定一个tensor,计算其平方根。 | +| [SquaredDifference](_squared_difference.md) | struct
计算两个输入的差值并返回差值的平方。SquaredDifference算子支持tensor和tensor相减。 | +| [Squeeze](_squeeze.md) | struct
去除axis中,长度为1的维度。支持int8量化输入。 | +| [Stack](_stack.md) | struct
将一组tensor沿axis维度进行堆叠,堆叠前每个tensor的维数为n,则堆叠后output维数为n+1。 | +| [StridedSlice](_strided_slice.md) | struct
根据步长和索引对输入张量进行切片提取。 | +| [SubFusion](_sub_fusion.md) | struct
计算两个输入的差值。 | +| [TileFusion](_tile_fusion.md) | struct
以multiples指定的次数拷贝输入张量。 | +| [TopKFusion](_top_k_fusion.md) | struct
查找沿axis轴的前K个最大值和对应索引。 | +| [Transpose](_transpose.md) | struct
根据perm对x进行数据重排。 | +| [Unsqueeze](_unsqueeze.md) | struct
根据输入axis的值。增加一个维度。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [DeviceType](#devicetype) : int { OTHER , CPU , GPU , ACCELERATOR } | AI计算芯片的类型。 | +| [DeviceStatus](#devicestatus) : int { AVAILABLE , BUSY , OFFLINE , UNKNOWN } | 用于AI计算芯片的状态。 | +| [PerformanceMode](#performancemode) : int {PERFORMANCE_NONE , PERFORMANCE_LOW , PERFORMANCE_MEDIUM , PERFORMANCE_HIGH ,PERFORMANCE_EXTREME
} | 芯片执行AI计算的性能模式。 | +| [Priority](#priority) : int { PRIORITY_NONE , PRIORITY_LOW , PRIORITY_MEDIUM , PRIORITY_HIGH } | AI计算任务的优先级。 | +| [Format](#format) : byte { FORMAT_NONE = -1 , FORMAT_NCHW = 0 , FORMAT_NHWC = 1 } | 算子数据排布。需要配合[Tensor](_tensor.md)使用。 | +| [DataType](#datatype) : byte {
DATA_TYPE_UNKNOWN = 0 , DATA_TYPE_BOOL = 30 , DATA_TYPE_INT8 = 32 , DATA_TYPE_INT16 = 33 , DATA_TYPE_INT32 = 34 , DATA_TYPE_INT64 = 35 , DATA_TYPE_UINT8 = 37 , DATA_TYPE_UINT16 = 38 , DATA_TYPE_UINT32 = 39 , DATA_TYPE_UINT64 = 40 , DATA_TYPE_FLOAT16 = 42 , DATA_TYPE_FLOAT32 = 43 ,DATA_TYPE_FLOAT64 = 44} | 张量的数据类型。需要配合[Tensor](_tensor.md)使用。 | +| [QuantType](#quanttype) : byte { QUANT_TYPE_NONE , QUANT_TYPE_ALL } | 量化类型。需要配合[Node](_node.md)使用。 | +| [NodeType](#nodetype) : unsigned int {
NODE_TYPE_NONE = 0 , NODE_TYPE_ACTIVATION = 2 , NODE_TYPE_ADD_FUSION = 5 , NODE_TYPE_ARGMAX_FUSION = 11 ,
NODE_TYPE_AVGPOOL_FUSION = 17 , NODE_TYPE_BATCH_TO_SPACE_ND = 22 , NODE_TYPE_BIAS_ADD = 23 , NODE_TYPE_CAST = 28 ,
NODE_TYPE_CONCAT = 31 , NODE_TYPE_CONV2D_FUSION = 35 , NODE_TYPE_CONV2D_TRANSPOSE_FUSION = 36 , NODE_TYPE_DIV_FUSION = 47 , NODE_TYPE_ELTWISE = 52 , NODE_TYPE_EXPAND_DIMS = 56 , NODE_TYPE_FILL = 66 , NODE_TYPE_FULL_CONNECTION = 67 ,
NODE_TYPE_FUSED_BATCH_NORM = 68 , NODE_TYPE_GATHER = 69 , NODE_TYPE_LAYER_NORM_FUSION = 75 , NODE_TYPE_LESS_EQUAL = 78 ,
NODE_TYPE_MATMUL_FUSION = 89 , NODE_TYPE_MAXIMUM = 90 , NODE_TYPE_MAX_POOL_FUSION = 92 , NODE_TYPE_MUL_FUSION = 99 ,
NODE_TYPE_ONE_HOT = 105 , NODE_TYPE_PAD_FUSION = 107 , NODE_TYPE_POW_FUSION = 110 , NODE_TYPE_PRELU_FUSION = 112 ,
NODE_TYPE_QUANT_DTYPE_CAST = 113 , NODE_TYPE_REDUCE_FUSION = 118 , NODE_TYPE_RESHAPE = 119 , NODE_TYPE_RESIZE = 120 ,
NODE_TYPE_RSQRT = 126 , NODE_TYPE_SCALE_FUSION = 127 , NODE_TYPE_SHAPE = 130 , NODE_TYPE_SLICE_FUSION = 135 ,
NODE_TYPE_SOFTMAX = 138 , NODE_TYPE_SPACE_TO_BATCH_ND = 141 , NODE_TYPE_SPLIT = 145 , NODE_TYPE_SQRT = 146 ,
NODE_TYPE_SQUEEZE = 147 , NODE_TYPE_SQUARED_DIFFERENCE = 149 , NODE_TYPE_STACK = 150 , NODE_TYPE_STRIDED_SLICE = 151 ,
NODE_TYPE_SUB_FUSION = 152 , NODE_TYPE_TILE_FUSION = 160 , NODE_TYPE_TOPK_FUSION = 161 , NODE_TYPE_TRANSPOSE = 162 ,
NODE_TYPE_UNSQUEEZE = 165
} | 算子类型。 | +| [ResizeMethod](#resizemethod) : byte { RESIZE_METHOD_UNKNOWN = -1 , RESIZE_METHOD_LINEAR = 0 , RESIZE_METHOD_NEAREST = 1 , RESIZE_METHOD_CUBIC = 2 } | 调整尺寸的方法。需要配合[Resize](_resize.md)算子使用。 | +| [CoordinateTransformMode](#coordinatetransformmode) : byte { COORDINATE_TRANSFORM_MODE_ASYMMETRIC = 0 , COORDINATE_TRANSFORM_MODE_ALIGN_CORNERS = 1 , COORDINATE_TRANSFORM_MODE_HALF_PIXEL = 2 } | 坐标变换模式,仅[Resize](_resize.md)算子使用这些枚举。 | +| [NearestMode](#nearestmode) : byte {
NEAREST_MODE_NORMAL = 0 , NEAREST_MODE_ROUND_HALF_DOWN = 1 , NEAREST_MODE_ROUND_HALF_UP = 2 , NEAREST_MODE_FLOOR = 3 ,
NEAREST_MODE_CEIL = 4
} | 临近算法类型。需要配合[Resize](_resize.md)算子使用。 | +| [ActivationType](#activationtype) : byte {
ACTIVATION_TYPE_NO_ACTIVATION = 0 , ACTIVATION_TYPE_RELU = 1 , ACTIVATION_TYPE_SIGMOID = 2 , ACTIVATION_TYPE_RELU6 = 3 ,
ACTIVATION_TYPE_ELU = 4 , ACTIVATION_TYPE_LEAKY_RELU = 5 , ACTIVATION_TYPE_ABS = 6 , ACTIVATION_TYPE_RELU1 = 7 ,
ACTIVATION_TYPE_SOFTSIGN = 8 , ACTIVATION_TYPE_SOFTPLUS = 9 , ACTIVATION_TYPE_TANH = 10 , ACTIVATION_TYPE_SELU = 11 ,
ACTIVATION_TYPE_HSWISH = 12 , ACTIVATION_TYPE_HSIGMOID = 13 , ACTIVATION_TYPE_THRESHOLDRELU = 14 , ACTIVATION_TYPE_LINEAR = 15 , ACTIVATION_TYPE_HARD_TANH = 16 , ACTIVATION_TYPE_SIGN = 17 , ACTIVATION_TYPE_SWISH = 18 , ACTIVATION_TYPE_GELU = 19 ,
ACTIVATION_TYPE_UNKNOWN = 20} | 激活函数类型。 | +| [ReduceMode](#reducemode) : byte {
REDUCE_MODE_MEAN = 0 , REDUCE_MODE_MAX = 1 , REDUCE_MODE_MIN = 2 , REDUCE_MODE_PROD = 3 , REDUCE_MODE_SUM = 4 , REDUCE_MODE_SUM_SQUARE = 5 , REDUCE_MODE_ASUM = 6 , REDUCE_MODE_ALL = 7} | 用于维度移除的方法,需要配合[ReduceFusion](_reduce_fusion.md)算子使用。 | +| [EltwiseMode](#eltwisemode) : byte { ELTWISE_MODE_PROD = 0 , ELTWISE_MODE_SUM = 1 , ELTWISE_MODE_MAXIMUM = 2 , ELTWISE_MODE_UNKNOWN = 3 } | 元素级别运算支持的计算类型,需要配合[Eltwise](_eltwise.md)算子使用。 | +| [PadMode](#padmode) : byte { PAD_MODE_PAD = 0 , PAD_MODE_SAME = 1 , PAD_MODE_VALID = 2 } | 填充类型,需要配合[AvgPoolFusion](_avg_pool_fusion.md),[AvgPoolFusion](_avg_pool_fusion.md),[Conv2DFusion](_conv2_d_fusion.md),[MaxPoolFusion](_max_pool_fusion.md)使用。 | +| [RoundMode](#roundmode) : byte { ROUND_MODE_FLOOR = 0 , ROUND_MODE_CEIL = 1 } | 小数取整算法,需要配合[AvgPoolFusion](_avg_pool_fusion.md)算子使用。 | +| [PaddingMode](#paddingmode) : byte { PADDING_MODE_CONSTANT = 0 , PADDING_MODE_REFLECT = 1 , PADDING_MODE_SYMMETRIC = 2 , PADDING_MODE_RESERVED = 3 } | 填充类型,需要配合[PadFusion](_pad_fusion.md)算子使用。 | +| [NNRT_ReturnCode](#nnrt_returncode) : int {
NNRT_SUCCESS = 0 , NNRT_FAILED = 1 , NNRT_NULL_PTR = 2 , NNRT_INVALID_PARAMETER = 3 ,
NNRT_MEMORY_ERROR = 4 , NNRT_OUT_OF_MEMORY = 5 , NNRT_OPERATION_FORBIDDEN = 6 , NNRT_INVALID_FILE = 7 ,
NNRT_INVALID_PATH = 8 , NNRT_INSUFFICIENT_BUFFER = 9 , NNRT_NO_CHANGE = 10 , NNRT_NOT_SUPPORT = 11 ,
NNRT_SERVICE_ERROR = 12 , NNRT_DEVICE_ERROR = 13 , NNRT_DEVICE_BUSY = 14 , NNRT_CANCELLED = 15 ,
NNRT_PERMISSION_DENIED = 16 , NNRT_TIME_OUT = 17 , NNRT_INVALID_TENSOR = 18 , NNRT_INVALID_NODE = 19 ,
NNRT_INVALID_INPUT = 20 , NNRT_INVALID_OUTPUT = 21 , NNRT_INVALID_DATATYPE = 22 , NNRT_INVALID_FORMAT = 23 ,
NNRT_INVALID_TENSOR_NAME = 24 , NNRT_INVALID_SHAPE = 25 , NNRT_OUT_OF_DIMENTION_RANGES = 26 , NNRT_INVALID_BUFFER = 27 ,
NNRT_INVALID_BUFFER_SIZE = 28 , NNRT_INVALID_PERFORMANCE_MODE = 29 , NNRT_INVALID_PRIORITY = 30 , NNRT_INVALID_MODEL = 31 ,
NNRT_INVALID_MODEL_CACHE = 32 , NNRT_UNSUPPORTED_OP = 33
} | NNRt定义的专用错误码,为HDI接口的返回值。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.nnrt.v2_0 | NNRt模块的包路径。 | + + +## 枚举类型说明 + + +### ActivationType + + +``` +enum ActivationType : byte +``` + +**描述:** + +激活函数类型。 + +激活函数使得神经网络模型具有区分非线性函数的能力,这也让神经网络模型可以被应用于众多非线性模型中。[NodeAttrTypes.idl](_node_attr_types_8idl.md)文件中拥有ActivationType类型的参数的算子会在运行完成算子的运算之后执行相对应的激活函数。 + + | 枚举值 | 描述 | +| -------- | -------- | +| ACTIVATION_TYPE_NO_ACTIVATION | 无激活函数。 | +| ACTIVATION_TYPE_RELU | ReLU激活函数。逐元素求$ max(x_i, 0) $,负数输出值会被修改为0,正数输出不受影响。
$ \text{ReLU}(x_i) = (x_i)^+ = \max(x_i, 0),$
其中$ x_i $是输入元素。 | +| ACTIVATION_TYPE_SIGMOID | Sigmoid激活函数。按元素计算Sigmoid激活函数。Sigmoid函数定义为:
$ \text{Sigmoid}(x_i) = \frac{1}{1 + \exp(-x_i)} $
其中$ x_i $是输入的元素。 | +| ACTIVATION_TYPE_RELU6 | ReLU6激活函数。ReLU6类似于ReLU,不同之处在于设置了上限,其上限为6,如果输入大于6,输出会被限制为6。ReLU6函数定义为:
$ \text{ReLU6}(x_i) = \min(\max(0, x_i), 6) $
其中$ x_i $是输入的元素。 | +| ACTIVATION_TYPE_ELU | 指数线性单元激活函数(Exponential Linear Unit activation function,ELU)激活函数。对输入的每个元素计算ELU。ELU函数定义为:
$ ELU(x_{i}) = \begin{cases} x_i, &\text{if } x_i \geq 0; \cr \alpha \* (\exp(x_i) - 1), &\text{otherwise.} \end{cases} $
其中,$ x_i $表示输入的元素,$ \alpha $表示alpha参数,该参数通过[Activation](_activation.md)进行设置。 | +| ACTIVATION_TYPE_LEAKY_RELU | LeakyReLU激活函数。 LeakyReLU函数定义为:
$ \text{LeakyReLU}(x_i) = \begin{cases} x_i, &\text{if } x_i \geq 0; \cr {\alpha} \* x_i, &\text{otherwise.} \end{cases}$
其中,$ x_i $表示输入的元素,$ \alpha $表示alpha参数,该参数通过[Activation](_activation.md)进行设置。 | +| ACTIVATION_TYPE_ABS | 计算绝对值的激活函数。函数定义为:
$ \text{abs}(x_i) = \|x_i\| $
其中,$ x_i $表示输入的元素。 | +| ACTIVATION_TYPE_RELU1 | ReLU1激活函数。ReLU1函数定义为:
$ \text{ReLU1}(x_i)= \min(\max(0, x_i), 1) $
其中,$ x_i $表示输入的元素。 | +| ACTIVATION_TYPE_SOFTSIGN | SoftSign激活函数。SoftSign函数定义如下:
$ \text{SoftSign}(x_i) = \frac{x_i}{1 + \|x_i\|} $
其中,$ x_i $表示输入的元素。 | +| ACTIVATION_TYPE_SOFTPLUS | Softplus激活函数。Softplus为ReLU函数的平滑近似。可对一组数值使用来确保转换后输出结果均为正值。Softplus函数定义如下:
$ \text{Softplus}(x_i) = \log(1 + \exp(x_i)) $
其中,$ x_i $表示输入的元素。 | +| ACTIVATION_TYPE_TANH | Tanh激活函数。Tanh函数定义如下:
$ tanh(x) = \frac{\exp(x_i) - \exp(-x_i)}{\exp(x_i) + \exp(-x_i)} = \frac{\exp(2x_i) - 1}{\exp(2x_i) + 1} $
其中,$ x_i $表示输入的元素。 | +| ACTIVATION_TYPE_SELU | SELU(Scaled exponential Linear Unit)激活函数。SELU函数定义如下:
$ SELU(x_{i}) = scale \* \begin{cases} x_{i}, &\text{if } x_{i} \geq 0; \cr \text{alpha} \* (\exp(x_i) - 1), &\text{otherwise.} \end{cases} $
其中,$ x_i $是输入元素,$ \alpha $和$ scale $是预定义的常量( $\alpha=1.67326324$,$scale=1.05070098$)。 | +| ACTIVATION_TYPE_HSWISH | Hard Swish激活函数。
$ \text{Hardswish}(x_{i}) = x_{i} \* \frac{ReLU6(x_{i} + 3)}{6} $
其中,$ x_i $表示输入的元素。 | +| ACTIVATION_TYPE_HSIGMOID | Hard Sigmoid激活函数。 Hard Sigmoid函数定义如下:
$ \text{Hardsigmoid}(x_{i}) = max(0, min(1, \frac{x_{i} + 3}{6})) $
其中,$ x_i $表示输入的元素。 | +| ACTIVATION_TYPE_THRESHOLDRELU | ThresholdedReLU激活函数。类似ReLU激活函数,min数定义如下:
$ \text{ThresholdedReLU}(x_i) = \min(\max(0, x_i), t) $
其中,$ x_i $是输入元素,$ t $是最大值。 | +| ACTIVATION_TYPE_LINEAR | Linear激活函数。Linear函数定义如下:
$ \text{Linear}(x_i) = x_i $
其中,$ x_i $表示输入的元素。 | +| ACTIVATION_TYPE_HARD_TANH | HardTanh激活函数。HardTanh函数定义如下:
$ \text{HardTanh}(x_i) = \begin{cases} \text{max_val} & \text{ if } x_i > \text{ max_val } \\ \text{min_val} & \text{ if } x_i < \text{ min_val } \\ x_i & \text{ otherwise } \\ \end{cases} $
其中,$ x_i $是输入,$ max\_val $是最大值,$ min\_val $是最小值,这两个参数通过[Activation](_activation.md)进行设置。 | +| ACTIVATION_TYPE_SIGN | Sign激活函数。Sign函数定义如下:
$ Sign(x_i) = \begin{cases} -1, &if\ x_i < 0 \cr 0, &if\ x_i = 0 \cr 1, &if\ x_i > 0\end{cases} $
其中,$ x_i $表示输入的元素。 | +| ACTIVATION_TYPE_SWISH | Swish激活函数。Swish激活函数定义如下:
$ \text{Swish}(x_i) = x_i \* Sigmoid(x_i) $
其中,$ x_i $表示输入的元素。 | +| ACTIVATION_TYPE_GELU | GELU(Gaussian error linear unit activation function)高斯误差线性单元激活函数。GELU函数定义如下:
$ GELU(x_i) = x_i\*P(X < x_i) $
其中,$ x_i $是输入元素,$ P $是标准高斯分布的累积分布函数。需要通过[Activation](_activation.md)的approximate参数指定是否使用近似。 | +| ACTIVATION_TYPE_UNKNOWN | 未知 | + + +### CoordinateTransformMode + + +``` +enum CoordinateTransformMode : byte +``` + +**描述:** + +坐标变换模式,仅[Resize](_resize.md)算子使用这些枚举。 + +以变换 Width 为例, 记 new_i 为resize之后的Tenosr沿X轴的第i个坐标;记 old_i 为输入Tensor沿X的轴的对应坐标;记 newWidth 是resize之后的Tensor沿着X的轴的长度;记 oldWidth 是输入Tenosr沿X的轴的长度。 可以通过下面的公式计算出 old_i : + +- COORDINATE_TRANSFORM_MODE_ASYMMETRIC: + $ old_i = newWidth != 0 ? new_i \* oldWidth / newWidth : 0 $ + +- COORDINATE_TRANSFORM_MODE_ALIGN_CORNERS: + $ old_i = newWidth != 1 ? new_i \* (oldWidth - 1) / (newWidth - 1) $ + +- COORDINATE_TRANSFORM_MODE_HALF_PIXEL: + $ old_i = newWidth > 1 ? (new_x + 0.5) \* oldWidth / newWidth - 0.5 : 0 $ + + | 枚举值 | 描述 | +| -------- | -------- | +| COORDINATE_TRANSFORM_MODE_ASYMMETRIC | 不进行对齐,直接按照比例缩放 | +| COORDINATE_TRANSFORM_MODE_ALIGN_CORNERS | 对齐图像的4个角 | +| COORDINATE_TRANSFORM_MODE_HALF_PIXEL | 对齐像素点中心 | + + +### DataType + + +``` +enum DataType : byte +``` + +**描述:** + +张量的数据类型。需要配合[Tensor](_tensor.md)使用。 + + | 枚举值 | 描述 | +| -------- | -------- | +| DATA_TYPE_UNKNOWN | 数据类型未知 | +| DATA_TYPE_BOOL | 数据类型是BOOL | +| DATA_TYPE_INT8 | 数据类型是INT8 | +| DATA_TYPE_INT16 | 数据类型是INT16 | +| DATA_TYPE_INT32 | 数据类型是INT32 | +| DATA_TYPE_INT64 | 数据类型是INT64 | +| DATA_TYPE_UINT8 | 数据类型是UINT8 | +| DATA_TYPE_UINT16 | 数据类型是UINT16 | +| DATA_TYPE_UINT32 | 数据类型是UINT32 | +| DATA_TYPE_UINT64 | 数据类型是UINT64 | +| DATA_TYPE_FLOAT16 | 数据类型是FLOAT16 | +| DATA_TYPE_FLOAT32 | 数据类型是FLOAT32 | +| DATA_TYPE_FLOAT64 | 数据类型是FLOAT64 | + + +### DeviceStatus + + +``` +enum DeviceStatus : int +``` + +**描述:** + +用于AI计算芯片的状态。 + + | 枚举值 | 描述 | +| -------- | -------- | +| AVAILABLE | 芯片当前处于可用状态 | +| BUSY | 芯片当前处于忙碌状态,可能无法及时响应计算任务 | +| OFFLINE | 芯片当前处于下线状态,无法响应计算任务 | +| UNKNOWN | 芯片当前处于未知状态 | + + +### DeviceType + + +``` +enum DeviceType : int +``` + +**描述:** + +AI计算芯片的类型。 + + | 枚举值 | 描述 | +| -------- | -------- | +| OTHER | 不属于以下类型的芯片 | +| CPU | CPU芯片 | +| GPU | GPU芯片 | +| ACCELERATOR | AI专用加速芯片,比如NPU、DSP | + + +### EltwiseMode + + +``` +enum EltwiseMode : byte +``` + +**描述:** + +元素级别运算支持的计算类型,需要配合[Eltwise](_eltwise.md)算子使用。 + + | 枚举值 | 描述 | +| -------- | -------- | +| ELTWISE_MODE_PROD | 两个tensor对应元素乘积。 | +| ELTWISE_MODE_SUM | 两个tensor对应元素之差。 | +| ELTWISE_MODE_MAXIMUM | 两个tensor对应元素的最大值。 | +| ELTWISE_MODE_UNKNOWN | 未知。 | + + +### Format + + +``` +enum Format : byte +``` + +**描述:** + +算子数据排布。需要配合[Tensor](_tensor.md)使用。 + + | 枚举值 | 描述 | +| -------- | -------- | +| FORMAT_NONE | 用于数据排列,作为Format初始的值。 | +| FORMAT_NCHW | 数据排列为NCHW。 | +| FORMAT_NHWC | 数据排列为NHWC。 | + + +### NearestMode + + +``` +enum NearestMode : byte +``` + +**描述:** + +临近算法类型。需要配合[Resize](_resize.md)算子使用。 + + | 枚举值 | 描述 | +| -------- | -------- | +| NEAREST_MODE_NORMAL | 四舍五入取整 | +| NEAREST_MODE_ROUND_HALF_DOWN | 向负无穷取整,例如23.5取整为23,−23.5取整为−24 | +| NEAREST_MODE_ROUND_HALF_UP | 向正无穷取整,例如23.5取整为24,−23.5取整为−23 | +| NEAREST_MODE_FLOOR | 向下取临近的整数,例如23.5取整为23,−23.5取整为−24 | +| NEAREST_MODE_CEIL | 向上取临近的整数整,例如23.5取整为24,−23.5取整为−23 | + + +### NNRT_ReturnCode + + +``` +enum NNRT_ReturnCode : int +``` + +**描述:** + +NNRt定义的专用错误码,为HDI接口的返回值。 + + | 枚举值 | 描述 | +| -------- | -------- | +| NNRT_SUCCESS | 成功 | +| NNRT_FAILED | 失败 | +| NNRT_NULL_PTR | 空指针 | +| NNRT_INVALID_PARAMETER | 非法参数 | +| NNRT_MEMORY_ERROR | 内存错误 | +| NNRT_OUT_OF_MEMORY | 内存不足 | +| NNRT_OPERATION_FORBIDDEN | 禁止的操作 | +| NNRT_INVALID_FILE | 非法文件 | +| NNRT_INVALID_PATH | 非法路径 | +| NNRT_INSUFFICIENT_BUFFER | 缓存不足 | +| NNRT_NO_CHANGE | 无变化 | +| NNRT_NOT_SUPPORT | 不支持 | +| NNRT_SERVICE_ERROR | 服务错误 | +| NNRT_DEVICE_ERROR | 设备错误 | +| NNRT_DEVICE_BUSY | 设备忙碌 | +| NNRT_CANCELLED | 操作取消 | +| NNRT_PERMISSION_DENIED | 拒绝访问 | +| NNRT_TIME_OUT | 超时 | +| NNRT_INVALID_TENSOR | 非法tensor | +| NNRT_INVALID_NODE | 非法节点 | +| NNRT_INVALID_INPUT | 非法输入 | +| NNRT_INVALID_OUTPUT | 非法输出 | +| NNRT_INVALID_DATATYPE | 非法数据类型 | +| NNRT_INVALID_FORMAT | 非法数据布局 | +| NNRT_INVALID_TENSOR_NAME | 非法tensor名称 | +| NNRT_INVALID_SHAPE | 非法shape | +| NNRT_OUT_OF_DIMENTION_RANGES | 超出维度范围 | +| NNRT_INVALID_BUFFER | 非法缓存 | +| NNRT_INVALID_BUFFER_SIZE | 非法缓存大小 | +| NNRT_INVALID_PERFORMANCE_MODE | 非法性能模式 | +| NNRT_INVALID_PRIORITY | 非法优先级 | +| NNRT_INVALID_MODEL | 非法模型 | +| NNRT_INVALID_MODEL_CACHE | 非法模型缓存 | +| NNRT_UNSUPPORTED_OP | 算子不支持 | + + +### NodeType + + +``` +enum NodeType : unsigned int +``` + +**描述:** + +算子类型。 + + | 枚举值 | 描述 | +| -------- | -------- | +| NODE_TYPE_NONE | 算子类型为NONE | +| NODE_TYPE_ACTIVATION | 激活函数类型 | +| NODE_TYPE_ADD_FUSION | ADD算子 | +| NODE_TYPE_ARGMAX_FUSION | ArgMax算子 | +| NODE_TYPE_AVGPOOL_FUSION | AVGPOOL算子 | +| NODE_TYPE_BATCH_TO_SPACE_ND | BatchToSpaceND算子 | +| NODE_TYPE_BIAS_ADD | BiasAdd算子 | +| NODE_TYPE_CAST | Cast算子 | +| NODE_TYPE_CONCAT | Concat算子 | +| NODE_TYPE_CONV2D_FUSION | Conv2D算子,包含了普通卷积、可分离卷积和分组卷积 | +| NODE_TYPE_CONV2D_TRANSPOSE_FUSION | 二维反卷积算子 | +| NODE_TYPE_DIV_FUSION | Div算子 | +| NODE_TYPE_ELTWISE | 元素级别算子 | +| NODE_TYPE_EXPAND_DIMS | ExpandDims张算子 | +| NODE_TYPE_FILL | Fill算子 | +| NODE_TYPE_FULL_CONNECTION | FullConnection算子 | +| NODE_TYPE_FUSED_BATCH_NORM | BatchNorm算子 | +| NODE_TYPE_GATHER | Gather算子 | +| NODE_TYPE_LAYER_NORM_FUSION | LayerNorm算子 | +| NODE_TYPE_LESS_EQUAL | LessEqual算子 | +| NODE_TYPE_MATMUL_FUSION | MatMul算子 | +| NODE_TYPE_MAXIMUM | Maximum算子 | +| NODE_TYPE_MAX_POOL_FUSION | MaxPool算子 | +| NODE_TYPE_MUL_FUSION | Mul算子 | +| NODE_TYPE_ONE_HOT | OneHot算子 | +| NODE_TYPE_PAD_FUSION | Pad算子 | +| NODE_TYPE_POW_FUSION | Pow算子 | +| NODE_TYPE_PRELU_FUSION | PReLU算子 | +| NODE_TYPE_QUANT_DTYPE_CAST | QuantDTypeCast算子 | +| NODE_TYPE_REDUCE_FUSION | Reduce算子 | +| NODE_TYPE_RESHAPE | Reshape算子 | +| NODE_TYPE_RESIZE | Resize算子 | +| NODE_TYPE_RSQRT | Rsqrt算子 | +| NODE_TYPE_SCALE_FUSION | Scale算子 | +| NODE_TYPE_SHAPE | Shape算子 | +| NODE_TYPE_SLICE_FUSION | Slice算子 | +| NODE_TYPE_SOFTMAX | Softmax算子 | +| NODE_TYPE_SPACE_TO_BATCH_ND | SpaceToBatchND算子 | +| NODE_TYPE_SPLIT | Split算子 | +| NODE_TYPE_SQRT | Sqrt算子 | +| NODE_TYPE_SQUEEZE | SquaredDifference算子 | +| NODE_TYPE_SQUARED_DIFFERENCE | Squeeze算子 | +| NODE_TYPE_STACK | Stack算子 | +| NODE_TYPE_STRIDED_SLICE | StridedSlice算子 | +| NODE_TYPE_SUB_FUSION | Sub算子 | +| NODE_TYPE_TILE_FUSION | Tile算子 | +| NODE_TYPE_TOPK_FUSION | TopK算子 | +| NODE_TYPE_TRANSPOSE | Transpose算子 | +| NODE_TYPE_UNSQUEEZE | Unsqueeze算子 | + + +### PaddingMode + + +``` +enum PaddingMode : byte +``` + +**描述:** + +填充类型,需要配合[PadFusion](_pad_fusion.md)算子使用。 + +当输入的张量x= $[[1,2,3],[4,5,6],[7,8,9]]$、paddings= $[[2,2],[2,2]]$时效果如下: + +- paddingMode==PADDING_MODE_CONSTANT并且constantValue = 0时输出为: + $[[0. 0. 0. 0. 0. 0. 0.],\\ [0. 0. 0. 0. 0. 0. 0.],\\ [0. 0. 1. 2. 3. 0. 0.],\\ [0. 0. 4. 5. 6. 0. 0.],\\ [0. 0. 7. 8. 9. 0. 0.],\\ [0. 0. 0. 0. 0. 0. 0.],\\ [0. 0. 0. 0. 0. 0. 0.]]\\ $ + +- paddingMode==PADDING_MODE_REFLECT输出为: + $[[9. 8. 7. 8. 9. 8. 7.],\\ [6. 5. 4. 5. 6. 5. 4.],\\ [3. 2. 1. 2. 3. 2. 1.],\\ [6. 5. 4. 5. 6. 5. 4.],\\ [9. 8. 7. 8. 9. 8. 7.],\\ [6. 5. 4. 5. 6. 5. 4.],\\ [3. 2. 1. 2. 3. 2. 1.]]\\ $ + +- paddingMode==PADDING_MODE_SYMMETRIC输出为: + $[[5. 4. 4. 5. 6. 6. 5.],\\ [2. 1. 1. 2. 3. 3. 2.],\\ [2. 1. 1. 2. 3. 3. 2.],\\ [5. 4. 4. 5. 6. 6. 5.],\\ [8. 7. 7. 8. 9. 9. 8.],\\ [8. 7. 7. 8. 9. 9. 8.],\\ [5. 4. 4. 5. 6. 6. 5.]]\\ $ + + | 枚举值 | 描述 | +| -------- | -------- | +| PADDING_MODE_CONSTANT | 使用常量填充,默认值为0。 | +| PADDING_MODE_REFLECT | 以数据区的便捷为轴,使填充区和数据区的数据以该轴保持对称。 | +| PADDING_MODE_SYMMETRIC | 此填充方法类似于 PADDING_MODE_REFLECT,它以待填充区和数据区的交界为轴,使待填充区和数据区的数据以该轴保持对称。 | +| PADDING_MODE_RESERVED | 预留,暂未使用。 | + + +### PadMode + + +``` +enum PadMode : byte +``` + +**描述:** + +填充类型,需要配合[AvgPoolFusion](_avg_pool_fusion.md),[AvgPoolFusion](_avg_pool_fusion.md),[Conv2DFusion](_conv2_d_fusion.md),[MaxPoolFusion](_max_pool_fusion.md)使用。 + + | 枚举值 | 描述 | +| -------- | -------- | +| PAD_MODE_PAD | 在输入的高度和宽度方向上填充0。 若设置该模式,算子的padding参数必须大于等于0。 | +| PAD_MODE_SAME | 输出的高度和宽度分别与输入整除 stride 后的值相同。 若设置该模式,算子的padding参数必须为0。 | +| PAD_MODE_VALID | 在不填充的前提下返回有效计算所得的输出。不满足计算的多余像素会被丢弃。 若设置此模式,则算子的padding参数必须为0。 | + + +### PerformanceMode + + +``` +enum PerformanceMode : int +``` + +**描述:** + +芯片执行AI计算的性能模式。 + + | 枚举值 | 描述 | +| -------- | -------- | +| PERFORMANCE_NONE | 不指定任何性能模式,具体运行模式由芯片定义 | +| PERFORMANCE_LOW | 低性能模式,执行AI计算速度慢,功耗低 | +| PERFORMANCE_MEDIUM | 中性能模式,执行AI计算速度较慢,功耗较低 | +| PERFORMANCE_HIGH | 高性能模式,执行AI计算速度较快,功耗较高 | +| PERFORMANCE_EXTREME | 最高性能模式,执行AI计算速度快,功耗高 | + + +### Priority + + +``` +enum Priority : int +``` + +**描述:** + +AI计算任务的优先级。 + + | 枚举值 | 描述 | +| -------- | -------- | +| PRIORITY_NONE | 不指定任何任务优先级,具体执行策略由芯片定义 | +| PRIORITY_LOW | 低优先级,若有更高优先级的任务,芯片会执行更高优先级的任务 | +| PRIORITY_MEDIUM | 中等优先级,若有更高优先级的任务,芯片会执行更高优先级的任务 | +| PRIORITY_HIGH | 高优先级,高优先级任务最先执行 | + + +### QuantType + + +``` +enum QuantType : byte +``` + +**描述:** + +量化类型。需要配合[Node](_node.md)使用。 + + | 枚举值 | 描述 | +| -------- | -------- | +| QUANT_TYPE_NONE | 不使用量化 | +| QUANT_TYPE_ALL | int8全量化 | + + +### ReduceMode + + +``` +enum ReduceMode : byte +``` + +**描述:** + +用于维度移除的方法,需要配合[ReduceFusion](_reduce_fusion.md)算子使用。 + + | 枚举值 | 描述 | +| -------- | -------- | +| REDUCE_MODE_MEAN | 使用指定维度所有元素的平均值代替该维度的其他元素,以移除该维度。 | +| REDUCE_MODE_MAX | 使用指定维度所有元素的最大值代替该维度的其他元素,以移除该维度。 | +| REDUCE_MODE_MIN | 使用指定维度所有元素的最小值代替该维度的其他元素,以移除该维度。 | +| REDUCE_MODE_PROD | 使用指定维度所有元素的乘积代替该维度的其他元素,以移除该维度。 | +| REDUCE_MODE_SUM | 使用指定维度所有元素的加和代替该维度的其他元素,以移除该维度。 | +| REDUCE_MODE_SUM_SQUARE | 使用指定维度所有元素的平方和替该维度的其他元素,以移除该维度。 | +| REDUCE_MODE_ASUM | 使用指定维度所有元素的绝对值和代替该维度的其他元素,以移除该维度。 | +| REDUCE_MODE_ALL | 使用指定维度所有元素的逻辑与代替该维度的其他元素,以移除该维度。 | + + +### ResizeMethod + + +``` +enum ResizeMethod : byte +``` + +**描述:** + +调整尺寸的方法。需要配合[Resize](_resize.md)算子使用。 + + | 枚举值 | 描述 | +| -------- | -------- | +| RESIZE_METHOD_UNKNOWN | 未知,默认值。 | +| RESIZE_METHOD_LINEAR | 双线性插值。 假设需要计算未知函数f在点$ (x,y) $的值其中$ x_1 < x < x_2, y_1 < y < y_2$,并且已知四个坐标点的值$ Q_{11} = (x_1, y_1), Q_{12} = (x1, y2), Q_{21} = (x_2, y_1),Q_{22} = (x_2, y_2) $,并且$ f(Q_{11}),f(Q_{12}),f(Q_{21}),f(Q_{22}) $表示四个点的数值,则通过如下公式可计算$ f(x,y) $的值:
$ f(x,y_1) = \frac{x_2-x}{x_2-x_1}f(Q_{11})+\frac{x-x_1}{x_2-x_1}f(Q_{21}) $
$ f(x,y_2) = \frac{x_2-x}{x_2-x_1}f(Q_{12})+\frac{x-x_1}{x_2-x_1}f(Q_{22}) $
$ f(x,y) = \frac{y_2-y}{y_2-y_1}f(x,y_1)+\frac{y-y_1}{y_2-y_1}f(x,y_2) $ | +| RESIZE_METHOD_NEAREST | 最近临近插值。假设需要计算未知函数f在点$ (x,y) $的值其中$ x_1 < x <x_2, y_1 < y < y_2 $,并且已知四个坐标点的值$ Q_{11} = (x_1, y_1), Q_{12} = (x1, y2), Q_{21} = (x_2, y_1),Q_{22} = (x_2, y_2) $,则从4个点中选择距离点$ (x,y) $最近的点的数值作为$ f(x,y) $的值。 | +| RESIZE_METHOD_CUBIC | 双三次插值。 双三次插值是取采样点周围16个点的值的加权平均来计算采样点的数值。该参数需要配合[Resize](_resize.md)的cubicCoeff和coordinateTransformMode参数使用。 当coordinateTransformMode==COORDINATE_TRANSFORM_MODE_HALF_PIXEL时,cubicCoeff=-0.5,其他情况cubicCoeff=-0.75。插值函数的权重函数如下:
$ W(x) = \begin{cases} (cubicCoeff+2)\|x\|^3 - (cubicCoeff+3)\|x\|^2 +1 , &\text{if } \|x\| \leq 1; \cr cubicCoeff\|x\|^3 - 5cubicCoeff\|x\|^2 + 8cubicCoeff\|x\| - 4a, &\text{if } 1 \lt \|x\| \leq 2; \cr 0, &\text{otherwise.} \end{cases} $ | + + +### RoundMode + + +``` +enum RoundMode : byte +``` + +**描述:** + +小数取整算法,需要配合[AvgPoolFusion](_avg_pool_fusion.md)算子使用。 + + | 枚举值 | 描述 | +| -------- | -------- | +| ROUND_MODE_FLOOR | 向下取临近的整数,例如23.5取整为23,−23.5取整为−24 | +| ROUND_MODE_CEIL | 向上取临近的整数整,例如23.5取整为24,−23.5取整为−23 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_neighbor_cell.md b/zh-cn/device-dev/reference/hdi-apis/_neighbor_cell.md new file mode 100644 index 0000000000000000000000000000000000000000..a9bb31ba03684b4cf49c787b9f8282d1df0e8dab --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_neighbor_cell.md @@ -0,0 +1,90 @@ +# NeighborCell + + +## 概述 + +定义设备驻留的基站邻区信息的数据结构。 + +**Since:** +4.0 +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [physicalId](#physicalid) | int
邻区ID号  | +| [mcc](#mcc) | unsigned short
移动国家码  | +| [mnc](#mnc) | unsigned short
移动网络码  | +| [rssi](#rssi) | short
信号接收强度  | +| [rat](#rat) | unsigned short
网络制式  | +| [pci](#pci) | unsigned int
物理小区识别码  | + + +## 类成员变量说明 + + +### mcc + + +``` +unsigned short NeighborCell::mcc +``` +**描述:** +移动国家码 + + +### mnc + + +``` +unsigned short NeighborCell::mnc +``` +**描述:** +移动网络码 + + +### pci + + +``` +unsigned int NeighborCell::pci +``` +**描述:** +物理小区识别码 + + +### physicalId + + +``` +int NeighborCell::physicalId +``` +**描述:** +邻区ID号 + + +### rat + + +``` +unsigned short NeighborCell::rat +``` +**描述:** +网络制式 + + +### rssi + + +``` +short NeighborCell::rssi +``` +**描述:** +信号接收强度 diff --git a/zh-cn/device-dev/reference/hdi-apis/_nnrt_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_nnrt_types_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..f272dab8b1fb3e98ddc432d58e884e45dfb97e99 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_nnrt_types_8idl.md @@ -0,0 +1,62 @@ +# NnrtTypes.idl + + +## 概述 + +该文件定义了HDI接口中用到的类型。 + +**Since:** + +3.2 + +**Version:** + +2.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [SharedBuffer](_shared_buffer.md) | struct
共享内存数据的结构体。 | +| [ModelConfig](_model_config.md) | struct
定义编译模型需要的参数配置。 | +| [QuantParam](_quant_param.md) | struct
量化参数结构体。 | +| [IOTensor](_i_o_tensor.md) | struct
AI模型的输入输出张量。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [DeviceType](_n_n_rt.md#devicetype) : int { OTHER , CPU , GPU , ACCELERATOR } | AI计算芯片的类型。 | +| [DeviceStatus](_n_n_rt.md#devicestatus) : int { AVAILABLE , BUSY , OFFLINE , UNKNOWN } | 用于AI计算芯片的状态。 | +| [PerformanceMode](_n_n_rt.md#performancemode) : int {PERFORMANCE_NONE , PERFORMANCE_LOW , PERFORMANCE_MEDIUM , PERFORMANCE_HIGH ,PERFORMANCE_EXTREME
} | 芯片执行AI计算的性能模式。 | +| [Priority](_n_n_rt.md#priority) : int { PRIORITY_NONE , PRIORITY_LOW , PRIORITY_MEDIUM , PRIORITY_HIGH } | AI计算任务的优先级。 | +| [Format](_n_n_rt.md#format) : byte { FORMAT_NONE = -1 , FORMAT_NCHW = 0 , FORMAT_NHWC = 1 } | 算子数据排布。需要配合[Tensor](_tensor.md)使用。 | +| [DataType](_n_n_rt.md#datatype) : byte {
DATA_TYPE_UNKNOWN = 0 , DATA_TYPE_BOOL = 30 , DATA_TYPE_INT8 = 32 , DATA_TYPE_INT16 = 33 , DATA_TYPE_INT32 = 34 , DATA_TYPE_INT64 = 35 , DATA_TYPE_UINT8 = 37 , DATA_TYPE_UINT16 = 38 , DATA_TYPE_UINT32 = 39 , DATA_TYPE_UINT64 = 40 , DATA_TYPE_FLOAT16 = 42 , DATA_TYPE_FLOAT32 = 43 ,DATA_TYPE_FLOAT64 = 44} | 张量的数据类型。需要配合[Tensor](_tensor.md)使用。 | +| [QuantType](_n_n_rt.md#quanttype) : byte { QUANT_TYPE_NONE , QUANT_TYPE_ALL } | 量化类型。需要配合[Node](_node.md)使用。 | +| [NodeType](_n_n_rt.md#nodetype) : unsigned int {
NODE_TYPE_NONE = 0 , NODE_TYPE_ACTIVATION = 2 , NODE_TYPE_ADD_FUSION = 5 , NODE_TYPE_ARGMAX_FUSION = 11 , NODE_TYPE_AVGPOOL_FUSION = 17 , NODE_TYPE_BATCH_TO_SPACE_ND = 22 , NODE_TYPE_BIAS_ADD = 23 , NODE_TYPE_CAST = 28 ,
NODE_TYPE_CONCAT = 31 , NODE_TYPE_CONV2D_FUSION = 35 , NODE_TYPE_CONV2D_TRANSPOSE_FUSION = 36 , NODE_TYPE_DIV_FUSION = 47 , NODE_TYPE_ELTWISE = 52 , NODE_TYPE_EXPAND_DIMS = 56 , NODE_TYPE_FILL = 66 , NODE_TYPE_FULL_CONNECTION = 67 ,
NODE_TYPE_FUSED_BATCH_NORM = 68 , NODE_TYPE_GATHER = 69 , NODE_TYPE_LAYER_NORM_FUSION = 75 , NODE_TYPE_LESS_EQUAL = 78 ,
NODE_TYPE_MATMUL_FUSION = 89 , NODE_TYPE_MAXIMUM = 90 , NODE_TYPE_MAX_POOL_FUSION = 92 , NODE_TYPE_MUL_FUSION = 99 ,
NODE_TYPE_ONE_HOT = 105 , NODE_TYPE_PAD_FUSION = 107 , NODE_TYPE_POW_FUSION = 110 , NODE_TYPE_PRELU_FUSION = 112 ,
NODE_TYPE_QUANT_DTYPE_CAST = 113 , NODE_TYPE_REDUCE_FUSION = 118 , NODE_TYPE_RESHAPE = 119 , NODE_TYPE_RESIZE = 120 ,
NODE_TYPE_RSQRT = 126 , NODE_TYPE_SCALE_FUSION = 127 , NODE_TYPE_SHAPE = 130 , NODE_TYPE_SLICE_FUSION = 135 ,
NODE_TYPE_SOFTMAX = 138 , NODE_TYPE_SPACE_TO_BATCH_ND = 141 , NODE_TYPE_SPLIT = 145 , NODE_TYPE_SQRT = 146 ,
NODE_TYPE_SQUEEZE = 147 , NODE_TYPE_SQUARED_DIFFERENCE = 149 , NODE_TYPE_STACK = 150 , NODE_TYPE_STRIDED_SLICE = 151 ,
NODE_TYPE_SUB_FUSION = 152 , NODE_TYPE_TILE_FUSION = 160 , NODE_TYPE_TOPK_FUSION = 161 , NODE_TYPE_TRANSPOSE = 162 , NODE_TYPE_UNSQUEEZE = 165
} | 算子类型。 | +| [ResizeMethod](_n_n_rt.md#resizemethod) : byte { RESIZE_METHOD_UNKNOWN = -1 , RESIZE_METHOD_LINEAR = 0 , RESIZE_METHOD_NEAREST = 1 , RESIZE_METHOD_CUBIC = 2 } | 调整尺寸的方法。需要配合[Resize](_resize.md)算子使用。 | +| [CoordinateTransformMode](_n_n_rt.md#coordinatetransformmode) : byte { COORDINATE_TRANSFORM_MODE_ASYMMETRIC = 0 , COORDINATE_TRANSFORM_MODE_ALIGN_CORNERS = 1 , COORDINATE_TRANSFORM_MODE_HALF_PIXEL = 2 } | 坐标变换模式,仅[Resize](_resize.md)算子使用这些枚举。 | +| [NearestMode](_n_n_rt.md#nearestmode) : byte {
NEAREST_MODE_NORMAL = 0 , NEAREST_MODE_ROUND_HALF_DOWN = 1 , NEAREST_MODE_ROUND_HALF_UP = 2 , NEAREST_MODE_FLOOR = 3 , NEAREST_MODE_CEIL = 4
} | 临近算法类型。需要配合[Resize](_resize.md)算子使用。 | +| [ActivationType](_n_n_rt.md#activationtype) : byte {
ACTIVATION_TYPE_NO_ACTIVATION = 0 , ACTIVATION_TYPE_RELU = 1 , ACTIVATION_TYPE_SIGMOID = 2 , ACTIVATION_TYPE_RELU6 = 3 ,
ACTIVATION_TYPE_ELU = 4 , ACTIVATION_TYPE_LEAKY_RELU = 5 , ACTIVATION_TYPE_ABS = 6 , ACTIVATION_TYPE_RELU1 = 7 ,
ACTIVATION_TYPE_SOFTSIGN = 8 , ACTIVATION_TYPE_SOFTPLUS = 9 , ACTIVATION_TYPE_TANH = 10 , ACTIVATION_TYPE_SELU = 11 ,
ACTIVATION_TYPE_HSWISH = 12 , ACTIVATION_TYPE_HSIGMOID = 13 , ACTIVATION_TYPE_THRESHOLDRELU = 14 , ACTIVATION_TYPE_LINEAR = 15 , ACTIVATION_TYPE_HARD_TANH = 16 , ACTIVATION_TYPE_SIGN = 17 , ACTIVATION_TYPE_SWISH = 18 , ACTIVATION_TYPE_GELU = 19 ,
ACTIVATION_TYPE_UNKNOWN = 20} | 激活函数类型。 | +| [ReduceMode](_n_n_rt.md#reducemode) : byte {
REDUCE_MODE_MEAN = 0 , REDUCE_MODE_MAX = 1 , REDUCE_MODE_MIN = 2 , REDUCE_MODE_PROD = 3 , REDUCE_MODE_SUM = 4 , REDUCE_MODE_SUM_SQUARE = 5 , REDUCE_MODE_ASUM = 6 , REDUCE_MODE_ALL = 7} | 用于维度移除的方法,需要配合[ReduceFusion](_reduce_fusion.md)算子使用。 | +| [EltwiseMode](_n_n_rt.md#eltwisemode) : byte { ELTWISE_MODE_PROD = 0 , ELTWISE_MODE_SUM = 1 , ELTWISE_MODE_MAXIMUM = 2 , ELTWISE_MODE_UNKNOWN = 3 } | 元素级别运算支持的计算类型,需要配合[Eltwise](_eltwise.md)算子使用。 | +| [PadMode](_n_n_rt.md#padmode) : byte { PAD_MODE_PAD = 0 , PAD_MODE_SAME = 1 , PAD_MODE_VALID = 2 } | 填充类型,需要配合[AvgPoolFusion](_avg_pool_fusion.md),[AvgPoolFusion](_avg_pool_fusion.md),[Conv2DFusion](_conv2_d_fusion.md),[MaxPoolFusion](_max_pool_fusion.md)使用。 | +| [RoundMode](_n_n_rt.md#roundmode) : byte { ROUND_MODE_FLOOR = 0 , ROUND_MODE_CEIL = 1 } | 小数取整算法,需要配合[AvgPoolFusion](_avg_pool_fusion.md)算子使用。 | +| [PaddingMode](_n_n_rt.md#paddingmode) : byte { PADDING_MODE_CONSTANT = 0 , PADDING_MODE_REFLECT = 1 , PADDING_MODE_SYMMETRIC = 2 , PADDING_MODE_RESERVED = 3 } | 填充类型,需要配合[PadFusion](_pad_fusion.md)算子使用。 | +| [NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode) : int {
NNRT_SUCCESS = 0 , NNRT_FAILED = 1 , NNRT_NULL_PTR = 2 , NNRT_INVALID_PARAMETER = 3 ,
NNRT_MEMORY_ERROR = 4 , NNRT_OUT_OF_MEMORY = 5 , NNRT_OPERATION_FORBIDDEN = 6 , NNRT_INVALID_FILE = 7 ,
NNRT_INVALID_PATH = 8 , NNRT_INSUFFICIENT_BUFFER = 9 , NNRT_NO_CHANGE = 10 , NNRT_NOT_SUPPORT = 11 ,
NNRT_SERVICE_ERROR = 12 , NNRT_DEVICE_ERROR = 13 , NNRT_DEVICE_BUSY = 14 , NNRT_CANCELLED = 15 ,
NNRT_PERMISSION_DENIED = 16 , NNRT_TIME_OUT = 17 , NNRT_INVALID_TENSOR = 18 , NNRT_INVALID_NODE = 19 ,
NNRT_INVALID_INPUT = 20 , NNRT_INVALID_OUTPUT = 21 , NNRT_INVALID_DATATYPE = 22 , NNRT_INVALID_FORMAT = 23 ,
NNRT_INVALID_TENSOR_NAME = 24 , NNRT_INVALID_SHAPE = 25 , NNRT_OUT_OF_DIMENTION_RANGES = 26 , NNRT_INVALID_BUFFER = 27 , NNRT_INVALID_BUFFER_SIZE = 28 , NNRT_INVALID_PERFORMANCE_MODE = 29 , NNRT_INVALID_PRIORITY = 30 , NNRT_INVALID_MODEL = 31 ,
NNRT_INVALID_MODEL_CACHE = 32 , NNRT_UNSUPPORTED_OP = 33
} | NNRt定义的专用错误码,为HDI接口的返回值。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.nnrt.v2_0 | NNRt模块的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_node.md b/zh-cn/device-dev/reference/hdi-apis/_node.md new file mode 100644 index 0000000000000000000000000000000000000000..de2e90687a60cd93cd372b7fb860aedd614266ab --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_node.md @@ -0,0 +1,134 @@ +# Node + + +## 概述 + +算子节点结构体。 + +nodeAttr参数是一段被序列化的数据,并调用OHOS的hdi的反序列化接口才能得到具体参数。大致流程如下: + +1. 定义算子参数的结构体,OP op{},其中OP可以被替换为[NodeAttrTypes.idl](_node_attr_types_8idl.md)的算子参数结构体,op是变量名。 + +2. 申明MessageParcle对象,用存储反序列化的数据,OHOS::MessageParcel data。 + +3. 将nodeAttr写入data中,data.WriteBuffer(nodeAttr.data(),nodeAttr.size())。 + +4. 将data中的数据反序列化到op结构体中,(void)OPBlockUnmarshalling(data, op)。 + +然后就可以在op中查看具体的算子的参数值。 + +例如: 某一个算子的 nodeType为NODE_TYPE_FULL_CONNECTION,那么它所对应的算子参数结构体应该为[FullConnection](_full_connection.md), 则该算子具有四个参数:hasBias,useAxis,axis和activationType。 + +则按照如下流程调用: + +1. [FullConnection](_full_connection.md) full_connection{}; + +2. OHOS::MessageParcel data; + +3. data.WriteBuffer(nodeAttr.data(),nodeAttr.size()); + +4. (void)FullConnectionBlockUnmarshalling(data, full_connection); + +至此FullConnection的四个参数就写入了full_connection中。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [name](#name) | String
算子节点的名称 。 | +| [nodeType](#nodetype) | enum [NodeType](_n_n_rt.md#nodetype)
算子节点的类型,详情请参考:[NodeType](_n_n_rt.md#nodetype)。 | +| [nodeAttr](#nodeattr) | byte[]
算子节点的参数对应的序列化数组。 | +| [inputIndex](#inputindex) | unsigned int[]
算子节点的输入节点下标。 | +| [outputIndex](#outputindex) | unsigned int[]
算子节点的输出节点下标。 | +| [quantType](#quanttype) | enum [QuantType](_n_n_rt.md#quanttype)
算子节点的量化参数,详情请参考:[QuantType](_n_n_rt.md#quanttype)。 | + + +## 类成员变量说明 + + +### inputIndex + + +``` +unsigned int [] Node::inputIndex +``` + +**描述:** + +算子节点的输入节点下标。 + + +### name + + +``` +String Node::name +``` + +**描述:** + +算子节点的名称 。 + + +### nodeAttr + + +``` +byte [] Node::nodeAttr +``` + +**描述:** + +算子节点的参数对应的序列化数组。 + + +### nodeType + + +``` +enum NodeType Node::nodeType +``` + +**描述:** + +算子节点的类型,详情请参考:[NodeType](_n_n_rt.md#nodetype)。 + + +### outputIndex + + +``` +unsigned int [] Node::outputIndex +``` + +**描述:** + +算子节点的输出节点下标。 + + +### quantType + + +``` +enum QuantType Node::quantType +``` + +**描述:** + +算子节点的量化参数,详情请参考:[QuantType](_n_n_rt.md#quanttype)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_node_attr_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_node_attr_types_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..1efa18bbfdfcf752baf21395759cc1e5fa399c6c --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_node_attr_types_8idl.md @@ -0,0 +1,88 @@ +# NodeAttrTypes.idl + + +## 概述 + +该文件定义AI模型算子的参数和功能。 + +该文文件中所有的结构体仅声明了算子的属性,并不包含执行算子函数的接口,具体介绍如下: + +- 该文件中每一个算子都与[NodeType](_n_n_rt.md#nodetype)的枚举值一一对应,执行模型推理时,[NodeType](_n_n_rt.md#nodetype)会在[Node](_node.md)的nodeType中存储。 + +- 每一个算子都至少有一个“输入”与“输出”,“输入”即为该算子接收的张量,“输出”为经过算子运算之后得到的“张量”;“输入”、“算子”和“输出”之间的关系需要通过[Node](_node.md)结构体的inputIndex和outIndex来确认。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [Activation](_activation.md) | struct
激活类型的算子,所有的激活函数都属于该算子,具体的激活函数类型一句参数来确定。 | +| [AddFusion](_add_fusion.md) | struct
输入Tensor逐元素相加, 输出x和y的和,数据形状与输入broadcast之后一样,数据类型与较高精度的输入精度一致。 | +| [ArgMaxFusion](_arg_max_fusion.md) | struct
返回跨轴的tensor前K个索引或者是数值。 | +| [AvgPoolFusion](_avg_pool_fusion.md) | struct
在输入tensor上应用 2D 平均池化。支持int8量化输入。 | +| [BatchToSpaceND](_batch_to_space_n_d.md) | struct
将一个4维tensor的batch维度按block_shape切分成小块,并将这些小块拼接到空间维度。 | +| [BiasAdd](_bias_add.md) | struct
对给出的输入张量上的各个维度方向上的数据进行偏置。 | +| [Cast](_cast.md) | struct
根据输出张量的类型对张量数据类型进行转换。 | +| [Concat](_concat.md) | struct
在指定轴上连接张量,将输入张量按给定的轴连接起来。 | +| [Conv2DFusion](_conv2_d_fusion.md) | struct
对将4维的tensor执行带有偏置的二维卷积运算。 | +| [Conv2dTransposeFusion](_conv2d_transpose_fusion.md) | struct
对一个4维的tensor执行带有偏置的二维反卷积。 | +| [DivFusion](_div_fusion.md) | struct
将两个tensor执行除法运算。 | +| [Eltwise](_eltwise.md) | struct
元素级别操作的算子。 | +| [ExpandDims](_expand_dims.md) | struct
在给定轴上为tensor添加一个额外的维度。 | +| [Fill](_fill.md) | struct
根据指定的维度,创建由一个标量填充的tensor。 | +| [FullConnection](_full_connection.md) | struct
对输入数据做全连接。 | +| [FusedBatchNorm](_fused_batch_norm.md) | struct
对一个tensor进行批标准化的运算。 | +| [Gather](_gather.md) | struct
根据指定的索引和轴返回输入tensor的切片。 | +| [LayerNormFusion](_layer_norm_fusion.md) | struct
对一个tensor从某一axis开始做层归一化。 | +| [LessEqual](_less_equal.md) | struct
对输入x1和x2,计算每对元素的x1<=x2的结果。 | +| [MatMulFusion](_mat_mul_fusion.md) | struct
对输入x1和x2,计算x1和x2的内积。 | +| [Maximum](_maximum.md) | struct
对输入x1和x2,计算x1和x2对应元素最大值,x1和x2的输入遵守隐式类型转换规则,使数据类型一致。 | +| [MaxPoolFusion](_max_pool_fusion.md) | struct
对输入x,计算 2D 最大值池化。 | +| [MulFusion](_mul_fusion.md) | struct
对输入x1和x2,将x1和x2相同的位置的元素相乘得到output。 | +| [OneHot](_one_hot.md) | struct
根据indices指定的位置,生成一个由one-hot向量构成的tensor。 | +| [PadFusion](_pad_fusion.md) | struct
在x指定维度的数据前后,添加指定数值进行增广。 | +| [PowFusion](_pow_fusion.md) | struct
求x的y次幂,输入必须是两个tensor或一个tensor和一个标量。 | +| [PReLUFusion](_p_re_l_u_fusion.md) | struct
计算x和weight的PReLU激活值。 | +| [QuantDTypeCast](_quant_d_type_cast.md) | struct
数据类型转换。 | +| [ReduceFusion](_reduce_fusion.md) | struct
减小x张量的维度。 | +| [Reshape](_reshape.md) | struct
根据inputShape调整input的形状。 | +| [Resize](_resize.md) | struct
按给定的参数对输入的张量进行变形。 | +| [Rsqrt](_rsqrt.md) | struct
求x的平方根的倒数。 | +| [ScaleFusion](_scale_fusion.md) | struct
给定一个tensor,计算其缩放后的值。 | +| [Shape](_shape.md) | struct
输出输入tensor的形状。 | +| [SliceFusion](_slice_fusion.md) | struct
在x各维度,在axes维度中,以begin为起点,截取size长度的切片。 | +| [Softmax](_softmax.md) | struct
给定一个tensor,计算其softmax结果。 | +| [SpaceToBatchND](_space_to_batch_n_d.md) | struct
将4维张量在空间维度上进行切分成多个小块,然后在batch维度上拼接这些小块。 | +| [Split](_split.md) | struct
算子沿 axis 维度将x拆分成多个张量,张量数量由outputNum指定。 | +| [Sqrt](_sqrt.md) | struct
给定一个tensor,计算其平方根。 | +| [SquaredDifference](_squared_difference.md) | struct
计算两个输入的差值并返回差值的平方。SquaredDifference算子支持tensor和tensor相减。 | +| [Squeeze](_squeeze.md) | struct
去除axis中,长度为1的维度。支持int8量化输入。 | +| [Stack](_stack.md) | struct
将一组tensor沿axis维度进行堆叠,堆叠前每个tensor的维数为n,则堆叠后output维数为n+1。 | +| [StridedSlice](_strided_slice.md) | struct
根据步长和索引对输入张量进行切片提取。 | +| [SubFusion](_sub_fusion.md) | struct
计算两个输入的差值。 | +| [TileFusion](_tile_fusion.md) | struct
以multiples指定的次数拷贝输入张量。 | +| [TopKFusion](_top_k_fusion.md) | struct
查找沿axis轴的前K个最大值和对应索引。 | +| [Transpose](_transpose.md) | struct
根据perm对x进行数据重排。 | +| [Unsqueeze](_unsqueeze.md) | struct
根据输入axis的值。增加一个维度。 | + + +### 变量 + + | 名称 | 描述 | +| -------- | -------- | +| [v2_0](_n_n_rt.md) | package ohos hdi nnrt
NNRt模块的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_nr_rssi.md b/zh-cn/device-dev/reference/hdi-apis/_nr_rssi.md new file mode 100644 index 0000000000000000000000000000000000000000..e3d9448822d8f9934dc9ab15189d6513cbb4e2a7 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_nr_rssi.md @@ -0,0 +1,55 @@ +# NrRssi + + +## 概述 + +NR信号强度。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [rsrp](#rsrp) | int
表示接收信号码功率  | +| [rsrq](#rsrq) | int
表示信号接收质量  | +| [sinr](#sinr) | int
表示信号干扰噪声比  | + + +## 类成员变量说明 + + +### rsrp + + +``` +int NrRssi::rsrp +``` +**描述:** +表示接收信号码功率 + + +### rsrq + + +``` +int NrRssi::rsrq +``` +**描述:** +表示信号接收质量 + + +### sinr + + +``` +int NrRssi::sinr +``` +**描述:** +表示信号干扰噪声比 diff --git a/zh-cn/device-dev/reference/hdi-apis/_offline_db.md b/zh-cn/device-dev/reference/hdi-apis/_offline_db.md new file mode 100644 index 0000000000000000000000000000000000000000..33939be8c44e0d596f317757f336dbd2ae417e7b --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_offline_db.md @@ -0,0 +1,57 @@ +# OfflineDb + + +## 概述 + +定义下发基站离线数据库的数据结构。 + +**Since:** +4.0 +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [times](#times) | unsigned int
当前数据包的序号,从1开始。  | +| [totalTimes](#totaltimes) | unsigned int
此次下发基站离线数据库的总包数。  | +| [dbs](#dbs) | unsigned char[]
基站离线数据库数据。  | + + +## 类成员变量说明 + + +### dbs + + +``` +unsigned char [] OfflineDb::dbs +``` +**描述:** +基站离线数据库数据。 + + +### times + + +``` +unsigned int OfflineDb::times +``` +**描述:** +当前数据包的序号,从1开始。 + + +### totalTimes + + +``` +unsigned int OfflineDb::totalTimes +``` +**描述:** +此次下发基站离线数据库的总包数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_omx_codec_buffer.md b/zh-cn/device-dev/reference/hdi-apis/_omx_codec_buffer.md index 34b9713074eade2f98e39c2e9aa645cb7cd67e3f..e48db7ba54596d3abcfbe576438bf16c035dc0ea 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_omx_codec_buffer.md +++ b/zh-cn/device-dev/reference/hdi-apis/_omx_codec_buffer.md @@ -1,38 +1,38 @@ # OmxCodecBuffer -## **概述** +## 概述 Codec buffer信息的定义。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [bufferId](#bufferid) | buffer的ID。 | -| [size](#size) | 结构体大小。 | -| [version](#version) | 组件版本信息。 | -| [bufferType](#buffertype) | buffer类型。 | -| [buffer](#buffer) | 编码或者解码使用的buffer。 | -| [bufferLen](#bufferlen) | buffer大小。 | -| [allocLen](#alloclen) | 申请的buffer大小。 | -| [filledLen](#filledlen) | 填充的buffer大小。 | -| [offset](#offset) | 有效数据从缓冲区开始的起始偏移量。 | -| [fenceFd](#fencefd) | 该描述符来自buffer消费者,Codec等待成功后才可以使用输入或者输出buffer。 | -| [type](#type) | 共享内存类型。 | -| [pts](#pts) | 时间戳。 | -| [flag](#flag) | 标志。 | +| [bufferId](#bufferid) | uint32_t
buffer ID。  | +| [size](#size) | uint32_t
结构体大小。  | +| [version](#version) | union OMX_VERSIONTYPE
组件版本信息。  | +| [bufferType](#buffertype) | enum [CodecBufferType](_codec.md#codecbuffertype)
buffer类型。  | +| [buffer](#buffer) | uint8_t \*
编码或者解码使用的buffer。  | +| [bufferLen](#bufferlen) | uint32_t
buffer大小。  | +| [allocLen](#alloclen) | uint32_t
申请的buffer大小。  | +| [filledLen](#filledlen) | uint32_t
填充的buffer大小。  | +| [offset](#offset) | uint32_t
有效数据从缓冲区开始的起始偏移量。  | +| [fenceFd](#fencefd) | int32_t
该描述符来自buffer消费者,Codec等待成功后才可以使用输入或者输出buffer。  | +| [type](#type) | enum [ShareMemTypes](_codec.md#sharememtypes)
共享内存类型。  | +| [pts](#pts) | int64_t
时间戳。  | +| [flag](#flag) | uint32_t
标志。  | -## **类成员变量说明** +## 类成员变量说明 ### allocLen @@ -41,9 +41,7 @@ Codec buffer信息的定义。 ``` uint32_t OmxCodecBuffer::allocLen ``` - -**描述:** - +**描述:** 申请的buffer大小。 @@ -53,9 +51,7 @@ uint32_t OmxCodecBuffer::allocLen ``` uint8_t* OmxCodecBuffer::buffer ``` - -**描述:** - +**描述:** 编码或者解码使用的buffer。 @@ -65,9 +61,7 @@ uint8_t* OmxCodecBuffer::buffer ``` uint32_t OmxCodecBuffer::bufferId ``` - -**描述:** - +**描述:** buffer ID。 @@ -77,9 +71,7 @@ buffer ID。 ``` uint32_t OmxCodecBuffer::bufferLen ``` - -**描述:** - +**描述:** buffer大小。 @@ -89,9 +81,7 @@ buffer大小。 ``` enum CodecBufferType OmxCodecBuffer::bufferType ``` - -**描述:** - +**描述:** buffer类型。 @@ -101,9 +91,7 @@ buffer类型。 ``` int32_t OmxCodecBuffer::fenceFd ``` - -**描述:** - +**描述:** 该描述符来自buffer消费者,Codec等待成功后才可以使用输入或者输出buffer。 @@ -113,9 +101,7 @@ int32_t OmxCodecBuffer::fenceFd ``` uint32_t OmxCodecBuffer::filledLen ``` - -**描述:** - +**描述:** 填充的buffer大小。 @@ -125,9 +111,7 @@ uint32_t OmxCodecBuffer::filledLen ``` uint32_t OmxCodecBuffer::flag ``` - -**描述:** - +**描述:** 标志。 @@ -137,9 +121,7 @@ uint32_t OmxCodecBuffer::flag ``` uint32_t OmxCodecBuffer::offset ``` - -**描述:** - +**描述:** 有效数据从缓冲区开始的起始偏移量。 @@ -149,9 +131,7 @@ uint32_t OmxCodecBuffer::offset ``` int64_t OmxCodecBuffer::pts ``` - -**描述:** - +**描述:** 时间戳。 @@ -161,9 +141,7 @@ int64_t OmxCodecBuffer::pts ``` uint32_t OmxCodecBuffer::size ``` - -**描述:** - +**描述:** 结构体大小。 @@ -173,9 +151,7 @@ uint32_t OmxCodecBuffer::size ``` enum ShareMemTypes OmxCodecBuffer::type ``` - -**描述:** - +**描述:** 共享内存类型。 @@ -185,7 +161,5 @@ enum ShareMemTypes OmxCodecBuffer::type ``` union OMX_VERSIONTYPE OmxCodecBuffer::version ``` - -**描述:** - +**描述:** 组件版本信息。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_one_hot.md b/zh-cn/device-dev/reference/hdi-apis/_one_hot.md new file mode 100644 index 0000000000000000000000000000000000000000..ecc860b5b292d47b1227cea8d0ac2f0cfbd0edd0 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_one_hot.md @@ -0,0 +1,63 @@ +# OneHot + + +## 概述 + +根据indices指定的位置,生成一个由one-hot向量构成的tensor。 + +每个onehot向量中的有效值由on_value决定,其他位置由off_value决定。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_ONE_HOT。 + +输入: + +- indices,n维tensor。indices中每个元素决定每个one-hot向量,on_value的位置。 + +- depth,一个整型标量,决定one-hot向量的深度。要求depth>0。 + +- on_value,一个标量,指定one-hot向量中的有效值。 + +- off_value,一个标量,指定one-hot向量中除有效位以外,其他位置的值。 + +输出: + +- output,如果indices时n维tensor,则output是(n+1)维tensor。output的形状由indices和axis共同决定。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [axis](#axis) | long
一个整型标量,指定插入one-hot的维度。 | + + +## 类成员变量说明 + + +### axis + + +``` +long OneHot::axis +``` + +**描述:** + +一个整型标量,指定插入one-hot的维度。 + +indices的形状是[N,C],depth的值是D,当axis=0时,output形状为[D,N,C], indices的形状是[N,C],depth的值是D,当axis=-1时,output形状为[N,C,D], indices的形状是[N,C],depth的值是D,当axis=1时,output形状为[N,D,C]。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_open_logical_channel_response.md b/zh-cn/device-dev/reference/hdi-apis/_open_logical_channel_response.md new file mode 100644 index 0000000000000000000000000000000000000000..30b80b94705d8b721f87a9ec6ae6a6be43d1f12d --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_open_logical_channel_response.md @@ -0,0 +1,66 @@ +# OpenLogicalChannelResponse + + +## 概述 + +APDU打开逻辑通道响应信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [sw1](#sw1) | int
SIM卡状态字1,命令执行后SIM卡返回的响应  | +| [sw2](#sw2) | int
SIM卡状态字2,命令执行后SIM卡返回的响应  | +| [channelId](#channelid) | int
打开的逻辑通道ID  | +| [response](#response) | String
响应信息  | + + +## 类成员变量说明 + + +### channelId + + +``` +int OpenLogicalChannelResponse::channelId +``` +**描述:** +打开的逻辑通道ID + + +### response + + +``` +String OpenLogicalChannelResponse::response +``` +**描述:** +响应信息 + + +### sw1 + + +``` +int OpenLogicalChannelResponse::sw1 +``` +**描述:** +SIM卡状态字1,命令执行后SIM卡返回的响应 + + +### sw2 + + +``` +int OpenLogicalChannelResponse::sw2 +``` +**描述:** +SIM卡状态字2,命令执行后SIM卡返回的响应 diff --git a/zh-cn/device-dev/reference/hdi-apis/_operator_info.md b/zh-cn/device-dev/reference/hdi-apis/_operator_info.md new file mode 100644 index 0000000000000000000000000000000000000000..e07dc24c61864718e4a06fb91a5e907044c9c11d --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_operator_info.md @@ -0,0 +1,55 @@ +# OperatorInfo + + +## 概述 + +运营商信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [longName](#longname) | String
获取注册网络的长格式的运营商名称  | +| [shortName](#shortname) | String
获取注册网络的短格式的运营商名称  | +| [numeric](#numeric) | String
运营商编号  | + + +## 类成员变量说明 + + +### longName + + +``` +String OperatorInfo::longName +``` +**描述:** +获取注册网络的长格式的运营商名称 + + +### numeric + + +``` +String OperatorInfo::numeric +``` +**描述:** +运营商编号 + + +### shortName + + +``` +String OperatorInfo::shortName +``` +**描述:** +获取注册网络的短格式的运营商名称 diff --git a/zh-cn/device-dev/reference/hdi-apis/_p_re_l_u_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_p_re_l_u_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..dd85de180c98c1ca01b17c115dab551c1a04de03 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_p_re_l_u_fusion.md @@ -0,0 +1,49 @@ +# PReLUFusion + + +## 概述 + +计算x和weight的PReLU激活值。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_PRELU_FUSION。 + +输入: + +- x,一个n维tensor,如果n>=2,则要求x1的排布为[BatchSize,…,Channels],第二个维度为通道数。 + +- weight,一个1维tensor。weight的长度只能是1或者等于通道数。当weight长度为1,则x所有通道共享一个权重值。 若weight长度等于通道数,每个通道独享一个权重,若x维数n<2,weight长度只能为1。 + +输出: + +- output,x的PReLU激活值。形状和数据类型和x保持一致。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [channelShared](#channelshared) | boolean
是否开启权重共享,可以用于校验参数合法性。 若weight的是1则channelShared一定为true,否则为false。  | + + +## 类成员变量说明 + + +### channelShared + + +``` +boolean PReLUFusion::channelShared +``` +**描述:** +是否开启权重共享,可以用于校验参数合法性。 若weight的是1则channelShared一定为true,否则为false。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_pad_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_pad_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..3a28fbe5e98d32c6ed3a89d4375e39329d28037a --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_pad_fusion.md @@ -0,0 +1,73 @@ +# PadFusion + + +## 概述 + +在x指定维度的数据前后,添加指定数值进行增广。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_PAD_FUSION。 + +参数限制:当paddingMode==PADDING_MODE_CONSTANT时,需要设置constantValue,默认constantValue为0。 + +输入: + +- x,n维tensor + +- paddings,一个2维tensor,指定每一维度增补的长度,shape为[n,2]。paddings[i][0]表示第i维上,需要在输入张量前增补的数量; paddings[i][1]表示第i维上,需要在输入张量x后增补的数量。 + +输出: + +- output,一个n维tensor,维数和数据类型和x保持一致。shape由x和paddings共同决定 output.shape[i] = input.shape[i] + paddings[i][0]+paddings[i][1]。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [paddings](#paddings) | long[][]
一个2维tensor,指定每一维度增补的长度,shape为[n,2]。paddings[i][0]表示第i维上,需要在x1前增补的数量; paddings[i][1]表示第i维上,需要在x1后增补的数量。 该参数和输入的paddings意义相同。  | +| [paddingMode](#paddingmode) | enum [PaddingMode](_n_n_rt.md#paddingmode)
填充类型。 详情请参考:[PaddingMode](_n_n_rt.md#paddingmode)。  | +| [constantValue](#constantvalue) | float
一个常数,数据类型和x一致,指定Pad操作增广的数值。 仅paddingMode==PADDING_MODE_CONSTANT时生效,默认值为0。  | + + +## 类成员变量说明 + + +### constantValue + + +``` +float PadFusion::constantValue +``` +**描述:** +一个常数,数据类型和x一致,指定Pad操作增广的数值。 仅paddingMode==PADDING_MODE_CONSTANT时生效,默认值为0。 + + +### paddingMode + + +``` +enum PaddingMode PadFusion::paddingMode +``` +**描述:** +填充类型。 详情请参考:[PaddingMode](_n_n_rt.md#paddingmode)。 + + +### paddings + + +``` +long [][] PadFusion::paddings +``` +**描述:** +一个2维tensor,指定每一维度增补的长度,shape为[n,2]。paddings[i][0]表示第i维上,需要在x1前增补的数量; paddings[i][1]表示第i维上,需要在x1后增补的数量。 该参数和输入的paddings意义相同。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_physical_channel_config.md b/zh-cn/device-dev/reference/hdi-apis/_physical_channel_config.md new file mode 100644 index 0000000000000000000000000000000000000000..da0c46433a0fc280ec6c3dbdc95910339423fcd2 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_physical_channel_config.md @@ -0,0 +1,132 @@ +# PhysicalChannelConfig + + +## 概述 + +物理通道配置。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [cellConnStatus](#cellconnstatus) | enum [RilCellConnectionStatus](_ril.md#rilcellconnectionstatus)
连接状态  | +| [ratType](#rattype) | enum [RilRadioTech](_ril.md#rilradiotech)
语音接入技术类型,具体查看[RilRadioTech](_ril.md#rilradiotech) | +| [cellBandwidthDownlinkKhz](#cellbandwidthdownlinkkhz) | int
下行带宽,单位为kHz  | +| [cellBandwidthUplinkKhz](#cellbandwidthuplinkkhz) | int
上行带宽,单位为kHz  | +| [freqRange](#freqrange) | int
频率范围  | +| [downlinkChannelNum](#downlinkchannelnum) | int
下行信道号  | +| [uplinkChannelNum](#uplinkchannelnum) | int
上行信道号  | +| [physicalCellId](#physicalcellid) | int
物理小区标识  | +| [contextIdNum](#contextidnum) | int
逻辑设备编号  | +| [contextIds](#contextids) | List< int >
上行信道号  | + + +## 类成员变量说明 + + +### cellBandwidthDownlinkKhz + + +``` +int PhysicalChannelConfig::cellBandwidthDownlinkKhz +``` +**描述:** +下行带宽,单位为kHz + + +### cellBandwidthUplinkKhz + + +``` +int PhysicalChannelConfig::cellBandwidthUplinkKhz +``` +**描述:** +上行带宽,单位为kHz + + +### cellConnStatus + + +``` +enum RilCellConnectionStatus PhysicalChannelConfig::cellConnStatus +``` +**描述:** +连接状态 + + +### contextIdNum + + +``` +int PhysicalChannelConfig::contextIdNum +``` +**描述:** +逻辑设备编号 + + +### contextIds + + +``` +List PhysicalChannelConfig::contextIds +``` +**描述:** +上行信道号 + + +### downlinkChannelNum + + +``` +int PhysicalChannelConfig::downlinkChannelNum +``` +**描述:** +下行信道号 + + +### freqRange + + +``` +int PhysicalChannelConfig::freqRange +``` +**描述:** +频率范围 + + +### physicalCellId + + +``` +int PhysicalChannelConfig::physicalCellId +``` +**描述:** +物理小区标识 + + +### ratType + + +``` +enum RilRadioTech PhysicalChannelConfig::ratType +``` +**描述:** +语音接入技术类型,具体查看[RilRadioTech](_ril.md#rilradiotech) + + +### uplinkChannelNum + + +``` +int PhysicalChannelConfig::uplinkChannelNum +``` +**描述:** +上行信道号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_pin_auth_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_pin_auth_types_8idl.md deleted file mode 100644 index 8a10abb5afe0b23f994349952633fca6574d9387..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_pin_auth_types_8idl.md +++ /dev/null @@ -1,42 +0,0 @@ -# PinAuthTypes.idl - - -## **概述** - -定义口令认证驱动的枚举类和数据结构。 - -**Since:** - -3.2 - -**所属模块:** - -[HdfPinAuth](_hdf_pin_auth.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [ExecutorInfo](_executor_info.md) | 执行器信息。 | -| [TemplateInfo](_template_info.md) | 凭据模版信息。 | - - -### 枚举 - - | 名称 | 描述 | -| -------- | -------- | -| [AuthType](_hdf_pin_auth.md#authtype): int {   PIN = 1, FACE = 2, FINGERPRINT = 4 } | 枚举用户认证凭据类型。 | -| [ExecutorRole](_hdf_pin_auth.md#executorrole): int {   COLLECTOR = 1, VERIFIER = 2, ALL_IN_ONE = 3 } | 枚举执行器角色。 | -| [ExecutorSecureLevel](_hdf_pin_auth.md#executorsecurelevel): int {   ESL0 = 0, ESL1 = 1, ESL2 = 2, ESL3 = 3 } | 枚举执行器安全等级。 | -| [CommandId](_hdf_pin_auth.md#commandid): int { DEFAULT = 0 } | 枚举口令认证功能相关操作命令。 | - - -### 关键字 - - | 名称 | 描述 | -| -------- | -------- | -| package ohos.hdi.pin_auth.v1_0 | 口令认证接口的包路径 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_point.md b/zh-cn/device-dev/reference/hdi-apis/_point.md new file mode 100644 index 0000000000000000000000000000000000000000..3cc42b72968b73029d8f47ee0e937bb34909e8ce --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_point.md @@ -0,0 +1,46 @@ +# Point + + +## 概述 + +定义位置坐标的数据结构。 + +**Since:** +4.0 +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [latitude](#latitude) | double
纬度  | +| [longitude](#longitude) | double
经度  | + + +## 类成员变量说明 + + +### latitude + + +``` +double Point::latitude +``` +**描述:** +纬度 + + +### longitude + + +``` +double Point::longitude +``` +**描述:** +经度 diff --git a/zh-cn/device-dev/reference/hdi-apis/_port_info.md b/zh-cn/device-dev/reference/hdi-apis/_port_info.md index 80422dc158b7ddc3353f149bcababf3303f10b93..0c94c7746a0a7d5972b1251a9b5b997a9dd10c9f 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_port_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_port_info.md @@ -1,37 +1,33 @@ # PortInfo -## **概述** +## 概述 USB设备端口信息。 **Since:** - 3.2 - **Version:** - 1.0 - **相关模块:** -[USB](usb.md) +[USB](_u_s_b.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [portId](#portid) | USB设备端口ID。 | -| [powerRole](#powerrole) | USB设备电源角色。 | -| [dataRole](#datarole) | USB设备数据角色。 | -| [mode](#mode) | USB设备模式。 | +| [portId](#portid) | int
USB设备端口ID。  | +| [powerRole](#powerrole) | int
USB设备电源角色。  | +| [dataRole](#datarole) | int
USB设备数据角色。  | +| [mode](#mode) | int
USB设备模式。  | -## **类成员变量说明** +## 类成员变量说明 ### dataRole @@ -40,9 +36,7 @@ USB设备端口信息。 ``` int PortInfo::dataRole ``` - -**描述:** - +**描述:** USB设备数据角色。 @@ -52,9 +46,7 @@ USB设备数据角色。 ``` int PortInfo::mode ``` - -**描述:** - +**描述:** USB设备模式。 @@ -64,9 +56,7 @@ USB设备模式。 ``` int PortInfo::portId ``` - -**描述:** - +**描述:** USB设备端口ID。 @@ -76,7 +66,5 @@ USB设备端口ID。 ``` int PortInfo::powerRole ``` - -**描述:** - +**描述:** USB设备电源角色。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_pow_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_pow_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..ac1fb6c618d240ebe64636adb53f71d09897eb5f --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_pow_fusion.md @@ -0,0 +1,64 @@ +# PowFusion + + +## 概述 + +求x的y次幂,输入必须是两个tensor或一个tensor和一个标量。 + +当输入是两个tensor时,它们的数据类型不能同时为DATA_TYPE_BOOL,且要求两个tensor的shape相同。当输入是一个tensor和一个标量时,标量只能是一个常数。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_POW_FUSION。 + +参数说明:x的每个元素会做如下运算:x' = scale\*x+shift,然后对于x'再求y次幂。 + +输入: + +- x,实数、bool值或tensor,tensor的数据类型为实数或DATA_TYPE_BOOL。 + +- y,实数、bool值或tensor,tensor的数据类型为实数或DATA_TYPE_BOOL。 + +输出: + +- output,形状由x和y broadcast后的形状决定。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [scale](#scale) | float
对x的数值进行缩放。  | +| [shift](#shift) | float
对x的数值缩放后的值进行增减。  | + + +## 类成员变量说明 + + +### scale + + +``` +float PowFusion::scale +``` +**描述:** +对x的数值进行缩放。 + + +### shift + + +``` +float PowFusion::shift +``` +**描述:** +对x的数值缩放后的值进行增减。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_power_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_power_types_8idl.md index 30be1eeab46b01def03497a8d4ae50c4517e2e92..ac6081213e111e2112f1fabec0c89e45c1bca52d 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_power_types_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_power_types_8idl.md @@ -1,7 +1,7 @@ # PowerTypes.idl -## **概述** +## 概述 电源相关的数据类型。 @@ -20,14 +20,14 @@ [Power](power.md) -## **汇总** +## 汇总 ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [PowerHdfCmd](power.md#powerhdfcmd) {   CMD_REGISTER_CALLBCK = 0, CMD_START_SUSPEND, CMD_STOP_SUSPEND, CMD_FORCE_SUSPEND,   CMD_SUSPEND_BLOCK, CMD_SUSPEND_UNBLOCK, CMD_DUMP } | 枚举电源命令的参数。 | +| [PowerHdfCmd](power.md#powerhdfcmd) { CMD_REGISTER_CALLBCK = 0, CMD_START_SUSPEND, CMD_STOP_SUSPEND, CMD_FORCE_SUSPEND,   CMD_SUSPEND_BLOCK, CMD_SUSPEND_UNBLOCK, CMD_DUMP } | 枚举电源命令的参数。 | | [PowerHdfCallbackCmd](power.md#powerhdfcallbackcmd) { CMD_ON_SUSPEND = 0, CMD_ON_WAKEUP } | 枚举电源状态回调的参数。 | | [PowerHdfState](power.md#powerhdfstate) { AWAKE = 0, INACTIVE, SLEEP } | 枚举电源的状态。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_preferred_network_type_info.md b/zh-cn/device-dev/reference/hdi-apis/_preferred_network_type_info.md new file mode 100644 index 0000000000000000000000000000000000000000..9b234505eec2fc6eb6aa1a83600d81a51daa38b4 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_preferred_network_type_info.md @@ -0,0 +1,112 @@ +# PreferredNetworkTypeInfo + + +## 概述 + +首选网络类型信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [preferredNetworkType](#preferrednetworktype) | int
网络类型 | +| [flag](#flag) | int
网络标识  | + + +## 类成员变量说明 + + +### flag + + +``` +int PreferredNetworkTypeInfo::flag +``` +**描述:** +网络标识 + + +### preferredNetworkType + + +``` +int PreferredNetworkTypeInfo::preferredNetworkType +``` +**描述:** +网络类型 + +- 0:自动。 + +- 1:GSM。 + +- 2:WCDMA。 + +- 3:LTE。 + +- 4:LTE、WCDMA。 + +- 5:LTE、WCDMA、GSM。 + +- 6:WCDMA、GSM。 + +- 7:CDMA。 + +- 8:EVDO。 + +- 9:EVDO、CDMA。 + +- 10:WCDMA、GSM、EVDO、CDMA。 + +- 11:LTE、EVDO、CDMA。 + +- 12:LTE、WCDMA、GSM、EVDO、CDMA。 + +- 13:TDSCDMA。 + +- 14:TDSCDMA、GSM。 + +- 15:TDSCDMA、WCDMA。 + +- 16:TDSCDMA、WCDMA、GSM。 + +- 17:LTE、TDSCDMA。 + +- 18:LTE、TDSCDMA、GSM。 + +- 19:LTE、TDSCDMA、WCDMA。 + +- 20:LTE、TDSCDMA、WCDMA、GSM。 + +- 21:TDSCDMA、WCDMA、GSM、EVDO、CDMA。 + +- 22:LTE、TDSCDMA、WCDMA、GSM、EVDO、CDMA。 + +- 31:NR。 + +- 32:NR、LTE。 + +- 33:NR、LTE、WCDMA。 + +- 34:NR、LTE、WCDMA、GSM。 + +- 35:NR、LTE、EVDO、CDMA。 + +- 36:NR、LTE、WCDMA、GSM、EVDO、CDMA。 + +- 37:NR、LTE、TDSCDMA。 + +- 38:NR、LTE、TDSCDMA、GSM。 + +- 39:NR、LTE、TDSCDMA、WCDMA。 + +- 40:NR、LTE、TDSCDMA、WCDMA、GSM。 + +- 41:NR、LTE、TDSCDMA、WCDMA、GSM、EVDO、CDMA diff --git a/zh-cn/device-dev/reference/hdi-apis/_present_timestamp.md b/zh-cn/device-dev/reference/hdi-apis/_present_timestamp.md index b10f8ce64080ce7d2becd8ca098d5f5836573efc..99d63c93bd130f5ed410a301868eb43072f94dc7 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_present_timestamp.md +++ b/zh-cn/device-dev/reference/hdi-apis/_present_timestamp.md @@ -1,21 +1,21 @@ # PresentTimestamp -## **概述** +## 概述 -上屏时间戳结构体定义。 +上屏时间戳结构体定义 **相关模块:** [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [type](_display.md#type-37) | 上屏时间戳类型 | -| [time](_display.md#time) | 类型对应的值 | +| [type](_display.md#type-37) | [PresentTimestampType](_display.md#presenttimestamptype)
上屏时间戳类型 | +| [time](_display.md#time) | int64_t
类型对应的值 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_projection_screen_cmd_param.md b/zh-cn/device-dev/reference/hdi-apis/_projection_screen_cmd_param.md index baac9ef747bea6a6dd2036e24677077acffefeba..b12227cf9e2c5f1e2f2e7799ab1c31685fd39124 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_projection_screen_cmd_param.md +++ b/zh-cn/device-dev/reference/hdi-apis/_projection_screen_cmd_param.md @@ -1,35 +1,31 @@ # ProjectionScreenCmdParam -## **概述** +## 概述 投屏参数。 **Since:** - 3.2 - **Version:** - 1.0 - **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [cmdId](#cmdid) | 投屏命令ID。 | -| [buf](#buf) | 投屏命令内容。 | +| [cmdId](#cmdid) | int
投屏命令ID。  | +| [buf](#buf) | byte[]
投屏命令内容。  | -## **类成员变量说明** +## 类成员变量说明 ### buf @@ -38,9 +34,7 @@ ``` byte [] ProjectionScreenCmdParam::buf ``` - -**描述:** - +**描述:** 投屏命令内容。 @@ -50,7 +44,5 @@ byte [] ProjectionScreenCmdParam::buf ``` int ProjectionScreenCmdParam::cmdId ``` - -**描述:** - +**描述:** 投屏命令ID。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_property_object.md b/zh-cn/device-dev/reference/hdi-apis/_property_object.md index 2bc7c1197be43e77c135cfc654ea93bf5487f1e9..f46a67e69b5af53b68cd33a1f4b9a01ec24df54f 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_property_object.md +++ b/zh-cn/device-dev/reference/hdi-apis/_property_object.md @@ -1,7 +1,7 @@ # PropertyObject -## **概述** +## 概述 定义包含名称、属性ID和值的属性对象。 @@ -10,13 +10,13 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [name](_display.md#name-12) | 属性名称 | -| [propId](_display.md#propid) | 属性ID | -| [value](_display.md#value-12) | 属性值 | +| [name](_display.md#name-12) [[PROPERTY_NAME_LEN](_display.md#property_name_len)] | char
属性名称 | +| [propId](_display.md#propid) | uint32_t
属性ID | +| [value](_display.md#value-12) | uint64_t
属性值 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_ps_reg_status_info.md b/zh-cn/device-dev/reference/hdi-apis/_ps_reg_status_info.md new file mode 100644 index 0000000000000000000000000000000000000000..3a28dc74adc1f1b05f99333186398e8580263d80 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_ps_reg_status_info.md @@ -0,0 +1,116 @@ +# PsRegStatusInfo + + +## 概述 + +PS注册状态信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [notifyType](#notifytype) | int
通知类型 | +| [regStatus](#regstatus) | enum [RilRegStatus](_ril.md#rilregstatus)
注册状态,具体查看[RilRegStatus](_ril.md#rilregstatus) | +| [lacCode](#laccode) | int
地区区域码  | +| [cellId](#cellid) | int
小区标识  | +| [radioTechnology](#radiotechnology) | enum [RilRadioTech](_ril.md#rilradiotech)
语音接入技术类型,具体查看[RilRadioTech](_ril.md#rilradiotech) | +| [isNrAvailable](#isnravailable) | boolean
表示NR模式是否可用  | +| [isEnDcAvailable](#isendcavailable) | boolean
表示ENDC是否可用  | +| [isDcNrRestricted](#isdcnrrestricted) | boolean
表示DCNR是否受限  | + + +## 类成员变量说明 + + +### cellId + + +``` +int PsRegStatusInfo::cellId +``` +**描述:** +小区标识 + + +### isDcNrRestricted + + +``` +boolean PsRegStatusInfo::isDcNrRestricted +``` +**描述:** +表示DCNR是否受限 + + +### isEnDcAvailable + + +``` +boolean PsRegStatusInfo::isEnDcAvailable +``` +**描述:** +表示ENDC是否可用 + + +### isNrAvailable + + +``` +boolean PsRegStatusInfo::isNrAvailable +``` +**描述:** +表示NR模式是否可用 + + +### lacCode + + +``` +int PsRegStatusInfo::lacCode +``` +**描述:** +地区区域码 + + +### notifyType + + +``` +int PsRegStatusInfo::notifyType +``` +**描述:** +通知类型 + +- 0:禁止主动上报 + +- 1:使用格式1上报,具体由芯片自定义 + +- 2:使用格式2上报,具体由芯片自定义 + + +### radioTechnology + + +``` +enum RilRadioTech PsRegStatusInfo::radioTechnology +``` +**描述:** +语音接入技术类型,具体查看[RilRadioTech](_ril.md#rilradiotech) + + +### regStatus + + +``` +enum RilRegStatus PsRegStatusInfo::regStatus +``` +**描述:** +注册状态,具体查看[RilRegStatus](_ril.md#rilregstatus) diff --git a/zh-cn/device-dev/reference/hdi-apis/_quant_d_type_cast.md b/zh-cn/device-dev/reference/hdi-apis/_quant_d_type_cast.md new file mode 100644 index 0000000000000000000000000000000000000000..c6f8c06ef9e3afd49f3269079dd28e595673b321 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_quant_d_type_cast.md @@ -0,0 +1,58 @@ +# QuantDTypeCast + + +## 概述 + +数据类型转换。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_QUANT_DTYPE_CAST。 + +输入: + +- x,n维tensor。 + +输出: + +- output,类型转换之后的tensor。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [srcT](#srct) | long
定义输入的数据类型。  | +| [dstT](#dstt) | long
定义输出的数据类型。  | + + +## 类成员变量说明 + + +### dstT + + +``` +long QuantDTypeCast::dstT +``` +**描述:** +定义输出的数据类型。 + + +### srcT + + +``` +long QuantDTypeCast::srcT +``` +**描述:** +定义输入的数据类型。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_quant_param.md b/zh-cn/device-dev/reference/hdi-apis/_quant_param.md new file mode 100644 index 0000000000000000000000000000000000000000..8948bdfc90a6e616273d320466655b1d2f2bd2d7 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_quant_param.md @@ -0,0 +1,92 @@ +# QuantParam + + +## 概述 + +量化参数结构体。 + +相关的公式如下,q为量化后的参数,r为真实参数,$ r_{max} $为待量化数据的最大值,$ r_{min} $待量化数据的最小值,$ round(x) $为x四舍五入取整,$ clamp(x,min,max) $为如下运算: + +$ \text{clamp}(x,min,max) = \begin{cases} \text{max} & \text{ if } x > \text{ max } \\ \text{min} & \text{ if } x < \text{ min } \\ x & \text{ otherwise } \\ \end{cases} $ + +- 浮点到定点的量化公式: + $ \text{q}(x_i) = clamp(round(\frac{r}{scale}+zeroPoint), min , max) $ + +- 定点到浮点的反量化公式: + $ \text{r}= (q-zeroPoint)\*scale $ + +- 量化参数scale由如下公式计算: + $ scale = \frac{r_{max}-r_{min}}{q_{max}-q_{min}} $ + +- 量化参数zeroPoint由如下公式计算: + $ zeroPoint = round(q_{min}-\frac{r_{min}}{scale}) $ + +- 量化参数 \( q_{min},q_{max} \) 如下公式计算: + $ q_{min} = -(1<<(numBits-1)) $ + + $ q_{max} = (1<<(numBits-1))-1 $ + +特殊情况:当$ r_{min} $和$ r_{max} $同时为0时,scale 和 zeroPoint均为0。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [numBits](#numbits) | int
量化的bit数 | +| [zeroPoint](#zeropoint) | int
零值 | +| [scale](#scale) | double
量化器的步长 | + + +## 类成员变量说明 + + +### numBits + + +``` +int QuantParam::numBits +``` + +**描述:** + +量化的bit数 + + +### scale + + +``` +double QuantParam::scale +``` + +**描述:** + +量化器的步长 + + +### zeroPoint + + +``` +int QuantParam::zeroPoint +``` + +**描述:** + +零值 diff --git a/zh-cn/device-dev/reference/hdi-apis/_r_g_b_color.md b/zh-cn/device-dev/reference/hdi-apis/_r_g_b_color.md index 2dad0607e021b2ba53ffc416191414cc21f9b20c..62f737aca9be537b4a6b4078c10ef768bf1c920e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_r_g_b_color.md +++ b/zh-cn/device-dev/reference/hdi-apis/_r_g_b_color.md @@ -1,37 +1,33 @@ # RGBColor -## **概述** +## 概述 定义灯的RGB模式。 **Since:** - 3.2 - **Version:** - 1.0 - **相关模块:** -[Light](light.md) +[Light](_light.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [brightness](#brightness) | 亮度值,范围为0-255。 | -| [r](#r) | 红色值,范围为0-255。 | -| [g](#g) | 绿色值,范围为0-255。 | -| [b](#b) | 蓝色值,范围为0-255。 | +| [brightness](#brightness) | int
亮度值,范围为0-255。  | +| [r](#r) | int
红色值,范围为0-255。  | +| [g](#g) | int
绿色值,范围为0-255。  | +| [b](#b) | int
蓝色值,范围为0-255。  | -## **类成员变量说明** +## 类成员变量说明 ### b @@ -40,9 +36,7 @@ ``` int RGBColor::b ``` - -**描述:** - +**描述:** 蓝色值,范围为0-255。 @@ -52,9 +46,7 @@ int RGBColor::b ``` int RGBColor::brightness ``` - -**描述:** - +**描述:** 亮度值,范围为0-255。 @@ -64,9 +56,7 @@ int RGBColor::brightness ``` int RGBColor::g ``` - -**描述:** - +**描述:** 绿色值,范围为0-255。 @@ -76,7 +66,5 @@ int RGBColor::g ``` int RGBColor::r ``` - -**描述:** - +**描述:** 红色值,范围为0-255。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_radio_protocol.md b/zh-cn/device-dev/reference/hdi-apis/_radio_protocol.md new file mode 100644 index 0000000000000000000000000000000000000000..a6a7b354d332c6d80e638ea805730a797215d73a --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_radio_protocol.md @@ -0,0 +1,112 @@ +# RadioProtocol + + +## 概述 + +主副卡协议栈信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [slotId](#slotid) | int
卡槽ID  | +| [sessionId](#sessionid) | int
会话ID  | +| [phase](#phase) | enum [RadioProtocolPhase](_ril.md#radioprotocolphase)
Radio协议参数,具体查看[RadioProtocolPhase](_ril.md#radioprotocolphase) | +| [technology](#technology) | int
Radio协议技术信息。 | +| [modemId](#modemid) | int
modem ID,底层与slotId的对应字段  | +| [status](#status) | enum [RadioProtocolStatus](_ril.md#radioprotocolstatus)
Radio协议状态,具体查看[RadioProtocolStatus](_ril.md#radioprotocolstatus) | + + +## 类成员变量说明 + + +### modemId + + +``` +int RadioProtocol::modemId +``` +**描述:** +modem ID,底层与slotId的对应字段 + + +### phase + + +``` +enum RadioProtocolPhase RadioProtocol::phase +``` +**描述:** +Radio协议参数,具体查看[RadioProtocolPhase](_ril.md#radioprotocolphase) + + +### sessionId + + +``` +int RadioProtocol::sessionId +``` +**描述:** +会话ID + + +### slotId + + +``` +int RadioProtocol::slotId +``` +**描述:** +卡槽ID + + +### status + + +``` +enum RadioProtocolStatus RadioProtocol::status +``` +**描述:** +Radio协议状态,具体查看[RadioProtocolStatus](_ril.md#radioprotocolstatus) + + +### technology + + +``` +int RadioProtocol::technology +``` +**描述:** +Radio协议技术信息。 + +- 1:GSM + +- 2:1XRTT + +- 4:WCDMA + +- 8:HSPA + +- 16:HSPAP + +- 32:TDSCDMA + +- 64:EVDO + +- 128:EHRPD + +- 256:LTE + +- 512:LTE_CA + +- 1024:IWLAN + +- 2048:NR diff --git a/zh-cn/device-dev/reference/hdi-apis/_range_value.md b/zh-cn/device-dev/reference/hdi-apis/_range_value.md index 5afe5c033bd0a41a78f7e27f7cfd3bcf030781a4..72fdae20b70884fbf8ea1cf61b387956a91380f0 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_range_value.md +++ b/zh-cn/device-dev/reference/hdi-apis/_range_value.md @@ -1,27 +1,27 @@ # RangeValue -## **概述** +## 概述 取值范围的定义。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [min](#min) | 最小值。 | -| [max](#max) | 最大值。 | +| [min](#min) | int32_t
最小值。  | +| [max](#max) | int32_t
最大值。  | -## **类成员变量说明** +## 类成员变量说明 ### max @@ -30,9 +30,7 @@ ``` int32_t RangeValue::max ``` - -**描述:** - +**描述:** 最大值。 @@ -42,7 +40,5 @@ int32_t RangeValue::max ``` int32_t RangeValue::min ``` - -**描述:** - +**描述:** 最小值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_rect.md b/zh-cn/device-dev/reference/hdi-apis/_rect.md index 350fd817c80e9404dfa0e74ba9fe4111432ec635..d9b9e5f6d1d126102d7459ff49d08a93d8fbad51 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_rect.md +++ b/zh-cn/device-dev/reference/hdi-apis/_rect.md @@ -1,27 +1,27 @@ # Rect -## **概述** +## 概述 矩形的定义。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [width](#width) | 矩形的宽。 | -| [height](#height) | 矩形的高。 | +| [width](#width) | int32_t
矩形的宽。  | +| [height](#height) | int32_t
矩形的高。  | -## **类成员变量说明** +## 类成员变量说明 ### height @@ -30,9 +30,7 @@ ``` int32_t Rect::height ``` - -**描述:** - +**描述:** 矩形的高。 @@ -42,7 +40,5 @@ int32_t Rect::height ``` int32_t Rect::width ``` - -**描述:** - +**描述:** 矩形的宽。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_rectangle.md b/zh-cn/device-dev/reference/hdi-apis/_rectangle.md index 3f26acf96fe0616a6adcca985d4fada805616e80..b74013266e8c0bd69af0c763508d2412fe01bf51 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_rectangle.md +++ b/zh-cn/device-dev/reference/hdi-apis/_rectangle.md @@ -1,7 +1,7 @@ # Rectangle -## **概述** +## 概述 矩形描述结构体定义,用于硬件加速绘制矩形。 @@ -10,12 +10,12 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [rect](_display.md#rect-13) | 矩形区域 | -| [color](_display.md#color-35) | 矩形颜色 | +| [rect](_display.md#rect-13) | [IRect](_i_rect.md)
矩形区域 | +| [color](_display.md#color-35) | uint32_t
矩形颜色 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_reduce_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_reduce_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..570e0a0ba78b22a7fff1a4caa5d4b1a6f388ed67 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_reduce_fusion.md @@ -0,0 +1,96 @@ +# ReduceFusion + + +## 概述 + +减小x张量的维度。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_REDUCE_FUSION。 + +参数说明:mode若为REDUCE_ALL,REDUCE_PROD和REDUCE_MEAN,则reduce_to_end为true时,Reduce之后的输出乘以coeff为最终输出。 + +输入: + +- x,n维tensor,n<8。 + +- axis,1维tensor,指定reduce的维度,axis中每个元素的取值范围为[-n,n)。 + +输出: + +- output,执行Reduce之后的m维的tensor,其数据类型和x相同。当keepDims为false时,m<n;当keepDims为true时,m==n。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [keepDims](#keepdims) | boolean
维度是否保持不变。 | +| [mode](#mode) | enum [ReduceMode](_n_n_rt.md#reducemode)
减小张量维度的算法,详情请参考:[ReduceMode](_n_n_rt.md#reducemode)。 | +| [reduceToEnd](#reducetoend) | boolean
如果为true,则从axis取第一个元素并设置为i,然后axis会被修改为[i,i+1,...,n-1,n]。 | +| [coeff](#coeff) | float
系数 | + + +## 类成员变量说明 + + +### coeff + + +``` +float ReduceFusion::coeff +``` + +**描述:** + +系数 + + +### keepDims + + +``` +boolean ReduceFusion::keepDims +``` + +**描述:** + +维度是否保持不变。 + + +### mode + + +``` +enum ReduceMode ReduceFusion::mode +``` + +**描述:** + +减小张量维度的算法,详情请参考:[ReduceMode](_n_n_rt.md#reducemode)。 + + +### reduceToEnd + + +``` +boolean ReduceFusion::reduceToEnd +``` + +**描述:** + +如果为true,则从axis取第一个元素并设置为i,然后axis会被修改为[i,i+1,...,n-1,n],例如reduceToEnd=True,axis=[2,4],x的维度为7,则axis会被修改为[2,3,4,5,6]。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_request_cell_db.md b/zh-cn/device-dev/reference/hdi-apis/_request_cell_db.md new file mode 100644 index 0000000000000000000000000000000000000000..ec93aed96cd31d76ab1d659528154d3a8f155aab --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_request_cell_db.md @@ -0,0 +1,65 @@ +# RequestCellDb + + +## 概述 + +定义请求基站离线数据库数据的数据结构。 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [requestSize](#requestsize) | int
请求基站离线数据库的大小。 | +| [location](#location) | struct [GeoLocationInfo](_geo_location_info.md)
设备最新的位置信息。详见[GeoLocationInfo](_geo_location_info.md)。 | +| [cellInfo](#cellinfo) | struct [GeofenceCellInfo](_geofence_cell_info.md)[]
设备最新的基站数据信息。详见[GeofenceCellInfo](_geofence_cell_info.md)。 | + + +## 类成员变量说明 + + +### cellInfo + + +``` +struct GeofenceCellInfo [] RequestCellDb::cellInfo +``` + +**描述:** + +设备最新的基站数据信息。详见[GeofenceCellInfo](_geofence_cell_info.md)。 + + +### location + + +``` +struct GeoLocationInfo RequestCellDb::location +``` + +**描述:** + +设备最新的位置信息。详见[GeoLocationInfo](_geo_location_info.md)。 + + +### requestSize + + +``` +int RequestCellDb::requestSize +``` + +**描述:** + +请求基站离线数据库的大小。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_reshape.md b/zh-cn/device-dev/reference/hdi-apis/_reshape.md new file mode 100644 index 0000000000000000000000000000000000000000..baf8cdffc29324904981c44b56fccfae250dbe58 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_reshape.md @@ -0,0 +1,26 @@ +# Reshape + + +## 概述 + +根据inputShape调整input的形状。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_RESHAPE。 + +输入: + +- x,一个n维输入tensor。 + +- InputShape,一个1维tensor,表示输出tensor的shape,需要是一个常量tensor。 + +输出: + +- output,数据类型和input一致,shape由inputShape决定。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_resize.md b/zh-cn/device-dev/reference/hdi-apis/_resize.md new file mode 100644 index 0000000000000000000000000000000000000000..c5d3c6c9c92ecddfa0e140401413d622b634e35d --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_resize.md @@ -0,0 +1,137 @@ +# Resize + + +## 概述 + +按给定的参数对输入的张量进行变形。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_RESIZE。 + +参数指导:该算子的参数组合可以实现常用的Resize函数。 例如,实现精确对齐图像的4个角的双线性插值则设置: method = RESIZE_METHOD_LINEAR coordinateTransformMode = COORDINATE_TRANSFORM_MODE_ALIGN_CORNERS + +输入: + +- x,一个4维tensor,tensor排布必须是[batchSize,height,width,channels](NHWC)。 + +输出: + +- output,n维输出tensor,它的的shape和数据类型与x相同。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [method](#method) | enum [ResizeMethod](_n_n_rt.md#resizemethod)
调整尺寸的方法,详情请参考:[ResizeMethod](_n_n_rt.md#resizemethod)。  | +| [newHeight](#newheight) | long
resize之后4维tensor的height值。  | +| [newWidth](#newwidth) | long
resize之后4维tensor的width值。  | +| [preserveAspectRatio](#preserveaspectratio) | boolean
一个布尔值,指示resize操作是否保持x张量的height/width比例。  | +| [coordinateTransformMode](#coordinatetransformmode) | enum [CoordinateTransformMode](_n_n_rt.md#coordinatetransformmode)
坐标变换方法,详情请参考:[CoordinateTransformMode](_n_n_rt.md#coordinatetransformmode)。  | +| [cubicCoeff](#cubiccoeff) | float
立方系数,当method为RESIZE_METHOD_CUBIC时使用。  | +| [excludeOutside](#excludeoutside) | long
当excludeOutside==1时,超出x的边界的采样权重被置为0,其余权重重新归一化处理。  | +| [extrapolationValue](#extrapolationvalue) | float
外插值,当仅用于裁剪x的时候使用,超出边界的采样权重被置为extrapolationValue。  | +| [nearestMode](#nearestmode) | enum [NearestMode](_n_n_rt.md#nearestmode)
最近邻近算法,当method==RESIZE_METHOD_NEAREST时使用,详情请参考:[NearestMode](_n_n_rt.md#nearestmode)。  | + + +## 类成员变量说明 + + +### coordinateTransformMode + + +``` +enum CoordinateTransformMode Resize::coordinateTransformMode +``` +**描述:** +坐标变换方法,详情请参考:[CoordinateTransformMode](_n_n_rt.md#coordinatetransformmode)。 + + +### cubicCoeff + + +``` +float Resize::cubicCoeff +``` +**描述:** +立方系数,当method为RESIZE_METHOD_CUBIC时使用。 + + +### excludeOutside + + +``` +long Resize::excludeOutside +``` +**描述:** +当excludeOutside==1时,超出x的边界的采样权重被置为0,其余权重重新归一化处理。 + + +### extrapolationValue + + +``` +float Resize::extrapolationValue +``` +**描述:** +外插值,当仅用于裁剪x的时候使用,超出边界的采样权重被置为extrapolationValue。 + + +### method + + +``` +enum ResizeMethod Resize::method +``` +**描述:** +调整尺寸的方法,详情请参考:[ResizeMethod](_n_n_rt.md#resizemethod)。 + + +### nearestMode + + +``` +enum NearestMode Resize::nearestMode +``` +**描述:** +最近邻近算法,当method==RESIZE_METHOD_NEAREST时使用,详情请参考:[NearestMode](_n_n_rt.md#nearestmode)。 + + +### newHeight + + +``` +long Resize::newHeight +``` +**描述:** +resize之后4维tensor的height值。 + + +### newWidth + + +``` +long Resize::newWidth +``` +**描述:** +resize之后4维tensor的width值。 + + +### preserveAspectRatio + + +``` +boolean Resize::preserveAspectRatio +``` +**描述:** +一个布尔值,指示resize操作是否保持x张量的height/width比例。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_ril.md b/zh-cn/device-dev/reference/hdi-apis/_ril.md new file mode 100644 index 0000000000000000000000000000000000000000..e9d2b614d899db9f92fc753a06ea5fb365bb93ae --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_ril.md @@ -0,0 +1,513 @@ +# Ril + + +## 概述 + +Ril模块接口定义。 + +Ril模块为上层电话服务提供相关调用接口,涉及电话、短信、彩信、网络搜索、SIM卡等功能接口及各种回调等。 + +**Since:** + +3.2 + +**Version:** + +1.0 + + +## 汇总 + + +### 文件 + +| 名称 | 描述 | +| -------- | -------- | +| [IRil.idl](_i_ril_8idl.md) | Ril模块的请求接口。 | +| [IRilCallback.idl](_i_ril_callback_8idl.md) | Ril模块的回调接口 | +| [Types.idl](_ril_types_8idl.md) | Ril模块HDI接口使用的数据类型。 | + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IRil](interface_i_ril.md) | interface
Ril模块的请求接口。 | +| [IRilCallback](interface_i_ril_callback.md) | interface
Ril模块的回调接口。 | +| [EmergencyCall](_emergency_call.md) | struct
紧急呼叫号码。 | +| [EmergencyInfoList](_emergency_info_list.md) | struct
紧急呼叫号码列表。 | +| [RilRadioResponseInfo](_ril_radio_response_info.md) | struct
响应通用信息。 | +| [SetupDataCallResultInfo](_setup_data_call_result_info.md) | struct
数据业务激活结果信息。 | +| [DataCallResultList](_data_call_result_list.md) | struct
数据业务激活结果列表。 | +| [DataProfileDataInfo](_data_profile_data_info.md) | struct
PDP上下文信息。 | +| [DataProfilesInfo](_data_profiles_info.md) | struct
PDP上下文信息列表。 | +| [DataCallInfo](_data_call_info.md) | struct
数据业务信息。 | +| [DataLinkBandwidthInfo](_data_link_bandwidth_info.md) | struct
网络频率信息。 | +| [DataLinkBandwidthReportingRule](_data_link_bandwidth_reporting_rule.md) | struct
网络频率上报规则。 | +| [DataPerformanceInfo](_data_performance_info.md) | struct
数据业务性能模式。 | +| [DataSleepInfo](_data_sleep_info.md) | struct
数据业务睡眠模式。 | +| [UniInfo](_uni_info.md) | struct
通用信息。 | +| [VoiceRadioTechnology](_voice_radio_technology.md) | struct
电路域接入技术。 | +| [DialInfo](_dial_info.md) | struct
拨号信息。 | +| [CallInfo](_call_info.md) | struct
通话状态信息。 | +| [CallInfoList](_call_info_list.md) | struct
通话状态信息列表。 | +| [GetClipResult](_get_clip_result.md) | struct
主叫号码显示结果信息。 | +| [GetClirResult](_get_clir_result.md) | struct
主叫号码显示限制结果信息。 | +| [CallWaitResult](_call_wait_result.md) | struct
呼叫等待结果信息。 | +| [CallRestrictionInfo](_call_restriction_info.md) | struct
呼叫限制信息。 | +| [CallRestrictionResult](_call_restriction_result.md) | struct
呼叫限制结果信息。 | +| [CallForwardSetInfo](_call_forward_set_info.md) | struct
呼叫转移信息。 | +| [CallForwardQueryResult](_call_forward_query_result.md) | struct
呼叫转移查询结果信息。 | +| [CallForwardQueryInfoList](_call_forward_query_info_list.md) | struct
呼叫转移信息列表。 | +| [UssdNoticeInfo](_ussd_notice_info.md) | struct
非结构化补充数据业务(USSD)业务信息。 | +| [SsNoticeInfo](_ss_notice_info.md) | struct
补充业务信息。 | +| [SrvccStatus](_srvcc_status.md) | struct
SRVCC(Single Radio Voice Call Continuity)状态信息。 | +| [RingbackVoice](_ringback_voice.md) | struct
回铃音信息。 | +| [DtmfInfo](_dtmf_info.md) | struct
发送双音多频(DTMF)信息。 | +| [SetBarringInfo](_set_barring_info.md) | struct
设置呼叫限制密码的信息。 | +| [CardStatusInfo](_card_status_info.md) | struct
SIM卡状态信息。 | +| [SimIoRequestInfo](_sim_io_request_info.md) | struct
SIM数据请求信息。 | +| [IccIoResultInfo](_icc_io_result_info.md) | struct
SIM数据的响应结果信息。 | +| [SimLockInfo](_sim_lock_info.md) | struct
SIM卡锁信息。 | +| [SimPasswordInfo](_sim_password_info.md) | struct
SIM卡密码信息。 | +| [SimPinInputTimes](_sim_pin_input_times.md) | struct
SIM密码输入次数信息。 | +| [ApduSimIORequestInfo](_apdu_sim_i_o_request_info.md) | struct
APDU数据传输请求信息。 | +| [SimAuthenticationRequestInfo](_sim_authentication_request_info.md) | struct
SIM卡鉴权请求信息。 | +| [OpenLogicalChannelResponse](_open_logical_channel_response.md) | struct
APDU打开逻辑通道响应信息。 | +| [LockStatusResp](_lock_status_resp.md) | struct
SIM卡解锁响应 | +| [RadioProtocol](_radio_protocol.md) | struct
主副卡协议栈信息。 | +| [GsmRssi](_gsm_rssi.md) | struct
GSM信号强度。 | +| [CdmaRssi](_cdma_rssi.md) | struct
CDMA信号强度。 | +| [WcdmaRssi](_wcdma_rssi.md) | struct
WCDMA信号强度。 | +| [LteRssi](_lte_rssi.md) | struct
LTE信号强度。 | +| [TdScdmaRssi](_td_scdma_rssi.md) | struct
TDSCDMA信号强度。 | +| [NrRssi](_nr_rssi.md) | struct
NR信号强度。 | +| [Rssi](_rssi.md) | struct
接收信号强度信息。 | +| [CsRegStatusInfo](_cs_reg_status_info.md) | struct
CS注册状态信息。 | +| [PsRegStatusInfo](_ps_reg_status_info.md) | struct
PS注册状态信息。 | +| [OperatorInfo](_operator_info.md) | struct
运营商信息。 | +| [AvailableNetworkInfo](_available_network_info.md) | struct
可用网络信息。 | +| [AvailableNetworkList](_available_network_list.md) | struct
可用网络列表。 | +| [SetNetworkModeInfo](_set_network_mode_info.md) | struct
设置网络模式信息。 | +| [CellListRatGsm](_cell_list_rat_gsm.md) | struct
GSM小区信息。 | +| [CellListRatLte](_cell_list_rat_lte.md) | struct
LTE小区信息。 | +| [CellListRatWcdma](_cell_list_rat_wcdma.md) | struct
WCDMA小区信息。 | +| [CellListRatCdma](_cell_list_rat_cdma.md) | struct
CDMA小区信息。 | +| [CellListRatTdscdma](_cell_list_rat_tdscdma.md) | struct
TDSCDMA小区信息。 | +| [CellListRatNr](_cell_list_rat_nr.md) | struct
NR小区信息。 | +| [ServiceCellParas](union_service_cell_paras.md) | union
多种网络模式的小区信息。 | +| [CellNearbyInfo](_cell_nearby_info.md) | struct
相邻小区信息。 | +| [CellListNearbyInfo](_cell_list_nearby_info.md) | struct
附近小区信息列表。 | +| [CellRatGsm](_cell_rat_gsm.md) | struct
GSM蜂窝信息。 | +| [CellRatLte](_cell_rat_lte.md) | struct
LTE蜂窝信息。 | +| [CellRatWcdma](_cell_rat_wcdma.md) | struct
WCDMA蜂窝信息。 | +| [CellRatCdma](_cell_rat_cdma.md) | struct
CDMA蜂窝信息。 | +| [CellRatTdscdma](_cell_rat_tdscdma.md) | struct
TDSCDMA蜂窝信息。 | +| [CellRatNr](_cell_rat_nr.md) | struct
NR蜂窝信息。 | +| [CurrentServiceCellParas](union_current_service_cell_paras.md) | union
当前蜂窝数据信息。 | +| [CurrentCellInfo](_current_cell_info.md) | struct
当前小区信息。 | +| [CellListCurrentInfo](_cell_list_current_info.md) | struct
当前小区信息列表。 | +| [PreferredNetworkTypeInfo](_preferred_network_type_info.md) | struct
首选网络类型信息。 | +| [PhysicalChannelConfig](_physical_channel_config.md) | struct
物理通道配置。 | +| [ChannelConfigInfoList](_channel_config_info_list.md) | struct
通道配置信息列表。 | +| [GsmSmsMessageInfo](_gsm_sms_message_info.md) | struct
发送GSM短信信息。 | +| [SendCdmaSmsMessageInfo](_send_cdma_sms_message_info.md) | struct
发送CDMA短信信息。 | +| [SmsMessageIOInfo](_sms_message_i_o_info.md) | struct
SIM卡短信信息 | +| [ServiceCenterAddress](_service_center_address.md) | struct
短信中心地址信息。 | +| [CBConfigInfo](_c_b_config_info.md) | struct
GSM小区广播配置信息。 | +| [CdmaCBConfigInfo](_cdma_c_b_config_info.md) | struct
CDMA小区广播配置信息。 | +| [CdmaCBConfigInfoList](_cdma_c_b_config_info_list.md) | struct
CDMA小区广播配置信息列表。 | +| [CBConfigReportInfo](_c_b_config_report_info.md) | struct
小区广播上报信息。 | +| [SmsMessageInfo](_sms_message_info.md) | struct
上报短信信息。 | +| [ModeData](_mode_data.md) | struct
接收短信处理模式。 | +| [SendSmsResultInfo](_send_sms_result_info.md) | struct
发送短信响应信息。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [EccType](#ecctype) {
TYPE_CATEGORY = 0 , TYPE_POLICE = 1 , TYPE_AMBULANCE = 2 , TYPE_FIRE = 4 ,TYPE_SEA = 8 , TYPE_MOUNTAIN = 16
} | 紧急呼叫类型。 | +| [SimpresentType](#simpresenttype) { TYPE_NO_CARD = 0 , TYPE_HAS_CARD = 1 } | 表示号码是有卡时有效还是无卡时有效。 | +| [AbnormalServiceType](#abnormalservicetype) { TYPE_ALL = 0 , TYPE_ONLY_CS = 1 } | 表示号码有效性是否区分电路(CS)域非正常服务状态。 | +| [RilErrType](#rilerrtype) {
NONE = 0 , RIL_ERR_GENERIC_FAILURE = 1 , RIL_ERR_INVALID_PARAMETER = 2 , RIL_ERR_MEMORY_FULL = 3 ,
RIL_ERR_CMD_SEND_FAILURE = 4 , RIL_ERR_CMD_NO_CARRIER = 5 , RIL_ERR_INVALID_RESPONSE = 6 , RIL_ERR_REPEAT_STATUS = 7 ,
RIL_ERR_NETWORK_SEARCHING = 8 , RIL_ERR_NETWORK_SEARCHING_INTERRUPTED = 9 , RIL_ERR_MODEM_DEVICE_CLOSE = 10 , RIL_ERR_NO_SIMCARD_INSERTED = 11 , RIL_ERR_NEED_PIN_CODE = 12 , RIL_ERR_NEED_PUK_CODE = 13 , RIL_ERR_NETWORK_SEARCH_TIMEOUT = 14 , RIL_ERR_PINPUK_PASSWORD_NOCORRECT = 15 ,
RIL_ERR_INVALID_MODEM_PARAMETER = 50 , RIL_ERR_HDF_IPC_FAILURE = 300 , RIL_ERR_NULL_POINT = 301 , RIL_ERR_VENDOR_NOT_IMPLEMENT = 302
} | Ril错误码。 | +| [RilResponseTypes](#rilresponsetypes) {
RIL_RESPONSE_REQUEST = 0 , RIL_RESPONSE_NOTICE = 1 , RIL_RESPONSE_REQUEST_ACK = 2 , RIL_RESPONSE_REQUEST_MUST_ACK = 3 , RIL_RESPONSE_NOTICE_MUST_ACK = 4
} | 响应类型。 | +| [RilSrvStatus](#rilsrvstatus) {
RIL_NO_SRV_SERVICE = 0 , RIL_RESTRICTED_SERVICE = 1 , RIL_SERVICE_VALID = 2 , RIL_REGIONAL_SERVICE = 3 , RIL_ENERGY_SAVING_SERVICE = 4
} | Ril系统服务状态。 | +| [RilSrvDomain](#rilsrvdomain) {
RIL_NO_DOMAIN_SERVICE = 0 , RIL_CS_SERVICE = 1 , RIL_PS_SERVICE = 2 , RIL_CS_PS_SERVICE = 3 , RIL_CS_PS_SEARCHING = 4 , RIL_CDMA_NOT_SUPPORT = 255
} | 系统服务域。 | +| [RilRoamStatus](#rilroamstatus) { RIL_NO_ROAM = 0 , RIL_ROAMING = 1 , RIL_ROAM_UNKNOWN = 2 } | 漫游状态。 | +| [RilSimLockStatus](#rilsimlockstatus) { RIL_SIM_CARD_UNLOCK = 0 , RIL_SIM_CARD_LOCK = 1 } | SIM卡锁定状态。 | +| [RilSysMode](#rilsysmode) {
RIL_NO_SYSMODE_SERVICE = 0 , RIL_GSM_MODE = 1 , RIL_CDMA_MODE = 2 , RIL_WCDMA_MODE = 3 , RIL_TDSCDMA_MODE = 4 , RIL_WIMAX_MODE = 5 , RIL_LTE_MODE = 6 , RIL_LTE_CA_MODE = 7 , RIL_NR_MODE = 8
} | 系统制式。 | +| [RilRadioTech](#rilradiotech) {
RADIO_TECHNOLOGY_INVALID = 65535 , RADIO_TECHNOLOGY_UNKNOWN = 0 , RADIO_TECHNOLOGY_GSM = 1 , RADIO_TECHNOLOGY_1XRTT = 2 , RADIO_TECHNOLOGY_WCDMA = 3 , RADIO_TECHNOLOGY_HSPA = 4 , RADIO_TECHNOLOGY_HSPAP = 5 , RADIO_TECHNOLOGY_TD_SCDMA = 6 , RADIO_TECHNOLOGY_EVDO = 7 , RADIO_TECHNOLOGY_EHRPD = 8 , RADIO_TECHNOLOGY_LTE = 9 , RADIO_TECHNOLOGY_LTE_CA = 10 , RADIO_TECHNOLOGY_IWLAN = 11 , RADIO_TECHNOLOGY_NR = 12
} | 语音接入技术类型。 | +| [RilSimStatus](#rilsimstatus) {
RIL_USIM_INVALID = 0 , RIL_USIM_VALID = 1 , RIL_USIM_CS_INVALID = 2 , RIL_USIM_PS_INVALID = 3 , RIL_USIM_CS_PS_INVALID = 4 , RIL_ROM_SIM = 240 , RIL_NO_USIM = 255
} | SIM卡状态。 | +| [RilRegStatus](#rilregstatus) {
NO_REG_MT_NO_SEARCH = 0 , REG_MT_HOME = 1 , NO_REG_MT_SEARCHING = 2 , REG_MT_REJECTED = 3 , REG_MT_UNKNOWN = 4 , REG_MT_ROAMING = 5 , REG_MT_EMERGENCY = 6
} | 描述网络注册状态。 | +| [RilCellConnectionStatus](#rilcellconnectionstatus) { RIL_SERVING_CELL_UNKNOWN = 0 , RIL_SERVING_CELL_PRIMARY = 1 , RIL_SERVING_CELL_SECONDARY = 2 } | 小区连接状态。 | +| [RilRegNotifyMode](#rilregnotifymode) { REG_NOT_NOTIFY = 0 , REG_NOTIFY_STAT_ONLY = 1 , REG_NOTIFY_STAT_LAC_CELLID = 2 } | 上报模式。 | +| [RadioProtocolPhase](#radioprotocolphase) {
RADIO_PROTOCOL_PHASE_INITIAL , RADIO_PROTOCOL_PHASE_CHECK , RADIO_PROTOCOL_PHASE_UPDATE , RADIO_PROTOCOL_PHASE_NOTIFY , RADIO_PROTOCOL_PHASE_COMPLETE
} | 设置Radio协议动作参数。 | +| [RadioProtocolStatus](#radioprotocolstatus) { RADIO_PROTOCOL_STATUS_NONE , RADIO_PROTOCOL_STATUS_SUCCESS , RADIO_PROTOCOL_STATUS_FAIL } | Radio协议状态。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.ril.v1_0 | Ril模块接口的包路径。 | + + +## 枚举类型说明 + + +### AbnormalServiceType + + +``` +enum AbnormalServiceType +``` + +**描述:** + +表示号码有效性是否区分电路(CS)域非正常服务状态。 + + | 枚举值 | 描述 | +| -------- | -------- | +| TYPE_ALL | 所有状态均有效 | +| TYPE_ONLY_CS | 仅在CS域非正常服务时有效 | + + +### EccType + + +``` +enum EccType +``` + +**描述:** + +紧急呼叫类型。 + + | 枚举值 | 描述 | +| -------- | -------- | +| TYPE_CATEGORY | 默认 | +| TYPE_POLICE | 匪警 | +| TYPE_AMBULANCE | 救护 | +| TYPE_FIRE | 火警 | +| TYPE_SEA | 海警 | +| TYPE_MOUNTAIN | 高山营救 | + + +### RadioProtocolPhase + + +``` +enum RadioProtocolPhase +``` + +**描述:** + +设置Radio协议动作参数。 + + | 枚举值 | 描述 | +| -------- | -------- | +| RADIO_PROTOCOL_PHASE_INITIAL | 初始化 | +| RADIO_PROTOCOL_PHASE_CHECK | 检查 | +| RADIO_PROTOCOL_PHASE_UPDATE | 更新 | +| RADIO_PROTOCOL_PHASE_NOTIFY | 上报 | +| RADIO_PROTOCOL_PHASE_COMPLETE | 结束 | + + +### RadioProtocolStatus + + +``` +enum RadioProtocolStatus +``` + +**描述:** + +Radio协议状态。 + + | 枚举值 | 描述 | +| -------- | -------- | +| RADIO_PROTOCOL_STATUS_NONE | 无状态 | +| RADIO_PROTOCOL_STATUS_SUCCESS | 成功 | +| RADIO_PROTOCOL_STATUS_FAIL | 失败 | + + +### RilCellConnectionStatus + + +``` +enum RilCellConnectionStatus +``` + +**描述:** + +小区连接状态。 + + | 枚举值 | 描述 | +| -------- | -------- | +| RIL_SERVING_CELL_UNKNOWN | 未知连接状态 | +| RIL_SERVING_CELL_PRIMARY | 主要连接状态 | +| RIL_SERVING_CELL_SECONDARY | 次要连接状态 | + + +### RilErrType + + +``` +enum RilErrType +``` + +**描述:** + +Ril错误码。 + + | 枚举值 | 描述 | +| -------- | -------- | +| NONE | 调用成功 | +| RIL_ERR_GENERIC_FAILURE | 通用错误 | +| RIL_ERR_INVALID_PARAMETER | 参数错误 | +| RIL_ERR_MEMORY_FULL | 内存满载 | +| RIL_ERR_CMD_SEND_FAILURE | 命令发送失败 | +| RIL_ERR_CMD_NO_CARRIER | 命令连接终止 | +| RIL_ERR_INVALID_RESPONSE | 非法响应 | +| RIL_ERR_REPEAT_STATUS | 状态已存在 | +| RIL_ERR_NETWORK_SEARCHING | 网络搜索中 | +| RIL_ERR_NETWORK_SEARCHING_INTERRUPTED | 网络搜索中断 | +| RIL_ERR_MODEM_DEVICE_CLOSE | Modem设备关闭 | +| RIL_ERR_NO_SIMCARD_INSERTED | SIM卡未插入 | +| RIL_ERR_NEED_PIN_CODE | 需要输入PIN码 | +| RIL_ERR_NEED_PUK_CODE | 需要输入PUK码 | +| RIL_ERR_NETWORK_SEARCH_TIMEOUT | 搜网超时 | +| RIL_ERR_PINPUK_PASSWORD_NOCORRECT | PIN码或PUK码错误 | +| RIL_ERR_INVALID_MODEM_PARAMETER | Modem参数错误 | +| RIL_ERR_HDF_IPC_FAILURE | IPC错误 | +| RIL_ERR_NULL_POINT | 空指针 | +| RIL_ERR_VENDOR_NOT_IMPLEMENT | 厂商库未实现 | + + +### RilRadioTech + + +``` +enum RilRadioTech +``` + +**描述:** + +语音接入技术类型。 + + | 枚举值 | 描述 | +| -------- | -------- | +| RADIO_TECHNOLOGY_INVALID | 非法 | +| RADIO_TECHNOLOGY_UNKNOWN | 未知 | +| RADIO_TECHNOLOGY_GSM | GSM | +| RADIO_TECHNOLOGY_1XRTT | 无线电传输技术(1XRTT) | +| RADIO_TECHNOLOGY_WCDMA | WCDMA | +| RADIO_TECHNOLOGY_HSPA | 高速分组接入(HSPA) | +| RADIO_TECHNOLOGY_HSPAP | 高速下行分组接入(HSPAP) | +| RADIO_TECHNOLOGY_TD_SCDMA | 同步码分多址的无线接入技术(SCDMA) | +| RADIO_TECHNOLOGY_EVDO | 仅演进数据(EVDO) | +| RADIO_TECHNOLOGY_EHRPD | 演进的高速分组网络(EHRPD) | +| RADIO_TECHNOLOGY_LTE | LTE | +| RADIO_TECHNOLOGY_LTE_CA | CA | +| RADIO_TECHNOLOGY_IWLAN | 工业无线局域网(IWLAN) | +| RADIO_TECHNOLOGY_NR | NR | + + +### RilRegNotifyMode + + +``` +enum RilRegNotifyMode +``` + +**描述:** + +上报模式。 + + | 枚举值 | 描述 | +| -------- | -------- | +| REG_NOT_NOTIFY | 禁止主动上报 | +| REG_NOTIFY_STAT_ONLY | 网络注册状态发生改变时上报 | +| REG_NOTIFY_STAT_LAC_CELLID | 小区信息发生改变时上报 | + + +### RilRegStatus + + +``` +enum RilRegStatus +``` + +**描述:** + +描述网络注册状态。 + + | 枚举值 | 描述 | +| -------- | -------- | +| NO_REG_MT_NO_SEARCH | 没有注册,MT(Mobile Terminal)现在没有搜索和注册新的运营商 | +| REG_MT_HOME | 注册了归属网络 | +| NO_REG_MT_SEARCHING | 没有注册,MT正在搜索并注册新的运营商 | +| REG_MT_REJECTED | 注册被拒绝 | +| REG_MT_UNKNOWN | 未知状态 | +| REG_MT_ROAMING | 注册了漫游网络 | +| REG_MT_EMERGENCY | 处于紧急模式 | + + +### RilResponseTypes + + +``` +enum RilResponseTypes +``` + +**描述:** + +响应类型。 + + | 枚举值 | 描述 | +| -------- | -------- | +| RIL_RESPONSE_REQUEST | 请求响应 | +| RIL_RESPONSE_NOTICE | 通知响应 | +| RIL_RESPONSE_REQUEST_ACK | 应答请求响应 | +| RIL_RESPONSE_REQUEST_MUST_ACK | 必须应答请求响应 | +| RIL_RESPONSE_NOTICE_MUST_ACK | 必须应答通知响应 | + + +### RilRoamStatus + + +``` +enum RilRoamStatus +``` + +**描述:** + +漫游状态。 + + | 枚举值 | 描述 | +| -------- | -------- | +| RIL_NO_ROAM | 非漫游状态 | +| RIL_ROAMING | 漫游状态 | +| RIL_ROAM_UNKNOWN | 未知 | + + +### RilSimLockStatus + + +``` +enum RilSimLockStatus +``` + +**描述:** + +SIM卡锁定状态。 + + | 枚举值 | 描述 | +| -------- | -------- | +| RIL_SIM_CARD_UNLOCK | 未被CardLock功能锁定 | +| RIL_SIM_CARD_LOCK | 被CardLock功能锁定 | + + +### RilSimStatus + + +``` +enum RilSimStatus +``` + +**描述:** + +SIM卡状态。 + + | 枚举值 | 描述 | +| -------- | -------- | +| RIL_USIM_INVALID | USIM卡状态无效 | +| RIL_USIM_VALID | USIM卡状态有效 | +| RIL_USIM_CS_INVALID | USIM卡在CS下无效 | +| RIL_USIM_PS_INVALID | USIM卡在PS下无效 | +| RIL_USIM_CS_PS_INVALID | USIM卡在CS+PS下均无效 | +| RIL_ROM_SIM | 仿真SIM卡 | +| RIL_NO_USIM | USIM卡不存在 | + + +### RilSrvDomain + + +``` +enum RilSrvDomain +``` + +**描述:** + +系统服务域。 + + | 枚举值 | 描述 | +| -------- | -------- | +| RIL_NO_DOMAIN_SERVICE | 无服务 | +| RIL_CS_SERVICE | 仅CS服务 | +| RIL_PS_SERVICE | 仅分组(PS)服务 | +| RIL_CS_PS_SERVICE | CS+PS服务 | +| RIL_CS_PS_SEARCHING | CS、PS均未注册 | +| RIL_CDMA_NOT_SUPPORT | CDMA不支持 | + + +### RilSrvStatus + + +``` +enum RilSrvStatus +``` + +**描述:** + +Ril系统服务状态。 + + | 枚举值 | 描述 | +| -------- | -------- | +| RIL_NO_SRV_SERVICE | 无服务 | +| RIL_RESTRICTED_SERVICE | 有限制服务 | +| RIL_SERVICE_VALID | 服务有效 | +| RIL_REGIONAL_SERVICE | 有限制的区域服务 | +| RIL_ENERGY_SAVING_SERVICE | 省电和睡眠状态 | + + +### RilSysMode + + +``` +enum RilSysMode +``` + +**描述:** + +系统制式。 + + | 枚举值 | 描述 | +| -------- | -------- | +| RIL_NO_SYSMODE_SERVICE | 服务不存在 | +| RIL_GSM_MODE | 全球移动通信系统 (GSM) | +| RIL_CDMA_MODE | 码分多址(CDMA) | +| RIL_WCDMA_MODE | 宽带码分多址(WCDMA) | +| RIL_TDSCDMA_MODE | 时分同步码分多址(TDSCDMA) | +| RIL_WIMAX_MODE | 全球微波接入互操作性(WIMAX) | +| RIL_LTE_MODE | 长期演进(LTE) | +| RIL_LTE_CA_MODE | 载波聚合(CA) | +| RIL_NR_MODE | 5G新空口(NR) | + + +### SimpresentType + + +``` +enum SimpresentType +``` + +**描述:** + +表示号码是有卡时有效还是无卡时有效。 + + | 枚举值 | 描述 | +| -------- | -------- | +| TYPE_NO_CARD | 无卡时有效 | +| TYPE_HAS_CARD | 有卡时有效 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_ril_radio_response_info.md b/zh-cn/device-dev/reference/hdi-apis/_ril_radio_response_info.md new file mode 100644 index 0000000000000000000000000000000000000000..4dfc1d34da4ef1d864d5c4877e4ad49076d4f2d5 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_ril_radio_response_info.md @@ -0,0 +1,77 @@ +# RilRadioResponseInfo + + +## 概述 + +响应通用信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [slotId](#slotid) | int
卡槽ID  | +| [flag](#flag) | int
响应标识  | +| [serial](#serial) | int
请求的序列号  | +| [error](#error) | enum [RilErrType](_ril.md#rilerrtype)
错误码  | +| [type](#type) | enum [RilResponseTypes](_ril.md#rilresponsetypes)
响应类型,具体查看[RilResponseTypes](_ril.md#rilresponsetypes) | + + +## 类成员变量说明 + + +### error + + +``` +enum RilErrType RilRadioResponseInfo::error +``` +**描述:** +错误码 + + +### flag + + +``` +int RilRadioResponseInfo::flag +``` +**描述:** +响应标识 + + +### serial + + +``` +int RilRadioResponseInfo::serial +``` +**描述:** +请求的序列号 + + +### slotId + + +``` +int RilRadioResponseInfo::slotId +``` +**描述:** +卡槽ID + + +### type + + +``` +enum RilResponseTypes RilRadioResponseInfo::type +``` +**描述:** +响应类型,具体查看[RilResponseTypes](_ril.md#rilresponsetypes) diff --git a/zh-cn/device-dev/reference/hdi-apis/_ril_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_ril_types_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..c615cf1657d723fed7b7f5b087374091c114e864 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_ril_types_8idl.md @@ -0,0 +1,144 @@ +# Types.idl + + +## 概述 + +Ril模块HDI接口使用的数据类型。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [EmergencyCall](_emergency_call.md) | struct
紧急呼叫号码。 | +| [EmergencyInfoList](_emergency_info_list.md) | struct
紧急呼叫号码列表。 | +| [RilRadioResponseInfo](_ril_radio_response_info.md) | struct
响应通用信息。 | +| [SetupDataCallResultInfo](_setup_data_call_result_info.md) | struct
数据业务激活结果信息。 | +| [DataCallResultList](_data_call_result_list.md) | struct
数据业务激活结果列表。 | +| [DataProfileDataInfo](_data_profile_data_info.md) | struct
PDP上下文信息。 | +| [DataProfilesInfo](_data_profiles_info.md) | struct
PDP上下文信息列表。 | +| [DataCallInfo](_data_call_info.md) | struct
数据业务信息。 | +| [DataLinkBandwidthInfo](_data_link_bandwidth_info.md) | struct
网络频率信息。 | +| [DataLinkBandwidthReportingRule](_data_link_bandwidth_reporting_rule.md) | struct
网络频率上报规则。 | +| [DataPerformanceInfo](_data_performance_info.md) | struct
数据业务性能模式。 | +| [DataSleepInfo](_data_sleep_info.md) | struct
数据业务睡眠模式。 | +| [UniInfo](_uni_info.md) | struct
通用信息。 | +| [VoiceRadioTechnology](_voice_radio_technology.md) | struct
电路域接入技术。 | +| [DialInfo](_dial_info.md) | struct
拨号信息。 | +| [CallInfo](_call_info.md) | struct
通话状态信息。 | +| [CallInfoList](_call_info_list.md) | struct
通话状态信息列表。 | +| [GetClipResult](_get_clip_result.md) | struct
主叫号码显示结果信息。 | +| [GetClirResult](_get_clir_result.md) | struct
主叫号码显示限制结果信息。 | +| [CallWaitResult](_call_wait_result.md) | struct
呼叫等待结果信息。 | +| [CallRestrictionInfo](_call_restriction_info.md) | struct
呼叫限制信息。 | +| [CallRestrictionResult](_call_restriction_result.md) | struct
呼叫限制结果信息。 | +| [CallForwardSetInfo](_call_forward_set_info.md) | struct
呼叫转移信息。 | +| [CallForwardQueryResult](_call_forward_query_result.md) | struct
呼叫转移查询结果信息。 | +| [CallForwardQueryInfoList](_call_forward_query_info_list.md) | struct
呼叫转移信息列表。 | +| [UssdNoticeInfo](_ussd_notice_info.md) | struct
非结构化补充数据业务(USSD)业务信息。 | +| [SsNoticeInfo](_ss_notice_info.md) | struct
补充业务信息。 | +| [SrvccStatus](_srvcc_status.md) | struct
SRVCC(Single Radio Voice Call Continuity)状态信息。 | +| [RingbackVoice](_ringback_voice.md) | struct
回铃音信息。 | +| [DtmfInfo](_dtmf_info.md) | struct
发送双音多频(DTMF)信息。 | +| [SetBarringInfo](_set_barring_info.md) | struct
设置呼叫限制密码的信息。 | +| [CardStatusInfo](_card_status_info.md) | struct
SIM卡状态信息。 | +| [SimIoRequestInfo](_sim_io_request_info.md) | struct
SIM数据请求信息。 | +| [IccIoResultInfo](_icc_io_result_info.md) | struct
SIM数据的响应结果信息。 | +| [SimLockInfo](_sim_lock_info.md) | struct
SIM卡锁信息。 | +| [SimPasswordInfo](_sim_password_info.md) | struct
SIM卡密码信息。 | +| [SimPinInputTimes](_sim_pin_input_times.md) | struct
SIM密码输入次数信息。 | +| [ApduSimIORequestInfo](_apdu_sim_i_o_request_info.md) | struct
APDU数据传输请求信息。 | +| [SimAuthenticationRequestInfo](_sim_authentication_request_info.md) | struct
SIM卡鉴权请求信息。 | +| [OpenLogicalChannelResponse](_open_logical_channel_response.md) | struct
APDU打开逻辑通道响应信息。 | +| [LockStatusResp](_lock_status_resp.md) | struct
SIM卡解锁响应 | +| [RadioProtocol](_radio_protocol.md) | struct
主副卡协议栈信息。 | +| [GsmRssi](_gsm_rssi.md) | struct
GSM信号强度。 | +| [CdmaRssi](_cdma_rssi.md) | struct
CDMA信号强度。 | +| [WcdmaRssi](_wcdma_rssi.md) | struct
WCDMA信号强度。 | +| [LteRssi](_lte_rssi.md) | struct
LTE信号强度。 | +| [TdScdmaRssi](_td_scdma_rssi.md) | struct
TDSCDMA信号强度。 | +| [NrRssi](_nr_rssi.md) | struct
NR信号强度。 | +| [Rssi](_rssi.md) | struct
接收信号强度信息。 | +| [CsRegStatusInfo](_cs_reg_status_info.md) | struct
CS注册状态信息。 | +| [PsRegStatusInfo](_ps_reg_status_info.md) | struct
PS注册状态信息。 | +| [OperatorInfo](_operator_info.md) | struct
运营商信息。 | +| [AvailableNetworkInfo](_available_network_info.md) | struct
可用网络信息。 | +| [AvailableNetworkList](_available_network_list.md) | struct
可用网络列表。 | +| [SetNetworkModeInfo](_set_network_mode_info.md) | struct
设置网络模式信息。 | +| [CellListRatGsm](_cell_list_rat_gsm.md) | struct
GSM小区信息。 | +| [CellListRatLte](_cell_list_rat_lte.md) | struct
LTE小区信息。 | +| [CellListRatWcdma](_cell_list_rat_wcdma.md) | struct
WCDMA小区信息。 | +| [CellListRatCdma](_cell_list_rat_cdma.md) | struct
CDMA小区信息。 | +| [CellListRatTdscdma](_cell_list_rat_tdscdma.md) | struct
TDSCDMA小区信息。 | +| [CellListRatNr](_cell_list_rat_nr.md) | struct
NR小区信息。 | +| [ServiceCellParas](union_service_cell_paras.md) | union
多种网络模式的小区信息。 | +| [CellNearbyInfo](_cell_nearby_info.md) | struct
相邻小区信息。 | +| [CellListNearbyInfo](_cell_list_nearby_info.md) | struct
附近小区信息列表。 | +| [CellRatGsm](_cell_rat_gsm.md) | struct
GSM蜂窝信息。 | +| [CellRatLte](_cell_rat_lte.md) | struct
LTE蜂窝信息。 | +| [CellRatWcdma](_cell_rat_wcdma.md) | struct
WCDMA蜂窝信息。 | +| [CellRatCdma](_cell_rat_cdma.md) | struct
CDMA蜂窝信息。 | +| [CellRatTdscdma](_cell_rat_tdscdma.md) | struct
TDSCDMA蜂窝信息。 | +| [CellRatNr](_cell_rat_nr.md) | struct
NR蜂窝信息。 | +| [CurrentServiceCellParas](union_current_service_cell_paras.md) | union
当前蜂窝数据信息。 | +| [CurrentCellInfo](_current_cell_info.md) | struct
当前小区信息。 | +| [CellListCurrentInfo](_cell_list_current_info.md) | struct
当前小区信息列表。 | +| [PreferredNetworkTypeInfo](_preferred_network_type_info.md) | struct
首选网络类型信息。 | +| [PhysicalChannelConfig](_physical_channel_config.md) | struct
物理通道配置。 | +| [ChannelConfigInfoList](_channel_config_info_list.md) | struct
通道配置信息列表。 | +| [GsmSmsMessageInfo](_gsm_sms_message_info.md) | struct
发送GSM短信信息。 | +| [SendCdmaSmsMessageInfo](_send_cdma_sms_message_info.md) | struct
发送CDMA短信信息。 | +| [SmsMessageIOInfo](_sms_message_i_o_info.md) | struct
SIM卡短信信息 | +| [ServiceCenterAddress](_service_center_address.md) | struct
短信中心地址信息。 | +| [CBConfigInfo](_c_b_config_info.md) | struct
GSM小区广播配置信息。 | +| [CdmaCBConfigInfo](_cdma_c_b_config_info.md) | struct
CDMA小区广播配置信息。 | +| [CdmaCBConfigInfoList](_cdma_c_b_config_info_list.md) | struct
CDMA小区广播配置信息列表。 | +| [CBConfigReportInfo](_c_b_config_report_info.md) | struct
小区广播上报信息。 | +| [SmsMessageInfo](_sms_message_info.md) | struct
上报短信信息。 | +| [ModeData](_mode_data.md) | struct
接收短信处理模式。 | +| [SendSmsResultInfo](_send_sms_result_info.md) | struct
发送短信响应信息。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [EccType](_ril.md#ecctype) {
TYPE_CATEGORY = 0 , TYPE_POLICE = 1 , TYPE_AMBULANCE = 2 , TYPE_FIRE = 4 ,TYPE_SEA = 8 , TYPE_MOUNTAIN = 16
} | 紧急呼叫类型。 | +| [SimpresentType](_ril.md#simpresenttype) { TYPE_NO_CARD = 0 , TYPE_HAS_CARD = 1 } | 表示号码是有卡时有效还是无卡时有效。 | +| [AbnormalServiceType](_ril.md#abnormalservicetype) { TYPE_ALL = 0 , TYPE_ONLY_CS = 1 } | 表示号码有效性是否区分电路(CS)域非正常服务状态。 | +| [RilErrType](_ril.md#rilerrtype) {
NONE = 0 , RIL_ERR_GENERIC_FAILURE = 1 , RIL_ERR_INVALID_PARAMETER = 2 , RIL_ERR_MEMORY_FULL = 3 ,
RIL_ERR_CMD_SEND_FAILURE = 4 , RIL_ERR_CMD_NO_CARRIER = 5 , RIL_ERR_INVALID_RESPONSE = 6 , RIL_ERR_REPEAT_STATUS = 7 ,
RIL_ERR_NETWORK_SEARCHING = 8 , RIL_ERR_NETWORK_SEARCHING_INTERRUPTED = 9 , RIL_ERR_MODEM_DEVICE_CLOSE = 10 , RIL_ERR_NO_SIMCARD_INSERTED = 11 , RIL_ERR_NEED_PIN_CODE = 12 , RIL_ERR_NEED_PUK_CODE = 13 , RIL_ERR_NETWORK_SEARCH_TIMEOUT = 14 , RIL_ERR_PINPUK_PASSWORD_NOCORRECT = 15 ,
RIL_ERR_INVALID_MODEM_PARAMETER = 50 , RIL_ERR_HDF_IPC_FAILURE = 300 , RIL_ERR_NULL_POINT = 301 , RIL_ERR_VENDOR_NOT_IMPLEMENT = 302
} | Ril错误码。 | +| [RilResponseTypes](_ril.md#rilresponsetypes) {
RIL_RESPONSE_REQUEST = 0 , RIL_RESPONSE_NOTICE = 1 , RIL_RESPONSE_REQUEST_ACK = 2 , RIL_RESPONSE_REQUEST_MUST_ACK = 3 , RIL_RESPONSE_NOTICE_MUST_ACK = 4
} | 响应类型。 | +| [RilSrvStatus](_ril.md#rilsrvstatus) {
RIL_NO_SRV_SERVICE = 0 , RIL_RESTRICTED_SERVICE = 1 , RIL_SERVICE_VALID = 2 , RIL_REGIONAL_SERVICE = 3 , RIL_ENERGY_SAVING_SERVICE = 4
} | Ril系统服务状态。 | +| [RilSrvDomain](_ril.md#rilsrvdomain) {
RIL_NO_DOMAIN_SERVICE = 0 , RIL_CS_SERVICE = 1 , RIL_PS_SERVICE = 2 , RIL_CS_PS_SERVICE = 3 , RIL_CS_PS_SEARCHING = 4 , RIL_CDMA_NOT_SUPPORT = 255
} | 系统服务域。 | +| [RilRoamStatus](_ril.md#rilroamstatus) { RIL_NO_ROAM = 0 , RIL_ROAMING = 1 , RIL_ROAM_UNKNOWN = 2 } | 漫游状态。 | +| [RilSimLockStatus](_ril.md#rilsimlockstatus) { RIL_SIM_CARD_UNLOCK = 0 , RIL_SIM_CARD_LOCK = 1 } | SIM卡锁定状态。 | +| [RilSysMode](_ril.md#rilsysmode) {
RIL_NO_SYSMODE_SERVICE = 0 , RIL_GSM_MODE = 1 , RIL_CDMA_MODE = 2 , RIL_WCDMA_MODE = 3 , RIL_TDSCDMA_MODE = 4 , RIL_WIMAX_MODE = 5 , RIL_LTE_MODE = 6 , RIL_LTE_CA_MODE = 7 , RIL_NR_MODE = 8
} | 系统制式。 | +| [RilRadioTech](_ril.md#rilradiotech) {
RADIO_TECHNOLOGY_INVALID = 65535 , RADIO_TECHNOLOGY_UNKNOWN = 0 , RADIO_TECHNOLOGY_GSM = 1 , RADIO_TECHNOLOGY_1XRTT = 2 , RADIO_TECHNOLOGY_WCDMA = 3 , RADIO_TECHNOLOGY_HSPA = 4 , RADIO_TECHNOLOGY_HSPAP = 5 , RADIO_TECHNOLOGY_TD_SCDMA = 6 , RADIO_TECHNOLOGY_EVDO = 7 , RADIO_TECHNOLOGY_EHRPD = 8 , RADIO_TECHNOLOGY_LTE = 9 , RADIO_TECHNOLOGY_LTE_CA = 10 , RADIO_TECHNOLOGY_IWLAN = 11 , RADIO_TECHNOLOGY_NR = 12
} | 语音接入技术类型。 | +| [RilSimStatus](_ril.md#rilsimstatus) {
RIL_USIM_INVALID = 0 , RIL_USIM_VALID = 1 , RIL_USIM_CS_INVALID = 2 , RIL_USIM_PS_INVALID = 3 , RIL_USIM_CS_PS_INVALID = 4 , RIL_ROM_SIM = 240 , RIL_NO_USIM = 255
} | SIM卡状态。 | +| [RilRegStatus](_ril.md#rilregstatus) {
NO_REG_MT_NO_SEARCH = 0 , REG_MT_HOME = 1 , NO_REG_MT_SEARCHING = 2 , REG_MT_REJECTED = 3 , REG_MT_UNKNOWN = 4 , REG_MT_ROAMING = 5 , REG_MT_EMERGENCY = 6
} | 描述网络注册状态。 | +| [RilCellConnectionStatus](_ril.md#rilcellconnectionstatus) { RIL_SERVING_CELL_UNKNOWN = 0 , RIL_SERVING_CELL_PRIMARY = 1 , RIL_SERVING_CELL_SECONDARY = 2 } | 小区连接状态。 | +| [RilRegNotifyMode](_ril.md#rilregnotifymode) { REG_NOT_NOTIFY = 0 , REG_NOTIFY_STAT_ONLY = 1 , REG_NOTIFY_STAT_LAC_CELLID = 2 } | 上报模式。 | +| [RadioProtocolPhase](_ril.md#radioprotocolphase) {
RADIO_PROTOCOL_PHASE_INITIAL , RADIO_PROTOCOL_PHASE_CHECK , RADIO_PROTOCOL_PHASE_UPDATE , RADIO_PROTOCOL_PHASE_NOTIFY , RADIO_PROTOCOL_PHASE_COMPLETE
} | 设置Radio协议动作参数。 | +| [RadioProtocolStatus](_ril.md#radioprotocolstatus) { RADIO_PROTOCOL_STATUS_NONE , RADIO_PROTOCOL_STATUS_SUCCESS , RADIO_PROTOCOL_STATUS_FAIL } | Radio协议状态。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.ril.v1_0 | Ril模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_ringback_voice.md b/zh-cn/device-dev/reference/hdi-apis/_ringback_voice.md new file mode 100644 index 0000000000000000000000000000000000000000..e46ef5818f627416f6909b38d160c43359dbe7a2 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_ringback_voice.md @@ -0,0 +1,37 @@ +# RingbackVoice + + +## 概述 + +回铃音信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [status](#status) | int
回铃音状态 | + + +## 类成员变量说明 + + +### status + + +``` +int RingbackVoice::status +``` +**描述:** +回铃音状态 + +- 0:网络回铃音 + +- 1:本地回铃音 diff --git a/zh-cn/device-dev/reference/hdi-apis/_rsqrt.md b/zh-cn/device-dev/reference/hdi-apis/_rsqrt.md new file mode 100644 index 0000000000000000000000000000000000000000..e99190b00edbe563e1b2136a54f2b0b4ea516a4d --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_rsqrt.md @@ -0,0 +1,28 @@ +# Rsqrt + + +## 概述 + +求x的平方根的倒数。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_RSQRT。 + +输入: + +- x,n维输入tensor,input中的每个元素不能小于0,n<8。 + +输出: + +- output,n维输出tensor,output的shape和数据类型和input相同。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_rssi.md b/zh-cn/device-dev/reference/hdi-apis/_rssi.md new file mode 100644 index 0000000000000000000000000000000000000000..ff248ff2828ef023aee0315ca6746311651b0e89 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_rssi.md @@ -0,0 +1,88 @@ +# Rssi + + +## 概述 + +接收信号强度信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [gw](#gw) | struct [GsmRssi](_gsm_rssi.md)
GSM信号强度信息,具体查看[GsmRssi](_gsm_rssi.md) | +| [cdma](#cdma) | struct [CdmaRssi](_cdma_rssi.md)
CDMA信号强度信息,具体查看[CdmaRssi](_cdma_rssi.md) | +| [wcdma](#wcdma) | struct [WcdmaRssi](_wcdma_rssi.md)
WCDMA信号强度信息,具体查看[WcdmaRssi](_wcdma_rssi.md) | +| [lte](#lte) | struct [LteRssi](_lte_rssi.md)
LTE信号强度信息,具体查看[LteRssi](_lte_rssi.md) | +| [tdScdma](#tdscdma) | struct [TdScdmaRssi](_td_scdma_rssi.md)
TDSCDMA信号强度信息,具体查看[TdScdmaRssi](_td_scdma_rssi.md) | +| [nr](#nr) | struct [NrRssi](_nr_rssi.md)
NR信号强度信息,具体查看[NrRssi](_nr_rssi.md) | + + +## 类成员变量说明 + + +### cdma + + +``` +struct CdmaRssi Rssi::cdma +``` +**描述:** +CDMA信号强度信息,具体查看[CdmaRssi](_cdma_rssi.md) + + +### gw + + +``` +struct GsmRssi Rssi::gw +``` +**描述:** +GSM信号强度信息,具体查看[GsmRssi](_gsm_rssi.md) + + +### lte + + +``` +struct LteRssi Rssi::lte +``` +**描述:** +LTE信号强度信息,具体查看[LteRssi](_lte_rssi.md) + + +### nr + + +``` +struct NrRssi Rssi::nr +``` +**描述:** +NR信号强度信息,具体查看[NrRssi](_nr_rssi.md) + + +### tdScdma + + +``` +struct TdScdmaRssi Rssi::tdScdma +``` +**描述:** +TDSCDMA信号强度信息,具体查看[TdScdmaRssi](_td_scdma_rssi.md) + + +### wcdma + + +``` +struct WcdmaRssi Rssi::wcdma +``` +**描述:** +WCDMA信号强度信息,具体查看[WcdmaRssi](_wcdma_rssi.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_scale_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_scale_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..77863d5a5b9caf2f17ee9c845ddfa4bb0e1f814c --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_scale_fusion.md @@ -0,0 +1,62 @@ +# ScaleFusion + + +## 概述 + +给定一个tensor,计算其缩放后的值。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_SCALE_FUSION。 + +输入: + +- x,n维tensor。 + +- scale,缩放tensor。 + +- bias,偏置tensor。 + +输出: + +- output, scale的计算结果,一个n维tensor,类型和x一致,shape由axis决定。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [axis](#axis) | long
指定缩放的维度。  | +| [activationType](#activationtype) | enum [ActivationType](_n_n_rt.md#activationtype)
激活函数,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。  | + + +## 类成员变量说明 + + +### activationType + + +``` +enum ActivationType ScaleFusion::activationType +``` +**描述:** +激活函数,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。 + + +### axis + + +``` +long ScaleFusion::axis +``` +**描述:** +指定缩放的维度。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_schedule_info.md b/zh-cn/device-dev/reference/hdi-apis/_schedule_info.md index 3c44bee576d39e82ce87ee18ad846d0761c5866f..b7feb844ca1fde9bb8b98054d87cca4caf557aa2 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_schedule_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_schedule_info.md @@ -1,39 +1,39 @@ # ScheduleInfo -## **概述** +## 概述 调度信息。 -**Since:** +**Since:** 3.2 -**Version:** +**Version:** 1.0 -**所属模块:** +**相关模块:** [HdfUserAuth](_hdf_user_auth.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [scheduleId](#scheduleid) | 调度ID,用于标识一次操作请求的执行器调度过程。 | -| [templateIds](#templateids) | 模版ID列表。 | -| [authType](#authtype) | 用户认证凭据类型。 | -| [executorMatcher](#executormatcher) | 执行器匹配器。 | -| [scheduleMode](#schedulemode) | 调度模式,支持注册、认证和识别模式。 | -| [executors](#executors) | 执行器信息列表。 | +| [scheduleId](#scheduleid) | unsigned long
调度ID,用于标识一次操作请求的执行器调度过程。 | +| [templateIds](#templateids) | unsigned long[]
模版id列表。 | +| [authType](#authtype) | enum [AuthType](_hdf_user_auth.md#authtype)
用户认证凭据类型。 | +| [executorMatcher](#executormatcher) | unsigned int
执行器匹配器。 | +| [scheduleMode](#schedulemode) | unsigned int
调度模式,支持注册、认证和识别模式。 | +| [executors](#executors) | struct [ExecutorInfo](_executor_info_userauth.md)[]
执行器信息列表。 | -## **类成员变量说明** +## 类成员变量说明 ### authType @@ -43,33 +43,33 @@ enum AuthType ScheduleInfo::authType ``` -**描述:** +**描述:** -用户认证凭据类型。 +用户认证凭据类型[AuthType](_hdf_user_auth.md#authtype)。 -### executors +### executorMatcher ``` -struct ExecutorInfo [] ScheduleInfo::executors +unsigned int ScheduleInfo::executorMatcher ``` -**描述:** +**描述:** -执行器信息列表。 +执行器匹配器。 -### executorMatcher +### executors ``` -unsigned int ScheduleInfo::executorMatcher +struct ExecutorInfo [] ScheduleInfo::executors ``` -**描述:** +**描述:** -执行器匹配器。 +执行器信息列表[ExecutorInfo](_executor_info_userauth.md)。 ### scheduleId @@ -79,7 +79,7 @@ unsigned int ScheduleInfo::executorMatcher unsigned long ScheduleInfo::scheduleId ``` -**描述:** +**描述:** 调度ID,用于标识一次操作请求的执行器调度过程。 @@ -91,7 +91,7 @@ unsigned long ScheduleInfo::scheduleId unsigned int ScheduleInfo::scheduleMode ``` -**描述:** +**描述:** 调度模式,支持注册、认证和识别模式。 @@ -103,6 +103,6 @@ unsigned int ScheduleInfo::scheduleMode unsigned long [] ScheduleInfo::templateIds ``` -**描述:** +**描述:** -模版ID列表。 +模版id列表。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_send_cdma_sms_message_info.md b/zh-cn/device-dev/reference/hdi-apis/_send_cdma_sms_message_info.md new file mode 100644 index 0000000000000000000000000000000000000000..7899e41e29911240708909c89a3d0577ac875067 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_send_cdma_sms_message_info.md @@ -0,0 +1,55 @@ +# SendCdmaSmsMessageInfo + + +## 概述 + +发送CDMA短信信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [state](#state) | int
状态  | +| [smscPdu](#smscpdu) | String
短信业务中心  | + + +## 类成员变量说明 + + +### serial + + +``` +int SendCdmaSmsMessageInfo::serial +``` +**描述:** +请求的序列号 + + +### smscPdu + + +``` +String SendCdmaSmsMessageInfo::smscPdu +``` +**描述:** +短信业务中心 + + +### state + + +``` +int SendCdmaSmsMessageInfo::state +``` +**描述:** +状态 diff --git a/zh-cn/device-dev/reference/hdi-apis/_send_sms_result_info.md b/zh-cn/device-dev/reference/hdi-apis/_send_sms_result_info.md new file mode 100644 index 0000000000000000000000000000000000000000..51d2da5ea3a7ed20bd9761a0916fc954196e06c3 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_send_sms_result_info.md @@ -0,0 +1,66 @@ +# SendSmsResultInfo + + +## 概述 + +发送短信响应信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [msgRef](#msgref) | int
信息参考号  | +| [pdu](#pdu) | String
协议数据单元  | +| [errCode](#errcode) | int
错误码  | +| [flag](#flag) | int
短信响应标识  | + + +## 类成员变量说明 + + +### errCode + + +``` +int SendSmsResultInfo::errCode +``` +**描述:** +错误码 + + +### flag + + +``` +int SendSmsResultInfo::flag +``` +**描述:** +短信响应标识 + + +### msgRef + + +``` +int SendSmsResultInfo::msgRef +``` +**描述:** +信息参考号 + + +### pdu + + +``` +String SendSmsResultInfo::pdu +``` +**描述:** +协议数据单元 diff --git a/zh-cn/device-dev/reference/hdi-apis/sensor.md b/zh-cn/device-dev/reference/hdi-apis/_sensor.md similarity index 57% rename from zh-cn/device-dev/reference/hdi-apis/sensor.md rename to zh-cn/device-dev/reference/hdi-apis/_sensor.md index 5c37da3a27dd00fe925aba5de15f35a8a52d1a88..6f3eaf788e73bffada2fe60dba3958b748f22cff 100644 --- a/zh-cn/device-dev/reference/hdi-apis/sensor.md +++ b/zh-cn/device-dev/reference/hdi-apis/_sensor.md @@ -1,22 +1,24 @@ # Sensor -## **概述** +## 概述 传感器设备驱动对传感器服务提供通用的接口能力。 -模块提供传感器服务对传感器驱动访问统一接口,服务获取驱动对象或者代理后,通过其提供的各类方法,以传感器ID区分访问不同类型传感器设备,实现获取传感器设备信息、订阅/取消订阅传感器数据、 使能/去使能传感器、设置传感器模式、设置传感器精度、量程等可选配置等。 +模块提供传感器服务对传感器驱动访问统一接口,服务获取驱动对象或者代理后,通过其提供的各类方法, 以传感器ID区分访问不同类型传感器设备,实现获取传感器设备信息、订阅/取消订阅传感器数据、 使能/去使能传感器、设置传感器模式、设置传感器精度、量程等可选配置等。 -**Since**: +**Since:** 2.2 -**Version**: +**Version:** 1.0 +**Since:** -## **汇总** + +## 汇总 ### 文件 @@ -24,7 +26,7 @@ | 名称 | 描述 | | -------- | -------- | | [ISensorCallback.idl](_i_sensor_callback_8idl.md) | Sensor模块为Sensor服务提供数据上报的回调函数。 | -| [ISensorInterface.idl](_i_sensor_interface_8idl.md) | Sensor模块对外通用的接口声明文件,提供获取传感器设备信息、订阅/取消订阅传感器数据、使能/去使能传感器、设置传感器模式、设置传感器精度,量程等可选配置接口定义。 | +| [ISensorInterface.idl](_i_sensor_interface_8idl.md) | Sensor模块对外通用的接口声明文件,提供获取传感器设备信息、订阅/取消订阅传感器数据、 使能/去使能传感器、设置传感器模式、设置传感器精度,量程等可选配置接口定义。 | | [SensorTypes.idl](_sensor_types_8idl.md) | 定义传感器模块所使用的传感器类型,传感器信息,传感器数据结构等数据类型。 | @@ -32,19 +34,19 @@ | 名称 | 描述 | | -------- | -------- | -| [ISensorCallback](interface_i_sensor_callback.md) | 定义用于上报传感器数据的回调函数。 | -| [ISensorInterface](interface_i_sensor_interface.md) | 提供Sensor设备基本控制操作接口。 | -| [HdfSensorInformation](_hdf_sensor_information.md) | 定义传感器的基本信息。 | -| [HdfSensorEvents](_hdf_sensor_events.md) | 定义传感器上报的数据。 | +| [ISensorCallback](interface_i_sensor_callback.md) | interface
定义用于上报传感器数据的回调函数。 | +| [ISensorInterface](interface_i_sensor_interface.md) | interface
提供Sensor设备基本控制操作接口。 | +| [HdfSensorInformation](_hdf_sensor_information.md) | struct
定义传感器的基本信息。 | +| [HdfSensorEvents](_hdf_sensor_events.md) | struct
定义传感器上报的数据。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [HdfSensorTypeTag](#hdfsensortypetag) {   HDF_SENSOR_TYPE_NONE = 0, HDF_SENSOR_TYPE_ACCELEROMETER = 1, HDF_SENSOR_TYPE_GYROSCOPE = 2, HDF_SENSOR_TYPE_PHOTOPLETHYSMOGRAPH = 3,   HDF_SENSOR_TYPE_ELECTROCARDIOGRAPH = 4, HDF_SENSOR_TYPE_AMBIENT_LIGHT = 5, HDF_SENSOR_TYPE_MAGNETIC_FIELD = 6, HDF_SENSOR_TYPE_CAPACITIVE = 7,   HDF_SENSOR_TYPE_BAROMETER = 8, HDF_SENSOR_TYPE_TEMPERATURE = 9, HDF_SENSOR_TYPE_HALL = 10, HDF_SENSOR_TYPE_GESTURE = 11,   HDF_SENSOR_TYPE_PROXIMITY = 12, HDF_SENSOR_TYPE_HUMIDITY = 13, HDF_SENSOR_TYPE_MEDICAL_BEGIN = 128, HDF_SENSOR_TYPE_MEDICAL_END = 160,   HDF_SENSOR_TYPE_PHYSICAL_MAX = 255, HDF_SENSOR_TYPE_ORIENTATION = 256, HDF_SENSOR_TYPE_GRAVITY = 257, HDF_SENSOR_TYPE_LINEAR_ACCELERATION = 258,   HDF_SENSOR_TYPE_ROTATION_VECTOR = 259, HDF_SENSOR_TYPE_AMBIENT_TEMPERATURE = 260, HDF_SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED = 261, HDF_SENSOR_TYPE_GAME_ROTATION_VECTOR = 262,   HDF_SENSOR_TYPE_GYROSCOPE_UNCALIBRATED = 263, HDF_SENSOR_TYPE_SIGNIFICANT_MOTION = 264, HDF_SENSOR_TYPE_PEDOMETER_DETECTION = 265, HDF_SENSOR_TYPE_PEDOMETER = 266,   HDF_SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR = 277, HDF_SENSOR_TYPE_HEART_RATE = 278, HDF_SENSOR_TYPE_DEVICE_ORIENTATION = 279, HDF_SENSOR_TYPE_WEAR_DETECTION = 280,   HDF_SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED = 281, HDF_SENSOR_TYPE_MAX } | 定义传感器类型标识。 | +| [HdfSensorTypeTag](#hdfsensortypetag) { HDF_SENSOR_TYPE_NONE = 0, HDF_SENSOR_TYPE_ACCELEROMETER = 1, HDF_SENSOR_TYPE_GYROSCOPE = 2, HDF_SENSOR_TYPE_PHOTOPLETHYSMOGRAPH = 3,   HDF_SENSOR_TYPE_ELECTROCARDIOGRAPH = 4, HDF_SENSOR_TYPE_AMBIENT_LIGHT = 5, HDF_SENSOR_TYPE_MAGNETIC_FIELD = 6, HDF_SENSOR_TYPE_CAPACITIVE = 7,   HDF_SENSOR_TYPE_BAROMETER = 8, HDF_SENSOR_TYPE_TEMPERATURE = 9, HDF_SENSOR_TYPE_HALL = 10, HDF_SENSOR_TYPE_GESTURE = 11,   HDF_SENSOR_TYPE_PROXIMITY = 12, HDF_SENSOR_TYPE_HUMIDITY = 13, HDF_SENSOR_TYPE_MEDICAL_BEGIN = 128, HDF_SENSOR_TYPE_MEDICAL_END = 160,   HDF_SENSOR_TYPE_PHYSICAL_MAX = 255, HDF_SENSOR_TYPE_ORIENTATION = 256, HDF_SENSOR_TYPE_GRAVITY = 257, HDF_SENSOR_TYPE_LINEAR_ACCELERATION = 258,   HDF_SENSOR_TYPE_ROTATION_VECTOR = 259, HDF_SENSOR_TYPE_AMBIENT_TEMPERATURE = 260, HDF_SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED = 261, HDF_SENSOR_TYPE_GAME_ROTATION_VECTOR = 262,   HDF_SENSOR_TYPE_GYROSCOPE_UNCALIBRATED = 263, HDF_SENSOR_TYPE_SIGNIFICANT_MOTION = 264, HDF_SENSOR_TYPE_PEDOMETER_DETECTION = 265, HDF_SENSOR_TYPE_PEDOMETER = 266,   HDF_SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR = 277, HDF_SENSOR_TYPE_HEART_RATE = 278, HDF_SENSOR_TYPE_DEVICE_ORIENTATION = 279, HDF_SENSOR_TYPE_WEAR_DETECTION = 280,   HDF_SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED = 281, HDF_SENSOR_TYPE_MAX } | 定义传感器类型标识。 | | [HdfSensorGroupType](#hdfsensorgrouptype) { HDF_TRADITIONAL_SENSOR_TYPE = 0, HDF_MEDICAL_SENSOR_TYPE = 1, HDF_SENSOR_GROUP_TYPE_MAX } | 枚举传感器的硬件服务组。 | -| [HdfSensorModeType](#hdfsensormodetype) {   SENSOR_MODE_DEFAULT = 0, SENSOR_MODE_REALTIME = 1, SENSOR_MODE_ON_CHANGE = 2, SENSOR_MODE_ONE_SHOT = 3,   SENSOR_MODE_FIFO_MODE = 4, SENSOR_MODE_MAX } | 传感器的工作模式。 | +| [HdfSensorModeType](#hdfsensormodetype) { SENSOR_MODE_DEFAULT = 0, SENSOR_MODE_REALTIME = 1, SENSOR_MODE_ON_CHANGE = 2, SENSOR_MODE_ONE_SHOT = 3,   SENSOR_MODE_FIFO_MODE = 4, SENSOR_MODE_MAX } | 传感器的工作模式。 | ### 关键字 @@ -54,7 +56,7 @@ | package ohos.hdi.sensor.v1_0 | Sensor模块接口的包路径。 | -## **枚举类型说明** +## 枚举类型说明 ### HdfSensorGroupType @@ -64,7 +66,7 @@ enum HdfSensorGroupType ``` -**描述:** +**描述:** 枚举传感器的硬件服务组。 @@ -82,7 +84,7 @@ enum HdfSensorGroupType enum HdfSensorModeType ``` -**描述:** +**描述:** 传感器的工作模式。 @@ -103,7 +105,7 @@ enum HdfSensorModeType enum HdfSensorTypeTag ``` -**描述:** +**描述:** 定义传感器类型标识。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_sensor_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_sensor_types_8idl.md index 8eadb3a7c36ddf82a854b6a9e9c264e2abf80b9b..ffbc007a5d5160ad22d263cf5aed0ebaeeebd15b 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_sensor_types_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_sensor_types_8idl.md @@ -1,7 +1,7 @@ # SensorTypes.idl -## **概述** +## 概述 定义传感器模块所使用的传感器类型,传感器信息,传感器数据结构等数据类型。 @@ -15,27 +15,27 @@ **相关模块:** -[Sensor](sensor.md) +[Sensor](_sensor.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [HdfSensorInformation](_hdf_sensor_information.md) | 定义传感器的基本信息。 | -| [HdfSensorEvents](_hdf_sensor_events.md) | 定义传感器上报的数据。 | +| [HdfSensorInformation](_hdf_sensor_information.md) | struct
定义传感器的基本信息。 | +| [HdfSensorEvents](_hdf_sensor_events.md) | struct
定义传感器上报的数据。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [HdfSensorTypeTag](sensor.md#hdfsensortypetag) {   HDF_SENSOR_TYPE_NONE = 0, HDF_SENSOR_TYPE_ACCELEROMETER = 1, HDF_SENSOR_TYPE_GYROSCOPE = 2, HDF_SENSOR_TYPE_PHOTOPLETHYSMOGRAPH = 3,   HDF_SENSOR_TYPE_ELECTROCARDIOGRAPH = 4, HDF_SENSOR_TYPE_AMBIENT_LIGHT = 5, HDF_SENSOR_TYPE_MAGNETIC_FIELD = 6, HDF_SENSOR_TYPE_CAPACITIVE = 7,   HDF_SENSOR_TYPE_BAROMETER = 8, HDF_SENSOR_TYPE_TEMPERATURE = 9, HDF_SENSOR_TYPE_HALL = 10, HDF_SENSOR_TYPE_GESTURE = 11,   HDF_SENSOR_TYPE_PROXIMITY = 12, HDF_SENSOR_TYPE_HUMIDITY = 13, HDF_SENSOR_TYPE_MEDICAL_BEGIN = 128, HDF_SENSOR_TYPE_MEDICAL_END = 160,   HDF_SENSOR_TYPE_PHYSICAL_MAX = 255, HDF_SENSOR_TYPE_ORIENTATION = 256, HDF_SENSOR_TYPE_GRAVITY = 257, HDF_SENSOR_TYPE_LINEAR_ACCELERATION = 258,   HDF_SENSOR_TYPE_ROTATION_VECTOR = 259, HDF_SENSOR_TYPE_AMBIENT_TEMPERATURE = 260, HDF_SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED = 261, HDF_SENSOR_TYPE_GAME_ROTATION_VECTOR = 262,   HDF_SENSOR_TYPE_GYROSCOPE_UNCALIBRATED = 263, HDF_SENSOR_TYPE_SIGNIFICANT_MOTION = 264, HDF_SENSOR_TYPE_PEDOMETER_DETECTION = 265, HDF_SENSOR_TYPE_PEDOMETER = 266,   HDF_SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR = 277, HDF_SENSOR_TYPE_HEART_RATE = 278, HDF_SENSOR_TYPE_DEVICE_ORIENTATION = 279, HDF_SENSOR_TYPE_WEAR_DETECTION = 280,   HDF_SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED = 281, HDF_SENSOR_TYPE_MAX } | 定义传感器类型标识。 | -| [HdfSensorGroupType](sensor.md#hdfsensorgrouptype) { HDF_TRADITIONAL_SENSOR_TYPE = 0, HDF_MEDICAL_SENSOR_TYPE = 1, HDF_SENSOR_GROUP_TYPE_MAX } | 枚举传感器的硬件服务组。 | -| [HdfSensorModeType](sensor.md#hdfsensormodetype) {   SENSOR_MODE_DEFAULT = 0, SENSOR_MODE_REALTIME = 1, SENSOR_MODE_ON_CHANGE = 2, SENSOR_MODE_ONE_SHOT = 3,   SENSOR_MODE_FIFO_MODE = 4, SENSOR_MODE_MAX } | 传感器的工作模式。 | +| [HdfSensorTypeTag](_sensor.md#hdfsensortypetag) { HDF_SENSOR_TYPE_NONE = 0, HDF_SENSOR_TYPE_ACCELEROMETER = 1, HDF_SENSOR_TYPE_GYROSCOPE = 2, HDF_SENSOR_TYPE_PHOTOPLETHYSMOGRAPH = 3,   HDF_SENSOR_TYPE_ELECTROCARDIOGRAPH = 4, HDF_SENSOR_TYPE_AMBIENT_LIGHT = 5, HDF_SENSOR_TYPE_MAGNETIC_FIELD = 6, HDF_SENSOR_TYPE_CAPACITIVE = 7,   HDF_SENSOR_TYPE_BAROMETER = 8, HDF_SENSOR_TYPE_TEMPERATURE = 9, HDF_SENSOR_TYPE_HALL = 10, HDF_SENSOR_TYPE_GESTURE = 11,   HDF_SENSOR_TYPE_PROXIMITY = 12, HDF_SENSOR_TYPE_HUMIDITY = 13, HDF_SENSOR_TYPE_MEDICAL_BEGIN = 128, HDF_SENSOR_TYPE_MEDICAL_END = 160,   HDF_SENSOR_TYPE_PHYSICAL_MAX = 255, HDF_SENSOR_TYPE_ORIENTATION = 256, HDF_SENSOR_TYPE_GRAVITY = 257, HDF_SENSOR_TYPE_LINEAR_ACCELERATION = 258,   HDF_SENSOR_TYPE_ROTATION_VECTOR = 259, HDF_SENSOR_TYPE_AMBIENT_TEMPERATURE = 260, HDF_SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED = 261, HDF_SENSOR_TYPE_GAME_ROTATION_VECTOR = 262,   HDF_SENSOR_TYPE_GYROSCOPE_UNCALIBRATED = 263, HDF_SENSOR_TYPE_SIGNIFICANT_MOTION = 264, HDF_SENSOR_TYPE_PEDOMETER_DETECTION = 265, HDF_SENSOR_TYPE_PEDOMETER = 266,   HDF_SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR = 277, HDF_SENSOR_TYPE_HEART_RATE = 278, HDF_SENSOR_TYPE_DEVICE_ORIENTATION = 279, HDF_SENSOR_TYPE_WEAR_DETECTION = 280,   HDF_SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED = 281, HDF_SENSOR_TYPE_MAX } | 定义传感器类型标识。 | +| [HdfSensorGroupType](_sensor.md#hdfsensorgrouptype) { HDF_TRADITIONAL_SENSOR_TYPE = 0, HDF_MEDICAL_SENSOR_TYPE = 1, HDF_SENSOR_GROUP_TYPE_MAX } | 枚举传感器的硬件服务组。 | +| [HdfSensorModeType](_sensor.md#hdfsensormodetype) { SENSOR_MODE_DEFAULT = 0, SENSOR_MODE_REALTIME = 1, SENSOR_MODE_ON_CHANGE = 2, SENSOR_MODE_ONE_SHOT = 3,   SENSOR_MODE_FIFO_MODE = 4, SENSOR_MODE_MAX } | 传感器的工作模式。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_service_center_address.md b/zh-cn/device-dev/reference/hdi-apis/_service_center_address.md new file mode 100644 index 0000000000000000000000000000000000000000..dff3fa05dc281d6192dfc1fe1f607af5bf87468e --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_service_center_address.md @@ -0,0 +1,55 @@ +# ServiceCenterAddress + + +## 概述 + +短信中心地址信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [tosca](#tosca) | int
短信中心地址类型,参考3GPP TS 24.011 [6]  | +| [address](#address) | String
短信中心地址,参考3GPP TS 24.011 [6]  | + + +## 类成员变量说明 + + +### address + + +``` +String ServiceCenterAddress::address +``` +**描述:** +短信中心地址,参考3GPP TS 24.011 [6] + + +### serial + + +``` +int ServiceCenterAddress::serial +``` +**描述:** +请求的序列号 + + +### tosca + + +``` +int ServiceCenterAddress::tosca +``` +**描述:** +短信中心地址类型,参考3GPP TS 24.011 [6] diff --git a/zh-cn/device-dev/reference/hdi-apis/_set_barring_info.md b/zh-cn/device-dev/reference/hdi-apis/_set_barring_info.md new file mode 100644 index 0000000000000000000000000000000000000000..0c27f2b6329d3803230cc0fb96ba19b8bbb5beeb --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_set_barring_info.md @@ -0,0 +1,55 @@ +# SetBarringInfo + + +## 概述 + +设置呼叫限制密码的信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [fac](#fac) | String
操作对象  | +| [oldPassword](#oldpassword) | String
旧密码  | +| [newPassword](#newpassword) | String
新密码  | + + +## 类成员变量说明 + + +### fac + + +``` +String SetBarringInfo::fac +``` +**描述:** +操作对象 + + +### newPassword + + +``` +String SetBarringInfo::newPassword +``` +**描述:** +新密码 + + +### oldPassword + + +``` +String SetBarringInfo::oldPassword +``` +**描述:** +旧密码 diff --git a/zh-cn/device-dev/reference/hdi-apis/_set_network_mode_info.md b/zh-cn/device-dev/reference/hdi-apis/_set_network_mode_info.md new file mode 100644 index 0000000000000000000000000000000000000000..1ab1fea6e19faf7c21b2496a23784a88e3f3bc52 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_set_network_mode_info.md @@ -0,0 +1,55 @@ +# SetNetworkModeInfo + + +## 概述 + +设置网络模式信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [selectMode](#selectmode) | int
网络模式,具体查看[PreferredNetworkTypeInfo](_preferred_network_type_info.md) | +| [oper](#oper) | String
网络运营商  | +| [flag](#flag) | int
标志  | + + +## 类成员变量说明 + + +### flag + + +``` +int SetNetworkModeInfo::flag +``` +**描述:** +标志 + + +### oper + + +``` +String SetNetworkModeInfo::oper +``` +**描述:** +网络运营商 + + +### selectMode + + +``` +int SetNetworkModeInfo::selectMode +``` +**描述:** +网络模式,具体查看[PreferredNetworkTypeInfo](_preferred_network_type_info.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_setup_data_call_result_info.md b/zh-cn/device-dev/reference/hdi-apis/_setup_data_call_result_info.md new file mode 100644 index 0000000000000000000000000000000000000000..1fa7bb87d0fe15a2a55ef77e7d0a9d351fc28bc6 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_setup_data_call_result_info.md @@ -0,0 +1,187 @@ +# SetupDataCallResultInfo + + +## 概述 + +数据业务激活结果信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [flag](#flag) | int
激活结果信息标识  | +| [reason](#reason) | int
数据业务激活失败原因码,参考3GPP TS 24.008  | +| [retryTime](#retrytime) | int
数据业务激活重试次数  | +| [cid](#cid) | int
分组报文协议(PDP)上下文标识符  | +| [active](#active) | int
是否激活成功,0表示激活失败,1表示激活成功  | +| [maxTransferUnit](#maxtransferunit) | int
最大传输数据单元  | +| [pduSessionId](#pdusessionid) | int
数据单元标识  | +| [type](#type) | String
数据业务类型,“default”表示默认数据业务,“mms”表示彩信数据业务  | +| [netPortName](#netportname) | String
网络设备名称  | +| [address](#address) | String
网络地址  | +| [dns](#dns) | String
域名服务地址  | +| [dnsSec](#dnssec) | String
备用域名服务地址  | +| [gateway](#gateway) | String
网关地址  | +| [pCscfPrimAddr](#pcscfprimaddr) | String
首选代理呼叫控制功能模块(P-CSCF)地址  | +| [pCscfSecAddr](#pcscfsecaddr) | String
备用P-CSCF地址  | + + +## 类成员变量说明 + + +### active + + +``` +int SetupDataCallResultInfo::active +``` +**描述:** +是否激活成功,0表示激活失败,1表示激活成功 + + +### address + + +``` +String SetupDataCallResultInfo::address +``` +**描述:** +网络地址 + + +### cid + + +``` +int SetupDataCallResultInfo::cid +``` +**描述:** +分组报文协议(PDP)上下文标识符 + + +### dns + + +``` +String SetupDataCallResultInfo::dns +``` +**描述:** +域名服务地址 + + +### dnsSec + + +``` +String SetupDataCallResultInfo::dnsSec +``` +**描述:** +备用域名服务地址 + + +### flag + + +``` +int SetupDataCallResultInfo::flag +``` +**描述:** +激活结果信息标识 + + +### gateway + + +``` +String SetupDataCallResultInfo::gateway +``` +**描述:** +网关地址 + + +### maxTransferUnit + + +``` +int SetupDataCallResultInfo::maxTransferUnit +``` +**描述:** +最大传输数据单元 + + +### netPortName + + +``` +String SetupDataCallResultInfo::netPortName +``` +**描述:** +网络设备名称 + + +### pCscfPrimAddr + + +``` +String SetupDataCallResultInfo::pCscfPrimAddr +``` +**描述:** +首选代理呼叫控制功能模块(P-CSCF)地址 + + +### pCscfSecAddr + + +``` +String SetupDataCallResultInfo::pCscfSecAddr +``` +**描述:** +备用P-CSCF地址 + + +### pduSessionId + + +``` +int SetupDataCallResultInfo::pduSessionId +``` +**描述:** +数据单元标识 + + +### reason + + +``` +int SetupDataCallResultInfo::reason +``` +**描述:** +数据业务激活失败原因码,参考3GPP TS 24.008 + + +### retryTime + + +``` +int SetupDataCallResultInfo::retryTime +``` +**描述:** +数据业务激活重试次数 + + +### type + + +``` +String SetupDataCallResultInfo::type +``` +**描述:** +数据业务类型,“default”表示默认数据业务,“mms”表示彩信数据业务 diff --git a/zh-cn/device-dev/reference/hdi-apis/_shape.md b/zh-cn/device-dev/reference/hdi-apis/_shape.md new file mode 100644 index 0000000000000000000000000000000000000000..1d412e84de4c4d361787eead6c95754ae36d2806 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_shape.md @@ -0,0 +1,24 @@ +# Shape + + +## 概述 + +输出输入tensor的形状。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_SHAPE。 + +输入: + +- x,n维tensor + +输出: + +- output,输出x的维度,一个整型数组。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_shared_buffer.md b/zh-cn/device-dev/reference/hdi-apis/_shared_buffer.md new file mode 100644 index 0000000000000000000000000000000000000000..a220872c9c91b6c98783c8677dfa5d32bfb2b760 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_shared_buffer.md @@ -0,0 +1,70 @@ +# SharedBuffer + + +## 概述 + +共享内存数据的结构体。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [fd](#fd) | FileDescriptor
共享内存的文件描述符  | +| [bufferSize](#buffersize) | unsigned int
共享内存的空间大小,单位字节  | +| [offset](#offset) | unsigned int
有效数据起始地址在共享内存中的偏移  | +| [dataSize](#datasize) | unsigned int
有效数据的占用空间大小,单位字节  | + + +## 类成员变量说明 + + +### bufferSize + + +``` +unsigned int SharedBuffer::bufferSize +``` +**描述:** +共享内存的空间大小,单位字节 + + +### dataSize + + +``` +unsigned int SharedBuffer::dataSize +``` +**描述:** +有效数据的占用空间大小,单位字节 + + +### fd + + +``` +FileDescriptor SharedBuffer::fd +``` +**描述:** +共享内存的文件描述符 + + +### offset + + +``` +unsigned int SharedBuffer::offset +``` +**描述:** +有效数据起始地址在共享内存中的偏移 diff --git a/zh-cn/device-dev/reference/hdi-apis/_sim_authentication_request_info.md b/zh-cn/device-dev/reference/hdi-apis/_sim_authentication_request_info.md new file mode 100644 index 0000000000000000000000000000000000000000..5dd2b947916fa53c2c788561f2bbf2b15ca029f6 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_sim_authentication_request_info.md @@ -0,0 +1,55 @@ +# SimAuthenticationRequestInfo + + +## 概述 + +SIM卡鉴权请求信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [aid](#aid) | String
应用标识  | +| [authData](#authdata) | String
认证数据信息  | + + +## 类成员变量说明 + + +### aid + + +``` +String SimAuthenticationRequestInfo::aid +``` +**描述:** +应用标识 + + +### authData + + +``` +String SimAuthenticationRequestInfo::authData +``` +**描述:** +认证数据信息 + + +### serial + + +``` +int SimAuthenticationRequestInfo::serial +``` +**描述:** +请求的序列号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_sim_io_request_info.md b/zh-cn/device-dev/reference/hdi-apis/_sim_io_request_info.md new file mode 100644 index 0000000000000000000000000000000000000000..7f2a5810876fc056115ed9fd90da9e738fb06f6c --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_sim_io_request_info.md @@ -0,0 +1,132 @@ +# SimIoRequestInfo + + +## 概述 + +SIM数据请求信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [command](#command) | int
ME(Mobile Equipment)传递给SIM的命令,参考GSM 51.011[28]  | +| [fileId](#fileid) | int
SIM卡上基本数据文件的标识符  | +| [p1](#p1) | int
SIM数据请求命令参数1,参考3GPP TS 51.011[28]  | +| [p2](#p2) | int
SIM数据请求命令参数2,参考3GPP TS 51.011[28]  | +| [p3](#p3) | int
SIM数据请求命令参数3,参考3GPP TS 51.011[28]  | +| [serial](#serial) | int
请求的序列号  | +| [data](#data) | String
要写入SIM的数据信息  | +| [path](#path) | String
SIM卡文件路径,参考ETSI TS 102 221 [60]  | +| [pin2](#pin2) | String
PIN2码  | +| [aid](#aid) | String
应用标识  | + + +## 类成员变量说明 + + +### aid + + +``` +String SimIoRequestInfo::aid +``` +**描述:** +应用标识 + + +### command + + +``` +int SimIoRequestInfo::command +``` +**描述:** +ME(Mobile Equipment)传递给SIM的命令,参考GSM 51.011[28] + + +### data + + +``` +String SimIoRequestInfo::data +``` +**描述:** +要写入SIM的数据信息 + + +### fileId + + +``` +int SimIoRequestInfo::fileId +``` +**描述:** +SIM卡上基本数据文件的标识符 + + +### p1 + + +``` +int SimIoRequestInfo::p1 +``` +**描述:** +SIM数据请求命令参数1,参考3GPP TS 51.011[28] + + +### p2 + + +``` +int SimIoRequestInfo::p2 +``` +**描述:** +SIM数据请求命令参数2,参考3GPP TS 51.011[28] + + +### p3 + + +``` +int SimIoRequestInfo::p3 +``` +**描述:** +SIM数据请求命令参数3,参考3GPP TS 51.011[28] + + +### path + + +``` +String SimIoRequestInfo::path +``` +**描述:** +SIM卡文件路径,参考ETSI TS 102 221 [60] + + +### pin2 + + +``` +String SimIoRequestInfo::pin2 +``` +**描述:** +PIN2码 + + +### serial + + +``` +int SimIoRequestInfo::serial +``` +**描述:** +请求的序列号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_sim_lock_info.md b/zh-cn/device-dev/reference/hdi-apis/_sim_lock_info.md new file mode 100644 index 0000000000000000000000000000000000000000..452814245cbd787ff95856f96daa53a21f2dc966 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_sim_lock_info.md @@ -0,0 +1,138 @@ +# SimLockInfo + + +## 概述 + +SIM卡锁信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [classx](#classx) | int
业务类别,取值为该类信息的整数之和,默认为255。 | +| [serial](#serial) | int
请求的序列号  | +| [fac](#fac) | String
SIM锁类型。 | +| [mode](#mode) | int
模式。 | +| [status](#status) | int
SIM卡锁状态。 当fac参数为PN,PU,PP时,表示的是锁网锁卡前三层锁的激活状态。 | +| [passwd](#passwd) | String
密码文本  | + + +## 类成员变量说明 + + +### classx + + +``` +int SimLockInfo::classx +``` +**描述:** +业务类别,取值为该类信息的整数之和,默认为255。 + +- 1:电话服务。 + +- 2:数据服务。 + +- 4:传真服务。 + +- 8:短消息服务。 + +- 16:数据电路同步。 + +- 32:数据电路异步。 + +- 64:专用分组访问。 + +- 128:专用便携式设备(PAD)访问 + + +### fac + + +``` +String SimLockInfo::fac +``` +**描述:** +SIM锁类型。 + +- AO:禁止所有呼出 + +- OI:禁止所有国际呼出。 + +- OX:禁止所有国际呼出,归属国除外 + +- AI:禁止所有呼入 + +- IR:归属地以外漫游时,禁止所有呼入。 + +- AB:禁止所有业务(仅在模式大于等于0时适用) + +- AG:禁止呼出业务(仅在模式大于等于0时适用) + +- AC:禁止呼入业务(仅在模式大于等于0时适用) + +- FD:FDN,固定号码拨号 + +- PN:锁网络 + +- PU:锁子网 + +- PP:锁定SP + + +### mode + + +``` +int SimLockInfo::mode +``` +**描述:** +模式。 + +- 0:去激活(当fac参数为PN,PU,PP时,为解锁操作)。 + +- 1:激活(当fac参数为PN,PU,PP时,不支持激活)。 + +- 2:查询 + + +### passwd + + +``` +String SimLockInfo::passwd +``` +**描述:** +密码文本 + + +### serial + + +``` +int SimLockInfo::serial +``` +**描述:** +请求的序列号 + + +### status + + +``` +int SimLockInfo::status +``` +**描述:** +SIM卡锁状态。 当fac参数为PN,PU,PP时,表示的是锁网锁卡前三层锁的激活状态。 + +- 0:未激活。 + +- 1:激活 diff --git a/zh-cn/device-dev/reference/hdi-apis/_sim_password_info.md b/zh-cn/device-dev/reference/hdi-apis/_sim_password_info.md new file mode 100644 index 0000000000000000000000000000000000000000..71e85c85d47b8bd0a98902122ebe48836d21390a --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_sim_password_info.md @@ -0,0 +1,101 @@ +# SimPasswordInfo + + +## 概述 + +SIM卡密码信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [fac](#fac) | String
SIM锁类型。 | +| [oldPassword](#oldpassword) | String
旧密码文本  | +| [newPassword](#newpassword) | String
新密码文本  | +| [serial](#serial) | int
请求的序列号  | +| [passwordLength](#passwordlength) | int
旧密码或新密码的最大长度  | + + +## 类成员变量说明 + + +### fac + + +``` +String SimPasswordInfo::fac +``` +**描述:** +SIM锁类型。 + +- AO:禁止所有呼出 + +- OI:禁止所有国际呼出。 + +- OX:禁止所有国际呼出,归属国除外 + +- AI:禁止所有呼入 + +- IR:归属地以外漫游时,禁止所有呼入。 + +- AB:禁止所有业务(仅在模式大于等于0时适用) + +- AG:禁止呼出业务(仅在模式大于等于0时适用) + +- AC:禁止呼入业务(仅在模式大于等于0时适用) + +- FD:FDN,固定号码拨号 + +- PN:锁网络 + +- PU:锁子网 + +- PP:锁定SP + + +### newPassword + + +``` +String SimPasswordInfo::newPassword +``` +**描述:** +新密码文本 + + +### oldPassword + + +``` +String SimPasswordInfo::oldPassword +``` +**描述:** +旧密码文本 + + +### passwordLength + + +``` +int SimPasswordInfo::passwordLength +``` +**描述:** +旧密码或新密码的最大长度 + + +### serial + + +``` +int SimPasswordInfo::serial +``` +**描述:** +请求的序列号 diff --git a/zh-cn/device-dev/reference/hdi-apis/_sim_pin_input_times.md b/zh-cn/device-dev/reference/hdi-apis/_sim_pin_input_times.md new file mode 100644 index 0000000000000000000000000000000000000000..561b5bc51f92bb16eab5262c6f2070ff8c7dde24 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_sim_pin_input_times.md @@ -0,0 +1,99 @@ +# SimPinInputTimes + + +## 概述 + +SIM密码输入次数信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [times](#times) | int
剩余次数  | +| [pukTimes](#puktimes) | int
PUK码剩余次数  | +| [pinTimes](#pintimes) | int
PIN码剩余次数  | +| [puk2Times](#puk2times) | int
PUK2码剩余次数  | +| [pin2Times](#pin2times) | int
PIN2码剩余次数  | +| [code](#code) | String
请求字段,例如: SIM PIN2:表示SIM卡PIN2码请求  | + + +## 类成员变量说明 + + +### code + + +``` +String SimPinInputTimes::code +``` +**描述:** +请求字段,例如: SIM PIN2:表示SIM卡PIN2码请求 + + +### pin2Times + + +``` +int SimPinInputTimes::pin2Times +``` +**描述:** +PIN2码剩余次数 + + +### pinTimes + + +``` +int SimPinInputTimes::pinTimes +``` +**描述:** +PIN码剩余次数 + + +### puk2Times + + +``` +int SimPinInputTimes::puk2Times +``` +**描述:** +PUK2码剩余次数 + + +### pukTimes + + +``` +int SimPinInputTimes::pukTimes +``` +**描述:** +PUK码剩余次数 + + +### serial + + +``` +int SimPinInputTimes::serial +``` +**描述:** +请求的序列号 + + +### times + + +``` +int SimPinInputTimes::times +``` +**描述:** +剩余次数 diff --git a/zh-cn/device-dev/reference/hdi-apis/_slice_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_slice_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..2450ed45cefda672dec38b8f087c670db0972ff0 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_slice_fusion.md @@ -0,0 +1,51 @@ +# SliceFusion + + +## 概述 + +在x各维度,在axes维度中,以begin为起点,截取size长度的切片。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_SLICE_FUSION。 + +输入: + +- x,n维输入tensor。 + +- begin,一组不小于0的整数,指定axes维度上的起始切分点。 + +- size,一组不小于1的整数,指定axes维度上切片的长度。假设某一维度i,1<=size[i]<=input.shape[i]-begin[i]。 + +输出: + +- output,切片得到的n维tensor。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [axes](#axes) | long[]
作用的维度。  | + + +## 类成员变量说明 + + +### axes + + +``` +long [] SliceFusion::axes +``` +**描述:** +作用的维度。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_sms_message_i_o_info.md b/zh-cn/device-dev/reference/hdi-apis/_sms_message_i_o_info.md new file mode 100644 index 0000000000000000000000000000000000000000..0eb8d169672ddd6def1f1d9be47e510f310f82c0 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_sms_message_i_o_info.md @@ -0,0 +1,77 @@ +# SmsMessageIOInfo + + +## 概述 + +SIM卡短信信息 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [smscPdu](#smscpdu) | String
短信业务中心  | +| [pdu](#pdu) | String
协议数据单元  | +| [state](#state) | int
状态  | +| [index](#index) | int
消息索引  | + + +## 类成员变量说明 + + +### index + + +``` +int SmsMessageIOInfo::index +``` +**描述:** +消息索引 + + +### pdu + + +``` +String SmsMessageIOInfo::pdu +``` +**描述:** +协议数据单元 + + +### serial + + +``` +int SmsMessageIOInfo::serial +``` +**描述:** +请求的序列号 + + +### smscPdu + + +``` +String SmsMessageIOInfo::smscPdu +``` +**描述:** +短信业务中心 + + +### state + + +``` +int SmsMessageIOInfo::state +``` +**描述:** +状态 diff --git a/zh-cn/device-dev/reference/hdi-apis/_sms_message_info.md b/zh-cn/device-dev/reference/hdi-apis/_sms_message_info.md new file mode 100644 index 0000000000000000000000000000000000000000..ec3322c21ea8d91f099bf0bef0c50ece74b63deb --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_sms_message_info.md @@ -0,0 +1,59 @@ +# SmsMessageInfo + + +## 概述 + +上报短信信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [indicationType](#indicationtype) | int
响应类型 | +| [size](#size) | int
总数  | +| [pdu](#pdu) | List< unsigned char >
协议数据单元  | + + +## 类成员变量说明 + + +### indicationType + + +``` +int SmsMessageInfo::indicationType +``` +**描述:** +响应类型 + +- 0:查询上报 + +- 1:主动上报 + + +### pdu + + +``` +List SmsMessageInfo::pdu +``` +**描述:** +协议数据单元 + + +### size + + +``` +int SmsMessageInfo::size +``` +**描述:** +总数 diff --git a/zh-cn/device-dev/reference/hdi-apis/_softmax.md b/zh-cn/device-dev/reference/hdi-apis/_softmax.md new file mode 100644 index 0000000000000000000000000000000000000000..520406c9230b7bbdb27e0eafc6a28c56bb375289 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_softmax.md @@ -0,0 +1,47 @@ +# Softmax + + +## 概述 + +给定一个tensor,计算其softmax结果。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_SOFTMAX。 + +输入: + +- x,n维tensor + +输出: + +- output,softmax的计算结果,一个n维tensor,类型和shape和x一致。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [axis](#axis) | long[]
指定计算softmax的维度。整数取值范围为[-n,n)。  | + + +## 类成员变量说明 + + +### axis + + +``` +long [] Softmax::axis +``` +**描述:** +指定计算softmax的维度。整数取值范围为[-n,n)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_space_to_batch_n_d.md b/zh-cn/device-dev/reference/hdi-apis/_space_to_batch_n_d.md new file mode 100644 index 0000000000000000000000000000000000000000..da451a3d56bfd4daa0a39f1a9d440516a8f3652b --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_space_to_batch_n_d.md @@ -0,0 +1,75 @@ +# SpaceToBatchND + + +## 概述 + +将4维张量在空间维度上进行切分成多个小块,然后在batch维度上拼接这些小块。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_SPACE_TO_BATCH_ND。 + +输入: + +- x,n维tensor + + 输出: +- output:一个4维tensor,数据类型和input一致。shape由input、blockShape和paddings共同决定,假设input shape为[n,c,h,w],则有: + + $ output.shape[0] = n \* blockShape[0] \* blockShape[1] $ + + $ output.shape[1] = c $ + + $ output.shape[2] = (h + paddings[0][0] + paddings[0][1]) / blockShape[0] $ + + $ output.shape[3] = (w + paddings[1][0] + paddings[1][1]) / blockShape[1] $ + + 要求$ (h + paddings[0][0] + paddings[0][1]) $能被$ blockShape[0] $整除,$ (w + paddings[1][0] + paddings[1][1]) $能被$ blockShape[1] $整除。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [blockShape](#blockshape) | long[]
描述空间维度为分割的个数,取值需大于1。 | +| [paddings](#paddings) | long[][]
空间维度的填充大小。 | + + +## 类成员变量说明 + + +### blockShape + + +``` +long [] SpaceToBatchND::blockShape +``` + +**描述:** + +描述空间维度为分割的个数,取值需大于1。 + + +### paddings + + +``` +long [][] SpaceToBatchND::paddings +``` + +**描述:** + +空间维度的填充大小。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_split.md b/zh-cn/device-dev/reference/hdi-apis/_split.md new file mode 100644 index 0000000000000000000000000000000000000000..016d02e10ccd7f817adc471f95cd43c6f3964f7d --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_split.md @@ -0,0 +1,81 @@ +# Split + + +## 概述 + +算子沿 axis 维度将x拆分成多个张量,张量数量由outputNum指定。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_SPLIT。 + +输入: + +- x,n维tensor + +输出: + +- outputs,一组n维张量,每一个张量类型和维度相同,每个张量的类型和x一致。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [outputNum](#outputnum) | long
指定分割数量。 | +| [sizeSplits](#sizesplits) | long[]
指定输入的张量沿axis轴拆分后,每个张量的大小。 | +| [axis](#axis) | long
指定分割的维度。 | + + +## 类成员变量说明 + + +### axis + + +``` +long Split::axis +``` + +**描述:** + +指定分割的维度。 + + +### outputNum + + +``` +long Split::outputNum +``` + +**描述:** + +指定分割数量。 + + +### sizeSplits + + +``` +long [] Split::sizeSplits +``` + +**描述:** + +指定输入的张量沿 axis 轴拆分后,每个张量的大小。 + +如果 sizeSplits 的数据为空,则 sizeSplits 被拆分成大小均等的 张量,此时要求 x.shape[axis] 可以被 outputNum 整除;如果 sizeSplits 不为空,则要求 sizeSplits 所有元素之和等于 x.shape[axis]。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_sqrt.md b/zh-cn/device-dev/reference/hdi-apis/_sqrt.md new file mode 100644 index 0000000000000000000000000000000000000000..7190027f319a7b5b5a9e14fd1f7e8ec52760684c --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_sqrt.md @@ -0,0 +1,24 @@ +# Sqrt + + +## 概述 + +给定一个tensor,计算其平方根。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_SQRT。 + +输入: + +- x,n维tensor。 + +输出: + +- output,一个n维tensor,类型和shape和x一致。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_squared_difference.md b/zh-cn/device-dev/reference/hdi-apis/_squared_difference.md new file mode 100644 index 0000000000000000000000000000000000000000..5c455a717c365f22823d4cae82ba9b0c4637eb16 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_squared_difference.md @@ -0,0 +1,26 @@ +# SquaredDifference + + +## 概述 + +计算两个输入的差值并返回差值的平方。SquaredDifference算子支持tensor和tensor相减。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_SQUEEZE。 + +输入: + +- x,被减数,是一个tensor,tensor的类型可以是实数或DATA_TYPE_BOOL。 + +- y,减数,是一个tensor,tensor的类型可以是实数或DATA_TYPE_BOOL。 + +输出: + +- output,output的shape由x1和y共同决定,x1和y的shape相同时, output的shape和x1、y相同;shape不同时,需要将x1或y做broadcast操作后,相减得到output。 output的精度由两个输入中更高精度的决定。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_squeeze.md b/zh-cn/device-dev/reference/hdi-apis/_squeeze.md new file mode 100644 index 0000000000000000000000000000000000000000..73464d52e61791d400f2f098ceea1c2536ce3fd8 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_squeeze.md @@ -0,0 +1,49 @@ +# Squeeze + + +## 概述 + +去除axis中,长度为1的维度。支持int8量化输入。 + +假设输入的x的shape为[2,1,1,2,2],axis为[0,1],则输出的output的shape为[2,1,2,2],意思是第0维到第1维之间,长度为1的维度被去除。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_SQUARED_DIFFERENCE。 + +输入: + +- x,n维tensor + +输出: + +- output,去除axis中长度为1的维度之后得到的tensor。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [axis](#axis) | long[]
指定删除的维度。axis可以是一个整数或数组,整数的取值范围为[-n,n)。  | + + +## 类成员变量说明 + + +### axis + + +``` +long [] Squeeze::axis +``` +**描述:** +指定删除的维度。axis可以是一个整数或数组,整数的取值范围为[-n,n)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_srvcc_status.md b/zh-cn/device-dev/reference/hdi-apis/_srvcc_status.md new file mode 100644 index 0000000000000000000000000000000000000000..fb6109d5be653e3f1397b1d25db9eda6721c78a2 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_srvcc_status.md @@ -0,0 +1,41 @@ +# SrvccStatus + + +## 概述 + +SRVCC(Single Radio Voice Call Continuity)状态信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [status](#status) | int
SRVCC(Single Radio Voice Call Continuity)状态 | + + +## 类成员变量说明 + + +### status + + +``` +int SrvccStatus::status +``` +**描述:** +SRVCC(Single Radio Voice Call Continuity)状态 + +- 0:开始 + +- 1:成功 + +- 2:失败 + +- 3:取消 diff --git a/zh-cn/device-dev/reference/hdi-apis/_ss_notice_info.md b/zh-cn/device-dev/reference/hdi-apis/_ss_notice_info.md new file mode 100644 index 0000000000000000000000000000000000000000..d55d0bc4fc5a7cb944bdc323ddb01f9005fdd651 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_ss_notice_info.md @@ -0,0 +1,84 @@ +# SsNoticeInfo + + +## 概述 + +补充业务信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serviceType](#servicetype) | int
业务类型 | +| [requestType](#requesttype) | int
请求类型 | +| [serviceClass](#serviceclass) | int
服务类别,参考3GPP TS 27.007  | +| [result](#result) | int
查询结果,具体查看[RilErrType](_ril.md#rilerrtype) | + + +## 类成员变量说明 + + +### requestType + + +``` +int SsNoticeInfo::requestType +``` +**描述:** +请求类型 + +- 0:去激活 + +- 1:激活 + +- 2:状态查询 + +- 3:注册 + +- 4:删除 + + +### result + + +``` +int SsNoticeInfo::result +``` +**描述:** +查询结果,具体查看[RilErrType](_ril.md#rilerrtype) + + +### serviceClass + + +``` +int SsNoticeInfo::serviceClass +``` +**描述:** +服务类别,参考3GPP TS 27.007 + + +### serviceType + + +``` +int SsNoticeInfo::serviceType +``` +**描述:** +业务类型 + +- 0:无条件 + +- 1:遇忙时 + +- 2:无应答时 + +- 3:不可达时(无网络服务或者关机时) diff --git a/zh-cn/device-dev/reference/hdi-apis/_stack.md b/zh-cn/device-dev/reference/hdi-apis/_stack.md new file mode 100644 index 0000000000000000000000000000000000000000..b932887dd8e9bd0da9e3476695ed7e104c3ddb40 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_stack.md @@ -0,0 +1,47 @@ +# Stack + + +## 概述 + +将一组tensor沿axis维度进行堆叠,堆叠前每个tensor的维数为n,则堆叠后output维数为n+1。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_STACK。 + +输入: + +- 多个输入n维tensor,每个tensor要求shape相同且类型相同。 + +输出: + +- output,将输入的张量沿axis维度堆叠的输出,n+1维tensor,数据类型与精度和输入相同。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [axis](#axis) | long
一个整数,指定tensor堆叠的维度。axis可以是负数,axis取值范围为[-(n+1),(n+1))。  | + + +## 类成员变量说明 + + +### axis + + +``` +long Stack::axis +``` +**描述:** +一个整数,指定tensor堆叠的维度。axis可以是负数,axis取值范围为[-(n+1),(n+1))。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_stream_attribute.md b/zh-cn/device-dev/reference/hdi-apis/_stream_attribute.md index 0f27781eb80cac98f6a7ed813503f715d4220486..fa85df5b51b91d9edeb8c8b62b383e8fbb80dfec 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_stream_attribute.md +++ b/zh-cn/device-dev/reference/hdi-apis/_stream_attribute.md @@ -1,34 +1,34 @@ # StreamAttribute -## **概述** +## 概述 流的属性。 **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [streamId_](#streamid) | 流的ID,用于在设备内唯一标识一条流。 | -| [width_](#width) | 图像宽度。 | -| [height_](#height) | 图像高度。 | -| [overrideFormat_](#overrideformat) | 重写的图像格式。 | -| [overrideDataspace_](#overridedataspace) | 重写的图像颜色空间 | -| [producerUsage_](#producerusage) | 重写后的生产者的使用方式。 | -| [producerBufferCount_](#producerbuffercount) | 重写后的生产者缓存数量。 | -| [maxBatchCaptureCount_](#maxbatchcapturecount) | 连拍支持的最大捕获帧数量。 | -| [maxCaptureCount_](#maxcapturecount) | 最大的并发捕获请求个数,默认为1。 | +| [streamId_](#streamid_) | int
流的ID,用于在设备内唯一标识一条流。  | +| [width_](#width_) | int
图像宽度。  | +| [height_](#height_) | int
图像高度。  | +| [overrideFormat_](#overrideformat_) | int
重写的图像格式。  | +| [overrideDataspace_](#overridedataspace_) | int
重写的图像颜色空间。  | +| [producerUsage_](#producerusage_) | int
重写后的生产者的使用方式。  | +| [producerBufferCount_](#producerbuffercount_) | int
重写后的生产者缓存数量。  | +| [maxBatchCaptureCount_](#maxbatchcapturecount_) | int
连拍支持的最大捕获帧数量。  | +| [maxCaptureCount_](#maxcapturecount_) | int
最大的并发捕获请求个数,默认为1。  | -## **类成员变量说明** +## 类成员变量说明 ### height_ @@ -37,9 +37,7 @@ ``` int StreamAttribute::height_ ``` - -**描述:** - +**描述:** 图像高度。 @@ -49,9 +47,7 @@ int StreamAttribute::height_ ``` int StreamAttribute::maxBatchCaptureCount_ ``` - -**描述:** - +**描述:** 连拍支持的最大捕获帧数量。 @@ -61,9 +57,7 @@ int StreamAttribute::maxBatchCaptureCount_ ``` int StreamAttribute::maxCaptureCount_ ``` - -**描述:** - +**描述:** 最大的并发捕获请求个数,默认为1。 @@ -73,9 +67,7 @@ int StreamAttribute::maxCaptureCount_ ``` int StreamAttribute::overrideDataspace_ ``` - -**描述:** - +**描述:** 重写的图像颜色空间。 @@ -85,9 +77,7 @@ int StreamAttribute::overrideDataspace_ ``` int StreamAttribute::overrideFormat_ ``` - -**描述:** - +**描述:** 重写的图像格式。 @@ -97,9 +87,7 @@ int StreamAttribute::overrideFormat_ ``` int StreamAttribute::producerBufferCount_ ``` - -**描述:** - +**描述:** 重写后的生产者缓存数量。 @@ -109,9 +97,7 @@ int StreamAttribute::producerBufferCount_ ``` int StreamAttribute::producerUsage_ ``` - -**描述:** - +**描述:** 重写后的生产者的使用方式。 @@ -121,9 +107,7 @@ int StreamAttribute::producerUsage_ ``` int StreamAttribute::streamId_ ``` - -**描述:** - +**描述:** 流的ID,用于在设备内唯一标识一条流。 @@ -133,7 +117,5 @@ int StreamAttribute::streamId_ ``` int StreamAttribute::width_ ``` - -**描述:** - +**描述:** 图像宽度。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_stream_info.md b/zh-cn/device-dev/reference/hdi-apis/_stream_info.md index 2d4f5c39bf016824e2f3fa98e49673f90f9f5bb1..8831c0071496e4b0c8aee0b7edeffe9f8202d316 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_stream_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_stream_info.md @@ -1,35 +1,35 @@ # StreamInfo -## **概述** +## 概述 流信息,用于创建流时传入相关的配置参数。 **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [streamId_](#streamid_) | 流的ID,用于在设备内唯一标识一条流。 | -| [width_](#width_) | 图像宽度。 | -| [height_](#height_) | 图像高度。 | -| [format_](#format_) | 图像格式。 | -| [dataspace_](#dataspace_) | 图像颜色空间。 | -| [intent_](#intent_) | 流类型。 | -| [tunneledMode_](#tunneledmode_) | 隧道模式,值为true时开启,false关闭。 | -| [bufferQueue_](#bufferqueue_) | 图形提供的生产者句柄。 | -| [minFrameDuration_](#minframeduration_) | 最小帧间隔。 | -| [encodeType_](#encodetype_) | 编码类型。 | +| [streamId_](#streamid_) | int
流的ID,用于在设备内唯一标识一条流。 | +| [width_](#width_) | int
图像宽度。 | +| [height_](#height_) | int
图像高度。 | +| [format_](#format_) | int
图像格式。 | +| [dataspace_](#dataspace_) | int
图像颜色空间。 | +| [intent_](#intent_) | enum [StreamIntent](_camera.md#streamintent)
流类型。 | +| [tunneledMode_](#tunneledmode_) | boolean
隧道模式。 | +| [bufferQueue_](#bufferqueue_) | BufferProducerSequenceable
图形提供的生产者句柄。 | +| [minFrameDuration_](#minframeduration_) | int
最小帧间隔。 | +| [encodeType_](#encodetype_) | enum [EncodeType](_camera.md#encodetype)
编码类型。 | -## **类成员变量说明** +## 类成员变量说明 ### bufferQueue_ @@ -39,7 +39,7 @@ BufferProducerSequenceable StreamInfo::bufferQueue_ ``` -**描述:** +**描述:** 图形提供的生产者句柄。 @@ -51,7 +51,7 @@ BufferProducerSequenceable StreamInfo::bufferQueue_ int StreamInfo::dataspace_ ``` -**描述:** +**描述:** 图像颜色空间。 @@ -63,7 +63,7 @@ int StreamInfo::dataspace_ enum EncodeType StreamInfo::encodeType_ ``` -**描述:** +**描述:** 编码类型。 @@ -75,7 +75,7 @@ enum EncodeType StreamInfo::encodeType_ int StreamInfo::format_ ``` -**描述:** +**描述:** 图像格式。 @@ -87,7 +87,7 @@ int StreamInfo::format_ int StreamInfo::height_ ``` -**描述:** +**描述:** 图像高度。 @@ -99,7 +99,7 @@ int StreamInfo::height_ enum StreamIntent StreamInfo::intent_ ``` -**描述:** +**描述:** 流类型。 @@ -111,7 +111,7 @@ enum StreamIntent StreamInfo::intent_ int StreamInfo::minFrameDuration_ ``` -**描述:** +**描述:** 最小帧间隔。 @@ -123,7 +123,7 @@ int StreamInfo::minFrameDuration_ int StreamInfo::streamId_ ``` -**描述:** +**描述:** 流的ID,用于在设备内唯一标识一条流。 @@ -135,9 +135,11 @@ int StreamInfo::streamId_ boolean StreamInfo::tunneledMode_ ``` -**描述:** +**描述:** -隧道模式,值为true时开启,false关闭。 开启隧道模式后,HAL不直接和上层交互,通过图形提供的生产者句柄来传递帧数据, 对于一些IOT设备,可能不需要或者不支持预览流的图像数据缓存流转,此时需要关闭隧道模式。 +隧道模式。 + +值为true时开启,false关闭。 开启隧道模式后,HAL不直接和上层交互,通过图形提供的生产者句柄来传递帧数据,对于一些IOT设备,可能不需要或者不支持预览流的图像数据缓存流转,此时需要关闭隧道模式。 ### width_ @@ -147,6 +149,6 @@ boolean StreamInfo::tunneledMode_ int StreamInfo::width_ ``` -**描述:** +**描述:** 图像宽度。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_strided_slice.md b/zh-cn/device-dev/reference/hdi-apis/_strided_slice.md new file mode 100644 index 0000000000000000000000000000000000000000..6ec90c19e1f3fa0ec4357e156a8ac6ba7caa2612 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_strided_slice.md @@ -0,0 +1,123 @@ +# StridedSlice + + +## 概述 + +根据步长和索引对输入张量进行切片提取。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_STRIDED_SLICE。 + +输入: + +- x,n维tensor。 + +- begin,1维tensor,begin的长度等于n,begin[i]指定第i维上截取的起点。 + +- end,1维tensor,end的长度等于n,end[i]指定第i维上截取的终点。 + +- strides,1维张量,strides的长度等于n,strides[i]指定第i维上截取的步长,允许存在负值。 + > ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** + > 输入的张量有如下情况:begin, end 和 strides 的shape必须相同。 begin,end 是从0开始进行索引。 strides 的元素必须非零。 + +输出: + +- output,堆叠运算后的tensor,数据类型与x相同。输出维度rank(x[0])+1维。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [beginMask](#beginmask) | long
表示切片的起始索引。 | +| [endMask](#endmask) | long
表示切片的结束索引。 | +| [ellipsisMask](#ellipsismask) | long
一个整数,用于解除begin和end的限制。 | +| [newAxisMask](#newaxismask) | long
用于新增维度。 | +| [shrinkAxisMask](#shrinkaxismask) | long
用于压缩指定维度。 | + + +## 类成员变量说明 + + +### beginMask + + +``` +long StridedSlice::beginMask +``` + +**描述:** + +表示切片的起始索引。 + +beginMask使用二进制编码方式对输入x的不同维度进行标志,beginMask的第i位设置为1则begin[i]参数对应的第i维度设置无效,表示该维度的起始索引从0开始。默认值为0。 + + +### ellipsisMask + + +``` +long StridedSlice::ellipsisMask +``` + +**描述:** + +一个整数,用于解除begin和end的限制。 + +不为0的维度不需要进行切片操作。 将ellipsisMask转成二进制表示,如果ellipsisMask的第i位为1,则对于第i维,从第一个元素开始,以strides[i]为步长,截取元素直到tensor边界。 + + +### endMask + + +``` +long StridedSlice::endMask +``` + +**描述:** + +表示切片的结束索引。 + +功能类似begin_mask。 endMask使用二进制编码方式对输入x的不同维度进行标志,第i位设置为1则end参数对应的该维度设置无效,表示该维度切分的结束索引到列表最后,即切分到尽可能大的维度。默认值为0。 + + +### newAxisMask + + +``` +long StridedSlice::newAxisMask +``` + +**描述:** + +用于新增维度。 + +newAxisMask使用二进制编码方式对输入x的不同维度进行标志,如果第i位出现1,则begin、end、stride对所有维度参数无效,并在第i位上增加一个大小为1的维度。 + + +### shrinkAxisMask + + +``` +long StridedSlice::shrinkAxisMask +``` + +**描述:** + +用于压缩指定维度。 + +将shrinkAxisMask转成二进制表示,如果shrinkAxisMask的第i位位1,则舍去第i维所有元素,第i维长度压缩至1。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_sub_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_sub_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..16323cea7ddd01e7009405f61c5edb27d469c418 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_sub_fusion.md @@ -0,0 +1,49 @@ +# SubFusion + + +## 概述 + +计算两个输入的差值。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_SUB_FUSION。 + +输入: + +- x,被减数,是int或float类型的张量。 + +- y,减数,是int或float类型的张量。 + +输出: + +- output,两个input相减的差。output的shape由x和y共同决定,x和y的shape相同时,output的shape和x、y相同; shape不同时,需要将x或y做broadcast操作后,相减得到output。output的精度为x和y中精度更高的决定。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [activationType](#activationtype) | enum [ActivationType](_n_n_rt.md#activationtype)
激活函数类型,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。  | + + +## 类成员变量说明 + + +### activationType + + +``` +enum ActivationType SubFusion::activationType +``` +**描述:** +激活函数类型,详情请参考:[ActivationType](_n_n_rt.md#activationtype)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_sub_graph.md b/zh-cn/device-dev/reference/hdi-apis/_sub_graph.md new file mode 100644 index 0000000000000000000000000000000000000000..64531a425079e2c7c4d4d7d2ce8e3d64de811200 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_sub_graph.md @@ -0,0 +1,70 @@ +# SubGraph + + +## 概述 + +子图结构体。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [name](#name) | String
子图的名称。  | +| [inputIndices](#inputindices) | unsigned int[]
子图的输入子图在[Model](_model.md)的subGraph数组中的下标。  | +| [outputIndices](#outputindices) | unsigned int[]
子图的输出子图在[Model](_model.md)的subGraph数组中的下标。  | +| [nodeIndices](#nodeindices) | unsigned int[]
子图包含的算子节点在[Model](_model.md)的nodes数组中的下标。  | + + +## 类成员变量说明 + + +### inputIndices + + +``` +unsigned int [] SubGraph::inputIndices +``` +**描述:** +子图的输入子图在[Model](_model.md)的subGraph数组中的下标。 + + +### name + + +``` +String SubGraph::name +``` +**描述:** +子图的名称。 + + +### nodeIndices + + +``` +unsigned int [] SubGraph::nodeIndices +``` +**描述:** +子图包含的算子节点在[Model](_model.md)的nodes数组中的下标。 + + +### outputIndices + + +``` +unsigned int [] SubGraph::outputIndices +``` +**描述:** +子图的输出子图在[Model](_model.md)的subGraph数组中的下标。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_support_buffer_type.md b/zh-cn/device-dev/reference/hdi-apis/_support_buffer_type.md index d185ae8f897719c5e443d35bef17317916d79566..dca24e2c9313ff93374bbd266958107349474b5b 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_support_buffer_type.md +++ b/zh-cn/device-dev/reference/hdi-apis/_support_buffer_type.md @@ -1,29 +1,29 @@ # SupportBufferType -## **概述** +## 概述 SupportBuffer类型定义。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [size](#size) | 结构体大小 | -| [version](#version) | 组件版本信息 | -| [portIndex](#portindex) | 端口索引 | -| [bufferTypes](#buffertypes) | 支持的所有Buffer类型 | +| [size](#size) | uint32_t
结构体大小。  | +| [version](#version) | union OMX_VERSIONTYPE
组件版本信息。  | +| [portIndex](#portindex) | uint32_t
端口索引。  | +| [bufferTypes](#buffertypes) | uint32_t
支持的所有Buffer类型。  | -## **类成员变量说明** +## 类成员变量说明 ### bufferTypes @@ -32,9 +32,7 @@ SupportBuffer类型定义。 ``` uint32_t SupportBufferType::bufferTypes ``` - -**描述:** - +**描述:** 支持的所有Buffer类型。 @@ -44,9 +42,7 @@ uint32_t SupportBufferType::bufferTypes ``` uint32_t SupportBufferType::portIndex ``` - -**描述:** - +**描述:** 端口索引。 @@ -56,9 +52,7 @@ uint32_t SupportBufferType::portIndex ``` uint32_t SupportBufferType::size ``` - -**描述:** - +**描述:** 结构体大小。 @@ -68,7 +62,5 @@ uint32_t SupportBufferType::size ``` union OMX_VERSIONTYPE SupportBufferType::version ``` - -**描述:** - +**描述:** 组件版本信息。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_td_scdma_rssi.md b/zh-cn/device-dev/reference/hdi-apis/_td_scdma_rssi.md new file mode 100644 index 0000000000000000000000000000000000000000..165ab6e40090b562e165de79e4bad13550e432c0 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_td_scdma_rssi.md @@ -0,0 +1,33 @@ +# TdScdmaRssi + + +## 概述 + +TDSCDMA信号强度。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [rscp](#rscp) | int
表示接收信号码功率  | + + +## 类成员变量说明 + + +### rscp + + +``` +int TdScdmaRssi::rscp +``` +**描述:** +表示接收信号码功率 diff --git a/zh-cn/device-dev/reference/hdi-apis/_template_info.md b/zh-cn/device-dev/reference/hdi-apis/_template_info.md deleted file mode 100644 index eefb0c607c9e6f08ae07274f7711a98d0dcf7793..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_template_info.md +++ /dev/null @@ -1,82 +0,0 @@ -# TemplateInfo - - -## **概述** - -凭据模版信息。 - -**Since:** - -3.2 - -**Version:** - -1.0 - -**所属模块:** - -[HdfFaceAuth](_hdf_face_auth.md) | [HdfPinAuth](_hdf_pin_auth.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| [executorType](#executortype) | 执行器类型,根据执行器支持的算法类型进行分类。 | -| [freezingTime](#freezingtime) | 认证方式被冻结的时间。 | -| [remainTimes](#remaintimes) | 认证方式距离被冻结的可处理认证请求次数。 | -| [extraInfo](#extrainfo) | 其他相关信息,用于支持信息扩展。 | - - -## **类成员变量说明** - - -### executorType - - -``` -unsigned int TemplateInfo::executorType -``` - -**描述:** - -执行器类型,根据执行器支持的算法类型进行分类。 - - -### extraInfo - - -``` -unsigned char [] TemplateInfo::extraInfo -``` - -**描述:** - -其他相关信息,用于支持信息扩展。 - - -### freezingTime - - -``` -int TemplateInfo::freezingTime -``` - -**描述:** - -认证方式被冻结的时间。 - - -### remainTimes - - -``` -int TemplateInfo::remainTimes -``` - -**描述:** - -认证方式距离被冻结的可处理认证请求次数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_template_info_faceauth.md b/zh-cn/device-dev/reference/hdi-apis/_template_info_faceauth.md new file mode 100644 index 0000000000000000000000000000000000000000..da191dc21a231f4e40e3cd4e7837e8ffd477639c --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_template_info_faceauth.md @@ -0,0 +1,82 @@ +# TemplateInfo + + +## 概述 + +凭据模版信息。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[HdfFaceAuth](_hdf_face_auth.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [executorType](#executortype) | unsigned int
执行器类型,根据执行器支持的能力进行分类。 | +| [freezingTime](#freezingtime) | int
认证方式被冻结的时间。 | +| [remainTimes](#remaintimes) | int
认证方式距离被冻结的可处理认证请求次数。 | +| [extraInfo](#extrainfo) | unsigned char[]
其他相关信息,用于支持信息扩展。 | + + +## 类成员变量说明 + + +### executorType + + +``` +unsigned int TemplateInfo::executorType +``` + +**描述:** + +执行器类型,根据执行器支持的能力进行分类。 + + +### extraInfo + + +``` +unsigned char [] TemplateInfo::extraInfo +``` + +**描述:** + +其他相关信息,用于支持信息扩展。 + + +### freezingTime + + +``` +int TemplateInfo::freezingTime +``` + +**描述:** + +认证方式被冻结的时间。 + + +### remainTimes + + +``` +int TemplateInfo::remainTimes +``` + +**描述:** + +认证方式距离被冻结的可处理认证请求次数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_template_info_pinauth.md b/zh-cn/device-dev/reference/hdi-apis/_template_info_pinauth.md new file mode 100644 index 0000000000000000000000000000000000000000..5d1737da37952ddea5d6e02590dc66bb8b79c1fc --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_template_info_pinauth.md @@ -0,0 +1,82 @@ +# TemplateInfo + + +## 概述 + +凭据模版信息,口令模版在用户注册口令认证凭据时生成并存储,用于支持通过口令认证方式验证用户身份。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[HdfPinAuth](_hdf_pin_auth.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [executorType](#executortype) | unsigned int
执行器类型,根据执行器支持的算法类型进行分类。 | +| [freezingTime](#freezingtime) | int
认证方式被冻结的时间。 | +| [remainTimes](#remaintimes) | int
认证方式距离被冻结的可处理认证请求次数。 | +| [extraInfo](#extrainfo) | unsigned char[]
其他相关信息,用于支持信息扩展。 | + + +## 类成员变量说明 + + +### executorType + + +``` +unsigned int TemplateInfo::executorType +``` + +**描述:** + +执行器类型,根据执行器支持的算法类型进行分类。 + + +### extraInfo + + +``` +unsigned char [] TemplateInfo::extraInfo +``` + +**描述:** + +其他相关信息,用于支持信息扩展。 + + +### freezingTime + + +``` +int TemplateInfo::freezingTime +``` + +**描述:** + +认证方式被冻结的时间。 + + +### remainTimes + + +``` +int TemplateInfo::remainTimes +``` + +**描述:** + +认证方式距离被冻结的可处理认证请求次数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_tensor.md b/zh-cn/device-dev/reference/hdi-apis/_tensor.md new file mode 100644 index 0000000000000000000000000000000000000000..4683dbedb87b842b6aed1c2afa6c9965aea6cd33 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_tensor.md @@ -0,0 +1,110 @@ +# Tensor + + +## 概述 + +张量结构体。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [name](#name) | String
张量名称。 | +| [dataType](#datatype) | enum [DataType](_n_n_rt.md#datatype)
张量数据类型,详情请参考:[DataType](_n_n_rt.md#datatype)。 | +| [dims](#dims) | int[]
张量维度数组。 | +| [format](#format) | enum [Format](_n_n_rt.md#format)
张量数据的排列,详情请参考:[Format](_n_n_rt.md#format)。 | +| [data](#data) | struct [SharedBuffer](_shared_buffer.md)
进程通信时用于张量数据传输的结构体,详情请参考:[SharedBuffer](_shared_buffer.md)。 | +| [quantParams](#quantparams) | struct [QuantParam](_quant_param.md)[]
张量的量化参数数组。详情请参考:[QuantParam](_quant_param.md)。 | + + +## 类成员变量说明 + + +### data + + +``` +struct SharedBuffer Tensor::data +``` + +**描述:** + +进程通信时用于张量数据传输的结构体,详情请参考:[SharedBuffer](_shared_buffer.md)。 + + +### dataType + + +``` +enum DataType Tensor::dataType +``` + +**描述:** + +张量数据类型,详情请参考:[DataType](_n_n_rt.md#datatype)。 + + +### dims + + +``` +int [] Tensor::dims +``` + +**描述:** + +张量维度数组。 + + +### format + + +``` +enum Format Tensor::format +``` + +**描述:** + +张量数据的排列,详情请参考:[Format](_n_n_rt.md#format)。 + + +### name + + +``` +String Tensor::name +``` + +**描述:** + +张量名称。 + + +### quantParams + + +``` +struct QuantParam [] Tensor::quantParams +``` + +**描述:** + +张量的量化参数数组。详情请参考:[QuantParam](_quant_param.md)。 + +分为两种情况,如果长度为一,则所有轴公用一个量化; 若长度不为一,则数组中的每一个量化参数和轴一一对应。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_thermal_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_thermal_types_8idl.md index 8a9f62560247133588da745fba6962eaf13b0120..44e846c9bb36e8b6f5c1165865cb159d03ef5d18 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_thermal_types_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_thermal_types_8idl.md @@ -1,7 +1,7 @@ # ThermalTypes.idl -## **概述** +## 概述 设备发热状态相关的数据类型。 @@ -20,15 +20,15 @@ [Thermal](thermal.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [ThermalZoneInfo](_thermal_zone_info.md) | 设备发热的信息。 | -| [HdfThermalCallbackInfo](_hdf_thermal_callback_info.md) | 设备发热的信息列表。 | +| [ThermalZoneInfo](_thermal_zone_info.md) | struct
设备发热的信息。 | +| [HdfThermalCallbackInfo](_hdf_thermal_callback_info.md) | struct
设备发热的信息列表。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_thermal_zone_info.md b/zh-cn/device-dev/reference/hdi-apis/_thermal_zone_info.md index 55c9cd68298c64581d78f868a3678c556f2b17dd..e0195877cb89ae2eaaf49e839fb601a9581bf0b2 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_thermal_zone_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_thermal_zone_info.md @@ -1,31 +1,29 @@ # ThermalZoneInfo -## **概述** +## 概述 设备发热的信息。 **Since:** - 3.1 - **相关模块:** [Thermal](thermal.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [type](#type) | 发热器件的类型。 | -| [temp](#temp) | 器件的温度值。 | +| [type](#type) | String
发热器件的类型。  | +| [temp](#temp) | int
器件的温度值。  | -## **类成员变量说明** +## 类成员变量说明 ### temp @@ -34,9 +32,7 @@ ``` int ThermalZoneInfo::temp ``` - -**描述:** - +**描述:** 器件的温度值。 @@ -46,7 +42,5 @@ int ThermalZoneInfo::temp ``` String ThermalZoneInfo::type ``` - -**描述:** - +**描述:** 发热器件的类型。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_tile_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_tile_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..17507ea3b87520ffc4622d66e4dfcafa5cd4ea4d --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_tile_fusion.md @@ -0,0 +1,49 @@ +# TileFusion + + +## 概述 + +以multiples指定的次数拷贝输入张量。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_TILE_FUSION。 + +输入: + +- x,n维tensor。 + +- multiples, 1维tensor,指定各个维度拷贝的次数。其长度m不小于x的维数n。 + +输出: + +- Tensor,m维tensor,OperandType与input相同。如果input和multiples长度相同, 则output和input维数一致,都是n维tensor;如果multiples长度大于n,则用1填充input的维度, 再在各个维度上拷贝相应的次数,得到m维tensor。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [dims](#dims) | long[]
它和multiples功能相同,1维tensor,指定各个维度拷贝的次数。其长度m不小于x的维数n。  | + + +## 类成员变量说明 + + +### dims + + +``` +long [] TileFusion::dims +``` +**描述:** +它和multiples功能相同,1维tensor,指定各个维度拷贝的次数。其长度m不小于x的维数n。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_top_k_fusion.md b/zh-cn/device-dev/reference/hdi-apis/_top_k_fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..98a7a4d9990e4e6308f0843ae489ee0e84238842 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_top_k_fusion.md @@ -0,0 +1,60 @@ +# TopKFusion + + +## 概述 + +查找沿axis轴的前K个最大值和对应索引。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_TOPK_FUSION。 + +输入: + +- x,n维tensor。 + +输出: + +- output0,axis维度的前K个最大值。 + +- output1,axis维度的前K个最大值的索引。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [sorted](#sorted) | boolean
如果为True,按照大到小排序,如果为False,按照小到大排序。  | +| [axis](#axis) | long
作用的轴  | + + +## 类成员变量说明 + + +### axis + + +``` +long TopKFusion::axis +``` +**描述:** +作用的轴 + + +### sorted + + +``` +boolean TopKFusion::sorted +``` +**描述:** +如果为True,按照大到小排序,如果为False,按照小到大排序。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_transpose.md b/zh-cn/device-dev/reference/hdi-apis/_transpose.md new file mode 100644 index 0000000000000000000000000000000000000000..45a7e64a072d2be8bcb2332bada4f27575bbb6c2 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_transpose.md @@ -0,0 +1,26 @@ +# Transpose + + +## 概述 + +根据perm对x进行数据重排。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_TRANSPOSE。 + +输入: + +- x,n维tensor,待重排的tensor。 + +- perm,1维tensor,其长度和x的维数一致。 + +输出: + +- output,n维tensor,output的数据类型,量化等参数与x相同,shape由x的shape和perm共同决定。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_types_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..c207232835f54776bbad0e40d980fce7083ad2fe --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_types_8idl.md @@ -0,0 +1,57 @@ +# Types.idl + + +## 概述 + +Camera模块HDI接口使用的数据类型。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Camera](_camera.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [StreamInfo](_stream_info.md) | struct
流信息,用于创建流时传入相关的配置参数。 | +| [StreamAttribute](_stream_attribute.md) | struct
流的属性。 | +| [CaptureInfo](_capture_info.md) | struct
捕获请求的相关信息。 | +| [CaptureEndedInfo](_capture_ended_info.md) | struct
捕获结束相关信息,用于捕获结束回调[OnCaptureEnded](interface_i_stream_operator_callback.md#oncaptureended)。 | +| [CaptureErrorInfo](_capture_error_info.md) | struct
流错误信息,用于回调[OnCaptureError](interface_i_stream_operator_callback.md#oncaptureerror)。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [CamRetCode](_camera.md#camretcode) {   NO_ERROR = 0, CAMERA_BUSY = -1, INSUFFICIENT_RESOURCES = -2, INVALID_ARGUMENT = -3,   METHOD_NOT_SUPPORTED = -4, CAMERA_CLOSED = -5, DEVICE_ERROR = -6, NO_PERMISSION = -7 } | HDI接口的返回值。 | +| [ResultCallbackMode](_camera.md#resultcallbackmode) { PER_FRAME = 0, ON_CHANGED = 1 } | metadata的上报模式。 | +| [OperationMode](_camera.md#operationmode) { NORMAL = 0 } | 流的使用模式。 | +| [StreamIntent](_camera.md#streamintent) { PREVIEW = 0, VIDEO = 1, STILL_CAPTURE = 2, POST_VIEW = 3,   ANALYZE = 4, CUSTOM = 5 } | 流的类型。 | +| [EncodeType](_camera.md#encodetype) { ENCODE_TYPE_NULL = 0, ENCODE_TYPE_H264 = 1, ENCODE_TYPE_H265 = 2, ENCODE_TYPE_JPEG = 3 } | 流数据的编码类型。 | +| [StreamSupportType](_camera.md#streamsupporttype) { DYNAMIC_SUPPORTED = 0, RE_CONFIGURED_REQUIRED = 1, NOT_SUPPORTED = 2 } | 对动态配置流的支持类型,使用场景参考[IsStreamsSupported](interface_i_stream_operator.md#isstreamssupported)。 | +| [CameraStatus](_camera.md#camerastatus) { UN_AVAILABLE = 0, AVAILABLE = 1 } | Camera设备状态。 | +| [FlashlightStatus](_camera.md#flashlightstatus) { FLASHLIGHT_OFF = 0, FLASHLIGHT_ON = 1, FLASHLIGHT_UNAVAILABLE = 2 } | 闪光灯状态。 | +| [CameraEvent](_camera.md#cameraevent) { CAMERA_EVENT_DEVICE_ADD = 0, CAMERA_EVENT_DEVICE_RMV = 1 } | Camera事件。 | +| [ErrorType](_camera.md#errortype) {   FATAL_ERROR = 0, REQUEST_TIMEOUT = 1, DRIVER_ERROR = 2, DEVICE_PREEMPT = 3,   DEVICE_DISCONNECT = 4, DCAMERA_ERROR_BEGIN = 1024, DCAMERA_ERROR_DEVICE_IN_USE, DCAMERA_ERROR_NO_PERMISSION } | 设备错误类型,用于设备错误回调[OnError](interface_i_camera_device_callback.md#onerror)。 | +| [StreamError](_camera.md#streamerror) { UNKNOWN_ERROR = 0, BUFFER_LOST = 1 } | 流错误类型,用于流错误类型[CaptureErrorInfo](_capture_error_info.md)。 | + + +### 变量 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.camera.v1_0 | Camera设备接口的包路径。 | +| sequenceable ohos.hdi.camera.v1_0.BufferProducerSequenceable | ohos.hdi.camera.v1_0序列,可用缓冲区生成器。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/usb.md b/zh-cn/device-dev/reference/hdi-apis/_u_s_b.md similarity index 57% rename from zh-cn/device-dev/reference/hdi-apis/usb.md rename to zh-cn/device-dev/reference/hdi-apis/_u_s_b.md index 494b00f32ef88eed39019685303d6435bbf0ffc9..2459fcfebfcf990e4176b76ff277b6b3e30e9fe1 100644 --- a/zh-cn/device-dev/reference/hdi-apis/usb.md +++ b/zh-cn/device-dev/reference/hdi-apis/_u_s_b.md @@ -1,22 +1,22 @@ # USB -## **概述** +## 概述 提供统一的USB驱动标准接口,实现USB驱动接入。 上层USB服务开发人员可以根据USB驱动模块提供的标准接口获取如下功能:打开/关闭设备,获取设备描述符,获取文件描述符,打开/关闭接口,批量读取/写入数据, 设置/获取设备功能,绑定/解绑订阅者等。 -**Since**: +**Since:** 3.2 -**Version**: +**Version:** 1.0 -## **汇总** +## 汇总 ### 文件 @@ -33,14 +33,14 @@ | 名称 | 描述 | | -------- | -------- | -| [IUsbdBulkCallback](interface_i_usbd_bulk_callback.md) | USB驱动的回调函数。 | -| [IUsbdSubscriber](interface_i_usbd_subscriber.md) | 定义USB驱动的订阅类相关函数。 | -| [IUsbInterface](interface_i_usb_interface.md) | 定义USB驱动基本的操作功能。 | -| [PortInfo](_port_info.md) | USB设备端口信息。 | -| [UsbDev](_usb_dev.md) | USB设备地址信息。 | -| [UsbPipe](_usb_pipe.md) | USB设备管道信息。 | -| [UsbCtrlTransfer](_usb_ctrl_transfer.md) | USB设备控制传输信息。 | -| [USBDeviceInfo](_u_s_b_device_info.md) | USB设备信息。 | +| [IUsbdBulkCallback](interface_i_usbd_bulk_callback.md) | interface
USB驱动的回调函数。 | +| [IUsbdSubscriber](interface_i_usbd_subscriber.md) | interface
定义USB驱动的订阅类相关函数。 | +| [IUsbInterface](interface_i_usb_interface.md) | interface
定义USB驱动基本的操作功能。 | +| [PortInfo](_port_info.md) | struct
USB设备端口信息。 | +| [UsbDev](_usb_dev.md) | struct
USB设备地址信息。 | +| [UsbPipe](_usb_pipe.md) | struct
USB设备管道信息。 | +| [UsbCtrlTransfer](_usb_ctrl_transfer.md) | struct
USB设备控制传输信息。 | +| [USBDeviceInfo](_u_s_b_device_info.md) | struct
USB设备信息。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_u_s_b_device_info.md b/zh-cn/device-dev/reference/hdi-apis/_u_s_b_device_info.md index deb045d7748f4af7f67570f90c437bdeeeccaa9a..b17821b0380ecf24271ae18e9f3d34fef9039381 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_u_s_b_device_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_u_s_b_device_info.md @@ -1,36 +1,32 @@ # USBDeviceInfo -## **概述** +## 概述 USB设备信息。 **Since:** - 3.2 - **Version:** - 1.0 - **相关模块:** -[USB](usb.md) +[USB](_u_s_b.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [status](#status) | USB设备状态。 | -| [busNum](#busnum) | USB设备总线编号。 | -| [devNum](#devnum) | USB设备编号。 | +| [status](#status) | int
USB设备状态。  | +| [busNum](#busnum) | int
USB设备总线编号。  | +| [devNum](#devnum) | int
USB设备编号。  | -## **类成员变量说明** +## 类成员变量说明 ### busNum @@ -39,9 +35,7 @@ USB设备信息。 ``` int USBDeviceInfo::busNum ``` - -**描述:** - +**描述:** USB设备总线编号。 @@ -51,9 +45,7 @@ USB设备总线编号。 ``` int USBDeviceInfo::devNum ``` - -**描述:** - +**描述:** USB设备编号。 @@ -63,7 +55,5 @@ USB设备编号。 ``` int USBDeviceInfo::status ``` - -**描述:** - +**描述:** USB设备状态。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_uni_info.md b/zh-cn/device-dev/reference/hdi-apis/_uni_info.md new file mode 100644 index 0000000000000000000000000000000000000000..d8df18d5aa025187dc9579c9f5dcd9f8ffbb4eb1 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_uni_info.md @@ -0,0 +1,88 @@ +# UniInfo + + +## 概述 + +通用信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [serial](#serial) | int
请求的序列号  | +| [gsmIndex](#gsmindex) | int
GSM索引  | +| [flag](#flag) | boolean
通用信息标识  | +| [arg1](#arg1) | int
参数一  | +| [arg2](#arg2) | int
参数二  | +| [strTmp](#strtmp) | String
字符串  | + + +## 类成员变量说明 + + +### arg1 + + +``` +int UniInfo::arg1 +``` +**描述:** +参数一 + + +### arg2 + + +``` +int UniInfo::arg2 +``` +**描述:** +参数二 + + +### flag + + +``` +boolean UniInfo::flag +``` +**描述:** +通用信息标识 + + +### gsmIndex + + +``` +int UniInfo::gsmIndex +``` +**描述:** +GSM索引 + + +### serial + + +``` +int UniInfo::serial +``` +**描述:** +请求的序列号 + + +### strTmp + + +``` +String UniInfo::strTmp +``` +**描述:** +字符串 diff --git a/zh-cn/device-dev/reference/hdi-apis/_unsqueeze.md b/zh-cn/device-dev/reference/hdi-apis/_unsqueeze.md new file mode 100644 index 0000000000000000000000000000000000000000..08fd85944b8bd46be1a9bdc584c864254732c2db --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_unsqueeze.md @@ -0,0 +1,47 @@ +# Unsqueeze + + +## 概述 + +根据输入axis的值。增加一个维度。 + +该算子对应的[NodeType](_n_n_rt.md#nodetype)为NODE_TYPE_UNSQUEEZE。 + +输入: + +- x,n维tensor。 + +输出: + +- output,输出tensor。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [axis](#axis) | long[]
axis,指定增加的维度。axis可以是一个整数或一组整数,整数的取值范围为[-n,n)。  | + + +## 类成员变量说明 + + +### axis + + +``` +long [] Unsqueeze::axis +``` +**描述:** +axis,指定增加的维度。axis可以是一个整数或一组整数,整数的取值范围为[-n,n)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_usb_ctrl_transfer.md b/zh-cn/device-dev/reference/hdi-apis/_usb_ctrl_transfer.md index 99202a9155522e5e3dca0223a93e744ba3547979..9268b1241e434c8d4176e51b7b2bee459c1f8eb0 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_usb_ctrl_transfer.md +++ b/zh-cn/device-dev/reference/hdi-apis/_usb_ctrl_transfer.md @@ -1,38 +1,34 @@ # UsbCtrlTransfer -## **概述** +## 概述 USB设备控制传输信息。 **Since:** - 3.2 - **Version:** - 1.0 - **相关模块:** -[USB](usb.md) +[USB](_u_s_b.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [requestType](#requesttype) | 请求类型。 | -| [requestCmd](#requestcmd) | 请求命令。 | -| [value](#value) | 请求值。 | -| [index](#index) | 索引值。 | -| [timeout](#timeout) | 超时时间。 | +| [requestType](#requesttype) | int
请求类型。  | +| [requestCmd](#requestcmd) | int
请求命令。  | +| [value](#value) | int
请求值。  | +| [index](#index) | int
索引值。  | +| [timeout](#timeout) | int
超时时间。  | -## **类成员变量说明** +## 类成员变量说明 ### index @@ -41,9 +37,7 @@ USB设备控制传输信息。 ``` int UsbCtrlTransfer::index ``` - -**描述:** - +**描述:** 索引值。 @@ -53,9 +47,7 @@ int UsbCtrlTransfer::index ``` int UsbCtrlTransfer::requestCmd ``` - -**描述:** - +**描述:** 请求命令。 @@ -65,9 +57,7 @@ int UsbCtrlTransfer::requestCmd ``` int UsbCtrlTransfer::requestType ``` - -**描述:** - +**描述:** 请求类型。 @@ -77,9 +67,7 @@ int UsbCtrlTransfer::requestType ``` int UsbCtrlTransfer::timeout ``` - -**描述:** - +**描述:** 超时时间。 @@ -89,7 +77,5 @@ int UsbCtrlTransfer::timeout ``` int UsbCtrlTransfer::value ``` - -**描述:** - +**描述:** 请求值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_usb_dev.md b/zh-cn/device-dev/reference/hdi-apis/_usb_dev.md index 996d138ed2b6d2d3f5614c3de4d88a52a89abb00..726c29820ea7aab51a61989ca094143704eb53bf 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_usb_dev.md +++ b/zh-cn/device-dev/reference/hdi-apis/_usb_dev.md @@ -1,35 +1,31 @@ # UsbDev -## **概述** +## 概述 USB设备地址信息。 **Since:** - 3.2 - **Version:** - 1.0 - **相关模块:** -[USB](usb.md) +[USB](_u_s_b.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [busNum](#busnum) | USB设备总线编号。 | -| [devAddr](#devaddr) | USB设备地址。 | +| [busNum](#busnum) | unsigned char
USB设备总线编号。  | +| [devAddr](#devaddr) | unsigned char
USB设备地址。  | -## **类成员变量说明** +## 类成员变量说明 ### busNum @@ -38,9 +34,7 @@ USB设备地址信息。 ``` unsigned char UsbDev::busNum ``` - -**描述:** - +**描述:** USB设备总线编号。 @@ -50,7 +44,5 @@ USB设备总线编号。 ``` unsigned char UsbDev::devAddr ``` - -**描述:** - +**描述:** USB设备地址。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_usb_pipe.md b/zh-cn/device-dev/reference/hdi-apis/_usb_pipe.md index 983703acd118e39830f6bea2ea9ebfc699aec1a1..dac59f8d24a5880f3602005306418a99a1610322 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_usb_pipe.md +++ b/zh-cn/device-dev/reference/hdi-apis/_usb_pipe.md @@ -1,35 +1,31 @@ # UsbPipe -## **概述** +## 概述 USB设备管道信息。 **Since:** - 3.2 - **Version:** - 1.0 - **相关模块:** -[USB](usb.md) +[USB](_u_s_b.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [intfId](#intfid) | USB设备接口ID。 | -| [endpointId](#endpointid) | USB设备端点ID。 | +| [intfId](#intfid) | unsigned char
USB设备接口ID。  | +| [endpointId](#endpointid) | unsigned char
USB设备端点ID。  | -## **类成员变量说明** +## 类成员变量说明 ### endpointId @@ -38,9 +34,7 @@ USB设备管道信息。 ``` unsigned char UsbPipe::endpointId ``` - -**描述:** - +**描述:** USB设备端点ID。 @@ -50,7 +44,5 @@ USB设备端点ID。 ``` unsigned char UsbPipe::intfId ``` - -**描述:** - +**描述:** USB设备接口ID。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_usb_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_usb_types_8idl.md index b5e18db841fdd6735867dcfc5c257030401df1f2..1f708087f2ef0fcd6156b233038260d48082d916 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_usb_types_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_usb_types_8idl.md @@ -1,7 +1,7 @@ # UsbTypes.idl -## **概述** +## 概述 USB驱动相关的数据类型。 @@ -15,21 +15,21 @@ USB驱动相关的数据类型。 **相关模块:** -[USB](usb.md) +[USB](_u_s_b.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [PortInfo](_port_info.md) | USB设备端口信息。 | -| [UsbDev](_usb_dev.md) | USB设备地址信息。 | -| [UsbPipe](_usb_pipe.md) | USB设备管道信息。 | -| [UsbCtrlTransfer](_usb_ctrl_transfer.md) | USB设备控制传输信息。 | -| [USBDeviceInfo](_u_s_b_device_info.md) | USB设备信息。 | +| [PortInfo](_port_info.md) | struct
USB设备端口信息。 | +| [UsbDev](_usb_dev.md) | struct
USB设备地址信息。 | +| [UsbPipe](_usb_pipe.md) | struct
USB设备管道信息。 | +| [UsbCtrlTransfer](_usb_ctrl_transfer.md) | struct
USB设备控制传输信息。 | +| [USBDeviceInfo](_u_s_b_device_info.md) | struct
USB设备信息。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_use_buffer_type.md b/zh-cn/device-dev/reference/hdi-apis/_use_buffer_type.md index 1ded6ee6683da725b0f7d5018e586857715a02c3..20f43ec1833f4ab809af6b2c9e2d1153b147537a 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_use_buffer_type.md +++ b/zh-cn/device-dev/reference/hdi-apis/_use_buffer_type.md @@ -1,29 +1,29 @@ # UseBufferType -## **概述** +## 概述 UseBuffer类型定义。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [size](#size) | 结构体大小。 | -| [version](#version) | 组件版本信息。 | -| [portIndex](#portindex) | 端口索引。 | -| [bufferType](#buffertype) | Buffer类型。 | +| [size](#size) | uint32_t
结构体大小。  | +| [version](#version) | union OMX_VERSIONTYPE
组件版本信息。  | +| [portIndex](#portindex) | uint32_t
端口索引。  | +| [bufferType](#buffertype) | uint32_t
Buffer类型。  | -## **类成员变量说明** +## 类成员变量说明 ### bufferType @@ -32,9 +32,7 @@ UseBuffer类型定义。 ``` uint32_t UseBufferType::bufferType ``` - -**描述:** - +**描述:** Buffer类型。 @@ -44,9 +42,7 @@ Buffer类型。 ``` uint32_t UseBufferType::portIndex ``` - -**描述:** - +**描述:** 端口索引。 @@ -56,9 +52,7 @@ uint32_t UseBufferType::portIndex ``` uint32_t UseBufferType::size ``` - -**描述:** - +**描述:** 结构体大小。 @@ -68,7 +62,5 @@ uint32_t UseBufferType::size ``` union OMX_VERSIONTYPE UseBufferType::version ``` - -**描述:** - +**描述:** 组件版本信息。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_user_auth_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_user_auth_types_8idl.md index 9100113265ad2a7134733b9f1b0c3c5d65f925d7..9a0a6759639ea826ea6ec689f6ec29eb18ba40ce 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_user_auth_types_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_user_auth_types_8idl.md @@ -1,46 +1,46 @@ # UserAuthTypes.idl -## **概述** +## 概述 定义用户认证驱动的枚举类和数据结构。 -**Since:** +**Since:** 3.2 -**所属模块:** +**相关模块:** [HdfUserAuth](_hdf_user_auth.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [ExecutorRegisterInfo](_executor_register_info.md) | 执行器注册信息。 | -| [ExecutorInfo](_user_executor_info.md) | 执行器信息。 | -| [ScheduleInfo](_schedule_info.md) | 调度信息。 | -| [AuthSolution](_auth_solution.md) | 认证方案。 | -| [ExecutorSendMsg](_executor_send_msg.md) | 执行器发送的消息。 | -| [AuthResultInfo](_auth_result_info.md) | 用户身份认证结果信息。 | -| [IdentifyResultInfo](_identify_result_info.md) | 用户身份识别结果信息。 | -| [EnrollParam](_enroll_param.md) | 注册认证凭据参数。 | -| [CredentialInfo](_credential_info.md) | 认证凭据信息。 | -| [EnrolledInfo](_enrolled_info.md) | 注册信息。 | -| [EnrollResultInfo](_enroll_resultinfo.md) | 录入结果信息。 | +| [ExecutorRegisterInfo](_executor_register_info.md) | struct
执行器注册信息。 | +| [ExecutorInfo](_executor_info_userauth.md) | struct
执行器信息。 | +| [ScheduleInfo](_schedule_info.md) | struct
调度信息。 | +| [AuthSolution](_auth_solution.md) | struct
认证方案。 | +| [ExecutorSendMsg](_executor_send_msg.md) | struct
执行器发送的消息。 | +| [AuthResultInfo](_auth_result_info.md) | struct
用户身份认证结果信息。 | +| [IdentifyResultInfo](_identify_result_info.md) | struct
用户身份识别结果信息。 | +| [EnrollParam](_enroll_param.md) | struct
注册认证凭据参数。 | +| [CredentialInfo](_credential_info.md) | struct
认证凭据信息。 | +| [EnrolledInfo](_enrolled_info.md) | struct
注册信息。 | +| [EnrollResultInfo](_enroll_result_info.md) | struct
录入结果信息。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [AuthType](_hdf_user_auth.md#authtype): int { PIN = 1, FACE = 2, FINGERPRINT = 4, ALL = 0 } | 枚举用户认证凭据类型。 | -| [ExecutorRole](_hdf_user_auth.md#executorrole): int { COLLECTOR = 1, VERIFIER = 2, ALL_IN_ONE = 3 } | 枚举执行器角色。 | -| [ExecutorSecureLevel](_hdf_user_auth.md#executorsecurelevel): int { ESL0 = 0, ESL1 = 1, ESL2 = 2, ESL3 = 3 } | 枚举执行器安全等级。 | +| [AuthType](_hdf_user_auth.md#authtype) : int {  ALL = 0, PIN = 1, FACE = 2, FINGERPRINT = 4 } | 枚举用户认证凭据类型。 | +| [ExecutorRole](_hdf_user_auth.md#executorrole) : int { COLLECTOR = 1, VERIFIER = 2, ALL_IN_ONE = 3 } | 枚举执行器角色。 | +| [ExecutorSecureLevel](_hdf_user_auth.md#executorsecurelevel) : int { ESL0 = 0, ESL1 = 1, ESL2 = 2, ESL3 = 3 } | 枚举执行器安全等级。 | | [PinSubType](_hdf_user_auth.md#pinsubtype) : int { PIN_SIX = 10000, PIN_NUMBER = 10001, PIN_MIX = 10002 } | 口令认证子类型。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_user_executor_info.md b/zh-cn/device-dev/reference/hdi-apis/_user_executor_info.md deleted file mode 100644 index f19e9e25e402e9ee90326ba0be87827ca0e795ea..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_user_executor_info.md +++ /dev/null @@ -1,56 +0,0 @@ -# ExecutorInfo - - -## **概述** - -执行器信息。 - -**Since:** - -3.2 - -**Version:** - -1.0 - -**所属模块:** - -[HdfUserAuth](_hdf_user_auth.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| [executorIndex](#executorindex) | 用户认证框架的执行器索引。 | -| [info](#info) | 执行器注册信息。 | - - -## **类成员变量说明** - - -### executorIndex - - -``` -unsigned long ExecutorInfo::executorIndex -``` - -**描述:** - -用户认证框架的执行器索引。 - - -### info - - -``` -struct ExecutorRegisterInfo ExecutorInfo::info -``` - -**描述:** - -执行器注册信息[ExecutorRegisterInfo](_executor_register_info.md)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_ussd_notice_info.md b/zh-cn/device-dev/reference/hdi-apis/_ussd_notice_info.md new file mode 100644 index 0000000000000000000000000000000000000000..e26fa12c92ee0351efd0409401ae9c713301c6bd --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_ussd_notice_info.md @@ -0,0 +1,56 @@ +# UssdNoticeInfo + + +## 概述 + +非结构化补充数据业务(USSD)业务信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [type](#type) | int
USSD类型 | +| [message](#message) | String
USSD字符串  | + + +## 类成员变量说明 + + +### message + + +``` +String UssdNoticeInfo::message +``` +**描述:** +USSD字符串 + + +### type + + +``` +int UssdNoticeInfo::type +``` +**描述:** +USSD类型 + +- 0:网络不需要客户端回复 + +- 1:网络需要客户端回复 + +- 2:USSD会话被网络释放 + +- 3:其他本地客户端已经作出响应 + +- 4:操作不支持 + +- 5:网络超时 diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_buffer.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_buffer.md index a97cf039e42f39b062e85430da1ad5b162af3c7d..a7580d33de149657cf7a2af5956ee62846f13c1c 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_buffer.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_buffer.md @@ -1,7 +1,7 @@ # VGUBuffer -## **概述** +## 概述 硬件加速渲染位图缓存。 @@ -10,16 +10,16 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [pixelFormat](_display.md#pixelformat) | 像素格式 | -| [width](_display.md#width-89) | 位图宽度 | -| [height](_display.md#height-88) | 位图高度 | -| [stride](_display.md#stride-22) | 位图stride | -| [virAddr](_display.md#viraddr-22) | 位图缓存的虚拟地址 | -| [phyAddr](_display.md#phyaddr-33) | 位图缓存的物理地址 | +| [pixelFormat](_display.md#pixelformat) | [VGUPixelFormat](_display.md#pixelformat)
像素格式 | +| [width](_display.md#width-89) | uint32_t
位图宽度 | +| [height](_display.md#height-88) | uint32_t
位图高度 | +| [stride](_display.md#stride-22) | uint32_t
位图stride | +| [virAddr](_display.md#viraddr-22) | void \*
位图缓存的虚拟地址 | +| [phyAddr](_display.md#phyaddr-33) | uint64_t
位图缓存的物理地址 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_color_stop.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_color_stop.md index 3662d99760a72075354044443a391cda7f5b7467..6a5fd0984ddfc231e4659aab4982d49779bd3b66 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_color_stop.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_color_stop.md @@ -1,7 +1,7 @@ # VGUColorStop -## **概述** +## 概述 渐变颜色分布位置。 @@ -10,12 +10,12 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [stop](_display.md#stop) | 颜色偏移位置, 值范围是 0.0 ~ 1.0 | -| [color](_display.md#color-45) | 偏移位置对应颜色 | +| [stop](_display.md#stop) | float
颜色偏移位置,值范围是 0.0 ~ 1.0 | +| [color](_display.md#color-45) | uint32_t
偏移位置对应颜色 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_conic.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_conic.md index 25f37b5675cc7b63da2b8157e7c4bd1184cd45c0..fc9b58f180a521262db12c4b9f0d3fd835efb9e5 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_conic.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_conic.md @@ -1,7 +1,7 @@ # VGUConic -## **概述** +## 概述 圆锥渐变。 @@ -10,12 +10,12 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [cx](_display.md#cx) | 圆弧中心x坐标 | -| [cy](_display.md#cy) | 圆弧中心y坐标 | +| [cx](_display.md#cx) | [VGUScalar](_display.md#vguscalar)
圆弧中心x坐标 | +| [cy](_display.md#cy) | [VGUScalar](_display.md#vguscalar)
圆弧中心y坐标 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_fill_attr.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_fill_attr.md index 04291c89067099b4f9efa3518f54ef7c7143ae4c..3ad973cad9e77a1f64163371d9da6413d4eec155 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_fill_attr.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_fill_attr.md @@ -1,7 +1,7 @@ # VGUFillAttr -## **概述** +## 概述 填充路径的属性。 @@ -10,11 +10,11 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [rule](_display.md#rule) | 填充规格 | +| [rule](_display.md#rule) | [VGUFillRule](_display.md#vgufillrule)
填充规格 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_funcs.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_funcs.md index c8bc61bb2de2a5599fb9a90aac52d1951253235b..c35df0dc4649e84689a7b97ac6c78366300e5289 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_funcs.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_funcs.md @@ -1,7 +1,7 @@ # VGUFuncs -## **概述** +## 概述 定义2D硬件加速驱动函数。 @@ -10,21 +10,21 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| ([VGUFuncs::InitVgu](_display.md#initvgu) )(void) | 初始化硬件加速。 | -| ([VGUFuncs::DeinitVgu](_display.md#deinitvgu) )(void) | 去初始化硬件加速。 | -| ([VGUFuncs::QueryCapability](_display.md#querycapability))(uint32_t cap) | 查询硬件能力集。 | -| ([VGUFuncs::RenderFill](_display.md#renderfill))(VGUSurface \*target, const VGUPath \*path, const VGUMatrix3 \*matrix, const VGUFillAttr \*attr, const VGUPaintStyle \*style) | 使用指定的渲染对象来填充路径。 | -| ([VGUFuncs::RenderStroke](_display.md#renderstroke) )(VGUSurface \*target, const VGUPath \*path, const VGUMatrix3 \*matrix, const VGUStrokeAttr \*attr, const VGUPaintStyle \*style) | 使用指定的渲染对象来描边路径。 | -| ([VGUFuncs::RenderBlur](_display.md#renderblur) )(VGUSurface \*target, uint16_t blur) | 对目标表面进行模糊处理。 | -| ([VGUFuncs::RenderBlit](_display.md#renderblit) )(VGUSurface \*target, const VGUImage \*src, uint32_t color) | 对图像进行搬移操作。 | -| ([VGUFuncs::RenderBlitN](_display.md#renderblitn) )(VGUSurface \*target, const VGUImage \*src, uint16_t count, uint32_t color) | 对多个源图像进行叠加操作。 | -| ([VGUFuncs::RenderClearRect](_display.md#renderclearrect) )(VGUSurface \*target, const VGURect \*rect, uint32_t color, uint8_t opacity) | 对指定矩形进行颜色清除操作。 | -| ([VGUFuncs::RenderCancel](_display.md#rendercancel) )() | 取消硬件加速渲染。 | -| ([VGUFuncs::RenderSync](_display.md#rendersync) )(int32_t timeOut) | 同步硬件加速模块绘制或搬移操作。 | +| (\* [InitVgu](_display.md#initvgu) )(void) | [VGUResult](_display.md#vguresult)
初始化硬件加速。 | +| (\* [DeinitVgu](_display.md#deinitvgu) )(void) | [VGUResult](_display.md#vguresult)
去初始化硬件加速。 | +| (\* [QueryCapability](_display.md#querycapability) )(uint32_t cap) | int32_t
查询硬件能力集。 | +| (\* [RenderFill](_display.md#renderfill) )([VGUSurface](_v_g_u_surface.md) \*target, const [VGUPath](_v_g_u_path.md) \*path, const [VGUMatrix3](_v_g_u_matrix3.md) \*matrix, const [VGUFillAttr](_v_g_u_fill_attr.md) \*attr, const [VGUPaintStyle](_v_g_u_paint_style.md) \*style) | [VGUResult](_display.md#vguresult)
使用指定的渲染对象来填充路径。 | +| (\* [RenderStroke](_display.md#renderstroke) )([VGUSurface](_v_g_u_surface.md) \*target, const [VGUPath](_v_g_u_path.md) \*path, const [VGUMatrix3](_v_g_u_matrix3.md) \*matrix, const [VGUStrokeAttr](_v_g_u_stroke_attr.md) \*attr, const [VGUPaintStyle](_v_g_u_paint_style.md) \*style) | [VGUResult](_display.md#vguresult)
使用指定的渲染对象来描边路径。 | +| (\* [RenderBlur](_display.md#renderblur) )([VGUSurface](_v_g_u_surface.md) \*target, uint16_t blur) | [VGUResult](_display.md#vguresult)
对目标表面进行模糊处理。 | +| (\* [RenderBlit](_display.md#renderblit) )([VGUSurface](_v_g_u_surface.md) \*target, const [VGUImage](_v_g_u_image.md) \*src, uint32_t color) | [VGUResult](_display.md#vguresult)
对图像进行搬移操作。 | +| (\* [RenderBlitN](_display.md#renderblitn) )([VGUSurface](_v_g_u_surface.md) \*target, const [VGUImage](_v_g_u_image.md) \*src, uint16_t count, uint32_t color) | [VGUResult](_display.md#vguresult)
对多个源图像进行叠加操作。 | +| (\* [RenderClearRect](_display.md#renderclearrect) )([VGUSurface](_v_g_u_surface.md) \*target, const [VGURect](_v_g_u_rect.md) \*rect, uint32_t color, uint8_t opacity) | [VGUResult](_display.md#vguresult)
对指定矩形进行颜色清除操作。 | +| (\* [RenderCancel](_display.md#rendercancel) )() | [VGUResult](_display.md#vguresult)
取消硬件加速渲染。 | +| (\* [RenderSync](_display.md#rendersync) )(int32_t timeOut) | [VGUResult](_display.md#vguresult)
同步硬件加速模块绘制或搬移操作。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_gradient.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_gradient.md index 644e6a342e722b09cd4cd33b780c82bd36d977c0..79e0745dabdf377328f092447a7b26215d90b29b 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_gradient.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_gradient.md @@ -1,7 +1,7 @@ # VGUGradient -## **概述** +## 概述 渐变对象。 @@ -10,19 +10,19 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [matrix](_display.md#matrix-22) | 针对渐变对象的变换矩阵 | -| [colorStops](_display.md#colorstops) | 渐变停止颜色数组指针 | -| [stopCount](_display.md#stopcount) | 渐变停止颜色个数 | -| [linear](_display.md#linear) | 线性渐变对象 | -| [radial](_display.md#radial) | 辐射渐变对象 | -| [conic](_display.md#conic) | 圆锥渐变对象 | -| [type](_display.md#type-67) | 渐变类型 | -| [spread](_display.md#spread) | 渐变延伸模式 | -| [opacity](_display.md#opacity-23) | 透明度,范围0~255。 | +| [matrix](_display.md#matrix-22) | [VGUMatrix3](_v_g_u_matrix3.md) \*
针对渐变对象的变换矩阵 | +| [colorStops](_display.md#colorstops) | [VGUColorStop](_v_g_u_color_stop.md) \*
渐变停止颜色数组指针 | +| [stopCount](_display.md#stopcount) | uint16_t
渐变停止颜色个数 | +| [linear](_display.md#linear) | [VGULinear](_v_g_u_linear.md)
线性渐变对象 | +| [radial](_display.md#radial) | [VGURadial](_v_g_u_radial.md)
辐射渐变对象 | +| [conic](_display.md#conic) | [VGUConic](_v_g_u_conic.md)
圆锥渐变对象 | +| [type](_display.md#type-67) | [VGUGradientType](_display.md#vgugradienttype)
渐变类型 | +| [spread](_display.md#spread) | [VGUFillSpread](_display.md#vgufillspread)
渐变延伸模式 | +| [opacity](_display.md#opacity-23) | uint8_t
透明度,范围0~255 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_image.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_image.md index d0de468a5b24d6256b121c39d8242766cb62dc93..66b65e6644abd07f31023c77aecaba68776d762e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_image.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_image.md @@ -1,7 +1,7 @@ # VGUImage -## **概述** +## 概述 图像对象。 @@ -10,14 +10,14 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [buffer](_display.md#buffer-33) | 图像存储缓存。 | -| [matrix](_display.md#matrix-12) | 图像矩阵变换,该参数为空,则内部使用单位变换矩阵。 | -| [rect](_display.md#rect-33) | 图像截取矩形,该参数为空,则截取整个图像。 | -| [opacity](_display.md#opacity-13) | 透明度,范围0~255。 | +| [buffer](_display.md#buffer-33) | [VGUBuffer](_v_g_u_buffer.md) \*
图像存储缓存 | +| [matrix](_display.md#matrix-12) | [VGUMatrix3](_v_g_u_matrix3.md) \*
图像矩阵变换,该参数为空,则内部使用单位变换矩阵 | +| [rect](_display.md#rect-33) | [VGURect](_v_g_u_rect.md) \*
图像截取矩形,该参数为空,则截取整个图像 | +| [opacity](_display.md#opacity-13) | uint8_t
透明度,范围0~255 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_linear.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_linear.md index e666fe236fbe80b1ce0bde1c42152afbb4efd17a..33d0d7ad9f1e76eba9a1d05e0518831ced96f03b 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_linear.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_linear.md @@ -1,7 +1,7 @@ # VGULinear -## **概述** +## 概述 线性渐变。 @@ -10,14 +10,14 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [x1](_display.md#x1-23) | 线性渐变起点水平坐标 | -| [y1](_display.md#y1-23) | 线性渐变起点垂直坐标 | -| [x2](_display.md#x2) | 线性渐变终点水平坐标 | -| [y2](_display.md#y2) | 线性渐变终点垂直坐标 | +| [x1](_display.md#x1-23) | [VGUScalar](_display.md#vguscalar)
线性渐变起点水平坐标 | +| [y1](_display.md#y1-23) | [VGUScalar](_display.md#vguscalar)
线性渐变起点垂直坐标 | +| [x2](_display.md#x2) | [VGUScalar](_display.md#vguscalar)
线性渐变终点水平坐标 | +| [y2](_display.md#y2) | [VGUScalar](_display.md#vguscalar)
线性渐变终点垂直坐标 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_mask_layer.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_mask_layer.md index 4dab4c31fb6de03edcc6dfdbf3ce040d2177e26a..3e6c4b8ebf8ec82cc01d776546e24d45466ffd70 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_mask_layer.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_mask_layer.md @@ -1,7 +1,7 @@ # VGUMaskLayer -## **概述** +## 概述 定义蒙版图层。 @@ -10,12 +10,12 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [buffer](_display.md#buffer-13) | 蒙版缓存 | -| [rect](_display.md#rect-23) | 蒙版矩形 | +| [buffer](_display.md#buffer-13) | [VGUBuffer](_v_g_u_buffer.md) \*
蒙版缓存 | +| [rect](_display.md#rect-23) | [VGURect](_v_g_u_rect.md) \*
蒙版矩形 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_matrix3.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_matrix3.md index 96ae437c094298bcfb1bd9e7fc98d528f7e2fd59..e2794f30eaa0a25d23bdeec6e13c69b3e5b47d60 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_matrix3.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_matrix3.md @@ -1,21 +1,21 @@ # VGUMatrix3 -## **概述** +## 概述 -定义变换矩阵。 +变换矩阵。 **相关模块:** [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [m](_display.md#m) [3][3] | 3x3变换矩阵 | -| [type](_display.md#type-57) | 矩阵变换类型,简单变换为缩放,平移,90度倍数旋转 | +| [m](_display.md#m) [3][3] | float
3x3变换矩阵 | +| [type](_display.md#type-57) | uint32_t
矩阵变换类型,简单变换为缩放,平移,90度倍数旋转 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_paint_style.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_paint_style.md index 96b7fcc92129c17a1d6cd7f6059affdf0280c295..6484569dfc94741d2871242fbee40c6ee5febc74 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_paint_style.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_paint_style.md @@ -1,7 +1,7 @@ # VGUPaintStyle -## **概述** +## 概述 填充或描边路径的渲染风格。 @@ -10,14 +10,14 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [gradient](_display.md#gradient) | 渐变对象 | -| [pattern](_display.md#pattern) | 图片模式对象 | -| [solid](_display.md#solid) | 颜色对象 | -| [type](_display.md#type-77) | 渲染类型 | +| [gradient](_display.md#gradient) | [VGUGradient](_v_g_u_gradient.md) \*
渐变对象 | +| [pattern](_display.md#pattern) | [VGUPattern](_v_g_u_pattern.md) \*
图片模式对象 | +| [solid](_display.md#solid) | [VGUSolid](_v_g_u_solid.md) \*
颜色对象 | +| [type](_display.md#type-77) | [VGUPaintType](_display.md#vgupainttype)
渲染类型 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_path.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_path.md index 6aaf6ea7f61305fa825e664d2a33f0d9f3cd43c4..8a69729d8156f6ee360378f14830e2e96260b4e3 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_path.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_path.md @@ -1,7 +1,7 @@ # VGUPath -## **概述** +## 概述 路径对象,存放路径命令和坐标数据。 @@ -10,16 +10,16 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [segment](_display.md#segment) | 存放路径命令数据 | -| [numSegments](_display.md#numsegments) | 路径命令总数 | -| [data](_display.md#data-22) | 存放路径命令对应坐标数据 | -| [type](_display.md#type-47) | 路径数据存储类型 | -| [enAlias](_display.md#enalias) | 抗锯齿开关 | -| [boundBox](_display.md#boundbox) | 路径最大边界 | +| [segment](_display.md#segment) | uint8_t \*
存放路径命令数据 | +| [numSegments](_display.md#numsegments) | int32_t
路径命令总数 | +| [data](_display.md#data-22) | uint8_t \*
存放路径命令对应坐标数据 | +| [type](_display.md#type-47) | [VGUPathDataType](_display.md#vgupathdatatype)
路径数据存储类型 | +| [enAlias](_display.md#enalias) | bool
抗锯齿开关 | +| [boundBox](_display.md#boundbox) | [VGURect](_v_g_u_rect.md)
路径最大边界 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_pattern.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_pattern.md index 0a703728ea6b9fd15e3c8a4b57b6355177dc6491..c56701205d6aa9f6dac3fdc2bc43ab49657aaf88 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_pattern.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_pattern.md @@ -1,7 +1,7 @@ # VGUPattern -## **概述** +## 概述 图片模式对象。 @@ -10,13 +10,13 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [image](_display.md#image) | 图像对象 | -| [wrapx](_display.md#wrapx) | 图像水平方向平铺类型 | -| [wrapy](_display.md#wrapy) | 图像垂直方向平铺类型 | +| [image](_display.md#image) | [VGUImage](_v_g_u_image.md) \*
图像对象 | +| [wrapx](_display.md#wrapx) | [VGUWrapType](_display.md#vguwraptype)
图像水平方向平铺类型 | +| [wrapy](_display.md#wrapy) | [VGUWrapType](_display.md#vguwraptype)
图像垂直方向平铺类型 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_point.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_point.md index 1d7c6a08a3f967bf5ed110d8e7f84762984ecde4..bf2a27cd742a019241f99a49713de86c6079ee04 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_point.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_point.md @@ -1,7 +1,7 @@ # VGUPoint -## **概述** +## 概述 坐标点对象。 @@ -10,12 +10,12 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [x](_display.md#x-34) | 点水平坐标 | -| [y](_display.md#y-34) | 点垂直坐标 | +| [x](_display.md#x-34) | [VGUScalar](_display.md#vguscalar)
点水平坐标 | +| [y](_display.md#y-34) | [VGUScalar](_display.md#vguscalar)
点垂直坐标 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_radial.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_radial.md index f31d962ebf8de392564085f8651a8b3fdd126fa3..5f6efd05b85bf77a83ed63bcffb769600b382648 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_radial.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_radial.md @@ -1,7 +1,7 @@ # VGURadial -## **概述** +## 概述 辐射渐变。 @@ -10,16 +10,16 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [x0](_display.md#x0-22) | 内圈圆心水平坐标 | -| [y0](_display.md#y0-22) | 内圈圆心垂直坐标 | -| [r0](_display.md#r0) | 内圈圆半径 | -| [x1](_display.md#x1-33) | 外圈圆心水平坐标 | -| [y1](_display.md#y1-33) | 外圈圆心垂直坐标 | -| [r1](_display.md#r1) | 外圈圆半径 | +| [x0](_display.md#x0-22) | [VGUScalar](_display.md#vguscalar)
内圈圆心水平坐标 | +| [y0](_display.md#y0-22) | [VGUScalar](_display.md#vguscalar)
内圈圆心垂直坐标 | +| [r0](_display.md#r0) | [VGUScalar](_display.md#vguscalar)
内圈圆半径 | +| [x1](_display.md#x1-33) | [VGUScalar](_display.md#vguscalar)
外圈圆心水平坐标 | +| [y1](_display.md#y1-33) | [VGUScalar](_display.md#vguscalar)
外圈圆心垂直坐标 | +| [r1](_display.md#r1) | [VGUScalar](_display.md#vguscalar)
外圈圆半径 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_rect.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_rect.md index 161290841e1bd96ba476ae2e5b14001543bfaa70..622ff424d017a2430b8b876626eadf97f144b20d 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_rect.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_rect.md @@ -1,7 +1,7 @@ # VGURect -## **概述** +## 概述 矩形对象。 @@ -10,14 +10,14 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [x](_display.md#x-44) | 矩形水平起始坐标 | -| [y](_display.md#y-44) | 矩形垂直起始坐标 | -| [w](_display.md#w-22) | 矩形宽度 | -| [h](_display.md#h-22) | 矩形高度 | +| [x](_display.md#x-44) | [VGUScalar](_display.md#vguscalar)
矩形水平起始坐标 | +| [y](_display.md#y-44) | [VGUScalar](_display.md#vguscalar)
矩形垂直起始坐标 | +| [w](_display.md#w-22) | [VGUScalar](_display.md#vguscalar)
矩形宽度 | +| [h](_display.md#h-22) | [VGUScalar](_display.md#vguscalar)
矩形高度 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_solid.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_solid.md index 676479dc7b2dce3b259fba117e30f8a5a29befae..2d1b530821b1487db7fa062270fefe1d80db0d18 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_solid.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_solid.md @@ -1,7 +1,7 @@ # VGUSolid -## **概述** +## 概述 颜色对象 @@ -10,12 +10,12 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [color](_display.md#color-55) | 颜色值 | -| [opacity](_display.md#opacity-33) | 透明度.,取值范围 0 ~ 255。 | +| [color](_display.md#color-55) | uint32_t
颜色值 | +| [opacity](_display.md#opacity-33) | uint8_t
透明度,值范围 0 ~ 255 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_stroke_attr.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_stroke_attr.md index 50e0672bf8078048db4c8698d1fe41162754668f..9f7e5385bd1258c44a1ac2d12f1e37ef4e29450d 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_stroke_attr.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_stroke_attr.md @@ -1,7 +1,7 @@ # VGUStrokeAttr -## **概述** +## 概述 描边路径的属性。 @@ -10,14 +10,14 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [cap](_display.md#cap) | 线帽类型 | -| [join](_display.md#join) | 联结类型 | -| [miterLimit](_display.md#miterlimit) | 最大斜切长度 | -| [width](_display.md#width-99) | 线宽 | +| [cap](_display.md#cap) | [VGULineCap](_display.md#vgulinecap)
线帽类型 | +| [join](_display.md#join) | [VGUJointType](_display.md#vgujointtype)
联结类型 | +| [miterLimit](_display.md#miterlimit) | float
最大斜切长度 | +| [width](_display.md#width-99) | float
线宽 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_surface.md b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_surface.md index bfd04bcea0e682456704e2e100a679be38279eb6..10e061873bb5c93bd48b8f382f34f9d843bdf359 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_v_g_u_surface.md +++ b/zh-cn/device-dev/reference/hdi-apis/_v_g_u_surface.md @@ -1,7 +1,7 @@ # VGUSurface -## **概述** +## 概述 2D硬件加速绘制目标表面。 @@ -10,17 +10,17 @@ [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [buffer](_display.md#buffer-23) | 位图缓存 | -| [clipRect](_display.md#cliprect) | 矩形剪切域,如果为空,整个表面直接渲染。 | -| [clipPath](_display.md#clippath) | 路径剪切域,如果为空,整个表面直接渲染。 | -| [clipType](_display.md#cliptype) | 表面剪切类型 | -| [mask](_display.md#mask) | 蒙版图层, 可以为空。 | -| [blend](_display.md#blend) | 混合叠加模式 | -| [filter](_display.md#filter) | 图像滤波类型 | +| [buffer](_display.md#buffer-23) | [VGUBuffer](_v_g_u_buffer.md) \*
位图缓存 | +| [clipRect](_display.md#cliprect) | [VGURect](_v_g_u_rect.md) \*
矩形剪切域,如果为空,整个表面直接渲染。 | +| [clipPath](_display.md#clippath) | [VGUPath](_v_g_u_path.md) \*
路径剪切域,如果为空,整个表面直接渲染。 | +| [clipType](_display.md#cliptype) | [VGUClipType](_display.md#vgucliptype)
表面剪切类型 | +| [mask](_display.md#mask) | [VGUMaskLayer](_v_g_u_mask_layer.md) \*
蒙版图层,可以为空 | +| [blend](_display.md#blend) | [VGUBlendType](_display.md#blendtype)
混合叠加模式 | +| [filter](_display.md#filter) | [VGUFilter](_display.md#vgufilter)
图像滤波类型 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_verify_alloc_info.md b/zh-cn/device-dev/reference/hdi-apis/_verify_alloc_info.md index afafaf1ca376e5543550c8f8fda49dbfa920bd87..ec88d736e0748ae7e8e5134a1e700688cd4a450c 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_verify_alloc_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_verify_alloc_info.md @@ -1,23 +1,23 @@ # VerifyAllocInfo -## **概述** +## 概述 -用于验证内存分配信息的结构体定义。 +用于验证内存分配信息的结构体定义 **相关模块:** [Display](_display.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [width](_display.md#width-79) | 分配内存的宽度 | -| [height](_display.md#height-78) | 分配内存的高度 | -| [usage](_display.md#usage-22) | 内存的用处 | -| [format](_display.md#format-22) | 分配内存的像素格式 | +| [width](_display.md#width-79) | uint32_t
分配内存的宽度 | +| [height](_display.md#height-78) | uint32_t
分配内存的高度 | +| [usage](_display.md#usage-22) | uint64_t
内存的用处 | +| [format](_display.md#format-22) | [PixelFormat](_display.md#pixelformat)
分配内存的像素格式 | diff --git a/zh-cn/device-dev/reference/hdi-apis/vibrator.md b/zh-cn/device-dev/reference/hdi-apis/_vibrator.md similarity index 83% rename from zh-cn/device-dev/reference/hdi-apis/vibrator.md rename to zh-cn/device-dev/reference/hdi-apis/_vibrator.md index 2d6e1c4eb804fe204f991cb2644e6ef13612028c..e8b27e100cb9e68f2b4041f418edf48e42001cff 100644 --- a/zh-cn/device-dev/reference/hdi-apis/vibrator.md +++ b/zh-cn/device-dev/reference/hdi-apis/_vibrator.md @@ -1,22 +1,22 @@ # Vibrator -## **概述** +## 概述 马达驱动对马达服务提供通用的接口能力。 模块提供马达服务对马达驱动访问的统一接口,服务获取驱动对象或者代理后,控制马达的单次振动、周期性振动、停止振动、设置马达振幅与频率。 -**Since**: +**Since:** 3.2 -**Version**: +**Version:** 1.1 -## **汇总** +## 汇总 ### 文件 @@ -31,8 +31,8 @@ | 名称 | 描述 | | -------- | -------- | -| [IVibratorInterface](interface_i_vibrator_interface.md) | Vibrator模块向上层服务提供统一的接口。 | -| [HdfVibratorInfo](_hdf_vibrator_info.md) | 定义马达参数。 | +| [IVibratorInterface](interface_i_vibrator_interface.md) | interface
Vibrator模块向上层服务提供统一的接口。 | +| [HdfVibratorInfo](_hdf_vibrator_info.md) | struct
定义马达参数。 | ### 枚举 @@ -49,7 +49,7 @@ | package ohos.hdi.vibrator.v1_1 | 马达模块接口的包路径。 | -## **枚举类型说明** +## 枚举类型说明 ### HdfVibratorMode diff --git a/zh-cn/device-dev/reference/hdi-apis/_vibrator_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_vibrator_types_8idl.md index fcb8a8a80b0538a70f9221b15f7ad8ed36df28ed..968573eddbb293a26af71c10239a4528a596b31e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_vibrator_types_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_vibrator_types_8idl.md @@ -1,7 +1,7 @@ # VibratorTypes.idl -## **概述** +## 概述 定义马达数据结构,包括马达振动模式和马达参数。 @@ -15,24 +15,24 @@ **相关模块:** -[Vibrator](vibrator.md) +[Vibrator](_vibrator.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [HdfVibratorInfo](_hdf_vibrator_info.md) | 定义马达参数。 | +| [HdfVibratorInfo](_hdf_vibrator_info.md) | struct
定义马达参数。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [HdfVibratorMode](vibrator.md#hdfvibratormode) { HDF_VIBRATOR_MODE_ONCE, HDF_VIBRATOR_MODE_PRESET, HDF_VIBRATOR_MODE_BUTT } | 枚举马达的振动模式。 | +| [HdfVibratorMode](_vibrator.md#hdfvibratormode) { HDF_VIBRATOR_MODE_ONCE, HDF_VIBRATOR_MODE_PRESET, HDF_VIBRATOR_MODE_BUTT } | 枚举马达的振动模式。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_video_port_cap.md b/zh-cn/device-dev/reference/hdi-apis/_video_port_cap.md index e97bf3ac18a1d93424dc80ab64fb7d13d9bc671b..f89ab6330596dde6f648d7296f40e65f43d1a09b 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_video_port_cap.md +++ b/zh-cn/device-dev/reference/hdi-apis/_video_port_cap.md @@ -1,32 +1,32 @@ # VideoPortCap -## **概述** +## 概述 定义视频编解码能力。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [minSize](#minsize) | 支持的最小分辨率 | -| [maxSize](#maxsize) | 支持的最大分辨率 | -| [whAlignment](#whalignment) | 宽高对齐值 | -| [blockCount](#blockcount) | 支持的块数量范围 | -| [blocksPerSecond](#blockspersecond) | 每秒可处理的块数量范围 | -| [blockSize](#blocksize) | 支持的块大小 | -| [supportPixFmts](#supportpixfmts) [[PIX_FORMAT_NUM](codec.md#gadb8c6478388b68c09835ebe093a8920a)] | 支持的像素格式 | +| [minSize](#minsize) | [Rect](_rect.md)
支持的最小分辨率。 | +| [maxSize](#maxsize) | [Rect](_rect.md)
支持的最大分辨率。 | +| [whAlignment](#whalignment) | [Alignment](_alignment.md)
宽高对齐值。 | +| [blockCount](#blockcount) | [RangeValue](_range_value.md)
支持的块数量范围。 | +| [blocksPerSecond](#blockspersecond) | [RangeValue](_range_value.md)
每秒可处理的块数量范围。 | +| [blockSize](#blocksize) | [Rect](_rect.md)
支持的块大小。 | +| [supportPixFmts](#supportpixfmts) [[PIX_FORMAT_NUM](_codec.md#pix_format_num)] | int32_t
支持的像素格式,详见OMX_COLOR_FORMATTYPE。 | -## **类成员变量说明** +## 类成员变量说明 ### blockCount @@ -36,7 +36,7 @@ RangeValue VideoPortCap::blockCount ``` -**描述:** +**描述:** 支持的块数量范围。 @@ -48,7 +48,7 @@ RangeValue VideoPortCap::blockCount Rect VideoPortCap::blockSize ``` -**描述:** +**描述:** 支持的块大小。 @@ -60,7 +60,7 @@ Rect VideoPortCap::blockSize RangeValue VideoPortCap::blocksPerSecond ``` -**描述:** +**描述:** 每秒可处理的块数量范围。 @@ -72,7 +72,7 @@ RangeValue VideoPortCap::blocksPerSecond Rect VideoPortCap::maxSize ``` -**描述:** +**描述:** 支持的最大分辨率。 @@ -84,7 +84,7 @@ Rect VideoPortCap::maxSize Rect VideoPortCap::minSize ``` -**描述:** +**描述:** 支持的最小分辨率。 @@ -96,9 +96,9 @@ Rect VideoPortCap::minSize int32_t VideoPortCap::supportPixFmts[PIX_FORMAT_NUM] ``` -**描述:** +**描述:** -支持的像素格式,详见**OMX_COLOR_FORMATTYPE**。 +支持的像素格式,详见OMX_COLOR_FORMATTYPE。 ### whAlignment @@ -108,6 +108,6 @@ int32_t VideoPortCap::supportPixFmts[PIX_FORMAT_NUM] Alignment VideoPortCap::whAlignment ``` -**描述:** +**描述:** 宽高对齐值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_voice_radio_technology.md b/zh-cn/device-dev/reference/hdi-apis/_voice_radio_technology.md new file mode 100644 index 0000000000000000000000000000000000000000..bed2ccda864369a3abb93292239aef71f78b1bef --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_voice_radio_technology.md @@ -0,0 +1,132 @@ +# VoiceRadioTechnology + + +## 概述 + +电路域接入技术。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [srvStatus](#srvstatus) | enum [RilSrvStatus](_ril.md#rilsrvstatus)
系统服务状态  | +| [srvDomain](#srvdomain) | enum [RilSrvDomain](_ril.md#rilsrvdomain)
系统服务域  | +| [roamStatus](#roamstatus) | enum [RilRoamStatus](_ril.md#rilroamstatus)
漫游状态  | +| [simStatus](#simstatus) | enum [RilSimStatus](_ril.md#rilsimstatus)
SIM卡状态  | +| [lockStatus](#lockstatus) | enum [RilSimLockStatus](_ril.md#rilsimlockstatus)
SIM卡的LOCK状态  | +| [sysMode](#sysmode) | enum [RilSysMode](_ril.md#rilsysmode)
系统制式  | +| [sysModeName](#sysmodename) | String
系统制式对应字符串  | +| [actType](#acttype) | enum [RilRadioTech](_ril.md#rilradiotech)
语音接入技术类型,具体查看[RilRadioTech](_ril.md#rilradiotech) | +| [actName](#actname) | String
语音接入技术类型对应字符串  | +| [flag](#flag) | int
接入技术标识  | + + +## 类成员变量说明 + + +### actName + + +``` +String VoiceRadioTechnology::actName +``` +**描述:** +语音接入技术类型对应字符串 + + +### actType + + +``` +enum RilRadioTech VoiceRadioTechnology::actType +``` +**描述:** +语音接入技术类型,具体查看[RilRadioTech](_ril.md#rilradiotech) + + +### flag + + +``` +int VoiceRadioTechnology::flag +``` +**描述:** +接入技术标识 + + +### lockStatus + + +``` +enum RilSimLockStatus VoiceRadioTechnology::lockStatus +``` +**描述:** +SIM卡的LOCK状态 + + +### roamStatus + + +``` +enum RilRoamStatus VoiceRadioTechnology::roamStatus +``` +**描述:** +漫游状态 + + +### simStatus + + +``` +enum RilSimStatus VoiceRadioTechnology::simStatus +``` +**描述:** +SIM卡状态 + + +### srvDomain + + +``` +enum RilSrvDomain VoiceRadioTechnology::srvDomain +``` +**描述:** +系统服务域 + + +### srvStatus + + +``` +enum RilSrvStatus VoiceRadioTechnology::srvStatus +``` +**描述:** +系统服务状态 + + +### sysMode + + +``` +enum RilSysMode VoiceRadioTechnology::sysMode +``` +**描述:** +系统制式 + + +### sysModeName + + +``` +String VoiceRadioTechnology::sysModeName +``` +**描述:** +系统制式对应字符串 diff --git a/zh-cn/device-dev/reference/hdi-apis/_w_l_a_n.md b/zh-cn/device-dev/reference/hdi-apis/_w_l_a_n.md new file mode 100644 index 0000000000000000000000000000000000000000..ee3feb8a5b3368a38b164d5b39291c07628b59df --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_w_l_a_n.md @@ -0,0 +1,55 @@ +# WLAN + + +## 概述 + +WLAN模块向上层WLAN服务提供了统一接口。 + +上层WLAN服务开发人员可根据WLAN模块提供的向上统一接口获取如下能力:建立/关闭WLAN热点,扫描/关联WLAN热点,WLAN平台芯片管理,网络数据缓冲的申请、释放、移动等操作,网络设备管理,电源管理等。 + +**Since:** + +3.2 + +**Version:** + +1.0 + + +## 汇总 + + +### 文件 + + | 名称 | 描述 | +| -------- | -------- | +| [IWlanCallback.idl](_i_wlan_callback_8idl.md) | WLAN模块为WLAN服务提供的重启驱动、扫描结果、Netlink消息处理的回调。 | +| [IWlanInterface.idl](_i_wlan_interface_8idl.md) | 建立/关闭WLAN热点,扫描/关联/去关联WLAN热点,设置国家码,管理网络设备等操作的接口。 | +| [WlanTypes.idl](_wlan_types_8idl.md) | WLAN模块相关的数据类型。 | + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [IWlanCallback](interface_i_wlan_callback.md) | interface
定义WLAN模块的回调函数。 | +| [IWlanInterface](interface_i_wlan_interface.md) | interface
WLAN模块向上层WLAN服务提供了统一接口。 | +| [HdfFeatureInfo](_hdf_feature_info.md) | struct
feature对象信息。 | +| [HdfStaInfo](_hdf_sta_info.md) | struct
STA的信息。 | +| [HdfWifiDriverScanSsid](_hdf_wifi_driver_scan_ssid.md) | struct
WiFi扫描参数SSID信息。 | +| [HdfWifiScan](_hdf_wifi_scan.md) | struct
WiFi扫描参数。 | +| [HdfNetDeviceInfo](_hdf_net_device_info.md) | struct
网络设备信息。 | +| [HdfNetDeviceInfoResult](_hdf_net_device_info_result.md) | struct
网络设备信息集合。 | +| [HdfWifiScanResult](_hdf_wifi_scan_result.md) | struct
WiFi扫描结果。 | +| [HdfWifiInfo](_hdf_wifi_info.md) | struct
WiFi频段信息。 | +| [MeasChannelParam](_meas_channel_param.md) | struct
信道测量参数。 | +| [MeasChannelResult](_meas_channel_result.md) | struct
信道测量结果。 | +| [ProjectionScreenCmdParam](_projection_screen_cmd_param.md) | struct
投屏参数。 | +| [WifiStationInfo](_wifi_station_info.md) | struct
STA的信息。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.wlan.v1_0 | WLAN模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_w_r_g_b_color.md b/zh-cn/device-dev/reference/hdi-apis/_w_r_g_b_color.md index a083af89d8eaca3564777e6d1274f1e21076157f..2ae663415cd765778f01067bdfa54d94d00fec28 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_w_r_g_b_color.md +++ b/zh-cn/device-dev/reference/hdi-apis/_w_r_g_b_color.md @@ -1,37 +1,33 @@ # WRGBColor -## **概述** +## 概述 定义灯的WRGB模式。 **Since:** - 3.2 - **Version:** - 1.0 - **相关模块:** -[Light](light.md) +[Light](_light.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [w](#w) | 白色值,范围为0-255。 | -| [r](#r) | 红色值,范围为0-255。 | -| [g](#g) | 绿色值,范围为0-255。 | -| [b](#b) | 蓝色值,范围为0-255。 | +| [w](#w) | int
白色值,范围为0-255。  | +| [r](#r) | int
红色值,范围为0-255。  | +| [g](#g) | int
绿色值,范围为0-255。  | +| [b](#b) | int
蓝色值,范围为0-255。  | -## **类成员变量说明** +## 类成员变量说明 ### b @@ -40,9 +36,7 @@ ``` int WRGBColor::b ``` - -**描述:** - +**描述:** 蓝色值,范围为0-255。 @@ -52,9 +46,7 @@ int WRGBColor::b ``` int WRGBColor::g ``` - -**描述:** - +**描述:** 绿色值,范围为0-255。 @@ -64,9 +56,7 @@ int WRGBColor::g ``` int WRGBColor::r ``` - -**描述:** - +**描述:** 红色值,范围为0-255。 @@ -76,7 +66,5 @@ int WRGBColor::r ``` int WRGBColor::w ``` - -**描述:** - +**描述:** 白色值,范围为0-255。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_wcdma_rssi.md b/zh-cn/device-dev/reference/hdi-apis/_wcdma_rssi.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de0ff3b3fec343904c6beb9f2b02907eab552 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_wcdma_rssi.md @@ -0,0 +1,66 @@ +# WcdmaRssi + + +## 概述 + +WCDMA信号强度。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [rxlev](#rxlev) | int
信号接收强度,取值范围0~99  | +| [ecio](#ecio) | int
每个PN码片的接收能量与总接收功率谱密度之比  | +| [rscp](#rscp) | int
接收信号码功率,取值范围0~96  | +| [ber](#ber) | int
误码率,取值范围0~7  | + + +## 类成员变量说明 + + +### ber + + +``` +int WcdmaRssi::ber +``` +**描述:** +误码率,取值范围0~7 + + +### ecio + + +``` +int WcdmaRssi::ecio +``` +**描述:** +每个PN码片的接收能量与总接收功率谱密度之比 + + +### rscp + + +``` +int WcdmaRssi::rscp +``` +**描述:** +接收信号码功率,取值范围0~96 + + +### rxlev + + +``` +int WcdmaRssi::rxlev +``` +**描述:** +信号接收强度,取值范围0~99 diff --git a/zh-cn/device-dev/reference/hdi-apis/_wifi_station_info.md b/zh-cn/device-dev/reference/hdi-apis/_wifi_station_info.md index 3ae0f0f9ae61ea3f63febc2fadae143602c7b36e..7728fa06146f0e07c5d6c525a6c09129d2b4f805 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_wifi_station_info.md +++ b/zh-cn/device-dev/reference/hdi-apis/_wifi_station_info.md @@ -1,42 +1,38 @@ # WifiStationInfo -## **概述** +## 概述 STA的信息。 **Since:** - 3.2 - **Version:** - 1.0 - **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [rxRate](#rxrate) | 接收速率。 | -| [txRate](#txrate) | 发送速率。 | -| [flags](#flags) | 速率传输类型。 | -| [rxVhtmcs](#rxvhtmcs) | 接收VHT-MCS(Very High Throughput Modulation and Coding Scheme)配置。 | -| [txVhtmcs](#txvhtmcs) | 发送VHT-MCS(Very High Throughput Modulation and Coding Scheme)配置。 | -| [rxMcs](#rxmcs) | 接收MCS(Modulation and Coding Scheme)索引。 | -| [txMcs](#txmcs) | 发送MCS(Modulation and Coding Scheme)索引。 | -| [rxVhtNss](#rxvhtnss) | 接收VHT-NSS(Very High Throughput Number of Spatial Streams)配置。 | -| [txVhtNss](#txvhtnss) | 发送VHT-NSS(Very High Throughput Number of Spatial Streams)配置。 | +| [rxRate](#rxrate) | unsigned int
接收速率。  | +| [txRate](#txrate) | unsigned int
发送速率。  | +| [flags](#flags) | unsigned int
速率传输类型。  | +| [rxVhtmcs](#rxvhtmcs) | unsigned char
接收VHT-MCS(Very High Throughput Modulation and Coding Scheme)配置。  | +| [txVhtmcs](#txvhtmcs) | unsigned char
发送VHT-MCS(Very High Throughput Modulation and Coding Scheme)配置。  | +| [rxMcs](#rxmcs) | unsigned char
接收MCS(Modulation and Coding Scheme)索引。  | +| [txMcs](#txmcs) | unsigned char
发送MCS(Modulation and Coding Scheme)索引。  | +| [rxVhtNss](#rxvhtnss) | unsigned char
接收VHT-NSS(Very High Throughput Number of Spatial Streams)配置。  | +| [txVhtNss](#txvhtnss) | unsigned char
发送VHT-NSS(Very High Throughput Number of Spatial Streams)配置。  | -## **类成员变量说明** +## 类成员变量说明 ### flags @@ -45,9 +41,7 @@ STA的信息。 ``` unsigned int WifiStationInfo::flags ``` - -**描述:** - +**描述:** 速率传输类型。 @@ -57,9 +51,7 @@ unsigned int WifiStationInfo::flags ``` unsigned char WifiStationInfo::rxMcs ``` - -**描述:** - +**描述:** 接收MCS(Modulation and Coding Scheme)索引。 @@ -69,9 +61,7 @@ unsigned char WifiStationInfo::rxMcs ``` unsigned int WifiStationInfo::rxRate ``` - -**描述:** - +**描述:** 接收速率。 @@ -81,9 +71,7 @@ unsigned int WifiStationInfo::rxRate ``` unsigned char WifiStationInfo::rxVhtmcs ``` - -**描述:** - +**描述:** 接收VHT-MCS(Very High Throughput Modulation and Coding Scheme)配置。 @@ -93,9 +81,7 @@ unsigned char WifiStationInfo::rxVhtmcs ``` unsigned char WifiStationInfo::rxVhtNss ``` - -**描述:** - +**描述:** 接收VHT-NSS(Very High Throughput Number of Spatial Streams)配置。 @@ -105,9 +91,7 @@ unsigned char WifiStationInfo::rxVhtNss ``` unsigned char WifiStationInfo::txMcs ``` - -**描述:** - +**描述:** 发送MCS(Modulation and Coding Scheme)索引。 @@ -117,9 +101,7 @@ unsigned char WifiStationInfo::txMcs ``` unsigned int WifiStationInfo::txRate ``` - -**描述:** - +**描述:** 发送速率。 @@ -129,9 +111,7 @@ unsigned int WifiStationInfo::txRate ``` unsigned char WifiStationInfo::txVhtmcs ``` - -**描述:** - +**描述:** 发送VHT-MCS(Very High Throughput Modulation and Coding Scheme)配置。 @@ -141,7 +121,5 @@ unsigned char WifiStationInfo::txVhtmcs ``` unsigned char WifiStationInfo::txVhtNss ``` - -**描述:** - +**描述:** 发送VHT-NSS(Very High Throughput Number of Spatial Streams)配置。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_wififence_request.md b/zh-cn/device-dev/reference/hdi-apis/_wififence_request.md new file mode 100644 index 0000000000000000000000000000000000000000..4475a26ad2766b0d3ce4fc27ba32c5c57cbb3ad0 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_wififence_request.md @@ -0,0 +1,65 @@ +# WififenceRequest + + +## 概述 + +定义添加Wi-Fi围栏的数据结构。 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceWififence](_hdi_lpfence_wififence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [wififenceId](#wififenceid) | int
Wi-Fi围栏的ID号,用于标识某个Wi-Fi围栏,不可重复添加相同ID号的围栏。 | +| [algoType](#algotype) | int
Wi-Fi围栏的匹配算法。详见[WififenceAlgoType](_hdi_lpfence_wififence.md#wififencealgotype)。 | +| [bssid](#bssid) | unsigned char[]
若使用[TYPE_ONE_BSSID](_hdi_lpfence_wififence.md#wififencealgotype)类型算法,则是多组Wi-Fi MAC地址。 若使用[TYPE_ONE_BSSID](_hdi_lpfence_wififence.md#wififencealgotype)类型算法,则是多组的Wi-Fi MAC地址和对应RSSI值。 | + + +## 类成员变量说明 + + +### algoType + + +``` +int WififenceRequest::algoType +``` + +**描述:** + +Wi-Fi围栏的匹配算法。详见[WififenceAlgoType](_hdi_lpfence_wififence.md#wififencealgotype)。 + + +### bssid + + +``` +unsigned char [] WififenceRequest::bssid +``` + +**描述:** + +若使用[TYPE_ONE_BSSID](_hdi_lpfence_wififence.md#wififencealgotype)类型算法,则是多组Wi-Fi MAC地址。 若使用[TYPE_ONE_BSSID](_hdi_lpfence_wififence.md#wififencealgotype)类型算法,则是多组的Wi-Fi MAC地址和对应RSSI值。 + + +### wififenceId + + +``` +int WififenceRequest::wififenceId +``` + +**描述:** + +Wi-Fi围栏的ID号,用于标识某个Wi-Fi围栏,不可重复添加相同ID号的围栏。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_wififence_size.md b/zh-cn/device-dev/reference/hdi-apis/_wififence_size.md new file mode 100644 index 0000000000000000000000000000000000000000..a59f694649f16175aa2e6acb8e4e47d64e182d0a --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_wififence_size.md @@ -0,0 +1,46 @@ +# WififenceSize + + +## 概述 + +定义Wi-Fi围栏使用信息的数据结构。 + +**Since:** +4.0 +**相关模块:** + +[HdiLpfenceWififence](_hdi_lpfence_wififence.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [maxNum](#maxnum) | unsigned int
设备支持添加Wi-Fi围栏的最大个数。  | +| [usedNum](#usednum) | unsigned int
设备当前已添加的Wi-Fi围栏个数。  | + + +## 类成员变量说明 + + +### maxNum + + +``` +unsigned int WififenceSize::maxNum +``` +**描述:** +设备支持添加Wi-Fi围栏的最大个数。 + + +### usedNum + + +``` +unsigned int WififenceSize::usedNum +``` +**描述:** +设备当前已添加的Wi-Fi围栏个数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/_wififence_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_wififence_types_8idl.md new file mode 100644 index 0000000000000000000000000000000000000000..ed2a51f6a7fc86efedbaefa0c2e0de7cbc30d4bb --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_wififence_types_8idl.md @@ -0,0 +1,44 @@ +# WififenceTypes.idl + + +## 概述 + +定义Wi-Fi围栏使用的数据类型。 + +**Since:** + +4.0 + +**Version:** + +1.0 + +**相关模块:** + +[HdiLpfenceWififence](_hdi_lpfence_wififence.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [WififenceRequest](_wififence_request.md) | struct
定义添加Wi-Fi围栏的数据结构。 | +| [WififenceSize](_wififence_size.md) | struct
定义Wi-Fi围栏使用信息的数据结构。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [WififenceTransition](_hdi_lpfence_wififence.md#wififencetransition) { WIFIFENCE_TRANSITION_ENTERED = (1 << 0) , WIFIFENCE_TRANSITION_EXITED = (1 << 1) } | 枚举Wi-Fi围栏状态事件。 | +| [WififenceAlgoType](_hdi_lpfence_wififence.md#wififencealgotype) { TYPE_ONE_BSSID = 1 , TYPE_FP_MATCH = 2 } | 枚举Wi-Fi围栏的匹配算法。 | + + +### 关键字 + + | 名称 | 描述 | +| -------- | -------- | +| package ohos.hdi.location.lpfence.wififence.v1_0 | Wi-Fi围栏模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_wlan_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/_wlan_types_8idl.md index 03cc663f0672292fae1a77a5f912f80050ee946f..6e41052c18f1d39e4c68d0b689e9301539ca9312 100644 --- a/zh-cn/device-dev/reference/hdi-apis/_wlan_types_8idl.md +++ b/zh-cn/device-dev/reference/hdi-apis/_wlan_types_8idl.md @@ -1,7 +1,9 @@ # WlanTypes.idl -## **概述** +## 概述 + +WLAN模块相关的数据类型。 WLAN模块中使用的数据类型,包括feature对象信息、STA信息、扫描信息、网络设备信息等。 @@ -15,28 +17,28 @@ WLAN模块中使用的数据类型,包括feature对象信息、STA信息、扫 **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [HdfFeatureInfo](_hdf_feature_info.md) | feature对象信息。 | -| [HdfStaInfo](_hdf_sta_info.md) | STA的信息。 | -| [HdfWifiDriverScanSsid](_hdf_wifi_driver_scan_ssid.md) | WiFi扫描参数SSID信息。 | -| [HdfWifiScan](_hdf_wifi_scan.md) | WiFi扫描参数。 | -| [HdfNetDeviceInfo](_hdf_net_device_info.md) | 网络设备信息。 | -| [HdfNetDeviceInfoResult](_hdf_net_device_info_result.md) | 网络设备信息集合。 | -| [HdfWifiScanResult](_hdf_wifi_scan_result.md) | WiFi扫描结果。 | -| [HdfWifiInfo](_hdf_wifi_info.md) | WiFi频段信息。 | -| [MeasChannelParam](_meas_channel_param.md) | 信道测量参数。 | -| [MeasChannelResult](_meas_channel_result.md) | 信道测量结果。 | -| [ProjectionScreenCmdParam](_projection_screen_cmd_param.md) | 投屏参数。 | -| [WifiStationInfo](_wifi_station_info.md) | STA的信息。 | +| [HdfFeatureInfo](_hdf_feature_info.md) | struct
feature对象信息。 | +| [HdfStaInfo](_hdf_sta_info.md) | struct
STA的信息。 | +| [HdfWifiDriverScanSsid](_hdf_wifi_driver_scan_ssid.md) | struct
WiFi扫描参数SSID信息。 | +| [HdfWifiScan](_hdf_wifi_scan.md) | struct
WiFi扫描参数。 | +| [HdfNetDeviceInfo](_hdf_net_device_info.md) | struct
网络设备信息。 | +| [HdfNetDeviceInfoResult](_hdf_net_device_info_result.md) | struct
网络设备信息集合。 | +| [HdfWifiScanResult](_hdf_wifi_scan_result.md) | struct
WiFi扫描结果。 | +| [HdfWifiInfo](_hdf_wifi_info.md) | struct
WiFi频段信息。 | +| [MeasChannelParam](_meas_channel_param.md) | struct
信道测量参数。 | +| [MeasChannelResult](_meas_channel_result.md) | struct
信道测量结果。 | +| [ProjectionScreenCmdParam](_projection_screen_cmd_param.md) | struct
投屏参数。 | +| [WifiStationInfo](_wifi_station_info.md) | struct
STA的信息。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/_yun_desc_info_.md b/zh-cn/device-dev/reference/hdi-apis/_yun_desc_info_.md deleted file mode 100644 index 248ce34a95277a447f7a2c07d77b4155ee135898..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/_yun_desc_info_.md +++ /dev/null @@ -1,26 +0,0 @@ -# YUVDescInfo - - -## **概述** - -YUV描述信息结构体定义。 - -**相关模块:** - -[Display](_display.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| [baseAddr](_display.md#baseaddr) | 内存的初始地址 | -| [yOffset](_display.md#yoffset) | Y的偏移量 | -| [uOffset](_display.md#uoffset) | U的偏移量 | -| [vOffset](_display.md#voffset) | V的偏移量 | -| [yStride](_display.md#ystride) | Y的stride信息 | -| [uvStride](_display.md#uvstride) | UV的stride信息 | -| [uvStep](_display.md#uvstep) | UV的step信息 | diff --git a/zh-cn/device-dev/reference/hdi-apis/_yuv_desc_info.md b/zh-cn/device-dev/reference/hdi-apis/_yuv_desc_info.md new file mode 100644 index 0000000000000000000000000000000000000000..35c62866082bb6342034299fb6041330b36cdb24 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/_yuv_desc_info.md @@ -0,0 +1,26 @@ +# YUVDescInfo + + +## 概述 + +YUV描述信息结构体定义 + +**相关模块:** + +[Display](_display.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [baseAddr](_display.md#baseaddr) | void \*
内存的初始地址 | +| [yOffset](_display.md#yoffset) | size_t
Y的偏移量 | +| [uOffset](_display.md#uoffset) | size_t
U的偏移量 | +| [vOffset](_display.md#voffset) | size_t
V的偏移量 | +| [yStride](_display.md#ystride) | size_t
Y的stride信息 | +| [uvStride](_display.md#uvstride) | size_t
UV的stride信息 | +| [uvStep](_display.md#uvstep) | size_t
UV的step信息 | diff --git a/zh-cn/device-dev/reference/hdi-apis/activity_recognition_types_idl.md b/zh-cn/device-dev/reference/hdi-apis/activity_recognition_types_idl.md deleted file mode 100644 index b57d375dc22f3750b7c3423b7e91224934b44c65..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/activity_recognition_types_idl.md +++ /dev/null @@ -1,43 +0,0 @@ -# ActivityRecognitionTypes.idl - - -## **概述** - -定义行为识别模块使用的数据类型。 - -**Since**: - -3.2 - -**Version**: - -1.0 - -**相关模块:** - -[HdiActivityRecognition](activity_recognition.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [ActRecognitionEvent](_act_recognition_event.md) | 定义行为事件上报的数据结构。 | - - -### 枚举 - - | 名称 | 描述 | -| -------- | -------- | -| [ActRecognitionEventType](activity_recognition.md#actrecognitioneventtype) { ACT_RECOGNITION_EVENT_ENTER = 0x01, ACT_RECOGNITION_EVENT_EXIT = 0x02 } | 枚举行为事件的类型。 | -| [ActRecognitionPowerMode](activity_recognition.md#actrecognitionpowermode) { ACT_RECOGNITION_NORMAL_MODE = 0, ACT_RECOGNITION_LOW_POWER_MODE = 1 } | 枚举功耗模式的类型。 | - - -### 关键字 - - | 名称 | 描述 | -| -------- | -------- | -| package ohos.hdi.activity_recognition.v1_0 | 行为识别模块接口的包路径。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/audio__adapter_8h.md b/zh-cn/device-dev/reference/hdi-apis/audio__adapter_8h.md deleted file mode 100644 index c0b214a7cd1bb4ac363ddbcd0086614b7f24ba42..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/audio__adapter_8h.md +++ /dev/null @@ -1,28 +0,0 @@ -# audio_adapter.h - - -## **概述** - -Audio适配器的接口定义文件。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [AudioAdapter](_audio_adapter.md) | AudioAdapter音频适配器接口 | diff --git a/zh-cn/device-dev/reference/hdi-apis/audio__attribute_8h.md b/zh-cn/device-dev/reference/hdi-apis/audio__attribute_8h.md deleted file mode 100644 index b17a4f40f36f38c8056a2444c545dafce407eb94..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/audio__attribute_8h.md +++ /dev/null @@ -1,28 +0,0 @@ -# audio_attribute.h - - -## **概述** - -Audio属性的接口定义文件。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [AudioAttribute](_audio_attribute.md) | AudioAttribute音频属性接口 | diff --git a/zh-cn/device-dev/reference/hdi-apis/audio__capture_8h.md b/zh-cn/device-dev/reference/hdi-apis/audio__capture_8h.md deleted file mode 100644 index d4579c7564d0c68e2822d437b78c59d792348bed..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/audio__capture_8h.md +++ /dev/null @@ -1,28 +0,0 @@ -# audio_capture.h - - -## **概述** - -Audio录音的接口定义文件。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [AudioCapture](_audio_capture.md) | AudioCapture音频录音接口 | diff --git a/zh-cn/device-dev/reference/hdi-apis/audio__control_8h.md b/zh-cn/device-dev/reference/hdi-apis/audio__control_8h.md deleted file mode 100644 index ae8509fca29ab27aaa8d7cbaf26b4b23a90ca89e..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/audio__control_8h.md +++ /dev/null @@ -1,28 +0,0 @@ -# audio_control.h - - -## **概述** - -Audio控制的接口定义文件。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [AudioControl](_audio_control.md) | AudioControl音频控制接口 | diff --git a/zh-cn/device-dev/reference/hdi-apis/audio__manager_8h.md b/zh-cn/device-dev/reference/hdi-apis/audio__manager_8h.md deleted file mode 100644 index 921f549ce6aa3caeaf9129910c921ac999674d9c..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/audio__manager_8h.md +++ /dev/null @@ -1,35 +0,0 @@ -# audio_manager.h - - -## **概述** - -Audio适配器管理及加载的接口定义文件。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [AudioManager](_audio_manager.md) | AudioManager音频适配器管理接口 | - - -### 函数 - - | 名称 | 描述 | -| -------- | -------- | -| [GetAudioManagerFuncs](_audio.md#getaudiomanagerfuncs) (void) | 获取音频适配器管理接口的操作函数列表,详情参考[AudioManager](_audio_manager.md)。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/audio__render_8h.md b/zh-cn/device-dev/reference/hdi-apis/audio__render_8h.md deleted file mode 100644 index 873f032825cf98823f9e3518f79416f366745e77..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/audio__render_8h.md +++ /dev/null @@ -1,28 +0,0 @@ -# audio_render.h - - -## **概述** - -Audio播放的接口定义文件。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [AudioRender](_audio_render.md) | AudioRender音频播放接口 | diff --git a/zh-cn/device-dev/reference/hdi-apis/audio__scene_8h.md b/zh-cn/device-dev/reference/hdi-apis/audio__scene_8h.md deleted file mode 100644 index fefc2bec5aa19e1e1abbe0537f02fc995fc346e0..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/audio__scene_8h.md +++ /dev/null @@ -1,28 +0,0 @@ -# audio_scene.h - - -## **概述** - -Audio场景的接口定义文件。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [AudioScene](_audio_scene.md) | AudioScene音频场景接口 | diff --git a/zh-cn/device-dev/reference/hdi-apis/audio__types_8h.md b/zh-cn/device-dev/reference/hdi-apis/audio__types_8h.md deleted file mode 100644 index 2d61f62b539d810e3c92d314d6c40a19912f47f5..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/audio__types_8h.md +++ /dev/null @@ -1,70 +0,0 @@ -# audio_types.h - - -## **概述** - -Audio模块接口定义中使用的自定义数据类型,包括音频端口、适配器描述符、设备描述符、场景描述符、采样属性、时间戳等。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [AudioPort](_audio_port.md) | 音频端口 | -| [AudioAdapterDescriptor](_audio_adapter_descriptor.md) | 音频适配器描述符 | -| [AudioDeviceDescriptor](_audio_device_descriptor.md) | 音频设备描述符 | -| [AudioSceneDescriptor](_audio_scene_descriptor.md) | 音频场景描述符 | -| [AudioSceneDescriptor::SceneDesc](union_audio_scene_descriptor_1_1_scene_desc.md) | 音频场景描述 | -| [AudioSampleAttributes](_audio_sample_attributes.md) | 音频采样属性 | -| [AudioTimeStamp](_audio_time_stamp.md) | 音频时间戳 | -| [AudioSubPortCapability](_audio_sub_port_capability.md) | 音频子端口的支持能力 | -| [AudioPortCapability](_audio_port_capability.md) | 音频端口的支持能力 | -| [AudioMmapBufferDescriptor](_audio_mmap_buffer_descriptor.md) | mmap缓冲区描述符 | -| [AudioDevExtInfo](_audio_dev_ext_info.md) | 音频设备拓展信息. | -| [AudioMixExtInfo](_audio_mix_ext_info.md) | 音轨拓展信息 | -| [AudioSessionExtInfo](_audio_session_ext_info.md) | 会话拓展信息 | -| [AudioRouteNode](_audio_route_node.md) | 音频路由节点. | -| [AudioRoute](_audio_route.md) | 音频路由信息. | - - -### 类型定义 - - | 名称 | 描述 | -| -------- | -------- | -| AudioHandle | 音频句柄 | -| ([RenderCallback](_audio.md#rendercallback)) (enum AudioCallbackType, void \*reserved, void \*cookie) | 回调函数指针 | - - -### 枚举 - - | 名称 | 描述 | -| -------- | -------- | -| [AudioPortDirection](_audio.md#audioportdirection) { PORT_OUT = 0x1u, PORT_IN = 0x2u, PORT_OUT_IN = 0x3u } | 音频端口的类型 | -| [AudioPortPin](_audio.md#audioportpin) { PIN_NONE = 0x0u, PIN_OUT_SPEAKER = 0x1u, PIN_OUT_HEADSET = 0x2u, PIN_OUT_LINEOUT = 0x4u,   PIN_OUT_HDMI = 0x8u, PIN_OUT_USB = 0x10u, PIN_OUT_USB_EXT = 0x20u, PIN_IN_MIC = 0x8000001u,   PIN_IN_HS_MIC = 0x8000002u, PIN_IN_LINEIN = 0x8000004u, PIN_IN_USB_EXT = 0x8000008u } | 音频适配器端口的PIN脚 | -| [AudioCategory](_audio.md#audiocategory) { AUDIO_IN_MEDIA = 0, AUDIO_IN_COMMUNICATION, AUDIO_IN_RINGTONE, AUDIO_IN_CALL } | 音频类型(category) | -| [AudioFormat](_audio.md#audioformat){ AUDIO_FORMAT_PCM_8_BIT = 0x1u, AUDIO_FORMAT_PCM_16_BIT = 0x2u, AUDIO_FORMAT_PCM_24_BIT = 0x3u, AUDIO_FORMAT_PCM_32_BIT = 0x4u,   AUDIO_FORMAT_AAC_MAIN = 0x1000001u, AUDIO_FORMAT_AAC_LC = 0x1000002u, AUDIO_FORMAT_AAC_LD = 0x1000003u, AUDIO_FORMAT_AAC_ELD = 0x1000004u,   AUDIO_FORMAT_AAC_HE_V1 = 0x1000005u, AUDIO_FORMAT_AAC_HE_V2 = 0x1000006u, AUDIO_FORMAT_G711A = 0x2000001u, AUDIO_FORMAT_G711U = 0x2000002u,   AUDIO_FORMAT_G726 = 0x2000003u } | 音频格式 | -| [AudioChannelMask](_audio.md#audiochannelmask){ AUDIO_CHANNEL_FRONT_LEFT = 0x1, AUDIO_CHANNEL_FRONT_RIGHT = 0x2, AUDIO_CHANNEL_MONO = 0x1u, AUDIO_CHANNEL_STEREO = 0x3u } | 音频通道掩码(mask) | -| [AudioSampleRatesMask](_audio.md#audiosampleratesmask){ AUDIO_SAMPLE_RATE_MASK_8000 = 0x1u, AUDIO_SAMPLE_RATE_MASK_12000 = 0x2u, AUDIO_SAMPLE_RATE_MASK_11025 = 0x4u, AUDIO_SAMPLE_RATE_MASK_16000 = 0x8u,   AUDIO_SAMPLE_RATE_MASK_22050 = 0x10u, AUDIO_SAMPLE_RATE_MASK_24000 = 0x20u, AUDIO_SAMPLE_RATE_MASK_32000 = 0x40u, AUDIO_SAMPLE_RATE_MASK_44100 = 0x80u,   AUDIO_SAMPLE_RATE_MASK_48000 = 0x100u, AUDIO_SAMPLE_RATE_MASK_64000 = 0x200u, AUDIO_SAMPLE_RATE_MASK_96000 = 0x400u, AUDIO_SAMPLE_RATE_MASK_INVALID = 0xFFFFFFFFu } | 音频采样频率MASK | -| [AudioPortPassthroughMode](_audio.md#audioportpassthroughmode){ PORT_PASSTHROUGH_LPCM = 0x1, PORT_PASSTHROUGH_RAW = 0x2, PORT_PASSTHROUGH_HBR2LBR = 0x4, PORT_PASSTHROUGH_AUTO = 0x8 } | 音频端口的数据透传模式 | -| [AudioSampleFormat](_audio.md#audiosampleformat){ AUDIO_SAMPLE_FORMAT_S8, AUDIO_SAMPLE_FORMAT_S8P, AUDIO_SAMPLE_FORMAT_U8, AUDIO_SAMPLE_FORMAT_U8P,   AUDIO_SAMPLE_FORMAT_S16, AUDIO_SAMPLE_FORMAT_S16P, AUDIO_SAMPLE_FORMAT_U16, AUDIO_SAMPLE_FORMAT_U16P,   AUDIO_SAMPLE_FORMAT_S24, AUDIO_SAMPLE_FORMAT_S24P, AUDIO_SAMPLE_FORMAT_U24, AUDIO_SAMPLE_FORMAT_U24P,   AUDIO_SAMPLE_FORMAT_S32, AUDIO_SAMPLE_FORMAT_S32P, AUDIO_SAMPLE_FORMAT_U32, AUDIO_SAMPLE_FORMAT_U32P,   AUDIO_SAMPLE_FORMAT_S64, AUDIO_SAMPLE_FORMAT_S64P, AUDIO_SAMPLE_FORMAT_U64, AUDIO_SAMPLE_FORMAT_U64P,   AUDIO_SAMPLE_FORMAT_F32, AUDIO_SAMPLE_FORMAT_F32P, AUDIO_SAMPLE_FORMAT_F64, AUDIO_SAMPLE_FORMAT_F64P } | 原始音频样本格式 | -| [AudioChannelMode](_audio.md#audiochannelmode){  AUDIO_CHANNEL_NORMAL = 0, AUDIO_CHANNEL_BOTH_LEFT, AUDIO_CHANNEL_BOTH_RIGHT, AUDIO_CHANNEL_EXCHANGE,   AUDIO_CHANNEL_MIX, AUDIO_CHANNEL_LEFT_MUTE, AUDIO_CHANNEL_RIGHT_MUTE, AUDIO_CHANNEL_BOTH_MUTE } | 音频播放的通道模式 | -| [AudioDrainNotifyType](_audio.md#audiodrainnotifytype){ AUDIO_DRAIN_NORMAL_MODE, AUDIO_DRAIN_EARLY_MODE } | DrainBuffer函数结束类型 | -| [AudioCallbackType](_audio.md#audiocallbacktype){ AUDIO_NONBLOCK_WRITE_COMPLETED, AUDIO_DRAIN_COMPLETED, AUDIO_FLUSH_COMPLETED, AUDIO_RENDER_FULL,   AUDIO_ERROR_OCCUR } | 回调函数通知事件类型 | -| [AudioPortRole](_audio.md#audioportrole){ AUDIO_PORT_UNASSIGNED_ROLE = 0, AUDIO_PORT_SOURCE_ROLE = 1, AUDIO_PORT_SINK_ROLE = 2 } | 音频端口角色 | -| [AudioPortType](_audio.md#audioporttype){ AUDIO_PORT_UNASSIGNED_TYPE = 0, AUDIO_PORT_DEVICE_TYPE = 1, AUDIO_PORT_MIX_TYPE = 2, AUDIO_PORT_SESSION_TYPE = 3 } | 音频端口类型. | -| [AudioSessionType](_audio.md#audiosessiontype){ AUDIO_OUTPUT_STAGE_SESSION = 0, AUDIO_OUTPUT_MIX_SESSION, AUDIO_ALLOCATE_SESSION, AUDIO_INVALID_SESSION } | 端口会话类型 | diff --git a/zh-cn/device-dev/reference/hdi-apis/audio__volume_8h.md b/zh-cn/device-dev/reference/hdi-apis/audio__volume_8h.md deleted file mode 100644 index 429de22809856c4523e327aa2861ce4590e3950d..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/audio__volume_8h.md +++ /dev/null @@ -1,28 +0,0 @@ -# audio_volume.h - - -## **概述** - -Audio音量的接口定义文件。 - -**Since:** - -1.0 - -**Version:** - -1.0 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [AudioVolume](_audio_volume.md) | AudioVolume音频音量接口 | diff --git a/zh-cn/device-dev/reference/hdi-apis/audio_portcap.md b/zh-cn/device-dev/reference/hdi-apis/audio_portcap.md deleted file mode 100644 index 2b1d6cf7178cf68030c31ef537da5b9c6e2caa13..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/audio_portcap.md +++ /dev/null @@ -1,79 +0,0 @@ -# AudioPortCap - - -## **概述** - -定义音频编解码能力。 - -**所属模块:** - -[Codec](codec.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| [sampleFormats](#sampleformats) [SAMPLE_FMT_NUM] | 支持的音频采样格式,详见[AudioSampleFormat](codec.md#audiosampleformat)。 | -| [sampleRate](#samplerate) [SAMPLE_RATE_NUM] | 支持的音频采样率,详见[AudioSampleRate](codec.md#audiosamplerate)。 | -| [channelLayouts](#channellayouts) [CHANNEL_NUM] | 支持的音频通道数channel layouts。 | -| [channelCount](#channelcount) [CHANNEL_NUM] | 支持的音频通道数。 | - - -## **详细描述** - -定义音频编解码能力。 - - -## **类成员变量说明** - - -### channelCount - - -``` -int32_t AudioPortCap::channelCount[CHANNEL_NUM] -``` - -**描述:** - -支持的音频通道数 - - -### channelLayouts - - -``` -int32_t AudioPortCap::channelLayouts[CHANNEL_NUM] -``` - -**描述:** - -支持的音频通道数channel layouts - - -### sampleFormats - - -``` -int32_t AudioPortCap::sampleFormats[SAMPLE_FMT_NUM] -``` - -**描述:** - -支持的音频采样格式,详见[AudioSampleFormat](codec.md#audiosampleformat) - - -### sampleRate - - -``` -int32_t AudioPortCap::sampleRate[SAMPLE_RATE_NUM] -``` - -**描述:** - -支持的音频采样率,详见[AudioSampleRate](codec.md#audiosamplerate) diff --git a/zh-cn/device-dev/reference/hdi-apis/battery.md b/zh-cn/device-dev/reference/hdi-apis/battery.md index bb3e111a477ae5f1171dee8f2cead9e2072528d7..d094cbdfc9482e3eca28fea8cc71997188cb42b3 100644 --- a/zh-cn/device-dev/reference/hdi-apis/battery.md +++ b/zh-cn/device-dev/reference/hdi-apis/battery.md @@ -1,47 +1,47 @@ # Battery -## **概述** +## 概述 电池模块为电池服务提供的获取、订阅电池信息的接口。 服务获取此模块的对象或代理后,可以调用相关的接口获取电池信息、订阅电池信息的变化。 -**Since**: +**Since:** -3.2 +3.1 -**Version**: +**Version:** 1.0 -## **汇总** +## 汇总 ### 文件 - | 名称 | 描述 | +| 名称 | 描述 | | -------- | -------- | -| [IBatteryCallback.idl](_i_battery_callback_8idl.md) | 电池信息的回调。 | -| [IBatteryInterface.idl](_i_battery_interface_8idl.md) | 获取、订阅电池信息的接口。 | -| [BatteryTypes.idl](battery_types_idl.md) | 电池信息相关数据类型。 | +| [IBatteryCallback.idl](_i_battery_callback_8idl.md) | 电池信息的回调。 | +| [IBatteryInterface.idl](_i_battery_interface_8idl.md) | 获取、订阅电池信息的接口。 | +| [Types.idl](_battery_types_8idl.md) | 电池信息相关数据类型。 | ### 类 | 名称 | 描述 | | -------- | -------- | -| [IBatteryCallback](interface_i_battery_callback.md) | 电池信息的回调。 | -| [IBatteryInterface](interface_i_battery_interface.md) | 获取、订阅电池信息的接口。 | -| [BatteryInfo](_battery_info.md) | 电池相关信息。 | +| [IBatteryCallback](interface_i_battery_callback.md) | interface
电池信息的回调。 | +| [IBatteryInterface](interface_i_battery_interface.md) | interface
获取、订阅电池信息的接口。 | +| [BatteryInfo](_battery_info.md) | struct
电池相关信息。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [BatteryHealthState](#batteryhealthstate) {   BATTERY_HEALTH_UNKNOWN = 0, BATTERY_HEALTH_GOOD, BATTERY_HEALTH_OVERHEAT, BATTERY_HEALTH_OVERVOLTAGE,   BATTERY_HEALTH_COLD, BATTERY_HEALTH_DEAD, BATTERY_HEALTH_RESERVED } | 电池的健康状态。 | -| [BatteryChargeState](#batterychargestate) {   CHARGE_STATE_NONE = 0, CHARGE_STATE_ENABLE, CHARGE_STATE_DISABLE, CHARGE_STATE_FULL,   CHARGE_STATE_RESERVED } | 电池的充电状态。 | -| [BatteryPluggedType](#batterypluggedtype) {   PLUGGED_TYPE_NONE = 0, PLUGGED_TYPE_AC, PLUGGED_TYPE_USB, PLUGGED_TYPE_WIRELESS,   PLUGGED_TYPE_BUTT } | 电池的充电设备类型。 | +| [BatteryHealthState](#batteryhealthstate) { BATTERY_HEALTH_UNKNOWN = 0, BATTERY_HEALTH_GOOD, BATTERY_HEALTH_OVERHEAT, BATTERY_HEALTH_OVERVOLTAGE,   BATTERY_HEALTH_COLD, BATTERY_HEALTH_DEAD, BATTERY_HEALTH_RESERVED } | 电池的健康状态。 | +| [BatteryChargeState](#batterychargestate) { CHARGE_STATE_NONE = 0, CHARGE_STATE_ENABLE, CHARGE_STATE_DISABLE, CHARGE_STATE_FULL, CHARGE_STATE_RESERVED } | 电池的充电状态。 | +| [BatteryPluggedType](#batterypluggedtype) { PLUGGED_TYPE_NONE = 0, PLUGGED_TYPE_AC, PLUGGED_TYPE_USB, PLUGGED_TYPE_WIRELESS,   PLUGGED_TYPE_BUTT } | 电池的充电设备类型。 | ### 关键字 @@ -51,17 +51,17 @@ | package ohos.hdi.battery.v1_0 | 电池模块接口的包路径。 | -## **枚举类型说明** +## 枚举类型说明 ### BatteryChargeState - + ``` enum BatteryChargeState ``` -**描述:** +**描述:** 电池的充电状态。 @@ -76,12 +76,12 @@ enum BatteryChargeState ### BatteryHealthState - + ``` enum BatteryHealthState ``` -**描述:** +**描述:** 电池的健康状态。 @@ -98,12 +98,12 @@ enum BatteryHealthState ### BatteryPluggedType - + ``` enum BatteryPluggedType ``` -**描述:** +**描述:** 电池的充电设备类型。 diff --git a/zh-cn/device-dev/reference/hdi-apis/camera_2v1__0_2_types_8idl.md b/zh-cn/device-dev/reference/hdi-apis/camera_2v1__0_2_types_8idl.md deleted file mode 100644 index 51e4d8c25dee501dab05ef3101f224e828c374b8..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/camera_2v1__0_2_types_8idl.md +++ /dev/null @@ -1,57 +0,0 @@ -# Types.idl - - -## **概述** - -Camera模块HDI接口使用的数据类型。 - -**Since:** - -3.2 - -**Version:** - -1.0 - -**相关模块:** - -[Camera](camera.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [StreamInfo](_stream_info.md) | 流信息,用于创建流时传入相关的配置参数。 | -| [StreamAttribute](_stream_attribute.md) | 流的属性。 | -| [CaptureInfo](_capture_info.md) | 捕获请求的相关信息。 | -| [CaptureEndedInfo](_capture_ended_info.md) | 捕获结束相关信息,用于捕获结束回调[OnCaptureEnded](interface_i_stream_operator_callback.md#oncaptureended)。 | -| [CaptureErrorInfo](_capture_error_info.md) | 流错误信息,用于回调[OnCaptureError](interface_i_stream_operator_callback.md#oncaptureerror)。 | - - -### 枚举 - - | 名称 | 描述 | -| -------- | -------- | -| [CamRetCode](camera.md#camretcode) {   NO_ERROR = 0, CAMERA_BUSY = -1, INSUFFICIENT_RESOURCES = -2, INVALID_ARGUMENT = -3,   METHOD_NOT_SUPPORTED = -4, CAMERA_CLOSED = -5, DEVICE_ERROR = -6, NO_PERMISSION = -7 } | HDI接口的返回值。 | -| [ResultCallbackMode](camera.md#resultcallbackmode) { PER_FRAME = 0, ON_CHANGED = 1 } | metadata的上报模式。 | -| [OperationMode](camera.md#operationmode) { NORMAL = 0 } | 流的使用模式。 | -| [StreamIntent](camera.md#streamintent) { PREVIEW = 0, VIDEO = 1, STILL_CAPTURE = 2, POST_VIEW = 3,   ANALYZE = 4, CUSTOM = 5 } | 流的类型。 | -| [EncodeType](camera.md#encodetype) { ENCODE_TYPE_NULL = 0, ENCODE_TYPE_H264 = 1, ENCODE_TYPE_H265 = 2, ENCODE_TYPE_JPEG = 3 } | 流数据的编码类型。 | -| [StreamSupportType](camera.md#streamsupporttype) { DYNAMIC_SUPPORTED = 0, RE_CONFIGURED_REQUIRED = 1, NOT_SUPPORTED = 2 } | 对动态配置流的支持类型,使用场景参考[IsStreamsSupported](interface_i_stream_operator.md#isstreamssupported)。 | -| [CameraStatus](camera.md#camerastatus) { UN_AVAILABLE = 0, AVAILABLE = 1 } | Camera设备状态。 | -| [FlashlightStatus](camera.md#flashlightstatus) { FLASHLIGHT_OFF = 0, FLASHLIGHT_ON = 1, FLASHLIGHT_UNAVAILABLE = 2 } | 闪光灯状态。 | -| [CameraEvent](camera.md#cameraevent) { CAMERA_EVENT_DEVICE_ADD = 0, CAMERA_EVENT_DEVICE_RMV = 1 } | Camera事件。 | -| [ErrorType](camera.md#errortype) {   FATAL_ERROR = 0, REQUEST_TIMEOUT = 1, DRIVER_ERROR = 2, DEVICE_PREEMPT = 3,   DEVICE_DISCONNECT = 4, DCAMERA_ERROR_BEGIN = 1024, DCAMERA_ERROR_DEVICE_IN_USE, DCAMERA_ERROR_NO_PERMISSION } | 设备错误类型,用于设备错误回调[OnError](interface_i_camera_device_callback.md#onerror)。 | -| [StreamError](camera.md#streamerror) { UNKNOWN_ERROR = 0, BUFFER_LOST = 1 } | 流错误类型,用于流错误类型[CaptureErrorInfo](_capture_error_info.md)。 | - - -### 关键字 - - | 名称 | 描述 | -| -------- | -------- | -| package ohos.hdi.camera.v1_0 | Camera设备接口的包路径。 | -| sequenceable ohos.hdi.camera.v1_0.BufferProducerSequenceable | ohos.hdi.camera.v1_0序列,可用缓冲区生成器。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/codec__callback__if_8h.md b/zh-cn/device-dev/reference/hdi-apis/codec__callback__if_8h.md new file mode 100644 index 0000000000000000000000000000000000000000..d2851c60b38444d815491ce5ebe84479887172ba --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/codec__callback__if_8h.md @@ -0,0 +1,34 @@ +# codec_callback_if.h + + +## 概述 + +主要包括回调函数接口定义。 + +Codec模块事件上报、上报输入buffer和输出buffer处理完毕等接口定义。 + +**Since:** +3.1 +**Version:** +2.0 +**相关模块:** + +[Codec](_codec.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [CodecCallbackType](_codec_callback_type.md) | struct
Codec回调接口定义。  | + + +### 函数 + + | 名称 | 描述 | +| -------- | -------- | +| [CodecCallbackTypeGet](_codec.md#codeccallbacktypeget) (struct HdfRemoteService \*remote) | struct [CodecCallbackType](_codec_callback_type.md) \*
实例化CodecCallbackType对象。  | +| [CodecCallbackTypeRelease](_codec.md#codeccallbacktyperelease) (struct [CodecCallbackType](_codec_callback_type.md) \*instance) | void
释放CodecCallbackType对象。  | diff --git a/zh-cn/device-dev/reference/hdi-apis/codec__common__type_8h.md b/zh-cn/device-dev/reference/hdi-apis/codec__common__type_8h.md new file mode 100644 index 0000000000000000000000000000000000000000..eac28f722c87c332e0a02c21adfdf478019544d9 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/codec__common__type_8h.md @@ -0,0 +1,41 @@ +# codec_common_type.h + + +## 概述 + +Codec模块接口定义中使用的自定义数据类型,包括编解码类型、音视频参数、buffer定义等。 + +**Since:** + +3.1 + +**Version:** + +2.0 + +**相关模块:** + +[Codec](_codec.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [Alignment](_alignment.md) | struct
对齐结构定义,包含宽高的对齐值。 | +| [Rect](_rect.md) | struct
矩形的定义。 | +| [RangeValue](_range_value.md) | struct
取值范围的定义。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [CodecType](_codec.md#codectype) { VIDEO_DECODER, VIDEO_ENCODER, AUDIO_DECODER, AUDIO_ENCODER,   INVALID_TYPE } | 枚举编解码的类型。 | +| [Profile](_codec.md#profile) { INVALID_PROFILE = 0, AAC_LC_PROFILE = 0x1000, AAC_MAIN_PROFILE, AAC_HE_V1_PROFILE,   AAC_HE_V2_PROFILE, AAC_LD_PROFILE, AAC_ELD_PROFILE, AVC_BASELINE_PROFILE = 0x2000,   AVC_MAIN_PROFILE, AVC_HIGH_PROFILE, HEVC_MAIN_PROFILE = 0x3000, HEVC_MAIN_10_PROFILE } | 枚举Codec规格。 | +| [AudioSampleRate](_codec.md#audiosamplerate) { AUD_SAMPLE_RATE_8000 = 8000, AUD_SAMPLE_RATE_12000 = 12000, AUD_SAMPLE_RATE_11025 = 11025, AUD_SAMPLE_RATE_16000 = 16000,   AUD_SAMPLE_RATE_22050 = 22050, AUD_SAMPLE_RATE_24000 = 24000, AUD_SAMPLE_RATE_32000 = 32000, AUD_SAMPLE_RATE_44100 = 44100,   AUD_SAMPLE_RATE_48000 = 48000, AUD_SAMPLE_RATE_64000 = 64000, AUD_SAMPLE_RATE_96000 = 96000, AUD_SAMPLE_RATE_INVALID } | 枚举音频采样率。 | +| [CodecCapsMask](_codec.md#codeccapsmask) { CODEC_CAP_ADAPTIVE_PLAYBACK = 0x1, CODEC_CAP_SECURE_PLAYBACK = 0x2, CODEC_CAP_TUNNEL_PLAYBACK = 0x4, CODEC_CAP_MULTI_PLANE = 0x10000 } | 枚举播放能力。 | +| [CodecProcessMode](_codec.md#codecprocessmode) { PROCESS_BLOCKING_INPUT_BUFFER = 0X1, PROCESS_BLOCKING_OUTPUT_BUFFER = 0X2, PROCESS_BLOCKING_CONTROL_FLOW = 0X4, PROCESS_NONBLOCKING_INPUT_BUFFER = 0X100,   PROCESS_NONBLOCKING_OUTPUT_BUFFER = 0X200, PROCESS_NONBLOCKING_CONTROL_FLOW = 0X400 } | 枚举编解码处理模式。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/codec__component__if_8h.md b/zh-cn/device-dev/reference/hdi-apis/codec__component__if_8h.md new file mode 100644 index 0000000000000000000000000000000000000000..cf8ee8e8bd0400139f2e0388dce8b3669ebc962b --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/codec__component__if_8h.md @@ -0,0 +1,34 @@ +# codec_component_if.h + + +## 概述 + +主要包括Codec组件接口定义。 + +Codec模块提供了获取组件信息、给组件发送命令、组件参数设置、buffer轮转和控制等接口定义。创建组件后,可使用下列接口进行编解码处理。 + +**Since:** +3.1 +**Version:** +2.0 +**相关模块:** + +[Codec](_codec.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [CodecComponentType](_codec_component_type.md) | struct
Codec组件接口定义。  | + + +### 函数 + + | 名称 | 描述 | +| -------- | -------- | +| [CodecComponentTypeGet](_codec.md#codeccomponenttypeget) (struct HdfRemoteService \*remote) | struct [CodecComponentType](_codec_component_type.md) \*
实例化CodecComponentType对象。  | +| [CodecComponentTypeRelease](_codec.md#codeccomponenttyperelease) (struct [CodecComponentType](_codec_component_type.md) \*instance) | void
释放CodecComponentType对象。  | diff --git a/zh-cn/device-dev/reference/hdi-apis/codec__component__manager_8h.md b/zh-cn/device-dev/reference/hdi-apis/codec__component__manager_8h.md new file mode 100644 index 0000000000000000000000000000000000000000..9e5c2c2d033ad3632437ee1e5ed254fc87b2a81f --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/codec__component__manager_8h.md @@ -0,0 +1,34 @@ +# codec_component_manager.h + + +## 概述 + +主要包括Codec组件管理类接口。 + +Codec模块获取组件编解码能力集、创建组件和销毁组件等接口定义。 + +**Since:** +3.1 +**Version:** +2.0 +**相关模块:** + +[Codec](_codec.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [CodecComponentManager](_codec_component_manager.md) | struct
Codec组件管理类接口定义。  | + + +### 函数 + + | 名称 | 描述 | +| -------- | -------- | +| [GetCodecComponentManager](_codec.md#getcodeccomponentmanager) (void) | struct [CodecComponentManager](_codec_component_manager.md) \*
实例化CodecComponentManager对象。  | +| [CodecComponentManagerRelease](_codec.md#codeccomponentmanagerrelease) (void) | void
释放CodecComponentManager对象。  | diff --git a/zh-cn/device-dev/reference/hdi-apis/codec__component__manager_h.md b/zh-cn/device-dev/reference/hdi-apis/codec__component__manager_h.md deleted file mode 100644 index 27d7f244b3cdb5e768f53319582e80b79834a3ca..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/codec__component__manager_h.md +++ /dev/null @@ -1,38 +0,0 @@ -# codec_component_manager.h - - -## **概述** - -主要包括Codec组件管理类接口。 - -Codec模块获取组件编解码能力集、创建组件和销毁组件等接口定义。 - -**Since**: - -3.1 - -**Version**: - -2.0 - -**相关模块:** - -[Codec](codec.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [CodecComponentManager](_codec_component_manager.md) | Codec组件管理类接口定义。 | - - -### 函数 - - | 名称 | 描述 | -| -------- | -------- | -| [GetCodecComponentManager](codec.md#getcodeccomponentmanager) (void) | 实例化CodecComponentManager对象。 | -| [CodecComponentManagerRelease](codec.md#codeccomponentmanagerrelease) (void) | 释放CodecComponentManager对象。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/codec__component__type_8h.md b/zh-cn/device-dev/reference/hdi-apis/codec__component__type_8h.md new file mode 100644 index 0000000000000000000000000000000000000000..494946725e876fd313c1e7cd07126ce2401518fe --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/codec__component__type_8h.md @@ -0,0 +1,65 @@ +# codec_component_type.h + + +## 概述 + +Codec模块接口定义中使用的自定义数据类型。 + +Codec模块接口定义中使用的自定义数据类型,包括编解码类型、音视频参数、buffer定义等。 + +**Since:** + +3.1 + +**Version:** + +2.0 + +**相关模块:** + +[Codec](_codec.md) + + +## 汇总 + + +### 类 + + | 名称 | 描述 | +| -------- | -------- | +| [VideoPortCap](_video_port_cap.md) | struct
定义视频编解码能力。 | +| [AudioPortCap](_audio_port_cap.md) | struct
定义音频编解码能力。 | +| [PortCap](union_port_cap.md) | union
定义音视频编解码能力。 | +| [CodecCompCapability](_codec_comp_capability.md) | struct
定义Codec编解码能力。 | +| [OmxCodecBuffer](_omx_codec_buffer.md) | struct
Codec buffer信息的定义。 | +| [CompVerInfo](_comp_ver_info.md) | struct
定义组件版本信息。 | +| [EventInfo](_event_info.md) | struct
定义事件上报信息。 | +| [SupportBufferType](_support_buffer_type.md) | struct
SupportBuffer类型定义。 | +| [UseBufferType](_use_buffer_type.md) | struct
UseBuffer类型定义。 | +| [GetBufferHandleUsageParams](_get_buffer_handle_usage_params.md) | struct
BufferHandleUsage类型定义。 | + + +### 宏定义 + + | 名称 | 描述 | +| -------- | -------- | +| [SAMPLE_FMT_NUM](_codec.md#sample_fmt_num)   32 | 采样格式最大值。 | +| [UUID_LENGTH](_codec.md#uuid_length)   128 | 定义UUID长度。 | +| [PIX_FORMAT_NUM](_codec.md#pix_format_num)   16 | 支持的像素格式数组大小。 | +| [SAMPLE_FORMAT_NUM](_codec.md#sample_format_num)   12 | 支持的音频采样格式数组大小。 | +| [SAMPLE_RATE_NUM](_codec.md#sample_rate_num)   16 | 支持的音频采样率数组大小。 | +| [CHANNEL_NUM](_codec.md#channel_num)   16 | 支持的音频通道数组大小。 | +| [NAME_LENGTH](_codec.md#name_length)   32 | 组件名称大小。 | +| [PROFILE_NUM](_codec.md#profile_num)   256 | 支持的profile数组大小。 | + + +### 枚举 + + | 名称 | 描述 | +| -------- | -------- | +| [AvCodecRole](_codec.md#avcodecrole) { MEDIA_ROLETYPE_IMAGE_JPEG = 0, MEDIA_ROLETYPE_VIDEO_AVC, MEDIA_ROLETYPE_VIDEO_HEVC, MEDIA_ROLETYPE_AUDIO_FIRST = 0x10000,   MEDIA_ROLETYPE_AUDIO_AAC = 0x10000, MEDIA_ROLETYPE_AUDIO_G711A, MEDIA_ROLETYPE_AUDIO_G711U, MEDIA_ROLETYPE_AUDIO_G726,   MEDIA_ROLETYPE_AUDIO_PCM, MEDIA_ROLETYPE_AUDIO_MP3, MEDIA_ROLETYPE_INVALID } | 枚举音视频编解码组件类型。 | +| [AudioSampleFormat](_codec.md#audiosampleformat) {
AUDIO_SAMPLE_FMT_U8 , AUDIO_SAMPLE_FMT_S16 , AUDIO_SAMPLE_FMT_S32 , AUDIO_SAMPLE_FMT_FLOAT ,
AUDIO_SAMPLE_FMT_DOUBLE , AUDIO_SAMPLE_FMT_U8P , AUDIO_SAMPLE_FMT_S16P , AUDIO_SAMPLE_FMT_S32P ,
AUDIO_SAMPLE_FMT_FLOATP , AUDIO_SAMPLE_FMT_DOUBLEP , AUDIO_SAMPLE_FMT_INVALID
} | 枚举音频采样格式。 | +| [CodecBufferType](_codec.md#codecbuffertype) { CODEC_BUFFER_TYPE_INVALID = 0, CODEC_BUFFER_TYPE_VIRTUAL_ADDR = 0x1, CODEC_BUFFER_TYPE_AVSHARE_MEM_FD = 0x2, CODEC_BUFFER_TYPE_HANDLE = 0x4,   CODEC_BUFFER_TYPE_DYNAMIC_HANDLE = 0x8 } | 定义buffer类型。 | +| [ShareMemTypes](_codec.md#sharememtypes) { READ_WRITE_TYPE = 0x1, READ_ONLY_TYPE = 0x2 } | 枚举共享内存类型。 | +| [OmxIndexCodecExType](_codec.md#omxindexcodecextype) { OMX_IndexExtBufferTypeStartUnused = OMX_IndexKhronosExtensions + 0x00a00000, OMX_IndexParamSupportBufferType, OMX_IndexParamUseBufferType, OMX_IndexParamGetBufferHandleUsage } | 枚举Codec扩展index。 | +| [OmxVideoExType](_codec.md#omxvideoextype) { OMX_VIDEO_CodingHEVC = 11 } | 枚举Codec扩展编码类型。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/codec__component__type_h.md b/zh-cn/device-dev/reference/hdi-apis/codec__component__type_h.md deleted file mode 100644 index b6ddc54e8b1acbe57d7207ef04e78df87a3a85c6..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/codec__component__type_h.md +++ /dev/null @@ -1,64 +0,0 @@ -# codec_component_type.h - - -## **概述** - - -Codec模块接口定义中使用的自定义数据类型,包括编解码类型、音视频参数、buffer定义等。 - -**Since**: - -3.1 - -**Version**: - -2.0 - -**相关模块:** - -[Codec](codec.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [VideoPortCap](_video_port_cap.md) | 定义视频编解码能力。 | -| [AudioPortCap](audio_portcap.md) | 定义音频编解码能力。 | -| [PortCap](union_port_cap.md) | 定义音视频编解码能力。 | -| [CodecCompCapability](_codec_comp_capability.md) | 定义Codec编解码能力。 | -| [OmxCodecBuffer](_omx_codec_buffer.md) | Codec buffer信息的定义。 | -| [CompVerInfo](_comp_ver_info.md) | 定义组件版本信息。 | -| [EventInfo](_event_info.md) | 定义事件上报信息。 | -| [SupportBufferType](_support_buffer_type.md) | SupportBuffer类型定义。 | -| [UseBufferType](_use_buffer_type.md) | UseBuffer类型定义。 | -| [GetBufferHandleUsageParams](_get_buffer_handle_usage_params.md) | BufferHandleUsage类型定义。 | - - -### 宏定义 - - | 名称 | 描述 | -| -------- | -------- | -| [SAMPLE_FMT_NUM](codec.md#宏定义)   32 | 采样格式最大值。 | -| [UUID_LENGTH](codec.md#宏定义)   128 | 定义UUID长度。 | -| [PIX_FORMAT_NUM](codec.md#宏定义)   16 | 支持的像素格式数组大小。 | -| [SAMPLE_FORMAT_NUM](codec.md#宏定义)   12 | 支持的音频采样格式数组大小。 | -| [SAMPLE_RATE_NUM](codec.md#宏定义)   16 | 支持的音频采样率数组大小。 | -| [CHANNEL_NUM](codec.md#宏定义)   16 | 支持的音频通道数组大小。 | -| [NAME_LENGTH](codec.md#宏定义)   32 | 组件名称大小。 | -| [PROFILE_NUM](codec.md#宏定义)   256 | 支持的profile数组大小。 | - - -### 枚举 - - | 名称 | 描述 | -| -------- | -------- | -| [AvCodecRole](codec.md#avcodecrole) { MEDIA_ROLETYPE_IMAGE_JPEG = 0, MEDIA_ROLETYPE_VIDEO_AVC, MEDIA_ROLETYPE_VIDEO_HEVC, MEDIA_ROLETYPE_AUDIO_FIRST = 0x10000,   MEDIA_ROLETYPE_AUDIO_AAC = 0x10000, MEDIA_ROLETYPE_AUDIO_G711A, MEDIA_ROLETYPE_AUDIO_G711U, MEDIA_ROLETYPE_AUDIO_G726,   MEDIA_ROLETYPE_AUDIO_PCM, MEDIA_ROLETYPE_AUDIO_MP3, MEDIA_ROLETYPE_INVALID } | 枚举音视频编解码组件类型。 | -| [AudioSampleFormat](codec.md#audiosampleformat) { AUDIO_SAMPLE_FORMAT_S8 = 0, AUDIO_SAMPLE_FORMAT_S8P = 1, AUDIO_SAMPLE_FORMAT_U8 = 2, AUDIO_SAMPLE_FORMAT_U8P = 3,   AUDIO_SAMPLE_FORMAT_S16 = 4, AUDIO_SAMPLE_FORMAT_S16P = 5, AUDIO_SAMPLE_FORMAT_U16 = 6, AUDIO_SAMPLE_FORMAT_U16P = 7,   AUDIO_SAMPLE_FORMAT_S24 = 8, AUDIO_SAMPLE_FORMAT_S24P = 9, AUDIO_SAMPLE_FORMAT_U24 = 10, AUDIO_SAMPLE_FORMAT_U24P = 11,   AUDIO_SAMPLE_FORMAT_S32 = 12, AUDIO_SAMPLE_FORMAT_S32P = 13, AUDIO_SAMPLE_FORMAT_U32 = 14, AUDIO_SAMPLE_FORMAT_U32P = 15,   AUDIO_SAMPLE_FORMAT_S64 = 16, AUDIO_SAMPLE_FORMAT_S64P = 17, AUDIO_SAMPLE_FORMAT_U64 = 18, AUDIO_SAMPLE_FORMAT_U64P = 19,   AUDIO_SAMPLE_FORMAT_F32 = 20, AUDIO_SAMPLE_FORMAT_F32P = 21, AUDIO_SAMPLE_FORMAT_F64 = 22, AUDIO_SAMPLE_FORMAT_F64P = 23,   AUDIO_SAMPLE_FMT_U8, AUDIO_SAMPLE_FMT_S16, AUDIO_SAMPLE_FMT_S32, AUDIO_SAMPLE_FMT_FLOAT,   AUDIO_SAMPLE_FMT_DOUBLE, AUDIO_SAMPLE_FMT_U8P, AUDIO_SAMPLE_FMT_S16P, AUDIO_SAMPLE_FMT_S32P,   AUDIO_SAMPLE_FMT_FLOATP, AUDIO_SAMPLE_FMT_DOUBLEP, AUDIO_SAMPLE_FMT_INVALID } | 枚举音频采样格式。 | -| [CodecBufferType](codec.md#codecbuffertype) { CODEC_BUFFER_TYPE_INVALID = 0, CODEC_BUFFER_TYPE_VIRTUAL_ADDR = 0x1, CODEC_BUFFER_TYPE_AVSHARE_MEM_FD = 0x2, CODEC_BUFFER_TYPE_HANDLE = 0x4,   CODEC_BUFFER_TYPE_DYNAMIC_HANDLE = 0x8 } | 定义buffer类型。 | -| [ShareMemTypes](codec.md#sharememtypes) { READ_WRITE_TYPE = 0x1, READ_ONLY_TYPE = 0x2 } | 枚举共享内存类型。 | -| [OmxIndexCodecExType](codec.md#omxindexcodecextype) { OMX_IndexExtBufferTypeStartUnused = OMX_IndexKhronosExtensions + 0x00a00000, OMX_IndexParamSupportBufferType, OMX_IndexParamUseBufferType, OMX_IndexParamGetBufferHandleUsage } | 枚举Codec扩展index。 | -| [OmxVideoExType](codec.md#omxvideoextype) { OMX_VIDEO_CodingHEVC = 11 } | 枚举Codec扩展编码类型。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/codec_callback_if_h.md b/zh-cn/device-dev/reference/hdi-apis/codec_callback_if_h.md deleted file mode 100644 index a7939a857bd0ce8d162e7d3a326ac0b60d73d2f7..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/codec_callback_if_h.md +++ /dev/null @@ -1,38 +0,0 @@ -# codec_callback_if.h - - -## **概述** - -主要包括回调函数接口定义。 - -Codec模块事件上报、上报输入buffer和输出buffer处理完毕等接口定义。 - -**Since**: - -3.1 - -**Version**: - -2.0 - -**相关模块:** - -[Codec](codec.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [CodecCallbackType](_codec_callback_type.md) | Codec回调接口定义。 | - - -### 函数 - - | 名称 | 描述 | -| -------- | -------- | -| [CodecCallbackTypeGet](codec.md#codeccallbacktypeget) (struct HdfRemoteService \*remote) | 实例化CodecCallbackType对象。 | -| [CodecCallbackTypeRelease](codec.md#codeccallbacktyperelease) (struct [CodecCallbackType](_codec_callback_type.md) \*instance) | 释放CodecCallbackType对象。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/codec_common_type_h.md b/zh-cn/device-dev/reference/hdi-apis/codec_common_type_h.md deleted file mode 100644 index e603fbceb5d28d40eaee42bc5607b1f7cd6bd0fc..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/codec_common_type_h.md +++ /dev/null @@ -1,41 +0,0 @@ -# codec_common_type.h - - -## **概述** - -Codec模块接口定义中使用的自定义数据类型,包括编解码类型、音视频参数、buffer定义等。 - -**Since**: - -3.1 - -**Version**: - -2.0 - -**相关模块:** - -[Codec](codec.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [Alignment](_alignment.md) | 对齐结构定义,包含宽高的对齐值。 | -| [Rect](_rect.md) | 矩形的定义。 | -| [RangeValue](_range_value.md) | 取值范围的定义。 | - - -### 枚举 - - | 名称 | 描述 | -| -------- | -------- | -| [CodecType](codec.md#codectype) { VIDEO_DECODER, VIDEO_ENCODER, AUDIO_DECODER, AUDIO_ENCODER,   INVALID_TYPE  } | 枚举编解码的类型。 | -| [Profile](codec.md#profile) { INVALID_PROFILE = 0, AAC_LC_PROFILE = 0x1000, AAC_MAIN_PROFILE, AAC_HE_V1_PROFILE,   AAC_HE_V2_PROFILE, AAC_LD_PROFILE, AAC_ELD_PROFILE, AVC_BASELINE_PROFILE = 0x2000,   AVC_MAIN_PROFILE, AVC_HIGH_PROFILE, HEVC_MAIN_PROFILE = 0x3000, HEVC_MAIN_10_PROFILE } | 枚举Codec规格。 | -| [AudioSampleRate](codec.md#audiosamplerate) { AUD_SAMPLE_RATE_8000 = 8000, AUD_SAMPLE_RATE_12000 = 12000, AUD_SAMPLE_RATE_11025 = 11025, AUD_SAMPLE_RATE_16000 = 16000,   AUD_SAMPLE_RATE_22050 = 22050, AUD_SAMPLE_RATE_24000 = 24000, AUD_SAMPLE_RATE_32000 = 32000, AUD_SAMPLE_RATE_44100 = 44100,   AUD_SAMPLE_RATE_48000 = 48000, AUD_SAMPLE_RATE_64000 = 64000, AUD_SAMPLE_RATE_96000 = 96000, AUD_SAMPLE_RATE_INVALID } | 枚举音频采样率。 | -| [CodecCapsMask](codec.md#codeccapsmask) { CODEC_CAP_ADAPTIVE_PLAYBACK = 0x1, CODEC_CAP_SECURE_PLAYBACK = 0x2, CODEC_CAP_TUNNEL_PLAYBACK = 0x4, CODEC_CAP_MULTI_PLANE = 0x10000 } | 枚举播放能力。 | -| [CodecProcessMode](codec.md#codecprocessmode) { PROCESS_BLOCKING_INPUT_BUFFER = 0X1, PROCESS_BLOCKING_OUTPUT_BUFFER = 0X2, PROCESS_BLOCKING_CONTROL_FLOW = 0X4, PROCESS_NONBLOCKING_INPUT_BUFFER = 0X100,   PROCESS_NONBLOCKING_OUTPUT_BUFFER = 0X200, PROCESS_NONBLOCKING_CONTROL_FLOW = 0X400 } | 枚举编解码处理模式。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/codec_component_if_h.md b/zh-cn/device-dev/reference/hdi-apis/codec_component_if_h.md deleted file mode 100644 index 9be7901fd0dd367ba09dc8983ec89b0aab9408d4..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/codec_component_if_h.md +++ /dev/null @@ -1,38 +0,0 @@ -# codec_component_if.h - - -## **概述** - -主要包括Codec组件接口定义。 - -Codec模块提供了获取组件信息、给组件发送命令、组件参数设置、buffer轮转和控制等接口定义。创建组件后,可使用下列接口进行编解码处理。 - -**Since**: - -3.1 - -**Version**: - -2.0 - -**相关模块:** - -[Codec](codec.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [CodecComponentType](_codec_component_type.md) | Codec组件接口定义。 | - - -### 函数 - - | 名称 | 描述 | -| -------- | -------- | -| [CodecComponentTypeGet](codec.md#codeccomponenttypeget) (struct HdfRemoteService \*remote) | 实例化CodecComponentType对象。 | -| [CodecComponentTypeRelease](codec.md#codeccomponenttyperelease) (struct [CodecComponentType](_codec_component_type.md) \*instance) | 释放CodecComponentType对象。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/display__device_8h.md b/zh-cn/device-dev/reference/hdi-apis/display__device_8h.md index d4dbfccb78d814df1741d41ff282bd9f83109253..2f94e64f53136f53e56c65dd9a7f22e771e97e5c 100644 --- a/zh-cn/device-dev/reference/hdi-apis/display__device_8h.md +++ b/zh-cn/device-dev/reference/hdi-apis/display__device_8h.md @@ -1,7 +1,7 @@ # display_device.h -## **概述** +## 概述 显示设备控制接口声明。 @@ -18,28 +18,28 @@ [Display](_display.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [DeviceFuncs](_device_funcs.md) | 显示设备控制接口结构体,定义显示设备控制接口函数指针。 | +| [DeviceFuncs](_device_funcs.md) | struct
显示设备控制接口结构体,定义显示设备控制接口函数指针。 | ### 类型定义 | 名称 | 描述 | | -------- | -------- | -| ([HotPlugCallback](_display.md#hotplugcallback)) (uint32_t devId, bool connected, void \*data) | 热插拔事件回调 | -| ([VBlankCallback](_display.md#vblankcallback)) (unsigned int sequence, uint64_t ns, void \*data) | VBlank 事件回调。 | -| ([RefreshCallback](_display.md#refreshcallback)) (uint32_t devId, void \*data) | 刷新请求回调 | +| (\* [HotPlugCallback](_display.md#hotplugcallback)) (uint32_t devId, bool connected, void \*data) | typedef void \*
热插拔事件回调 | +| (\* [VBlankCallback](_display.md#vblankcallback)) (unsigned int sequence, uint64_t ns, void \*data) | typedef void \*
VBlank 事件回调。 | +| (\* [RefreshCallback](_display.md#refreshcallback)) (uint32_t devId, void \*data) | typedef void \*
刷新请求回调 | ### 函数 | 名称 | 描述 | | -------- | -------- | -| [DeviceInitialize](_display.md#deviceinitialize)(DeviceFuncs \*\*funcs) | 实现显示设备控制接口的初始化,申请操作显示设备控制接口的资源,并获取对应的操作接口。 | -| [DeviceUninitialize](_display.md#deviceuninitialize)(DeviceFuncs \*funcs) | 取消显示设备控制接口的初始化,释放控制接口使用到的资源。 | +| [DeviceInitialize](_display.md#deviceinitialize) ([DeviceFuncs](_device_funcs.md) \*\*funcs) | int32_t
实现显示设备控制接口的初始化,申请操作显示设备控制接口的资源,并获取对应的操作接口。 | +| [DeviceUninitialize](_display.md#deviceuninitialize) ([DeviceFuncs](_device_funcs.md) \*funcs) | int32_t
取消显示设备控制接口的初始化,释放控制接口使用到的资源。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/display__gfx_8h.md b/zh-cn/device-dev/reference/hdi-apis/display__gfx_8h.md index e26796cb53997141fd676af7ccd1051d8ba66784..271ec507f3e44bdba78fff9beb99b8e4999addb0 100644 --- a/zh-cn/device-dev/reference/hdi-apis/display__gfx_8h.md +++ b/zh-cn/device-dev/reference/hdi-apis/display__gfx_8h.md @@ -1,36 +1,32 @@ # display_gfx.h -## **概述** +## 概述 显示硬件加速驱动接口声明。 **Since:** - 1.0 - **Version:** - 1.0 - **相关模块:** [Display](_display.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [GfxFuncs](_gfx_funcs.md) | 显示硬件加速驱动接口结构体,定义硬件加速驱动接口函数指针。 | +| [GfxFuncs](_gfx_funcs.md) | struct
显示硬件加速驱动接口结构体,定义硬件加速驱动接口函数指针。  | ### 函数 | 名称 | 描述 | | -------- | -------- | -| [GfxInitialize](_display.md#gfxinitialize)(GfxFuncs \*\*funcs) | 获取硬件加速相关的操作接口指针。 | -| [GfxUninitialize](_display.md#gfxuninitialize)(GfxFuncs \*funcs) | 释放硬件加速相关的操作接口指针。 | +| [GfxInitialize](_display.md#gfxinitialize) ([GfxFuncs](_gfx_funcs.md) \*\*funcs) | int32_t
获取硬件加速相关的操作接口指针。  | +| [GfxUninitialize](_display.md#gfxuninitialize) ([GfxFuncs](_gfx_funcs.md) \*funcs) | int32_t
释放硬件加速相关的操作接口指针。  | diff --git a/zh-cn/device-dev/reference/hdi-apis/display__gralloc_8h.md b/zh-cn/device-dev/reference/hdi-apis/display__gralloc_8h.md index 5b6ae08c24a3de8b4602cb6c78666012066a656d..ca73590ff984b022250d0458fcaedb7ed7d8d168 100644 --- a/zh-cn/device-dev/reference/hdi-apis/display__gralloc_8h.md +++ b/zh-cn/device-dev/reference/hdi-apis/display__gralloc_8h.md @@ -1,36 +1,32 @@ # display_gralloc.h -## **概述** +## 概述 显示内存驱动接口声明。 **Since:** - 1.0 - **Version:** - 2.0 - **相关模块:** [Display](_display.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [GrallocFuncs](_gralloc_funcs.md) | 显示内存驱动接口结构体,定义显示内存驱动接口函数指针。 | +| [GrallocFuncs](_gralloc_funcs.md) | struct
显示内存驱动接口结构体,定义显示内存驱动接口函数指针。  | ### 函数 | 名称 | 描述 | | -------- | -------- | -| [GrallocInitialize](_display.md#grallocinitialize)(GrallocFuncs \*\*funcs) | 初始化内存模块,并获取内存提供的操作接口。 | -| [GrallocUninitialize](_display.md#grallocuninitialize)(GrallocFuncs \*funcs) | 取消初始化内存模块,并释放内存操作接口指针。 | +| [GrallocInitialize](_display.md#grallocinitialize) ([GrallocFuncs](_gralloc_funcs.md) \*\*funcs) | int32_t
初始化内存模块,并获取内存提供的操作接口。  | +| [GrallocUninitialize](_display.md#grallocuninitialize) ([GrallocFuncs](_gralloc_funcs.md) \*funcs) | int32_t
取消初始化内存模块,并释放内存操作接口指针。  | diff --git a/zh-cn/device-dev/reference/hdi-apis/display__layer_8h.md b/zh-cn/device-dev/reference/hdi-apis/display__layer_8h.md index 4924bc32fa02d6b8140a8bd09a1f12f498d489ce..1aaaf9614a6abece9db6a96494d97120a1fff0ec 100644 --- a/zh-cn/device-dev/reference/hdi-apis/display__layer_8h.md +++ b/zh-cn/device-dev/reference/hdi-apis/display__layer_8h.md @@ -1,36 +1,32 @@ # display_layer.h -## **概述** +## 概述 显示图层驱动接口声明。 **Since:** - 1.0 - **Version:** - 2.0 - **相关模块:** [Display](_display.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [LayerFuncs](_layer_funcs.md) | 显示图层驱动接口结构体,定义显示图层驱动接口函数指针。 | +| [LayerFuncs](_layer_funcs.md) | struct
显示图层驱动接口结构体,定义显示图层驱动接口函数指针。  | ### 函数 | 名称 | 描述 | | -------- | -------- | -| [LayerInitialize](_display.md#layerinitialize)(LayerFuncs \*\*funcs) | 实现图层初始化功能,申请图层使用的资源,并获取图层提供的操作接口。 | -| [LayerUninitialize](_display.md#layeruninitialize)(LayerFuncs \*funcs) | 取消图层初始化功能,释放图层使用到的资源,并释放图层操作接口指针。 | +| [LayerInitialize](_display.md#layerinitialize) ([LayerFuncs](_layer_funcs.md) \*\*funcs) | int32_t
实现图层初始化功能,申请图层使用的资源,并获取图层提供的操作接口。  | +| [LayerUninitialize](_display.md#layeruninitialize) ([LayerFuncs](_layer_funcs.md) \*funcs) | int32_t
取消图层初始化功能,释放图层使用到的资源,并释放图层操作接口指针。  | diff --git a/zh-cn/device-dev/reference/hdi-apis/display__type_8h.md b/zh-cn/device-dev/reference/hdi-apis/display__type_8h.md index bbf2dabaf247dda3f019bb5b8341ee96019e5f2a..43145fe1ee14f89eb6ceeb82de565ceab4d8b425 100644 --- a/zh-cn/device-dev/reference/hdi-apis/display__type_8h.md +++ b/zh-cn/device-dev/reference/hdi-apis/display__type_8h.md @@ -1,7 +1,7 @@ # display_type.h -## **概述** +## 概述 显示类型定义,定义显示驱动接口所使用的数据类型。 @@ -18,63 +18,63 @@ [Display](_display.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [DisplayInfo](_display_info.md) | 定义显示信息结构体。 | -| [LayerInfo](_layer_info.md) | 定义图层信息结构体。 | -| [LayerAlpha](_layer_alpha.md) | 定义图层Alpha信息的结构体。 | -| [BufferData](_buffer_data.md) | 定义一层的缓冲区数据,包括虚拟和物理内存地址。 | -| [LayerBuffer](_layer_buffer.md) | 图层Buffer,用于存放图层数据。 | -| [IRect](_i_rect.md) | 定义矩形信息。 | -| [ISurface](_i_surface.md) | 用于存放窗口相关信息的结构体定义,提供给硬件加速使用,例如图像合成,位图搬移等操作。 | -| [ILine](_i_line.md) | 线条描述结构体定义,用于硬件加速绘制直线。 | -| [ICircle](_i_circle.md) | 圆形描述结构体定义,用于硬件加速绘制圆形。 | -| [Rectangle](_rectangle.md) | 矩形描述结构体定义,用于硬件加速绘制矩形。 | -| [GfxOpt](_gfx_opt.md) | 图像硬件加速相关的操作选项结构体定义,用于图像硬件加速时的操作选项。 | -| [PropertyObject](_property_object.md) | 定义包含名称、属性ID和值的属性对象。 | -| [DisplayCapability](_display_capability.md) | 定义输出性能。 | -| [DisplayModeInfo](_display_mode_info.md) | 定义输出模式信息。 | -| [AllocInfo](_alloc_info.md) | 定义关于要分配的内存的信息。 | -| [HDRCapability](_h_d_r_capability.md) | HDR属性结构体定义。 | -| [HDRMetaData](_h_d_r_meta_data.md) | HDR元数据结构体定义。 | -| [VerifyAllocInfo](_verify_alloc_info.md) | 用于验证内存分配信息的结构体定义。 | -| [PresentTimestamp](_present_timestamp.md) | 上屏时间戳结构体定义。 | -| [ExtDataHandle](_ext_data_handle.md) | 扩展数据句柄结构体定义。 | -| [YUVDescInfo](_yun_desc_info_.md) | YUV描述信息结构体定义。 | +| [DisplayInfo](_display_info.md) | struct
定义显示信息结构体 | +| [ExtDataHandle](_ex_data_handle.md) | struct
扩展数据句柄结构体定义。 | +| [LayerInfo](_layer_info.md) | struct
定义图层信息结构体 | +| [LayerAlpha](_layer_alpha.md) | struct
定义图层Alpha信息的结构体 | +| [BufferData](_buffer_data.md) | struct
定义一层的缓冲区数据,包括虚拟和物理内存地址。 | +| [LayerBuffer](_layer_buffer.md) | struct
图层Buffer,用于存放图层数据。 | +| [IRect](_i_rect.md) | struct
定义矩形信息 | +| [ISurface](_i_surface.md) | struct
用于存放窗口相关信息的结构体定义,提供给硬件加速使用,例如图像合成,位图搬移等操作。 | +| [ILine](_i_line.md) | struct
线条描述结构体定义,用于硬件加速绘制直线。 | +| [ICircle](_i_circle.md) | struct
圆形描述结构体定义,用于硬件加速绘制圆形。 | +| [Rectangle](_rectangle.md) | struct
矩形描述结构体定义,用于硬件加速绘制矩形, | +| [GfxOpt](_gfx_opt.md) | struct
图像硬件加速相关的操作选项结构体定义,用于图像硬件加速时的操作选项。 | +| [PropertyObject](_property_object.md) | struct
定义包含名称、属性ID和值的属性对象。 | +| [DisplayCapability](_display_capability.md) | struct
定义输出性能。 | +| [DisplayModeInfo](_display_mode_info.md) | struct
定义输出模式信息。 | +| [AllocInfo](_alloc_info.md) | struct
定义关于要分配的内存的信息。 | +| [HDRCapability](_h_d_r_capability.md) | struct
HDR属性结构体定义 | +| [HDRMetaData](_h_d_r_meta_data.md) | struct
HDR元数据结构体定义 | +| [VerifyAllocInfo](_verify_alloc_info.md) | struct
用于验证内存分配信息的结构体定义 | +| [PresentTimestamp](_present_timestamp.md) | struct
上屏时间戳结构体定义 | +| [YUVDescInfo](_yuv_desc_info.md) | struct
扩展数据句柄结构体定义 | ### 宏定义 | 名称 | 描述 | | -------- | -------- | -| [PROPERTY_NAME_LEN](_display.md#property_name_len)  50 | 属性名字长度。 | +| [PROPERTY_NAME_LEN](_display.md#property_name_len)   50 | 属性名字长度。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [DispErrCode](_display.md#disperrcode){ DISPLAY_SUCCESS = 0, DISPLAY_FAILURE = -1, DISPLAY_FD_ERR = -2, DISPLAY_PARAM_ERR = -3,   DISPLAY_NULL_PTR = -4, DISPLAY_NOT_SUPPORT = -5, DISPLAY_NOMEM = -6, DISPLAY_SYS_BUSY = -7,   DISPLAY_NOT_PERM = -8 } | 返回值类型定义。 | -| [LayerType](_display.md#layertype){ LAYER_TYPE_GRAPHIC, LAYER_TYPE_OVERLAY, LAYER_TYPE_SDIEBAND, LAYER_TYPE_CURSOR,   LAYER_TYPE_BUTT } | 图层类型定义。 | +| [DispErrCode](_display.md#disperrcode) { DISPLAY_SUCCESS = 0, DISPLAY_FAILURE = -1, DISPLAY_FD_ERR = -2, DISPLAY_PARAM_ERR = -3,   DISPLAY_NULL_PTR = -4, DISPLAY_NOT_SUPPORT = -5, DISPLAY_NOMEM = -6, DISPLAY_SYS_BUSY = -7,   DISPLAY_NOT_PERM = -8 } | 返回值类型定义。 | +| [LayerType](_display.md#layertype) { LAYER_TYPE_GRAPHIC, LAYER_TYPE_OVERLAY, LAYER_TYPE_SDIEBAND, LAYER_TYPE_CURSOR, LAYER_TYPE_BUTT } | 图层类型定义。 | | { HBM_USE_CPU_READ = (1 << 0), HBM_USE_CPU_WRITE = (1 << 1), HBM_USE_MEM_MMZ = (1 << 2), HBM_USE_MEM_DMA = (1 << 3),   HBM_USE_MEM_SHARE = (1 << 4), HBM_USE_MEM_MMZ_CACHE = (1 << 5), HBM_USE_MEM_FB = (1 << 6), HBM_USE_ASSIGN_SIZE = (1 << 7) } | 定义缓冲区使用。 | -| [PixelFormat](_display.md#pixelformat){ PIXEL_FMT_CLUT8 = 0, PIXEL_FMT_CLUT1, PIXEL_FMT_CLUT4, PIXEL_FMT_RGB_565,   PIXEL_FMT_RGBA_5658, PIXEL_FMT_RGBX_4444, PIXEL_FMT_RGBA_4444, PIXEL_FMT_RGB_444,   PIXEL_FMT_RGBX_5551, PIXEL_FMT_RGBA_5551, PIXEL_FMT_RGB_555, PIXEL_FMT_RGBX_8888,   PIXEL_FMT_RGBA_8888, PIXEL_FMT_RGB_888, PIXEL_FMT_BGR_565, PIXEL_FMT_BGRX_4444,   PIXEL_FMT_BGRA_4444, PIXEL_FMT_BGRX_5551, PIXEL_FMT_BGRA_5551, PIXEL_FMT_BGRX_8888,   PIXEL_FMT_BGRA_8888, PIXEL_FMT_YUV_422_I, PIXEL_FMT_YCBCR_422_SP, PIXEL_FMT_YCRCB_422_SP,   PIXEL_FMT_YCBCR_420_SP, PIXEL_FMT_YCRCB_420_SP, PIXEL_FMT_YCBCR_422_P, PIXEL_FMT_YCRCB_422_P,   PIXEL_FMT_YCBCR_420_P, PIXEL_FMT_YCRCB_420_P, PIXEL_FMT_YUYV_422_PKG, PIXEL_FMT_UYVY_422_PKG,   PIXEL_FMT_YVYU_422_PKG, PIXEL_FMT_VYUY_422_PKG, PIXEL_FMT_VENDER_MASK = 0X7FFF0000, PIXEL_FMT_BUTT = 0X7FFFFFFF } | 像素格式类型定义。 | -| [TransformType](_display.md#transformtype){ ROTATE_NONE = 0, ROTATE_90, ROTATE_180, ROTATE_270,   ROTATE_BUTT } | 图层变换类型定义。 | -| [BlendType](_display.md#blendtype){ BLEND_NONE = 0, BLEND_CLEAR, BLEND_SRC, BLEND_SRCOVER,   BLEND_DSTOVER, BLEND_SRCIN, BLEND_DSTIN, BLEND_SRCOUT,   BLEND_DSTOUT, BLEND_SRCATOP, BLEND_DSTATOP, BLEND_ADD,   BLEND_XOR, BLEND_DST, BLEND_AKS, BLEND_AKD,   BLEND_BUTT } | 支持的图像混合类型。 | -| [RopType](_display.md#roptype){ ROP_BLACK = 0, ROP_NOTMERGEPEN, ROP_MASKNOTPEN, ROP_NOTCOPYPEN,   ROP_MASKPENNOT, ROP_NOT, ROP_XORPEN, ROP_NOTMASKPEN,   ROP_MASKPEN, ROP_NOTXORPEN, ROP_NOP, ROP_MERGENOTPEN,   ROP_COPYPE, ROP_MERGEPENNOT, ROP_MERGEPEN, ROP_WHITE,   ROP_BUTT } | 硬件加速支持的ROP操作类型。 | +| [PixelFormat](_display.md#pixelformat) { PIXEL_FMT_CLUT8 = 0, PIXEL_FMT_CLUT1, PIXEL_FMT_CLUT4, PIXEL_FMT_RGB_565,   PIXEL_FMT_RGBA_5658, PIXEL_FMT_RGBX_4444, PIXEL_FMT_RGBA_4444, PIXEL_FMT_RGB_444,   PIXEL_FMT_RGBX_5551, PIXEL_FMT_RGBA_5551, PIXEL_FMT_RGB_555, PIXEL_FMT_RGBX_8888,   PIXEL_FMT_RGBA_8888, PIXEL_FMT_RGB_888, PIXEL_FMT_BGR_565, PIXEL_FMT_BGRX_4444,   PIXEL_FMT_BGRA_4444, PIXEL_FMT_BGRX_5551, PIXEL_FMT_BGRA_5551, PIXEL_FMT_BGRX_8888,   PIXEL_FMT_BGRA_8888, PIXEL_FMT_YUV_422_I, PIXEL_FMT_YCBCR_422_SP, PIXEL_FMT_YCRCB_422_SP,   PIXEL_FMT_YCBCR_420_SP, PIXEL_FMT_YCRCB_420_SP, PIXEL_FMT_YCBCR_422_P, PIXEL_FMT_YCRCB_422_P,   PIXEL_FMT_YCBCR_420_P, PIXEL_FMT_YCRCB_420_P, PIXEL_FMT_YUYV_422_PKG, PIXEL_FMT_UYVY_422_PKG,   PIXEL_FMT_YVYU_422_PKG, PIXEL_FMT_VYUY_422_PKG, PIXEL_FMT_VENDER_MASK = 0X7FFF0000, PIXEL_FMT_BUTT = 0X7FFFFFFF } | 像素格式类型定义。 | +| [TransformType](_display.md#transformtype) { ROTATE_NONE = 0, ROTATE_90, ROTATE_180, ROTATE_270, ROTATE_BUTT } | 图层变换类型定义。 | +| [BlendType](_display.md#blendtype) { BLEND_NONE = 0, BLEND_CLEAR, BLEND_SRC, BLEND_SRCOVER,   BLEND_DSTOVER, BLEND_SRCIN, BLEND_DSTIN, BLEND_SRCOUT,   BLEND_DSTOUT, BLEND_SRCATOP, BLEND_DSTATOP, BLEND_ADD,   BLEND_XOR, BLEND_DST, BLEND_AKS, BLEND_AKD,   BLEND_BUTT } | 支持的图像混合类型。 | +| [RopType](_display.md#roptype) { ROP_BLACK = 0, ROP_NOTMERGEPEN, ROP_MASKNOTPEN, ROP_NOTCOPYPEN,   ROP_MASKPENNOT, ROP_NOT, ROP_XORPEN, ROP_NOTMASKPEN,   ROP_MASKPEN, ROP_NOTXORPEN, ROP_NOP, ROP_MERGENOTPEN,   ROP_COPYPE, ROP_MERGEPENNOT, ROP_MERGEPEN, ROP_WHITE,   ROP_BUTT } | 硬件加速支持的ROP操作类型。 | | [ColorKey](_display.md#colorkey) { CKEY_NONE = 0, CKEY_SRC, CKEY_DST, CKEY_BUTT } | Color key操作类型定义,即硬件加速支持的Color key操作类型。 | -| [MirrorType](_display.md#mirrortype){ MIRROR_NONE = 0, MIRROR_LR, MIRROR_TB, MIRROR_BUTT } | 硬件加速支持的镜像操作类型定义。 | -| [Connection](_display.md#connection){ CON_INVALID = 0, CONNECTED, DISCONNECTED } | 热插拔连接类型定义。 | -| [InterfaceType](_display.md#interfacetype){ DISP_INTF_HDMI = 0, DISP_INTF_LCD, DISP_INTF_BT1120, DISP_INTF_BT656,   DISP_INTF_YPBPR, DISP_INTF_RGB, DISP_INTF_CVBS, DISP_INTF_SVIDEO,   DISP_INTF_VGA, DISP_INTF_MIPI, DISP_INTF_PANEL, DISP_INTF_BUTT } | 枚举接口类型。 | -| [DispPowerStatus](_display.md#disppowerstatus){ POWER_STATUS_ON, POWER_STATUS_STANDBY, POWER_STATUS_SUSPEND, POWER_STATUS_OFF,   POWER_STATUS_BUTT } | 枚举显示状态。 | -| [CompositionType](_display.md#compositiontype){ COMPOSITION_CLIENT, COMPOSITION_DEVICE, COMPOSITION_CURSOR, COMPOSITION_VIDEO,   COMPOSITION_DEVICE_CLEAR, COMPOSITION_CLIENT_CLEAR, COMPOSITION_TUNNEL, COMPOSITION_BUTT } | 枚举特殊层的组合类型。 | -| [ColorGamut](_display.md#colorgamut){ COLOR_GAMUT_INVALID = -1, COLOR_GAMUT_NATIVE = 0, COLOR_GAMUT_SATNDARD_BT601 = 1, COLOR_GAMUT_STANDARD_BT709 = 2,   COLOR_GAMUT_DCI_P3 = 3, COLOR_GAMUT_SRGB = 4, COLOR_GAMUT_ADOBE_RGB = 5, COLOR_GAMUT_DISPLAY_P3 = 6,   COLOR_GAMUT_BT2020 = 7, COLOR_GAMUT_BT2100_PQ = 8, COLOR_GAMUT_BT2100_HLG = 9, COLOR_GAMUT_DISPLAY_BT2020 = 10 } | 色域类型枚举值。 | -| [GamutMap](_display.md#gamutmap){ GAMUT_MAP_CONSTANT = 0, GAMUT_MAP_EXPANSION = 1, GAMUT_MAP_HDR_CONSTANT = 2, GAMUT_MAP_HDR_EXPANSION = 3 } | 枚举色域的映射类型。 | -| [ColorDataSpace](_display.md#colordataspace){  COLOR_DATA_SPACE_UNKNOWN = 0, GAMUT_BT601 = 0x00000001, GAMUT_BT709 = 0x00000002, GAMUT_DCI_P3 = 0x00000003,   GAMUT_SRGB = 0x00000004, GAMUT_ADOBE_RGB = 0x00000005, GAMUT_DISPLAY_P3 = 0x00000006, GAMUT_BT2020 = 0x00000007,   GAMUT_BT2100_PQ = 0x00000008, GAMUT_BT2100_HLG = 0x00000009, GAMUT_DISPLAY_BT2020 = 0x0000000a, TRANSFORM_FUNC_UNSPECIFIED = 0x00000100,   TRANSFORM_FUNC_LINEAR = 0x00000200, TRANSFORM_FUNC_SRGB = 0x00000300, TRANSFORM_FUNC_SMPTE_170M = 0x00000400, TRANSFORM_FUNC_GM2_2 = 0x00000500,   TRANSFORM_FUNC_GM2_6 = 0x00000600, TRANSFORM_FUNC_GM2_8 = 0x00000700, TRANSFORM_FUNC_ST2084 = 0x00000800, TRANSFORM_FUNC_HLG = 0x00000900,   PRECISION_UNSPECIFIED = 0x00010000, PRECISION_FULL = 0x00020000, PRESION_LIMITED = 0x00030000, PRESION_EXTENDED = 0x00040000,   BT601_SMPTE170M_FULL = GAMUT_BT601 \| TRANSFORM_FUNC_SMPTE_170M \| PRECISION_FULL, BT601_SMPTE170M_LIMITED = GAMUT_BT601 \| TRANSFORM_FUNC_SMPTE_170M \| PRESION_LIMITED, BT709_LINEAR_FULL = GAMUT_BT709 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL, BT709_LINEAR_EXTENDED = GAMUT_BT709 \| TRANSFORM_FUNC_LINEAR \| PRESION_EXTENDED,   BT709_SRGB_FULL = GAMUT_BT709 \| TRANSFORM_FUNC_SRGB \| PRECISION_FULL, BT709_SRGB_EXTENDED = GAMUT_BT709 \| TRANSFORM_FUNC_SRGB \| PRESION_EXTENDED, BT709_SMPTE170M_LIMITED = GAMUT_BT709 \| TRANSFORM_FUNC_SMPTE_170M \| PRESION_LIMITED, DCI_P3_LINEAR_FULL = GAMUT_DCI_P3 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL,   DCI_P3_GAMMA26_FULL = GAMUT_DCI_P3 \| TRANSFORM_FUNC_GM2_6 \| PRECISION_FULL, DISPLAY_P3_LINEAR_FULL = GAMUT_DISPLAY_P3 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL, DCI_P3_SRGB_FULL = GAMUT_DCI_P3 \| TRANSFORM_FUNC_SRGB \| PRECISION_FULL, ADOBE_RGB_GAMMA22_FULL = GAMUT_ADOBE_RGB \| TRANSFORM_FUNC_GM2_2 \| PRECISION_FULL,   BT2020_LINEAR_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL, BT2020_SRGB_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_SRGB \| PRECISION_FULL, BT2020_SMPTE170M_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_SMPTE_170M \| PRECISION_FULL, BT2020_ST2084_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_ST2084 \| PRECISION_FULL,   BT2020_HLG_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_HLG \| PRECISION_FULL, BT2020_ST2084_LIMITED = GAMUT_BT2020 \| TRANSFORM_FUNC_ST2084 \| PRESION_LIMITED } | 枚举颜色空间的类型。 | -| [HDRFormat](_display.md#hdrformat){ NOT_SUPPORT_HDR = 0, DOLBY_VISION = 1, HDR10 = 2, HLG = 3,   HDR10_PLUS = 4, HDR_VIVID = 5 } | 枚举HDR格式。 | -| [HDRMetadataKey](_display.md#hdrmetadatakey){  MATAKEY_RED_PRIMARY_X = 0, MATAKEY_RED_PRIMARY_Y = 1, MATAKEY_GREEN_PRIMARY_X = 2, MATAKEY_GREEN_PRIMARY_Y = 3,   MATAKEY_BLUE_PRIMARY_X = 4, MATAKEY_BLUE_PRIMARY_Y = 5, MATAKEY_WHITE_PRIMARY_X = 6, MATAKEY_WHITE_PRIMARY_Y = 7,   MATAKEY_MAX_LUMINANCE = 8, MATAKEY_MIN_LUMINANCE = 9, MATAKEY_MAX_CONTENT_LIGHT_LEVEL = 10, MATAKEY_MAX_FRAME_AVERAGE_LIGHT_LEVEL = 11,   MATAKEY_HDR10_PLUS = 12, MATAKEY_HDR_VIVID = 13 } | 枚举HDR元数据关键字。 | -| [PresentTimestampType](_display.md#presenttimestamptype){ HARDWARE_DISPLAY_PTS_UNSUPPORTED = 0, HARDWARE_DISPLAY_PTS_DELAY = 1 << 0, HARDWARE_DISPLAY_PTS_TIMESTAMP = 1 << 1 } | 上屏时间戳类型枚举值。 | +| [MirrorType](_display.md#mirrortype) { MIRROR_NONE = 0, MIRROR_LR, MIRROR_TB, MIRROR_BUTT } | 硬件加速支持的镜像操作类型定义 | +| [Connection](_display.md#connection) { CON_INVALID = 0, CONNECTED, DISCONNECTED } | 热插拔连接类型定义 | +| [InterfaceType](_display.md#interfacetype) { DISP_INTF_HDMI = 0, DISP_INTF_LCD, DISP_INTF_BT1120, DISP_INTF_BT656,   DISP_INTF_YPBPR, DISP_INTF_RGB, DISP_INTF_CVBS, DISP_INTF_SVIDEO,   DISP_INTF_VGA, DISP_INTF_MIPI, DISP_INTF_PANEL, DISP_INTF_BUTT } | 枚举接口类型。 | +| [DispPowerStatus](_display.md#disppowerstatus) { POWER_STATUS_ON, POWER_STATUS_STANDBY, POWER_STATUS_SUSPEND, POWER_STATUS_OFF,   POWER_STATUS_BUTT } | 枚举显示状态 | +| [CompositionType](_display.md#compositiontype) { COMPOSITION_CLIENT, COMPOSITION_DEVICE, COMPOSITION_CURSOR, COMPOSITION_VIDEO,   COMPOSITION_DEVICE_CLEAR, COMPOSITION_CLIENT_CLEAR, COMPOSITION_TUNNEL, COMPOSITION_BUTT } | 枚举特殊层的组合类型。 | +| [ColorGamut](_display.md#colorgamut) { COLOR_GAMUT_INVALID = -1, COLOR_GAMUT_NATIVE = 0, COLOR_GAMUT_SATNDARD_BT601 = 1, COLOR_GAMUT_STANDARD_BT709 = 2,   COLOR_GAMUT_DCI_P3 = 3, COLOR_GAMUT_SRGB = 4, COLOR_GAMUT_ADOBE_RGB = 5, COLOR_GAMUT_DISPLAY_P3 = 6,   COLOR_GAMUT_BT2020 = 7, COLOR_GAMUT_BT2100_PQ = 8, COLOR_GAMUT_BT2100_HLG = 9, COLOR_GAMUT_DISPLAY_BT2020 = 10 } | 色域类型枚举值 | +| [GamutMap](_display.md#gamutmap) { GAMUT_MAP_CONSTANT = 0, GAMUT_MAP_EXPANSION = 1, GAMUT_MAP_HDR_CONSTANT = 2, GAMUT_MAP_HDR_EXPANSION = 3 } | 枚举色域的映射类型 | +| [ColorDataSpace](_display.md#colordataspace) { COLOR_DATA_SPACE_UNKNOWN = 0, GAMUT_BT601 = 0x00000001, GAMUT_BT709 = 0x00000002, GAMUT_DCI_P3 = 0x00000003,   GAMUT_SRGB = 0x00000004, GAMUT_ADOBE_RGB = 0x00000005, GAMUT_DISPLAY_P3 = 0x00000006, GAMUT_BT2020 = 0x00000007,   GAMUT_BT2100_PQ = 0x00000008, GAMUT_BT2100_HLG = 0x00000009, GAMUT_DISPLAY_BT2020 = 0x0000000a, TRANSFORM_FUNC_UNSPECIFIED = 0x00000100,   TRANSFORM_FUNC_LINEAR = 0x00000200, TRANSFORM_FUNC_SRGB = 0x00000300, TRANSFORM_FUNC_SMPTE_170M = 0x00000400, TRANSFORM_FUNC_GM2_2 = 0x00000500,   TRANSFORM_FUNC_GM2_6 = 0x00000600, TRANSFORM_FUNC_GM2_8 = 0x00000700, TRANSFORM_FUNC_ST2084 = 0x00000800, TRANSFORM_FUNC_HLG = 0x00000900,   PRECISION_UNSPECIFIED = 0x00010000, PRECISION_FULL = 0x00020000, PRESION_LIMITED = 0x00030000, PRESION_EXTENDED = 0x00040000,   BT601_SMPTE170M_FULL = GAMUT_BT601 \| TRANSFORM_FUNC_SMPTE_170M \| PRECISION_FULL, BT601_SMPTE170M_LIMITED = GAMUT_BT601 \| TRANSFORM_FUNC_SMPTE_170M \| PRESION_LIMITED, BT709_LINEAR_FULL = GAMUT_BT709 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL, BT709_LINEAR_EXTENDED = GAMUT_BT709 \| TRANSFORM_FUNC_LINEAR \| PRESION_EXTENDED,   BT709_SRGB_FULL = GAMUT_BT709 \| TRANSFORM_FUNC_SRGB \| PRECISION_FULL, BT709_SRGB_EXTENDED = GAMUT_BT709 \| TRANSFORM_FUNC_SRGB \| PRESION_EXTENDED, BT709_SMPTE170M_LIMITED = GAMUT_BT709 \| TRANSFORM_FUNC_SMPTE_170M \| PRESION_LIMITED, DCI_P3_LINEAR_FULL = GAMUT_DCI_P3 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL,   DCI_P3_GAMMA26_FULL = GAMUT_DCI_P3 \| TRANSFORM_FUNC_GM2_6 \| PRECISION_FULL, DISPLAY_P3_LINEAR_FULL = GAMUT_DISPLAY_P3 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL, DCI_P3_SRGB_FULL = GAMUT_DCI_P3 \| TRANSFORM_FUNC_SRGB \| PRECISION_FULL, ADOBE_RGB_GAMMA22_FULL = GAMUT_ADOBE_RGB \| TRANSFORM_FUNC_GM2_2 \| PRECISION_FULL,   BT2020_LINEAR_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_LINEAR \| PRECISION_FULL, BT2020_SRGB_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_SRGB \| PRECISION_FULL, BT2020_SMPTE170M_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_SMPTE_170M \| PRECISION_FULL, BT2020_ST2084_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_ST2084 \| PRECISION_FULL,   BT2020_HLG_FULL = GAMUT_BT2020 \| TRANSFORM_FUNC_HLG \| PRECISION_FULL, BT2020_ST2084_LIMITED = GAMUT_BT2020 \| TRANSFORM_FUNC_ST2084 \| PRESION_LIMITED } | 枚举颜色空间的类型 | +| [HDRFormat](_display.md#hdrformat) { NOT_SUPPORT_HDR = 0, DOLBY_VISION = 1, HDR10 = 2, HLG = 3,   HDR10_PLUS = 4, HDR_VIVID = 5 } | 枚举HDR格式 | +| [HDRMetadataKey](_display.md#hdrmetadatakey) { MATAKEY_RED_PRIMARY_X = 0, MATAKEY_RED_PRIMARY_Y = 1, MATAKEY_GREEN_PRIMARY_X = 2, MATAKEY_GREEN_PRIMARY_Y = 3,   MATAKEY_BLUE_PRIMARY_X = 4, MATAKEY_BLUE_PRIMARY_Y = 5, MATAKEY_WHITE_PRIMARY_X = 6, MATAKEY_WHITE_PRIMARY_Y = 7,   MATAKEY_MAX_LUMINANCE = 8, MATAKEY_MIN_LUMINANCE = 9, MATAKEY_MAX_CONTENT_LIGHT_LEVEL = 10, MATAKEY_MAX_FRAME_AVERAGE_LIGHT_LEVEL = 11,   MATAKEY_HDR10_PLUS = 12, MATAKEY_HDR_VIVID = 13 } | 枚举HDR元数据关键字 | +| [PresentTimestampType](_display.md#presenttimestamptype) { HARDWARE_DISPLAY_PTS_UNSUPPORTED = 0, HARDWARE_DISPLAY_PTS_DELAY = 1 << 0, HARDWARE_DISPLAY_PTS_TIMESTAMP = 1 << 1 } | 上屏时间戳类型枚举值 | diff --git a/zh-cn/device-dev/reference/hdi-apis/display__vgu_8h.md b/zh-cn/device-dev/reference/hdi-apis/display__vgu_8h.md index 46da91de2d965b8b6655f1a9fb1362f71e31503d..fc2471552cff45825ccb66cc434eda3288441c3d 100644 --- a/zh-cn/device-dev/reference/hdi-apis/display__vgu_8h.md +++ b/zh-cn/device-dev/reference/hdi-apis/display__vgu_8h.md @@ -1,9 +1,9 @@ # display_vgu.h -## **概述** +## 概述 -定义2D矢量硬件加速模块相关驱动函数。 +该文件定义2D矢量硬件加速模块相关驱动函数。 **Since:** @@ -14,86 +14,86 @@ [Display](_display.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [VGUPoint](_v_g_u_point.md) | 坐标点对象。 | -| [VGURect](_v_g_u_rect.md) | 矩形对象。 | -| [VGUPath](_v_g_u_path.md) | 路径对象,存放路径命令和坐标数据。 | -| [VGUMatrix3](_v_g_u_matrix3.md) | 变换矩阵。 | -| [VGUBuffer](_v_g_u_buffer.md) | 硬件加速渲染位图缓存。 | -| [VGUMaskLayer](_v_g_u_mask_layer.md) | 定义蒙版图层。 | -| [VGUSurface](_v_g_u_surface.md) | 2D硬件加速绘制目标表面。 | -| [VGUColorStop](_v_g_u_color_stop.md) | 渐变颜色分布位置。 | -| [VGULinear](_v_g_u_linear.md) | 线性渐变。 | -| [VGURadial](_v_g_u_radial.md) | 辐射渐变。 | -| [VGUConic](_v_g_u_conic.md) | 圆锥渐变。 | -| [VGUImage](_v_g_u_image.md) | 图像对象。 | -| [VGUPattern](_v_g_u_pattern.md) | 图片模式对象。 | -| [VGUGradient](_v_g_u_gradient.md) | 渐变对象。 | -| [VGUSolid](_v_g_u_solid.md) | 颜色对象。 | -| [VGUPaintStyle](_v_g_u_paint_style.md) | 填充或描边路径的渲染风格。 | -| [VGUFillAttr](_v_g_u_fill_attr.md) | 填充路径的属性。 | -| [VGUStrokeAttr](_v_g_u_stroke_attr.md) | 描边路径的属性。 | -| [VGUFuncs](_v_g_u_funcs.md) | 定义2D硬件加速驱动函数。 | +| [VGUPoint](_v_g_u_point.md) | struct
坐标点对象。 | +| [VGURect](_v_g_u_rect.md) | struct
矩形对象。 | +| [VGUPath](_v_g_u_path.md) | struct
路径对象,存放路径命令和坐标数据。 | +| [VGUMatrix3](_v_g_u_matrix3.md) | struct
变换矩阵。 | +| [VGUBuffer](_v_g_u_buffer.md) | struct
硬件加速渲染位图缓存。 | +| [VGUMaskLayer](_v_g_u_mask_layer.md) | struct
定义蒙版图层。 | +| [VGUSurface](_v_g_u_surface.md) | struct
2D硬件加速绘制目标表面。 | +| [VGUColorStop](_v_g_u_color_stop.md) | struct
渐变颜色分布位置。 | +| [VGULinear](_v_g_u_linear.md) | struct
线性渐变。 | +| [VGURadial](_v_g_u_radial.md) | struct
辐射渐变。 | +| [VGUConic](_v_g_u_conic.md) | struct
圆锥渐变。 | +| [VGUImage](_v_g_u_image.md) | struct
图像对象。 | +| [VGUPattern](_v_g_u_pattern.md) | struct
图片模式对象。 | +| [VGUGradient](_v_g_u_gradient.md) | struct
渐变对象。 | +| [VGUSolid](_v_g_u_solid.md) | struct
颜色对象 | +| [VGUPaintStyle](_v_g_u_paint_style.md) | struct
填充或描边路径的渲染风格。 | +| [VGUFillAttr](_v_g_u_fill_attr.md) | struct
填充路径的属性。 | +| [VGUStrokeAttr](_v_g_u_stroke_attr.md) | struct
描边路径的属性。 | +| [VGUFuncs](_v_g_u_funcs.md) | struct
定义2D硬件加速驱动函数。 | ### 宏定义 | 名称 | 描述 | | -------- | -------- | -| HDI_VGU_SCALAR_IS_FLOAT   1 | VGU标量是否为浮点型 | +| [HDI_VGU_SCALAR_IS_FLOAT](_display.md#hdi_vgu_scalar_is_float)   1 | VGU标量是否为浮点型。 | ### 类型定义 | 名称 | 描述 | | -------- | -------- | -| [VGUScalar](_display.md#vguscalar) | VGU标量 | -| [VGUPixelFormat](_display.md#vgupixelformat) | 像素格式。 | -| [VGUBlendType](_display.md#vgublendtype) | 混合操作类型。 | +| [VGUScalar](_display.md#vguscalar) | typedef float
VGU标量 | +| [VGUPixelFormat](_display.md#vgupixelformat) | typedef [PixelFormat](_display.md#pixelformat)
像素格式 | +| [VGUBlendType](_display.md#vgublendtype) | typedef [BlendType](_display.md#blendtype)
混合操作类型 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [VGUPathDataType](_display.md#vgupathdatatype){ VGU_DATA_TYPE_S16 = 0, VGU_DATA_TYPE_S32, VGU_DATA_TYPE_F32 } | 路径坐标数据类型。 | -| [VGUCapability](_display.md#vgucapability){ VGU_CAP_BLIT = (1 << 0), VGU_CAP_BLIT_NUM = (1 << 1), VGU_CAP_PATH = (1 << 2), VGU_CAP_FILTER_BLUR = (1 << 3) } | 硬件加速能力。 | -| [VGUResult](_display.md#vguresult){   VGU_SUCCESS = 0, VGU_NO_SUPPORT = -1, VGU_OPERATION_FAILED = -2, VGU_OUT_OF_MEMORY = -3,   VGU_TIMEOUT = -4, VGU_INVALID_PARAMETER = -5, VGU_BUSY = -6, VGU_NO_CONTEXT = -7 } | 错误码定义。 | -| [VGULineCap](_display.md#vgulinecap){ VGU_LINECAP_BUTT = 0, VGU_LINECAP_ROUND, VGU_LINECAP_SQUARE } | 线帽。 | -| [VGUJointType](_display.md#vgujointtype){ VGU_LINE_JOIN_MITER = 0, VGU_LINE_JOIN_ROUND, VGU_LINE_JOIN_BEVEL, VGU_LINE_JOIN_BUTT } | 联接类型。 | -| [VGUFilter](_display.md#vgufilter){ VGU_FILTER_BILINEAR = 0, VGU_FILTER_NEAREST, VGU_FILTER_LINEAR, VGU_FILTER_BUTT } | 图像滤波类型。 | -| [VGUFillRule](_display.md#vgufillrule){ VGU_RULE_WINDING = 0, VGU_RULE_EVEN_ODD, VGU_RULE_BUTT } | 填充规则定义。 | -| [VGUFillSpread](_display.md#vgufillspread){ VGU_SPREAD_PAD = 0, VGU_SPREAD_REFLECT, VGU_SPREAD_REPEAT, VGU_SPREAD_BUTT } | 渐变填充区域外的延展类型。 | -| [VGUWrapType](_display.md#vguwraptype){ VGU_WRAP_REFLECT = 0, VGU_WRAP_REPEAT, VGU_WRAP_BUTT } | 图像模式填充延展类型。 | -| [VGUPathCmd](_display.md#vgupathcmd){   VGU_PATH_CMD_CLOSE = 0, VGU_PATH_CMD_MOVE, VGU_PATH_CMD_LINE, VGU_PATH_CMD_HLINE,   VGU_PATH_CMD_VLINE, VGU_PATH_CMD_QUAD, VGU_PATH_CMD_CUBIC, VGU_PATH_CMD_SQUAD,   VGU_PATH_CMD_SCUBIC, VGU_PATH_CMD_BUTT } | 路径绘制指令类型。 | -| [VGUTransformType](_display.md#vgutransformtype){ VGU_TRANSFORM_TRANSLATE = (1 << 0), VGU_TRANSFORM_SCALE = (1 << 1), VGU_TRANSFORM_ROTATE_90 = (1 << 2), VGU_TRANSFORM_ROTATE_180 = (1 << 3),   VGU_TRANSFORM_ROTATE_270 = (1 << 4), VGU_TRANSFORM_OTHER = (1 << 16) } | 变换类型。 | -| [VGUClipType](_display.md#vgucliptype){ VGU_CLIP_RECT = 0, VGU_CLIP_PATH, VGU_CLIP_BUTT } | 绘制表面剪切类型。 | -| [VGUGradientType](_display.md#vgugradienttype){ VGU_GRADIENT_LINEAR = 0, VGU_GRADIENT_RADIAL, VGU_GRADIENT_CONIC, VGU_GRADIENT_BUTT } | 渐变类型。 | -| [VGUPaintType](_display.md#vgupainttype){ VGU_PAINT_SOLID = 0, VGU_PAINT_GRADIENT, VGU_PAINT_PATTERN, VGU_PAINT_BUTT } | 渲染对象。 | +| [VGUPathDataType](_display.md#vgupathdatatype) { VGU_DATA_TYPE_S16 = 0, VGU_DATA_TYPE_S32, VGU_DATA_TYPE_F32 } | 路径坐标数据类型。 | +| [VGUCapability](_display.md#vgucapability) { VGU_CAP_BLIT = (1 << 0), VGU_CAP_BLIT_NUM = (1 << 1), VGU_CAP_PATH = (1 << 2), VGU_CAP_FILTER_BLUR = (1 << 3) } | 硬件加速能力。 | +| [VGUResult](_display.md#vguresult) { VGU_SUCCESS = 0, VGU_NO_SUPPORT = -1, VGU_OPERATION_FAILED = -2, VGU_OUT_OF_MEMORY = -3,   VGU_TIMEOUT = -4, VGU_INVALID_PARAMETER = -5, VGU_BUSY = -6, VGU_NO_CONTEXT = -7 } | 错误码定义。 | +| [VGULineCap](_display.md#vgulinecap) { VGU_LINECAP_BUTT = 0, VGU_LINECAP_ROUND, VGU_LINECAP_SQUARE } | 线帽。 | +| [VGUJointType](_display.md#vgujointtype) { VGU_LINE_JOIN_MITER = 0, VGU_LINE_JOIN_ROUND, VGU_LINE_JOIN_BEVEL, VGU_LINE_JOIN_BUTT } | 联接类型。 | +| [VGUFilter](_display.md#vgufilter) { VGU_FILTER_BILINEAR = 0, VGU_FILTER_NEAREST, VGU_FILTER_LINEAR, VGU_FILTER_BUTT } | 图像滤波类型。 | +| [VGUFillRule](_display.md#vgufillrule) { VGU_RULE_WINDING = 0, VGU_RULE_EVEN_ODD, VGU_RULE_BUTT } | 填充规则定义。 | +| [VGUFillSpread](_display.md#vgufillspread) { VGU_SPREAD_PAD = 0, VGU_SPREAD_REFLECT, VGU_SPREAD_REPEAT, VGU_SPREAD_BUTT } | 渐变填充区域外的延展类型。 | +| [VGUWrapType](_display.md#vguwraptype) { VGU_WRAP_REFLECT = 0, VGU_WRAP_REPEAT, VGU_WRAP_BUTT } | 图像模式填充延展类型。 | +| [VGUPathCmd](_display.md#vgupathcmd) { VGU_PATH_CMD_CLOSE = 0, VGU_PATH_CMD_MOVE, VGU_PATH_CMD_LINE, VGU_PATH_CMD_HLINE,   VGU_PATH_CMD_VLINE, VGU_PATH_CMD_QUAD, VGU_PATH_CMD_CUBIC, VGU_PATH_CMD_SQUAD,   VGU_PATH_CMD_SCUBIC, VGU_PATH_CMD_BUTT } | 路径绘制指令类型。 | +| [VGUTransformType](_display.md#vgutransformtype) { VGU_TRANSFORM_TRANSLATE = (1 << 0), VGU_TRANSFORM_SCALE = (1 << 1), VGU_TRANSFORM_ROTATE_90 = (1 << 2), VGU_TRANSFORM_ROTATE_180 = (1 << 3),   VGU_TRANSFORM_ROTATE_270 = (1 << 4), VGU_TRANSFORM_OTHER = (1 << 16) } | 变换类型。 | +| [VGUClipType](_display.md#vgucliptype) { VGU_CLIP_RECT = 0, VGU_CLIP_PATH, VGU_CLIP_BUTT } | 绘制表面剪切类型。 | +| [VGUGradientType](_display.md#vgugradienttype) { VGU_GRADIENT_LINEAR = 0, VGU_GRADIENT_RADIAL, VGU_GRADIENT_CONIC, VGU_GRADIENT_BUTT } | 渐变类型。 | +| [VGUPaintType](_display.md#vgupainttype) { VGU_PAINT_SOLID = 0, VGU_PAINT_GRADIENT, VGU_PAINT_PATTERN, VGU_PAINT_BUTT } | 渲染对象 | ### 函数 | 名称 | 描述 | | -------- | -------- | -| [VGUPathInit](_display.md#vgupathinit)(VGUPath \*path, VGUPathDataType type, const uint8_t \*segments, int numSegments, const uint8_t \*data, bool enAlias, VGURect boundBox) | 初始化路径对象。 | -| [VGUPathAppend](_display.md#vgupathappend)(VGUPath \*path, const VGUPath \*subpath) | 添加子路径到当前路径中。 | -| [VGUPathClear](_display.md#vgupathclear)(VGUPath \*path) | 清除路径对象内存。 | -| [VGUMatrixIdentity](_display.md#vgumatrixidentity)(VGUMatrix3 \*matrix) | 初始化矩阵对象为单位矩阵。 | -| [VGUMatrixScale](_display.md#vgumatrixscale)(VGUMatrix3 \*matrix, float xScale, float yScale) | 矩阵变换缩放。 | -| [VGUMatrixRotate](_display.md#vgumatrixrotate)(VGUMatrix3 \*matrix, float degree) | 矩阵变换旋转。 | -| [VGUMatrixTranslate](_display.md#vgumatrixtranslate)(VGUMatrix3 \*matrix, float x, float y) | 矩阵变换平移。 | -| [VGUGradientColorStop](_display.md#vgugradientcolorstop)(VGUGradient \*gradient, const VGUColorStop \*colorStop, uint32_t count) | 对渐变添加ColorStop。 | -| [VGUGradientClearStop](_display.md#vgugradientclearstop)(VGUGradient \*gradient) | 清除ColorStop。 | -| [VGUGradientMatrix](_display.md#vgugradientmatrix)(VGUGradient \*gradient, const VGUMatrix3 \*matrix) | 设置渐变对象的变换矩阵。 | -| [VGUGradientLinear](_display.md#vgugradientlinear)(VGUGradient \*gradient, const VGUPoint \*p1, const VGUPoint \*p2) | 创建线性渐变对象。 | -| [VGUGradientRadial](_display.md#vgugradientradial)(VGUGradient \*gradient, const VGUPoint \*p1, VGUScalar r1, const VGUPoint \*p2, VGUScalar r2) | 创建辐射渐变对象 | -| [VGUGradientConic](_display.md#vgugradientconic)(VGUGradient \*gradient, VGUScalar cx, VGUScalar cy) | 创建圆锥渐变对象。 | -| [VGUInitialize](_display.md#vguinitialize)(VGUFuncs \*\*funcs) | 获取硬件加速相关的操作接口指针。 | -| [VGUUninitialize](_display.md#vguuninitialize)(VGUFuncs \*funcs) | 去初始化硬件加速模块,同时释放硬件加速模块操作函数指针。 | +| [VGUPathInit](_display.md#vgupathinit) ([VGUPath](_v_g_u_path.md) \*path, [VGUPathDataType](_display.md#vgupathdatatype) type, const uint8_t \*segments, int numSegments, const uint8_t \*data, bool enAlias, [VGURect](_v_g_u_rect.md) boundBox) | [VGUResult](_display.md#vguresult)
初始化路径对象。 | +| [VGUPathAppend](_display.md#vgupathappend) ([VGUPath](_v_g_u_path.md) \*path, const [VGUPath](_v_g_u_path.md) \*subpath) | [VGUResult](_display.md#vguresult)
添加子路径到当前路径中。 | +| [VGUPathClear](_display.md#vgupathclear) ([VGUPath](_v_g_u_path.md) \*path) | [VGUResult](_display.md#vguresult)
清除路径对象内存。 | +| [VGUMatrixIdentity](_display.md#vgumatrixidentity) ([VGUMatrix3](_v_g_u_matrix3.md) \*matrix) | [VGUResult](_display.md#vguresult)
初始化矩阵对象为单位矩阵。 | +| [VGUMatrixScale](_display.md#vgumatrixscale) ([VGUMatrix3](_v_g_u_matrix3.md) \*matrix, float xScale, float yScale) | [VGUResult](_display.md#vguresult)
矩阵变换缩放。 | +| [VGUMatrixRotate](_display.md#vgumatrixrotate) ([VGUMatrix3](_v_g_u_matrix3.md) \*matrix, float degree) | [VGUResult](_display.md#vguresult)
矩阵变换旋转。 | +| [VGUMatrixTranslate](_display.md#vgumatrixtranslate) ([VGUMatrix3](_v_g_u_matrix3.md) \*matrix, float x, float y) | [VGUResult](_display.md#vguresult)
矩阵变换平移。 | +| [VGUGradientColorStop](_display.md#vgugradientcolorstop) ([VGUGradient](_v_g_u_gradient.md) \*gradient, const [VGUColorStop](_v_g_u_color_stop.md) \*colorStop, uint32_t count) | [VGUResult](_display.md#vguresult)
对渐变添加ColorStop。 | +| [VGUGradientClearStop](_display.md#vgugradientclearstop) ([VGUGradient](_v_g_u_gradient.md) \*gradient) | [VGUResult](_display.md#vguresult)
清除ColorStop。 | +| [VGUGradientMatrix](_display.md#vgugradientmatrix) ([VGUGradient](_v_g_u_gradient.md) \*gradient, const [VGUMatrix3](_v_g_u_matrix3.md) \*matrix) | [VGUResult](_display.md#vguresult)
设置渐变对象的变换矩阵。 | +| [VGUGradientLinear](_display.md#vgugradientlinear) ([VGUGradient](_v_g_u_gradient.md) \*gradient, const [VGUPoint](_v_g_u_point.md) \*p1, const [VGUPoint](_v_g_u_point.md) \*p2) | [VGUResult](_display.md#vguresult)
创建线性渐变对象。 | +| [VGUGradientRadial](_display.md#vgugradientradial) ([VGUGradient](_v_g_u_gradient.md) \*gradient, const [VGUPoint](_v_g_u_point.md) \*p1, [VGUScalar](_display.md#vguscalar) r1, const [VGUPoint](_v_g_u_point.md) \*p2, [VGUScalar](_display.md#vguscalar) r2) | [VGUResult](_display.md#vguresult)
创建辐射渐变对象 | +| [VGUGradientConic](_display.md#vgugradientconic) ([VGUGradient](_v_g_u_gradient.md) \*gradient, [VGUScalar](_display.md#vguscalar) cx, [VGUScalar](_display.md#vguscalar) cy) | [VGUResult](_display.md#vguresult)
创建圆锥渐变对象。 | +| [VGUInitialize](_display.md#vguinitialize) ([VGUFuncs](_v_g_u_funcs.md) \*\*funcs) | [VGUResult](_display.md#vguresult)
获取硬件加速相关的操作接口指针。 | +| [VGUUninitialize](_display.md#vguuninitialize) ([VGUFuncs](_v_g_u_funcs.md) \*funcs) | [VGUResult](_display.md#vguresult)
去初始化硬件加速模块,同时释放硬件加速模块操作函数指针。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/input__controller_8h.md b/zh-cn/device-dev/reference/hdi-apis/input__controller_8h.md index 0036ad9e3661c7213b8f1c7906b0f330453b098a..70583dd0a116f2f3871287af4e39cce292a711d1 100644 --- a/zh-cn/device-dev/reference/hdi-apis/input__controller_8h.md +++ b/zh-cn/device-dev/reference/hdi-apis/input__controller_8h.md @@ -1,28 +1,24 @@ # input_controller.h -## **概述** +## 概述 描述Input设备业务控制相关的接口声明。 -**Since**: - +**Since:** 1.0 - -**Version**: - +**Version:** 1.0 - **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [InputController](_input_controller.md) | 提供Input设备业务控制相关的接口。 | +| [InputController](_input_controller.md) | struct
提供Input设备业务控制相关的接口。  | diff --git a/zh-cn/device-dev/reference/hdi-apis/input__manager_8h.md b/zh-cn/device-dev/reference/hdi-apis/input__manager_8h.md index a93402294a89293abbfed1fc7bc5b74a7844b96a..515ea4902c5c22bbfbb1b6fbef67e10491dc8260 100644 --- a/zh-cn/device-dev/reference/hdi-apis/input__manager_8h.md +++ b/zh-cn/device-dev/reference/hdi-apis/input__manager_8h.md @@ -1,36 +1,32 @@ # input_manager.h -## **概述** +## 概述 描述Input设备管理相关的接口声明。 -**Since**: - +**Since:** 1.0 - -**Version**: - +**Version:** 1.0 - **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [InputManager](_input_manager.md) | 提供Input设备管理相关的接口。 | -| [IInputInterface](_i_input_interface.md) | 定义用于提供Input设备驱动程序功能的接口。 | +| [InputManager](_input_manager.md) | struct
提供Input设备管理相关的接口。  | +| [IInputInterface](_i_input_interface.md) | struct
定义用于提供Input设备驱动程序功能的接口。  | ### 函数 | 名称 | 描述 | | -------- | -------- | -| [GetInputInterface](input.md#getinputinterface) ([IInputInterface](_i_input_interface.md) \*\*interface) | Input服务通过调用此接口获取操作Input设备的所有接口。 | +| [GetInputInterface](_input.md#getinputinterface) ([IInputInterface](_i_input_interface.md) \*\*interface) | int32_t
Input服务通过调用此接口获取操作Input设备的所有接口。  | diff --git a/zh-cn/device-dev/reference/hdi-apis/input__reporter_8h.md b/zh-cn/device-dev/reference/hdi-apis/input__reporter_8h.md index acd441d4b5cea53936c99582849805da425ccfb8..19da2734d22bcff41670a68ca7ca27781672b2ed 100644 --- a/zh-cn/device-dev/reference/hdi-apis/input__reporter_8h.md +++ b/zh-cn/device-dev/reference/hdi-apis/input__reporter_8h.md @@ -1,28 +1,24 @@ # input_reporter.h -## **概述** +## 概述 描述Input设备数据上报相关的接口声明。 -**Since**: - +**Since:** 1.0 - -**Version**: - +**Version:** 1.0 - **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [InputReporter](_input_reporter.md) | 提供Input设备数据上报相关的接口。 | +| [InputReporter](_input_reporter.md) | struct
提供Input设备数据上报相关的接口。  | diff --git a/zh-cn/device-dev/reference/hdi-apis/input__type_8h.md b/zh-cn/device-dev/reference/hdi-apis/input__type_8h.md index 44430e50ce053966b1da33e26c65a5ed9147260e..9244830a4149c2d86ff88359a00512cf6cb1fdd7 100644 --- a/zh-cn/device-dev/reference/hdi-apis/input__type_8h.md +++ b/zh-cn/device-dev/reference/hdi-apis/input__type_8h.md @@ -1,67 +1,65 @@ # input_type.h -## **概述** +## 概述 -Input设备相关的类型定义。 +Input设备相关的类型定义,定义了Input设备驱动接口所使用的结构体及枚举类型。 -定义了Input设备驱动接口所使用的结构体及枚举类型。 - -**Since**: +**Since:** 1.0 -**Version**: +**Version:** 1.0 **相关模块:** -[Input](input.md) +[Input](_input.md) -## **汇总** +## 汇总 ### 类 | 名称 | 描述 | | -------- | -------- | -| [InputEventPackage](_input_event_package.md) | Input事件数据包结构。 | -| [InputHotPlugEvent](_input_hot_plug_event.md) | 热插拔事件数据包结构。 | -| [InputDevDesc](_input_dev_desc.md) | Input设备描述信息。 | -| [InputEventCb](_input_event_cb.md) | 此结构体定义了输入事件回调函数并提供给Input服务使用。 | -| [InputHostCb](_input_host_cb.md) | 此结构体定义了热插拔事件上报回调函数并提供给Input服务使用。 | -| [InputDevAbility](_input_dev_ability.md) | Input设备的能力属性,存储支持事件的位图。 | -| [InputDimensionInfo](_input_dimension_info.md) | Input设备的维度信息。 | -| [InputDevIdentify](_input_dev_identify.md) | Input设备的识别信息。 | -| [InputDevAttr](_input_dev_attr.md) | Input设备属性。 | -| [InputDeviceInfo](_input_device_info.md) | Input设备基础设备信息。 | -| [InputExtraCmd](_input_extra_cmd.md) | 扩展指令的数据结构。 | +| [InputEventPackage](_input_event_package.md) | struct
Input事件数据包结构。 | +| [InputHotPlugEvent](_input_hot_plug_event.md) | struct
热插拔事件数据包结构。 | +| [InputDevDesc](_input_dev_desc.md) | struct
Input设备描述信息。 | +| [InputEventCb](_input_event_cb.md) | struct
此结构体定义了输入事件回调函数并提供给Input服务使用。 | +| [InputHostCb](_input_host_cb.md) | struct
此结构体定义了热插拔事件上报回调函数并提供给Input服务使用。 | +| [InputDevAbility](_input_dev_ability.md) | struct
Input设备的能力属性,存储支持事件的位图。 | +| [InputDimensionInfo](_input_dimension_info.md) | struct
Input设备的维度信息。 | +| [InputDevIdentify](_input_dev_identify.md) | struct
Input设备的识别信息。 | +| [InputDevAttr](_input_dev_attr.md) | struct
Input设备属性。 | +| [InputDeviceInfo](_input_device_info.md) | struct
Input设备基础设备信息。 | +| [InputExtraCmd](_input_extra_cmd.md) | struct
扩展指令的数据结构。 | ### 宏定义 | 名称 | 描述 | | -------- | -------- | -| [MAX_INPUT_DEV_NUM](input.md#max_input_dev_num)   32 | Input设备数量的最大值。 | -| [CHIP_INFO_LEN](input.md#chip_info_len)   10 | 芯片信息长度。 | -| [CHIP_NAME_LEN](input.md#chip_name_len)   10 | 芯片名称长度。 | -| [VENDOR_NAME_LEN](input.md#vendor_name_len)   10 | 厂商名称长度。 | -| [DEV_NAME_LEN](input.md#dev_name_len)   64 | Input设备名称长度。 | -| [SELF_TEST_RESULT_LEN](input.md#self_test_result_len)   20 | 自测结果长度。 | -| [DEV_MANAGER_SERVICE_NAME](input.md#dev_manager_service_name)   "hdf_input_host" | Input设备节点服务名称。 | -| [DIV_ROUND_UP](input.md#div_round_up)(nr, d)   (((nr) + (d) - 1) / (d)) | 向上取整计算公式。 | -| [BYTE_HAS_BITS](input.md#byte_has_bits)   8 | 一个字节所包含的比特数。 | -| [BITS_TO_UINT64](input.md#bits_to_uint64)(count)   [DIV_ROUND_UP](input.md#div_round_up)(count, [BYTE_HAS_BITS](input.md#byte_has_bits) \* sizeof(uint64_t)) | 比特与64位无符号整数的转换公式。 | -| [HDF_FF_CNT](input.md#hdf_ff_cnt)   (0x7f + 1) | Input设备发送力反馈命令的数量最大值。 | +| [MAX_INPUT_DEV_NUM](_input.md#max_input_dev_num)   32 | Input设备数量的最大值。 | +| [CHIP_INFO_LEN](_input.md#chip_info_len)   10 | 芯片信息长度。 | +| [CHIP_NAME_LEN](_input.md#chip_name_len)   10 | 芯片名称长度。 | +| [VENDOR_NAME_LEN](_input.md#vendor_name_len)   10 | 厂商名称长度。 | +| [DEV_NAME_LEN](_input.md#dev_name_len)   64 | Input设备名称长度。 | +| [SELF_TEST_RESULT_LEN](_input.md#self_test_result_len)   20 | 自测结果长度。 | +| [DEV_MANAGER_SERVICE_NAME](_input.md#dev_manager_service_name)   "hdf_input_host" | Input设备节点服务名称。 | +| [DIV_ROUND_UP](_input.md#div_round_up)(nr, d)   (((nr) + (d) - 1) / (d)) | 向上取整计算公式。 | +| [BYTE_HAS_BITS](_input.md#byte_has_bits)   8 | 一个字节所包含的比特数。 | +| [BITS_TO_UINT64](_input.md#bits_to_uint64)(count)   [DIV_ROUND_UP](_input.md#div_round_up)(count, [BYTE_HAS_BITS](_input.md#byte_has_bits) \* sizeof(uint64_t)) | 比特与64位无符号整数的转换公式。 | +| [HDF_FF_CNT](_input.md#hdf_ff_cnt)   (0x7f + 1) | Input设备发送力反馈命令的数量最大值。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [RetStatus](input.md#retstatus) { INPUT_SUCCESS = 0, INPUT_FAILURE = -1, INPUT_INVALID_PARAM = -2, INPUT_NOMEM = -3,   INPUT_NULL_PTR = -4, INPUT_TIMEOUT = -5, INPUT_UNSUPPORTED = -6 } | 定义返回值类型。 | -| [InputDevType](input.md#inputdevtype) { INDEV_TYPE_TOUCH, INDEV_TYPE_KEY, INDEV_TYPE_KEYBOARD, INDEV_TYPE_MOUSE,   INDEV_TYPE_BUTTON, INDEV_TYPE_CROWN, INDEV_TYPE_ENCODER, INDEV_TYPE_UNKNOWN } | 定义Input设备类型。 | -| [PowerStatus](input.md#powerstatus) { INPUT_RESUME, INPUT_SUSPEND, INPUT_LOW_POWER, INPUT_POWER_STATUS_UNKNOWN  } | 定义电源状态。 | -| [CapacitanceTest](input.md#capacitancetest) { BASE_TEST, FULL_TEST, MMI_TEST, RUNNING_TEST,   TEST_TYPE_UNKNOWN } | 定义容值测试类型。 | +| [RetStatus](_input.md#retstatus) { INPUT_SUCCESS = 0, INPUT_FAILURE = -1, INPUT_INVALID_PARAM = -2, INPUT_NOMEM = -3,   INPUT_NULL_PTR = -4, INPUT_TIMEOUT = -5, INPUT_UNSUPPORTED = -6 } | 定义返回值类型。 | +| [InputDevType](_input.md#inputdevtype) { INDEV_TYPE_TOUCH, INDEV_TYPE_KEY, INDEV_TYPE_KEYBOARD, INDEV_TYPE_MOUSE,   INDEV_TYPE_BUTTON, INDEV_TYPE_CROWN, INDEV_TYPE_ENCODER, INDEV_TYPE_UNKNOWN } | 定义Input设备类型。 | +| [PowerStatus](_input.md#powerstatus) { INPUT_RESUME, INPUT_SUSPEND, INPUT_LOW_POWER, INPUT_POWER_STATUS_UNKNOWN } | 定义电源状态。 | +| [CapacitanceTest](_input.md#capacitancetest) { BASE_TEST, FULL_TEST, MMI_TEST, RUNNING_TEST,   TEST_TYPE_UNKNOWN } | 定义容值测试类型。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_activity_changed_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_activity_changed_callback.md index 46600f68482f434d220249120b97408550662fae..cdc1db76e9e64e37d851027331c1d79fb0f1e20e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_activity_changed_callback.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_activity_changed_callback.md @@ -1,18 +1,22 @@ # IActivityChangedCallback -## **概述** +## 概述 -定义上报行为事件的回调函数 +定义上报行为事件的回调函数。 用户在获得订阅的行为事件或获取设备缓存的行为事件前,需要先注册该回调函数。只有当订阅的行为发生时,行为数据才会通过回调函数进行上报。 详情可参考[IActivityInterface](interface_i_activity_interface.md)。 +**Since:** + +3.2 + **相关模块:** -[HdiActivityRecognition](activity_recognition.md) +[HdiActivityRecognition](_hdi_activity_recognition.md) -## **汇总** +## 汇总 ### Public 成员函数 @@ -22,7 +26,7 @@ | [OnActivityChanged](#onactivitychanged) ([in] struct [ActRecognitionEvent](_act_recognition_event.md)[] event) | 定义上报行为事件的回调函数。 | -## **成员函数说明** +## 成员函数说明 ### OnActivityChanged() @@ -32,7 +36,7 @@ IActivityChangedCallback::OnActivityChanged ([in] struct ActRecognitionEvent[] event) ``` -**描述:** +**描述:** 定义上报行为事件的回调函数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_activity_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_activity_interface.md index 8893cf8972fa3e4911632190735b53bf0874cd2d..0dc4e03db162e73c1da27ae703fa2a1ea1cdd229 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_activity_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_activity_interface.md @@ -1,7 +1,7 @@ # IActivityInterface -## **概述** +## 概述 定义对行为识别进行基本操作的接口。 @@ -9,10 +9,10 @@ **相关模块:** -[HdiActivityRecognition](activity_recognition.md) +[HdiActivityRecognition](_hdi_activity_recognition.md) -## **汇总** +## 汇总 ### Public 成员函数 @@ -28,7 +28,7 @@ | [FlushActivity](#flushactivity) () | 数据刷新。 | -## **成员函数说明** +## 成员函数说明 ### DisableActRecognitionEvent() @@ -38,9 +38,7 @@ IActivityInterface::DisableActRecognitionEvent ([in] int activity, [in] int eventType ) ``` -**描述:** - -取消订阅某个行为事件。 +**描述:** 取消订阅某个之前订阅过的行为事件。 @@ -49,7 +47,7 @@ IActivityInterface::DisableActRecognitionEvent ([in] int activity, [in] int even | 名称 | 描述 | | -------- | -------- | | activity | 取消订阅的行为,参考[EnableActRecognitionEvent](#enableactrecognitionevent)接口的activity参数。 | -| eventType | 事件类型,参考[ActRecognitionEventType](activity_recognition.md#actrecognitioneventtype)定义。可以填充1(进入)或2(退出),也可以填充3(同时订阅进入和退出)。 | +| eventType | 事件类型,参考[ActRecognitionEventType](_hdi_activity_recognition.md#actrecognitioneventtype)定义。可以填充1(进入)或2(退出),也可以填充3(同时订阅进入和退出)。 | **返回:** @@ -65,7 +63,7 @@ IActivityInterface::DisableActRecognitionEvent ([in] int activity, [in] int even IActivityInterface::EnableActRecognitionEvent ([in] int activity, [in] int eventType, [in] long maxReportLatencyNs, [in] int powerMode ) ``` -**描述:** +**描述:** 订阅某个行为事件。 @@ -76,9 +74,9 @@ IActivityInterface::EnableActRecognitionEvent ([in] int activity, [in] int event | 名称 | 描述 | | -------- | -------- | | activity | 订阅的行为,通过[GetSupportActivity](#getsupportactivity)得到设备支持的所有行为,然后将行为列表中需要订阅的行为下标作为参数填充。 | -| eventType | 事件类型,参考[ActRecognitionEventType](activity_recognition.md#actrecognitioneventtype)定义。可以填充1(进入)或2(退出),也可以填充3(同时订阅进入和退出)。 | +| eventType | 事件类型,参考[ActRecognitionEventType](_hdi_activity_recognition.md#actrecognitioneventtype)定义。可以填充1(进入)或2(退出),也可以填充3(同时订阅进入和退出)。 | | maxReportLatencyNs | 最大上报时间间隔,单位是纳秒。若该时间间隔内有订阅的行为事件发生,则会上报。若存在多个订阅的行为,取最小的时间间隔。 | -| powerMode | 功耗模式。参考[ActRecognitionPowerMode](activity_recognition.md#actrecognitionpowermode)定义。 | +| powerMode | 功耗模式。参考[ActRecognitionPowerMode](_hdi_activity_recognition.md#actrecognitionpowermode)定义。 | **返回:** @@ -94,7 +92,7 @@ IActivityInterface::EnableActRecognitionEvent ([in] int activity, [in] int event IActivityInterface::FlushActivity () ``` -**描述:** +**描述:** 数据刷新。 @@ -114,7 +112,7 @@ IActivityInterface::FlushActivity () IActivityInterface::GetCurrentActivity ([out] struct ActRecognitionEvent[] event) ``` -**描述:** +**描述:** 获取当前的行为事件。 @@ -140,7 +138,7 @@ IActivityInterface::GetCurrentActivity ([out] struct ActRecognitionEvent[] event IActivityInterface::GetSupportActivity ([out] String[] activity) ``` -**描述:** +**描述:** 获取设备支持的行为类型。 @@ -148,7 +146,7 @@ IActivityInterface::GetSupportActivity ([out] String[] activity) | 名称 | 描述 | | -------- | -------- | -| activity | 参数类型为字符串,输出设备支持的行为类型。 包括:"inVehicle" 、"onBicycle"、"walking"、"running"、"still"、"fast_walking"、"high_speed_rail" "unknown"、"elevator"、"relative_still"、"walking_handhold"、"lying_posture"、"plane"、"metro"等。对应[ActRecognitionEventType](activity_recognition.md#actrecognitioneventtype)中的类型。 | +| activity | 参数类型为字符串,输出设备支持的行为类型。 包括:"inVehicle" 、"onBicycle"、"walking"、"running"、"still"、"fast_walking"、"high_speed_rail" "unknown"、"elevator"、"relative_still"、"walking_handhold"、"lying_posture"、"plane"、"metro"等。对应[ActRecognitionEventType](_hdi_activity_recognition.md#actrecognitioneventtype)中的类型。 | **返回:** @@ -164,7 +162,7 @@ IActivityInterface::GetSupportActivity ([out] String[] activity) IActivityInterface::RegisterActRecognitionCallback ([in] IActivityChangedCallback callbackObj) ``` -**描述:** +**描述:** 注册回调函数。 @@ -190,7 +188,7 @@ IActivityInterface::RegisterActRecognitionCallback ([in] IActivityChangedCallbac IActivityInterface::UnregisterActRecognitionCallback ([in] IActivityChangedCallback callbackObj) ``` -**描述:** +**描述:** 取消注册回调函数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_adapter.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_adapter.md new file mode 100644 index 0000000000000000000000000000000000000000..9a9710cfd205a76848691b460e2998b2a5a5f4bb --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_adapter.md @@ -0,0 +1,484 @@ +# IAudioAdapter + + +## 概述 + +AudioAdapter音频适配器接口。 + +提供音频适配器(声卡)对外支持的驱动能力,包括初始化端口、创建放音、创建录音、获取端口能力集等。 + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [InitAllPorts](#initallports) () | 初始化一个音频适配器所有的端口驱动。 | +| [CreateRender](#createrender) ([in] struct [AudioDeviceDescriptor](_audio_device_descriptor.md) desc, [in] struct [AudioSampleAttributes](_audio_sample_attributes.md) attrs, [out] [IAudioRender](interface_i_audio_render.md) render) | 创建一个音频播放接口的对象。 | +| [DestroyRender](#destroyrender) () | 销毁一个音频播放接口的对象。 | +| [CreateCapture](#createcapture) ([in] struct [AudioDeviceDescriptor](_audio_device_descriptor.md) desc, [in] struct [AudioSampleAttributes](_audio_sample_attributes.md) attrs, [out] [IAudioCapture](interface_i_audio_capture.md) capture) | 创建一个音频录音接口的对象。 | +| [DestroyCapture](#destroycapture) () | 销毁一个音频录音接口的对象。 | +| [GetPortCapability](#getportcapability) ([in] struct [AudioPort](_audio_port.md) port, [out] struct [AudioPortCapability](_audio_port_capability.md) capability) | 获取一个音频适配器的端口驱动的能力集。 | +| [SetPassthroughMode](#setpassthroughmode) ([in] struct [AudioPort](_audio_port.md) port, [in] enum [AudioPortPassthroughMode](_audio.md#audioportpassthroughmode) mode) | 设置音频端口驱动的数据透传模式。 | +| [GetPassthroughMode](#getpassthroughmode) ([in] struct [AudioPort](_audio_port.md) port, [out] enum [AudioPortPassthroughMode](_audio.md#audioportpassthroughmode) mode) | 获取音频端口驱动的数据透传模式。 | +| [GetDeviceStatus](#getdevicestatus) ([out] struct [AudioDeviceStatus](_audio_device_status.md) status) | 获取一个音频适配器的设备状态。 | +| [UpdateAudioRoute](#updateaudioroute) ([in] struct [AudioRoute](_audio_route.md) route, [out] int routeHandle) | 更新音频路由。 | +| [ReleaseAudioRoute](#releaseaudioroute) ([in] int routeHandle) | 释放音频路由。 | +| [SetMicMute](#setmicmute) ([in] boolean mute) | 设置音频静音。 | +| [GetMicMute](#getmicmute) ([out] boolean mute) | 获取音频静音状态。 | +| [SetVoiceVolume](#setvoicevolume) ([in] float volume) | 设置语音呼叫的音量。 | +| [SetExtraParams](#setextraparams) ([in] enum [AudioExtParamKey](_audio.md#audioextparamkey) key, [in] String condition, [in] String value) | 根据指定的条件设置音频拓展参数。 | +| [GetExtraParams](#getextraparams) ([in] enum [AudioExtParamKey](_audio.md#audioextparamkey) key, [in] String condition, [out] String value) | 根据指定条件获取音频扩展参数的取值。 | +| [RegExtraParamObserver](#regextraparamobserver) ([in] AudioCallback audioCallback, [in] byte cookie) | 注册扩展参数回调函数。 | + + +## 成员函数说明 + + +### CreateCapture() + + +``` +IAudioAdapter::CreateCapture ([in] struct AudioDeviceDescriptor desc, [in] struct AudioSampleAttributes attrs, [out] IAudioCapture capture ) +``` + +**描述:** + +创建一个音频录音接口的对象。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| desc | 待打开的音频设备描述符,详请参考[AudioDeviceDescriptor](_audio_device_descriptor.md)。 | +| attrs | 待打开的音频采样属性,详请参考[AudioSampleAttributes](_audio_sample_attributes.md)。 | +| capture | 获取的音频录音接口的对象实例保存到capture中,详请参考[IAudioCapture](interface_i_audio_capture.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[CreateCapture](#createcapture) + + +### CreateRender() + + +``` +IAudioAdapter::CreateRender ([in] struct AudioDeviceDescriptor desc, [in] struct AudioSampleAttributes attrs, [out] IAudioRender render ) +``` + +**描述:** + +创建一个音频播放接口的对象。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| desc | 待打开的音频设备描述符,详请参考[AudioDeviceDescriptor](_audio_device_descriptor.md)。 | +| attrs | 待打开的音频采样属性,详请参考[AudioSampleAttributes](_audio_sample_attributes.md)。 | +| render | 获取的音频播放接口的对象实例保存到render中,详请参考[IAudioRender](interface_i_audio_render.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetPortCapability](#getportcapability) + +[DestroyRender](#destroyrender) + + +### DestroyCapture() + + +``` +IAudioAdapter::DestroyCapture () +``` + +**描述:** + +销毁一个音频录音接口的对象。 + +**注意:** + +在音频录音过程中,不能销毁该接口对象。 + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[CreateCapture](#createcapture) + + +### DestroyRender() + + +``` +IAudioAdapter::DestroyRender () +``` + +**描述:** + +销毁一个音频播放接口的对象。 + +**注意:** + +在音频播放过程中,不能销毁该接口对象。 + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[CreateRender](#createrender) + + +### GetDeviceStatus() + + +``` +IAudioAdapter::GetDeviceStatus ([out] struct AudioDeviceStatus status) +``` + +**描述:** + +获取一个音频适配器的设备状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| status | 获取的设备状态保存到status中,详请参考[AudioDeviceStatus](_audio_device_status.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetExtraParams() + + +``` +IAudioAdapter::GetExtraParams ([in] enum AudioExtParamKey key, [in] String condition, [out] String value ) +``` + +**描述:** + +根据指定条件获取音频扩展参数的取值。 + +- condition为多个键值对组成的字符串,多个键值对之间通过分号分割,键值对的格式为"keytype=keyvalue"。 + +- 当输入的key值为AudioExtParamKey::AUDIO_EXT_PARAM_KEY_VOLUME时,condition的格式必须为: + EVENT_TYPE=xxx;VOLUME_GROUP_ID=xxx;AUDIO_VOLUME_TYPE=xxx; + - EVENT_TYPE 表示音量事件类型: 其中1表示设置音量, 4表示设置静音。 + + - VOLUME_GROUP_ID 表示待查询的音频扩展参数相关的音量组。 + + - AUDIO_VOLUME_TYPE 表示待查询的音频扩展参数相关的音量类型。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| key | 指定的扩展参数键类型,详请参考[AudioExtParamKey](_audio.md#audioextparamkey)。 | +| condition | 指定的扩展参数查询条件。 | +| value | 待返回的指定扩展参数条件的当前值。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetMicMute() + + +``` +IAudioAdapter::GetMicMute ([out] boolean mute) +``` + +**描述:** + +获取音频静音状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| mute | 获取的静音状态保存到mute中,true表示静音,false表示非静音。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetMicMute](#getmicmute) + + +### GetPassthroughMode() + + +``` +IAudioAdapter::GetPassthroughMode ([in] struct AudioPort port, [out] enum AudioPortPassthroughMode mode ) +``` + +**描述:** + +获取音频端口驱动的数据透传模式。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| port | 待获取的端口,详请参考[AudioPort](_audio_port.md)。 | +| mode | 获取的传输模式保存到mode中,详请参考[AudioPortPassthroughMode](_audio.md#audioportpassthroughmode)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[SetPassthroughMode](#setpassthroughmode) + + +### GetPortCapability() + + +``` +IAudioAdapter::GetPortCapability ([in] struct AudioPort port, [out] struct AudioPortCapability capability ) +``` + +**描述:** + +获取一个音频适配器的端口驱动的能力集。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| port | 待获取的端口,详请参考[AudioPort](_audio_port.md)。 | +| capability | 获取的端口能力保存到capability中,详请参考[AudioPortCapability](_audio_port_capability.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### InitAllPorts() + + +``` +IAudioAdapter::InitAllPorts () +``` + +**描述:** + +初始化一个音频适配器所有的端口驱动。 + +在音频服务中,调用其他驱动接口前需要先调用该接口检查端口是否已经初始化完成,如果端口没有初始化完成, 则需要等待一段时间(例如100ms)后重新进行检查,直到端口初始化完成后再继续操作。 + +**返回:** + +初始化完成返回值0,初始化失败返回负值。 + + +### RegExtraParamObserver() + + +``` +IAudioAdapter::RegExtraParamObserver ([in] AudioCallback audioCallback, [in] byte cookie ) +``` + +**描述:** + +注册扩展参数回调函数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| audioCallback | 待注册的回调函数,详请参考[IAudioCallback](interface_i_audio_callback.md)。 | +| cookie | 用于传递数据。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### ReleaseAudioRoute() + + +``` +IAudioAdapter::ReleaseAudioRoute ([in] int routeHandle) +``` + +**描述:** + +释放音频路由。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| routeHandle | 待释放的音频路由句柄。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### SetExtraParams() + + +``` +IAudioAdapter::SetExtraParams ([in] enum AudioExtParamKey key, [in] String condition, [in] String value ) +``` + +**描述:** + +根据指定的条件设置音频拓展参数。 + +- condition为多个键值对组成的字符串,多个键值对之间通过分号分割,键值对的格式为"keytype=keyvalue"。 + +- 当输入的key值为AudioExtParamKey::AUDIO_EXT_PARAM_KEY_VOLUME时,condition的格式必须为: + EVENT_TYPE=xxx;VOLUME_GROUP_ID=xxx;AUDIO_VOLUME_TYPE=xxx; + - EVENT_TYPE 表示音量事件类型: 其中1表示设置音量, 4表示设置静音。 + + - VOLUME_GROUP_ID 表示待设置的音频扩展参数相关的音量组。 + + - AUDIO_VOLUME_TYPE 表示待设置的音频扩展参数相关的音量类型。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| key | 指定的扩展参数键类型,详请参考[AudioDrainNotifyType](_audio.md#audiodrainnotifytype)。 | +| condition | 指定的扩展参数查询条件。 | +| value | 指定的扩展参数条件值。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### SetMicMute() + + +``` +IAudioAdapter::SetMicMute ([in] boolean mute) +``` + +**描述:** + +设置音频静音。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| mute | 表示是否将音频静音,true表示静音,false表示非静音。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[SetMicMute](#setmicmute) + + +### SetPassthroughMode() + + +``` +IAudioAdapter::SetPassthroughMode ([in] struct AudioPort port, [in] enum AudioPortPassthroughMode mode ) +``` + +**描述:** + +设置音频端口驱动的数据透传模式。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| port | 待设置的端口,详请参考[AudioPort](_audio_port.md)。 | +| mode | 待设置的传输模式,详请参考[AudioDrainNotifyType](_audio.md#audiodrainnotifytype)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetPassthroughMode](#getpassthroughmode) + + +### SetVoiceVolume() + + +``` +IAudioAdapter::SetVoiceVolume ([in] float volume) +``` + +**描述:** + +设置语音呼叫的音量。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| volume | 待设置的音量值,范围为(0.0-1.0),0.0表示最小音量值,1.0表示最大音量值。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[SetVoiceVolume](#setvoicevolume) + + +### UpdateAudioRoute() + + +``` +IAudioAdapter::UpdateAudioRoute ([in] struct AudioRoute route, [out] int routeHandle ) +``` + +**描述:** + +更新音频路由。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| route | 待更新的路由,详请参考[AudioRoute](_audio_route.md)。 | +| routeHandle | 更新后的音频路由句柄保存到routeHandle中。 | + +**返回:** + +成功返回值0,失败返回负值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_callback.md new file mode 100644 index 0000000000000000000000000000000000000000..787a172fc54d891718bf61398605df9ea0574770 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_callback.md @@ -0,0 +1,90 @@ +# IAudioCallback + + +## 概述 + +Audio回调接口。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [RenderCallback](#rendercallback) ([in] enum [AudioCallbackType](_audio.md#audiocallbacktype) type, [out] byte reserved, [out] byte cookie) | 放音回调函数。 | +| [ParamCallback](#paramcallback) ([in] enum [AudioExtParamKey](_audio.md#audioextparamkey) key, [in] byte condition, [in] byte value, [out] byte reserved, [out] byte cookie) | 音频扩展参数回调函数。 | + + +## 成员函数说明 + + +### ParamCallback() + + +``` +IAudioCallback::ParamCallback ([in] enum AudioExtParamKey key, [in] byte condition, [in] byte value, [out] byte reserved, [out] byte cookie ) +``` + +**描述:** + +音频扩展参数回调函数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| key | 扩展参数键类型,详请参考[AudioExtParamKey](_audio.md#audioextparamkey)。 | +| condition | 扩展参数条件。 | +| value | 扩展参数条件的值 | +| reserved | 保留字段。 | +| cookie | 用于传递数据。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[ParamCallback](#paramcallback) + + +### RenderCallback() + + +``` +IAudioCallback::RenderCallback ([in] enum AudioCallbackType type, [out] byte reserved, [out] byte cookie ) +``` + +**描述:** + +放音回调函数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| type | 回调函数通知事件类型,详请参考[AudioExtParamKey](_audio.md#audioextparamkey)。 | +| reserved | 保留字段。 | +| cookie | 用于传递数据。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +RegCallback diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_capture.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_capture.md new file mode 100644 index 0000000000000000000000000000000000000000..e90a66bac1633eec7f88c1dbb7a112e8f8e333f5 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_capture.md @@ -0,0 +1,799 @@ +# IAudioCapture + + +## 概述 + +AudioCapture音频录音接口。 + +提供音频录音支持的驱动能力,包括音频控制、音频属性、音频场景、音频音量、录制音频帧数据等。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [CaptureFrame](#captureframe) ([out] byte[] frame, [in] unsigned long requestBytes) | 从音频驱动中录制一帧输入数据(录音,音频上行数据)。 | +| [GetCapturePosition](#getcaptureposition) ([out] unsigned long frames, [out] struct [AudioTimeStamp](_audio_time_stamp.md) time) | 获取音频已输入的帧数。 | +| [CheckSceneCapability](#checkscenecapability) ([in] struct [AudioSceneDescriptor](_audio_scene_descriptor.md) scene, [out] boolean supported) | 判断某个音频场景能力是否支持。 | +| [SelectScene](#selectscene) ([in] struct [AudioSceneDescriptor](_audio_scene_descriptor.md) scene) | 选择音频场景。 | +| [SetMute](#setmute) ([in] boolean mute) | 设置音频的静音状态。 | +| [GetMute](#getmute) ([out] boolean mute) | 获取音频的静音状态。 | +| [SetVolume](#setvolume) ([in] float volume) | 设置一个音频流的音量。 | +| [GetVolume](#getvolume) ([out] float volume) | 获取一个音频流的音量。 | +| [GetGainThreshold](#getgainthreshold) ([out] float min, [out] float max) | 获取音频流增益的阈值。 | +| [GetGain](#getgain) ([out] float gain) | 获取音频流的增益。 | +| [SetGain](#setgain) ([in] float gain) | 设置音频流的增益。 | +| [GetFrameSize](#getframesize) ([out] unsigned long size) | 获取一帧音频数据的长度(字节数)大小。 | +| [GetFrameCount](#getframecount) ([out] unsigned long count) | 获取音频buffer中的音频帧数。 | +| [SetSampleAttributes](#setsampleattributes) ([in] struct [AudioSampleAttributes](_audio_sample_attributes.md) attrs) | 设置音频采样的属性参数。 | +| [GetSampleAttributes](#getsampleattributes) ([out] struct [AudioSampleAttributes](_audio_sample_attributes.md) attrs) | 获取音频采样的属性参数。 | +| [GetCurrentChannelId](#getcurrentchannelid) ([out] unsigned int channelId) | 获取音频的数据通道ID。 | +| [SetExtraParams](#setextraparams) ([in] String keyValueList) | 设置音频拓展参数。 | +| [GetExtraParams](#getextraparams) ([out] String keyValueList) | 获取音频拓展参数。 | +| [ReqMmapBuffer](#reqmmapbuffer) ([in] int reqSize, [in] struct [AudioMmapBufferDescripter](_audio_mmap_buffer_descripter.md) desc) | 请求mmap缓冲区。 | +| [GetMmapPosition](#getmmapposition) ([out] unsigned long frames, [out] struct [AudioTimeStamp](_audio_time_stamp.md) time) | 获取当前mmap的读/写位置。 | +| [AddAudioEffect](#addaudioeffect) ([in] unsigned long effectid) | 添加音频效果。 | +| [RemoveAudioEffect](#removeaudioeffect) ([in] unsigned long effectid) | 移除音频效果。 | +| [GetFrameBufferSize](#getframebuffersize) ([out] unsigned long bufferSize) | 获取缓冲区大小。 | +| [Start](#start) () | 启动一个音频播放或录音处理。 | +| [Stop](#stop) () | 停止一个音频播放或录音处理。 | +| [Pause](#pause) () | 暂停一个音频播放或录音处理。 | +| [Resume](#resume) () | 恢复一个音频播放或录音处理。 | +| [Flush](#flush) () | 刷新音频缓冲区buffer中的数据。 | +| [TurnStandbyMode](#turnstandbymode) () | 设置或去设置设备的待机模式。 | +| [AudioDevDump](#audiodevdump) ([in] int range, [in] int fd) | 保存音频设备信息。 | +| [IsSupportsPauseAndResume](#issupportspauseandresume) ([out] boolean supportPause, [out] boolean supportResume) | 判断声卡是否支持音频录制的暂停和恢复功能。 | + + +## 成员函数说明 + + +### AddAudioEffect() + + +``` +IAudioCapture::AddAudioEffect ([in] unsigned long effectid) +``` + +**描述:** + +添加音频效果。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| effectid | 添加的音频效果实例标识符。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### AudioDevDump() + + +``` +IAudioCapture::AudioDevDump ([in] int range, [in] int fd ) +``` + +**描述:** + +保存音频设备信息。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| range | 需要保存的信息范围(3 ~ 5),分为简要信息(3)、一般信息(4)、全量信息(5)。 | +| fd | 保存到指定的目标文件。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### CaptureFrame() + + +``` +IAudioCapture::CaptureFrame ([out] byte[] frame, [in] unsigned long requestBytes ) +``` + +**描述:** + +从音频驱动中录制一帧输入数据(录音,音频上行数据)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| frame | 待存放输入数据的音频frame。 | +| requestBytes | 待存放输入数据的音频frame大小(字节数)。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### CheckSceneCapability() + + +``` +IAudioCapture::CheckSceneCapability ([in] struct AudioSceneDescriptor scene, [out] boolean supported ) +``` + +**描述:** + +判断某个音频场景能力是否支持。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| scene | 待判断的音频场景描述符,详请参考[AudioSceneDescriptor](_audio_scene_descriptor.md)。 | +| supported | 是否支持的状态保存到supported中,true表示支持,false表示不支持。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[SelectScene](#selectscene) + + +### Flush() + + +``` +IAudioCapture::Flush () +``` + +**描述:** + +刷新音频缓冲区buffer中的数据。 + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetCapturePosition() + + +``` +IAudioCapture::GetCapturePosition ([out] unsigned long frames, [out] struct AudioTimeStamp time ) +``` + +**描述:** + +获取音频已输入的帧数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| frames | 获取的音频帧数保存到frames中。 | +| time | 获取的关联时间戳保存到time中,详请参考[AudioTimeStamp](_audio_time_stamp.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[CaptureFrame](#captureframe) + + +### GetCurrentChannelId() + + +``` +IAudioCapture::GetCurrentChannelId ([out] unsigned int channelId) +``` + +**描述:** + +获取音频的数据通道ID。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| channelId | 获取的通道ID保存到channelId中。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetExtraParams() + + +``` +IAudioCapture::GetExtraParams ([out] String keyValueList) +``` + +**描述:** + +获取音频拓展参数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| keyValueList | 拓展参数键值对字符串列表,格式为key=value,多个键值对通过分号分割。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetFrameBufferSize() + + +``` +IAudioCapture::GetFrameBufferSize ([out] unsigned long bufferSize) +``` + +**描述:** + +获取缓冲区大小。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| bufferSize | 获取的缓冲区大小保存在bufferSize中,单位为字节。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetFrameCount() + + +``` +IAudioCapture::GetFrameCount ([out] unsigned long count) +``` + +**描述:** + +获取音频buffer中的音频帧数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| count | 一个音频buffer中包含的音频帧数,获取后保存到count中。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetFrameSize() + + +``` +IAudioCapture::GetFrameSize ([out] unsigned long size) +``` + +**描述:** + +获取一帧音频数据的长度(字节数)大小。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| size | 获取的音频帧大小(字节数)保存到size中。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetGain() + + +``` +IAudioCapture::GetGain ([out] float gain) +``` + +**描述:** + +获取音频流的增益。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| gain | 保存当前获取到的增益到gain中。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetGainThreshold](#getgainthreshold) + +[SetGain](#setgain) + + +### GetGainThreshold() + + +``` +IAudioCapture::GetGainThreshold ([out] float min, [out] float max ) +``` + +**描述:** + +获取音频流增益的阈值。 + +在具体的功能实现中,可以根据芯片平台的实际情况来进行处理: + +- 可以使用实际的增益值,例如增益的范围为-50db ~ 6db。 + +- 也可以将增益范围设定为0.0~1.0,如果增益的范围为-50db ~ 6db, 则增益的映射关系为0.0表示静音(-50db),1.0表示最大增益(6db)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| min | 获取的音频增益的阈值下限保存到min中。 | +| max | 获取的音频增益的阈值上限保存到max中。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetGain](#getgain) + +[SetGain](#setgain) + + +### GetMmapPosition() + + +``` +IAudioCapture::GetMmapPosition ([out] unsigned long frames, [out] struct AudioTimeStamp time ) +``` + +**描述:** + +获取当前mmap的读/写位置。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| frames | 获取的音频帧计数保存到frames中。 | +| time | 获取的关联时间戳保存到time中,详请参考[AudioTimeStamp](_audio_time_stamp.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetMute() + + +``` +IAudioCapture::GetMute ([out] boolean mute) +``` + +**描述:** + +获取音频的静音状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| mute | 获取的静音状态保存到mute中,true表示静音操作、false表示取消静音操作。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[SetMute](#setmute) + + +### GetSampleAttributes() + + +``` +IAudioCapture::GetSampleAttributes ([out] struct AudioSampleAttributes attrs) +``` + +**描述:** + +获取音频采样的属性参数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| attrs | 获取的音频采样属性(例如采样频率、采样精度、通道)保存到attrs中,详请参考[AudioSampleAttributes](_audio_sample_attributes.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[SetSampleAttributes](#setsampleattributes) + + +### GetVolume() + + +``` +IAudioCapture::GetVolume ([out] float volume) +``` + +**描述:** + +获取一个音频流的音量。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| volume | 获取的音量保存到volume中,范围0.0~1.0。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[SetVolume](#setvolume) + + +### IsSupportsPauseAndResume() + + +``` +IAudioCapture::IsSupportsPauseAndResume ([out] boolean supportPause, [out] boolean supportResume ) +``` + +**描述:** + +判断声卡是否支持音频录制的暂停和恢复功能。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| supportPause | 是否支持暂停功能的状态保存到supportPause中,true表示支持,false表示不支持。 | +| supportResume | 是否支持恢复功能的状态保存到supportResume中,true表示支持,false表示不支持。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### Pause() + + +``` +IAudioCapture::Pause () +``` + +**描述:** + +暂停一个音频播放或录音处理。 + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[Resume](#resume) + + +### RemoveAudioEffect() + + +``` +IAudioCapture::RemoveAudioEffect ([in] unsigned long effectid) +``` + +**描述:** + +移除音频效果。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| effectid | 移除的音频效果实例标识符。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### ReqMmapBuffer() + + +``` +IAudioCapture::ReqMmapBuffer ([in] int reqSize, [in] struct AudioMmapBufferDescripter desc ) +``` + +**描述:** + +请求mmap缓冲区。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| reqSize | 请求缓冲区的大小,单位:字节。 | +| desc | 缓冲区描述符,详请参考[AudioMmapBufferDescripter](_audio_mmap_buffer_descripter.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### Resume() + + +``` +IAudioCapture::Resume () +``` + +**描述:** + +恢复一个音频播放或录音处理。 + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[Pause](#pause) + + +### SelectScene() + + +``` +IAudioCapture::SelectScene ([in] struct AudioSceneDescriptor scene) +``` + +**描述:** + +选择音频场景。 + +- 选择一个非常具体的音频场景(应用场景和输出设备的组合),例如同样是使用手机中的喇叭作为输出设备。 + - 在媒体播放场景中,scene为media_speaker。 + - 在语音通话免提场景中,scene为voice_speaker。 + +- 只是选择一个音频场景,例如使用场景为媒体播放(media)、电影播放(movie)、游戏播放(game)。 + +- 只是选择一个音频输出设备,例如输出设备为听筒(receiver)、喇叭(speaker)、有线耳机(headset)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| scene | 待设置的音频场景描述符,详请参考[AudioSceneDescriptor](_audio_scene_descriptor.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[CheckSceneCapability](#checkscenecapability) + + +### SetExtraParams() + + +``` +IAudioCapture::SetExtraParams ([in] String keyValueList) +``` + +**描述:** + +设置音频拓展参数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| keyValueList | 拓展参数键值对字符串列表,格式为key=value,多个键值对通过分号分割。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### SetGain() + + +``` +IAudioCapture::SetGain ([in] float gain) +``` + +**描述:** + +设置音频流的增益。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| gain | 待设置的增益,最小为0.0,最大为1.0。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetGainThreshold](#getgainthreshold) + +[GetGain](#getgain) + + +### SetMute() + + +``` +IAudioCapture::SetMute ([in] boolean mute) +``` + +**描述:** + +设置音频的静音状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| mute | 待设置的静音状态,true表示静音操作、false表示取消静音操作。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetMute](#getmute) + + +### SetSampleAttributes() + + +``` +IAudioCapture::SetSampleAttributes ([in] struct AudioSampleAttributes attrs) +``` + +**描述:** + +设置音频采样的属性参数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| attrs | 待设置的音频采样属性,例如采样频率、采样精度、通道,详请参考[AudioSampleAttributes](_audio_sample_attributes.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetSampleAttributes](#getsampleattributes) + + +### SetVolume() + + +``` +IAudioCapture::SetVolume ([in] float volume) +``` + +**描述:** + +设置一个音频流的音量。 + +音量的取值范围是0.0~1.0,如果音频服务中的音量等级范围是0 ~ 15, 则音量的映射关系为0.0(或0)表示静音,1.0(或15)表示最大音量等级。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| volume | 待设置的音量,范围0.0~1.0。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### Start() + + +``` +IAudioCapture::Start () +``` + +**描述:** + +启动一个音频播放或录音处理。 + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[Stop](#stop) + + +### Stop() + + +``` +IAudioCapture::Stop () +``` + +**描述:** + +停止一个音频播放或录音处理。 + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[Start](#start) + + +### TurnStandbyMode() + + +``` +IAudioCapture::TurnStandbyMode () +``` + +**描述:** + +设置或去设置设备的待机模式。 + +**返回:** + +设置设备待机模式成功返回值0,再次执行后去设置待机模式成功返回正值,失败返回负值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_manager.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_manager.md new file mode 100644 index 0000000000000000000000000000000000000000..ca2136efca2be2a652bf90d259cf8387370b0402 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_manager.md @@ -0,0 +1,131 @@ +# IAudioManager + + +## 概述 + +AudioManager音频适配器管理接口。 + +按照音频服务下发的音频适配器(声卡)描述符加载一个具体的音频适配器驱动程序。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [GetAllAdapters](#getalladapters) ([out] struct [AudioAdapterDescriptor](_audio_adapter_descriptor.md)[] descs) | 获取音频驱动中支持的所有适配器的列表。 | +| [LoadAdapter](#loadadapter) ([in] struct [AudioAdapterDescriptor](_audio_adapter_descriptor.md) desc, [out] [IAudioAdapter](interface_i_audio_adapter.md) adapter) | 加载一个音频适配器(声卡)的驱动。 | +| [UnloadAdapter](#unloadadapter) ([in] String adapterName) | 卸载音频适配器(声卡)的驱动。 | +| [ReleaseAudioManagerObject](#releaseaudiomanagerobject) () | 释放音频管理接口对象。 | + + +## 成员函数说明 + + +### GetAllAdapters() + + +``` +IAudioManager::GetAllAdapters ([out] struct AudioAdapterDescriptor[] descs) +``` + +**描述:** + +获取音频驱动中支持的所有适配器的列表。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| descs | 获取到的音频适配器列表保存到descs中,详请参考[AudioAdapterDescriptor](_audio_adapter_descriptor.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[LoadAdapter](#loadadapter) + + +### LoadAdapter() + + +``` +IAudioManager::LoadAdapter ([in] struct AudioAdapterDescriptor desc, [out] IAudioAdapter adapter ) +``` + +**描述:** + +加载一个音频适配器(声卡)的驱动。 + +加载一个具体的音频驱动,例如usb驱动,在具体实现中可能加载的是一个动态链接库(\*.so)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| desc | 待加载的音频适配器描述符,详请参考[AudioAdapterDescriptor](_audio_adapter_descriptor.md)。 | +| adapter | 获取的音频适配器接口的对象实例保存到adapter中,详请参考[IAudioAdapter](interface_i_audio_adapter.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetAllAdapters](#getalladapters) + +[UnloadAdapter](#unloadadapter) + + +### ReleaseAudioManagerObject() + + +``` +IAudioManager::ReleaseAudioManagerObject () +``` + +**描述:** + +释放音频管理接口对象。 + +**返回:** + +功返回值0,失败返回负值。 + + +### UnloadAdapter() + + +``` +IAudioManager::UnloadAdapter ([in] String adapterName) +``` + +**描述:** + +卸载音频适配器(声卡)的驱动。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| adapterName | 待卸载的音频适配器接口的对象名称。 | + +**参见:** + +[LoadAdapter](#loadadapter) diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_render.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_render.md new file mode 100644 index 0000000000000000000000000000000000000000..9a6091f3c3c93904ae9213e7a645845fac53f9f7 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_audio_render.md @@ -0,0 +1,1010 @@ +# IAudioRender + + +## 概述 + +AudioRender音频播放接口。 + +提供音频播放支持的驱动能力,包括音频控制、音频属性、音频场景、音频音量、获取硬件延迟时间、播放音频帧数据等。 + +**Since:** + +3.2 + +**Version:** + +1.0 + +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [GetLatency](#getlatency) ([out] unsigned int ms) | 获取音频硬件驱动的延迟时间。 | +| [RenderFrame](#renderframe) ([in] byte[] frame, [out] unsigned long replyBytes) | 向音频驱动中播放一帧输出数据(放音,音频下行数据)。 | +| [GetRenderPosition](#getrenderposition) ([out] unsigned long frames, [out] struct [AudioTimeStamp](_audio_time_stamp.md) time) | 获取音频已输出的帧数。 | +| [SetRenderSpeed](#setrenderspeed) ([in] float speed) | 设置一个音频的播放速度。 | +| [GetRenderSpeed](#getrenderspeed) ([out] float speed) | 获取一个音频当前的播放速度。 | +| [SetChannelMode](#setchannelmode) ([in] enum [AudioChannelMode](_audio.md#audiochannelmode) mode) | 设置音频播放的通道模式。 | +| [GetChannelMode](#getchannelmode) ([out] enum [AudioChannelMode](_audio.md#audiochannelmode) mode) | 获取音频播放当前的通道模式。 | +| [RegCallback](#regcallback) ([in] [IAudioCallback](interface_i_audio_callback.md) audioCallback, [in] byte cookie) | 注册音频回调函数,用于放音过程中缓冲区数据写、DrainBuffer完成通知。 | +| [DrainBuffer](#drainbuffer) ([out] enum [AudioDrainNotifyType](_audio.md#audiodrainnotifytype) type) | 排空缓冲区中的数据。 | +| [IsSupportsDrain](#issupportsdrain) ([out] boolean support) | 判断是否支持清空缓冲区数据的功能。 | +| [CheckSceneCapability](#checkscenecapability) ([in] struct [AudioSceneDescriptor](_audio_scene_descriptor.md) scene, [out] boolean supported) | 是否支持某个音频场景的配置。 | +| [SelectScene](#selectscene) ([in] struct [AudioSceneDescriptor](_audio_scene_descriptor.md) scene) | 选择音频场景。 | +| [SetMute](#setmute) ([in] boolean mute) | 设置音频的静音状态。 | +| [GetMute](#getmute) ([out] boolean mute) | 获取音频的静音状态。 | +| [SetVolume](#setvolume) ([in] float volume) | 设置一个音频流的音量。 | +| [GetVolume](#getvolume) ([out] float volume) | 获取一个音频流的音量。 | +| [GetGainThreshold](#getgainthreshold) ([out] float min, [out] float max) | 获取音频流增益的阈值。 | +| [GetGain](#getgain) ([out] float gain) | 获取音频流的增益。 | +| [SetGain](#setgain) ([in] float gain) | 设置音频流的增益。 | +| [GetFrameSize](#getframesize) ([out] unsigned long size) | 获取音频帧的大小。 | +| [GetFrameCount](#getframecount) ([out] unsigned long count) | 获取音频buffer中的音频帧数。 | +| [SetSampleAttributes](#setsampleattributes) ([in] struct [AudioSampleAttributes](_audio_sample_attributes.md) attrs) | 设置音频采样的属性参数。 | +| [GetSampleAttributes](#getsampleattributes) ([out] struct [AudioSampleAttributes](_audio_sample_attributes.md) attrs) | 获取音频采样的属性参数。 | +| [GetCurrentChannelId](#getcurrentchannelid) ([out] unsigned int channelId) | 获取音频的数据通道ID。 | +| [SetExtraParams](#setextraparams) ([in] String keyValueList) | 设置音频拓展参数。 | +| [GetExtraParams](#getextraparams) ([out] String keyValueList) | 获取音频拓展参数。 | +| [ReqMmapBuffer](#reqmmapbuffer) ([in] int reqSize, [in] struct [AudioMmapBufferDescripter](_audio_mmap_buffer_descripter.md) desc) | 请求mmap缓冲区。 | +| [GetMmapPosition](#getmmapposition) ([out] unsigned long frames, [out] struct [AudioTimeStamp](_audio_time_stamp.md) time) | 获取当前mmap的读/写位置。 | +| [AddAudioEffect](#addaudioeffect) ([in] unsigned long effectid) | 添加音频效果。 | +| [RemoveAudioEffect](#removeaudioeffect) ([in] unsigned long effectid) | 移除音频效果。 | +| [GetFrameBufferSize](#getframebuffersize) ([out] unsigned long bufferSize) | 获取缓冲区大小。 | +| [Start](#start) () | 启动一个音频播放或录音处理。 | +| [Stop](#stop) () | 停止一个音频播放或录音处理。 | +| [Pause](#pause) () | 暂停一个音频播放或录音处理。 | +| [Resume](#resume) () | 恢复一个音频播放或录音处理。 | +| [Flush](#flush) () | 刷新音频缓冲区buffer中的数据。 | +| [TurnStandbyMode](#turnstandbymode) () | 设置或去设置设备的待机模式。 | +| [AudioDevDump](#audiodevdump) ([in] int range, [in] int fd) | Dump音频设备信息。 | +| [IsSupportsPauseAndResume](#issupportspauseandresume) ([out] boolean supportPause, [out] boolean supportResume) | 判断声卡是否支持音频播放的暂停和恢复功能 | + + +## 成员函数说明 + + +### AddAudioEffect() + + +``` +IAudioRender::AddAudioEffect ([in] unsigned long effectid) +``` + +**描述:** + +添加音频效果。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| effectid | 添加的音频效果实例标识符。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### AudioDevDump() + + +``` +IAudioRender::AudioDevDump ([in] int range, [in] int fd ) +``` + +**描述:** + +Dump音频设备信息。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| range | Dump信息范围,分为简要信息、全量信息。 | +| fd | 指定Dump目标文件。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### CheckSceneCapability() + + +``` +IAudioRender::CheckSceneCapability ([in] struct AudioSceneDescriptor scene, [out] boolean supported ) +``` + +**描述:** + +是否支持某个音频场景的配置。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| scene | 待判断的音频场景描述符,详请参考[AudioSceneDescriptor](_audio_scene_descriptor.md)。 | +| supported | 是否支持的状态保存到supported中,true表示支持,false表示不支持。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[SelectScene](#selectscene) + + +### DrainBuffer() + + +``` +IAudioRender::DrainBuffer ([out] enum AudioDrainNotifyType type) +``` + +**描述:** + +排空缓冲区中的数据。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| type | 播放结束的类型,详请参考[AudioDrainNotifyType](_audio.md#audiodrainnotifytype)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[RegCallback](#regcallback) + + +### Flush() + + +``` +IAudioRender::Flush () +``` + +**描述:** + +刷新音频缓冲区buffer中的数据。 + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetChannelMode() + + +``` +IAudioRender::GetChannelMode ([out] enum AudioChannelMode mode) +``` + +**描述:** + +获取音频播放当前的通道模式。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| mode | 获取的通道模式保存到mode中,详请参考[AudioChannelMode](_audio.md#audiochannelmode)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[SetChannelMode](#setchannelmode) + + +### GetCurrentChannelId() + + +``` +IAudioRender::GetCurrentChannelId ([out] unsigned int channelId) +``` + +**描述:** + +获取音频的数据通道ID。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| channelId | 获取的通道ID保存到channelId中。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetExtraParams() + + +``` +IAudioRender::GetExtraParams ([out] String keyValueList) +``` + +**描述:** + +获取音频拓展参数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| keyValueList | 拓展参数键值对字符串列表,格式为key=value,多个键值对通过分号分割。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetFrameBufferSize() + + +``` +IAudioRender::GetFrameBufferSize ([out] unsigned long bufferSize) +``` + +**描述:** + +获取缓冲区大小。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| bufferSize | 获取的缓冲区大小保存在bufferSize中,单位为字节。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetFrameCount() + + +``` +IAudioRender::GetFrameCount ([out] unsigned long count) +``` + +**描述:** + +获取音频buffer中的音频帧数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| count | 一个音频buffer中包含的音频帧数,获取后保存到count中。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetFrameSize() + + +``` +IAudioRender::GetFrameSize ([out] unsigned long size) +``` + +**描述:** + +获取音频帧的大小。 + +获取一帧音频数据的长度(字节数)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| size | 获取的音频帧大小(字节数)保存到size中。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetGain() + + +``` +IAudioRender::GetGain ([out] float gain) +``` + +**描述:** + +获取音频流的增益。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| gain | 保存当前获取到的增益到gain中。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetGainThreshold](#getgainthreshold) + +[SetGain](#setgain) + + +### GetGainThreshold() + + +``` +IAudioRender::GetGainThreshold ([out] float min, [out] float max ) +``` + +**描述:** + +获取音频流增益的阈值。 + +在具体的功能实现中,可以根据芯片平台的实际情况来进行处理: + +- 1. 可以使用实际的增益值,例如增益的范围为-50db ~ 6db。 + +- 2. 也可以将增益范围设定为0.0~1.0,如果增益的范围为-50db ~ 6db, 则增益的映射关系为0.0表示静音,1.0表示最大增益(6db)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| min | 获取的音频增益的阈值下限保存到min中。 | +| max | 获取的音频增益的阈值上限保存到max中。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetGain](#getgain) + +[SetGain](#setgain) + + +### GetLatency() + + +``` +IAudioRender::GetLatency ([out] unsigned int ms) +``` + +**描述:** + +获取音频硬件驱动的延迟时间。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| ms | 获取的延迟时间(单位:毫秒)保存到ms中。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetMmapPosition() + + +``` +IAudioRender::GetMmapPosition ([out] unsigned long frames, [out] struct AudioTimeStamp time ) +``` + +**描述:** + +获取当前mmap的读/写位置。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| frames | 获取的音频帧计数保存到frames中。 | +| time | 获取的关联时间戳保存到time中,详请参考[AudioTimeStamp](_audio_time_stamp.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### GetMute() + + +``` +IAudioRender::GetMute ([out] boolean mute) +``` + +**描述:** + +获取音频的静音状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| mute | 获取的静音状态保存到mute中,true表示静音操作、false表示取消静音操作。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[SetMute](#setmute) + + +### GetRenderPosition() + + +``` +IAudioRender::GetRenderPosition ([out] unsigned long frames, [out] struct AudioTimeStamp time ) +``` + +**描述:** + +获取音频已输出的帧数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| frames | 获取的音频帧数保存到frames中,详请参考[AudioTimeStamp](_audio_time_stamp.md)。 | +| time | 获取的关联时间戳保存到time中。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[RenderFrame](#renderframe) + + +### GetRenderSpeed() + + +``` +IAudioRender::GetRenderSpeed ([out] float speed) +``` + +**描述:** + +获取一个音频当前的播放速度。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| speed | 获取的播放速度保存到speed中。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[SetRenderSpeed](#setrenderspeed) + + +### GetSampleAttributes() + + +``` +IAudioRender::GetSampleAttributes ([out] struct AudioSampleAttributes attrs) +``` + +**描述:** + +获取音频采样的属性参数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| attrs | 获取的音频采样属性(例如采样频率、采样精度、通道) 保存到attrs中,详请参考[AudioSampleAttributes](_audio_sample_attributes.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[SetSampleAttributes](#setsampleattributes) + + +### GetVolume() + + +``` +IAudioRender::GetVolume ([out] float volume) +``` + +**描述:** + +获取一个音频流的音量。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| volume | 获取的音量保存到volume中,范围0.0~1.0。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[SetVolume](#setvolume) + + +### IsSupportsDrain() + + +``` +IAudioRender::IsSupportsDrain ([out] boolean support) +``` + +**描述:** + +判断是否支持清空缓冲区数据的功能。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| support | 是否支持的状态保存到support中,true表示支持,false表示不支持。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### IsSupportsPauseAndResume() + + +``` +IAudioRender::IsSupportsPauseAndResume ([out] boolean supportPause, [out] boolean supportResume ) +``` + +**描述:** + +判断声卡是否支持音频播放的暂停和恢复功能 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| supportPause | 是否支持暂停功能的状态保存到supportPause中,true表示支持,false表示不支持。 | +| supportResume | 是否支持恢复功能的状态保存到supportResume中,true表示支持,false表示不支持。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### Pause() + + +``` +IAudioRender::Pause () +``` + +**描述:** + +暂停一个音频播放或录音处理。 + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[Resume](#resume) + + +### RegCallback() + + +``` +IAudioRender::RegCallback ([in] IAudioCallback audioCallback, [in] byte cookie ) +``` + +**描述:** + +注册音频回调函数,用于放音过程中缓冲区数据写、DrainBuffer完成通知。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| audioCallback | 注册的回调函数,详请参考[IAudioCallback](interface_i_audio_callback.md)。 | +| cookie | 回调函数的入参。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[RegCallback](#regcallback) + + +### RemoveAudioEffect() + + +``` +IAudioRender::RemoveAudioEffect ([in] unsigned long effectid) +``` + +**描述:** + +移除音频效果。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| effectid | 移除的音频效果实例标识符。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### RenderFrame() + + +``` +IAudioRender::RenderFrame ([in] byte[] frame, [out] unsigned long replyBytes ) +``` + +**描述:** + +向音频驱动中播放一帧输出数据(放音,音频下行数据)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| frame | 待写入的输出数据的音频frame。 | +| replyBytes | 实际写入的音频数据长度(字节数),获取后保存到replyBytes中。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### ReqMmapBuffer() + + +``` +IAudioRender::ReqMmapBuffer ([in] int reqSize, [in] struct AudioMmapBufferDescripter desc ) +``` + +**描述:** + +请求mmap缓冲区。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| reqSize | 请求缓冲区的大小。 | +| desc | 缓冲区描述符,详请参考[AudioMmapBufferDescripter](_audio_mmap_buffer_descripter.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### Resume() + + +``` +IAudioRender::Resume () +``` + +**描述:** + +恢复一个音频播放或录音处理。 + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[Pause](#pause) + + +### SelectScene() + + +``` +IAudioRender::SelectScene ([in] struct AudioSceneDescriptor scene) +``` + +**描述:** + +选择音频场景。 + +- 选择一个非常具体的音频场景(应用场景和输出设备的组合),例如同样是使用手机中的喇叭作为输出设备。 + - 在媒体播放场景scene为media_speaker。 + - 在语音通话免提场景scene为voice_speaker。 + +- 只是选择一个音频场景,例如使用场景为媒体播放(media)、电影播放(movie)、游戏播放(game)。 + +- 只是选择一个音频输出设备,例如输出设备为听筒(receiver)、喇叭(speaker)、有线耳机(headset)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| scene | 待设置的音频场景描述符,详请参考[AudioSceneDescriptor](_audio_scene_descriptor.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[CheckSceneCapability](#checkscenecapability) + + +### SetChannelMode() + + +``` +IAudioRender::SetChannelMode ([in] enum AudioChannelMode mode) +``` + +**描述:** + +设置音频播放的通道模式。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| mode | 待设置的通道模式,详请参考[AudioChannelMode](_audio.md#audiochannelmode)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetChannelMode](#getchannelmode) + + +### SetExtraParams() + + +``` +IAudioRender::SetExtraParams ([in] String keyValueList) +``` + +**描述:** + +设置音频拓展参数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| keyValueList | 拓展参数键值对字符串列表,格式为key=value,多个键值对通过分号分割。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### SetGain() + + +``` +IAudioRender::SetGain ([in] float gain) +``` + +**描述:** + +设置音频流的增益。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| gain | 待设置的增益,最小为0.0,最大为1.0。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetGainThreshold](#getgainthreshold) + +[GetGain](#getgain) + + +### SetMute() + + +``` +IAudioRender::SetMute ([in] boolean mute) +``` + +**描述:** + +设置音频的静音状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| mute | 待设置的静音状态,true表示静音操作、false表示取消静音操作。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetMute](#getmute) + + +### SetRenderSpeed() + + +``` +IAudioRender::SetRenderSpeed ([in] float speed) +``` + +**描述:** + +设置一个音频的播放速度。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| speed | 待设置的播放速度(倍速),例0.5、0.75、1.0、1.25、1.5、2.0。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetRenderSpeed](#getrenderspeed) + + +### SetSampleAttributes() + + +``` +IAudioRender::SetSampleAttributes ([in] struct AudioSampleAttributes attrs) +``` + +**描述:** + +设置音频采样的属性参数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| attrs | 待设置的音频采样属性,例如采样频率、采样精度、通道,详请参考[AudioSampleAttributes](_audio_sample_attributes.md)。 | + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[GetSampleAttributes](#getsampleattributes) + + +### SetVolume() + + +``` +IAudioRender::SetVolume ([in] float volume) +``` + +**描述:** + +设置一个音频流的音量。 + +音量的取值范围是0.0~1.0,如果音频服务中的音量等级为15级(0 ~ 15), 则音量的映射关系为0.0表示静音,1.0表示最大音量等级(15)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| volume | 待设置的音量,范围0.0~1.0。 | + +**返回:** + +成功返回值0,失败返回负值。 + + +### Start() + + +``` +IAudioRender::Start () +``` + +**描述:** + +启动一个音频播放或录音处理。 + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[Stop](#stop) + + +### Stop() + + +``` +IAudioRender::Stop () +``` + +**描述:** + +停止一个音频播放或录音处理。 + +**返回:** + +成功返回值0,失败返回负值。 + +**参见:** + +[Start](#start) + + +### TurnStandbyMode() + + +``` +IAudioRender::TurnStandbyMode () +``` + +**描述:** + +设置或去设置设备的待机模式。 + +**返回:** + +设置设备待机模式成功返回值0,失败返回负值;设置取消设备待机模式成功返回正值,失败返回负值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_battery_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_battery_callback.md index 5a744f65c56a8a585963b582dcb42141ea9408c3..634813264b93d05af2ac11e9254bcaabbaeaa473 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_battery_callback.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_battery_callback.md @@ -1,32 +1,30 @@ # IBatteryCallback -## **概述** +## 概述 电池信息的回调。 服务创建此回调对象后,可以调用[IBatteryInterface](interface_i_battery_interface.md)的接口注册回调,从而订阅电池信息的变化。 **Since:** - 3.1 - **相关模块:** [Battery](battery.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [Update](#update) ([in] struct [BatteryInfo](_battery_info.md) event) | 电池信息的回调方法。 | +| [Update](#update) ([in] struct [BatteryInfo](_battery_info.md) event) | 电池信息的回调方法。  | -## **成员函数说明** +## 成员函数说明 ### Update() @@ -35,9 +33,7 @@ ``` IBatteryCallback::Update ([in] struct BatteryInfo event) ``` - -**描述:** - +**描述:** 电池信息的回调方法。 当电池信息发生变化时,将通过此方法的参数返回给服务。 @@ -46,7 +42,7 @@ IBatteryCallback::Update ([in] struct BatteryInfo event) | 名称 | 描述 | | -------- | -------- | -| event | 电池信息,如电量,电压,健康状态等。 | +| event | 电池信息,如电量,电压,健康状态等。  | **参见:** diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_battery_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_battery_interface.md index 89ef2cb9d5b9aadcae91f5f9729f95c98a026430..b2a932eea16a37b94931dc3fa100a8821a35f78d 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_battery_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_battery_interface.md @@ -1,47 +1,45 @@ # IBatteryInterface -## **概述** +## 概述 获取、订阅电池信息的接口。 服务获取此对象后,可以调用相关的接口获取、订阅电池信息。 **Since:** - 3.1 - **相关模块:** [Battery](battery.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [Register](#register) ([in] [IBatteryCallback](interface_i_battery_callback.md) event) | 注册电池信息的回调。 | -| [UnRegister](#unregister) () | 取消注册电池信息的回调。 | -| [ChangePath](#changepath) ([in] String path) | 设置电池信息节点的路径。 | -| [GetCapacity](#getcapacity) ([out] int capacity) | 获取电池的电量百分比。 | -| [GetVoltage](#getvoltage) ([out] int voltage) | 获取电池的电压,单位微伏。 | -| [GetTemperature](#gettemperature) ([out] int temperature) | 获取电池的充电温度,单位0.1摄氏度。 | -| [GetHealthState](#gethealthstate) ([out] enum [BatteryHealthState](battery.md#batteryhealthstate) healthState) | 获取电池的健康状态。 | -| [GetPluggedType](#getpluggedtype) ([out] enum [BatteryPluggedType](battery.md#batterypluggedtype) pluggedType) | 获取充电设备类型。 | -| [GetChargeState](#getchargestate) ([out] enum [BatteryChargeState](battery.md#batterychargestate) chargeState) | 获取充电状态。 | -| [GetPresent](#getpresent) ([out] boolean present) | 获取是否支持电池或者电池是否在位。 | -| [GetTechnology](#gettechnology) ([out] String technology) | 获取电池的技术型号。 | -| [GetTotalEnergy](#gettotalenergy) ([out] int totalEnergy) | 获取电池的总容量。 | -| [GetCurrentAverage](#getcurrentaverage) ([out] int curAverage) | 获取电池的平均电流。 | -| [GetCurrentNow](#getcurrentnow) ([out] int curNow) | 获取电池的电流。 | -| [GetRemainEnergy](#getremainenergy) ([out] int remainEnergy) | 获取电池的剩余容量。 | -| [GetBatteryInfo](#getbatteryinfo) ([out] struct [BatteryInfo](_battery_info.md) info) | 获取电池的全部信息。 | - - -## **成员函数说明** +| [Register](#register) ([in] [IBatteryCallback](interface_i_battery_callback.md) event) | 注册电池信息的回调。  | +| [UnRegister](#unregister) () | 取消注册电池信息的回调。  | +| [ChangePath](#changepath) ([in] String path) | 设置电池信息节点的路径。  | +| [GetCapacity](#getcapacity) ([out] int capacity) | 获取电池的电量百分比。  | +| [GetVoltage](#getvoltage) ([out] int voltage) | 获取电池的电压,单位微伏。  | +| [GetTemperature](#gettemperature) ([out] int temperature) | 获取电池的充电温度,单位0.1摄氏度。  | +| [GetHealthState](#gethealthstate) ([out] enum [BatteryHealthState](battery.md#batteryhealthstate) healthState) | 获取电池的健康状态。  | +| [GetPluggedType](#getpluggedtype) ([out] enum [BatteryPluggedType](battery.md#batterypluggedtype) pluggedType) | 获取充电设备类型。  | +| [GetChargeState](#getchargestate) ([out] enum [BatteryChargeState](battery.md#batterychargestate) chargeState) | 获取充电状态。  | +| [GetPresent](#getpresent) ([out] boolean present) | 获取是否支持电池或者电池是否在位。  | +| [GetTechnology](#gettechnology) ([out] String technology) | 获取电池的技术型号。  | +| [GetTotalEnergy](#gettotalenergy) ([out] int totalEnergy) | 获取电池的总容量。  | +| [GetCurrentAverage](#getcurrentaverage) ([out] int curAverage) | 获取电池的平均电流。  | +| [GetCurrentNow](#getcurrentnow) ([out] int curNow) | 获取电池的电流。  | +| [GetRemainEnergy](#getremainenergy) ([out] int remainEnergy) | 获取电池的剩余容量。  | +| [GetBatteryInfo](#getbatteryinfo) ([out] struct [BatteryInfo](_battery_info.md) info) | 获取电池的全部信息。  | + + +## 成员函数说明 ### ChangePath() @@ -50,9 +48,7 @@ ``` IBatteryInterface::ChangePath ([in] String path) ``` - -**描述:** - +**描述:** 设置电池信息节点的路径。 **参数:** @@ -72,16 +68,14 @@ HDF_SUCCESS 表示路径设置成功。 ``` IBatteryInterface::GetBatteryInfo ([out] struct BatteryInfo info) ``` - -**描述:** - +**描述:** 获取电池的全部信息。 **参数:** | 名称 | 描述 | | -------- | -------- | -| info | 电池的全部信息。 | +| info | 输出参数,电池的全部信息。 | **返回:** @@ -98,16 +92,14 @@ HDF_SUCCESS 表示获取成功。 ``` IBatteryInterface::GetCapacity ([out] int capacity) ``` - -**描述:** - +**描述:** 获取电池的电量百分比。 **参数:** | 名称 | 描述 | | -------- | -------- | -| capacity | 表示电量的百分比值。 | +| capacity | 输出参数,表示电量的百分比值。 | **返回:** @@ -120,16 +112,14 @@ HDF_SUCCESS 表示获取成功。 ``` IBatteryInterface::GetChargeState ([out] enum BatteryChargeState chargeState) ``` - -**描述:** - +**描述:** 获取充电状态。 **参数:** | 名称 | 描述 | | -------- | -------- | -| chargeState | 表示充电状态。 | +| chargeState | 输出参数,表示充电状态。 | **返回:** @@ -146,16 +136,14 @@ HDF_SUCCESS 表示获取成功。 ``` IBatteryInterface::GetCurrentAverage ([out] int curAverage) ``` - -**描述:** - +**描述:** 获取电池的平均电流。 **参数:** | 名称 | 描述 | | -------- | -------- | -| totalEnergy | 表示电池的平均电流,单位毫安。 | +| totalEnergy | 输出参数,表示电池的平均电流,单位毫安。 | **返回:** @@ -168,16 +156,14 @@ HDF_SUCCESS 表示获取成功。 ``` IBatteryInterface::GetCurrentNow ([out] int curNow) ``` - -**描述:** - +**描述:** 获取电池的电流。 **参数:** | 名称 | 描述 | | -------- | -------- | -| curNow | 表示电池的实时电流,单位毫安。 | +| curNow | 输出参数,表示电池的实时电流,单位毫安。 | **返回:** @@ -190,16 +176,14 @@ HDF_SUCCESS 表示获取成功。 ``` IBatteryInterface::GetHealthState ([out] enum BatteryHealthState healthState) ``` - -**描述:** - +**描述:** 获取电池的健康状态。 **参数:** | 名称 | 描述 | | -------- | -------- | -| healthState | 表示电池健康状态。 | +| healthState | 输出参数,表示电池健康状态。 | **返回:** @@ -216,16 +200,14 @@ HDF_SUCCESS 表示获取成功。 ``` IBatteryInterface::GetPluggedType ([out] enum BatteryPluggedType pluggedType) ``` - -**描述:** - +**描述:** 获取充电设备类型。 **参数:** | 名称 | 描述 | | -------- | -------- | -| pluggedType | 表示充电设备类型。 | +| pluggedType | 输出参数,表示充电设备类型。 | **返回:** @@ -242,16 +224,14 @@ HDF_SUCCESS 表示获取成功。 ``` IBatteryInterface::GetPresent ([out] boolean present) ``` - -**描述:** - +**描述:** 获取是否支持电池或者电池是否在位。 **参数:** | 名称 | 描述 | | -------- | -------- | -| present | 表示是否支持电池或者电池是否在位。true表示支持或在位,false表示不支持或不在位。 | +| present | 输出参数,表示是否支持电池或者电池是否在位。true表示支持或在位,false表示不支持或不在位。 | **返回:** @@ -264,16 +244,14 @@ HDF_SUCCESS 表示获取成功。 ``` IBatteryInterface::GetRemainEnergy ([out] int remainEnergy) ``` - -**描述:** - +**描述:** 获取电池的剩余容量。 **参数:** | 名称 | 描述 | | -------- | -------- | -| remainEnergy | 表示电池的剩余容量,单位毫安时。 | +| remainEnergy | 输出参数,表示电池的剩余容量,单位毫安时。 | **返回:** @@ -286,16 +264,14 @@ HDF_SUCCESS 表示获取成功。 ``` IBatteryInterface::GetTechnology ([out] String technology) ``` - -**描述:** - +**描述:** 获取电池的技术型号。 **参数:** | 名称 | 描述 | | -------- | -------- | -| technology | 当前电池技术型号。 | +| technology | 输出参数,当前电池技术型号。 | **返回:** @@ -308,16 +284,14 @@ HDF_SUCCESS 表示获取成功。 ``` IBatteryInterface::GetTemperature ([out] int temperature) ``` - -**描述:** - +**描述:** 获取电池的充电温度,单位0.1摄氏度。 **参数:** | 名称 | 描述 | | -------- | -------- | -| temperature | 表示电池温度。 | +| temperature | 输出参数,表示电池温度。 | **返回:** @@ -330,16 +304,14 @@ HDF_SUCCESS 表示获取成功。 ``` IBatteryInterface::GetTotalEnergy ([out] int totalEnergy) ``` - -**描述:** - +**描述:** 获取电池的总容量。 **参数:** | 名称 | 描述 | | -------- | -------- | -| totalEnergy | 表示电池的总容量,单位毫安时。 | +| totalEnergy | 输出参数,表示电池的总容量,单位毫安时。 | **返回:** @@ -352,16 +324,14 @@ HDF_SUCCESS 表示获取成功。 ``` IBatteryInterface::GetVoltage ([out] int voltage) ``` - -**描述:** - +**描述:** 获取电池的电压,单位微伏。 **参数:** | 名称 | 描述 | | -------- | -------- | -| voltage | 表示电池的电压。 | +| voltage | 输出参数,表示电池的电压。 | **返回:** @@ -374,16 +344,14 @@ HDF_SUCCESS 表示获取成功。 ``` IBatteryInterface::Register ([in] IBatteryCallback event) ``` - -**描述:** - +**描述:** 注册电池信息的回调。 **参数:** | 名称 | 描述 | | -------- | -------- | -| event | 服务注册的回调。 | +| event | 输入参数,服务注册的回调。 | **返回:** @@ -396,9 +364,7 @@ HDF_SUCCESS 表示注册成功。 ``` IBatteryInterface::UnRegister () ``` - -**描述:** - +**描述:** 取消注册电池信息的回调。 **返回:** diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_device.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_device.md index dfdbd5798cfab2244627da14132333bc0f9385de..5969be60db5868678da20d8f1d618c114b09fd67 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_device.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_device.md @@ -1,7 +1,7 @@ # ICameraDevice -## **概述** +## 概述 定义Camera设备基本的操作。 @@ -9,10 +9,10 @@ **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### Public 成员函数 @@ -21,14 +21,14 @@ | -------- | -------- | | [GetStreamOperator](#getstreamoperator) ([in] [IStreamOperatorCallback](interface_i_stream_operator_callback.md) callbackObj, [out] [IStreamOperator](interface_i_stream_operator.md) streamOperator) | 获取流操作句柄。 | | [UpdateSettings](#updatesettings) ([in] unsigned char[] settings) | 更新设备控制参数。 | -| [SetResultMode](#setresultmode) ([in] enum [ResultCallbackMode](camera.md#resultcallbackmode) mode) | 设置metadata上报模式,逐帧上报还是设备状态变化时上报。 | +| [SetResultMode](#setresultmode) ([in] enum [ResultCallbackMode](_camera.md#resultcallbackmode) mode) | 设置metadata上报模式,逐帧上报还是设备状态变化时上报。 | | [GetEnabledResults](#getenabledresults) ([out] int[] results) | 查询使能的metadata。 | | [EnableResult](#enableresult) ([in] int[] results) | 打开metadata上报开关。 | | [DisableResult](#disableresult) ([in] int[] results) | 关闭metadata上报开关。 | | [Close](#close) () | 关闭当前Camera设备。 | -## **成员函数说明** +## 成员函数说明 ### Close() @@ -38,7 +38,7 @@ ICameraDevice::Close () ``` -**描述:** +**描述:** 关闭当前Camera设备。 @@ -54,11 +54,11 @@ OpenCamera ICameraDevice::DisableResult ([in] int[] results) ``` -**描述:** +**描述:** 关闭metadata上报开关。 -屏蔽之后,相应的**OnResult**不再上报,需[EnableResult](#enableresult)使能之后才上报。 +屏蔽之后,相应的[OnResult](interface_i_camera_device_callback.md#onresult)不再上报,需[EnableResult](#enableresult)使能之后才上报。 **参数:** @@ -70,7 +70,7 @@ ICameraDevice::DisableResult ([in] int[] results) NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 **参见:** @@ -84,11 +84,11 @@ NO_ERROR 表示执行成功。 ICameraDevice::EnableResult ([in] int[] results) ``` -**描述:** +**描述:** 打开metadata上报开关。 -**OnResult**只上报此接口使能后的metadata。 +[OnResult](interface_i_camera_device_callback.md#onresult)只上报此接口使能后的metadata。 **参数:** @@ -100,7 +100,7 @@ ICameraDevice::EnableResult ([in] int[] results) NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 **参见:** @@ -114,7 +114,7 @@ NO_ERROR 表示执行成功。 ICameraDevice::GetEnabledResults ([out] int[] results) ``` -**描述:** +**描述:** 查询使能的metadata。 @@ -130,7 +130,7 @@ ICameraDevice::GetEnabledResults ([out] int[] results) NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 ### GetStreamOperator() @@ -140,7 +140,7 @@ NO_ERROR 表示执行成功。 ICameraDevice::GetStreamOperator ([in] IStreamOperatorCallback callbackObj, [out] IStreamOperator streamOperator ) ``` -**描述:** +**描述:** 获取流操作句柄。 @@ -155,7 +155,7 @@ ICameraDevice::GetStreamOperator ([in] IStreamOperatorCallback callbackObj, [out NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 ### SetResultMode() @@ -165,7 +165,7 @@ NO_ERROR 表示执行成功。 ICameraDevice::SetResultMode ([in] enum ResultCallbackMode mode) ``` -**描述:** +**描述:** 设置metadata上报模式,逐帧上报还是设备状态变化时上报。 @@ -173,13 +173,13 @@ ICameraDevice::SetResultMode ([in] enum ResultCallbackMode mode) | 名称 | 描述 | | -------- | -------- | -| mode | metadata的上报模式,逐帧上报或者设备状态变化时上报,查看[ResultCallbackMode](camera.md#resultcallbackmode)。 | +| mode | metadata的上报模式,逐帧上报或者设备状态变化时上报,查看[ResultCallbackMode](_camera.md#resultcallbackmode)。 | **返回:** NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 ### UpdateSettings() @@ -189,7 +189,7 @@ NO_ERROR 表示执行成功。 ICameraDevice::UpdateSettings ([in] unsigned char[] settings) ``` -**描述:** +**描述:** 更新设备控制参数。 @@ -203,4 +203,4 @@ ICameraDevice::UpdateSettings ([in] unsigned char[] settings) NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_device_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_device_callback.md index c8b090ed64b09494756add9d2d8d374d9d61a407..50d777eda4c5101c0903dfbbb0351d508095b82d 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_device_callback.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_device_callback.md @@ -1,7 +1,7 @@ # ICameraDeviceCallback -## **概述** +## 概述 定义Camera设备回调操作。 @@ -9,21 +9,21 @@ **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [OnError](#onerror) ([in] enum [ErrorType](camera.md#errortype) type, [in] int errorCode) | 设备发生错误时调用,由调用者实现,用于返回错误信息给调用者。 | +| [OnError](#onerror) ([in] enum [ErrorType](_camera.md#errortype) type, [in] int errorCode) | 设备发生错误时调用,由调用者实现,用于返回错误信息给调用者。 | | [OnResult](#onresult) ([in] unsigned long timestamp, [in] unsigned char[] result) | 上报Camera设备相关的metadata的回调,上报方式查看[SetResultMode](interface_i_camera_device.md#setresultmode)。 | -## **成员函数说明** +## 成员函数说明 ### OnError() @@ -33,7 +33,7 @@ ICameraDeviceCallback::OnError ([in] enum ErrorType type, [in] int errorCode ) ``` -**描述:** +**描述:** 设备发生错误时调用,由调用者实现,用于返回错误信息给调用者。 @@ -41,7 +41,7 @@ ICameraDeviceCallback::OnError ([in] enum ErrorType type, [in] int errorCode ) | 名称 | 描述 | | -------- | -------- | -| type | 错误类型,具体可参考[ErrorType](camera.md#errortype)。 | +| type | 错误类型,具体可参考[ErrorType](_camera.md#errortype)。 | | errorCode | 错误码,当前暂未使用。 | @@ -52,7 +52,7 @@ ICameraDeviceCallback::OnError ([in] enum ErrorType type, [in] int errorCode ) ICameraDeviceCallback::OnResult ([in] unsigned long timestamp, [in] unsigned char[] result ) ``` -**描述:** +**描述:** 上报Camera设备相关的metadata的回调,上报方式查看[SetResultMode](interface_i_camera_device.md#setresultmode)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_host.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_host.md index b0b98e04d60e673f47de01a23ca248f26181de4e..15b162db77351938422e33f1236014467fa476f7 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_host.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_host.md @@ -1,7 +1,7 @@ # ICameraHost -## **概述** +## 概述 定义Camera设备功能操作。 @@ -9,24 +9,24 @@ **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [SetCallback](#setcallback) ([in] [ICameraHostCallback](interface_i_camera_host_callback.md) callbackObj) | 设置ICameraHost回调接口,回调函数参考[ICameraHostCallback](interface_i_camera_host_callback.md)。 | -| [GetCameraIds](#getcameraids) ([out] String[] cameraIds) | 获取当前可用的Camera设备ID列表。 | -| [GetCameraAbility](#getcameraability) ([in] String cameraId, [out] unsigned char[] cameraAbility) | 获取Camera设备能力集合。 | -| [OpenCamera](#opencamera) ([in] String cameraId, [in] [ICameraDeviceCallback](interface_i_camera_device_callback.md) callbackObj, [out] [ICameraDevice](interface_i_camera_device.md) device) | 打开Camera设备。 | -| [SetFlashlight](#setflashlight) ([in] String cameraId, [in] boolean isEnable) | 打开或关闭闪光灯。 | +| [SetCallback](#setcallback) ([in] [ICameraHostCallback](interface_i_camera_host_callback.md) callbackObj) | 设置ICameraHost回调接口,回调函数参考[ICameraHostCallback](interface_i_camera_host_callback.md)。  | +| [GetCameraIds](#getcameraids) ([out] String[] cameraIds) | 获取当前可用的Camera设备ID列表。  | +| [GetCameraAbility](#getcameraability) ([in] String cameraId, [out] unsigned char[] cameraAbility) | 获取Camera设备能力集合。  | +| [OpenCamera](#opencamera) ([in] String cameraId, [in] [ICameraDeviceCallback](interface_i_camera_device_callback.md) callbackObj, [out] [ICameraDevice](interface_i_camera_device.md) device) | 打开Camera设备。  | +| [SetFlashlight](#setflashlight) ([in] String cameraId, [in] boolean isEnable) | 打开或关闭闪光灯。  | -## **成员函数说明** +## 成员函数说明 ### GetCameraAbility() @@ -35,23 +35,21 @@ ``` ICameraHost::GetCameraAbility ([in] String cameraId, [out] unsigned char[] cameraAbility ) ``` - -**描述:** - +**描述:** 获取Camera设备能力集合。 **参数:** | 名称 | 描述 | | -------- | -------- | -| cameraId | 用于指定要操作的Camera设备,通过[GetCameraIds](#getcameraids)获取。 | +| cameraId | 用于指定要操作的Camera设备,通过[GetCameraIds](#getcameraids)获取。  | | cameraAbility | 返回cameraId对应Camera设备的能力集合。 | **返回:** NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 **参见:** @@ -64,9 +62,7 @@ NO_ERROR 表示执行成功。 ``` ICameraHost::GetCameraIds ([out] String[] cameraIds) ``` - -**描述:** - +**描述:** 获取当前可用的Camera设备ID列表。 **参数:** @@ -79,7 +75,7 @@ ICameraHost::GetCameraIds ([out] String[] cameraIds) NO_ERROR 表示执行成功; -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 **参见:** @@ -92,9 +88,7 @@ NO_ERROR 表示执行成功; ``` ICameraHost::OpenCamera ([in] String cameraId, [in] ICameraDeviceCallback callbackObj, [out] ICameraDevice device ) ``` - -**描述:** - +**描述:** 打开Camera设备。 打开指定的Camera设备,通过此接口可以获取到ICameraDevice对象,通过ICameraDevice对象可以操作具体的Camera设备。 @@ -103,15 +97,15 @@ ICameraHost::OpenCamera ([in] String cameraId, [in] ICameraDeviceCallback callba | 名称 | 描述 | | -------- | -------- | -| cameraId | 需要打开的Camera设备ID,可通过[GetCameraIds](#getcameraids)接口获取当前已有Camera设备列表。 | -| callbackObj | Camera设备相关的回调函数,具体参见[ICameraDeviceCallback](interface_i_camera_device_callback.md)。 | +| cameraId | 需要打开的Camera设备ID,可通过[GetCameraIds](#getcameraids)接口获取当前已有Camera设备列表。  | +| callbackObj | Camera设备相关的回调函数,具体参见[ICameraDeviceCallback](interface_i_camera_device_callback.md)。  | | device | 返回当前要打开的Camera设备ID对应的ICameraDevice对象。 | **返回:** NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 **参见:** @@ -124,9 +118,7 @@ NO_ERROR 表示执行成功。 ``` ICameraHost::SetCallback ([in] ICameraHostCallback callbackObj) ``` - -**描述:** - +**描述:** 设置ICameraHost回调接口,回调函数参考[ICameraHostCallback](interface_i_camera_host_callback.md)。 **参数:** @@ -139,7 +131,7 @@ ICameraHost::SetCallback ([in] ICameraHostCallback callbackObj) NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 ### SetFlashlight() @@ -148,9 +140,7 @@ NO_ERROR 表示执行成功。 ``` ICameraHost::SetFlashlight ([in] String cameraId, [in] boolean isEnable ) ``` - -**描述:** - +**描述:** 打开或关闭闪光灯。 该接口只能由打开cameraId指定Camera设备的调用者调用。 @@ -159,14 +149,14 @@ ICameraHost::SetFlashlight ([in] String cameraId, [in] boolean isEnable ) | 名称 | 描述 | | -------- | -------- | -| cameraId | 闪光灯对应的Camera设备ID。 | +| cameraId | 闪光灯对应的Camera设备ID。  | | isEnable | 表示是否打开闪光灯,true表示打开,false表示关闭。 | **返回:** NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 **参见:** diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_host_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_host_callback.md index 27aa0722f85d4d52c59782e28959586260553bd2..39ab139c2a3b7260f64988a736939a8f7f66fc38 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_host_callback.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_camera_host_callback.md @@ -1,7 +1,7 @@ # ICameraHostCallback -## **概述** +## 概述 定义Camera设备功能回调操作。 @@ -9,22 +9,22 @@ **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [OnCameraStatus](#oncamerastatus) ([in] String cameraId, [in] enum [CameraStatus](camera.md#camerastatus) status) | 用于Camera设备状态变化时上报状态信息给调用者。 | -| [OnFlashlightStatus](#onflashlightstatus) ([in] String cameraId, [in] enum [FlashlightStatus](camera.md#flashlightstatus) status) | 用于在闪光灯状态变化时上报状态信息给调用者。 | -| [OnCameraEvent](#oncameraevent) ([in] String cameraId, [in] enum [CameraEvent](camera.md#cameraevent) event) | 在相机事件发生时调用。 | +| [OnCameraStatus](#oncamerastatus) ([in] String cameraId, [in] enum [CameraStatus](_camera.md#camerastatus) status) | 用于Camera设备状态变化时上报状态信息给调用者。  | +| [OnFlashlightStatus](#onflashlightstatus) ([in] String cameraId, [in] enum [FlashlightStatus](_camera.md#flashlightstatus) status) | 用于在闪光灯状态变化时上报状态信息给调用者。  | +| [OnCameraEvent](#oncameraevent) ([in] String cameraId, [in] enum [CameraEvent](_camera.md#cameraevent) event) | 在相机事件发生时调用。  | -## **成员函数说明** +## 成员函数说明 ### OnCameraEvent() @@ -33,17 +33,15 @@ ``` ICameraHostCallback::OnCameraEvent ([in] String cameraId, [in] enum CameraEvent event ) ``` - -**描述:** - +**描述:** 在相机事件发生时调用。 **参数:** | 名称 | 描述 | | -------- | -------- | -| cameraId | 表示相机事件绑定的相机ID。 | -| event | 表示相机事件类型。事件类型查看[CameraEvent](camera.md#cameraevent)。 | +| cameraId | 表示相机事件绑定的相机ID。  | +| event | 表示相机事件类型。事件类型查看[CameraEvent](_camera.md#cameraevent)。 | ### OnCameraStatus() @@ -52,16 +50,14 @@ ICameraHostCallback::OnCameraEvent ([in] String cameraId, [in] enum CameraEvent ``` ICameraHostCallback::OnCameraStatus ([in] String cameraId, [in] enum CameraStatus status ) ``` - -**描述:** - +**描述:** 用于Camera设备状态变化时上报状态信息给调用者。 **参数:** | 名称 | 描述 | | -------- | -------- | -| cameraId | 状态发生变化的Camera设备ID。 | +| cameraId | 状态发生变化的Camera设备ID。  | | status | 最新的设备状态。 | @@ -71,14 +67,12 @@ ICameraHostCallback::OnCameraStatus ([in] String cameraId, [in] enum CameraStatu ``` ICameraHostCallback::OnFlashlightStatus ([in] String cameraId, [in] enum FlashlightStatus status ) ``` - -**描述:** - +**描述:** 用于在闪光灯状态变化时上报状态信息给调用者。 **参数:** | 名称 | 描述 | | -------- | -------- | -| cameraId | 状态发生变化的闪关灯所绑定的Camera设备ID。 | -| status | 最新的闪光灯状态。状态值查看[CameraStatus](camera.md#camerastatus)。 | +| cameraId | 状态发生变化的闪关灯所绑定的Camera设备ID。  | +| status | 最新的闪光灯状态。状态值查看[CameraStatus](_camera.md#camerastatus)。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_cellbatching_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_cellbatching_callback.md new file mode 100644 index 0000000000000000000000000000000000000000..9ca65a623b46eb7c7b25e7997444ddecb7c43747 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_cellbatching_callback.md @@ -0,0 +1,80 @@ +# ICellbatchingCallback + + +## 概述 + +定义基站轨迹数据记录模块的回调函数。 + +用户在开启基站轨迹数据记录功能前,需要先注册该回调函数。当应用主动获取基站轨迹数据时,会通过回调函数进行上报。 详情可参考[ICellbatchingInterface](interface_i_cellbatching_interface.md)。 + +**Since:** + +4.0 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceCellbatching](_hdi_lpfence_cellbatching.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [OnCellbatchingChanged](#oncellbatchingchanged) ([in] struct [CellTrajectoryData](_cell_trajectory_data.md)[] data) | 定义基站轨迹数据上报的回调函数。 | +| [OnCellbatchingReset](#oncellbatchingreset) () | 定义低功耗围栏服务复位事件通知的回调函数。 | + + +## 成员函数说明 + + +### OnCellbatchingChanged() + + +``` +ICellbatchingCallback::OnCellbatchingChanged ([in] struct CellTrajectoryData[] data) +``` + +**描述:** + +定义基站轨迹数据上报的回调函数。 + +基站轨迹数据会通过该回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| data | 上报的基站轨迹数据。详见[CellTrajectoryData](_cell_trajectory_data.md)定义。 | + +**返回:** + +如果回调函数上报数据成功,则返回0。 + +如果回调函数上报数据失败,则返回负值。 + + +### OnCellbatchingReset() + + +``` +ICellbatchingCallback::OnCellbatchingReset () +``` + +**描述:** + +定义低功耗围栏服务复位事件通知的回调函数。 + +低功耗围栏服务发生复位时会通过该回调函数进行事件上报。 + +**返回:** + +如果回调函数上报事件成功,则返回0。 + +如果回调函数上报事件失败,则返回负值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_cellbatching_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_cellbatching_interface.md new file mode 100644 index 0000000000000000000000000000000000000000..ceb3f0f032f136b9d8e59985ea505ca0fabd730b --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_cellbatching_interface.md @@ -0,0 +1,134 @@ +# ICellbatchingInterface + + +## 概述 + +定义对基站轨迹数据记录模块进行基本操作的接口。 + +接口包含注册回调函数,取消注册回调函数,使能和去使能基站轨迹数据记录,主动获取基站轨迹数据。 + +**Since:** + +4.0 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceCellbatching](_hdi_lpfence_cellbatching.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [RegisterCellbatchingCallback](#registercellbatchingcallback) ([in] [ICellbatchingCallback](interface_i_cellbatching_callback.md) callbackObj) | 注册回调函数。 | +| [UnregisterCellbatchingCallback](#unregistercellbatchingcallback) ([in] [ICellbatchingCallback](interface_i_cellbatching_callback.md) callbackObj) | 取消注册回调函数。 | +| [CellbatchingSwitch](#cellbatchingswitch) ([in] struct [CellbatchingRequest](_cellbatching_request.md) req) | 打开/关闭基站轨迹数据记录。 | +| [FlushCellbatching](#flushcellbatching) () | 上报缓存的基站轨迹数据。 | + + +## 成员函数说明 + + +### CellbatchingSwitch() + + +``` +ICellbatchingInterface::CellbatchingSwitch ([in] struct CellbatchingRequest req) +``` + +**描述:** + +打开/关闭基站轨迹数据记录。 + +功能打开后,会将设备接收到的基站数据进行缓存,若接收到的基站数据与上一次接收的数据相同,则不会进行此次的数据缓存。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| req | 设置基站轨迹数据记录参数。详见[CellbatchingRequest](_cellbatching_request.md)。 | + +**返回:** + +如果操作成功,则返回0。 + +如果操作失败,则返回负值。 + + +### FlushCellbatching() + + +``` +ICellbatchingInterface::FlushCellbatching () +``` + +**描述:** + +上报缓存的基站轨迹数据。 + +上报基站数据的个数与设备的缓存buffer大小、设备接收的基站数据个数有关。flush之后,底层缓存基站数据会被清空。 + +**返回:** + +如果操作成功,则返回0。 + +如果操作失败,则返回负值。 + + +### RegisterCellbatchingCallback() + + +``` +ICellbatchingInterface::RegisterCellbatchingCallback ([in] ICellbatchingCallback callbackObj) +``` + +**描述:** + +注册回调函数。 + +用户在开启基站轨迹数据记录功能前,需要先注册该回调函数。当应用主动获取基站轨迹数据时,会通过回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| callbackObj | 要注册的回调函数,只需成功订阅一次,无需重复订阅。详见[ICellbatchingCallback](interface_i_cellbatching_callback.md)。 | + +**返回:** + +如果注册回调函数成功,则返回0。 + +如果注册回调函数失败,则返回负值。 + + +### UnregisterCellbatchingCallback() + + +``` +ICellbatchingInterface::UnregisterCellbatchingCallback ([in] ICellbatchingCallback callbackObj) +``` + +**描述:** + +取消注册回调函数。 + +取消之前注册的回调函数。当应用不需要使用基站轨迹数据记录功能,或需要更换回调函数时,需要取消注册回调函数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| callbackObj | 要取消注册的回调函数,只需成功取消订阅一次,无需重复取消订阅。详见[ICellbatchingCallback](interface_i_cellbatching_callback.md)。 | + +**返回:** + +如果取消注册回调函数成功,则返回0。 + +如果取消注册回调函数失败,则返回负值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_cellfence_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_cellfence_callback.md new file mode 100644 index 0000000000000000000000000000000000000000..83c32a7fc8e0ffca626ee6d5e8fa3bf4702e4937 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_cellfence_callback.md @@ -0,0 +1,107 @@ +# ICellfenceCallback + + +## 概述 + +定义基站围栏模块的回调函数 + +用户在开启基站围栏功能前,需要先注册该回调函数。当基站围栏状态发生变化时,会通过回调函数进行上报。 详情可参考[ICellfenceInterface](interface_i_cellfence_interface.md)。 + +**Since:** + +4.0 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceCellfence](_hdi_lpfence_cellfence.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [OnCellfenceChanged](#oncellfencechanged) ([in] struct [CellfenceStatus](_cellfence_status.md) fences) | 定义基站围栏状态变化通知的回调函数。 | +| [OnGetCellfenceSizeCb](#ongetcellfencesizecb) ([in] struct [CellfenceSize](_cellfence_size.md) size) | 定义基站围栏使用信息的回调函数。 | +| [OnCellfenceReset](#oncellfencereset) () | 定义低功耗围栏服务复位事件通知的回调函数。 | + + +## 成员函数说明 + + +### OnCellfenceChanged() + + +``` +ICellfenceCallback::OnCellfenceChanged ([in] struct CellfenceStatus fences) +``` + +**描述:** + +定义基站围栏状态变化通知的回调函数。 + +设备与基站围栏的状态关系发生变化时,会通过该回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| fences | 上报基站围栏变化的状态。详见[CellfenceStatus](_cellfence_status.md)定义。 | + +**返回:** + +如果回调函数上报数据成功,则返回0。 + +如果回调函数上报数据失败,则返回负值。 + + +### OnCellfenceReset() + + +``` +ICellfenceCallback::OnCellfenceReset () +``` + +**描述:** + +定义低功耗围栏服务复位事件通知的回调函数。 + +低功耗围栏服务发生复位时会通过该回调函数进行事件上报。 + +**返回:** + +如果回调函数调用成功,则返回0。 + +如果回调函数调用失败,则返回负值。 + + +### OnGetCellfenceSizeCb() + + +``` +ICellfenceCallback::OnGetCellfenceSizeCb ([in] struct CellfenceSize size) +``` + +**描述:** + +定义基站围栏使用信息的回调函数。 + +获取基站围栏使用信息时,会通过该回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| size | 基站围栏使用信息。详见[CellfenceSize](_cellfence_size.md)定义。 | + +**返回:** + +如果回调函数上报数据成功,则返回0。 + +如果回调函数上报数据失败,则返回负值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_cellfence_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_cellfence_interface.md new file mode 100644 index 0000000000000000000000000000000000000000..eac1ee7694eaf1b10d55ce4552d54b14dc43c5cb --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_cellfence_interface.md @@ -0,0 +1,161 @@ +# ICellfenceInterface + + +## 概述 + +定义对基站围栏模块进行基本操作的接口。 + +接口包含注册回调函数,取消注册回调函数,添加基站围栏,删除基站围栏和获取基站围栏使用信息。 + +**Since:** + +4.0 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceCellfence](_hdi_lpfence_cellfence.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [RegisterCellfenceCallback](#registercellfencecallback) ([in] [ICellfenceCallback](interface_i_cellfence_callback.md) callbackObj) | 注册回调函数。 | +| [UnregisterCellfenceCallback](#unregistercellfencecallback) ([in] [ICellfenceCallback](interface_i_cellfence_callback.md) callbackObj) | 取消注册回调函数。 | +| [AddCellfences](#addcellfences) ([in] struct [CellfenceRequest](_cellfence_request.md)[] cellfence) | 添加基站围栏。 | +| [RemoveCellfences](#removecellfences) ([in] int[] cellfenceId) | 删除基站围栏。 | +| [GetCellfenceSize](#getcellfencesize) () | 获取基站围栏使用信息 | + + +## 成员函数说明 + + +### AddCellfences() + + +``` +ICellfenceInterface::AddCellfences ([in] struct CellfenceRequest[] cellfence) +``` + +**描述:** + +添加基站围栏。 + +支持一次添加多个基站围栏,一个基站围栏包含多个基站信息。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| cellfence | 添加的基站围栏信息。详见[CellfenceRequest](_cellfence_request.md)。 | + +**返回:** + +如果添加成功,则返回0。 + +如果添加失败,则返回负值。 + + +### GetCellfenceSize() + + +``` +ICellfenceInterface::GetCellfenceSize () +``` + +**描述:** + +获取基站围栏使用信息 + +查看当前设备支持添加的基站围栏最大个数和已添加的基站围栏个数。通过回调函数上报通知,详见[OnGetCellfenceSizeCb](interface_i_cellfence_callback.md#ongetcellfencesizecb)。 + +**返回:** + +如果调用成功,则返回0。 + +如果调用失败,则返回负值。 + + +### RegisterCellfenceCallback() + + +``` +ICellfenceInterface::RegisterCellfenceCallback ([in] ICellfenceCallback callbackObj) +``` + +**描述:** + +注册回调函数。 + +用户在开启基站围栏功能前,需要先注册该回调函数。当基站围栏状态发生变化时,会通过回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| callbackObj | 要注册的回调函数,只需成功订阅一次,无需重复订阅。详见[ICellfenceCallback](interface_i_cellfence_callback.md)。 | + +**返回:** + +如果注册回调函数成功,则返回0。 + +如果注册回调函数失败,则返回负值。 + + +### RemoveCellfences() + + +``` +ICellfenceInterface::RemoveCellfences ([in] int[] cellfenceId) +``` + +**描述:** + +删除基站围栏。 + +支持一次删除多个基站围栏。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| cellfenceId | 基站围栏ID号。详见[CellfenceRequest](_cellfence_request.md)。 | + +**返回:** + +如果删除成功,则返回0。 + +如果删除失败,则返回负值。 + + +### UnregisterCellfenceCallback() + + +``` +ICellfenceInterface::UnregisterCellfenceCallback ([in] ICellfenceCallback callbackObj) +``` + +**描述:** + +取消注册回调函数。 + +取消之前注册的回调函数。当不需要使用基站围栏功能,或需要更换回调函数时,需要取消注册回调函数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| callbackObj | 要取消注册的回调函数,只需成功取消订阅一次,无需重复取消订阅。详见[ICellfenceCallback](interface_i_cellfence_callback.md)。 | + +**返回:** + +如果取消注册回调函数成功,则返回0。 + +如果取消注册回调函数失败,则返回负值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_executor_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_executor_callback_faceauth.md similarity index 81% rename from zh-cn/device-dev/reference/hdi-apis/interface_i_executor_callback.md rename to zh-cn/device-dev/reference/hdi-apis/interface_i_executor_callback_faceauth.md index 639f188b4cbedf4cbf7d4d1efd0884f6578e70d1..ccf21522fd8cc33d6c47a8f299251f82d9dae8ad 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_executor_callback.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_executor_callback_faceauth.md @@ -1,11 +1,11 @@ # IExecutorCallback -## **概述** +## 概述 -定义异步API接口回调,用于返回异步接口的请求处理结果和获取信息。使用细节见[IExecutor](interface_i_executor.md)。 +定义异步API接口回调,用于返回异步接口的请求处理结果和信息。使用细节见[IExecutor](interface_i_executor_faceauth.md)。 -**Since:** +**Since:** 3.2 @@ -13,12 +13,12 @@ 1.0 -**所属模块:** +**相关模块:** [HdfFaceAuth](_hdf_face_auth.md) -## **汇总** +## 汇总 ### Public 成员函数 @@ -29,7 +29,7 @@ | [OnAcquireInfo](#onacquireinfo) ([in] int acquire, [in] unsigned char[] extraInfo) | 定义操作过程信息反馈回调函数。 | -## **成员函数说明** +## 成员函数说明 ### OnAcquireInfo() @@ -39,18 +39,18 @@ IExecutorCallback::OnAcquireInfo ([in] int acquire, [in] unsigned char[] extraInfo ) ``` -**描述:** +**描述:** 定义操作过程信息反馈回调函数。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | acquire | 提示信息编码[FaceTipsCode](_hdf_face_auth.md#facetipscode)。 | | extraInfo | 其他相关信息,用于支持信息扩展。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -64,18 +64,18 @@ IExecutorCallback::OnAcquireInfo ([in] int acquire, [in] unsigned char[] extraIn IExecutorCallback::OnResult ([in] int result, [in] unsigned char[] extraInfo ) ``` -**描述:** +**描述:** -定义操作请求处理结果回调函数。 +定义操作结果回调函数。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | result | 操作请求处理结果。 | | extraInfo | 其他相关信息,如用户认证通过时用于返回执行器签发的认证令牌等。 | -**返回:** +**返回:** 0 表示操作成功。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_pin_i_executor_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_executor_callback_pinauth.md similarity index 83% rename from zh-cn/device-dev/reference/hdi-apis/interface_pin_i_executor_callback.md rename to zh-cn/device-dev/reference/hdi-apis/interface_i_executor_callback_pinauth.md index e0d8afed7239953c8881233d67d6edb244c075a1..d210106ef68b24e1ba421eaba9e4332d6cf27cca 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_pin_i_executor_callback.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_executor_callback_pinauth.md @@ -1,11 +1,11 @@ # IExecutorCallback -## **概述** +## 概述 -定义异步API接口回调,用于返回异步接口的请求处理结果和获取信息。使用细节见[IExecutor](interface_pin_i_executor.md)。 +定义异步API接口回调,用于返回异步接口的请求处理结果和获取信息。使用细节见[IExecutor](interface_i_executor_pinauth.md)。 -**Since:** +**Since:** 3.2 @@ -13,23 +13,23 @@ 1.0 -**所属模块:** +**相关模块:** [HdfPinAuth](_hdf_pin_auth.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [OnResult](#onresult) ([in] int result, [in] unsigned char[] extraInfo) | 定义操作结果回调函数。 | +| [OnResult](#onresult) ([in] int result, [in] unsigned char[] extraInfo) | 定义操作请求处理结果回调函数。 | | [OnGetData](#ongetdata) ([in] unsigned long scheduleId, [in] unsigned char[] salt, [in] unsigned long authSubType) | 定义请求获取口令数据回调函数。 | -## **成员函数说明** +## 成员函数说明 ### OnGetData() @@ -39,18 +39,18 @@ IExecutorCallback::OnGetData ([in] unsigned long scheduleId, [in] unsigned char[] salt, [in] unsigned long authSubType ) ``` -**描述:** +**描述:** 定义请求获取口令数据回调函数。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | salt | 盐值,用于对口令明文进行单向处理。 | | authSubType | 口令子类型,如六位数字PIN码等。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -64,18 +64,18 @@ IExecutorCallback::OnGetData ([in] unsigned long scheduleId, [in] unsigned char[ IExecutorCallback::OnResult ([in] int result, [in] unsigned char[] extraInfo ) ``` -**描述:** +**描述:** 定义操作请求处理结果回调函数。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | result | 操作请求处理结果。 | | extraInfo | 其他相关信息,如用户认证通过时用于返回执行器签发的认证令牌等。 | -**返回:** +**返回:** 0 表示操作成功。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_executor.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_executor_faceauth.md similarity index 54% rename from zh-cn/device-dev/reference/hdi-apis/interface_i_executor.md rename to zh-cn/device-dev/reference/hdi-apis/interface_i_executor_faceauth.md index dbf4350cce0b2562e5e73e933ec224b062dcffc2..55f70fe0dc0107eb231992c3a98d1bdafd3453f8 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_executor.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_executor_faceauth.md @@ -1,11 +1,11 @@ # IExecutor -## **概述** +## 概述 定义执行器接口,用于获取执行器,获取凭据模版信息,注册人脸特征模版,进行用户人脸认证,删除人脸特征模版等。 -**Since:** +**Since:** 3.2 @@ -13,31 +13,30 @@ 1.0 -**所属模块:** +**相关模块:** [HdfFaceAuth](_hdf_face_auth.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [GetExecutorInfo](#getexecutorinfo)([out] struct ExecutorInfo executorInfo) | 获取执行器信息,人脸认证服务将执行器注册到用户认证框架时需要通过该接口获取对应信息。 | -| [GetTemplateInfo](#gettemplateinfo)([in] unsigned long templateId, [out] struct TemplateInfo templateInfo) | 获取凭据模版信息。 | -| [OnRegisterFinish](#onregisterfinish)([in] unsigned long[] templateIdList, [in] unsigned char[] frameworkPublicKey, [in] unsigned char[] extraInfo) | 完成执行器注册,对人脸特征模版进行对账,用于删除无效的人脸特征模板及相关信息。 | -| [Enroll](#enroll)([in] unsigned long scheduleId, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj) | 注册人脸特征模版。 | -| [Authenticate](#authenticate)([in] unsigned long scheduleId, [in] unsigned long[] templateIdList, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj) | 人脸认证。 | -| [Identify](#identify)([in] unsigned long scheduleId, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj) | 人脸识别。 | -| [Delete](#delete)([in] unsigned long[] templateIdList) | 删除人脸特征模版。 | -| [Cancel](#cancel)([in] unsigned long scheduleId) | 取消操作请求。 | -| [SendCommand](#sendcommand)([in] int commandId, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj) | 发送人脸认证功能相关操作命令。 | -| [SetBufferProducer](#setbufferproducer) ([in] BufferProducerSequenceable bufferProducer) | 设置可用缓冲区生成器。 | +| [GetExecutorInfo](#getexecutorinfo) ([out] struct [ExecutorInfo](_executor_info_faceauth.md) executorInfo) | 获取执行器信息,人脸认证服务将执行器注册到用户认证框架时需要通过该接口获取对应信息。 | +| [GetTemplateInfo](#gettemplateinfo) ([in] unsigned long templateId, [out] struct [TemplateInfo](_template_info_faceauth.md) templateInfo) | 获取凭据模版信息。 | +| [OnRegisterFinish](#onregisterfinish) ([in] unsigned long[] templateIdList, [in] unsigned char[] frameworkPublicKey, [in] unsigned char[] extraInfo) | 完成执行器注册,对人脸特征模版进行对账,用于删除无效的人脸特征模板及相关信息。 | +| [Enroll](#enroll) ([in] unsigned long scheduleId, [in] unsigned char[] extraInfo, [in] [IExecutorCallback](interface_i_executor_callback_faceauth.md) callbackObj) | 注册人脸特征模版。 | +| [Authenticate](#authenticate) ([in] unsigned long scheduleId, [in] unsigned long[] templateIdList, [in] unsigned char[] extraInfo, [in] [IExecutorCallback](interface_i_executor_callback_faceauth.md) callbackObj) | 人脸认证。 | +| [Identify](#identify) ([in] unsigned long scheduleId, [in] unsigned char[] extraInfo, [in] [IExecutorCallback](interface_i_executor_callback_faceauth.md) callbackObj) | 人脸识别。 | +| [Delete](#delete) ([in] unsigned long[] templateIdList) | 删除人脸特征模版。 | +| [Cancel](#cancel) ([in] unsigned long scheduleId) | 取消操作请求。 | +| [SendCommand](#sendcommand) ([in] int commandId, [in] unsigned char[] extraInfo, [in] [IExecutorCallback](interface_i_executor_callback_faceauth.md) callbackObj) | 发送人脸认证功能相关操作命令。 | -## **成员函数说明** +## 成员函数说明 ### Authenticate() @@ -47,20 +46,20 @@ IExecutor::Authenticate ([in] unsigned long scheduleId, [in] unsigned long[] templateIdList, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj ) ``` -**描述:** +**描述:** 人脸认证。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | scheduleId | 调度ID,用于标识一次操作请求的调度过程。 | | templateIdList | 指定要认证的模版ID列表。 | | extraInfo | 其他相关信息,用于支持信息扩展。 | -| callbackObj | 回调对象[IExecutorCallback](interface_i_executor_callback.md)。 | +| callbackObj | 回调对象[IExecutorCallback](interface_i_executor_callback_faceauth.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -74,17 +73,17 @@ IExecutor::Authenticate ([in] unsigned long scheduleId, [in] unsigned long[] tem IExecutor::Cancel ([in] unsigned long scheduleId) ``` -**描述:** +**描述:** 取消操作请求。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | scheduleId | 调度ID,用于标识一次操作请求的调度过程。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -98,17 +97,17 @@ IExecutor::Cancel ([in] unsigned long scheduleId) IExecutor::Delete ([in] unsigned long[] templateIdList) ``` -**描述:** +**描述:** 删除人脸特征模版。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | templateIdList | 指定要删除的模版ID列表。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -122,19 +121,19 @@ IExecutor::Delete ([in] unsigned long[] templateIdList) IExecutor::Enroll ([in] unsigned long scheduleId, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj ) ``` -**描述:** +**描述:** 注册人脸特征模版。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | scheduleId | 调度ID,用于标识一次操作请求的调度过程。 | | extraInfo | 其他相关信息,用于支持信息扩展。 | -| callbackObj | 回调对象[IExecutorCallback](interface_i_executor_callback.md)。 | +| callbackObj | 回调对象[IExecutorCallback](interface_i_executor_callback_faceauth.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -148,17 +147,17 @@ IExecutor::Enroll ([in] unsigned long scheduleId, [in] unsigned char[] extraInfo IExecutor::GetExecutorInfo ([out] struct ExecutorInfo executorInfo) ``` -**描述:** +**描述:** 获取执行器信息,人脸认证服务将执行器注册到用户认证框架时需要通过该接口获取对应信息。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| executorInfo | 执行器信息[ExecutorInfo](_executor_info.md)。 | +| executorInfo | 执行器信息[ExecutorInfo](_executor_info_faceauth.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -172,18 +171,18 @@ IExecutor::GetExecutorInfo ([out] struct ExecutorInfo executorInfo) IExecutor::GetTemplateInfo ([in] unsigned long templateId, [out] struct TemplateInfo templateInfo ) ``` -**描述:** +**描述:** 获取凭据模版信息。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | templateId | 凭据模版ID。 | -| templateInfo | 凭据模版信息[TemplateInfo](_template_info.md)。 | +| templateInfo | 凭据模版信息[TemplateInfo](_template_info_faceauth.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -197,19 +196,19 @@ IExecutor::GetTemplateInfo ([in] unsigned long templateId, [out] struct Template IExecutor::Identify ([in] unsigned long scheduleId, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj ) ``` -**描述:** +**描述:** 人脸识别。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | scheduleId | 调度ID,用于标识一次操作请求的调度过程。 | | extraInfo | 其他相关信息,用于支持信息扩展。 | -| callbackObj | 回调对象[IExecutorCallback](interface_i_executor_callback.md)。 | +| callbackObj | 回调对象[IExecutorCallback](interface_i_executor_callback_faceauth.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -223,11 +222,11 @@ IExecutor::Identify ([in] unsigned long scheduleId, [in] unsigned char[] extraIn IExecutor::OnRegisterFinish ([in] unsigned long[] templateIdList, [in] unsigned char[] frameworkPublicKey, [in] unsigned char[] extraInfo ) ``` -**描述:** +**描述:** 完成执行器注册,对人脸特征模版进行对账,用于删除无效的人脸特征模板及相关信息。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | @@ -235,33 +234,7 @@ IExecutor::OnRegisterFinish ([in] unsigned long[] templateIdList, [in] unsigned | frameworkPublicKey | 用户认证框架的公钥,用于校验用户认证框架私钥签名的信息。 | | extraInfo | 其他相关信息,用于支持信息扩展。 | -**返回:** - -0 表示操作成功。 - -非0 表示操作失败。 - - -### OnSetData() - - -``` -IExecutor::OnSetData ([in] unsigned long scheduleId, [in] unsigned long authSubType, [in] unsigned char[] data ) -``` - -**描述:** - -设置口令数据,口令认证驱动处理注册或认证口令请求时,如果口令数据由口令认证服务获取,需要通过该接口将口令数据传给口令认证驱动。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| scheduleId | 调度ID,用于标识一次操作请求的调度过程。 | -| authSubType | 口令子类型,如六位数字PIN码等。 | -| data | 口令数据。 | - -**返回:** +**返回:** 0 表示操作成功。 @@ -275,42 +248,19 @@ IExecutor::OnSetData ([in] unsigned long scheduleId, [in] unsigned long authSubT IExecutor::SendCommand ([in] int commandId, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj ) ``` -**描述:** +**描述:** 发送人脸认证功能相关操作命令。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| commandId | 操作命令ID。 | +| commandId | 操作命令ID[CommandId](_hdf_face_auth.md#commandid)。 | | extraInfo | 其他相关信息,用于支持信息扩展。 | -| callbackObj | 回调对象[IExecutorCallback](interface_i_executor_callback.md)。 | - -**返回:** - -0 表示操作成功。 - -非0 表示操作失败。 - -### SetBufferProducer() - - -``` -IExecutor::SetBufferProducer ([in] BufferProducerSequenceable bufferProducer ) -``` - -**描述:** - -设置可用缓冲区生成器。用于传递相机预览流,开始录入前设置为有效值,结束录入后设置为空指针。 - -**参数:** - - | 名称 | 描述 | -| -------- | -------- | -| bufferProducer | 可用缓冲区生成器。 | +| callbackObj | 回调对象[IExecutorCallback](interface_i_executor_callback_faceauth.md)。 | -**返回:** +**返回:** 0 表示操作成功。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_pin_i_executor.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_executor_pinauth.md similarity index 70% rename from zh-cn/device-dev/reference/hdi-apis/interface_pin_i_executor.md rename to zh-cn/device-dev/reference/hdi-apis/interface_i_executor_pinauth.md index dd911a53c9d501fcae7e23004f394a8e35ce17bf..7a180d3a62015c846efbed4501e56384c6fc844c 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_pin_i_executor.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_executor_pinauth.md @@ -1,11 +1,11 @@ # IExecutor -## **概述** +## 概述 定义执行器标准API接口。接口可用于获取执行器信息,获取凭据模版信息,注册口令,认证口令,删除口令等。 -**Since:** +**Since:** 3.2 @@ -13,30 +13,30 @@ 1.0 -**所属模块:** +**相关模块:** [HdfPinAuth](_hdf_pin_auth.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [GetTemplateInfo](#gettemplateinfo)([in] unsigned long templateId, [out] struct TemplateInfo templateInfo) | 获取凭据模版信息。 | -| [Cancel](#cancel)([in] unsigned long scheduleId) | 取消操作请求。 | -| [GetExecutorInfo](#getexecutorinfo) ([out] struct ExecutorInfo executorInfo) | 获取执行器信息,口令认证服务将执行器注册到用户认证框架时需要通过该接口获取对应信息。 | +| [GetExecutorInfo](#getexecutorinfo) ([out] struct [ExecutorInfo](_executor_info_pinauth.md) executorInfo) | 获取执行器信息,口令认证服务将执行器注册到用户认证框架时需要通过该接口获取对应信息。 | +| [GetTemplateInfo](#gettemplateinfo) ([in] unsigned long templateId, [out] struct [TemplateInfo](_template_info_pinauth.md) templateInfo) | 获取凭据模版信息。 | | [OnRegisterFinish](#onregisterfinish) ([in] unsigned long[] templateIdList, [in] unsigned char[] frameworkPublicKey, [in] unsigned char[] extraInfo) | 完成执行器注册,对口令模版信息进行对账,用于删除无效的口令模板及相关信息。 | -| [OnSetData](#onsetdata)([in] unsigned long scheduleId, [in] unsigned long authSubType, [in] unsigned char[] data) | 设置口令数据,口令认证驱动处理注册或认证口令请求时,如果口令数据由口令认证服务获取,需要通过该接口将口令数据传给口令认证驱动。 | -| [Enroll](#enroll) ([in] unsigned long scheduleId, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj) | 注册口令。 | -| [Authenticate](#authenticate) ([in] unsigned long scheduleId, [in] unsigned long templateId, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj) | 认证口令。 | +| [OnSetData](#onsetdata) ([in] unsigned long scheduleId, [in] unsigned long authSubType, [in] unsigned char[] data) | 设置口令数据,口令认证驱动处理注册或认证口令请求时,如果口令数据由口令认证服务获取,需要通过该接口将口令数据传给口令认证驱动。 | +| [Enroll](#enroll) ([in] unsigned long scheduleId, [in] unsigned char[] extraInfo, [in] [IExecutorCallback](interface_i_executor_callback_pinauth.md) callbackObj) | 注册口令。 | +| [Authenticate](#authenticate) ([in] unsigned long scheduleId, [in] unsigned long templateId, [in] unsigned char[] extraInfo, [in] [IExecutorCallback](interface_i_executor_callback_pinauth.md) callbackObj) | 认证口令。 | | [Delete](#delete) ([in] unsigned long templateId) | 删除口令。 | -| [SendCommand](#sendcommand) ([in] int commandId, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj) | 发送口令认证功能相关操作命令。 | +| [Cancel](#cancel) ([in] unsigned long scheduleId) | 取消操作请求。 | +| [SendCommand](#sendcommand) ([in] int commandId, [in] unsigned char[] extraInfo, [in] [IExecutorCallback](interface_i_executor_callback_pinauth.md) callbackObj) | 发送口令认证功能相关操作命令。 | -## **成员函数说明** +## 成员函数说明 ### Authenticate() @@ -46,20 +46,20 @@ IExecutor::Authenticate ([in] unsigned long scheduleId, [in] unsigned long templateId, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj ) ``` -**描述:** +**描述:** 认证口令。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | scheduleId | 调度ID,用于标识一次操作请求的调度过程。 | | templateId | 指定要认证的模版ID。 | | extraInfo | 其他相关信息,用于支持信息扩展。 | -| callbackObj | 回调对象[IExecutorCallback](interface_pin_i_executor_callback.md)。 | +| callbackObj | 回调对象[IExecutorCallback](interface_i_executor_callback_pinauth.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -73,17 +73,17 @@ IExecutor::Authenticate ([in] unsigned long scheduleId, [in] unsigned long templ IExecutor::Cancel ([in] unsigned long scheduleId) ``` -**描述:** +**描述:** 取消操作请求。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | scheduleId | 调度ID,用于标识一次操作请求的调度过程。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -97,17 +97,17 @@ IExecutor::Cancel ([in] unsigned long scheduleId) IExecutor::Delete ([in] unsigned long templateId) ``` -**描述:** +**描述:** 删除口令。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | templateId | 模版ID。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -121,19 +121,19 @@ IExecutor::Delete ([in] unsigned long templateId) IExecutor::Enroll ([in] unsigned long scheduleId, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj ) ``` -**描述:** +**描述:** 注册口令。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | scheduleId | 调度ID,用于标识一次操作请求的调度过程。 | | extraInfo | 其他相关信息,用于支持信息扩展。 | -| callbackObj | 回调对象[IExecutorCallback](interface_pin_i_executor_callback.md)。 | +| callbackObj | 回调对象[IExecutorCallback](interface_i_executor_callback_pinauth.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -147,17 +147,17 @@ IExecutor::Enroll ([in] unsigned long scheduleId, [in] unsigned char[] extraInfo IExecutor::GetExecutorInfo ([out] struct ExecutorInfo executorInfo) ``` -**描述:** +**描述:** 获取执行器信息,口令认证服务将执行器注册到用户认证框架时需要通过该接口获取对应信息。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| executorInfo | 执行器信息[ExecutorInfo](_executor_info.md)。 | +| executorInfo | 执行器信息[ExecutorInfo](_executor_info_pinauth.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -171,18 +171,18 @@ IExecutor::GetExecutorInfo ([out] struct ExecutorInfo executorInfo) IExecutor::GetTemplateInfo ([in] unsigned long templateId, [out] struct TemplateInfo templateInfo ) ``` -**描述:** +**描述:** 获取凭据模版信息。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | templateId | 凭据模版ID。 | -| templateInfo | 凭据模版信息[TemplateInfo](_template_info.md)。 | +| templateInfo | 凭据模版信息[TemplateInfo](_template_info_pinauth.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -196,11 +196,11 @@ IExecutor::GetTemplateInfo ([in] unsigned long templateId, [out] struct Template IExecutor::OnRegisterFinish ([in] unsigned long[] templateIdList, [in] unsigned char[] frameworkPublicKey, [in] unsigned char[] extraInfo ) ``` -**描述:** +**描述:** 完成执行器注册,对口令模版信息进行对账,用于删除无效的口令模板及相关信息。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | @@ -208,7 +208,7 @@ IExecutor::OnRegisterFinish ([in] unsigned long[] templateIdList, [in] unsigned | frameworkPublicKey | 用户认证框架的公钥,用于校验用户认证框架私钥签名的信息。 | | extraInfo | 其他相关信息,用于支持信息扩展。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -222,11 +222,11 @@ IExecutor::OnRegisterFinish ([in] unsigned long[] templateIdList, [in] unsigned IExecutor::OnSetData ([in] unsigned long scheduleId, [in] unsigned long authSubType, [in] unsigned char[] data ) ``` -**描述:** +**描述:** 设置口令数据,口令认证驱动处理注册或认证口令请求时,如果口令数据由口令认证服务获取,需要通过该接口将口令数据传给口令认证驱动。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | @@ -234,7 +234,7 @@ IExecutor::OnSetData ([in] unsigned long scheduleId, [in] unsigned long authSubT | authSubType | 口令子类型,如六位数字PIN码等。 | | data | 口令数据。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -248,19 +248,19 @@ IExecutor::OnSetData ([in] unsigned long scheduleId, [in] unsigned long authSubT IExecutor::SendCommand ([in] int commandId, [in] unsigned char[] extraInfo, [in] IExecutorCallback callbackObj ) ``` -**描述:** +**描述:** 发送口令认证功能相关操作命令。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| commandId | 操作命令ID。 | +| commandId | 操作命令ID[CommandId](_hdf_pin_auth.md#commandid)。 | | extraInfo | 其他相关信息,用于支持信息扩展。 | -| callbackObj | 回调对象[IExecutorCallback](interface_pin_i_executor_callback.md)。 | +| callbackObj | 回调对象[IExecutorCallback](interface_i_executor_callback_pinauth.md)。 | -**返回:** +**返回:** 0 表示操作成功。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_face_auth_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_face_auth_interface.md index d92d37b17762985a90a29d72c49aaa8c742e2c52..e474af68bdb1d3830e3846b2a0f392e79f966e15 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_face_auth_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_face_auth_interface.md @@ -1,34 +1,30 @@ # IFaceAuthInterface -## **概述** +## 概述 定义获取人脸认证驱动的执行器列表接口。 -**Since:** - +**Since:** 3.2 - **Version:** - 1.0 - -**所属模块:** +**相关模块:** [HdfFaceAuth](_hdf_face_auth.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [GetExecutorList](#getexecutorlist) ([out] IExecutor[] executorList) | 获取执行器列表,人脸认证服务进程启动进行初始化操作时通过该接口获取人脸认证驱动支持的执行器列表。 | +| [GetExecutorList](#getexecutorlist) ([out] [IExecutor](interface_i_executor_faceauth.md)[] executorList) | 获取执行器列表,人脸认证服务进程启动进行初始化操作时通过该接口获取人脸认证驱动支持的执行器列表。  | -## **成员函数说明** +## 成员函数说明 ### GetExecutorList() @@ -37,18 +33,16 @@ ``` IFaceAuthInterface::GetExecutorList ([out] IExecutor[] executorList) ``` - -**描述:** - +**描述:** 获取执行器列表,人脸认证服务进程启动进行初始化操作时通过该接口获取人脸认证驱动支持的执行器列表。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| executorList | 执行器对象列表[IExecutor](interface_i_executor.md)。 | +| executorList | 执行器对象列表[IExecutor](interface_i_executor_faceauth.md)。 | -**返回:** +**返回:** 0 表示操作成功。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_geofence_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_geofence_callback.md new file mode 100644 index 0000000000000000000000000000000000000000..b2a0dcd156ea6e1a6110c5a6bda028b216ea6b19 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_geofence_callback.md @@ -0,0 +1,219 @@ +# IGeofenceCallback + + +## 概述 + +定义地理围栏模块的回调函数。 + +用户在开启地理围栏功能前,需要先注册该回调函数。当地理围栏状态发生变化时,会通过回调函数进行上报。 详情可参考[ICellfenceInterface](interface_i_cellfence_interface.md)。 + +**Since:** + +4.0 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [OnGeofenceAddResultCb](#ongeofenceaddresultcb) ([in] struct [GeofenceResult](_geofence_result.md)[] res) | 定义添加地理围栏结果的回调函数。 | +| [OnGeofenceRemoveResultCb](#ongeofenceremoveresultcb) ([in] struct [GeofenceResult](_geofence_result.md)[] res) | 定义删除地理围栏结果的回调函数。 | +| [OnGeofenceTransitionCb](#ongeofencetransitioncb) ([in] int geofenceId, [in] struct [GeoLocationInfo](_geo_location_info.md) location, [in] unsigned char transition, [in] long timeStamp) | 定义地理围栏状态变化的回调函数。 | +| [OnGetGeofenceSizeCb](#ongetgeofencesizecb) ([in] struct [GeofenceSize](_geofence_size.md) size) | 定义地理围栏使用信息的回调函数。 | +| [OnGeofenceRequestCellDb](#ongeofencerequestcelldb) ([in] struct [RequestCellDb](_request_cell_db.md) req) | 定义请求基站离线数据库的回调函数。 | +| [OnGetCurrentLocation](#ongetcurrentlocation) ([in] int locSource, [in] struct [GeoLocationInfo](_geo_location_info.md) location) | 定义获取设备最新位置信息的回调函数。 | +| [OnGeofenceReset](#ongeofencereset) () | 定义低功耗围栏服务复位事件通知的回调函数。 | + + +## 成员函数说明 + + +### OnGeofenceAddResultCb() + + +``` +IGeofenceCallback::OnGeofenceAddResultCb ([in] struct GeofenceResult[] res) +``` + +**描述:** + +定义添加地理围栏结果的回调函数。 + +对每个地理围栏的添加结果,通过该回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| res | 上报地理围栏添加结果。详见[GeofenceResult](_geofence_result.md)定义。 | + +**返回:** + +如果调用成功,则返回0。 + +如果调用失败,则返回负值。 + + +### OnGeofenceRemoveResultCb() + + +``` +IGeofenceCallback::OnGeofenceRemoveResultCb ([in] struct GeofenceResult[] res) +``` + +**描述:** + +定义删除地理围栏结果的回调函数。 + +对每个地理围栏的删除结果,通过该回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| res | 上报地理围栏删除结果。详见[GeofenceResult](_geofence_result.md)定义。 | + +**返回:** + +如果调用成功,则返回0。 + +如果调用失败,则返回负值。 + + +### OnGeofenceRequestCellDb() + + +``` +IGeofenceCallback::OnGeofenceRequestCellDb ([in] struct RequestCellDb req) +``` + +**描述:** + +定义请求基站离线数据库的回调函数。 + +设备请求基站离线数据库时,会通过该回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| req | 请求基站离线数据库数据结构。详见[RequestCellDb](_request_cell_db.md)定义。 | + +**返回:** + +如果调用成功,则返回0。 + +如果调用失败,则返回负值。 + + +### OnGeofenceReset() + + +``` +IGeofenceCallback::OnGeofenceReset () +``` + +**描述:** + +定义低功耗围栏服务复位事件通知的回调函数。 + +低功耗围栏服务发生复位时会通过该回调函数进行事件上报。 + +**返回:** + +如果回调函数调用成功,则返回0。 + +如果回调函数调用失败,则返回负值。 + + +### OnGeofenceTransitionCb() + + +``` +IGeofenceCallback::OnGeofenceTransitionCb ([in] int geofenceId, [in] struct GeoLocationInfo location, [in] unsigned char transition, [in] long timeStamp ) +``` + +**描述:** + +定义地理围栏状态变化的回调函数。 + +设备与地理围栏的状态关系发生变化时,会通过该回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| geofenceId | 地理围栏id号。 | +| location | 最新的位置坐标。详见[GeoLocationInfo](_geo_location_info.md)定义。 | +| transition | 地理围栏变化的状态。详见[GeofenceTransition](_hdi_lpfence_geofence.md#geofencetransition)定义。 | +| timeStamp | 时间戳。 | + +**返回:** + +如果调用成功,则返回0。 + +如果调用失败,则返回负值。 + + +### OnGetCurrentLocation() + + +``` +IGeofenceCallback::OnGetCurrentLocation ([in] int locSource, [in] struct GeoLocationInfo location ) +``` + +**描述:** + +定义获取设备最新位置信息的回调函数。 + +请求获取设备最新位置信息时,会通过该回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| locSource | 位置信息来源。详见[GeofenceLocSource](_hdi_lpfence_geofence.md#geofencelocsource)定义。 | +| location | 最新位置信息。详见[GeoLocationInfo](_geo_location_info.md)定义。 | + +**返回:** + +如果调用成功,则返回0。 + +如果调用失败,则返回负值。 + + +### OnGetGeofenceSizeCb() + + +``` +IGeofenceCallback::OnGetGeofenceSizeCb ([in] struct GeofenceSize size) +``` + +**描述:** + +定义地理围栏使用信息的回调函数。 + +获取地理围栏使用信息时,会通过该回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| size | 地理围栏使用信息。详见[GeofenceSize](_geofence_size.md)定义。 | + +**返回:** + +如果调用成功,则返回0。 + +如果调用失败,则返回负值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_geofence_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_geofence_interface.md new file mode 100644 index 0000000000000000000000000000000000000000..e0d8070113dd09abf0036f28c9f072b40b39fac9 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_geofence_interface.md @@ -0,0 +1,264 @@ +# IGeofenceInterface + + +## 概述 + +定义对地理围栏模块进行基本操作的接口。 + +接口包含注册回调函数,取消注册回调函数,添加圆形和多边形地理围栏,删除地理围栏,获取地理围栏状态信息,获取设备地理位置,下发基站离线数据库。 + +**Since:** + +4.0 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceGeofence](_hdi_lpfence_geofence.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [RegisterGeofenceCallback](#registergeofencecallback) ([in] [IGeofenceCallback](interface_i_geofence_callback.md) callbackObj) | 注册回调函数。 | +| [UnregisterGeofenceCallback](#unregistergeofencecallback) ([in] [IGeofenceCallback](interface_i_geofence_callback.md) callbackObj) | 取消注册回调函数。 | +| [AddCircleGeofences](#addcirclegeofences) ([in] struct [GeofenceCircleRequest](_geofence_circle_request.md)[] circleGeofences) | 添加圆形地理围栏。 | +| [AddPolygonGeofences](#addpolygongeofences) ([in] struct [GeofencePolygonRequest](_geofence_polygon_request.md)[] polygonGeofences) | 添加多边形地理围栏。 | +| [RemoveGeofences](#removegeofences) ([in] int[] geofenceId) | 删除地理围栏。 | +| [GetGeofenceStatus](#getgeofencestatus) ([in] int geofenceId) | 获取当前设备与一个地理围栏的状态关系。 | +| [GetGeofenceLocation](#getgeofencelocation) () | 获取最新的位置信息。 | +| [GetGeofenceSize](#getgeofencesize) () | 获取地理围栏使用信息。 | +| [SendCellOfflineDb](#sendcellofflinedb) ([in] struct [OfflineDb](_offline_db.md) dbData, [in] int cellType) | 下发基站离线数据库数据。 | + + +## 成员函数说明 + + +### AddCircleGeofences() + + +``` +IGeofenceInterface::AddCircleGeofences ([in] struct GeofenceCircleRequest[] circleGeofences) +``` + +**描述:** + +添加圆形地理围栏。 + +支持一次添加多个圆形地理围栏 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| circleGeofences | 添加圆形围栏信息。详见[GeofenceCircleRequest](_geofence_circle_request.md)。 | + +**返回:** + +如果添加成功,则返回0。 + +如果添加失败,则返回负值。 + + +### AddPolygonGeofences() + + +``` +IGeofenceInterface::AddPolygonGeofences ([in] struct GeofencePolygonRequest[] polygonGeofences) +``` + +**描述:** + +添加多边形地理围栏。 + +支持一次添加多个多边形地理围栏 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| polygonGeofences | 添加多边形围栏信息。详见[GeofencePolygonRequest](_geofence_polygon_request.md)。 | + +**返回:** + +如果添加成功,则返回0。 + +如果添加失败,则返回负值。 + + +### GetGeofenceLocation() + + +``` +IGeofenceInterface::GetGeofenceLocation () +``` + +**描述:** + +获取最新的位置信息。 + +位置信息通过回调函数上报。详见[OnGetCurrentLocation](interface_i_geofence_callback.md#ongetcurrentlocation)定义。 + +**返回:** + +如果调用成功,则返回0。 + +如果调用失败,则返回负值。 + + +### GetGeofenceSize() + + +``` +IGeofenceInterface::GetGeofenceSize () +``` + +**描述:** + +获取地理围栏使用信息。 + +查看当前设备支持添加的地理围栏最大个数和已添加的地理围栏个数。通过回调函数上报通知,详见[OnGetGeofenceSizeCb](interface_i_geofence_callback.md#ongetgeofencesizecb)。 + +**返回:** + +如果调用成功,则返回0。 + +如果调用失败,则返回负值。 + + +### GetGeofenceStatus() + + +``` +IGeofenceInterface::GetGeofenceStatus ([in] int geofenceId) +``` + +**描述:** + +获取当前设备与一个地理围栏的状态关系。 + +设备与地理围栏的状态关系详见[GeofenceTransition](_hdi_lpfence_geofence.md#geofencetransition)定义。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| geofenceId | 地理围栏id号。 | + +**返回:** + +返回位置关系。详见[GeofenceTransition](_hdi_lpfence_geofence.md#geofencetransition)定义。 + +如果调用失败,则返回负值。 + + +### RegisterGeofenceCallback() + + +``` +IGeofenceInterface::RegisterGeofenceCallback ([in] IGeofenceCallback callbackObj) +``` + +**描述:** + +注册回调函数。 + +用户在开启地理围栏功能前,需要先注册该回调函数。当地理围栏状态发生变化时,会通过回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| callbackObj | 要注册的回调函数,只需成功订阅一次,无需重复订阅。详见[IGeofenceCallback](interface_i_geofence_callback.md)。 | + +**返回:** + +如果注册回调函数成功,则返回0。 + +如果注册回调函数失败,则返回负值。 + + +### RemoveGeofences() + + +``` +IGeofenceInterface::RemoveGeofences ([in] int[] geofenceId) +``` + +**描述:** + +删除地理围栏。 + +支持一次删除多个地理围栏。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| geofenceId | 地理围栏id号。详见[GeofenceCircleRequest](_geofence_circle_request.md)和[GeofencePolygonRequest](_geofence_polygon_request.md)。 | + +**返回:** + +如果删除成功,则返回0。 + +如果删除失败,则返回负值。 + + +### SendCellOfflineDb() + + +``` +IGeofenceInterface::SendCellOfflineDb ([in] struct OfflineDb dbData, [in] int cellType ) +``` + +**描述:** + +下发基站离线数据库数据。 + +若请求离线数据库数据成功,则上层服务通过该接口将数据下发。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| dbData | 基站离线数据库数据。详见[OfflineDb](_offline_db.md)定义。 | +| cellType | 基站主区的移动通信技术代。详见[GeofenceCellType](_hdi_lpfence_geofence.md#geofencecelltype)定义。 | + +**返回:** + +如果调用成功,则返回0。 + +如果调用失败,则返回负值。 + + +### UnregisterGeofenceCallback() + + +``` +IGeofenceInterface::UnregisterGeofenceCallback ([in] IGeofenceCallback callbackObj) +``` + +**描述:** + +取消注册回调函数。 + +取消之前注册的回调函数。当不需要使用地理围栏功能,或需要更换回调函数时,需要取消注册回调函数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| callbackObj | 要取消注册的回调函数,只需成功取消订阅一次,无需重复取消订阅。详见[IGeofenceCallback](interface_i_geofence_callback.md)。 | + +**返回:** + +如果取消注册回调函数成功,则返回0。 + +如果取消注册回调函数失败,则返回负值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_light_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_light_interface.md index 5a894832572b1c291dfe7c50bd28f2986c48683d..21a96376a1aa58ea0df708ab2c0c17e0eda3f107 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_light_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_light_interface.md @@ -1,39 +1,35 @@ # ILightInterface -## **概述** +## 概述 提供灯模块基本操作接口。 操作包括获取灯的信息、打开或关闭灯、设置灯的亮度或闪烁模式。 **Since:** - 3.1 - **Version:** - 1.0 - **相关模块:** -[Light](light.md) +[Light](_light.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [GetLightInfo](#getlightinfo) ([out] struct [HdfLightInfo](_hdf_light_info.md)[] info) | 获取当前系统中所有类型的灯信息。 | -| [TurnOnLight](#turnonlight) ([in] int lightId, [in] struct [HdfLightEffect](_hdf_light_effect.md) effect) | 根据指定的灯类型ID打开列表中的可用灯。 | -| [TurnOnMultiLights](#turnonmultilights) ([in] int lightId, [in] struct [HdfLightColor](_hdf_light_color.md)[] colors) | 根据指定的灯类型ID打开相应灯中包含的多个子灯。 | -| [TurnOffLight](#turnofflight) ([in] int lightId) | 根据指定的灯类型ID关闭列表中的可用灯。 | +| [GetLightInfo](#getlightinfo) ([out] struct [HdfLightInfo](_hdf_light_info.md)[] info) | 获取当前系统中所有类型的灯信息。  | +| [TurnOnLight](#turnonlight) ([in] int lightId, [in] struct [HdfLightEffect](_hdf_light_effect.md) effect) | 根据指定的灯类型ID打开列表中的可用灯。  | +| [TurnOnMultiLights](#turnonmultilights) ([in] int lightId, [in] struct [HdfLightColor](_hdf_light_color.md)[] colors) | 根据指定的灯类型ID打开相应灯中包含的多个子灯。  | +| [TurnOffLight](#turnofflight) ([in] int lightId) | 根据指定的灯类型ID关闭列表中的可用灯。  | -## **成员函数说明** +## 成员函数说明 ### GetLightInfo() @@ -42,9 +38,7 @@ ``` ILightInterface::GetLightInfo ([out] struct HdfLightInfo[] info) ``` - -**描述:** - +**描述:** 获取当前系统中所有类型的灯信息。 **参数:** @@ -66,16 +60,14 @@ ILightInterface::GetLightInfo ([out] struct HdfLightInfo[] info) ``` ILightInterface::TurnOffLight ([in] int lightId) ``` - -**描述:** - +**描述:** 根据指定的灯类型ID关闭列表中的可用灯。 **参数:** | 名称 | 描述 | | -------- | -------- | -| lightId | 表示灯类型ID,详见[HdfLightId](light.md#hdflightid)。 | +| lightId | 表示灯类型ID,详见[HdfLightId](_light.md#hdflightid)。 | **返回:** @@ -90,16 +82,14 @@ ILightInterface::TurnOffLight ([in] int lightId) ``` ILightInterface::TurnOnLight ([in] int lightId, [in] struct HdfLightEffect effect ) ``` - -**描述:** - +**描述:** 根据指定的灯类型ID打开列表中的可用灯。 **参数:** | 名称 | 描述 | | -------- | -------- | -| lightId | 表示灯类型ID。详见[HdfLightId](light.md#hdflightid)。 | +| lightId | 表示灯类型ID。详见[HdfLightId](_light.md#hdflightid)。  | | effect | 表示指向灯效果的指针,如果lightbrightness字段为0时, 灯的亮度根据HCS配置的默认亮度进行设置。详见[HdfLightEffect](_hdf_light_effect.md)。 | **返回:** @@ -119,16 +109,14 @@ ILightInterface::TurnOnLight ([in] int lightId, [in] struct HdfLightEffect effec ``` ILightInterface::TurnOnMultiLights ([in] int lightId, [in] struct HdfLightColor[] colors ) ``` - -**描述:** - +**描述:** 根据指定的灯类型ID打开相应灯中包含的多个子灯。 **参数:** | 名称 | 描述 | | -------- | -------- | -| lightId | 表示灯类型ID,详见[HdfLightId](light.md#hdflightid)。 | +| lightId | 表示灯类型ID,详见[HdfLightId](_light.md#hdflightid)。  | | colors | 多个子灯对应的颜色和亮度, 详见[HdfLightColor](_hdf_light_color.md)。 | **返回:** diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_motion_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_motion_callback.md index 39c11481f893e1741b5681eaf8d8be330cb2748a..23b9d193d3137895cd31e0f3a91323aea61d7938 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_motion_callback.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_motion_callback.md @@ -1,32 +1,30 @@ # IMotionCallback -## **概述** +## 概述 定义上报手势识别数据回调函数。 手势识别用户在订阅手势识别数据时需要注册这个回调函数,只有当使能手势识别后,手势识别数据用户才会收到手势识别数据。 详情可参考[IMotionInterface](interface_i_motion_interface.md)。 **Since:** - 3.2 - **相关模块:** -[Motion](motion.md) +[Motion](_motion.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [OnDataEvent](#ondataevent) ([in] struct [HdfMotionEvent](_hdf_motion_event.md) event) | 定义上报手势识别数据回调函数。 | +| [OnDataEvent](#ondataevent) ([in] struct [HdfMotionEvent](_hdf_motion_event.md) event) | 定义上报手势识别数据回调函数。  | -## **成员函数说明** +## 成员函数说明 ### OnDataEvent() @@ -35,9 +33,7 @@ ``` IMotionCallback::OnDataEvent ([in] struct HdfMotionEvent event) ``` - -**描述:** - +**描述:** 定义上报手势识别数据回调函数。 **参数:** diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_motion_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_motion_interface.md index 80d8001ff267ae63338d19099a0887fc3868479c..5cb456ee11675ba66ca9abdbf314673cbc7e824f 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_motion_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_motion_interface.md @@ -1,7 +1,7 @@ # IMotionInterface -## **概述** +## 概述 提供Motion设备基本控制操作接口。 @@ -9,10 +9,10 @@ **相关模块:** -[Motion](motion.md) +[Motion](_motion.md) -## **汇总** +## 汇总 ### Public 成员函数 @@ -25,7 +25,7 @@ | [Unregister](#unregister) ([in] [IMotionCallback](interface_i_motion_callback.md) callbackObj) | 订阅者取消注册手势识别数据回调函数。 | -## **成员函数说明** +## 成员函数说明 ### DisableMotion() @@ -35,7 +35,7 @@ IMotionInterface::DisableMotion ([in] int motionType) ``` -**描述:** +**描述:** 去使能手势识别。 @@ -43,7 +43,13 @@ IMotionInterface::DisableMotion ([in] int motionType) | 名称 | 描述 | | -------- | -------- | -| motionType | 手势识别类型,详见[HdfMotionTypeTag](motion.md#hdfmotiontypetag)。 | +| motionType | 手势识别类型,详见[HdfMotionTypeTag](_motion.md#hdfmotiontypetag)。 | + +**返回:** + +如果操作成功,则返回0。 + +如果操作失败,则返回负值。 ### EnableMotion() @@ -53,7 +59,7 @@ IMotionInterface::DisableMotion ([in] int motionType) IMotionInterface::EnableMotion ([in] int motionType) ``` -**描述:** +**描述:** 使能手势识别。 @@ -61,7 +67,7 @@ IMotionInterface::EnableMotion ([in] int motionType) | 名称 | 描述 | | -------- | -------- | -| motionType | 手势识别类型,详见[HdfMotionTypeTag](motion.md#hdfmotiontypetag)。 | +| motionType | 手势识别类型,详见[HdfMotionTypeTag](_motion.md#hdfmotiontypetag)。 | **返回:** @@ -77,7 +83,7 @@ IMotionInterface::EnableMotion ([in] int motionType) IMotionInterface::Register ([in] IMotionCallback callbackObj) ``` -**描述:** +**描述:** 订阅者注册手势识别数据回调函数,如果注册成功,系统会将获取到的手势识别数据上报给订阅者。 @@ -101,7 +107,7 @@ IMotionInterface::Register ([in] IMotionCallback callbackObj) IMotionInterface::Unregister ([in] IMotionCallback callbackObj) ``` -**描述:** +**描述:** 订阅者取消注册手势识别数据回调函数。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_nnrt_device.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_nnrt_device.md new file mode 100644 index 0000000000000000000000000000000000000000..101de2084aba153f66cac4e7ace44577ac1c55e4 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_nnrt_device.md @@ -0,0 +1,387 @@ +# INnrtDevice + + +## 概述 + +定义了与设备相关的接口,实现设备管理和模型编译等操作。 + +当有多个设备注册时,需要保证设备名称和设备商名称的组合全局唯一。 + +**Since:** +3.2 +**Version:** +2.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [GetDeviceName](#getdevicename) ([out] String name) | 获取设备名称  | +| [GetVendorName](#getvendorname) ([out] String name) | 获取设备商名称  | +| [GetDeviceType](#getdevicetype) ([out] enum [DeviceType](_n_n_rt.md#devicetype) deviceType) | 获取设备类型  | +| [GetDeviceStatus](#getdevicestatus) ([out] enum [DeviceStatus](_n_n_rt.md#devicestatus) status) | 获取设备当前状态  | +| [GetSupportedOperation](#getsupportedoperation) ([in] struct [Model](_model.md) model, [out] boolean[] ops) | 查询设备对指定模型的算子支持程度  | +| [IsFloat16PrecisionSupported](#isfloat16precisionsupported) ([out] boolean isSupported) | 查询设备是否支持以Float16精度运算Float32的模型。  | +| [IsPerformanceModeSupported](#isperformancemodesupported) ([out] boolean isSupported) | 查询设备是否支持性能偏好设置,性能偏好的定义可以参考[PerformanceMode](_n_n_rt.md#performancemode)。  | +| [IsPrioritySupported](#isprioritysupported) ([out] boolean isSupported) | 查询设备是否支持任务优先级设置,优先级的定义可以参考[Priority](_n_n_rt.md#priority)。  | +| [IsDynamicInputSupported](#isdynamicinputsupported) ([out] boolean isSupported) | 查询设备是否支持变尺寸输入,变尺寸输入意味着同一个模型的不同次运算输入的形状可以不一样。  | +| [PrepareModel](#preparemodel) ([in] struct [Model](_model.md) model, [in] struct [ModelConfig](_model_config.md) config, [out] [IPreparedModel](interface_i_prepared_model.md) preparedModel) | 编译模型  | +| [IsModelCacheSupported](#ismodelcachesupported) ([out] boolean isSupported) | 查询是否支持模型缓存功能  | +| [PrepareModelFromModelCache](#preparemodelfrommodelcache) ([in] struct [SharedBuffer](_shared_buffer.md)[] modelCache, [in] struct [ModelConfig](_model_config.md) config, [out] [IPreparedModel](interface_i_prepared_model.md) preparedModel) | 加载模型缓存,该模型缓存是通过ExportModelCache接口导出的。  | +| [PrepareOfflineModel](#prepareofflinemodel) ([in] struct [SharedBuffer](_shared_buffer.md)[] modelCache, [in] struct [ModelConfig](_model_config.md) config, [out] [IPreparedModel](interface_i_prepared_model.md) preparedModel) | 加载离线模型文件的缓存,该离线模型是由推理框架传入NNRt并由NNRt解析得到的。  | +| [AllocateBuffer](#allocatebuffer) ([in] unsigned int length, [out] struct [SharedBuffer](_shared_buffer.md) buffer) | 申请设备共享内存,以文件描述符的形式返回,共享内存主要用于推理输入输出数据的快速传递。  | +| [ReleaseBuffer](#releasebuffer) ([in] struct [SharedBuffer](_shared_buffer.md) buffer) | 释放共享内存。  | + + +## 成员函数说明 + + +### AllocateBuffer() + + +``` +INnrtDevice::AllocateBuffer ([in] unsigned int length, [out] struct SharedBuffer buffer ) +``` +**描述:** +申请设备共享内存,以文件描述符的形式返回,共享内存主要用于推理输入输出数据的快速传递。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| length | 申请共享内存的大小,单位是字节。  | +| buffer | 共享内存的信息,包含共享内存的文件描述符和空间大小,SharedBuffer定义请查看[SharedBuffer](_shared_buffer.md)。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### GetDeviceName() + + +``` +INnrtDevice::GetDeviceName ([out] String name) +``` +**描述:** +获取设备名称 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| name | 设备名称 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### GetDeviceStatus() + + +``` +INnrtDevice::GetDeviceStatus ([out] enum DeviceStatus status) +``` +**描述:** +获取设备当前状态 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| status | 设备当前状态,DeviceStatus枚举定义了可选的设备状态,详细定义请查看[DeviceStatus](_n_n_rt.md#devicestatus)。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### GetDeviceType() + + +``` +INnrtDevice::GetDeviceType ([out] enum DeviceType deviceType) +``` +**描述:** +获取设备类型 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| deviceType | 设备类型,DeviceType枚举定义了可选的设备类型,详细定义请查看[DeviceType](_n_n_rt.md#devicetype)。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### GetSupportedOperation() + + +``` +INnrtDevice::GetSupportedOperation ([in] struct Model model, [out] boolean[] ops ) +``` +**描述:** +查询设备对指定模型的算子支持程度 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| model | AI模型,模型结构由Model定义,详细定义请查看[Model](_model.md)。  | +| ops | 算子是否支持列表,算子支持列表的顺序与在model中的顺序要一致。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### GetVendorName() + + +``` +INnrtDevice::GetVendorName ([out] String name) +``` +**描述:** +获取设备商名称 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| name | 设备商名称 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### IsDynamicInputSupported() + + +``` +INnrtDevice::IsDynamicInputSupported ([out] boolean isSupported) +``` +**描述:** +查询设备是否支持变尺寸输入,变尺寸输入意味着同一个模型的不同次运算输入的形状可以不一样。 + +如果支持变尺寸输入,模型输入Tensor的形状上用-1标记该维度是否可变。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| isSupported | 是否支持变尺寸输入。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### IsFloat16PrecisionSupported() + + +``` +INnrtDevice::IsFloat16PrecisionSupported ([out] boolean isSupported) +``` +**描述:** +查询设备是否支持以Float16精度运算Float32的模型。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| isSupported | 是否支持Float16精度。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### IsModelCacheSupported() + + +``` +INnrtDevice::IsModelCacheSupported ([out] boolean isSupported) +``` +**描述:** +查询是否支持模型缓存功能 + +若支持,则需要实现PrepareModelFromModelCache和ExportModelCache两个接口。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| isSupported | 是否支持模型缓存。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### IsPerformanceModeSupported() + + +``` +INnrtDevice::IsPerformanceModeSupported ([out] boolean isSupported) +``` +**描述:** +查询设备是否支持性能偏好设置,性能偏好的定义可以参考[PerformanceMode](_n_n_rt.md#performancemode)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| isSupported | 是否支持性能偏好设置。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### IsPrioritySupported() + + +``` +INnrtDevice::IsPrioritySupported ([out] boolean isSupported) +``` +**描述:** +查询设备是否支持任务优先级设置,优先级的定义可以参考[Priority](_n_n_rt.md#priority)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| isSupported | 是否支持性能偏好设置。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### PrepareModel() + + +``` +INnrtDevice::PrepareModel ([in] struct Model model, [in] struct ModelConfig config, [out] IPreparedModel preparedModel ) +``` +**描述:** +编译模型 + +如果是变尺寸输入模型,则模型输入的维度信息中至少有一个是-1。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| model | 需要编译的模型,Model定义请查看[Model](_model.md)。  | +| config | 编译模型的配置,ModelConfig定义请查看[ModelConfig](_model_config.md)。  | +| preparedModel | 编译好的模型对象,用于后续的运算,IPreparedModel定义请查看[IPreparedModel](interface_i_prepared_model.md)。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### PrepareModelFromModelCache() + + +``` +INnrtDevice::PrepareModelFromModelCache ([in] struct SharedBuffer[] modelCache, [in] struct ModelConfig config, [out] IPreparedModel preparedModel ) +``` +**描述:** +加载模型缓存,该模型缓存是通过ExportModelCache接口导出的。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| modelCache | 模型缓存文件的数组,数组顺序与导出时的数组顺序一致,数组元素类型请查看SharedBuffer定义[SharedBuffer](_shared_buffer.md)。  | +| config | 加载模型缓存的配置,配置参数的详细定义请参考[ModelConfig](_model_config.md)。  | +| preparedModel | 加载缓存得到的模型对象,用于后续的运算,IPreparedModel定义请查看[IPreparedModel](interface_i_prepared_model.md)。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### PrepareOfflineModel() + + +``` +INnrtDevice::PrepareOfflineModel ([in] struct SharedBuffer[] modelCache, [in] struct ModelConfig config, [out] IPreparedModel preparedModel ) +``` +**描述:** +加载离线模型文件的缓存,该离线模型是由推理框架传入NNRt并由NNRt解析得到的。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| modelCache | 离线模型文件缓存的数组,元素顺序与用户传入的离线模型格式有关,元素类型请查看SharedBuffer定义[SharedBuffer](_shared_buffer.md)。  | +| config | 加载离线模型文件缓存的配置,配置参数的详细定义请参考[ModelConfig](_model_config.md)。  | +| preparedModel | 加载离线模型文件缓存得到的模型对象,用于后续的运算,IPreparedModel定义请查看[IPreparedModel](interface_i_prepared_model.md)。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### ReleaseBuffer() + + +``` +INnrtDevice::ReleaseBuffer ([in] struct SharedBuffer buffer) +``` +**描述:** +释放共享内存。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| buffer | 共享内存的信息,包含共享内存的文件描述符和空间大小,SharedBuffer定义请查看[SharedBuffer](_shared_buffer.md)。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_offline_stream_operator.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_offline_stream_operator.md index c70eae568751d3d73bf45d1c734b8e3b092db0e9..6fa1472fc4e7d75a108a592356025f8f9e5e2289 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_offline_stream_operator.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_offline_stream_operator.md @@ -1,7 +1,7 @@ # IOfflineStreamOperator -## **概述** +## 概述 定义Camera设备离线流操作。 @@ -9,10 +9,10 @@ **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### Public 成员函数 @@ -21,10 +21,10 @@ | -------- | -------- | | [CancelCapture](#cancelcapture) ([in] int captureId) | 取消捕获请求。 | | [ReleaseStreams](#releasestreams) ([in] int[] streamIds) | 释放离线流。 | -| [Release](#release) () | 释放所有离线流。 释放流的前置条件:
1. 所有单次捕获的Capture处理完成。
2. 所有连续捕获请求都已经被CancelCapture。 | +| [Release](#release) () | 释放所有离线流。 | -## **成员函数说明** +## 成员函数说明 ### CancelCapture() @@ -34,7 +34,7 @@ IOfflineStreamOperator::CancelCapture ([in] int captureId) ``` -**描述:** +**描述:** 取消捕获请求。 @@ -48,7 +48,7 @@ IOfflineStreamOperator::CancelCapture ([in] int captureId) NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 ### Release() @@ -58,19 +58,21 @@ NO_ERROR 表示执行成功。 IOfflineStreamOperator::Release () ``` -**描述:** +**描述:** -释放所有离线流。 释放流的前置条件: +释放所有离线流。 -1. 所有单次捕获的Capture处理完成。 +释放流的前置条件: -2. 所有连续捕获请求都已经被CancelCapture。 +- 所有单次捕获的[Capture](interface_i_stream_operator.md#capture)处理完成。 + +- 所有连续捕获请求都已经被[CancelCapture](interface_i_stream_operator.md#cancelcapture)。 **返回:** NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 ### ReleaseStreams() @@ -80,7 +82,7 @@ NO_ERROR 表示执行成功。 IOfflineStreamOperator::ReleaseStreams ([in] int[] streamIds) ``` -**描述:** +**描述:** 释放离线流。 @@ -94,4 +96,4 @@ IOfflineStreamOperator::ReleaseStreams ([in] int[] streamIds) NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_pin_auth_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_pin_auth_interface.md index ae16e55ecdb3b44ad1329ab9a15d214e39c39a31..7d61270dbb8b13ec1e3d93525f90ea1a6c892154 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_pin_auth_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_pin_auth_interface.md @@ -1,34 +1,30 @@ # IPinAuthInterface -## **概述** +## 概述 定义获取口令认证驱动的执行器列表接口。 -**Since:** - +**Since:** 3.2 - **Version:** - 1.0 - -**所属模块:** +**相关模块:** [HdfPinAuth](_hdf_pin_auth.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [GetExecutorList](#getexecutorlist) ([out] IExecutor[] executorList) | 获取执行器列表,口令认证服务进程启动进行初始化操作时通过该接口获取口令认证驱动支持的执行器列表。 | +| [GetExecutorList](#getexecutorlist) ([out] [IExecutor](interface_i_executor_pinauth.md)[] executorList) | 获取执行器列表,口令认证服务进程启动进行初始化操作时通过该接口获取口令认证驱动支持的执行器列表。  | -## **成员函数说明** +## 成员函数说明 ### GetExecutorList() @@ -37,18 +33,16 @@ ``` IPinAuthInterface::GetExecutorList ([out] IExecutor[] executorList) ``` - -**描述:** - +**描述:** 获取执行器列表,口令认证服务进程启动进行初始化操作时通过该接口获取口令认证驱动支持的执行器列表。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| executorList | 执行器对象列表[IExecutor](interface_pin_i_executor.md)。 | +| executorList | 执行器对象列表[IExecutor](interface_i_executor_pinauth.md)。 | -**返回:** +**返回:** 0 表示操作成功。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_power_hdi_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_power_hdi_callback.md index 0aaecf4cb4a925d88ce4d78fbf2b37193886e0ad..6ba829e9e7406c154566c4314e1c0e95c5c462f4 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_power_hdi_callback.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_power_hdi_callback.md @@ -1,33 +1,31 @@ # IPowerHdiCallback -## **概述** +## 概述 休眠/唤醒状态的回调。 -服务创建此回调对象后,可以调用IPowerInterface的接口注册回调,从而订阅休眠/唤醒状态的变化。 - -**Since:** +服务创建此回调对象后,可以调用[IPowerInterface](interface_i_power_interface.md)的接口注册回调,从而订阅休眠/唤醒状态的变化。 +**Since:** 3.1 - **相关模块:** [Power](power.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [OnSuspend](#onsuspend) () | 休眠状态的回调方法。 | -| [OnWakeup](#onwakeup) () | 唤醒状态的回调方法。 | +| [OnSuspend](#onsuspend) () | 休眠状态的回调方法。  | +| [OnWakeup](#onwakeup) () | 唤醒状态的回调方法。  | -## **成员函数说明** +## 成员函数说明 ### OnSuspend() @@ -36,9 +34,7 @@ ``` IPowerHdiCallback::OnSuspend () ``` - -**描述:** - +**描述:** 休眠状态的回调方法。 当设备进入休眠状态时,将通过此方法通知给服务。 @@ -50,9 +46,7 @@ IPowerHdiCallback::OnSuspend () ``` IPowerHdiCallback::OnWakeup () ``` - -**描述:** - +**描述:** 唤醒状态的回调方法。 当设备进入唤醒状态时,将通过此方法通知给服务。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_power_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_power_interface.md index 5118655d14fb8dad970f9ac638a5d680662349cc..007d8113334a72f8ce92b74744402ffc6cde09de 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_power_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_power_interface.md @@ -1,38 +1,36 @@ # IPowerInterface -## **概述** +## 概述 休眠/唤醒操作、订阅休眠/唤醒状态、运行锁管理的接口。 服务获取此对象后,可以调用相关的接口对设备进行休眠/唤醒、订阅休眠/唤醒状态和管理运行锁。 -**Since:** - +**Since:** 3.1 - **相关模块:** [Power](power.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [RegisterCallback](#registercallback) ([in] [IPowerHdiCallback](interface_i_power_hdi_callback.md) ipowerHdiCallback) | 注册休眠/唤醒状态的回调。 | -| [StartSuspend](#startsuspend) () | 执行设备休眠操作。 | -| [StopSuspend](#stopsuspend) () | 执行设备唤醒操作。 | -| [ForceSuspend](#forcesuspend) () | 执行设备强制休眠操作。 | -| [SuspendBlock](#suspendblock) ([in] String name) | 打开运行锁,阻止休眠。 | -| [SuspendUnblock](#suspendunblock) ([in] String name) | 关闭运行锁,取消阻止休眠。 | -| [PowerDump](#powerdump) ([out] String info) | 获取电源的Dump信息。 | +| [RegisterCallback](#registercallback) ([in] [IPowerHdiCallback](interface_i_power_hdi_callback.md) ipowerHdiCallback) | 注册休眠/唤醒状态的回调。  | +| [StartSuspend](#startsuspend) () | 执行设备休眠操作。  | +| [StopSuspend](#stopsuspend) () | 执行设备唤醒操作。  | +| [ForceSuspend](#forcesuspend) () | 执行设备强制休眠操作。  | +| [SuspendBlock](#suspendblock) ([in] String name) | 打开运行锁,阻止休眠。  | +| [SuspendUnblock](#suspendunblock) ([in] String name) | 关闭运行锁,取消阻止休眠。  | +| [PowerDump](#powerdump) ([out] String info) | 获取电源的Dump信息。  | -## **成员函数说明** +## 成员函数说明 ### ForceSuspend() @@ -41,9 +39,7 @@ ``` IPowerInterface::ForceSuspend () ``` - -**描述:** - +**描述:** 执行设备强制休眠操作。 **返回:** @@ -57,9 +53,7 @@ HDF_SUCCESS 表示操作成功。 ``` IPowerInterface::PowerDump ([out] String info) ``` - -**描述:** - +**描述:** 获取电源的Dump信息。 **参数:** @@ -79,9 +73,7 @@ HDF_SUCCESS 表示操作成功。 ``` IPowerInterface::RegisterCallback ([in] IPowerHdiCallback ipowerHdiCallback) ``` - -**描述:** - +**描述:** 注册休眠/唤醒状态的回调。 **参数:** @@ -105,9 +97,7 @@ HDF_SUCCESS 表示注册成功。 ``` IPowerInterface::StartSuspend () ``` - -**描述:** - +**描述:** 执行设备休眠操作。 **返回:** @@ -121,9 +111,7 @@ HDF_SUCCESS 表示操作成功。 ``` IPowerInterface::StopSuspend () ``` - -**描述:** - +**描述:** 执行设备唤醒操作。 **返回:** @@ -137,9 +125,7 @@ HDF_SUCCESS 表示操作成功。 ``` IPowerInterface::SuspendBlock ([in] String name) ``` - -**描述:** - +**描述:** 打开运行锁,阻止休眠。 **参数:** @@ -159,9 +145,7 @@ HDF_SUCCESS 表示操作成功。 ``` IPowerInterface::SuspendUnblock ([in] String name) ``` - -**描述:** - +**描述:** 关闭运行锁,取消阻止休眠。 **参数:** diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_prepared_model.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_prepared_model.md new file mode 100644 index 0000000000000000000000000000000000000000..0e1be60d96a8d6f09b3154d2979b35fdc7277334 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_prepared_model.md @@ -0,0 +1,99 @@ +# IPreparedModel + + +## 概述 + +定义模型编译后的对象,包含编译后模型导出、模型推理接口。 + +**Since:** +3.2 +**Version:** +2.0 +**相关模块:** + +[NNRt](_n_n_rt.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [ExportModelCache](#exportmodelcache) ([out] struct [SharedBuffer](_shared_buffer.md)[] modelCache) | 导出模型缓存。  | +| [GetInputDimRanges](#getinputdimranges) ([out] unsigned int[][] minInputDims, [out] unsigned int[][] maxInputDims) | 获取模型输入支持的维度范围。如果模型输入为固定维度,则维度最大值与最小值相同。  | +| [Run](#run) ([in] struct [IOTensor](_i_o_tensor.md)[] inputs, [in] struct [IOTensor](_i_o_tensor.md)[] outputs, [out] int[][] outputsDims) | 推理模型  | + + +## 成员函数说明 + + +### ExportModelCache() + + +``` +IPreparedModel::ExportModelCache ([out] struct SharedBuffer[] modelCache) +``` +**描述:** +导出模型缓存。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| modelCache | 模型缓存数组,元素顺序与导出时元素顺序一致,SharedBuffer定义请查看[SharedBuffer](_shared_buffer.md)。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### GetInputDimRanges() + + +``` +IPreparedModel::GetInputDimRanges ([out] unsigned int minInputDims[][], [out] unsigned int maxInputDims[][] ) +``` +**描述:** +获取模型输入支持的维度范围。如果模型输入为固定维度,则维度最大值与最小值相同。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| minInputDims | 二维数组存放模型输入数据的最小维度值,数组第1维表示模型输入tensor的数量,第2维表示输入tensor的维度数量。  | +| maxInputDims | 二维数组存放模型输入数据的最大维度值,数组第1维表示模型输入tensor的数量,第2维表示输入tensor的维度数量。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) + + +### Run() + + +``` +IPreparedModel::Run ([in] struct IOTensor[] inputs, [in] struct IOTensor[] outputs, [out] int outputsDims[][] ) +``` +**描述:** +推理模型 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| inputs | 模型推理的输入数据,输入的顺序与模型中定义的输入顺序一致,输入数据类型参考IOTensor定义[IOTensor](_i_o_tensor.md)。  | +| outputs | 模型推理的输出数据,推理完后需要往outputs的sharedBuffer中写入输出数据,IOTensor定义请查看[IOTensor](_i_o_tensor.md)。  | +| outputsDims | 模型推理输出数据的形状,输出顺序与outputs顺序一一对应。  | +| isOutputBufferEnough | 模型推理输出数据的SharedBuffer空间是否足够,足够的话返回true,不足则返回false,输出顺序与outputs顺序一一对应。 | + +**返回:** + +返回0表示成功 + +返回非0表示失败,负数为HDF标准错误码,正数为NNRt定义的专用错误码(请查看[NNRT_ReturnCode](_n_n_rt.md#nnrt_returncode)) diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_ril.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_ril.md new file mode 100644 index 0000000000000000000000000000000000000000..29ad7f27ebf2fae5ab9891aef1cd8f7fd7995e31 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_ril.md @@ -0,0 +1,2664 @@ +# IRil + + +## 概述 + +Ril模块的请求接口。 + +请求接口包括打电话、发短信彩信、激活SIM卡、上网等。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [SetCallback](#setcallback) ([in] [IRilCallback](interface_i_ril_callback.md) rilCallback) | 设置IRil回调接口,回调函数参考[IRilCallback](interface_i_ril_callback.md)。  | +| [SetEmergencyCallList](#setemergencycalllist) ([in] int slotId, [in] int serialId, [in] struct [EmergencyInfoList](_emergency_info_list.md) emergencyInfoList) | 设置紧急呼叫号码。  | +| [GetEmergencyCallList](#getemergencycalllist) ([in] int slotId, [in] int serialId) | 获取紧急号码。  | +| [GetCallList](#getcalllist) ([in] int slotId, [in] int serialId) | 获取通话状态列表。  | +| [Dial](#dial) ([in] int slotId, [in] int serialId, [in] struct [DialInfo](_dial_info.md) dialInfo) | 拨打电话。  | +| [Reject](#reject) ([in] int slotId, [in] int serialId) | 拒接电话。  | +| [Hangup](#hangup) ([in] int slotId, [in] int serialId, [in] int callId) | 挂断电话。  | +| [Answer](#answer) ([in] int slotId, [in] int serialId) | 接听电话。  | +| [HoldCall](#holdcall) ([in] int slotId, [in] int serialId) | 保持通话。  | +| [UnHoldCall](#unholdcall) ([in] int slotId, [in] int serialId) | 取消保持通话。  | +| [SwitchCall](#switchcall) ([in] int slotId, [in] int serialId) | 切换通话。  | +| [CombineConference](#combineconference) ([in] int slotId, [in] int serialId, [in] int callType) | 合并为会议电话。  | +| [SeparateConference](#separateconference) ([in] int slotId, [in] int serialId, [in] int callId, [in] int callType) | 与会议电话分离。  | +| [GetCallWaiting](#getcallwaiting) ([in] int slotId, [in] int serialId) | 获取呼叫等待。  | +| [SetCallWaiting](#setcallwaiting) ([in] int slotId, [in] int serialId, [in] int activate) | 设置呼叫等待。  | +| [GetCallTransferInfo](#getcalltransferinfo) ([in] int slotId, [in] int serialId, [in] int reason) | 获取呼叫转移。  | +| [SetCallTransferInfo](#setcalltransferinfo) ([in] int slotId, [in] int serialId, [in] struct [CallForwardSetInfo](_call_forward_set_info.md) callForwardSetInfo) | 设置呼叫转移。  | +| [GetCallRestriction](#getcallrestriction) ([in] int slotId, [in] int serialId, [in] String fac) | 获取呼叫限制。  | +| [SetCallRestriction](#setcallrestriction) ([in] int slotId, [in] int serialId, [in] struct [CallRestrictionInfo](_call_restriction_info.md) callRestrictionInfo) | 设置呼叫限制。  | +| [GetClip](#getclip) ([in] int slotId, [in] int serialId) | 获取主叫号码显示(CLIP)。  | +| [SetClip](#setclip) ([in] int slotId, [in] int serialId, [in] int action) | 设置主叫号码显示。  | +| [GetClir](#getclir) ([in] int slotId, [in] int serialId) | 获取主叫号码显示限制(CLIR)。  | +| [SetClir](#setclir) ([in] int slotId, [in] int serialId, [in] int action) | 设置主叫号码显示限制。  | +| [SetCallPreferenceMode](#setcallpreferencemode) ([in] int slotId, [in] int serialId, [in] int mode) | 设置通话偏好模式。  | +| [GetCallPreferenceMode](#getcallpreferencemode) ([in] int slotId, [in] int serialId) | 获取通话偏好模式。  | +| [SetUssd](#setussd) ([in] int slotId, [in] int serialId, [in] String str) | 设置非结构化补充数据业务(USSD)。  | +| [GetUssd](#getussd) ([in] int slotId, [in] int serialId) | 获取Ussd业务。  | +| [SetMute](#setmute) ([in] int slotId, [in] int serialId, [in] int mute) | 设置静音。  | +| [GetMute](#getmute) ([in] int slotId, [in] int serialId) | 获取静音。  | +| [GetCallFailReason](#getcallfailreason) ([in] int slotId, [in] int serialId) | 获取通话失败原因。  | +| [CallSupplement](#callsupplement) ([in] int slotId, [in] int serialId, [in] int type) | 通话保持和恢复。  | +| [SendDtmf](#senddtmf) ([in] int slotId, [in] int serialId, [in] struct [DtmfInfo](_dtmf_info.md) dtmfInfo) | 发送双音多频(DTMF)。  | +| [StartDtmf](#startdtmf) ([in] int slotId, [in] int serialId, [in] struct [DtmfInfo](_dtmf_info.md) dtmfInfo) | 开启DTMF。  | +| [StopDtmf](#stopdtmf) ([in] int slotId, [in] int serialId, [in] struct [DtmfInfo](_dtmf_info.md) dtmfInfo) | 关闭DTMF。  | +| [SetBarringPassword](#setbarringpassword) ([in] int slotId, [in] int serialId, [in] struct [SetBarringInfo](_set_barring_info.md) setBarringInfo) | 设置呼叫限制密码。  | +| [ActivatePdpContext](#activatepdpcontext) ([in] int slotId, [in] int serialId, [in] struct [DataCallInfo](_data_call_info.md) dataCallInfo) | 激活数据业务。  | +| [DeactivatePdpContext](#deactivatepdpcontext) ([in] int slotId, [in] int serialId, [in] struct [UniInfo](_uni_info.md) uniInfo) | 断开数据业务。  | +| [GetPdpContextList](#getpdpcontextlist) ([in] int slotId, [in] int serialId, [in] struct [UniInfo](_uni_info.md) uniInfo) | 获取当前所有数据连接状态。  | +| [SetInitApnInfo](#setinitapninfo) ([in] int slotId, [in] int serialId, [in] struct [DataProfileDataInfo](_data_profile_data_info.md) dataProfileDataInfo) | 设置初始化默认网络接入技术(APN)信息。  | +| [GetLinkBandwidthInfo](#getlinkbandwidthinfo) ([in] int slotId, [in] int serialId, [in] int cid) | 获取当前链路信息。  | +| [SetLinkBandwidthReportingRule](#setlinkbandwidthreportingrule) ([in] int slotId, [in] int serialId, [in] struct [DataLinkBandwidthReportingRule](_data_link_bandwidth_reporting_rule.md) dataLinkBandwidthReportingRule) | 设置当前链路信息的上报规则。  | +| [SetDataPermitted](#setdatapermitted) ([in] int slotId, [in] int serialId, [in] int dataPermitted) | 使能SIM卡槽数据业务。  | +| [SetDataProfileInfo](#setdataprofileinfo) ([in] int slotId, [in] int serialId, [in] struct [DataProfilesInfo](_data_profiles_info.md) dataProfilesInfo) | 设置数据业务使用的PDP上下文信息。  | +| [SendDataPerformanceMode](#senddataperformancemode) ([in] int slotId, [in] int serialId, [in] struct [DataPerformanceInfo](_data_performance_info.md) dataPerformanceInfo) | 发送数据业务性能模式。  | +| [SendDataSleepMode](#senddatasleepmode) ([in] int slotId, [in] int serialId, [in] struct [DataSleepInfo](_data_sleep_info.md) dataSleepInfo) | 发送数据业务睡眠模式。  | +| [SetRadioState](#setradiostate) ([in] int slotId, [in] int serialId, [in] int fun, [in] int rst) | 设置Modem状态。  | +| [GetRadioState](#getradiostate) ([in] int slotId, [in] int serialId) | 获取Modem状态。  | +| [GetImei](#getimei) ([in] int slotId, [in] int serialId) | 获取国际移动设备识别码。  | +| [GetMeid](#getmeid) ([in] int slotId, [in] int serialId) | 获取移动设备识别码。  | +| [GetVoiceRadioTechnology](#getvoiceradiotechnology) ([in] int slotId, [in] int serialId) | 获取电路(CS)域接入技术。  | +| [GetBasebandVersion](#getbasebandversion) ([in] int slotId, [in] int serialId) | 获取基带版本。  | +| [ShutDown](#shutdown) ([in] int slotId, [in] int serialId) | 发送手机正在关机状态到Modem。  | +| [GetSimIO](#getsimio) ([in] int slotId, [in] int serialId, [in] struct [SimIoRequestInfo](_sim_io_request_info.md) simIO) | 获取SIM卡数据。  | +| [GetSimStatus](#getsimstatus) ([in] int slotId, [in] int serialId) | 获取SIM卡状态。  | +| [GetImsi](#getimsi) ([in] int slotId, [in] int serialId) | 获取SIM卡国际移动用户识别码。  | +| [GetSimLockStatus](#getsimlockstatus) ([in] int slotId, [in] int serialId, [in] struct [SimLockInfo](_sim_lock_info.md) simLockInfo) | 获取SIM卡锁状态。  | +| [SetSimLock](#setsimlock) ([in] int slotId, [in] int serialId, [in] struct [SimLockInfo](_sim_lock_info.md) simLockInfo) | 设置SIM卡锁。  | +| [ChangeSimPassword](#changesimpassword) ([in] int slotId, [in] int serialId, [in] struct [SimPasswordInfo](_sim_password_info.md) simPassword) | 修改SIM卡密码。  | +| [UnlockPin](#unlockpin) ([in] int slotId, [in] int serialId, [in] String pin) | PIN解锁。  | +| [UnlockPuk](#unlockpuk) ([in] int slotId, [in] int serialId, [in] String puk, [in] String pin) | PUK解锁。  | +| [UnlockPin2](#unlockpin2) ([in] int slotId, [in] int serialId, [in] String pin2) | PIN2解锁。  | +| [UnlockPuk2](#unlockpuk2) ([in] int slotId, [in] int serialId, [in] String puk2, [in] String pin2) | PUK2解锁。  | +| [SetActiveSim](#setactivesim) ([in] int slotId, [in] int serialId, [in] int index, [in] int enable) | 激活去激活SIM卡。  | +| [SimStkSendTerminalResponse](#simstksendterminalresponse) ([in] int slotId, [in] int serialId, [in] String strCmd) | 发送SIM卡应用开发工具箱(STK) TerminalResponse指令。  | +| [SimStkSendEnvelope](#simstksendenvelope) ([in] int slotId, [in] int serialId, [in] String strCmd) | 发送STK Envelope指令。  | +| [SimStkSendCallSetupRequestResult](#simstksendcallsetuprequestresult) ([in] int slotId, [in] int serialId, [in] int accept) | 发送STK CallSetup指令。  | +| [SimStkIsReady](#simstkisready) ([in] int slotId, [in] int serialId) | 获取STK是否Ready状态。  | +| [GetRadioProtocol](#getradioprotocol) ([in] int slotId,[in] int serialId) | 获取主副卡协议栈。  | +| [SetRadioProtocol](#setradioprotocol) ([in] int slotId,[in] int serialId,[in] struct [RadioProtocol](_radio_protocol.md) radioProtocol) | 设置主副卡协议栈。  | +| [SimOpenLogicalChannel](#simopenlogicalchannel) ([in] int slotId, [in] int serialId, [in] String appID, [in] int p2) | 打开应用协议数据单元(APDU)逻辑通道。  | +| [SimCloseLogicalChannel](#simcloselogicalchannel) ([in] int slotId, [in] int serialId, [in] int channelId) | 关闭应用协议数据单元(APDU)逻辑通道。  | +| [SimTransmitApduLogicalChannel](#simtransmitapdulogicalchannel) ([in] int slotId, [in] int serialId, [in] struct [ApduSimIORequestInfo](_apdu_sim_i_o_request_info.md) apduSimIO) | 应用协议数据单元(APDU)逻辑通道数据传输,由应用主动发起连接和关闭。  | +| [SimTransmitApduBasicChannel](#simtransmitapdubasicchannel) ([in] int slotId, [in] int serialId, [in] struct [ApduSimIORequestInfo](_apdu_sim_i_o_request_info.md) apduSimIO) | 应用协议数据单元(APDU)基础通道数据传输,默认打开的传输通道。  | +| [SimAuthentication](#simauthentication) ([in] int slotId, [in] int serialId, [in] struct [SimAuthenticationRequestInfo](_sim_authentication_request_info.md) simAuthInfo) | SIM卡鉴权。  | +| [UnlockSimLock](#unlocksimlock) ([in] int slotId, [in] int serialId, [in] int lockType, [in] String key) | 解锁SIM卡。  | +| [GetSignalStrength](#getsignalstrength) ([in] int slotId, [in] int serialId) | 获取信号强度。  | +| [GetCsRegStatus](#getcsregstatus) ([in] int slotId, [in] int serialId) | 获取电路(CS)域注册状态。  | +| [GetPsRegStatus](#getpsregstatus) ([in] int slotId, [in] int serialId) | 获取分组(PS)域注册状态。  | +| [GetOperatorInfo](#getoperatorinfo) ([in] int slotId, [in] int serialId) | 获取运营商名称信息。  | +| [GetNetworkSearchInformation](#getnetworksearchinformation) ([in] int slotId, [in] int serialId) | 获取可用网络信息。  | +| [GetNetworkSelectionMode](#getnetworkselectionmode) ([in] int slotId, [in] int serialId) | 获取选网模式。  | +| [SetNetworkSelectionMode](#setnetworkselectionmode) ([in] int slotId, [in] int serialId, [in] struct [SetNetworkModeInfo](_set_network_mode_info.md) networkModeInfo) | 设置选网模式。  | +| [GetNeighboringCellInfoList](#getneighboringcellinfolist) ([in] int slotId, [in] int serialId) | 获取相邻小区信息。  | +| [GetCurrentCellInfo](#getcurrentcellinfo) ([in] int slotId, [in] int serialId) | 获取小区信息。  | +| [SetPreferredNetwork](#setpreferrednetwork) ([in] int slotId, [in] int serialId, [in] int preferredNetworkType) | 设置首选网络类型。  | +| [GetPreferredNetwork](#getpreferrednetwork) ([in] int slotId, [in] int serialId) | 获取首选网络类型。  | +| [GetPhysicalChannelConfig](#getphysicalchannelconfig) ([in] int slotId, [in] int serialId) | 获取物理通道配置。  | +| [SetLocateUpdates](#setlocateupdates) ([in] int slotId, [in] int serialId, [in] enum [RilRegNotifyMode](_ril.md#rilregnotifymode) mode) | 设置小区位置更新通知模式。  | +| [SetNotificationFilter](#setnotificationfilter) ([in] int slotId, [in] int serialId, [in] int newFilter) | 设置Modem主动上报消息过滤器。  | +| [SetDeviceState](#setdevicestate) ([in] int slotId, [in] int serialId, [in] int deviceStateType, [in] int deviceStateOn) | 设置设备状态。  | +| [SendGsmSms](#sendgsmsms) ([in] int slotId, [in] int serialId, [in] struct [GsmSmsMessageInfo](_gsm_sms_message_info.md) gsmSmsMessageInfo) | 发送全球移动通信系统 (GSM)短信。  | +| [SendCdmaSms](#sendcdmasms) ([in] int slotId, [in] int serialId, [in] struct [SendCdmaSmsMessageInfo](_send_cdma_sms_message_info.md) cdmaSmsMessageInfo) | 发送码分多址(CDMA)短信。  | +| [AddSimMessage](#addsimmessage) ([in] int slotId, [in] int serialId, [in] struct [SmsMessageIOInfo](_sms_message_i_o_info.md) gsmSmsMessageInfo) | 写入GSM SIM卡短信。  | +| [DelSimMessage](#delsimmessage) ([in] int slotId, [in] int serialId, [in] int index) | 删除GSM SIM卡短信。  | +| [UpdateSimMessage](#updatesimmessage) ([in] int slotId, [in] int serialId, [in] struct [SmsMessageIOInfo](_sms_message_i_o_info.md) gsmSmsMessageInfo) | 更新GSM SIM卡短信。  | +| [AddCdmaSimMessage](#addcdmasimmessage) ([in] int slotId, [in] int serialId, [in] struct [SmsMessageIOInfo](_sms_message_i_o_info.md) cdmaSmsMessageInfo) | 写入CDMA SIM卡短信。  | +| [DelCdmaSimMessage](#delcdmasimmessage) ([in] int slotId, [in] int serialId, [in] int index) | 删除CDMA SIM卡短信。  | +| [UpdateCdmaSimMessage](#updatecdmasimmessage) ([in] int slotId, [in] int serialId, [in] struct [SmsMessageIOInfo](_sms_message_i_o_info.md) cdmaSmsMessageInfo) | 更新CDMA SIM卡短信。  | +| [SetSmscAddr](#setsmscaddr) ([in] int slotId, [in] int serialId, [in] struct [ServiceCenterAddress](_service_center_address.md) serviceCenterAddress) | 设置短信中心地址。  | +| [GetSmscAddr](#getsmscaddr) ([in] int slotId, [in] int serialId) | 获取短信中心地址。  | +| [SetCBConfig](#setcbconfig) ([in] int slotId, [in] int serialId, [in] struct [CBConfigInfo](_c_b_config_info.md) cellBroadcastInfo) | 激活GSM小区广播。  | +| [GetCBConfig](#getcbconfig) ([in] int slotId, [in] int serialId) | 获取GSM小区广播配置。  | +| [SetCdmaCBConfig](#setcdmacbconfig) ([in] int slotId, [in] int serialId, [in] struct [CdmaCBConfigInfoList](_cdma_c_b_config_info_list.md) cdmaCBConfigInfoList) | 激活CDMA小区广播。  | +| [GetCdmaCBConfig](#getcdmacbconfig) ([in] int slotId, [in] int serialId) | 获取CDMA小区广播配置。  | +| [SendSmsMoreMode](#sendsmsmoremode) ([in] int slotId, [in] int serialId, [in] struct [GsmSmsMessageInfo](_gsm_sms_message_info.md) gsmSmsMessageInfo) | 发送GSM长短信。  | +| [SendSmsAck](#sendsmsack) ([in] int slotId, [in] int serialId, [in] struct [ModeData](_mode_data.md) modeData) | 确认接收新短信。  | +| [SendRilAck](#sendrilack) () | 发送应答给无线接口层(RIL)。  | + + +## 成员函数说明 + + +### ActivatePdpContext() + + +``` +IRil::ActivatePdpContext ([in] int slotId, [in] int serialId, [in] struct DataCallInfo dataCallInfo ) +``` +**描述:** +激活数据业务。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| dataCallInfo | 表示数据业务信息,详见[DataCallInfo](_data_call_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### AddCdmaSimMessage() + + +``` +IRil::AddCdmaSimMessage ([in] int slotId, [in] int serialId, [in] struct SmsMessageIOInfo cdmaSmsMessageInfo ) +``` +**描述:** +写入CDMA SIM卡短信。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| cdmaSmsMessageInfo | 表示SIM卡短信信息,详见[SmsMessageIOInfo](_sms_message_i_o_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### AddSimMessage() + + +``` +IRil::AddSimMessage ([in] int slotId, [in] int serialId, [in] struct SmsMessageIOInfo gsmSmsMessageInfo ) +``` +**描述:** +写入GSM SIM卡短信。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| gsmSmsMessageInfo | 表示SIM卡短信信息,详见[SmsMessageIOInfo](_sms_message_i_o_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### Answer() + + +``` +IRil::Answer ([in] int slotId, [in] int serialId ) +``` +**描述:** +接听电话。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### CallSupplement() + + +``` +IRil::CallSupplement ([in] int slotId, [in] int serialId, [in] int type ) +``` +**描述:** +通话保持和恢复。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| type | 表示挂断的通话类型,0表示直接挂断,1表示挂断前台和后台,2表示挂断前台、恢复后台,3表示挂断所有通话。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### ChangeSimPassword() + + +``` +IRil::ChangeSimPassword ([in] int slotId, [in] int serialId, [in] struct SimPasswordInfo simPassword ) +``` +**描述:** +修改SIM卡密码。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| simPassword | 表示SIM卡密码信息,详见[SimPasswordInfo](_sim_password_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### CombineConference() + + +``` +IRil::CombineConference ([in] int slotId, [in] int serialId, [in] int callType ) +``` +**描述:** +合并为会议电话。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| callType | 表示通话类型,当前只能为0(即语音通话)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### DeactivatePdpContext() + + +``` +IRil::DeactivatePdpContext ([in] int slotId, [in] int serialId, [in] struct UniInfo uniInfo ) +``` +**描述:** +断开数据业务。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| uniInfo | 表示通用信息,详见[UniInfo](_uni_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### DelCdmaSimMessage() + + +``` +IRil::DelCdmaSimMessage ([in] int slotId, [in] int serialId, [in] int index ) +``` +**描述:** +删除CDMA SIM卡短信。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| index | 表示消息索引。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### DelSimMessage() + + +``` +IRil::DelSimMessage ([in] int slotId, [in] int serialId, [in] int index ) +``` +**描述:** +删除GSM SIM卡短信。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| index | 表示消息索引。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### Dial() + + +``` +IRil::Dial ([in] int slotId, [in] int serialId, [in] struct DialInfo dialInfo ) +``` +**描述:** +拨打电话。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| dialInfo | 表示拨号信息,详见[DialInfo](_dial_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetBasebandVersion() + + +``` +IRil::GetBasebandVersion ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取基带版本。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetCallFailReason() + + +``` +IRil::GetCallFailReason ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取通话失败原因。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetCallList() + + +``` +IRil::GetCallList ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取通话状态列表。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetCallPreferenceMode() + + +``` +IRil::GetCallPreferenceMode ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取通话偏好模式。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetCallRestriction() + + +``` +IRil::GetCallRestriction ([in] int slotId, [in] int serialId, [in] String fac ) +``` +**描述:** +获取呼叫限制。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| fac | 表示呼叫限制操作对象。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetCallTransferInfo() + + +``` +IRil::GetCallTransferInfo ([in] int slotId, [in] int serialId, [in] int reason ) +``` +**描述:** +获取呼叫转移。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| reason | 表示呼叫转移的类型,0表示无条件转移,1表示用户忙时转移,2表示无回复时转移,3表示无法接通时转移。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetCallWaiting() + + +``` +IRil::GetCallWaiting ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取呼叫等待。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetCBConfig() + + +``` +IRil::GetCBConfig ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取GSM小区广播配置。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetCdmaCBConfig() + + +``` +IRil::GetCdmaCBConfig ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取CDMA小区广播配置。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetClip() + + +``` +IRil::GetClip ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取主叫号码显示(CLIP)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetClir() + + +``` +IRil::GetClir ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取主叫号码显示限制(CLIR)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetCsRegStatus() + + +``` +IRil::GetCsRegStatus ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取电路(CS)域注册状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetCurrentCellInfo() + + +``` +IRil::GetCurrentCellInfo ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取小区信息。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetEmergencyCallList() + + +``` +IRil::GetEmergencyCallList ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取紧急号码。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetImei() + + +``` +IRil::GetImei ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取国际移动设备识别码。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetImsi() + + +``` +IRil::GetImsi ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取SIM卡国际移动用户识别码。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetLinkBandwidthInfo() + + +``` +IRil::GetLinkBandwidthInfo ([in] int slotId, [in] int serialId, [in] int cid ) +``` +**描述:** +获取当前链路信息。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| cid | PDP上下文标识符。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetMeid() + + +``` +IRil::GetMeid ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取移动设备识别码。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetMute() + + +``` +IRil::GetMute ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取静音。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetNeighboringCellInfoList() + + +``` +IRil::GetNeighboringCellInfoList ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取相邻小区信息。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetNetworkSearchInformation() + + +``` +IRil::GetNetworkSearchInformation ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取可用网络信息。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetNetworkSelectionMode() + + +``` +IRil::GetNetworkSelectionMode ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取选网模式。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetOperatorInfo() + + +``` +IRil::GetOperatorInfo ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取运营商名称信息。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetPdpContextList() + + +``` +IRil::GetPdpContextList ([in] int slotId, [in] int serialId, [in] struct UniInfo uniInfo ) +``` +**描述:** +获取当前所有数据连接状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| uniInfo | 表示通用信息,详见[UniInfo](_uni_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetPhysicalChannelConfig() + + +``` +IRil::GetPhysicalChannelConfig ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取物理通道配置。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetPreferredNetwork() + + +``` +IRil::GetPreferredNetwork ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取首选网络类型。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetPsRegStatus() + + +``` +IRil::GetPsRegStatus ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取分组(PS)域注册状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetRadioProtocol() + + +``` +IRil::GetRadioProtocol ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取主副卡协议栈。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetRadioState() + + +``` +IRil::GetRadioState ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取Modem状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetSignalStrength() + + +``` +IRil::GetSignalStrength ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取信号强度。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetSimIO() + + +``` +IRil::GetSimIO ([in] int slotId, [in] int serialId, [in] struct SimIoRequestInfo simIO ) +``` +**描述:** +获取SIM卡数据。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| [SimIoRequestInfo](_sim_io_request_info.md) | 表示SIM卡数据请求信息,详见[SimIoRequestInfo](_sim_io_request_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetSimLockStatus() + + +``` +IRil::GetSimLockStatus ([in] int slotId, [in] int serialId, [in] struct SimLockInfo simLockInfo ) +``` +**描述:** +获取SIM卡锁状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| [SimLockInfo](_sim_lock_info.md) | 表示SIM卡锁信息,详见[SimLockInfo](_sim_lock_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetSimStatus() + + +``` +IRil::GetSimStatus ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取SIM卡状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetSmscAddr() + + +``` +IRil::GetSmscAddr ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取短信中心地址。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetUssd() + + +``` +IRil::GetUssd ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取Ussd业务。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### GetVoiceRadioTechnology() + + +``` +IRil::GetVoiceRadioTechnology ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取电路(CS)域接入技术。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### Hangup() + + +``` +IRil::Hangup ([in] int slotId, [in] int serialId, [in] int callId ) +``` +**描述:** +挂断电话。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| callId | 表示通话ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### HoldCall() + + +``` +IRil::HoldCall ([in] int slotId, [in] int serialId ) +``` +**描述:** +保持通话。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### Reject() + + +``` +IRil::Reject ([in] int slotId, [in] int serialId ) +``` +**描述:** +拒接电话。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SendCdmaSms() + + +``` +IRil::SendCdmaSms ([in] int slotId, [in] int serialId, [in] struct SendCdmaSmsMessageInfo cdmaSmsMessageInfo ) +``` +**描述:** +发送码分多址(CDMA)短信。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| cdmaSmsMessageInfo | 表示CDMA短信信息,详见[SendCdmaSmsMessageInfo](_send_cdma_sms_message_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SendDataPerformanceMode() + + +``` +IRil::SendDataPerformanceMode ([in] int slotId, [in] int serialId, [in] struct DataPerformanceInfo dataPerformanceInfo ) +``` +**描述:** +发送数据业务性能模式。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| dataPerformanceInfo | 表示数据业务性能模式,详见[DataPerformanceInfo](_data_performance_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SendDataSleepMode() + + +``` +IRil::SendDataSleepMode ([in] int slotId, [in] int serialId, [in] struct DataSleepInfo dataSleepInfo ) +``` +**描述:** +发送数据业务睡眠模式。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| dataSleepInfo | 表示数据业务睡眠模式,详见[DataSleepInfo](_data_sleep_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SendDtmf() + + +``` +IRil::SendDtmf ([in] int slotId, [in] int serialId, [in] struct DtmfInfo dtmfInfo ) +``` +**描述:** +发送双音多频(DTMF)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| dtmfInfo | 表示DTMF信息,详见[DtmfInfo](_dtmf_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SendGsmSms() + + +``` +IRil::SendGsmSms ([in] int slotId, [in] int serialId, [in] struct GsmSmsMessageInfo gsmSmsMessageInfo ) +``` +**描述:** +发送全球移动通信系统 (GSM)短信。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| gsmSmsMessageInfo | 表示GSM短信信息,详见[GsmSmsMessageInfo](_gsm_sms_message_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SendRilAck() + + +``` +IRil::SendRilAck () +``` +**描述:** +发送应答给无线接口层(RIL)。 + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SendSmsAck() + + +``` +IRil::SendSmsAck ([in] int slotId, [in] int serialId, [in] struct ModeData modeData ) +``` +**描述:** +确认接收新短信。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| modeData | 表示接收短信处理模式,详见[ModeData](_mode_data.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SendSmsMoreMode() + + +``` +IRil::SendSmsMoreMode ([in] int slotId, [in] int serialId, [in] struct GsmSmsMessageInfo gsmSmsMessageInfo ) +``` +**描述:** +发送GSM长短信。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| gsmSmsMessageInfo | 表示GSM短信信息,详见[GsmSmsMessageInfo](_gsm_sms_message_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SeparateConference() + + +``` +IRil::SeparateConference ([in] int slotId, [in] int serialId, [in] int callId, [in] int callType ) +``` +**描述:** +与会议电话分离。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| callId | 表示通话ID。  | +| callType | 表示通话类型,当前只能为0(即语音通话)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetActiveSim() + + +``` +IRil::SetActiveSim ([in] int slotId, [in] int serialId, [in] int index, [in] int enable ) +``` +**描述:** +激活去激活SIM卡。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| index | 表示索引值。  | +| enable | 表示激活状态,0为去激活,1为激活。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetBarringPassword() + + +``` +IRil::SetBarringPassword ([in] int slotId, [in] int serialId, [in] struct SetBarringInfo setBarringInfo ) +``` +**描述:** +设置呼叫限制密码。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| setBarringInfo | 表示设置呼叫限制密码的信息,详见[SetBarringInfo](_set_barring_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetCallback() + + +``` +IRil::SetCallback ([in] IRilCallback rilCallback) +``` +**描述:** +设置IRil回调接口,回调函数参考[IRilCallback](interface_i_ril_callback.md)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| rilCallback | 要设置的回调函数。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetCallPreferenceMode() + + +``` +IRil::SetCallPreferenceMode ([in] int slotId, [in] int serialId, [in] int mode ) +``` +**描述:** +设置通话偏好模式。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| mode | 表示通话偏好模式,1表示仅电路(CS)域通话,2表示电路(CS)域通话优先,3表示IP多媒体系统(IMS)通话优先,4表示仅IP多媒体系统(IMS)通话。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetCallRestriction() + + +``` +IRil::SetCallRestriction ([in] int slotId, [in] int serialId, [in] struct CallRestrictionInfo callRestrictionInfo ) +``` +**描述:** +设置呼叫限制。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| callRestrictionInfo | 表示呼叫限制信息,详见[CallRestrictionInfo](_call_restriction_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetCallTransferInfo() + + +``` +IRil::SetCallTransferInfo ([in] int slotId, [in] int serialId, [in] struct CallForwardSetInfo callForwardSetInfo ) +``` +**描述:** +设置呼叫转移。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| callForwardSetInfo | 表示呼叫转移信息,详见[CallForwardSetInfo](_call_forward_set_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetCallWaiting() + + +``` +IRil::SetCallWaiting ([in] int slotId, [in] int serialId, [in] int activate ) +``` +**描述:** +设置呼叫等待。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| activate | 表示禁止或使能呼叫等待功能,0表示禁止,1表示使能。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetCBConfig() + + +``` +IRil::SetCBConfig ([in] int slotId, [in] int serialId, [in] struct CBConfigInfo cellBroadcastInfo ) +``` +**描述:** +激活GSM小区广播。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| cellBroadcastInfo | 表示GSM小区广播配置信息,详见[CBConfigInfo](_c_b_config_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetCdmaCBConfig() + + +``` +IRil::SetCdmaCBConfig ([in] int slotId, [in] int serialId, [in] struct CdmaCBConfigInfoList cdmaCBConfigInfoList ) +``` +**描述:** +激活CDMA小区广播。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| cdmaCBConfigInfoList | 表示CDMA小区广播配置信息列表,详见[CdmaCBConfigInfoList](_cdma_c_b_config_info_list.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetClip() + + +``` +IRil::SetClip ([in] int slotId, [in] int serialId, [in] int action ) +``` +**描述:** +设置主叫号码显示。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| action | 表示禁止或使能主叫号码显示功能,0表示禁止,1表示使能。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetClir() + + +``` +IRil::SetClir ([in] int slotId, [in] int serialId, [in] int action ) +``` +**描述:** +设置主叫号码显示限制。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| action | 表示禁止或使能主叫号码显示限制功能,0表示禁止,1表示使能。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetDataPermitted() + + +``` +IRil::SetDataPermitted ([in] int slotId, [in] int serialId, [in] int dataPermitted ) +``` +**描述:** +使能SIM卡槽数据业务。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| dataPermitted | 表示是否使能,0表示不使能,1表示使能。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetDataProfileInfo() + + +``` +IRil::SetDataProfileInfo ([in] int slotId, [in] int serialId, [in] struct DataProfilesInfo dataProfilesInfo ) +``` +**描述:** +设置数据业务使用的PDP上下文信息。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| dataProfilesInfo | 表示PDP上下文信息列表,详见[DataProfilesInfo](_data_profiles_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetDeviceState() + + +``` +IRil::SetDeviceState ([in] int slotId, [in] int serialId, [in] int deviceStateType, [in] int deviceStateOn ) +``` +**描述:** +设置设备状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| deviceStateType | 表示设备状态类型,0表示省电模式,1表示充电模式,2表示低数据模式。  | +| deviceStateOn | 表示设备状态开关,0表示关闭,1表示开启。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetEmergencyCallList() + + +``` +IRil::SetEmergencyCallList ([in] int slotId, [in] int serialId, [in] struct EmergencyInfoList emergencyInfoList ) +``` +**描述:** +设置紧急呼叫号码。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| emergencyInfoList | 表示紧急号码列表,详见[EmergencyInfoList](_emergency_info_list.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetInitApnInfo() + + +``` +IRil::SetInitApnInfo ([in] int slotId, [in] int serialId, [in] struct DataProfileDataInfo dataProfileDataInfo ) +``` +**描述:** +设置初始化默认网络接入技术(APN)信息。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| dataProfileDataInfo | 表示分组报文协议(PDP)上下文信息,详见[DataProfileDataInfo](_data_profile_data_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetLinkBandwidthReportingRule() + + +``` +IRil::SetLinkBandwidthReportingRule ([in] int slotId, [in] int serialId, [in] struct DataLinkBandwidthReportingRule dataLinkBandwidthReportingRule ) +``` +**描述:** +设置当前链路信息的上报规则。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| dataLinkBandwidthReportingRule | 表示网络频率上报规则,详见[DataLinkBandwidthReportingRule](_data_link_bandwidth_reporting_rule.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetLocateUpdates() + + +``` +IRil::SetLocateUpdates ([in] int slotId, [in] int serialId, [in] enum RilRegNotifyMode mode ) +``` +**描述:** +设置小区位置更新通知模式。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| mode | 表示通知模式,详见[RilRegNotifyMode](_ril.md#rilregnotifymode)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetMute() + + +``` +IRil::SetMute ([in] int slotId, [in] int serialId, [in] int mute ) +``` +**描述:** +设置静音。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| mute | 表示禁止或使能静音,0表示禁止,1表示使能。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetNetworkSelectionMode() + + +``` +IRil::SetNetworkSelectionMode ([in] int slotId, [in] int serialId, [in] struct SetNetworkModeInfo networkModeInfo ) +``` +**描述:** +设置选网模式。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| networkModeInfo | 表示选网模式信息,详见[SetNetworkModeInfo](_set_network_mode_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetNotificationFilter() + + +``` +IRil::SetNotificationFilter ([in] int slotId, [in] int serialId, [in] int newFilter ) +``` +**描述:** +设置Modem主动上报消息过滤器。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| newFilter | 表示消息类型过滤器,使用二进制标志位表示不同的消息类型,0表示关闭, 1表示信号强度,2表示网络注册状态,4表示数据连接状态,8表示链路容量,16表示物理通道配置。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetPreferredNetwork() + + +``` +IRil::SetPreferredNetwork ([in] int slotId, [in] int serialId, [in] int preferredNetworkType ) +``` +**描述:** +设置首选网络类型。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| preferredNetworkType | 表示首选网络类型,详见[PreferredNetworkTypeInfo](_preferred_network_type_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetRadioProtocol() + + +``` +IRil::SetRadioProtocol ([in] int slotId, [in] int serialId, [in] struct RadioProtocol radioProtocol ) +``` +**描述:** +设置主副卡协议栈。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| radioProtocol | 表示Radio协议信息,详见[RadioProtocol](_radio_protocol.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetRadioState() + + +``` +IRil::SetRadioState ([in] int slotId, [in] int serialId, [in] int fun, [in] int rst ) +``` +**描述:** +设置Modem状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| fun | 表示功能模式,0表示最小模式,1表示online模式,4表示offline模式,其他模式由芯片自定义。  | +| rst | 表示Modem是否自动复位,0表示不复位,1表示复位。 | + +**返回:** + +0 表示执行成功 + +非零值 表示操作失败。 + + +### SetSimLock() + + +``` +IRil::SetSimLock ([in] int slotId, [in] int serialId, [in] struct SimLockInfo simLockInfo ) +``` +**描述:** +设置SIM卡锁。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| [SimLockInfo](_sim_lock_info.md) | 表示SIM卡锁信息,详见[SimLockInfo](_sim_lock_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetSmscAddr() + + +``` +IRil::SetSmscAddr ([in] int slotId, [in] int serialId, [in] struct ServiceCenterAddress serviceCenterAddress ) +``` +**描述:** +设置短信中心地址。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| serviceCenterAddress | 表示短信中心地址信息,详见[ServiceCenterAddress](_service_center_address.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SetUssd() + + +``` +IRil::SetUssd ([in] int slotId, [in] int serialId, [in] String str ) +``` +**描述:** +设置非结构化补充数据业务(USSD)。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| str | 表示USSD信息,最大长度为160个字符。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### ShutDown() + + +``` +IRil::ShutDown ([in] int slotId, [in] int serialId ) +``` +**描述:** +发送手机正在关机状态到Modem。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SimAuthentication() + + +``` +IRil::SimAuthentication ([in] int slotId, [in] int serialId, [in] struct SimAuthenticationRequestInfo simAuthInfo ) +``` +**描述:** +SIM卡鉴权。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| simAuthInfo | 表示SIM卡鉴权请求信息,详见[SimAuthenticationRequestInfo](_sim_authentication_request_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SimCloseLogicalChannel() + + +``` +IRil::SimCloseLogicalChannel ([in] int slotId, [in] int serialId, [in] int channelId ) +``` +**描述:** +关闭应用协议数据单元(APDU)逻辑通道。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| channelId | 表示请求关闭的逻辑通道ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SimOpenLogicalChannel() + + +``` +IRil::SimOpenLogicalChannel ([in] int slotId, [in] int serialId, [in] String appID, [in] int p2 ) +``` +**描述:** +打开应用协议数据单元(APDU)逻辑通道。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| appID | 表示应用标识符。  | +| p2 | 表示AT指令码的参数2。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SimStkIsReady() + + +``` +IRil::SimStkIsReady ([in] int slotId, [in] int serialId ) +``` +**描述:** +获取STK是否Ready状态。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SimStkSendCallSetupRequestResult() + + +``` +IRil::SimStkSendCallSetupRequestResult ([in] int slotId, [in] int serialId, [in] int accept ) +``` +**描述:** +发送STK CallSetup指令。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| accept | 表示是否接受CallSetup请求,0为不接受,1为接受。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SimStkSendEnvelope() + + +``` +IRil::SimStkSendEnvelope ([in] int slotId, [in] int serialId, [in] String strCmd ) +``` +**描述:** +发送STK Envelope指令。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| strCmd | 表示指令的字串文本。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SimStkSendTerminalResponse() + + +``` +IRil::SimStkSendTerminalResponse ([in] int slotId, [in] int serialId, [in] String strCmd ) +``` +**描述:** +发送SIM卡应用开发工具箱(STK) TerminalResponse指令。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| strCmd | 表示指令的字串文本。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SimTransmitApduBasicChannel() + + +``` +IRil::SimTransmitApduBasicChannel ([in] int slotId, [in] int serialId, [in] struct ApduSimIORequestInfo apduSimIO ) +``` +**描述:** +应用协议数据单元(APDU)基础通道数据传输,默认打开的传输通道。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| apduSimIO | 表示通过应用协议数据单元(APDU)传输的SIM数据请求信息,详见[ApduSimIORequestInfo](_apdu_sim_i_o_request_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SimTransmitApduLogicalChannel() + + +``` +IRil::SimTransmitApduLogicalChannel ([in] int slotId, [in] int serialId, [in] struct ApduSimIORequestInfo apduSimIO ) +``` +**描述:** +应用协议数据单元(APDU)逻辑通道数据传输,由应用主动发起连接和关闭。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| apduSimIO | 表示通过应用协议数据单元(APDU)传输的SIM数据请求信息,详见[ApduSimIORequestInfo](_apdu_sim_i_o_request_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### StartDtmf() + + +``` +IRil::StartDtmf ([in] int slotId, [in] int serialId, [in] struct DtmfInfo dtmfInfo ) +``` +**描述:** +开启DTMF。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| dtmfInfo | 表示DTMF信息,详见[DtmfInfo](_dtmf_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### StopDtmf() + + +``` +IRil::StopDtmf ([in] int slotId, [in] int serialId, [in] struct DtmfInfo dtmfInfo ) +``` +**描述:** +关闭DTMF。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| dtmfInfo | 表示DTMF信息,详见[DtmfInfo](_dtmf_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### SwitchCall() + + +``` +IRil::SwitchCall ([in] int slotId, [in] int serialId ) +``` +**描述:** +切换通话。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### UnHoldCall() + + +``` +IRil::UnHoldCall ([in] int slotId, [in] int serialId ) +``` +**描述:** +取消保持通话。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### UnlockPin() + + +``` +IRil::UnlockPin ([in] int slotId, [in] int serialId, [in] String pin ) +``` +**描述:** +PIN解锁。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| pin | 表示用于解锁的PIN码。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### UnlockPin2() + + +``` +IRil::UnlockPin2 ([in] int slotId, [in] int serialId, [in] String pin2 ) +``` +**描述:** +PIN2解锁。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| pin2 | 表示用于解锁的PIN2码。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### UnlockPuk() + + +``` +IRil::UnlockPuk ([in] int slotId, [in] int serialId, [in] String puk, [in] String pin ) +``` +**描述:** +PUK解锁。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| puk | 表示用于解锁的PUK码。  | +| pin | 表示用于解锁的PIN码。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### UnlockPuk2() + + +``` +IRil::UnlockPuk2 ([in] int slotId, [in] int serialId, [in] String puk2, [in] String pin2 ) +``` +**描述:** +PUK2解锁。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| puk2 | 表示用于解锁的PUK2码。  | +| pin2 | 表示用于解锁的PIN2码。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### UnlockSimLock() + + +``` +IRil::UnlockSimLock ([in] int slotId, [in] int serialId, [in] int lockType, [in] String key ) +``` +**描述:** +解锁SIM卡。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| lockType | 表示锁类型,参考3GPP TS 22.022 [33]。  | +| key | 表示用于解锁的密码,参考3GPP TS 22.022 [33]。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### UpdateCdmaSimMessage() + + +``` +IRil::UpdateCdmaSimMessage ([in] int slotId, [in] int serialId, [in] struct SmsMessageIOInfo cdmaSmsMessageInfo ) +``` +**描述:** +更新CDMA SIM卡短信。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| cdmaSmsMessageInfo | 表示SIM卡短信信息,详见[SmsMessageIOInfo](_sms_message_i_o_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 + + +### UpdateSimMessage() + + +``` +IRil::UpdateSimMessage ([in] int slotId, [in] int serialId, [in] struct SmsMessageIOInfo gsmSmsMessageInfo ) +``` +**描述:** +更新GSM SIM卡短信。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| slotId | 表示卡槽ID。  | +| serialId | 表示请求的序列化ID。  | +| gsmSmsMessageInfo | 表示SIM卡短信信息,详见[SmsMessageIOInfo](_sms_message_i_o_info.md)。 | + +**返回:** + +0 表示执行成功。 + +非零值 表示操作失败。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_ril_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_ril_callback.md new file mode 100644 index 0000000000000000000000000000000000000000..ccb8c11c4f4e1c28d1dc6e5bcd09ce6cfda94d0a --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_ril_callback.md @@ -0,0 +1,2361 @@ +# IRilCallback + + +## 概述 + +Ril模块的回调接口。 + +回调接口提供打电话、发短彩信、激活SIM卡、上网等回调函数,回调函数由调用者实现。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [CallEmergencyNotice](#callemergencynotice) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [EmergencyInfoList](_emergency_info_list.md) emergencyInfoList) | 紧急呼叫号码上报。  | +| [CallStateUpdated](#callstateupdated) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 通话状态更新上报。  | +| [CallRingbackVoiceNotice](#callringbackvoicenotice) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [RingbackVoice](_ringback_voice.md) ringbackVoice) | 通话回铃音上报。  | +| [CallSrvccStatusNotice](#callsrvccstatusnotice) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [SrvccStatus](_srvcc_status.md) srvccStatus) | SRVCC(Single Radio Voice Call Continuity)状态上报。  | +| [CallUssdNotice](#callussdnotice) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [UssdNoticeInfo](_ussd_notice_info.md) ussdNoticeInfo) | USSD业务信息上报。  | +| [CallSsNotice](#callssnotice) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [SsNoticeInfo](_ss_notice_info.md) ssNoticeInfo) | 补充业务信息上报。  | +| [CallRsrvccStatusNotify](#callrsrvccstatusnotify) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | RSRVCC(Reverse Single Radio Voice Call Continuity)状态上报。  | +| [SetEmergencyCallListResponse](#setemergencycalllistresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置紧急呼叫号码列表响应。  | +| [GetEmergencyCallListResponse](#getemergencycalllistresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [EmergencyInfoList](_emergency_info_list.md) emergencyInfoList) | 查询紧急呼叫号码列表响应。  | +| [GetCallListResponse](#getcalllistresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [CallInfoList](_call_info_list.md) callList) | 查询通话状态列表响应。  | +| [DialResponse](#dialresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 拨打电话响应。  | +| [HangupResponse](#hangupresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 挂断电话响应。  | +| [RejectResponse](#rejectresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 拒接电话响应。  | +| [AnswerResponse](#answerresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 接听电话响应。  | +| [HoldCallResponse](#holdcallresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 保持通话响应。  | +| [UnHoldCallResponse](#unholdcallresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 取消保持通话响应。  | +| [SwitchCallResponse](#switchcallresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 切换通话响应。  | +| [GetClipResponse](#getclipresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [GetClipResult](_get_clip_result.md) getClipResult) | 查询主叫号码显示响应。  | +| [SetClipResponse](#setclipresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置主叫号码显示响应。  | +| [CombineConferenceResponse](#combineconferenceresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 合并为会议电话响应。  | +| [SeparateConferenceResponse](#separateconferenceresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 与会议电话分离响应。  | +| [CallSupplementResponse](#callsupplementresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 挂断前台、恢复后台响应。  | +| [GetCallWaitingResponse](#getcallwaitingresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [CallWaitResult](_call_wait_result.md) callWaitResult) | 查询呼叫等待响应。  | +| [SetCallWaitingResponse](#setcallwaitingresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置呼叫等待响应。  | +| [GetCallTransferInfoResponse](#getcalltransferinforesponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [CallForwardQueryInfoList](_call_forward_query_info_list.md) cFQueryList) | 查询呼叫转移响应。  | +| [SetCallTransferInfoResponse](#setcalltransferinforesponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置呼叫转移响应。  | +| [GetCallRestrictionResponse](#getcallrestrictionresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [CallRestrictionResult](_call_restriction_result.md) result) | 查询呼叫限制响应。  | +| [SetCallRestrictionResponse](#setcallrestrictionresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置呼叫限制响应。  | +| [GetClirResponse](#getclirresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [GetClirResult](_get_clir_result.md) getClirResult) | 查询主叫号码显示限制响应。  | +| [SetClirResponse](#setclirresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置主叫号码显示限制响应。  | +| [StartDtmfResponse](#startdtmfresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 开启DTMF响应。  | +| [SendDtmfResponse](#senddtmfresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 发送DTMF响应。  | +| [StopDtmfResponse](#stopdtmfresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 关闭DTMF响应。  | +| [GetCallPreferenceModeResponse](#getcallpreferencemoderesponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] int mode) | 查询通话偏好模式响应。  | +| [SetCallPreferenceModeResponse](#setcallpreferencemoderesponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置通话偏好模式响应。  | +| [SetUssdResponse](#setussdresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置USSD业务响应。  | +| [GetUssdResponse](#getussdresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] int cusd) | 查询USSD业务响应。  | +| [SetMuteResponse](#setmuteresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置静音响应。  | +| [GetMuteResponse](#getmuteresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] int mute) | 查询静音响应。  | +| [GetCallFailReasonResponse](#getcallfailreasonresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] int callFail) | 查询通话失败原因响应。  | +| [SetBarringPasswordResponse](#setbarringpasswordresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置呼叫限制密码响应。  | +| [PdpContextListUpdated](#pdpcontextlistupdated) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [DataCallResultList](_data_call_result_list.md) dataCallResultList) | 数据业务建立与断开等状态变化上报。  | +| [ActivatePdpContextResponse](#activatepdpcontextresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [SetupDataCallResultInfo](_setup_data_call_result_info.md) setupDataCallResultInfo) | 激活数据业务响应。  | +| [DeactivatePdpContextResponse](#deactivatepdpcontextresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 断开数据业务响应。  | +| [GetPdpContextListResponse](#getpdpcontextlistresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [DataCallResultList](_data_call_result_list.md) dataCallResultList) | 获取当前所有数据连接状态响应。  | +| [SetInitApnInfoResponse](#setinitapninforesponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置初始化默认网络接入技术(APN)信息响应。  | +| [GetLinkBandwidthInfoResponse](#getlinkbandwidthinforesponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [DataLinkBandwidthInfo](_data_link_bandwidth_info.md) dataLinkBandwidthInfo) | 获取当前链路信息响应。  | +| [SetLinkBandwidthReportingRuleResponse](#setlinkbandwidthreportingruleresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置当前链路信息的上报规则响应。  | +| [SetDataPermittedResponse](#setdatapermittedresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 使能SIM卡槽数据业务响应。  | +| [RadioStateUpdated](#radiostateupdated) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] int state) | Radio状态上报。  | +| [VoiceRadioTechUpdated](#voiceradiotechupdated) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [VoiceRadioTechnology](_voice_radio_technology.md) voiceRadioTechnology) | 语音接入技术变化上报。  | +| [ShutDownResponse](#shutdownresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | Modem收到手机正在关机响应。  | +| [SetRadioStateResponse](#setradiostateresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置Modem状态响应。  | +| [GetRadioStateResponse](#getradiostateresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo,[in] int state) | 查询Modem状态响应。  | +| [GetImeiResponse](#getimeiresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] String imei) | 获取国际移动设备识别码响应。  | +| [GetMeidResponse](#getmeidresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] String meid) | 获取移动设备识别码响应。  | +| [GetVoiceRadioTechnologyResponse](#getvoiceradiotechnologyresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [VoiceRadioTechnology](_voice_radio_technology.md) voiceRadioTechnology) | 获取电路域接入技术响应。  | +| [GetBasebandVersionResponse](#getbasebandversionresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] String basebandVersion) | 查询基带版本响应。  | +| [SimStateUpdated](#simstateupdated) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | SIM卡状态变化上报。  | +| [SimStkSessionEndNotify](#simstksessionendnotify) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | STK SessionEnd指令上报。  | +| [SimStkProactiveNotify](#simstkproactivenotify) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] String response) | STK Proactive指令上报。  | +| [SimStkAlphaNotify](#simstkalphanotify) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] String response) | STK Alpha指令上报。  | +| [SimStkEventNotify](#simstkeventnotify) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] String response) | STK事件上报。  | +| [SimStkCallSetupNotify](#simstkcallsetupnotify) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | STK CallSetup指令上报。  | +| [SimRefreshNotify](#simrefreshnotify) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | SIM状态刷新上报。  | +| [SimRadioProtocolUpdated](#simradioprotocolupdated) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [RadioProtocol](_radio_protocol.md) radioProtocol) | STK Radio协议更新上报。  | +| [GetSimIOResponse](#getsimioresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [IccIoResultInfo](_icc_io_result_info.md) result) | 获取SIM卡数据响应。  | +| [GetSimStatusResponse](#getsimstatusresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [CardStatusInfo](_card_status_info.md) result) | 获取SIM卡状态响应。  | +| [GetImsiResponse](#getimsiresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] String response) | 获取SIM卡IMSI响应。  | +| [GetSimLockStatusResponse](#getsimlockstatusresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] int simLockStatus) | 获取SIM卡锁状态响应。  | +| [SetSimLockResponse](#setsimlockresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [LockStatusResp](_lock_status_resp.md) lockStatus) | 设置SIM卡锁响应。  | +| [ChangeSimPasswordResponse](#changesimpasswordresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [LockStatusResp](_lock_status_resp.md) lockStatus) | 修改SIM卡密码响应。  | +| [UnlockPinResponse](#unlockpinresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [LockStatusResp](_lock_status_resp.md) lockStatus) | PIN解锁响应。  | +| [UnlockPukResponse](#unlockpukresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [LockStatusResp](_lock_status_resp.md) lockStatus) | PUK解锁响应。  | +| [UnlockPin2Response](#unlockpin2response) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [LockStatusResp](_lock_status_resp.md) lockStatus) | PIN2解锁响应。  | +| [UnlockPuk2Response](#unlockpuk2response) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [LockStatusResp](_lock_status_resp.md) lockStatus) | PUK2解锁响应。  | +| [SetActiveSimResponse](#setactivesimresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 激活去激活SIM卡响应。  | +| [SimStkSendTerminalResponseResponse](#simstksendterminalresponseresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 发送STK TerminalResponse指令响应。  | +| [SimStkSendEnvelopeResponse](#simstksendenveloperesponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 发送STK Envelope指令响应。  | +| [SimStkSendCallSetupRequestResultResponse](#simstksendcallsetuprequestresultresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 发送STK CallSetup指令响应。  | +| [SimStkIsReadyResponse](#simstkisreadyresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 获取STK是否Ready状态响应。  | +| [GetRadioProtocolResponse](#getradioprotocolresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo,[in] struct [RadioProtocol](_radio_protocol.md) radioProtocol) | 获取主副卡协议栈响应。  | +| [SetRadioProtocolResponse](#setradioprotocolresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo,[in] struct [RadioProtocol](_radio_protocol.md) radioProtocol) | 设置主副卡协议栈响应。  | +| [SimOpenLogicalChannelResponse](#simopenlogicalchannelresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [OpenLogicalChannelResponse](_open_logical_channel_response.md) pOpenLogicalChannelResponse) | APDU打开逻辑通道响应。  | +| [SimCloseLogicalChannelResponse](#simcloselogicalchannelresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | APDU关闭逻辑通道响应。  | +| [SimTransmitApduLogicalChannelResponse](#simtransmitapdulogicalchannelresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [IccIoResultInfo](_icc_io_result_info.md) result) | APDU逻辑通道数据传输响应。  | +| [SimTransmitApduBasicChannelResponse](#simtransmitapdubasicchannelresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [IccIoResultInfo](_icc_io_result_info.md) result) | APDU基础通道数据传输响应。  | +| [SimAuthenticationResponse](#simauthenticationresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [IccIoResultInfo](_icc_io_result_info.md) result) | SIM卡鉴权响应。  | +| [UnlockSimLockResponse](#unlocksimlockresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [LockStatusResp](_lock_status_resp.md) lockStatus) | 解锁SIM卡响应。  | +| [NetworkCsRegStatusUpdated](#networkcsregstatusupdated) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [CsRegStatusInfo](_cs_reg_status_info.md) csRegStatusInfo) | CS域网络注册状态变化上报。  | +| [NetworkPsRegStatusUpdated](#networkpsregstatusupdated) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [PsRegStatusInfo](_ps_reg_status_info.md) psRegStatusInfo) | PS域网络注册状态变化上报。  | +| [SignalStrengthUpdated](#signalstrengthupdated) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [Rssi](_rssi.md) rssi) | 信号强度变化上报。  | +| [NetworkTimeZoneUpdated](#networktimezoneupdated) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] String timeZoneStr) | NITZ时区变化上报。  | +| [NetworkTimeUpdated](#networktimeupdated) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] String timeStr) | NITZ时间更新上报。  | +| [NetworkPhyChnlCfgUpdated](#networkphychnlcfgupdated) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [ChannelConfigInfoList](_channel_config_info_list.md) channelConfigInfoList) | 物理通道配置消息上报。  | +| [NetworkCurrentCellUpdated](#networkcurrentcellupdated) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [CellListCurrentInfo](_cell_list_current_info.md) cellListCurrentInfo) | 小区信息上报。  | +| [GetSignalStrengthResponse](#getsignalstrengthresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [Rssi](_rssi.md) rssi) | 获取信号强度响应。  | +| [GetCsRegStatusResponse](#getcsregstatusresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [CsRegStatusInfo](_cs_reg_status_info.md) csRegStatusInfo) | 获取语音(CS)域注册状态响应。  | +| [GetPsRegStatusResponse](#getpsregstatusresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [PsRegStatusInfo](_ps_reg_status_info.md) psRegStatusInfo) | 获取分组(PS)域注册状态响应。  | +| [GetOperatorInfoResponse](#getoperatorinforesponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [OperatorInfo](_operator_info.md) psRegStatusInfo) | 获取运营商名称信息响应。  | +| [GetNetworkSearchInformationResponse](#getnetworksearchinformationresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [AvailableNetworkList](_available_network_list.md) availableNetworkList) | 获取可用网络信息响应。  | +| [GetNetworkSelectionModeResponse](#getnetworkselectionmoderesponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [SetNetworkModeInfo](_set_network_mode_info.md) setNetworkModeInfo) | 获取选网模式响应。  | +| [SetNetworkSelectionModeResponse](#setnetworkselectionmoderesponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置选网模式响应。  | +| [GetNeighboringCellInfoListResponse](#getneighboringcellinfolistresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [CellListNearbyInfo](_cell_list_nearby_info.md) cellListNearbyInfo) | 获取相邻小区信息响应。  | +| [GetCurrentCellInfoResponse](#getcurrentcellinforesponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [CellListCurrentInfo](_cell_list_current_info.md) cellListCurrentInfo) | 获取小区信息响应。  | +| [SetPreferredNetworkResponse](#setpreferrednetworkresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置首选网络类型响应。  | +| [GetPreferredNetworkResponse](#getpreferrednetworkresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [PreferredNetworkTypeInfo](_preferred_network_type_info.md) preferredNetworkTypeInfo) | 获取首选网络类型响应。  | +| [GetPhysicalChannelConfigResponse](#getphysicalchannelconfigresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [ChannelConfigInfoList](_channel_config_info_list.md) channelConfigInfoList) | 获取物理通道配置响应。  | +| [SetLocateUpdatesResponse](#setlocateupdatesresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 开启或关闭小区位置更新导致的网络状态通知响应。  | +| [SetNotificationFilterResponse](#setnotificationfilterresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置通知过滤器响应。  | +| [SetDeviceStateResponse](#setdevicestateresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置设备状态响应。  | +| [NewSmsNotify](#newsmsnotify) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [SmsMessageInfo](_sms_message_info.md) smsMessageInfo) | GSM新短信通知上报。  | +| [NewCdmaSmsNotify](#newcdmasmsnotify) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo,[in] struct [SmsMessageInfo](_sms_message_info.md) smsMessageInfo) | CDMA新短信通知上报。  | +| [SmsStatusReportNotify](#smsstatusreportnotify) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [SmsMessageInfo](_sms_message_info.md) smsMessageInfo) | 新短信状态通知上报。  | +| [NewSmsStoredOnSimNotify](#newsmsstoredonsimnotify) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] int recordNumber, [in] int indicationType) | 收到SIM卡短信上报。  | +| [CBConfigNotify](#cbconfignotify) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [CBConfigReportInfo](_c_b_config_report_info.md) cellBroadConfigReportInfo) | 小区广播配置上报。  | +| [SendGsmSmsResponse](#sendgsmsmsresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [SendSmsResultInfo](_send_sms_result_info.md) sendSmsResultInfo) | 发送GSM短信响应。  | +| [SendCdmaSmsResponse](#sendcdmasmsresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [SendSmsResultInfo](_send_sms_result_info.md) sendSmsResultInfo) | 发送CDMA短信响应。  | +| [AddSimMessageResponse](#addsimmessageresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 写入GSM SIM卡短信响应。  | +| [DelSimMessageResponse](#delsimmessageresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 删除GSM SIM卡短信响应。  | +| [UpdateSimMessageResponse](#updatesimmessageresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 更新GSM SIM卡短信响应。  | +| [AddCdmaSimMessageResponse](#addcdmasimmessageresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 写入CDMA SIM卡短信响应。  | +| [DelCdmaSimMessageResponse](#delcdmasimmessageresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 删除CDMA SIM卡短信响应。  | +| [UpdateCdmaSimMessageResponse](#updatecdmasimmessageresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 更新CDMA SIM卡短信响应。  | +| [SetSmscAddrResponse](#setsmscaddrresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 设置短信中心地址响应。  | +| [GetSmscAddrResponse](#getsmscaddrresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [ServiceCenterAddress](_service_center_address.md) serviceCenterAddress) | 获取短信中心地址响应。  | +| [SetCBConfigResponse](#setcbconfigresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 激活GSM小区广播响应。  | +| [GetCBConfigResponse](#getcbconfigresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [CBConfigInfo](_c_b_config_info.md) cellBroadcastInfo) | 获取GSM小区广播配置响应。  | +| [SetCdmaCBConfigResponse](#setcdmacbconfigresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 激活CDMA小区广播响应。  | +| [GetCdmaCBConfigResponse](#getcdmacbconfigresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [CdmaCBConfigInfo](_cdma_c_b_config_info.md) cdmaCBConfigInfo) | 获取CDMA小区广播配置响应。  | +| [SendSmsMoreModeResponse](#sendsmsmoremoderesponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo, [in] struct [SendSmsResultInfo](_send_sms_result_info.md) sendSmsResultInfo) | 发送GSM长短信响应。  | +| [SendSmsAckResponse](#sendsmsackresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 确认接收新短信响应。  | +| [CommonErrorResponse](#commonerrorresponse) ([in] struct [RilRadioResponseInfo](_ril_radio_response_info.md) responseInfo) | 通用错误响应。  | + + +## 成员函数说明 + + +### ActivatePdpContextResponse() + + +``` +IRilCallback::ActivatePdpContextResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct SetupDataCallResultInfo setupDataCallResultInfo ) +``` +**描述:** +激活数据业务响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| setupDataCallResultInfo | 表示数据业务激活结果信息,详见[SetupDataCallResultInfo](_setup_data_call_result_info.md)。 | + + +### AddCdmaSimMessageResponse() + + +``` +IRilCallback::AddCdmaSimMessageResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +写入CDMA SIM卡短信响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### AddSimMessageResponse() + + +``` +IRilCallback::AddSimMessageResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +写入GSM SIM卡短信响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### AnswerResponse() + + +``` +IRilCallback::AnswerResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +接听电话响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### CallEmergencyNotice() + + +``` +IRilCallback::CallEmergencyNotice ([in] struct RilRadioResponseInfo responseInfo, [in] struct EmergencyInfoList emergencyInfoList ) +``` +**描述:** +紧急呼叫号码上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| emergencyInfoList | 表示紧急号码列表,详见[EmergencyInfoList](_emergency_info_list.md)。 | + + +### CallRingbackVoiceNotice() + + +``` +IRilCallback::CallRingbackVoiceNotice ([in] struct RilRadioResponseInfo responseInfo, [in] struct RingbackVoice ringbackVoice ) +``` +**描述:** +通话回铃音上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| ringbackVoice | 表示回铃音信息,详见[RingbackVoice](_ringback_voice.md)。 | + + +### CallRsrvccStatusNotify() + + +``` +IRilCallback::CallRsrvccStatusNotify ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +RSRVCC(Reverse Single Radio Voice Call Continuity)状态上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### CallSrvccStatusNotice() + + +``` +IRilCallback::CallSrvccStatusNotice ([in] struct RilRadioResponseInfo responseInfo, [in] struct SrvccStatus srvccStatus ) +``` +**描述:** +SRVCC(Single Radio Voice Call Continuity)状态上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| srvccStatus | 表示SRVCC(Single Radio Voice Call Continuity)状态,详见[SrvccStatus](_srvcc_status.md)。 | + + +### CallSsNotice() + + +``` +IRilCallback::CallSsNotice ([in] struct RilRadioResponseInfo responseInfo, [in] struct SsNoticeInfo ssNoticeInfo ) +``` +**描述:** +补充业务信息上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| ssNoticeInfo | 表示补充业务信息,详见[SsNoticeInfo](_ss_notice_info.md)。 | + + +### CallStateUpdated() + + +``` +IRilCallback::CallStateUpdated ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +通话状态更新上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### CallSupplementResponse() + + +``` +IRilCallback::CallSupplementResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +挂断前台、恢复后台响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### CallUssdNotice() + + +``` +IRilCallback::CallUssdNotice ([in] struct RilRadioResponseInfo responseInfo, [in] struct UssdNoticeInfo ussdNoticeInfo ) +``` +**描述:** +USSD业务信息上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| ussdNoticeInfo | 表示USSD业务信息,详见[UssdNoticeInfo](_ussd_notice_info.md)。 | + + +### CBConfigNotify() + + +``` +IRilCallback::CBConfigNotify ([in] struct RilRadioResponseInfo responseInfo, [in] struct CBConfigReportInfo cellBroadConfigReportInfo ) +``` +**描述:** +小区广播配置上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| cellBroadConfigReportInfo | 表示小区广播上报信息,详见[CBConfigReportInfo](_c_b_config_report_info.md)。 | + + +### ChangeSimPasswordResponse() + + +``` +IRilCallback::ChangeSimPasswordResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct LockStatusResp lockStatus ) +``` +**描述:** +修改SIM卡密码响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| [LockStatusResp](_lock_status_resp.md) | 表示获取到的SIM卡锁状态响应,详见[LockStatusResp](_lock_status_resp.md)。 | + + +### CombineConferenceResponse() + + +``` +IRilCallback::CombineConferenceResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +合并为会议电话响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### CommonErrorResponse() + + +``` +IRilCallback::CommonErrorResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +通用错误响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### DeactivatePdpContextResponse() + + +``` +IRilCallback::DeactivatePdpContextResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +断开数据业务响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### DelCdmaSimMessageResponse() + + +``` +IRilCallback::DelCdmaSimMessageResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +删除CDMA SIM卡短信响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### DelSimMessageResponse() + + +``` +IRilCallback::DelSimMessageResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +删除GSM SIM卡短信响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### DialResponse() + + +``` +IRilCallback::DialResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +拨打电话响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### GetBasebandVersionResponse() + + +``` +IRilCallback::GetBasebandVersionResponse ([in] struct RilRadioResponseInfo responseInfo, [in] String basebandVersion ) +``` +**描述:** +查询基带版本响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| basebandVersion | 表示基带版本。 | + + +### GetCallFailReasonResponse() + + +``` +IRilCallback::GetCallFailReasonResponse ([in] struct RilRadioResponseInfo responseInfo, [in] int callFail ) +``` +**描述:** +查询通话失败原因响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| callFail | 表示通话失败原因。 | + + +### GetCallListResponse() + + +``` +IRilCallback::GetCallListResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct CallInfoList callList ) +``` +**描述:** +查询通话状态列表响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| callList | 表示通话状态信息列表,详见[CallInfoList](_call_info_list.md)。 | + + +### GetCallPreferenceModeResponse() + + +``` +IRilCallback::GetCallPreferenceModeResponse ([in] struct RilRadioResponseInfo responseInfo, [in] int mode ) +``` +**描述:** +查询通话偏好模式响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| mode | 表示CallPreference模式。 | + + +### GetCallRestrictionResponse() + + +``` +IRilCallback::GetCallRestrictionResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct CallRestrictionResult result ) +``` +**描述:** +查询呼叫限制响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| result | 表示呼叫限制结果信息,详见[CallRestrictionResult](_call_restriction_result.md)。 | + + +### GetCallTransferInfoResponse() + + +``` +IRilCallback::GetCallTransferInfoResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct CallForwardQueryInfoList cFQueryList ) +``` +**描述:** +查询呼叫转移响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| cFQueryList | 表示呼叫转移信息列表,详见[CallForwardQueryInfoList](_call_forward_query_info_list.md)。 | + + +### GetCallWaitingResponse() + + +``` +IRilCallback::GetCallWaitingResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct CallWaitResult callWaitResult ) +``` +**描述:** +查询呼叫等待响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| callWaitResult | 表示呼叫等待结果信息,详见[CallWaitResult](_call_wait_result.md)。 | + + +### GetCBConfigResponse() + + +``` +IRilCallback::GetCBConfigResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct CBConfigInfo cellBroadcastInfo ) +``` +**描述:** +获取GSM小区广播配置响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| cellBroadcastInfo | 表示GSM小区广播配置信息,详见[CBConfigInfo](_c_b_config_info.md)。 | + + +### GetCdmaCBConfigResponse() + + +``` +IRilCallback::GetCdmaCBConfigResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct CdmaCBConfigInfo cdmaCBConfigInfo ) +``` +**描述:** +获取CDMA小区广播配置响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| cdmaCBConfigInfo | 表示CDMA小区广播配置信息,详见[CdmaCBConfigInfo](_cdma_c_b_config_info.md)。 | + + +### GetClipResponse() + + +``` +IRilCallback::GetClipResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct GetClipResult getClipResult ) +``` +**描述:** +查询主叫号码显示响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| getClipResult | 表示主叫号码显示结果信息,详见[GetClipResult](_get_clip_result.md)。 | + + +### GetClirResponse() + + +``` +IRilCallback::GetClirResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct GetClirResult getClirResult ) +``` +**描述:** +查询主叫号码显示限制响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| getClirResult | 表示主叫号码显示限制结果信息,详见[GetClirResult](_get_clir_result.md)。 | + + +### GetCsRegStatusResponse() + + +``` +IRilCallback::GetCsRegStatusResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct CsRegStatusInfo csRegStatusInfo ) +``` +**描述:** +获取语音(CS)域注册状态响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| csRegStatusInfo | 表示CS注册状态信息,详见[CsRegStatusInfo](_cs_reg_status_info.md)。 | + + +### GetCurrentCellInfoResponse() + + +``` +IRilCallback::GetCurrentCellInfoResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct CellListCurrentInfo cellListCurrentInfo ) +``` +**描述:** +获取小区信息响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| cellListCurrentInfo | 表示附近的小区信息列表,详见[CellListCurrentInfo](_cell_list_current_info.md)。 | + + +### GetEmergencyCallListResponse() + + +``` +IRilCallback::GetEmergencyCallListResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct EmergencyInfoList emergencyInfoList ) +``` +**描述:** +查询紧急呼叫号码列表响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| emergencyInfoList | 表示紧急号码列表,详见[EmergencyInfoList](_emergency_info_list.md)。 | + + +### GetImeiResponse() + + +``` +IRilCallback::GetImeiResponse ([in] struct RilRadioResponseInfo responseInfo, [in] String imei ) +``` +**描述:** +获取国际移动设备识别码响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| imei | 表示IMEI。 | + + +### GetImsiResponse() + + +``` +IRilCallback::GetImsiResponse ([in] struct RilRadioResponseInfo responseInfo, [in] String response ) +``` +**描述:** +获取SIM卡IMSI响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| response | 表示获取到的IMSI文本。 | + + +### GetLinkBandwidthInfoResponse() + + +``` +IRilCallback::GetLinkBandwidthInfoResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct DataLinkBandwidthInfo dataLinkBandwidthInfo ) +``` +**描述:** +获取当前链路信息响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| dataLinkBandwidthInfo | 表示网络频率信息,详见[DataLinkBandwidthInfo](_data_link_bandwidth_info.md)。 | + + +### GetMeidResponse() + + +``` +IRilCallback::GetMeidResponse ([in] struct RilRadioResponseInfo responseInfo, [in] String meid ) +``` +**描述:** +获取移动设备识别码响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| meid | 表示MEID。 | + + +### GetMuteResponse() + + +``` +IRilCallback::GetMuteResponse ([in] struct RilRadioResponseInfo responseInfo, [in] int mute ) +``` +**描述:** +查询静音响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| mute | 表示静音状态,0表示非静音,1表示静音。 | + + +### GetNeighboringCellInfoListResponse() + + +``` +IRilCallback::GetNeighboringCellInfoListResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct CellListNearbyInfo cellListNearbyInfo ) +``` +**描述:** +获取相邻小区信息响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| cellListNearbyInfo | 表示附近的小区信息列表,详见[CellListNearbyInfo](_cell_list_nearby_info.md)。 | + + +### GetNetworkSearchInformationResponse() + + +``` +IRilCallback::GetNetworkSearchInformationResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct AvailableNetworkList availableNetworkList ) +``` +**描述:** +获取可用网络信息响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| availableNetworkList | 表示可用网络列表,详见[AvailableNetworkList](_available_network_list.md)。 | + + +### GetNetworkSelectionModeResponse() + + +``` +IRilCallback::GetNetworkSelectionModeResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct SetNetworkModeInfo setNetworkModeInfo ) +``` +**描述:** +获取选网模式响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| setNetworkModeInfo | 表示可选择的网络模式,详见[SetNetworkModeInfo](_set_network_mode_info.md)。 | + + +### GetOperatorInfoResponse() + + +``` +IRilCallback::GetOperatorInfoResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct OperatorInfo psRegStatusInfo ) +``` +**描述:** +获取运营商名称信息响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| psRegStatusInfo | 表示运营商信息,详见[OperatorInfo](_operator_info.md)。 | + + +### GetPdpContextListResponse() + + +``` +IRilCallback::GetPdpContextListResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct DataCallResultList dataCallResultList ) +``` +**描述:** +获取当前所有数据连接状态响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| dataCallResultList | 表示数据业务激活结果列表,详见[DataCallResultList](_data_call_result_list.md)。 | + + +### GetPhysicalChannelConfigResponse() + + +``` +IRilCallback::GetPhysicalChannelConfigResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct ChannelConfigInfoList channelConfigInfoList ) +``` +**描述:** +获取物理通道配置响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| channelConfigInfoList | 表示物理通道配置信息列表,详见[ChannelConfigInfoList](_channel_config_info_list.md)。 | + + +### GetPreferredNetworkResponse() + + +``` +IRilCallback::GetPreferredNetworkResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct PreferredNetworkTypeInfo preferredNetworkTypeInfo ) +``` +**描述:** +获取首选网络类型响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| preferredNetworkTypeInfo | 表示首选网络类型信息,详见[PreferredNetworkTypeInfo](_preferred_network_type_info.md)。 | + + +### GetPsRegStatusResponse() + + +``` +IRilCallback::GetPsRegStatusResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct PsRegStatusInfo psRegStatusInfo ) +``` +**描述:** +获取分组(PS)域注册状态响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| psRegStatusInfo | 表示PS注册状态信息,详见[PsRegStatusInfo](_ps_reg_status_info.md)。 | + + +### GetRadioProtocolResponse() + + +``` +IRilCallback::GetRadioProtocolResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct RadioProtocol radioProtocol ) +``` +**描述:** +获取主副卡协议栈响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| [RadioProtocol](_radio_protocol.md) | 表示获取到的Radio协议,详见[RadioProtocol](_radio_protocol.md)。 | + + +### GetRadioStateResponse() + + +``` +IRilCallback::GetRadioStateResponse ([in] struct RilRadioResponseInfo responseInfo, [in] int state ) +``` +**描述:** +查询Modem状态响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### GetSignalStrengthResponse() + + +``` +IRilCallback::GetSignalStrengthResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct Rssi rssi ) +``` +**描述:** +获取信号强度响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| rssi | 表示信号强度,详见[Rssi](_rssi.md)。 | + + +### GetSimIOResponse() + + +``` +IRilCallback::GetSimIOResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct IccIoResultInfo result ) +``` +**描述:** +获取SIM卡数据响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| result | 表示SIM卡IO响应结果信息,详见[IccIoResultInfo](_icc_io_result_info.md)。 | + + +### GetSimLockStatusResponse() + + +``` +IRilCallback::GetSimLockStatusResponse ([in] struct RilRadioResponseInfo responseInfo, [in] int simLockStatus ) +``` +**描述:** +获取SIM卡锁状态响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| simLockStatus | 表示SIM卡锁状态,详见**simLockStatus**。 | + + +### GetSimStatusResponse() + + +``` +IRilCallback::GetSimStatusResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct CardStatusInfo result ) +``` +**描述:** +获取SIM卡状态响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| [CardStatusInfo](_card_status_info.md) | 表示卡状态信息,详见[CardStatusInfo](_card_status_info.md)。 | + + +### GetSmscAddrResponse() + + +``` +IRilCallback::GetSmscAddrResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct ServiceCenterAddress serviceCenterAddress ) +``` +**描述:** +获取短信中心地址响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | +| serviceCenterAddress | 表示短信中心地址信息,详见[ServiceCenterAddress](_service_center_address.md)。  | + + +### GetUssdResponse() + + +``` +IRilCallback::GetUssdResponse ([in] struct RilRadioResponseInfo responseInfo, [in] int cusd ) +``` +**描述:** +查询USSD业务响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| cusd | 表示USSD业务信息。 | + + +### GetVoiceRadioTechnologyResponse() + + +``` +IRilCallback::GetVoiceRadioTechnologyResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct VoiceRadioTechnology voiceRadioTechnology ) +``` +**描述:** +获取电路域接入技术响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| [VoiceRadioTechnology](_voice_radio_technology.md) | 表示语音接入技术,详见[VoiceRadioTechnology](_voice_radio_technology.md)。 | + + +### HangupResponse() + + +``` +IRilCallback::HangupResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +挂断电话响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### HoldCallResponse() + + +``` +IRilCallback::HoldCallResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +保持通话响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### NetworkCsRegStatusUpdated() + + +``` +IRilCallback::NetworkCsRegStatusUpdated ([in] struct RilRadioResponseInfo responseInfo, [in] struct CsRegStatusInfo csRegStatusInfo ) +``` +**描述:** +CS域网络注册状态变化上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| csRegStatusInfo | 表示CS注册状态信息,详见[CsRegStatusInfo](_cs_reg_status_info.md)。 | + + +### NetworkCurrentCellUpdated() + + +``` +IRilCallback::NetworkCurrentCellUpdated ([in] struct RilRadioResponseInfo responseInfo, [in] struct CellListCurrentInfo cellListCurrentInfo ) +``` +**描述:** +小区信息上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| cellListCurrentInfo | 表示当前小区信息,详见[CellListCurrentInfo](_cell_list_current_info.md)。 | + + +### NetworkPhyChnlCfgUpdated() + + +``` +IRilCallback::NetworkPhyChnlCfgUpdated ([in] struct RilRadioResponseInfo responseInfo, [in] struct ChannelConfigInfoList channelConfigInfoList ) +``` +**描述:** +物理通道配置消息上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| channelConfigInfoList | 表示通道配置信息列表,详见[ChannelConfigInfoList](_channel_config_info_list.md)。 | + + +### NetworkPsRegStatusUpdated() + + +``` +IRilCallback::NetworkPsRegStatusUpdated ([in] struct RilRadioResponseInfo responseInfo, [in] struct PsRegStatusInfo psRegStatusInfo ) +``` +**描述:** +PS域网络注册状态变化上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| psRegStatusInfo | 表示PS注册状态信息,详见[PsRegStatusInfo](_ps_reg_status_info.md)。 | + + +### NetworkTimeUpdated() + + +``` +IRilCallback::NetworkTimeUpdated ([in] struct RilRadioResponseInfo responseInfo, [in] String timeStr ) +``` +**描述:** +NITZ时间更新上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| timeStr | 表示时间。 | + + +### NetworkTimeZoneUpdated() + + +``` +IRilCallback::NetworkTimeZoneUpdated ([in] struct RilRadioResponseInfo responseInfo, [in] String timeZoneStr ) +``` +**描述:** +NITZ时区变化上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| timeZoneStr | 表示时区。 | + + +### NewCdmaSmsNotify() + + +``` +IRilCallback::NewCdmaSmsNotify ([in] struct RilRadioResponseInfo responseInfo, [in] struct SmsMessageInfo smsMessageInfo ) +``` +**描述:** +CDMA新短信通知上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| smsMessageInfo | 表示上报短信信息,详见[SmsMessageInfo](_sms_message_info.md)。 | + + +### NewSmsNotify() + + +``` +IRilCallback::NewSmsNotify ([in] struct RilRadioResponseInfo responseInfo, [in] struct SmsMessageInfo smsMessageInfo ) +``` +**描述:** +GSM新短信通知上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| smsMessageInfo | 表示上报短信信息,详见[SmsMessageInfo](_sms_message_info.md)。 | + + +### NewSmsStoredOnSimNotify() + + +``` +IRilCallback::NewSmsStoredOnSimNotify ([in] struct RilRadioResponseInfo responseInfo, [in] int recordNumber, [in] int indicationType ) +``` +**描述:** +收到SIM卡短信上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| recordNumber | 表示SIM卡短信数量。  | +| indicationType | 表示响应类型,详见**HRilNotiType**。 | + + +### PdpContextListUpdated() + + +``` +IRilCallback::PdpContextListUpdated ([in] struct RilRadioResponseInfo responseInfo, [in] struct DataCallResultList dataCallResultList ) +``` +**描述:** +数据业务建立与断开等状态变化上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| dataCallResultList | 表示数据业务激活结果列表,详见[DataCallResultList](_data_call_result_list.md)。 | + + +### RadioStateUpdated() + + +``` +IRilCallback::RadioStateUpdated ([in] struct RilRadioResponseInfo responseInfo, [in] int state ) +``` +**描述:** +Radio状态上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| state | 表示Radio状态,0表示OFF,1表示ON。 | + + +### RejectResponse() + + +``` +IRilCallback::RejectResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +拒接电话响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SendCdmaSmsResponse() + + +``` +IRilCallback::SendCdmaSmsResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct SendSmsResultInfo sendSmsResultInfo ) +``` +**描述:** +发送CDMA短信响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| sendSmsResultInfo | 表示发送短信响应信息,详见[SendSmsResultInfo](_send_sms_result_info.md)。 | + + +### SendDtmfResponse() + + +``` +IRilCallback::SendDtmfResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +发送DTMF响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SendGsmSmsResponse() + + +``` +IRilCallback::SendGsmSmsResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct SendSmsResultInfo sendSmsResultInfo ) +``` +**描述:** +发送GSM短信响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| sendSmsResultInfo | 表示发送短信响应信息,详见[SendSmsResultInfo](_send_sms_result_info.md)。 | + + +### SendSmsAckResponse() + + +``` +IRilCallback::SendSmsAckResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +确认接收新短信响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SendSmsMoreModeResponse() + + +``` +IRilCallback::SendSmsMoreModeResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct SendSmsResultInfo sendSmsResultInfo ) +``` +**描述:** +发送GSM长短信响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| sendSmsResultInfo | 表示发送短信响应信息,详见[SendSmsResultInfo](_send_sms_result_info.md)。 | + + +### SeparateConferenceResponse() + + +``` +IRilCallback::SeparateConferenceResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +与会议电话分离响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetActiveSimResponse() + + +``` +IRilCallback::SetActiveSimResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +激活去激活SIM卡响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetBarringPasswordResponse() + + +``` +IRilCallback::SetBarringPasswordResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置呼叫限制密码响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetCallPreferenceModeResponse() + + +``` +IRilCallback::SetCallPreferenceModeResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置通话偏好模式响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetCallRestrictionResponse() + + +``` +IRilCallback::SetCallRestrictionResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置呼叫限制响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetCallTransferInfoResponse() + + +``` +IRilCallback::SetCallTransferInfoResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置呼叫转移响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetCallWaitingResponse() + + +``` +IRilCallback::SetCallWaitingResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置呼叫等待响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetCBConfigResponse() + + +``` +IRilCallback::SetCBConfigResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +激活GSM小区广播响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetCdmaCBConfigResponse() + + +``` +IRilCallback::SetCdmaCBConfigResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +激活CDMA小区广播响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetClipResponse() + + +``` +IRilCallback::SetClipResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置主叫号码显示响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetClirResponse() + + +``` +IRilCallback::SetClirResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置主叫号码显示限制响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetDataPermittedResponse() + + +``` +IRilCallback::SetDataPermittedResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +使能SIM卡槽数据业务响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetDeviceStateResponse() + + +``` +IRilCallback::SetDeviceStateResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置设备状态响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetEmergencyCallListResponse() + + +``` +IRilCallback::SetEmergencyCallListResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置紧急呼叫号码列表响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetInitApnInfoResponse() + + +``` +IRilCallback::SetInitApnInfoResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置初始化默认网络接入技术(APN)信息响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetLinkBandwidthReportingRuleResponse() + + +``` +IRilCallback::SetLinkBandwidthReportingRuleResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置当前链路信息的上报规则响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetLocateUpdatesResponse() + + +``` +IRilCallback::SetLocateUpdatesResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +开启或关闭小区位置更新导致的网络状态通知响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetMuteResponse() + + +``` +IRilCallback::SetMuteResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置静音响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetNetworkSelectionModeResponse() + + +``` +IRilCallback::SetNetworkSelectionModeResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置选网模式响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetNotificationFilterResponse() + + +``` +IRilCallback::SetNotificationFilterResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置通知过滤器响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetPreferredNetworkResponse() + + +``` +IRilCallback::SetPreferredNetworkResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置首选网络类型响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetRadioProtocolResponse() + + +``` +IRilCallback::SetRadioProtocolResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct RadioProtocol radioProtocol ) +``` +**描述:** +设置主副卡协议栈响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| [RadioProtocol](_radio_protocol.md) | 表示获取到的响应Radio协议,详见[RadioProtocol](_radio_protocol.md)。 | + + +### SetRadioStateResponse() + + +``` +IRilCallback::SetRadioStateResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置Modem状态响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetSimLockResponse() + + +``` +IRilCallback::SetSimLockResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct LockStatusResp lockStatus ) +``` +**描述:** +设置SIM卡锁响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| [LockStatusResp](_lock_status_resp.md) | 表示获取到的SIM卡锁状态响应,详见[LockStatusResp](_lock_status_resp.md)。 | + + +### SetSmscAddrResponse() + + +``` +IRilCallback::SetSmscAddrResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置短信中心地址响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SetUssdResponse() + + +``` +IRilCallback::SetUssdResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +设置USSD业务响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### ShutDownResponse() + + +``` +IRilCallback::ShutDownResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +Modem收到手机正在关机响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SignalStrengthUpdated() + + +``` +IRilCallback::SignalStrengthUpdated ([in] struct RilRadioResponseInfo responseInfo, [in] struct Rssi rssi ) +``` +**描述:** +信号强度变化上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| rssi | 表示信号强度,详见[Rssi](_rssi.md)。 | + + +### SimAuthenticationResponse() + + +``` +IRilCallback::SimAuthenticationResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct IccIoResultInfo result ) +``` +**描述:** +SIM卡鉴权响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| result | 表示SIM卡鉴权的结果信息,详见[IccIoResultInfo](_icc_io_result_info.md)。 | + + +### SimCloseLogicalChannelResponse() + + +``` +IRilCallback::SimCloseLogicalChannelResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +APDU关闭逻辑通道响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SimOpenLogicalChannelResponse() + + +``` +IRilCallback::SimOpenLogicalChannelResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct OpenLogicalChannelResponse pOpenLogicalChannelResponse ) +``` +**描述:** +APDU打开逻辑通道响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| [OpenLogicalChannelResponse](_open_logical_channel_response.md) | 表示打开逻辑通道的响应信息,详见[OpenLogicalChannelResponse](_open_logical_channel_response.md)。 | + + +### SimRadioProtocolUpdated() + + +``` +IRilCallback::SimRadioProtocolUpdated ([in] struct RilRadioResponseInfo responseInfo, [in] struct RadioProtocol radioProtocol ) +``` +**描述:** +STK Radio协议更新上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SimRefreshNotify() + + +``` +IRilCallback::SimRefreshNotify ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +SIM状态刷新上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SimStateUpdated() + + +``` +IRilCallback::SimStateUpdated ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +SIM卡状态变化上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SimStkAlphaNotify() + + +``` +IRilCallback::SimStkAlphaNotify ([in] struct RilRadioResponseInfo responseInfo, [in] String response ) +``` +**描述:** +STK Alpha指令上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SimStkCallSetupNotify() + + +``` +IRilCallback::SimStkCallSetupNotify ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +STK CallSetup指令上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SimStkEventNotify() + + +``` +IRilCallback::SimStkEventNotify ([in] struct RilRadioResponseInfo responseInfo, [in] String response ) +``` +**描述:** +STK事件上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SimStkIsReadyResponse() + + +``` +IRilCallback::SimStkIsReadyResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +获取STK是否Ready状态响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SimStkProactiveNotify() + + +``` +IRilCallback::SimStkProactiveNotify ([in] struct RilRadioResponseInfo responseInfo, [in] String response ) +``` +**描述:** +STK Proactive指令上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SimStkSendCallSetupRequestResultResponse() + + +``` +IRilCallback::SimStkSendCallSetupRequestResultResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +发送STK CallSetup指令响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SimStkSendEnvelopeResponse() + + +``` +IRilCallback::SimStkSendEnvelopeResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +发送STK Envelope指令响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SimStkSendTerminalResponseResponse() + + +``` +IRilCallback::SimStkSendTerminalResponseResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +发送STK TerminalResponse指令响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SimStkSessionEndNotify() + + +``` +IRilCallback::SimStkSessionEndNotify ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +STK SessionEnd指令上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SimTransmitApduBasicChannelResponse() + + +``` +IRilCallback::SimTransmitApduBasicChannelResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct IccIoResultInfo result ) +``` +**描述:** +APDU基础通道数据传输响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| result | 表示数据传输结果信息,详见[IccIoResultInfo](_icc_io_result_info.md)。 | + + +### SimTransmitApduLogicalChannelResponse() + + +``` +IRilCallback::SimTransmitApduLogicalChannelResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct IccIoResultInfo result ) +``` +**描述:** +APDU逻辑通道数据传输响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| result | 表示数据传输结果信息,详见[IccIoResultInfo](_icc_io_result_info.md)。 | + + +### SmsStatusReportNotify() + + +``` +IRilCallback::SmsStatusReportNotify ([in] struct RilRadioResponseInfo responseInfo, [in] struct SmsMessageInfo smsMessageInfo ) +``` +**描述:** +新短信状态通知上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| smsMessageInfo | 表示上报短信信息,详见[SmsMessageInfo](_sms_message_info.md)。 | + + +### StartDtmfResponse() + + +``` +IRilCallback::StartDtmfResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +开启DTMF响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### StopDtmfResponse() + + +``` +IRilCallback::StopDtmfResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +关闭DTMF响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### SwitchCallResponse() + + +``` +IRilCallback::SwitchCallResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +切换通话响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### UnHoldCallResponse() + + +``` +IRilCallback::UnHoldCallResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +取消保持通话响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### UnlockPin2Response() + + +``` +IRilCallback::UnlockPin2Response ([in] struct RilRadioResponseInfo responseInfo, [in] struct LockStatusResp lockStatus ) +``` +**描述:** +PIN2解锁响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| [LockStatusResp](_lock_status_resp.md) | 表示获取到的SIM卡锁状态响应,详见[LockStatusResp](_lock_status_resp.md)。 | + + +### UnlockPinResponse() + + +``` +IRilCallback::UnlockPinResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct LockStatusResp lockStatus ) +``` +**描述:** +PIN解锁响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| [LockStatusResp](_lock_status_resp.md) | 表示获取到的SIM卡锁状态响应,详见[LockStatusResp](_lock_status_resp.md)。 | + + +### UnlockPuk2Response() + + +``` +IRilCallback::UnlockPuk2Response ([in] struct RilRadioResponseInfo responseInfo, [in] struct LockStatusResp lockStatus ) +``` +**描述:** +PUK2解锁响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| [LockStatusResp](_lock_status_resp.md) | 表示获取到的SIM卡锁状态响应,详见[LockStatusResp](_lock_status_resp.md)。 | + + +### UnlockPukResponse() + + +``` +IRilCallback::UnlockPukResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct LockStatusResp lockStatus ) +``` +**描述:** +PUK解锁响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| [LockStatusResp](_lock_status_resp.md) | 表示获取到的SIM卡锁状态响应,详见[LockStatusResp](_lock_status_resp.md)。 | + + +### UnlockSimLockResponse() + + +``` +IRilCallback::UnlockSimLockResponse ([in] struct RilRadioResponseInfo responseInfo, [in] struct LockStatusResp lockStatus ) +``` +**描述:** +解锁SIM卡响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| [LockStatusResp](_lock_status_resp.md) | 表示获取到的SIM卡锁状态响应,详见[LockStatusResp](_lock_status_resp.md)。 | + + +### UpdateCdmaSimMessageResponse() + + +``` +IRilCallback::UpdateCdmaSimMessageResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +更新CDMA SIM卡短信响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### UpdateSimMessageResponse() + + +``` +IRilCallback::UpdateSimMessageResponse ([in] struct RilRadioResponseInfo responseInfo) +``` +**描述:** +更新GSM SIM卡短信响应。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。 | + + +### VoiceRadioTechUpdated() + + +``` +IRilCallback::VoiceRadioTechUpdated ([in] struct RilRadioResponseInfo responseInfo, [in] struct VoiceRadioTechnology voiceRadioTechnology ) +``` +**描述:** +语音接入技术变化上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| responseInfo | 表示通用响应信息,例如卡槽ID,请求序列ID等,详见[RilRadioResponseInfo](_ril_radio_response_info.md)。  | +| voiceRadioTechnology | 表示变化后的电路域接入技术,详见[VoiceRadioTechnology](_voice_radio_technology.md)。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_sensor_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_sensor_callback.md index 56699b4b547f0a277e721dc1a186a6f1da74bae3..6d107432c9a55ff86b9cf50fb099a1f758dc726e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_sensor_callback.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_sensor_callback.md @@ -1,7 +1,7 @@ # ISensorCallback -## **概述** +## 概述 定义用于上报传感器数据的回调函数。 @@ -9,10 +9,10 @@ **相关模块:** -[Sensor](sensor.md) +[Sensor](_sensor.md) -## **汇总** +## 汇总 ### Public 成员函数 @@ -22,7 +22,7 @@ | [OnDataEvent](#ondataevent) ([in] struct [HdfSensorEvents](_hdf_sensor_events.md) event) | 定义上报传感器数据的功能。 | -## **成员函数说明** +## 成员函数说明 ### OnDataEvent() @@ -32,7 +32,7 @@ ISensorCallback::OnDataEvent ([in] struct HdfSensorEvents event) ``` -**描述:** +**描述:** 定义上报传感器数据的功能。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_sensor_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_sensor_interface.md index be4ea74d8120858005132020f305985b2f322c06..01de9779e32921a0daef0814d5181c809fc1be15 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_sensor_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_sensor_interface.md @@ -1,43 +1,39 @@ # ISensorInterface -## **概述** +## 概述 提供Sensor设备基本控制操作接口。 操作包括获取传感器设备信息、订阅/取消订阅传感器数据、使能/去使能传感器、设置传感器模式、设置传感器精度、量程等可选配置接口定义。 -**Since:** - +**Since:** 2.2 - **Version:** - 1.0 - **相关模块:** -[Sensor](sensor.md) +[Sensor](_sensor.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [GetAllSensorInfo](#getallsensorinfo) ([out] struct [HdfSensorInformation](_hdf_sensor_information.md)[] info) | 获取当前系统中所有类型的传感器信息。 | -| [Enable](#enable) ([in] int sensorId) | 根据传感器设备类型标识使能传感器信息列表里存在的设备,只有数据订阅者使能传感器后,才能获取订阅的传感器数据。 | -| [Disable](#disable) ([in] int sensorId) | 根据传感器设备类型标识去使能传感器信息列表里存在的设备。 | -| [SetBatch](#setbatch) ([in] int sensorId,[in] long samplingInterval, [in] long reportInterval) | 设置指定传感器的数据上报模式,不同的工作模式,上报数据的方式不同。 | -| [SetMode](#setmode) ([in] int sensorId, [in] int mode) | 设置指定传感器数据上报模式。 | -| [SetOption](#setoption) ([in] int sensorId, [in] unsigned int option) | 设置指定传感器量程、精度等可选配置。 | -| [Register](#register) ([in] int groupId, [in] [ISensorCallback](interface_i_sensor_callback.md) callbackObj) | 订阅者注册传感器数据回调函数,系统会将获取到的传感器数据上报给订阅者。 | -| [Unregister](#unregister) ([in] int groupId, [in] [ISensorCallback](interface_i_sensor_callback.md) callbackObj) | 订阅者取消注册传感器数据回调函数。 | +| [GetAllSensorInfo](#getallsensorinfo) ([out] struct [HdfSensorInformation](_hdf_sensor_information.md)[] info) | 获取当前系统中所有类型的传感器信息。  | +| [Enable](#enable) ([in] int sensorId) | 根据传感器设备类型标识使能传感器信息列表里存在的设备,只有数据订阅者使能传感器后,才能获取订阅的传感器数据。  | +| [Disable](#disable) ([in] int sensorId) | 根据传感器设备类型标识去使能传感器信息列表里存在的设备。  | +| [SetBatch](#setbatch) ([in] int sensorId,[in] long samplingInterval, [in] long reportInterval) | 设置指定传感器的数据上报模式,不同的工作模式,上报数据的方式不同。  | +| [SetMode](#setmode) ([in] int sensorId, [in] int mode) | 设置指定传感器数据上报模式。  | +| [SetOption](#setoption) ([in] int sensorId, [in] unsigned int option) | 设置指定传感器量程、精度等可选配置。  | +| [Register](#register) ([in] int groupId, [in] [ISensorCallback](interface_i_sensor_callback.md) callbackObj) | 订阅者注册传感器数据回调函数,系统会将获取到的传感器数据上报给订阅者。  | +| [Unregister](#unregister) ([in] int groupId, [in] [ISensorCallback](interface_i_sensor_callback.md) callbackObj) | 订阅者取消注册传感器数据回调函数。  | -## **成员函数说明** +## 成员函数说明 ### Disable() @@ -46,16 +42,14 @@ ``` ISensorInterface::Disable ([in] int sensorId) ``` - -**描述:** - +**描述:** 根据传感器设备类型标识去使能传感器信息列表里存在的设备。 **参数:** | 名称 | 描述 | | -------- | -------- | -| sensorId | 唯一标识一个传感器设备类型,详见[HdfSensorTypeTag](sensor.md#hdfsensortypetag)。 | +| sensorId | 唯一标识一个传感器设备类型,详见[HdfSensorTypeTag](_sensor.md#hdfsensortypetag)。 | **返回:** @@ -70,16 +64,14 @@ ISensorInterface::Disable ([in] int sensorId) ``` ISensorInterface::Enable ([in] int sensorId) ``` - -**描述:** - +**描述:** 根据传感器设备类型标识使能传感器信息列表里存在的设备,只有数据订阅者使能传感器后,才能获取订阅的传感器数据。 **参数:** | 名称 | 描述 | | -------- | -------- | -| sensorId | 唯一标识一个传感器设备类型,详见[HdfSensorTypeTag](sensor.md#hdfsensortypetag)。 | +| sensorId | 唯一标识一个传感器设备类型,详见[HdfSensorTypeTag](_sensor.md#hdfsensortypetag)。 | **返回:** @@ -94,9 +86,7 @@ ISensorInterface::Enable ([in] int sensorId) ``` ISensorInterface::GetAllSensorInfo ([out] struct HdfSensorInformation[] info) ``` - -**描述:** - +**描述:** 获取当前系统中所有类型的传感器信息。 **参数:** @@ -118,16 +108,14 @@ ISensorInterface::GetAllSensorInfo ([out] struct HdfSensorInformation[] info) ``` ISensorInterface::Register ([in] int groupId, [in] ISensorCallback callbackObj ) ``` - -**描述:** - +**描述:** 订阅者注册传感器数据回调函数,系统会将获取到的传感器数据上报给订阅者。 **参数:** | 名称 | 描述 | | -------- | -------- | -| groupId | 传感器组ID。 groupId枚举值范围为128-160,表示已订阅医疗传感器服务,只需成功订阅一次,无需重复订阅。 groupId枚举值范围不在128-160之间,这意味着传统传感器已订阅,只需成功订阅一次,无需重复订阅。 | +| groupId | 传感器组ID。 groupId枚举值范围为128-160,表示已订阅医疗传感器服务,只需成功订阅一次,无需重复订阅。 groupId枚举值范围不在128-160之间,这意味着传统传感器已订阅,只需成功订阅一次,无需重复订阅。  | | callbackObj | 要注册的回调函数,详见[ISensorCallback](interface_i_sensor_callback.md)。 | **返回:** @@ -143,17 +131,15 @@ ISensorInterface::Register ([in] int groupId, [in] ISensorCallback callbackObj ) ``` ISensorInterface::SetBatch ([in] int sensorId, [in] long samplingInterval, [in] long reportInterval ) ``` - -**描述:** - +**描述:** 设置指定传感器的数据上报模式,不同的工作模式,上报数据的方式不同。 **参数:** | 名称 | 描述 | | -------- | -------- | -| sensorId | 唯一标识一个传感器设备类型,详见[HdfSensorTypeTag](sensor.md#hdfsensortypetag)。 | -| samplingInterval | 设置指定传感器的数据采样间隔,单位纳秒。 | +| sensorId | 唯一标识一个传感器设备类型,详见[HdfSensorTypeTag](_sensor.md#hdfsensortypetag)。  | +| samplingInterval | 设置指定传感器的数据采样间隔,单位纳秒。  | | reportInterval | 表示传感器数据上报间隔,单位纳秒。 | **返回:** @@ -169,17 +155,15 @@ ISensorInterface::SetBatch ([in] int sensorId, [in] long samplingInterval, [in] ``` ISensorInterface::SetMode ([in] int sensorId, [in] int mode ) ``` - -**描述:** - +**描述:** 设置指定传感器数据上报模式。 **参数:** | 名称 | 描述 | | -------- | -------- | -| sensorId | 唯一标识一个传感器设备类型,详见[HdfSensorTypeTag](sensor.md#hdfsensortypetag)。 | -| mode | 传感器的数据上报模式,详见[HdfSensorModeType](sensor.md#hdfsensormodetype)。 | +| sensorId | 唯一标识一个传感器设备类型,详见[HdfSensorTypeTag](_sensor.md#hdfsensortypetag)。  | +| mode | 传感器的数据上报模式,详见[HdfSensorModeType](_sensor.md#hdfsensormodetype)。 | **返回:** @@ -194,16 +178,14 @@ ISensorInterface::SetMode ([in] int sensorId, [in] int mode ) ``` ISensorInterface::SetOption ([in] int sensorId, [in] unsigned int option ) ``` - -**描述:** - +**描述:** 设置指定传感器量程、精度等可选配置。 **参数:** | 名称 | 描述 | | -------- | -------- | -| sensorId | 唯一标识一个传感器设备类型,详见[HdfSensorTypeTag](sensor.md#hdfsensortypetag)。 | +| sensorId | 唯一标识一个传感器设备类型,详见[HdfSensorTypeTag](_sensor.md#hdfsensortypetag)。  | | option | 表示要设置的选项,如测量范围和精度。 | **返回:** @@ -219,16 +201,14 @@ ISensorInterface::SetOption ([in] int sensorId, [in] unsigned int option ) ``` ISensorInterface::Unregister ([in] int groupId, [in] ISensorCallback callbackObj ) ``` - -**描述:** - +**描述:** 订阅者取消注册传感器数据回调函数。 **参数:** | 名称 | 描述 | | -------- | -------- | -| groupId | 传感器组ID。 groupId枚举值范围为128-160,表示已订阅医疗传感器服务。只需成功取消订阅一次,无需重复取消订阅。 groupId枚举值范围不在128-160之间,这意味着传统传感器已订阅。并且成功取消订阅。 | +| groupId | 传感器组ID。 groupId枚举值范围为128-160,表示已订阅医疗传感器服务。只需成功取消订阅一次,无需重复取消订阅。 groupId枚举值范围不在128-160之间,这意味着传统传感器已订阅。并且成功取消订阅。  | | callbackObj | 要取消注册的回调函数,详见[ISensorCallback](interface_i_sensor_callback.md)。 | **返回:** diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_stream_operator.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_stream_operator.md index 98a762eceb7b11e0c574191f4586aa767a95ede1..c2ca391257f8fe96da9fab131bed68cf2ba4d3bc 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_stream_operator.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_stream_operator.md @@ -1,30 +1,30 @@ # IStreamOperator -## **概述** +## 概述 定义Camera设备流操作。 对Camera设备执行流的创建、配置与添加参数、属性获取、句柄绑定与解除、图像捕获与取消、流的转换以及流释放操作。 -流是指从底层设备输出,经本模块内部各环节处理,最终传递到上层服务或者应用的一组数据序列。 本模块支持的流的类型有预览流,录像流,拍照流等,更多类型可查看[StreamIntent](camera.md#streamintent)。 +流是指从底层设备输出,经本模块内部各环节处理,最终传递到上层服务或者应用的一组数据序列。本模块支持的流的类型有预览流,录像流,拍照流等,更多类型可查看[StreamIntent](_camera.md#streamintent)。 **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [IsStreamsSupported](#isstreamssupported) ([in] enum [OperationMode](camera.md#operationmode) mode, [in] unsigned char[] modeSetting, [in] struct [StreamInfo](_stream_info.md)[] infos, [out] enum [StreamSupportType](camera.md#streamsupporttype) type) | 查询是否支持添加参数对应的流。 | +| [IsStreamsSupported](#isstreamssupported) ([in] enum [OperationMode](_camera.md#operationmode) mode, [in] unsigned char[] modeSetting, [in] struct [StreamInfo](_stream_info.md)[] infos, [out] enum [StreamSupportType](_camera.md#streamsupporttype) type) | 查询是否支持添加参数对应的流。 | | [CreateStreams](#createstreams) ([in] struct [StreamInfo](_stream_info.md)[] streamInfos) | 创建流。 | | [ReleaseStreams](#releasestreams) ([in] int[] streamIds) | 释放流。 | -| [CommitStreams](#commitstreams) ([in] enum [OperationMode](camera.md#operationmode) mode, [in] unsigned char[] modeSetting) | 配置流。 | +| [CommitStreams](#commitstreams) ([in] enum [OperationMode](_camera.md#operationmode) mode, [in] unsigned char[] modeSetting) | 配置流。 | | [GetStreamAttributes](#getstreamattributes) ([out] struct [StreamAttribute](_stream_attribute.md)[] attributes) | 获取流的属性。通过该接口获取的流属性可能会和[CreateStreams](#createstreams)输入的流信息存在差异。 | | [AttachBufferQueue](#attachbufferqueue) ([in] int streamId, [in] BufferProducerSequenceable bufferProducer) | 绑定生产者句柄和指定流。 | | [DetachBufferQueue](#detachbufferqueue) ([in] int streamId) | 解除生产者句柄和指定流的绑定关系。 | @@ -33,7 +33,7 @@ | [ChangeToOfflineStream](#changetoofflinestream) ([in] int[] streamIds, [in] [IStreamOperatorCallback](interface_i_stream_operator_callback.md) callbackObj, [out] [IOfflineStreamOperator](interface_i_offline_stream_operator.md) offlineOperator) | 将指定流转换成离线流。 | -## **成员函数说明** +## 成员函数说明 ### AttachBufferQueue() @@ -43,7 +43,7 @@ IStreamOperator::AttachBufferQueue ([in] int streamId, [in] BufferProducerSequenceable bufferProducer ) ``` -**描述:** +**描述:** 绑定生产者句柄和指定流。 @@ -60,7 +60,7 @@ IStreamOperator::AttachBufferQueue ([in] int streamId, [in] BufferProducerSequen NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 **参见:** @@ -74,7 +74,7 @@ NO_ERROR 表示执行成功。 IStreamOperator::CancelCapture ([in] int captureId) ``` -**描述:** +**描述:** 取消连续捕获。捕获结束时,会调用[OnCaptureEnded](interface_i_stream_operator_callback.md#oncaptureended)来通知调用者捕获的帧计数等信息。 @@ -88,7 +88,7 @@ IStreamOperator::CancelCapture ([in] int captureId) NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 **参见:** @@ -102,7 +102,7 @@ NO_ERROR 表示执行成功。 IStreamOperator::Capture ([in] int captureId, [in] struct CaptureInfo info, [in] boolean isStreaming ) ``` -**描述:** +**描述:** 捕获图像。 @@ -112,7 +112,7 @@ IStreamOperator::Capture ([in] int captureId, [in] struct CaptureInfo info, [in] - 单次捕获即触发之后只捕获一帧图像数据,用于单次拍照场景。捕获启动时,会调用[OnCaptureStarted](interface_i_stream_operator_callback.md#oncapturestarted)来通知调用者捕获已经启动。 -- 连续捕获需调用[CancelCapture](#cancelcapture)来停止捕获。捕获结束时,会调用[OnCaptureEnded](interface_i_stream_operator_callback.md#oncaptureended)来通知调用者捕获的帧计数等信息。 [CaptureInfo](_capture_info.md)的[enableShutterCallback_](_capture_info.md#enableshuttercallback)使能OnFrameShutter,使能后每次捕获触发OnFrameShutter。 对于多个流同时捕获的场景,本模块内部保证同时上报多路流捕获数据。 +- 连续捕获需调用[CancelCapture](#cancelcapture)来停止捕获。捕获结束时,会调用[OnCaptureEnded](interface_i_stream_operator_callback.md#oncaptureended)来通知调用者捕获的帧计数等信息。 [CaptureInfo](_capture_info.md)的enableShutterCallback_使能[OnFrameShutter](interface_i_stream_operator_callback.md#onframeshutter),使能后每次捕获触发[OnFrameShutter](interface_i_stream_operator_callback.md#onframeshutter)。 对于多个流同时捕获的场景,本模块内部保证同时上报多路流捕获数据。 **参数:** @@ -126,7 +126,7 @@ IStreamOperator::Capture ([in] int captureId, [in] struct CaptureInfo info, [in] NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 **参见:** @@ -140,7 +140,7 @@ NO_ERROR 表示执行成功。 IStreamOperator::ChangeToOfflineStream ([in] int[] streamIds, [in] IStreamOperatorCallback callbackObj, [out] IOfflineStreamOperator offlineOperator ) ``` -**描述:** +**描述:** 将指定流转换成离线流。 @@ -158,7 +158,7 @@ IStreamOperator::ChangeToOfflineStream ([in] int[] streamIds, [in] IStreamOperat NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 ### CommitStreams() @@ -168,7 +168,7 @@ NO_ERROR 表示执行成功。 IStreamOperator::CommitStreams ([in] enum OperationMode mode, [in] unsigned char[] modeSetting ) ``` -**描述:** +**描述:** 配置流。 @@ -178,14 +178,14 @@ IStreamOperator::CommitStreams ([in] enum OperationMode mode, [in] unsigned char | 名称 | 描述 | | -------- | -------- | -| mode | 流运行的模式,支持的模式定义在[OperationMode](camera.md#operationmode)。 | +| mode | 流运行的模式,支持的模式定义在[OperationMode](_camera.md#operationmode)。 | | modeSetting | 流的配置参数,包括帧率,ZOOM等信息。ZOOM:变焦 | **返回:** NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 ### CreateStreams() @@ -195,7 +195,7 @@ NO_ERROR 表示执行成功。 IStreamOperator::CreateStreams ([in] struct StreamInfo[] streamInfos) ``` -**描述:** +**描述:** 创建流。 @@ -205,13 +205,13 @@ IStreamOperator::CreateStreams ([in] struct StreamInfo[] streamInfos) | 名称 | 描述 | | -------- | -------- | -| streamInfos | 流信息列表,流信息定义在[StreamInfo](_stream_info.md)。输入的流信息可能会被修改,需通过[GetStreamAttributes](#getstreamattributes)获取最新的流属性。 | +| streamInfos | 流信息列表,流信息定义在[StreamInfo](_stream_info.md)。输入的流信息可能会被修改,需通过 [GetStreamAttributes](#getstreamattributes)获取最新的流属性。 | **返回:** NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 ### DetachBufferQueue() @@ -221,7 +221,7 @@ NO_ERROR 表示执行成功。 IStreamOperator::DetachBufferQueue ([in] int streamId) ``` -**描述:** +**描述:** 解除生产者句柄和指定流的绑定关系。 @@ -235,7 +235,7 @@ IStreamOperator::DetachBufferQueue ([in] int streamId) NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 **参见:** @@ -249,7 +249,7 @@ NO_ERROR 表示执行成功。 IStreamOperator::GetStreamAttributes ([out] struct StreamAttribute[] attributes) ``` -**描述:** +**描述:** 获取流的属性。通过该接口获取的流属性可能会和[CreateStreams](#createstreams)输入的流信息存在差异。 @@ -263,7 +263,7 @@ IStreamOperator::GetStreamAttributes ([out] struct StreamAttribute[] attributes) NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 ### IsStreamsSupported() @@ -273,7 +273,7 @@ NO_ERROR 表示执行成功。 IStreamOperator::IsStreamsSupported ([in] enum OperationMode mode, [in] unsigned char[] modeSetting, [in] struct StreamInfo[] infos, [out] enum StreamSupportType type ) ``` -**描述:** +**描述:** 查询是否支持添加参数对应的流。 @@ -289,16 +289,16 @@ IStreamOperator::IsStreamsSupported ([in] enum OperationMode mode, [in] unsigned | 名称 | 描述 | | -------- | -------- | -| mode | 流的使用模式,支持的模式参考[OperationMode](camera.md#operationmode)。 | +| mode | 流的使用模式,支持的模式参考[OperationMode](_camera.md#operationmode)。 | | modeSetting | 流的配置,包括帧率,3A等配置信息。3A:自动曝光 (AE)、自动聚焦 (AF)、自动白平衡 (AWB) | | infos | 流的配置信息,具体参考[StreamInfo](_stream_info.md)。 | -| type | 对动态配置流的支持类型,支持类型定义在[StreamSupportType](camera.md#streamsupporttype)。 | +| type | 对动态配置流的支持类型,支持类型定义在[StreamSupportType](_camera.md#streamsupporttype)。 | **返回:** NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 ### ReleaseStreams() @@ -308,7 +308,7 @@ NO_ERROR 表示执行成功。 IStreamOperator::ReleaseStreams ([in] int[] streamIds) ``` -**描述:** +**描述:** 释放流。 @@ -322,4 +322,4 @@ IStreamOperator::ReleaseStreams ([in] int[] streamIds) NO_ERROR 表示执行成功。 -其他值表示执行失败,具体错误码查看[CamRetCode](camera.md#camretcode)。 +其他值表示执行失败,具体错误码查看[CamRetCode](_camera.md#camretcode)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_stream_operator_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_stream_operator_callback.md index 0c1293b76174281509b427abc30d78bd51b17b55..928651bf44b18c0c3f097243e262d011f7ddb247 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_stream_operator_callback.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_stream_operator_callback.md @@ -1,7 +1,7 @@ # IStreamOperatorCallback -## **概述** +## 概述 定义Camera设备流回调操作。 @@ -9,10 +9,10 @@ **相关模块:** -[Camera](camera.md) +[Camera](_camera.md) -## **汇总** +## 汇总 ### Public 成员函数 @@ -25,7 +25,7 @@ | [OnFrameShutter](#onframeshutter) ([in] int captureId, [in] int[] streamIds, [in] unsigned long timestamp) | 帧捕获回调。 | -## **成员函数说明** +## 成员函数说明 ### OnCaptureEnded() @@ -35,7 +35,7 @@ IStreamOperatorCallback::OnCaptureEnded ([in] int captureId, [in] struct CaptureEndedInfo[] infos ) ``` -**描述:** +**描述:** 捕获结束回调,在捕获结束时调用。 @@ -58,7 +58,7 @@ IStreamOperatorCallback::OnCaptureEnded ([in] int captureId, [in] struct Capture IStreamOperatorCallback::OnCaptureError ([in] int captureId, [in] struct CaptureErrorInfo[] infos ) ``` -**描述:** +**描述:** 捕获错误回调,在捕获过程中发生错误时调用。 @@ -77,7 +77,7 @@ IStreamOperatorCallback::OnCaptureError ([in] int captureId, [in] struct Capture IStreamOperatorCallback::OnCaptureStarted ([in] int captureId, [in] int[] streamIds ) ``` -**描述:** +**描述:** 捕获开始回调,在捕获开始时调用。 @@ -100,11 +100,11 @@ IStreamOperatorCallback::OnCaptureStarted ([in] int captureId, [in] int[] stream IStreamOperatorCallback::OnFrameShutter ([in] int captureId, [in] int[] streamIds, [in] unsigned long timestamp ) ``` -**描述:** +**描述:** 帧捕获回调。 -通过**Capture**的输入参数[CaptureInfo](_capture_info.md)的enableShutterCallback_使能该回调, 使能后每次捕获均会触发此回调。 +通过[Capture](interface_i_stream_operator.md#capture)的输入参数[CaptureInfo](_capture_info.md)的enableShutterCallback_使能该回调, 使能后每次捕获均会触发此回调。 **参数:** @@ -116,4 +116,4 @@ IStreamOperatorCallback::OnFrameShutter ([in] int captureId, [in] int[] streamId **参见:** -Capture +[Capture](interface_i_stream_operator.md#capture) diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_thermal_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_thermal_callback.md index 96d23ab5bea3795d727408cd8be19ef490f957b7..51a04d18de365fffe51f0af530b454bb0508bd03 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_thermal_callback.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_thermal_callback.md @@ -1,32 +1,30 @@ # IThermalCallback -## **概述** +## 概述 订阅设备发热状态的回调。 服务创建此回调对象后,可以调用[IThermalInterface](interface_i_thermal_interface.md)的接口注册回调,从而订阅设备发热状态的变化。 **Since:** - 3.1 - **相关模块:** [Thermal](thermal.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [OnThermalDataEvent](#onthermaldataevent) ([in] struct [HdfThermalCallbackInfo](_hdf_thermal_callback_info.md) event) | 设备发热状态变化的回调方法。 | +| [OnThermalDataEvent](#onthermaldataevent) ([in] struct [HdfThermalCallbackInfo](_hdf_thermal_callback_info.md) event) | 设备发热状态变化的回调方法。  | -## **成员函数说明** +## 成员函数说明 ### OnThermalDataEvent() @@ -35,9 +33,7 @@ ``` IThermalCallback::OnThermalDataEvent ([in] struct HdfThermalCallbackInfo event) ``` - -**描述:** - +**描述:** 设备发热状态变化的回调方法。 当设备发热状态发生变化时,将通过此方法的参数返回给服务。 @@ -46,7 +42,7 @@ IThermalCallback::OnThermalDataEvent ([in] struct HdfThermalCallbackInfo event) | 名称 | 描述 | | -------- | -------- | -| event | 设备发热信息,包括器件类型、器件温度。 | +| event | 输入参数,设备发热信息,包括器件类型、器件温度。  | **参见:** diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_thermal_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_thermal_interface.md index d911533f458425c6c0e5afe889500d55de599b07..46263dadf08b992893b004161362dbdb19617f9a 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_thermal_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_thermal_interface.md @@ -1,37 +1,35 @@ # IThermalInterface -## **概述** +## 概述 设备温度管理、控制及订阅接口。 服务获取此对象后,可以调用相关的接口管理、控制和订阅设备温度。 -**Since:** - +**Since:** 3.1 - **相关模块:** [Thermal](thermal.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [SetCpuFreq](#setcpufreq) ([in] int freq) | 设置CPU频率。 | -| [SetGpuFreq](#setgpufreq) ([in] int freq) | 设置GPU频率。 | -| [SetBatteryCurrent](#setbatterycurrent) ([in] int current) | 设置充电电流。 | -| [GetThermalZoneInfo](#getthermalzoneinfo) ([out] struct [HdfThermalCallbackInfo](_hdf_thermal_callback_info.md) event) | 获取设备发热的信息。 | -| [Register](#register) ([in] [IThermalCallback](interface_i_thermal_callback.md) callbackObj) | 注册设备发热状态的回调。 | -| [Unregister](#unregister) () | 取消注册设备发热状态的回调。 | +| [SetCpuFreq](#setcpufreq) ([in] int freq) | 设置CPU频率。  | +| [SetGpuFreq](#setgpufreq) ([in] int freq) | 设置GPU频率。  | +| [SetBatteryCurrent](#setbatterycurrent) ([in] int current) | 设置充电电流。  | +| [GetThermalZoneInfo](#getthermalzoneinfo) ([out] struct [HdfThermalCallbackInfo](_hdf_thermal_callback_info.md) event) | 获取设备发热的信息。  | +| [Register](#register) ([in] [IThermalCallback](interface_i_thermal_callback.md) callbackObj) | 注册设备发热状态的回调。  | +| [Unregister](#unregister) () | 取消注册设备发热状态的回调。  | -## **成员函数说明** +## 成员函数说明 ### GetThermalZoneInfo() @@ -40,9 +38,7 @@ ``` IThermalInterface::GetThermalZoneInfo ([out] struct HdfThermalCallbackInfo event) ``` - -**描述:** - +**描述:** 获取设备发热的信息。 **参数:** @@ -66,9 +62,7 @@ HDF_SUCCESS 表示获取成功。 ``` IThermalInterface::Register ([in] IThermalCallback callbackObj) ``` - -**描述:** - +**描述:** 注册设备发热状态的回调。 **参数:** @@ -92,9 +86,7 @@ HDF_SUCCESS 表示注册成功。 ``` IThermalInterface::SetBatteryCurrent ([in] int current) ``` - -**描述:** - +**描述:** 设置充电电流。 **参数:** @@ -114,9 +106,7 @@ HDF_SUCCESS 表示设置成功 ``` IThermalInterface::SetCpuFreq ([in] int freq) ``` - -**描述:** - +**描述:** 设置CPU频率。 **参数:** @@ -136,9 +126,7 @@ HDF_SUCCESS 表示设置成功。 ``` IThermalInterface::SetGpuFreq ([in] int freq) ``` - -**描述:** - +**描述:** 设置GPU频率。 **参数:** @@ -158,9 +146,7 @@ HDF_SUCCESS 表示设置成功。 ``` IThermalInterface::Unregister () ``` - -**描述:** - +**描述:** 取消注册设备发热状态的回调。 **返回:** diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_usb_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_usb_interface.md index 214049b2314770756eb8da433404716a06de8503..4275d101c485a3e600e6a8f9b299db6b9eeb3c6e 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_usb_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_usb_interface.md @@ -1,7 +1,7 @@ # IUsbInterface -## **概述** +## 概述 定义USB驱动基本的操作功能。 @@ -9,53 +9,53 @@ **相关模块:** -[USB](usb.md) +[USB](_u_s_b.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [OpenDevice](#opendevice) ([in] struct [UsbDev](_usb_dev.md) dev) | 打开设备,建立连接。 | -| [CloseDevice](#closedevice) ([in] struct [UsbDev](_usb_dev.md) dev) | 关闭设备,释放与设备相关的所有系统资源。 | -| [GetDeviceDescriptor](#getdevicedescriptor) ([in] struct [UsbDev](_usb_dev.md) dev, [out] unsigned char[] descriptor) | 获取设备描述符,设备描述符提供了关于设备、设备的配置以及任何设备所归属的类的信息。 | -| [GetStringDescriptor](#getstringdescriptor) ([in] struct [UsbDev](_usb_dev.md) dev, [in] unsigned char descId, [out] unsigned char[] descriptor) | 根据设备的字符串ID获取字符串描述符,字符串描述符是提供一些设备接口相关的描述性信息,比如厂商的名字、产品序列号等。 | -| [GetConfigDescriptor](#getconfigdescriptor) ([in] struct [UsbDev](_usb_dev.md) dev, [in] unsigned char descId, [out] unsigned char[] descriptor) | 根据设备的配置ID获取配置描述符,配置描述符包含有关配置及其接口、备用设置及其终结点的信息。 | -| [GetRawDescriptor](#getrawdescriptor) ([in] struct [UsbDev](_usb_dev.md) dev, [out] unsigned char[] descriptor) | 获取USB设备的原始描述符。 | -| [GetFileDescriptor](#getfiledescriptor) ([in] struct [UsbDev](_usb_dev.md) dev, [out] int fd) | 获取USB设备的文件描述符。 | -| [SetConfig](#setconfig) ([in] struct [UsbDev](_usb_dev.md) dev, [in] unsigned char configIndex) | 设置USB设备当前的配置信息,USB设备被主机配置过后,主机可以使用设备提供的所有功能。 | -| [GetConfig](#getconfig) ([in] struct [UsbDev](_usb_dev.md) dev, [out] unsigned char configIndex) | 获取USB设备当前的配置信息。 | -| [ClaimInterface](#claiminterface) ([in] struct [UsbDev](_usb_dev.md) dev, [in] unsigned char interfaceid, [in] unsigned char force) | 打开USB设备的接口并声明独占,必须在数据传输前执行。 | -| [ReleaseInterface](#releaseinterface) ([in] struct [UsbDev](_usb_dev.md) dev, [in] unsigned char interfaceid) | 在停止数据传输后关闭占用的USB设备接口,并释放相关资源。 | -| [SetInterface](#setinterface) ([in] struct [UsbDev](_usb_dev.md) dev, [in] unsigned char interfaceid, [in] unsigned char altIndex) | 设置USB设备指定接口的备选设置,用于在具有相同ID但不同备用设置的两个接口之间进行选择。 | -| [BulkTransferRead](#bulktransferread) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] int timeout, [out] unsigned char[] data) | 在USB设备指定端点方向为读取时,执行批量数据读取。 | -| [BulkTransferWrite](#bulktransferwrite) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] int timeout, [in] unsigned char[] data) | 在USB设备指定端点方向为写入时,执行批量数据写入。 | -| [ControlTransferRead](#controltransferread) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbCtrlTransfer](_usb_ctrl_transfer.md) ctrl, [out] unsigned char[] data) | 在传输状态为读取并且控制端点是端点零时,对USB设备执行控制传输。 | -| [ControlTransferWrite](#controltransferwrite) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbCtrlTransfer](_usb_ctrl_transfer.md) ctrl, [in] unsigned char[] data) | 在传输状态为写入并且控制端点是端点零时,对USB设备执行控制传输。 | -| [InterruptTransferRead](#interrupttransferread) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] int timeout, [out] unsigned char[] data) | 在USB设备指定端点方向为数据读取时执行中断数据读取。 | -| [InterruptTransferWrite](#interrupttransferwrite) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] int timeout, [in] unsigned char[] data) | 在USB设备指定端点方向为写入时执行中断数据写入。 | -| [IsoTransferRead](#isotransferread) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] int timeout, [out] unsigned char[] data) | 在USB设备指定端点方向为读取时执行等时数据读取。 | -| [IsoTransferWrite](#isotransferwrite) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] int timeout, [in] unsigned char[] data) | 在USB设备指定端点方向为写入时执行等时数据写入。 | -| [RequestQueue](#requestqueue) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] unsigned char[] clientData, [in] unsigned char[] buffer) | 在USB设备指定端点上进行异步数据发送或者接收请求,数据传输方向由端点方向决定。 | -| [RequestWait](#requestwait) ([in] struct [UsbDev](_usb_dev.md) dev, [out] unsigned char[] clientData, [out] unsigned char[] buffer, [in] int timeout) | 等待RequestQueue异步请求的操作结果。 | -| [RequestCancel](#requestcancel) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe) | 取消待处理的数据请求。 | -| [GetCurrentFunctions](#getcurrentfunctions) ([out] int funcs) | 获取USB设备当前的功能(按位域表示)。 | -| [SetCurrentFunctions](#setcurrentfunctions) ([in] int funcs) | 设置USB设备当前的功能(按位域表示)。 | -| [SetPortRole](#setportrole) ([in] int portId, [in] int powerRole, [in] int dataRole) | 设置USB设备端口的角色。 | -| [QueryPort](#queryport) ([out] int portId, [out] int powerRole, [out] int dataRole, [out] int mode) | 查询USB设备端口的当前设置信息。 | -| [BindUsbdSubscriber](#bindusbdsubscriber) ([in] [IUsbdSubscriber](interface_i_usbd_subscriber.md) subscriber) | 绑定订阅者。 | -| [UnbindUsbdSubscriber](#unbindusbdsubscriber) ([in] [IUsbdSubscriber](interface_i_usbd_subscriber.md) subscriber) | 解绑订阅者。 | -| [RegBulkCallback](#regbulkcallback) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] [IUsbdBulkCallback](interface_i_usbd_bulk_callback.md) cb) | 注册批量传输异步回调函数。 | -| [UnRegBulkCallback](#unregbulkcallback) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe) | 注销批量传输异步回调函数。 | -| [BulkRead](#bulkread) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] Ashmem ashmem) | 批量传输异步读数据。 | -| [BulkWrite](#bulkwrite) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] Ashmem ashmem) | 批量传输异步写数据。 | -| [BulkCancel](#bulkcancel) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe) | 批量传输异步取消接口,用于取消当前接口的异步批量读写操作。 | - - -## **成员函数说明** +| [OpenDevice](#opendevice) ([in] struct [UsbDev](_usb_dev.md) dev) | 打开设备,建立连接。  | +| [CloseDevice](#closedevice) ([in] struct [UsbDev](_usb_dev.md) dev) | 关闭设备,释放与设备相关的所有系统资源。  | +| [GetDeviceDescriptor](#getdevicedescriptor) ([in] struct [UsbDev](_usb_dev.md) dev, [out] unsigned char[] descriptor) | 获取设备描述符,设备描述符提供了关于设备、设备的配置以及任何设备所归属的类的信息。  | +| [GetStringDescriptor](#getstringdescriptor) ([in] struct [UsbDev](_usb_dev.md) dev, [in] unsigned char descId, [out] unsigned char[] descriptor) | 根据设备的字符串ID获取字符串描述符,字符串描述符是提供一些设备接口相关的描述性信息,比如厂商的名字、产品序列号等。  | +| [GetConfigDescriptor](#getconfigdescriptor) ([in] struct [UsbDev](_usb_dev.md) dev, [in] unsigned char descId, [out] unsigned char[] descriptor) | 根据设备的配置ID获取配置描述符,配置描述符包含有关配置及其接口、备用设置及其终结点的信息。  | +| [GetRawDescriptor](#getrawdescriptor) ([in] struct [UsbDev](_usb_dev.md) dev, [out] unsigned char[] descriptor) | 获取USB设备的原始描述符。  | +| [GetFileDescriptor](#getfiledescriptor) ([in] struct [UsbDev](_usb_dev.md) dev, [out] int fd) | 获取USB设备的文件描述符。  | +| [SetConfig](#setconfig) ([in] struct [UsbDev](_usb_dev.md) dev, [in] unsigned char configIndex) | 设置USB设备当前的配置信息,USB设备被主机配置过后,主机可以使用设备提供的所有功能。  | +| [GetConfig](#getconfig) ([in] struct [UsbDev](_usb_dev.md) dev, [out] unsigned char configIndex) | 获取USB设备当前的配置信息。  | +| [ClaimInterface](#claiminterface) ([in] struct [UsbDev](_usb_dev.md) dev, [in] unsigned char interfaceid, [in] unsigned char force) | 打开USB设备的接口并声明独占,必须在数据传输前执行。  | +| [ReleaseInterface](#releaseinterface) ([in] struct [UsbDev](_usb_dev.md) dev, [in] unsigned char interfaceid) | 在停止数据传输后关闭占用的USB设备接口,并释放相关资源。  | +| [SetInterface](#setinterface) ([in] struct [UsbDev](_usb_dev.md) dev, [in] unsigned char interfaceid, [in] unsigned char altIndex) | 设置USB设备指定接口的备选设置,用于在具有相同ID但不同备用设置的两个接口之间进行选择。  | +| [BulkTransferRead](#bulktransferread) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] int timeout, [out] unsigned char[] data) | 在USB设备指定端点方向为读取时,执行批量数据读取。  | +| [BulkTransferWrite](#bulktransferwrite) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] int timeout, [in] unsigned char[] data) | 在USB设备指定端点方向为写入时,执行批量数据写入。  | +| [ControlTransferRead](#controltransferread) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbCtrlTransfer](_usb_ctrl_transfer.md) ctrl, [out] unsigned char[] data) | 在传输状态为读取并且控制端点是端点零时,对USB设备执行控制传输。  | +| [ControlTransferWrite](#controltransferwrite) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbCtrlTransfer](_usb_ctrl_transfer.md) ctrl, [in] unsigned char[] data) | 在传输状态为写入并且控制端点是端点零时,对USB设备执行控制传输。  | +| [InterruptTransferRead](#interrupttransferread) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] int timeout, [out] unsigned char[] data) | 在USB设备指定端点方向为数据读取时执行中断数据读取。  | +| [InterruptTransferWrite](#interrupttransferwrite) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] int timeout, [in] unsigned char[] data) | 在USB设备指定端点方向为写入时执行中断数据写入。  | +| [IsoTransferRead](#isotransferread) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] int timeout, [out] unsigned char[] data) | 在USB设备指定端点方向为读取时执行等时数据读取。  | +| [IsoTransferWrite](#isotransferwrite) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] int timeout, [in] unsigned char[] data) | 在USB设备指定端点方向为写入时执行等时数据写入。  | +| [RequestQueue](#requestqueue) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] unsigned char[] clientData, [in] unsigned char[] buffer) | 在USB设备指定端点上进行异步数据发送或者接收请求,数据传输方向由端点方向决定。  | +| [RequestWait](#requestwait) ([in] struct [UsbDev](_usb_dev.md) dev, [out] unsigned char[] clientData, [out] unsigned char[] buffer, [in] int timeout) | 等待RequestQueue异步请求的操作结果。  | +| [RequestCancel](#requestcancel) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe) | 取消待处理的数据请求。  | +| [GetCurrentFunctions](#getcurrentfunctions) ([out] int funcs) | 获取USB设备当前的功能(按位域表示)。  | +| [SetCurrentFunctions](#setcurrentfunctions) ([in] int funcs) | 设置USB设备当前的功能(按位域表示)。  | +| [SetPortRole](#setportrole) ([in] int portId, [in] int powerRole, [in] int dataRole) | 设置USB设备端口的角色。  | +| [QueryPort](#queryport) ([out] int portId, [out] int powerRole, [out] int dataRole, [out] int mode) | 查询USB设备端口的当前设置信息。  | +| [BindUsbdSubscriber](#bindusbdsubscriber) ([in] [IUsbdSubscriber](interface_i_usbd_subscriber.md) subscriber) | 绑定订阅者。  | +| [UnbindUsbdSubscriber](#unbindusbdsubscriber) ([in] [IUsbdSubscriber](interface_i_usbd_subscriber.md) subscriber) | 解绑订阅者。  | +| [RegBulkCallback](#regbulkcallback) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] [IUsbdBulkCallback](interface_i_usbd_bulk_callback.md) cb) | 注册批量传输异步回调函数。  | +| [UnRegBulkCallback](#unregbulkcallback) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe) | 注销批量传输异步回调函数。  | +| [BulkRead](#bulkread) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] Ashmem ashmem) | 批量传输异步读数据。  | +| [BulkWrite](#bulkwrite) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe, [in] Ashmem ashmem) | 批量传输异步写数据。  | +| [BulkCancel](#bulkcancel) ([in] struct [UsbDev](_usb_dev.md) dev, [in] struct [UsbPipe](_usb_pipe.md) pipe) | 批量传输异步取消接口,用于取消当前接口的异步批量读写操作。  | + + +## 成员函数说明 ### BindUsbdSubscriber() @@ -64,9 +64,7 @@ ``` IUsbInterface::BindUsbdSubscriber ([in] IUsbdSubscriber subscriber) ``` - -**描述:** - +**描述:** 绑定订阅者。 **参数:** @@ -88,16 +86,14 @@ IUsbInterface::BindUsbdSubscriber ([in] IUsbdSubscriber subscriber) ``` IUsbInterface::BulkCancel ([in] struct UsbDev dev, [in] struct UsbPipe pipe ) ``` - -**描述:** - +**描述:** 批量传输异步取消接口,用于取消当前接口的异步批量读写操作。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | | pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。 | **返回:** @@ -113,17 +109,15 @@ IUsbInterface::BulkCancel ([in] struct UsbDev dev, [in] struct UsbPipe pipe ) ``` IUsbInterface::BulkRead ([in] struct UsbDev dev, [in] struct UsbPipe pipe, [in] Ashmem ashmem ) ``` - -**描述:** - +**描述:** 批量传输异步读数据。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。  | | ashmem | 共享内存,用于存放读取的数据。 | **返回:** @@ -139,18 +133,16 @@ IUsbInterface::BulkRead ([in] struct UsbDev dev, [in] struct UsbPipe pipe, [in] ``` IUsbInterface::BulkTransferRead ([in] struct UsbDev dev, [in] struct UsbPipe pipe, [in] int timeout, [out] unsigned char[] data ) ``` - -**描述:** - +**描述:** 在USB设备指定端点方向为读取时,执行批量数据读取。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。 | -| timeout | 超时时间。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。  | +| timeout | 超时时间。  | | data | 读取的数据。 | **返回:** @@ -166,18 +158,16 @@ IUsbInterface::BulkTransferRead ([in] struct UsbDev dev, [in] struct UsbPipe pip ``` IUsbInterface::BulkTransferWrite ([in] struct UsbDev dev, [in] struct UsbPipe pipe, [in] int timeout, [in] unsigned char[] data ) ``` - -**描述:** - +**描述:** 在USB设备指定端点方向为写入时,执行批量数据写入。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。 | -| timeout | 超时时间。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。  | +| timeout | 超时时间。  | | data | 写入的数据。 | **返回:** @@ -193,17 +183,15 @@ IUsbInterface::BulkTransferWrite ([in] struct UsbDev dev, [in] struct UsbPipe pi ``` IUsbInterface::BulkWrite ([in] struct UsbDev dev, [in] struct UsbPipe pipe, [in] Ashmem ashmem ) ``` - -**描述:** - +**描述:** 批量传输异步写数据。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。  | | ashmem | 为共享内存,用于存放需要写入的数据。 | **返回:** @@ -219,17 +207,15 @@ IUsbInterface::BulkWrite ([in] struct UsbDev dev, [in] struct UsbPipe pipe, [in] ``` IUsbInterface::ClaimInterface ([in] struct UsbDev dev, [in] unsigned char interfaceid, [in] unsigned char force ) ``` - -**描述:** - +**描述:** 打开USB设备的接口并声明独占,必须在数据传输前执行。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| interfaceid | USB设备接口ID。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| interfaceid | USB设备接口ID。  | | force | 是否强制,1表示强制,0表示不强制。 | **返回:** @@ -245,9 +231,7 @@ IUsbInterface::ClaimInterface ([in] struct UsbDev dev, [in] unsigned char interf ``` IUsbInterface::CloseDevice ([in] struct UsbDev dev) ``` - -**描述:** - +**描述:** 关闭设备,释放与设备相关的所有系统资源。 **参数:** @@ -269,17 +253,15 @@ IUsbInterface::CloseDevice ([in] struct UsbDev dev) ``` IUsbInterface::ControlTransferRead ([in] struct UsbDev dev, [in] struct UsbCtrlTransfer ctrl, [out] unsigned char[] data ) ``` - -**描述:** - +**描述:** 在传输状态为读取并且控制端点是端点零时,对USB设备执行控制传输。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| ctrl | USB设备控制数据,详见[UsbCtrlTransfer](_usb_ctrl_transfer.md)。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| ctrl | USB设备控制数据,详见[UsbCtrlTransfer](_usb_ctrl_transfer.md)。  | | data | 读取的数据。 | **返回:** @@ -295,17 +277,15 @@ IUsbInterface::ControlTransferRead ([in] struct UsbDev dev, [in] struct UsbCtrlT ``` IUsbInterface::ControlTransferWrite ([in] struct UsbDev dev, [in] struct UsbCtrlTransfer ctrl, [in] unsigned char[] data ) ``` - -**描述:** - +**描述:** 在传输状态为写入并且控制端点是端点零时,对USB设备执行控制传输。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| ctrl | USB设备控制数据,详见[UsbCtrlTransfer](_usb_ctrl_transfer.md)。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| ctrl | USB设备控制数据,详见[UsbCtrlTransfer](_usb_ctrl_transfer.md)。  | | data | 写入的数据。 | **返回:** @@ -321,16 +301,14 @@ IUsbInterface::ControlTransferWrite ([in] struct UsbDev dev, [in] struct UsbCtrl ``` IUsbInterface::GetConfig ([in] struct UsbDev dev, [out] unsigned char configIndex ) ``` - -**描述:** - +**描述:** 获取USB设备当前的配置信息。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | | configIndex | USB设备配置信息的字符串描述符索引值(数字字符串)。 | **返回:** @@ -346,17 +324,15 @@ IUsbInterface::GetConfig ([in] struct UsbDev dev, [out] unsigned char configInde ``` IUsbInterface::GetConfigDescriptor ([in] struct UsbDev dev, [in] unsigned char descId, [out] unsigned char[] descriptor ) ``` - -**描述:** - +**描述:** 根据设备的配置ID获取配置描述符,配置描述符包含有关配置及其接口、备用设置及其终结点的信息。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| descId | USB设备的配置ID。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| descId | USB设备的配置ID。  | | descriptor | 获取USB设备配置信息。 | **返回:** @@ -372,9 +348,7 @@ IUsbInterface::GetConfigDescriptor ([in] struct UsbDev dev, [in] unsigned char d ``` IUsbInterface::GetCurrentFunctions ([out] int funcs) ``` - -**描述:** - +**描述:** 获取USB设备当前的功能(按位域表示)。 **参数:** @@ -396,16 +370,14 @@ IUsbInterface::GetCurrentFunctions ([out] int funcs) ``` IUsbInterface::GetDeviceDescriptor ([in] struct UsbDev dev, [out] unsigned char[] descriptor ) ``` - -**描述:** - +**描述:** 获取设备描述符,设备描述符提供了关于设备、设备的配置以及任何设备所归属的类的信息。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | | descriptor | USB设备的描述符信息。 | **返回:** @@ -421,16 +393,14 @@ IUsbInterface::GetDeviceDescriptor ([in] struct UsbDev dev, [out] unsigned char[ ``` IUsbInterface::GetFileDescriptor ([in] struct UsbDev dev, [out] int fd ) ``` - -**描述:** - +**描述:** 获取USB设备的文件描述符。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | | fd | USB设备的文件描述符。 | **返回:** @@ -446,16 +416,14 @@ IUsbInterface::GetFileDescriptor ([in] struct UsbDev dev, [out] int fd ) ``` IUsbInterface::GetRawDescriptor ([in] struct UsbDev dev, [out] unsigned char[] descriptor ) ``` - -**描述:** - +**描述:** 获取USB设备的原始描述符。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | | descriptor | USB设备的原始描述符。 | **返回:** @@ -471,17 +439,15 @@ IUsbInterface::GetRawDescriptor ([in] struct UsbDev dev, [out] unsigned char[] d ``` IUsbInterface::GetStringDescriptor ([in] struct UsbDev dev, [in] unsigned char descId, [out] unsigned char[] descriptor ) ``` - -**描述:** - +**描述:** 根据设备的字符串ID获取字符串描述符,字符串描述符是提供一些设备接口相关的描述性信息,比如厂商的名字、产品序列号等。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| descId | USB设备的描述符ID。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| descId | USB设备的描述符ID。  | | descriptor | 获取USB设备的字符串描述符。 | **返回:** @@ -497,18 +463,16 @@ IUsbInterface::GetStringDescriptor ([in] struct UsbDev dev, [in] unsigned char d ``` IUsbInterface::InterruptTransferRead ([in] struct UsbDev dev, [in] struct UsbPipe pipe, [in] int timeout, [out] unsigned char[] data ) ``` - -**描述:** - +**描述:** 在USB设备指定端点方向为数据读取时执行中断数据读取。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。 | -| timeout | 超时时间。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。  | +| timeout | 超时时间。  | | data | 读取的数据。 | **返回:** @@ -524,18 +488,16 @@ IUsbInterface::InterruptTransferRead ([in] struct UsbDev dev, [in] struct UsbPip ``` IUsbInterface::InterruptTransferWrite ([in] struct UsbDev dev, [in] struct UsbPipe pipe, [in] int timeout, [in] unsigned char[] data ) ``` - -**描述:** - +**描述:** 在USB设备指定端点方向为写入时执行中断数据写入。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。 | -| timeout | 超时时间。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。  | +| timeout | 超时时间。  | | data | 写入的数据。 | **返回:** @@ -551,18 +513,16 @@ IUsbInterface::InterruptTransferWrite ([in] struct UsbDev dev, [in] struct UsbPi ``` IUsbInterface::IsoTransferRead ([in] struct UsbDev dev, [in] struct UsbPipe pipe, [in] int timeout, [out] unsigned char[] data ) ``` - -**描述:** - +**描述:** 在USB设备指定端点方向为读取时执行等时数据读取。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。 | -| timeout | 超时时间。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。  | +| timeout | 超时时间。  | | data | 读取的数据。 | **返回:** @@ -578,18 +538,16 @@ IUsbInterface::IsoTransferRead ([in] struct UsbDev dev, [in] struct UsbPipe pipe ``` IUsbInterface::IsoTransferWrite ([in] struct UsbDev dev, [in] struct UsbPipe pipe, [in] int timeout, [in] unsigned char[] data ) ``` - -**描述:** - +**描述:** 在USB设备指定端点方向为写入时执行等时数据写入。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。 | -| timeout | 超时时间。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。  | +| timeout | 超时时间。  | | data | 写入的数据。 | **返回:** @@ -605,9 +563,7 @@ IUsbInterface::IsoTransferWrite ([in] struct UsbDev dev, [in] struct UsbPipe pip ``` IUsbInterface::OpenDevice ([in] struct UsbDev dev) ``` - -**描述:** - +**描述:** 打开设备,建立连接。 **参数:** @@ -629,18 +585,16 @@ IUsbInterface::OpenDevice ([in] struct UsbDev dev) ``` IUsbInterface::QueryPort ([out] int portId, [out] int powerRole, [out] int dataRole, [out] int mode ) ``` - -**描述:** - +**描述:** 查询USB设备端口的当前设置信息。 **参数:** | 名称 | 描述 | | -------- | -------- | -| portId | USB设备端口ID。 | -| powerRole | USB设备电源角色。 | -| dataRole | USB设备数据角色。 | +| portId | USB设备端口ID。  | +| powerRole | USB设备电源角色。  | +| dataRole | USB设备数据角色。  | | mode | USB设备模式。 | **返回:** @@ -656,17 +610,15 @@ IUsbInterface::QueryPort ([out] int portId, [out] int powerRole, [out] int dataR ``` IUsbInterface::RegBulkCallback ([in] struct UsbDev dev, [in] struct UsbPipe pipe, [in] IUsbdBulkCallback cb ) ``` - -**描述:** - +**描述:** 注册批量传输异步回调函数。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。  | | cb | 回调函数对象,详见[IUsbdBulkCallback](interface_i_usbd_bulk_callback.md)。 | **返回:** @@ -682,16 +634,14 @@ IUsbInterface::RegBulkCallback ([in] struct UsbDev dev, [in] struct UsbPipe pipe ``` IUsbInterface::ReleaseInterface ([in] struct UsbDev dev, [in] unsigned char interfaceid ) ``` - -**描述:** - +**描述:** 在停止数据传输后关闭占用的USB设备接口,并释放相关资源。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | | interfaceid | USB设备接口ID。 | **返回:** @@ -707,16 +657,14 @@ IUsbInterface::ReleaseInterface ([in] struct UsbDev dev, [in] unsigned char inte ``` IUsbInterface::RequestCancel ([in] struct UsbDev dev, [in] struct UsbPipe pipe ) ``` - -**描述:** - +**描述:** 取消待处理的数据请求。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | | pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。 | **返回:** @@ -732,18 +680,16 @@ IUsbInterface::RequestCancel ([in] struct UsbDev dev, [in] struct UsbPipe pipe ) ``` IUsbInterface::RequestQueue ([in] struct UsbDev dev, [in] struct UsbPipe pipe, [in] unsigned char[] clientData, [in] unsigned char[] buffer ) ``` - -**描述:** - +**描述:** 在USB设备指定端点上进行异步数据发送或者接收请求,数据传输方向由端点方向决定。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。 | -| clientData | 用户数据。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。  | +| clientData | 用户数据。  | | buffer | 传输的数据。 | **返回:** @@ -759,18 +705,16 @@ IUsbInterface::RequestQueue ([in] struct UsbDev dev, [in] struct UsbPipe pipe, [ ``` IUsbInterface::RequestWait ([in] struct UsbDev dev, [out] unsigned char[] clientData, [out] unsigned char[] buffer, [in] int timeout ) ``` - -**描述:** - +**描述:** 等待RequestQueue异步请求的操作结果。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| clientData | 用户数据。 | -| buffer | 传输的数据。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| clientData | 用户数据。  | +| buffer | 传输的数据。  | | timeout | 超时时间。 | **返回:** @@ -786,16 +730,14 @@ IUsbInterface::RequestWait ([in] struct UsbDev dev, [out] unsigned char[] client ``` IUsbInterface::SetConfig ([in] struct UsbDev dev, [in] unsigned char configIndex ) ``` - -**描述:** - +**描述:** 设置USB设备当前的配置信息,USB设备被主机配置过后,主机可以使用设备提供的所有功能。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | | configIndex | USB设备配置信息的字符串描述符索引值(数字字符串)。 | **返回:** @@ -811,9 +753,7 @@ IUsbInterface::SetConfig ([in] struct UsbDev dev, [in] unsigned char configIndex ``` IUsbInterface::SetCurrentFunctions ([in] int funcs) ``` - -**描述:** - +**描述:** 设置USB设备当前的功能(按位域表示)。 **参数:** @@ -835,17 +775,15 @@ IUsbInterface::SetCurrentFunctions ([in] int funcs) ``` IUsbInterface::SetInterface ([in] struct UsbDev dev, [in] unsigned char interfaceid, [in] unsigned char altIndex ) ``` - -**描述:** - +**描述:** 设置USB设备指定接口的备选设置,用于在具有相同ID但不同备用设置的两个接口之间进行选择。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | -| interfaceid | USB设备接口ID。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | +| interfaceid | USB设备接口ID。  | | altIndex | USB设备接口的备用设置信息。 | **返回:** @@ -861,17 +799,15 @@ IUsbInterface::SetInterface ([in] struct UsbDev dev, [in] unsigned char interfac ``` IUsbInterface::SetPortRole ([in] int portId, [in] int powerRole, [in] int dataRole ) ``` - -**描述:** - +**描述:** 设置USB设备端口的角色。 **参数:** | 名称 | 描述 | | -------- | -------- | -| portId | USB设备端口ID。 | -| powerRole | 电源角色的值。 | +| portId | USB设备端口ID。  | +| powerRole | 电源角色的值。  | | dataRole | 数据角色的值。 | **返回:** @@ -887,9 +823,7 @@ IUsbInterface::SetPortRole ([in] int portId, [in] int powerRole, [in] int dataRo ``` IUsbInterface::UnbindUsbdSubscriber ([in] IUsbdSubscriber subscriber) ``` - -**描述:** - +**描述:** 解绑订阅者。 **参数:** @@ -911,16 +845,14 @@ IUsbInterface::UnbindUsbdSubscriber ([in] IUsbdSubscriber subscriber) ``` IUsbInterface::UnRegBulkCallback ([in] struct UsbDev dev, [in] struct UsbPipe pipe ) ``` - -**描述:** - +**描述:** 注销批量传输异步回调函数。 **参数:** | 名称 | 描述 | | -------- | -------- | -| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。 | +| dev | USB设备地址信息,详见[UsbDev](_usb_dev.md)。  | | pipe | USB设备管道信息,详见[UsbPipe](_usb_pipe.md)。 | **返回:** diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_usbd_bulk_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_usbd_bulk_callback.md index e533f6c6902b02b964b700fc67d532c4434145c4..ed2ac7c2b420bf73af78b9e13e3ad2f70b986b47 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_usbd_bulk_callback.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_usbd_bulk_callback.md @@ -1,37 +1,33 @@ # IUsbdBulkCallback -## **概述** +## 概述 USB驱动的回调函数。 当USB驱动进行批量传输异步读/写数据时调用回调函数,处理对应的结果。 **Since:** - 3.2 - **Version:** - 1.0 - **相关模块:** -[USB](usb.md) +[USB](_u_s_b.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [OnBulkWriteCallback](#onbulkwritecallback) ([in] int status, [in] int actLength) | 批量写数据的回调函数。 | -| [OnBulkReadCallback](#onbulkreadcallback) ([in] int status, [in] int actLength) | 批量读数据的回调函数。 | +| [OnBulkWriteCallback](#onbulkwritecallback) ([in] int status, [in] int actLength) | 批量写数据的回调函数。  | +| [OnBulkReadCallback](#onbulkreadcallback) ([in] int status, [in] int actLength) | 批量读数据的回调函数。  | -## **成员函数说明** +## 成员函数说明 ### OnBulkReadCallback() @@ -40,16 +36,14 @@ USB驱动的回调函数。 ``` IUsbdBulkCallback::OnBulkReadCallback ([in] int status, [in] int actLength ) ``` - -**描述:** - +**描述:** 批量读数据的回调函数。 **参数:** | 名称 | 描述 | | -------- | -------- | -| status | 完成状态。 | +| status | 完成状态。  | | actLength | 读数据时实际接收的数据长度。 | **返回:** @@ -65,16 +59,14 @@ IUsbdBulkCallback::OnBulkReadCallback ([in] int status, [in] int actLength ) ``` IUsbdBulkCallback::OnBulkWriteCallback ([in] int status, [in] int actLength ) ``` - -**描述:** - +**描述:** 批量写数据的回调函数。 **参数:** | 名称 | 描述 | | -------- | -------- | -| status | 完成状态。 | +| status | 完成状态。  | | actLength | 写数据时实际发送的数据长度。 | **返回:** diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_usbd_subscriber.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_usbd_subscriber.md index bcd7aef290c7cda9b8f80c06b3e51d98bf43140a..44d4dc94976fc9b79b0199698765c2f803600ad5 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_usbd_subscriber.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_usbd_subscriber.md @@ -1,7 +1,7 @@ # IUsbdSubscriber -## **概述** +## 概述 定义USB驱动的订阅类相关函数。 @@ -9,21 +9,21 @@ **相关模块:** -[USB](usb.md) +[USB](_u_s_b.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [DeviceEvent](#deviceevent) ([in] struct [USBDeviceInfo](_u_s_b_device_info.md) info) | 设备状态改变事件。 | -| [PortChangedEvent](#portchangedevent) ([in] struct [PortInfo](_port_info.md) info) | 端口改变事件。 | +| [DeviceEvent](#deviceevent) ([in] struct [USBDeviceInfo](_u_s_b_device_info.md) info) | 设备状态改变事件。  | +| [PortChangedEvent](#portchangedevent) ([in] struct [PortInfo](_port_info.md) info) | 端口改变事件。  | -## **成员函数说明** +## 成员函数说明 ### DeviceEvent() @@ -32,9 +32,7 @@ ``` IUsbdSubscriber::DeviceEvent ([in] struct USBDeviceInfo info) ``` - -**描述:** - +**描述:** 设备状态改变事件。 **参数:** @@ -56,9 +54,7 @@ IUsbdSubscriber::DeviceEvent ([in] struct USBDeviceInfo info) ``` IUsbdSubscriber::PortChangedEvent ([in] struct PortInfo info) ``` - -**描述:** - +**描述:** 端口改变事件。 **参数:** diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_user_auth_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_user_auth_interface.md index d6309d369b6fc7b664bc41c488f4a06ece3d08af..a843ba4b656f1c7adaa5ba03e415923aab1b48c4 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_user_auth_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_user_auth_interface.md @@ -1,54 +1,50 @@ # IUserAuthInterface -## **概述** +## 概述 声明用户认证驱动的API接口。 -**Since:** - +**Since:** 3.2 - -**Version:** - +**Version:** 1.0 - -**所属模块:** +**相关模块:** [HdfUserAuth](_hdf_user_auth.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [Init](#init)() | 初始化用户认证驱动缓存信息,用于用户认证框架进程启动时初始化信息。 | -| [AddExecutor](#addexecutor)([in] struct ExecutorRegisterInfo info, [out] unsigned long index, [out] unsigned char[] publicKey, [out] unsigned long[] templateIds) | 添加认证执行器来获取认证能力,用于各认证基础服务如口令认证服务等将认证能力对接到用户认证框架。 | -| [DeleteExecutor](#deleteexecutor)([in] unsigned long index) | 删除执行器,用于清理失效的执行器信息。 | -| [OpenSession](#opensession)([in] int userId, [out] unsigned char[] challenge) | 开启一个认证凭据管理会话,用于在请求管理用户认证凭据前获取有效挑战值。 | -| [CloseSession](#closesession)([in] int userId) | 关闭认证凭据管理会话,完成用户认证凭据管理请求处理后,调用该接口使原挑战值失效。 | -| [BeginEnrollment](#beginenrollment)([in] int userId, [in] unsigned char[] authToken, [in] struct EnrollParam param, [out] struct ScheduleInfo info) | 开始注册用户认证凭据。当注册凭据类型为口令且该用户已经注册了口令凭据时,将会更新口令凭据。 | -| [UpdateEnrollmentResult](#updateenrollmentresult)([in] int userId, [in] unsigned char[] scheduleResult, [out] unsigned long credentialId, [out] struct CredentialInfo oldInfo) | 更新用户凭据注册结果,完成凭据注册。 | -| [CancelEnrollment](#cancelenrollment)([in] int userId) | 取消注册请求。 | -| [DeleteCredential](#deletecredential)([in] int userId, [in] unsigned long credentialId, [in] unsigned char[] authToken, [out] struct CredentialInfo info) | 删除用户凭据信息。 | -| [GetCredential](#getcredential)([in] int userId, [in] enum AuthType authType, [out] struct CredentialInfo[] infos) | 查询用户凭据信息。 | -| [GetUserInfo](#getuserinfo) ([in] int userId, [out] unsigned long secureUid, [out] enum PinSubType pinSubType, [out] struct EnrolledInfo[] infos) | 查询用户认证相关信息。 | -| [DeleteUser](#deleteuser)([in] int userId, [in] unsigned char[] authToken, [out] struct CredentialInfo[] deletedInfos) | 删除用户口令认证凭据,在用户IAM系统内删除该用户,该请求由用户触发。 | -| [EnforceDeleteUser](#enforcedeleteuser)([in] int userId, [out] struct CredentialInfo[] deletedInfos) | 强制删除用户,该请求由系统内管理用户的模块触发。 | -| [BeginAuthentication](#beginauthentication)([in] unsigned long contextId, [in] struct AuthSolution param, [out] struct ScheduleInfo[] scheduleInfos) | 开始认证用户,并生成认证方案。 | -| [UpdateAuthenticationResult](#updateauthenticationresult)([in] unsigned long contextId, [in] unsigned char[] scheduleResult, [out] struct AuthResultInfo info) | 更新认证结果,评估认证方案的认证结果。 | -| [CancelAuthentication](#cancelauthentication)([in] unsigned long contextId) | 取消用户认证请求。 | -| [BeginIdentification](#beginidentification)([in] unsigned long contextId, [in] enum AuthType authType, [in] unsigned char[] challenge, [in] unsigned int executorSensorHint, [out] struct ScheduleInfo scheduleInfo) | 开始用户身份识别,并生成识别方案。 | -| [UpdateIdentificationResult](#updateidentificationresult)([in] unsigned long contextId, [in] unsigned char[] scheduleResult, [out] struct IdentifyResultInfo info) | 更新用户身份识别结果,生成身份识别方案的结果。 | -| [CancelIdentification](#cancelidentification)([in] unsigned long contextId) | 取消用户身份识别请求。 | -| [GetAuthTrustLevel](#getauthtrustlevel)([in] GetUserInfoint userId, [in] enum AuthType authType, [out] unsigned int authTrustLevel) | 获取当前认证类型的认证结果可信等级。 | -| [GetValidSolution](#getvalidsolution)([in] int userId, [in] enum AuthType[] authTypes, [in] unsigned int authTrustLevel, [out] enum AuthType[] validTypes) | 获取指定认证结果可信等级下有效的认证方式。 | - - -## **成员函数说明** +| [Init](#init) () | 初始化用户认证驱动缓存信息,用于用户认证框架进程启动时初始化信息。  | +| [AddExecutor](#addexecutor) ([in] struct [ExecutorRegisterInfo](_executor_register_info.md) info, [out] unsigned long index, [out] unsigned char[] publicKey, [out] unsigned long[] templateIds) | 添加认证执行器来获取认证能力,用于各认证基础服务如口令认证服务等将认证能力对接到用户认证框架。  | +| [DeleteExecutor](#deleteexecutor) ([in] unsigned long index) | 删除执行器,用于清理失效的执行器信息。  | +| [OpenSession](#opensession) ([in] int userId, [out] unsigned char[] challenge) | 开启一个认证凭据管理会话,用于在请求管理用户认证凭据前获取有效挑战值。  | +| [CloseSession](#closesession) ([in] int userId) | 关闭认证凭据管理会话,完成用户认证凭据管理请求处理后,调用该接口使原挑战值失效。  | +| [BeginEnrollment](#beginenrollment) ([in] int userId, [in] unsigned char[] authToken, [in] struct [EnrollParam](_enroll_param.md) param, [out] struct [ScheduleInfo](_schedule_info.md) info) | 开始注册用户认证凭据。当注册凭据类型为口令且该用户已经注册了口令凭据时,将会更新口令凭据。  | +| [UpdateEnrollmentResult](#updateenrollmentresult) ([in] int userId, [in] unsigned char[] scheduleResult, [out] struct [EnrollResultInfo](_enroll_result_info.md) info) | 更新用户凭据注册结果,完成凭据注册。  | +| [CancelEnrollment](#cancelenrollment) ([in] int userId) | 取消注册请求。  | +| [DeleteCredential](#deletecredential) ([in] int userId, [in] unsigned long credentialId, [in] unsigned char[] authToken, [out] struct [CredentialInfo](_credential_info.md) info) | 删除用户凭据信息。  | +| [GetCredential](#getcredential) ([in] int userId, [in] enum [AuthType](_hdf_user_auth.md#authtype) authType, [out] struct [CredentialInfo](_credential_info.md)[] infos) | 查询用户凭据信息。  | +| [GetUserInfo](#getuserinfo) ([in] int userId, [out] unsigned long secureUid, [out] enum [PinSubType](_hdf_user_auth.md#pinsubtype) pinSubType, [out] struct [EnrolledInfo](_enrolled_info.md)[] infos) | 查询用户认证相关信息。  | +| [DeleteUser](#deleteuser) ([in] int userId, [in] unsigned char[] authToken, [out] struct [CredentialInfo](_credential_info.md)[] deletedInfos) | 删除用户口令认证凭据,在用户IAM系统内删除该用户,该请求由用户触发。  | +| [EnforceDeleteUser](#enforcedeleteuser) ([in] int userId, [out] struct [CredentialInfo](_credential_info.md)[] deletedInfos) | 强制删除用户,该请求由系统内管理用户的模块触发。  | +| [BeginAuthentication](#beginauthentication) ([in] unsigned long contextId, [in] struct [AuthSolution](_auth_solution.md) param, [out] struct [ScheduleInfo](_schedule_info.md)[] scheduleInfos) | 开始认证用户,并生成认证方案。  | +| [UpdateAuthenticationResult](#updateauthenticationresult) ([in] unsigned long contextId, [in] unsigned char[] scheduleResult, [out] struct [AuthResultInfo](_auth_result_info.md) info) | 更新认证结果,评估认证方案的认证结果。  | +| [CancelAuthentication](#cancelauthentication) ([in] unsigned long contextId) | 取消用户认证请求。  | +| [BeginIdentification](#beginidentification) ([in] unsigned long contextId, [in] enum [AuthType](_hdf_user_auth.md#authtype) authType, [in] unsigned char[] challenge, [in] unsigned int executorSensorHint, [out] struct [ScheduleInfo](_schedule_info.md) scheduleInfo) | 开始用户身份识别,并生成识别方案。  | +| [UpdateIdentificationResult](#updateidentificationresult) ([in] unsigned long contextId, [in] unsigned char[] scheduleResult, [out] struct [IdentifyResultInfo](_identify_result_info.md) info) | 更新用户身份识别结果,生成身份识别方案的结果。  | +| [CancelIdentification](#cancelidentification) ([in] unsigned long contextId) | 取消用户身份识别请求。  | +| [GetAuthTrustLevel](#getauthtrustlevel) ([in] int userId, [in] enum [AuthType](_hdf_user_auth.md#authtype) authType, [out] unsigned int authTrustLevel) | 获取当前认证类型的认证结果可信等级。  | +| [GetValidSolution](#getvalidsolution) ([in] int userId, [in] enum [AuthType](_hdf_user_auth.md#authtype)[] authTypes, [in] unsigned int authTrustLevel, [out] enum [AuthType](_hdf_user_auth.md#authtype)[] validTypes) | 获取指定认证结果可信等级下有效的认证方式。  | + + +## 成员函数说明 ### AddExecutor() @@ -57,21 +53,19 @@ ``` IUserAuthInterface::AddExecutor ([in] struct ExecutorRegisterInfo info, [out] unsigned long index, [out] unsigned char[] publicKey, [out] unsigned long[] templateIds ) ``` - -**描述:** - +**描述:** 添加认证执行器来获取认证能力,用于各认证基础服务如口令认证服务等将认证能力对接到用户认证框架。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| info | 执行器注册信息[ExecutorRegisterInfo](_executor_register_info.md)。 | -| index | 用户认证框架的执行器索引。 | -| publicKey | 用户认证框架公钥。 | +| info | 执行器注册信息[ExecutorRegisterInfo](_executor_register_info.md)。  | +| index | 用户认证框架的执行器索引。  | +| publicKey | 用户认证框架公钥。  | | templateIds | 该执行器已注册的模版ID列表。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -84,20 +78,18 @@ IUserAuthInterface::AddExecutor ([in] struct ExecutorRegisterInfo info, [out] un ``` IUserAuthInterface::BeginAuthentication ([in] unsigned long contextId, [in] struct AuthSolution param, [out] struct ScheduleInfo[] scheduleInfos ) ``` - -**描述:** - +**描述:** 开始认证用户,并生成认证方案。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| contextId | 上下文索引。 | -| param | 认证方案[AuthSolution](_auth_solution.md)。 | +| contextId | 上下文索引。  | +| param | 认证方案[AuthSolution](_auth_solution.md)。  | | scheduleInfos | 调度信息[ScheduleInfo](_schedule_info.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -110,21 +102,19 @@ IUserAuthInterface::BeginAuthentication ([in] unsigned long contextId, [in] stru ``` IUserAuthInterface::BeginEnrollment ([in] int userId, [in] unsigned char[] authToken, [in] struct EnrollParam param, [out] struct ScheduleInfo info ) ``` - -**描述:** - +**描述:** 开始注册用户认证凭据。当注册凭据类型为口令且该用户已经注册了口令凭据时,将会更新口令凭据。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| userId | 用户ID。 | -| authToken | 用户口令认证令牌。 | -| param | 注册凭据参数[EnrollParam](_enroll_param.md)。 | +| userId | 用户ID。  | +| authToken | 用户口令认证令牌。  | +| param | 注册凭据参数[EnrollParam](_enroll_param.md)。  | | info | 调度信息[ScheduleInfo](_schedule_info.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -135,24 +125,22 @@ IUserAuthInterface::BeginEnrollment ([in] int userId, [in] unsigned char[] authT ``` -IUserAuthInterface::BeginIdentification([in] unsigned long contextId, [in] enum AuthType authType, [in] unsigned char[] challenge, [in] unsigned int executorSensorHint, [out] struct ScheduleInfo scheduleInfo) +IUserAuthInterface::BeginIdentification ([in] unsigned long contextId, [in] enum AuthType authType, [in] unsigned char[] challenge, [in] unsigned int executorSensorHint, [out] struct ScheduleInfo scheduleInfo ) ``` - -**描述:** - +**描述:** 开始用户身份识别,并生成识别方案。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| contextId | 上下文索引。 | -| authType | 用户身份识别类型[AuthType](_hdf_user_auth.md#authtype)。 | -| challenge | 随机挑战值,用于生成用户身份识别令牌,防止重放。 | -| executorSensorHint | 执行器传感器提示,用于找到对应认证方式的传感器。 | +| contextId | 上下文索引。  | +| authType | 用户身份识别类型AuthType}。  | +| challenge | 随机挑战值,用于生成用户身份识别令牌,防止重放。  | +| executorSensorHint | 执行器传感器提示,用于找到对应认证方式的传感器。  | | scheduleInfo | 调度信息[ScheduleInfo](_schedule_info.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -165,18 +153,16 @@ IUserAuthInterface::BeginIdentification([in] unsigned long contextId, [in] enum ``` IUserAuthInterface::CancelAuthentication ([in] unsigned long contextId) ``` - -**描述:** - +**描述:** 取消用户认证请求。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | contextId | 上下文索引。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -189,18 +175,16 @@ IUserAuthInterface::CancelAuthentication ([in] unsigned long contextId) ``` IUserAuthInterface::CancelEnrollment ([in] int userId) ``` - -**描述:** - +**描述:** 取消注册请求。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | userId | 用户ID。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -213,18 +197,16 @@ IUserAuthInterface::CancelEnrollment ([in] int userId) ``` IUserAuthInterface::CancelIdentification ([in] unsigned long contextId) ``` - -**描述:** - +**描述:** 取消用户身份识别请求。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | contextId | 上下文索引。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -237,18 +219,16 @@ IUserAuthInterface::CancelIdentification ([in] unsigned long contextId) ``` IUserAuthInterface::CloseSession ([in] int userId) ``` - -**描述:** - +**描述:** 关闭认证凭据管理会话,完成用户认证凭据管理请求处理后,调用该接口使原挑战值失效。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | userId | 用户ID。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -261,21 +241,19 @@ IUserAuthInterface::CloseSession ([in] int userId) ``` IUserAuthInterface::DeleteCredential ([in] int userId, [in] unsigned long credentialId, [in] unsigned char[] authToken, [out] struct CredentialInfo info ) ``` - -**描述:** - +**描述:** 删除用户凭据信息。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| userId | 用户ID。 | -| credentialId | 凭据ID。 | -| authToken | 用户口令认证令牌。 | +| userId | 用户ID。  | +| credentialId | 凭据ID。  | +| authToken | 用户口令认证令牌。  | | info | 删除的凭据信息[CredentialInfo](_credential_info.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -288,18 +266,16 @@ IUserAuthInterface::DeleteCredential ([in] int userId, [in] unsigned long creden ``` IUserAuthInterface::DeleteExecutor ([in] unsigned long index) ``` - -**描述:** - +**描述:** 删除执行器,用于清理失效的执行器信息。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | | index | 用户认证框架的执行器索引。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -312,20 +288,18 @@ IUserAuthInterface::DeleteExecutor ([in] unsigned long index) ``` IUserAuthInterface::DeleteUser ([in] int userId, [in] unsigned char[] authToken, [out] struct CredentialInfo[] deletedInfos ) ``` - -**描述:** - +**描述:** 删除用户口令认证凭据,在用户IAM系统内删除该用户,该请求由用户触发。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| userId | 用户ID。 | -| authToken | 用户口令认证令牌。 | +| userId | 用户ID。  | +| authToken | 用户口令认证令牌。  | | deletedInfos | 删除的凭据信息[CredentialInfo](_credential_info.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -338,19 +312,17 @@ IUserAuthInterface::DeleteUser ([in] int userId, [in] unsigned char[] authToken, ``` IUserAuthInterface::EnforceDeleteUser ([in] int userId, [out] struct CredentialInfo[] deletedInfos ) ``` - -**描述:** - +**描述:** 强制删除用户,该请求由系统内管理用户的模块触发。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| userId | 用户ID。 | +| userId | 用户ID。  | | deletedInfos | 删除的凭据信息[CredentialInfo](_credential_info.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -363,20 +335,18 @@ IUserAuthInterface::EnforceDeleteUser ([in] int userId, [out] struct CredentialI ``` IUserAuthInterface::GetAuthTrustLevel ([in] int userId, [in] enum AuthType authType, [out] unsigned int authTrustLevel ) ``` - -**描述:** - +**描述:** 获取当前认证类型的认证结果可信等级。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| userId | 用户ID。 | -| authType | 认证类型[AuthType](_hdf_user_auth.md#authtype)。 | +| userId | 用户ID。  | +| authType | 认证类型[AuthType](_hdf_user_auth.md#authtype)。  | | authTrustLevel | 认证结果可信等级。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -389,20 +359,18 @@ IUserAuthInterface::GetAuthTrustLevel ([in] int userId, [in] enum AuthType authT ``` IUserAuthInterface::GetCredential ([in] int userId, [in] enum AuthType authType, [out] struct CredentialInfo[] infos ) ``` - -**描述:** - +**描述:** 查询用户凭据信息。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| userId | 用户ID。 | -| authType | 凭据类型[AuthType](_hdf_user_auth.md#authtype)。 | +| userId | 用户ID。  | +| authType | 凭据类型[AuthType](_hdf_user_auth.md#authtype)。  | | infos | 凭据信息[CredentialInfo](_credential_info.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -413,23 +381,21 @@ IUserAuthInterface::GetCredential ([in] int userId, [in] enum AuthType authType, ``` -IUserAuthInterface::GetUserInfo([in] int userId, [out] unsigned long secureUid, [out] enum PinSubType pinSubType, [out] struct EnrolledInfo[] infos) +IUserAuthInterface::GetUserInfo ([in] int userId, [out] unsigned long secureUid, [out] enum PinSubType pinSubType, [out] struct EnrolledInfo[] infos ) ``` - -**描述:** - +**描述:** 查询用户认证相关信息。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| userId | 用户ID。 | -| secureUid | 安全用户ID。 | -| pinSubType | 口令认证子类型[PinSubType](_hdf_user_auth.md#pinsubtype)。 | +| userId | 用户ID。  | +| secureUid | 安全用户ID。  | +| pinSubType | 口令认证子类型[PinSubType](_hdf_user_auth.md#pinsubtype)。  | | infos | 注册信息[EnrolledInfo](_enrolled_info.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -442,21 +408,19 @@ IUserAuthInterface::GetUserInfo([in] int userId, [out] unsigned long secureUid, ``` IUserAuthInterface::GetValidSolution ([in] int userId, [in] enum AuthType[] authTypes, [in] unsigned int authTrustLevel, [out] enum AuthType[] validTypes ) ``` - -**描述:** - +**描述:** 获取指定认证结果可信等级下有效的认证方式。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| userId | 用户ID。 | -| authTypes | 用于筛选的认证方式列表[AuthType](_hdf_user_auth.md#authtype)。 | -| authTrustLevel | 认证结果可信等级。 | +| userId | 用户ID。  | +| authTypes | 用于筛选的认证方式列表[AuthType](_hdf_user_auth.md#authtype)。  | +| authTrustLevel | 认证结果可信等级。  | | validTypes | 有效的认证方式列表[AuthType](_hdf_user_auth.md#authtype)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -469,12 +433,10 @@ IUserAuthInterface::GetValidSolution ([in] int userId, [in] enum AuthType[] auth ``` IUserAuthInterface::Init () ``` - -**描述:** - +**描述:** 初始化用户认证驱动缓存信息,用于用户认证框架进程启动时初始化信息。 -**返回:** +**返回:** 0 表示操作成功。 @@ -487,19 +449,17 @@ IUserAuthInterface::Init () ``` IUserAuthInterface::OpenSession ([in] int userId, [out] unsigned char[] challenge ) ``` - -**描述:** - +**描述:** 开启一个认证凭据管理会话,用于在请求管理用户认证凭据前获取有效挑战值。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| userId | 用户ID。 | +| userId | 用户ID。  | | challenge | 随机挑战值,用于生成用户身份认证令牌。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -512,20 +472,18 @@ IUserAuthInterface::OpenSession ([in] int userId, [out] unsigned char[] challeng ``` IUserAuthInterface::UpdateAuthenticationResult ([in] unsigned long contextId, [in] unsigned char[] scheduleResult, [out] struct AuthResultInfo info ) ``` - -**描述:** - +**描述:** 更新认证结果,评估认证方案的认证结果。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| contextId | 上下文索引。 | -| scheduleResult | 执行器签发的认证结果。 | +| contextId | 上下文索引。  | +| scheduleResult | 执行器签发的认证结果。  | | info | 认证结果信息[AuthResultInfo](_auth_result_info.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -536,22 +494,20 @@ IUserAuthInterface::UpdateAuthenticationResult ([in] unsigned long contextId, [i ``` -IUserAuthInterface::UpdateEnrollmentResult([in] int userId, [in] unsigned char[] scheduleResult, [out] struct EnrollResultInfo info) +IUserAuthInterface::UpdateEnrollmentResult ([in] int userId, [in] unsigned char[] scheduleResult, [out] struct EnrollResultInfo info ) ``` - -**描述:** - +**描述:** 更新用户凭据注册结果,完成凭据注册。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| userId | 用户ID。 | -| scheduleResult | 执行器签发的注册结果。 | -| oldInfo | 录入结果信息[EnrollResultInfo](_enroll_resultinfo.md)。 | +| userId | 用户ID。  | +| scheduleResult | 执行器签发的注册结果。  | +| info | 录入结果信息[EnrollResultInfo](_enroll_result_info.md)。 | -**返回:** +**返回:** 0 表示操作成功。 @@ -564,20 +520,18 @@ IUserAuthInterface::UpdateEnrollmentResult([in] int userId, [in] unsigned char[] ``` IUserAuthInterface::UpdateIdentificationResult ([in] unsigned long contextId, [in] unsigned char[] scheduleResult, [out] struct IdentifyResultInfo info ) ``` - -**描述:** - +**描述:** 更新用户身份识别结果,生成身份识别方案的结果。 -**参数:** +**参数:** | 名称 | 描述 | | -------- | -------- | -| contextId | 上下文索引。 | -| scheduleResult | 执行器签发的用户身份识别结果。 | +| contextId | 上下文索引。  | +| scheduleResult | 执行器签发的用户身份识别结果。  | | info | 用户身份识别结果[IdentifyResultInfo](_identify_result_info.md)。 | -**返回:** +**返回:** 0 表示操作成功。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_vibrator_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_vibrator_interface.md index f0e739cef3f20c790d87d3462e5e245689530ba8..6361bbffbd0784dc7bc7eea50c3c53dc3f4c9ba8 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_vibrator_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_vibrator_interface.md @@ -1,40 +1,36 @@ # IVibratorInterface -## **概述** +## 概述 Vibrator模块向上层服务提供统一的接口。 上层服务开发人员可根据Vibrator模块提供的统一接口,用于控制马达执行单次或周期性振动。 **Since:** - 3.2 - **Version:** - 1.1 - **相关模块:** -[Vibrator](vibrator.md) +[Vibrator](_vibrator.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [StartOnce](#startonce) ([in] unsigned int duration) | 控制马达以执行给定持续时间的单次振动。 | -| [Start](#start) ([in] String effectType) | 控制马达以预置效果执行周期性振动。 | -| [Stop](#stop) ([in] enum [HdfVibratorMode](vibrator.md#hdfvibratormode) mode) | 停止马达振动。 | -| [GetVibratorInfo](#getvibratorinfo) ([out] struct [HdfVibratorInfo](_hdf_vibrator_info.md)[] vibratorInfo) | 获取有关系统中支持设置振幅和频率的所有马达信息。 | -| [EnableVibratorModulation](#enablevibratormodulation) ([in] unsigned int duration, [in] int intensity, [in] int frequency) | 根据传入的振动效果启动马达。 | +| [StartOnce](#startonce) ([in] unsigned int duration) | 控制马达以执行给定持续时间的单次振动。  | +| [Start](#start) ([in] String effectType) | 控制马达以预置效果执行周期性振动。  | +| [Stop](#stop) ([in] enum [HdfVibratorMode](_vibrator.md#hdfvibratormode) mode) | 停止马达振动。  | +| [GetVibratorInfo](#getvibratorinfo) ([out] struct [HdfVibratorInfo](_hdf_vibrator_info.md)[] vibratorInfo) | 获取有关系统中支持设置振幅和频率的所有马达信息。  | +| [EnableVibratorModulation](#enablevibratormodulation) ([in] unsigned int duration, [in] int intensity, [in] int frequency) | 根据传入的振动效果启动马达。  | -## **成员函数说明** +## 成员函数说明 ### EnableVibratorModulation() @@ -43,17 +39,15 @@ Vibrator模块向上层服务提供统一的接口。 ``` IVibratorInterface::EnableVibratorModulation ([in] unsigned int duration, [in] int intensity, [in] int frequency ) ``` - -**描述:** - +**描述:** 根据传入的振动效果启动马达。 **参数:** | 名称 | 描述 | | -------- | -------- | -| duration | 表示马达振动的持续时间,以毫秒为单位。 | -| intensity | 表示振动周期内的马达振幅。 | +| duration | 表示马达振动的持续时间,以毫秒为单位。  | +| intensity | 表示振动周期内的马达振幅。  | | frequency | 表示振动周期内的马达频率。 | **返回:** @@ -73,9 +67,7 @@ IVibratorInterface::EnableVibratorModulation ([in] unsigned int duration, [in] i ``` IVibratorInterface::GetVibratorInfo ([out] struct HdfVibratorInfo[] vibratorInfo) ``` - -**描述:** - +**描述:** 获取有关系统中支持设置振幅和频率的所有马达信息。 **参数:** @@ -97,9 +89,7 @@ IVibratorInterface::GetVibratorInfo ([out] struct HdfVibratorInfo[] vibratorInfo ``` IVibratorInterface::Start ([in] String effectType) ``` - -**描述:** - +**描述:** 控制马达以预置效果执行周期性振动。 单次振动与周期振动相互排斥。在执行周期性振动之前,需退出单次振动。 @@ -123,9 +113,7 @@ IVibratorInterface::Start ([in] String effectType) ``` IVibratorInterface::StartOnce ([in] unsigned int duration) ``` - -**描述:** - +**描述:** 控制马达以执行给定持续时间的单次振动。 单次振动与周期振动相互排斥。在执行单次振动之前,需退出周期性振动。 @@ -149,9 +137,7 @@ IVibratorInterface::StartOnce ([in] unsigned int duration) ``` IVibratorInterface::Stop ([in] enum HdfVibratorMode mode) ``` - -**描述:** - +**描述:** 停止马达振动。 马达启动前,必须在任何模式下停止振动。此功能用在振动过程之后。 @@ -160,7 +146,7 @@ IVibratorInterface::Stop ([in] enum HdfVibratorMode mode) | 名称 | 描述 | | -------- | -------- | -| mode | 表示振动模式,可以是单次或周期性的,详见[HdfVibratorMode](vibrator.md#hdfvibratormode)。 | +| mode | 表示振动模式,可以是单次或周期性的,详见[HdfVibratorMode](_vibrator.md#hdfvibratormode)。 | **返回:** diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_wififence_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_wififence_callback.md new file mode 100644 index 0000000000000000000000000000000000000000..0011c7fb3ce46fb0b0d6135e7d22bcb9b335b3f5 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_wififence_callback.md @@ -0,0 +1,109 @@ +# IWififenceCallback + + +## 概述 + +定义Wi-Fi围栏模块的回调函数。 + +用户在开启Wi-Fi围栏功能前,需要先注册该回调函数。当Wi-Fi围栏状态发生变化时,会通过回调函数进行上报。 详情可参考[ICellfenceInterface](interface_i_cellfence_interface.md)。 + +**Since:** + +4.0 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceWififence](_hdi_lpfence_wififence.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [OnWififenceChanged](#onwififencechanged) ([in] int wififenceId, [in] int transition, [in] long timeStamp) | 定义Wi-Fi围栏状态变化的回调函数。 | +| [OnGetWififenceSizeCb](#ongetwififencesizecb) ([in] struct [WififenceSize](_wififence_size.md) size) | 定义Wi-Fi围栏使用信息的回调函数。 | +| [OnWififenceReset](#onwififencereset) () | 定义低功耗围栏服务复位事件通知的回调函数。 | + + +## 成员函数说明 + + +### OnGetWififenceSizeCb() + + +``` +IWififenceCallback::OnGetWififenceSizeCb ([in] struct WififenceSize size) +``` + +**描述:** + +定义Wi-Fi围栏使用信息的回调函数。 + +获取Wi-Fi围栏使用信息时,会通过该回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| size | 基站围栏使用信息。详见[WififenceSize](_wififence_size.md)定义。 | + +**返回:** + +如果回调函数上报数据成功,则返回0。 + +如果回调函数上报数据失败,则返回负值。 + + +### OnWififenceChanged() + + +``` +IWififenceCallback::OnWififenceChanged ([in] int wififenceId, [in] int transition, [in] long timeStamp ) +``` + +**描述:** + +定义Wi-Fi围栏状态变化的回调函数。 + +设备与Wi-Fi围栏的状态关系发生变化时,会通过该回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| wififenceId | Wi-Fi围栏ID号。 | +| transition | Wi-Fi围栏变化的状态。详见[WififenceTransition](_hdi_lpfence_wififence.md#wififencetransition)定义。 | +| timeStamp | 时间戳。 | + +**返回:** + +如果调用成功,则返回0。 + +如果调用失败,则返回负值。 + + +### OnWififenceReset() + + +``` +IWififenceCallback::OnWififenceReset () +``` + +**描述:** + +定义低功耗围栏服务复位事件通知的回调函数。 + +低功耗围栏服务发生复位时会通过该回调函数进行事件上报。 + +**返回:** + +如果回调函数调用成功,则返回0。 + +如果回调函数调用失败,则返回负值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_wififence_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_wififence_interface.md new file mode 100644 index 0000000000000000000000000000000000000000..06e1782ab74bb8510e51d2e2531f0f49ebcd5d5d --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_wififence_interface.md @@ -0,0 +1,188 @@ +# IWififenceInterface + + +## 概述 + +定义对Wi-Fi围栏模块进行基本操作的接口。 + +接口包含注册回调函数,取消注册回调函数,添加Wi-Fi围栏,删除Wi-Fi围栏,获取Wi-Fi围栏状态,获取Wi-Fi围栏使用信息的功能。 + +**Since:** + +4.0 + +**Since:** + +4.0 + +**相关模块:** + +[HdiLpfenceWififence](_hdi_lpfence_wififence.md) + + +## 汇总 + + +### Public 成员函数 + + | 名称 | 描述 | +| -------- | -------- | +| [RegisterWififenceCallback](#registerwififencecallback) ([in] [IWififenceCallback](interface_i_wififence_callback.md) callbackObj) | 注册回调函数。 | +| [UnregisterWififenceCallback](#unregisterwififencecallback) ([in] [IWififenceCallback](interface_i_wififence_callback.md) callbackObj) | 取消注册回调函数。 | +| [AddWififences](#addwififences) ([in] struct [WififenceRequest](_wififence_request.md)[] wififence) | 添加Wi-Fi围栏。 | +| [RemoveWififences](#removewififences) ([in] int[] wififenceId) | 删除Wi-Fi围栏。 | +| [GetWififenceStatus](#getwififencestatus) ([in] int wififenceId) | 获取设备与一个Wi-Fi围栏的状态关系。 | +| [GetWififenceSize](#getwififencesize) () | 获取Wi-Fi围栏使用信息 | + + +## 成员函数说明 + + +### AddWififences() + + +``` +IWififenceInterface::AddWififences ([in] struct WififenceRequest[] wififence) +``` + +**描述:** + +添加Wi-Fi围栏。 + +支持一次添加多个Wi-Fi围栏,一个Wi-Fi围栏包含多组MAC地址信息。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| wififence | 添加的Wi-Fi围栏信息。详见[WififenceRequest](_wififence_request.md)。 | + +**返回:** + +如果添加成功,则返回0。 + +如果添加失败,则返回负值。 + + +### GetWififenceSize() + + +``` +IWififenceInterface::GetWififenceSize () +``` + +**描述:** + +获取Wi-Fi围栏使用信息 + +查看当前设备支持添加的Wi-Fi围栏最大个数和已添加的Wi-Fi围栏个数。通过回调函数上报通知,详见[OnGetWififenceSizeCb](interface_i_wififence_callback.md#ongetwififencesizecb)。 + +**返回:** + +如果调用成功,则返回0。 + +如果调用失败,则返回负值。 + + +### GetWififenceStatus() + + +``` +IWififenceInterface::GetWififenceStatus ([in] int wififenceId) +``` + +**描述:** + +获取设备与一个Wi-Fi围栏的状态关系。 + +设备与Wi-Fi围栏的状态关系详见[WififenceTransition](_hdi_lpfence_wififence.md#wififencetransition)定义。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| wififenceId | Wi-Fi围栏ID号。 | + +**返回:** + +返回位置关系。详见[WififenceTransition](_hdi_lpfence_wififence.md#wififencetransition)定义。 + +如果调用失败,则返回负值。 + + +### RegisterWififenceCallback() + + +``` +IWififenceInterface::RegisterWififenceCallback ([in] IWififenceCallback callbackObj) +``` + +**描述:** + +注册回调函数。 + +用户在开启Wi-Fi围栏功能前,需要先注册该回调函数。当Wi-Fi围栏状态发生变化时,会通过回调函数进行上报。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| callbackObj | 要注册的回调函数,只需成功订阅一次,无需重复订阅。详见[IWififenceCallback](interface_i_wififence_callback.md)。 | + +**返回:** + +如果注册回调函数成功,则返回0。 + +如果注册回调函数失败,则返回负值。 + + +### RemoveWififences() + + +``` +IWififenceInterface::RemoveWififences ([in] int[] wififenceId) +``` + +**描述:** + +删除Wi-Fi围栏。 + +支持一次删除多个Wi-Fi围栏。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| wififenceId | Wi-Fi围栏ID号。详见[WififenceRequest](_wififence_request.md)。 | + +**返回:** + +如果删除成功,则返回0。 + +如果删除失败,则返回负值。 + + +### UnregisterWififenceCallback() + + +``` +IWififenceInterface::UnregisterWififenceCallback ([in] IWififenceCallback callbackObj) +``` + +**描述:** + +取消注册回调函数。 + +取消之前注册的回调函数。当不需要使用Wi-Fi围栏功能,或需要更换回调函数时,需要取消注册回调函数。 + +**参数:** + + | 名称 | 描述 | +| -------- | -------- | +| callbackObj | 要取消注册的回调函数,只需成功取消订阅一次,无需重复取消订阅。详见[IWififenceCallback](interface_i_wififence_callback.md)。 | + +**返回:** + +如果取消注册回调函数成功,则返回0。 + +如果取消注册回调函数失败,则返回负值。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_wlan_callback.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_wlan_callback.md index 3fe5e85f25ae6014d60ece20c979fe605223f74c..b7cff83fae25993d1498f8ef546bb6a97a99f4f3 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_wlan_callback.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_wlan_callback.md @@ -1,38 +1,34 @@ # IWlanCallback -## **概述** +## 概述 定义WLAN模块的回调函数。 当WLAN模块发生重启,扫描热点结束,收到Netlink消息后,调用回调函数,处理对应的结果信息。 **Since:** - 3.2 - **Version:** - 1.0 - **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [ResetDriverResult](#resetdriverresult) ([in] unsigned int event, [in] int code, [in] String ifName) | 重启WLAN驱动的结果处理回调方法。 | -| [ScanResult](#scanresult) ([in] unsigned int event, [in] struct [HdfWifiScanResult](_hdf_wifi_scan_result.md) scanResult, [in] String ifName) | 扫描结果的回调方法。 | -| [WifiNetlinkMessage](#wifinetlinkmessage) ([in] unsigned char[] recvMsg) | Netlink消息的回调方法。 | +| [ResetDriverResult](#resetdriverresult) ([in] unsigned int event, [in] int code, [in] String ifName) | 重启WLAN驱动的结果处理回调方法。  | +| [ScanResult](#scanresult) ([in] unsigned int event, [in] struct [HdfWifiScanResult](_hdf_wifi_scan_result.md) scanResult, [in] String ifName) | 扫描结果的回调方法。  | +| [WifiNetlinkMessage](#wifinetlinkmessage) ([in] unsigned char[] recvMsg) | Netlink消息的回调方法。  | -## **成员函数说明** +## 成员函数说明 ### ResetDriverResult() @@ -41,9 +37,7 @@ ``` IWlanCallback::ResetDriverResult ([in] unsigned int event, [in] int code, [in] String ifName ) ``` - -**描述:** - +**描述:** 重启WLAN驱动的结果处理回调方法。 当重启WLAN驱动后,调用此接口处理驱动重启后的返回结果。 @@ -52,8 +46,8 @@ IWlanCallback::ResetDriverResult ([in] unsigned int event, [in] int code, [in] S | 名称 | 描述 | | -------- | -------- | -| event | 重启驱动的事件ID。 | -| code | 重启驱动后返回的结果数据。 | +| event | 重启驱动的事件ID。  | +| code | 重启驱动后返回的结果数据。  | | ifName | 网卡名称。 | @@ -63,9 +57,7 @@ IWlanCallback::ResetDriverResult ([in] unsigned int event, [in] int code, [in] S ``` IWlanCallback::ScanResult ([in] unsigned int event, [in] struct HdfWifiScanResult scanResult, [in] String ifName ) ``` - -**描述:** - +**描述:** 扫描结果的回调方法。 当扫描结束后,将通过此方法处理返回的扫描结果数据。 @@ -74,8 +66,8 @@ IWlanCallback::ScanResult ([in] unsigned int event, [in] struct HdfWifiScanResul | 名称 | 描述 | | -------- | -------- | -| event | 扫描结果的事件ID。 | -| scanResult | 扫描结果数据。 | +| event | 扫描结果的事件ID。  | +| scanResult | 扫描结果数据。  | | ifName | 网卡名称。 | @@ -85,9 +77,7 @@ IWlanCallback::ScanResult ([in] unsigned int event, [in] struct HdfWifiScanResul ``` IWlanCallback::WifiNetlinkMessage ([in] unsigned char[] recvMsg) ``` - -**描述:** - +**描述:** Netlink消息的回调方法。 当收到Netlink消息后,将通过此方法处理收到的消息。 diff --git a/zh-cn/device-dev/reference/hdi-apis/interface_i_wlan_interface.md b/zh-cn/device-dev/reference/hdi-apis/interface_i_wlan_interface.md index 33df7f747fb979dce5515f83a1de25e930e4a3fd..a3b4733d4fd02ef6166ab558447b10ada14e2e2b 100644 --- a/zh-cn/device-dev/reference/hdi-apis/interface_i_wlan_interface.md +++ b/zh-cn/device-dev/reference/hdi-apis/interface_i_wlan_interface.md @@ -1,65 +1,61 @@ # IWlanInterface -## **概述** +## 概述 WLAN模块向上层WLAN服务提供了统一接口。 上层服务调用相关的接口,可以建立/关闭WLAN热点,扫描/关联/去关联WLAN热点,设置国家码,管理网络设备等。 **Since:** - 3.2 - **Version:** - 1.0 - **相关模块:** -[WLAN](wlan.md) +[WLAN](_w_l_a_n.md) -## **汇总** +## 汇总 ### Public 成员函数 | 名称 | 描述 | | -------- | -------- | -| [Start](#start) () | 创建HAL和驱动之间的通道及获取驱动网卡信息,该函数调用在创建IWiFi实体后进行。 | -| [Stop](#stop) () | 销毁HAL和驱动之间的通道,该函数调用在销毁IWiFi实体前进行。 | -| [CreateFeature](#createfeature) ([in] int type, [out] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature) | 根据输入类型创建对应的feature对象。 | -| [DestroyFeature](#destroyfeature) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature) | 销毁feature对象。 | -| [GetAsscociatedStas](#getasscociatedstas) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [out] struct [HdfStaInfo](_hdf_sta_info.md)[] staInfo, [out] unsigned int num) | 获取与AP连接的所有STA的信息(目前只包含MAC地址)。 | -| [GetChipId](#getchipid) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [out] unsigned char chipId) | 获得当前驱动的芯片ID。 | -| [GetDeviceMacAddress](#getdevicemacaddress) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [out] unsigned char[] mac, [in] unsigned char len) | 获取设备的MAC地址。 | -| [GetFeatureByIfName](#getfeaturebyifname) ([in] String ifName, [out] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature) | 通过网卡名称获取对应的feature对象。 | -| [GetFeatureType](#getfeaturetype) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [out] int featureType) | 获取feature对象的类型。 | -| [GetFreqsWithBand](#getfreqswithband) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [in] struct [HdfWifiInfo](_hdf_wifi_info.md) wifiInfo, [out] int[] freq) | 获取指定频段(2.4G或者5G)下支持的频率。 | -| [GetIfNamesByChipId](#getifnamesbychipid) ([in] unsigned char chipId, [out] String ifName, [out] unsigned int num) | 通过芯片ID获得当前芯片所有的网卡名称。 | -| [GetNetworkIfaceName](#getnetworkifacename) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [out] String ifName) | 根据feature对象获取网卡名称。 | -| [GetSupportCombo](#getsupportcombo) ([out] unsigned long combo) | 获取多网卡共存情况。 | -| [GetSupportFeature](#getsupportfeature) ([out] unsigned char[] supType) | 获取该设备支持的WLAN特性(不考虑当前的使用状态)。 | -| [RegisterEventCallback](#registereventcallback) ([in] [IWlanCallback](interface_i_wlan_callback.md) cbFunc, [in] String ifName) | 注册IWiFi的回调函数,监听异步事件。 | -| [UnregisterEventCallback](#unregistereventcallback) ([in] [IWlanCallback](interface_i_wlan_callback.md) cbFunc, [in] String ifName) | 去注册IWiFi的回调函数。 | -| [ResetDriver](#resetdriver) ([in] unsigned char chipId, [in] String ifName) | 重启指定芯片ID的WLAN驱动程序。 | -| [SetCountryCode](#setcountrycode) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [in] String code, [in] unsigned int len) | 设置国家码(表示AP射频所在的国家,规定了AP射频特性,包括AP的发送功率、支持的信道等。其目的是为了使AP的射频特性符合不同国家或区域的法律法规要求)。 | -| [SetMacAddress](#setmacaddress) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [in] unsigned char[] mac) | 根据传入参数设置对应网卡的MAC地址。 | -| [SetScanningMacAddress](#setscanningmacaddress) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [in] unsigned char[] scanMac) | 设置扫描单个MAC地址。 | -| [SetTxPower](#settxpower) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [in] int power) | 设置发射功率。 | -| [GetNetDevInfo](#getnetdevinfo) ([out] struct [HdfNetDeviceInfoResult](_hdf_net_device_info_result.md) netDeviceInfoResult) | 获取网络设备信息(设备索引、网卡名字、MAC等信息)。 | -| [StartScan](#startscan) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [in] struct [HdfWifiScan](_hdf_wifi_scan.md) scan) | 启动扫描。 | -| [GetPowerMode](#getpowermode) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [out] unsigned char mode) | 获取正在使用的功率模式。 | -| [SetPowerMode](#setpowermode) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [in] unsigned char mode) | 设置功率模式。 | -| [StartChannelMeas](#startchannelmeas) ([in] String ifName, [in] struct [MeasChannelParam](_meas_channel_param.md) measChannelParam) | 启动信道测量。 | -| [GetChannelMeasResult](#getchannelmeasresult) ([in] String ifName, [out] struct [MeasChannelResult](_meas_channel_result.md) measChannelResult) | 获取信道测量结果。 | -| [SetProjectionScreenParam](#setprojectionscreenparam) ([in] String ifName, [in] struct [ProjectionScreenCmdParam](_projection_screen_cmd_param.md) param) | 设置投屏参数。 | -| [WifiSendCmdIoctl](#wifisendcmdioctl) ([in] String ifName, [in] int cmdId, [in] byte[] paramBuf) | 向驱动发送IO控制命令。 | -| [GetStaInfo](#getstainfo) ([in] String ifName, [out] struct [WifiStationInfo](_wifi_station_info.md) info, [in] unsigned char[] mac) | 获取指定网卡的STA的信息。 | - - -## **成员函数说明** +| [Start](#start) () | 创建HAL和驱动之间的通道及获取驱动网卡信息,该函数调用在创建IWiFi实体后进行。  | +| [Stop](#stop) () | 销毁HAL和驱动之间的通道,该函数调用在销毁IWiFi实体前进行。  | +| [CreateFeature](#createfeature) ([in] int type, [out] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature) | 根据输入类型创建对应的feature对象。  | +| [DestroyFeature](#destroyfeature) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature) | 销毁feature对象。  | +| [GetAsscociatedStas](#getasscociatedstas) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [out] struct [HdfStaInfo](_hdf_sta_info.md)[] staInfo, [out] unsigned int num) | 获取与AP连接的所有STA的信息(目前只包含MAC地址)。  | +| [GetChipId](#getchipid) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [out] unsigned char chipId) | 获得当前驱动的芯片ID。  | +| [GetDeviceMacAddress](#getdevicemacaddress) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [out] unsigned char[] mac, [in] unsigned char len) | 获取设备的MAC地址。  | +| [GetFeatureByIfName](#getfeaturebyifname) ([in] String ifName, [out] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature) | 通过网卡名称获取对应的feature对象。  | +| [GetFeatureType](#getfeaturetype) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [out] int featureType) | 获取feature对象的类型。  | +| [GetFreqsWithBand](#getfreqswithband) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [in] struct [HdfWifiInfo](_hdf_wifi_info.md) wifiInfo, [out] int[] freq) | 获取指定频段(2.4G或者5G)下支持的频率。  | +| [GetIfNamesByChipId](#getifnamesbychipid) ([in] unsigned char chipId, [out] String ifName, [out] unsigned int num) | 通过芯片ID获得当前芯片所有的网卡名称。  | +| [GetNetworkIfaceName](#getnetworkifacename) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [out] String ifName) | 根据feature对象获取网卡名称。  | +| [GetSupportCombo](#getsupportcombo) ([out] unsigned long combo) | 获取多网卡共存情况。  | +| [GetSupportFeature](#getsupportfeature) ([out] unsigned char[] supType) | 获取该设备支持的WLAN特性(不考虑当前的使用状态)。  | +| [RegisterEventCallback](#registereventcallback) ([in] [IWlanCallback](interface_i_wlan_callback.md) cbFunc, [in] String ifName) | 注册IWiFi的回调函数,监听异步事件。  | +| [UnregisterEventCallback](#unregistereventcallback) ([in] [IWlanCallback](interface_i_wlan_callback.md) cbFunc, [in] String ifName) | 去注册IWiFi的回调函数。  | +| [ResetDriver](#resetdriver) ([in] unsigned char chipId, [in] String ifName) | 重启指定芯片ID的WLAN驱动程序。  | +| [SetCountryCode](#setcountrycode) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [in] String code, [in] unsigned int len) | 设置国家码(表示AP射频所在的国家,规定了AP射频特性,包括AP的发送功率、支持的信道等。其目的是为了使AP的射频特性符合不同国家或区域的法律法规要求)。  | +| [SetMacAddress](#setmacaddress) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [in] unsigned char[] mac) | 根据传入参数设置对应网卡的MAC地址。  | +| [SetScanningMacAddress](#setscanningmacaddress) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [in] unsigned char[] scanMac) | 设置扫描单个MAC地址。  | +| [SetTxPower](#settxpower) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [in] int power) | 设置发射功率。  | +| [GetNetDevInfo](#getnetdevinfo) ([out] struct [HdfNetDeviceInfoResult](_hdf_net_device_info_result.md) netDeviceInfoResult) | 获取网络设备信息(设备索引、网卡名字、MAC等信息)。  | +| [StartScan](#startscan) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [in] struct [HdfWifiScan](_hdf_wifi_scan.md) scan) | 启动扫描。  | +| [GetPowerMode](#getpowermode) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [out] unsigned char mode) | 获取正在使用的功率模式。  | +| [SetPowerMode](#setpowermode) ([in] struct [HdfFeatureInfo](_hdf_feature_info.md) ifeature, [in] unsigned char mode) | 设置功率模式。  | +| [StartChannelMeas](#startchannelmeas) ([in] String ifName, [in] struct [MeasChannelParam](_meas_channel_param.md) measChannelParam) | 启动信道测量。  | +| [GetChannelMeasResult](#getchannelmeasresult) ([in] String ifName, [out] struct [MeasChannelResult](_meas_channel_result.md) measChannelResult) | 获取信道测量结果。  | +| [SetProjectionScreenParam](#setprojectionscreenparam) ([in] String ifName, [in] struct [ProjectionScreenCmdParam](_projection_screen_cmd_param.md) param) | 设置投屏参数。  | +| [WifiSendCmdIoctl](#wifisendcmdioctl) ([in] String ifName, [in] int cmdId, [in] byte[] paramBuf) | 向驱动发送IO控制命令。  | +| [GetStaInfo](#getstainfo) ([in] String ifName, [out] struct [WifiStationInfo](_wifi_station_info.md) info, [in] unsigned char[] mac) | 获取指定网卡的STA的信息。  | + + +## 成员函数说明 ### CreateFeature() @@ -68,16 +64,14 @@ WLAN模块向上层WLAN服务提供了统一接口。 ``` IWlanInterface::CreateFeature ([in] int type, [out] struct HdfFeatureInfo ifeature ) ``` - -**描述:** - +**描述:** 根据输入类型创建对应的feature对象。 **参数:** | 名称 | 描述 | | -------- | -------- | -| type | 创建的feature类型。 | +| type | 创建的feature类型。  | | ifeature | 获取创建的feature对象。 | **返回:** @@ -93,9 +87,7 @@ IWlanInterface::CreateFeature ([in] int type, [out] struct HdfFeatureInfo ifeatu ``` IWlanInterface::DestroyFeature ([in] struct HdfFeatureInfo ifeature) ``` - -**描述:** - +**描述:** 销毁feature对象。 **参数:** @@ -117,17 +109,15 @@ IWlanInterface::DestroyFeature ([in] struct HdfFeatureInfo ifeature) ``` IWlanInterface::GetAsscociatedStas ([in] struct HdfFeatureInfo ifeature, [out] struct HdfStaInfo[] staInfo, [out] unsigned int num ) ``` - -**描述:** - +**描述:** 获取与AP连接的所有STA的信息(目前只包含MAC地址)。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifeature | feature对象。 | -| staInfo | 保存与AP连接的STA的基本信息。 | +| ifeature | feature对象。  | +| staInfo | 保存与AP连接的STA的基本信息。  | | num | 实际连接的STA的个数。 | **返回:** @@ -143,16 +133,14 @@ IWlanInterface::GetAsscociatedStas ([in] struct HdfFeatureInfo ifeature, [out] s ``` IWlanInterface::GetChannelMeasResult ([in] String ifName, [out] struct MeasChannelResult measChannelResult ) ``` - -**描述:** - +**描述:** 获取信道测量结果。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifName | 网卡名称。 | +| ifName | 网卡名称。  | | measChannelResult | 信道测量结果(信道号、信道负载、信道噪声)。 | **返回:** @@ -168,16 +156,14 @@ IWlanInterface::GetChannelMeasResult ([in] String ifName, [out] struct MeasChann ``` IWlanInterface::GetChipId ([in] struct HdfFeatureInfo ifeature, [out] unsigned char chipId ) ``` - -**描述:** - +**描述:** 获得当前驱动的芯片ID。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifeature | feature对象。 | +| ifeature | feature对象。  | | chipId | 获得的芯片ID。 | **返回:** @@ -193,17 +179,15 @@ IWlanInterface::GetChipId ([in] struct HdfFeatureInfo ifeature, [out] unsigned c ``` IWlanInterface::GetDeviceMacAddress ([in] struct HdfFeatureInfo ifeature, [out] unsigned char[] mac, [in] unsigned char len ) ``` - -**描述:** - +**描述:** 获取设备的MAC地址。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifeature | feature对象。 | -| mac | 获得的MAC地址。 | +| ifeature | feature对象。  | +| mac | 获得的MAC地址。  | | len | mac数组的长度。 | **返回:** @@ -219,16 +203,14 @@ IWlanInterface::GetDeviceMacAddress ([in] struct HdfFeatureInfo ifeature, [out] ``` IWlanInterface::GetFeatureByIfName ([in] String ifName, [out] struct HdfFeatureInfo ifeature ) ``` - -**描述:** - +**描述:** 通过网卡名称获取对应的feature对象。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifName | 网卡名称。 | +| ifName | 网卡名称。  | | ifeature | 获取该网卡的feature对象。 | **返回:** @@ -244,16 +226,14 @@ IWlanInterface::GetFeatureByIfName ([in] String ifName, [out] struct HdfFeatureI ``` IWlanInterface::GetFeatureType ([in] struct HdfFeatureInfo ifeature, [out] int featureType ) ``` - -**描述:** - +**描述:** 获取feature对象的类型。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifeature | feature对象。 | +| ifeature | feature对象。  | | featureType | feature对象的类型。 | **返回:** @@ -269,17 +249,15 @@ IWlanInterface::GetFeatureType ([in] struct HdfFeatureInfo ifeature, [out] int f ``` IWlanInterface::GetFreqsWithBand ([in] struct HdfFeatureInfo ifeature, [in] struct HdfWifiInfo wifiInfo, [out] int[] freq ) ``` - -**描述:** - +**描述:** 获取指定频段(2.4G或者5G)下支持的频率。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifeature | feature对象。 | -| wifiInfo | 频段信息。 | +| ifeature | feature对象。  | +| wifiInfo | 频段信息。  | | freq | 保存支持的频率。 | **返回:** @@ -295,17 +273,15 @@ IWlanInterface::GetFreqsWithBand ([in] struct HdfFeatureInfo ifeature, [in] stru ``` IWlanInterface::GetIfNamesByChipId ([in] unsigned char chipId, [out] String ifName, [out] unsigned int num ) ``` - -**描述:** - +**描述:** 通过芯片ID获得当前芯片所有的网卡名称。 **参数:** | 名称 | 描述 | | -------- | -------- | -| chipId | 需要获取网卡名称的芯片ID。 | -| ifNames | 网卡名称。 | +| chipId | 需要获取网卡名称的芯片ID。  | +| ifNames | 网卡名称。  | | num | 网卡的数量。 | **返回:** @@ -321,9 +297,7 @@ IWlanInterface::GetIfNamesByChipId ([in] unsigned char chipId, [out] String ifNa ``` IWlanInterface::GetNetDevInfo ([out] struct HdfNetDeviceInfoResult netDeviceInfoResult) ``` - -**描述:** - +**描述:** 获取网络设备信息(设备索引、网卡名字、MAC等信息)。 **参数:** @@ -345,16 +319,14 @@ IWlanInterface::GetNetDevInfo ([out] struct HdfNetDeviceInfoResult netDeviceInfo ``` IWlanInterface::GetNetworkIfaceName ([in] struct HdfFeatureInfo ifeature, [out] String ifName ) ``` - -**描述:** - +**描述:** 根据feature对象获取网卡名称。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifeature | feature对象。 | +| ifeature | feature对象。  | | ifName | 网卡名称。 | **返回:** @@ -370,16 +342,14 @@ IWlanInterface::GetNetworkIfaceName ([in] struct HdfFeatureInfo ifeature, [out] ``` IWlanInterface::GetPowerMode ([in] struct HdfFeatureInfo ifeature, [out] unsigned char mode ) ``` - -**描述:** - +**描述:** 获取正在使用的功率模式。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifeature | feature对象。 | +| ifeature | feature对象。  | | mode | 功率模式,包括睡眠模式(待机状态运行)、一般模式(正常额定功率运行)、穿墙模式(最大功率运行,提高信号强度和覆盖面积)。 | **返回:** @@ -395,17 +365,15 @@ IWlanInterface::GetPowerMode ([in] struct HdfFeatureInfo ifeature, [out] unsigne ``` IWlanInterface::GetStaInfo ([in] String ifName, [out] struct WifiStationInfo info, [in] unsigned char[] mac ) ``` - -**描述:** - +**描述:** 获取指定网卡的STA的信息。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifName | 网卡名称。 | -| info | 获取的STA的信息,详情请参考[WifiStationInfo](_wifi_station_info.md)。 | +| ifName | 网卡名称。  | +| info | 获取的STA的信息,详情请参考[WifiStationInfo](_wifi_station_info.md)。  | | mac | STA的MAC地址。 | **返回:** @@ -421,9 +389,7 @@ IWlanInterface::GetStaInfo ([in] String ifName, [out] struct WifiStationInfo inf ``` IWlanInterface::GetSupportCombo ([out] unsigned long combo) ``` - -**描述:** - +**描述:** 获取多网卡共存情况。 **参数:** @@ -445,9 +411,7 @@ IWlanInterface::GetSupportCombo ([out] unsigned long combo) ``` IWlanInterface::GetSupportFeature ([out] unsigned char[] supType) ``` - -**描述:** - +**描述:** 获取该设备支持的WLAN特性(不考虑当前的使用状态)。 **参数:** @@ -469,16 +433,14 @@ IWlanInterface::GetSupportFeature ([out] unsigned char[] supType) ``` IWlanInterface::RegisterEventCallback ([in] IWlanCallback cbFunc, [in] String ifName ) ``` - -**描述:** - +**描述:** 注册IWiFi的回调函数,监听异步事件。 **参数:** | 名称 | 描述 | | -------- | -------- | -| cbFunc | 注册的回调函数。 | +| cbFunc | 注册的回调函数。  | | ifName | 网卡名称。 | **返回:** @@ -494,16 +456,14 @@ IWlanInterface::RegisterEventCallback ([in] IWlanCallback cbFunc, [in] String if ``` IWlanInterface::ResetDriver ([in] unsigned char chipId, [in] String ifName ) ``` - -**描述:** - +**描述:** 重启指定芯片ID的WLAN驱动程序。 **参数:** | 名称 | 描述 | | -------- | -------- | -| chipId | 需要进行重启驱动的芯片ID。 | +| chipId | 需要进行重启驱动的芯片ID。  | | ifName | 网卡名称。 | **返回:** @@ -519,17 +479,15 @@ IWlanInterface::ResetDriver ([in] unsigned char chipId, [in] String ifName ) ``` IWlanInterface::SetCountryCode ([in] struct HdfFeatureInfo ifeature, [in] String code, [in] unsigned int len ) ``` - -**描述:** - +**描述:** 设置国家码(表示AP射频所在的国家,规定了AP射频特性,包括AP的发送功率、支持的信道等。其目的是为了使AP的射频特性符合不同国家或区域的法律法规要求)。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifeature | feature对象。 | -| code | 设置的国家码。 | +| ifeature | feature对象。  | +| code | 设置的国家码。  | | len | 国家码长度。 | **返回:** @@ -545,16 +503,14 @@ IWlanInterface::SetCountryCode ([in] struct HdfFeatureInfo ifeature, [in] String ``` IWlanInterface::SetMacAddress ([in] struct HdfFeatureInfo ifeature, [in] unsigned char[] mac ) ``` - -**描述:** - +**描述:** 根据传入参数设置对应网卡的MAC地址。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifeature | feature对象。 | +| ifeature | feature对象。  | | mac | 设置的MAC地址。 | **返回:** @@ -570,17 +526,15 @@ IWlanInterface::SetMacAddress ([in] struct HdfFeatureInfo ifeature, [in] unsigne ``` IWlanInterface::SetPowerMode ([in] struct HdfFeatureInfo ifeature, [in] unsigned char mode ) ``` - -**描述:** - +**描述:** 设置功率模式。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifeature | feature对象。 | -| mode | 功率模式,包括睡眠模式(待机状态运行)、一般模式(正常额定功率运行)、穿墙模式(最大功率运行,提高信号强度和覆盖面积)。 | +| ifeature | feature对象。  | +| mode | 功率模式,包括睡眠模式(待机状态运行)、一般模式(正常额定功率运行)、穿墙模式(最大功率运行,提高信号强度和覆盖面积)。 | **返回:** @@ -595,16 +549,14 @@ IWlanInterface::SetPowerMode ([in] struct HdfFeatureInfo ifeature, [in] unsigned ``` IWlanInterface::SetProjectionScreenParam ([in] String ifName, [in] struct ProjectionScreenCmdParam param ) ``` - -**描述:** - +**描述:** 设置投屏参数。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifName | 网卡名称。 | +| ifName | 网卡名称。  | | param | 投屏参数。 | **返回:** @@ -620,16 +572,14 @@ IWlanInterface::SetProjectionScreenParam ([in] String ifName, [in] struct Projec ``` IWlanInterface::SetScanningMacAddress ([in] struct HdfFeatureInfo ifeature, [in] unsigned char[] scanMac ) ``` - -**描述:** - +**描述:** 设置扫描单个MAC地址。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifeature | feature对象。 | +| ifeature | feature对象。  | | scanMac | 设置STA扫描的MAC地址。 | **返回:** @@ -645,16 +595,14 @@ IWlanInterface::SetScanningMacAddress ([in] struct HdfFeatureInfo ifeature, [in] ``` IWlanInterface::SetTxPower ([in] struct HdfFeatureInfo ifeature, [in] int power ) ``` - -**描述:** - +**描述:** 设置发射功率。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifeature | feature对象。 | +| ifeature | feature对象。  | | power | 设置的发射功率。 | **返回:** @@ -670,9 +618,7 @@ IWlanInterface::SetTxPower ([in] struct HdfFeatureInfo ifeature, [in] int power ``` IWlanInterface::Start () ``` - -**描述:** - +**描述:** 创建HAL和驱动之间的通道及获取驱动网卡信息,该函数调用在创建IWiFi实体后进行。 **返回:** @@ -688,16 +634,14 @@ IWlanInterface::Start () ``` IWlanInterface::StartChannelMeas ([in] String ifName, [in] struct MeasChannelParam measChannelParam ) ``` - -**描述:** - +**描述:** 启动信道测量。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifName | 网卡名称。 | +| ifName | 网卡名称。  | | measChannelParam | 信道测量参数(信道号、测量时间)。 | **返回:** @@ -713,16 +657,14 @@ IWlanInterface::StartChannelMeas ([in] String ifName, [in] struct MeasChannelPar ``` IWlanInterface::StartScan ([in] struct HdfFeatureInfo ifeature, [in] struct HdfWifiScan scan ) ``` - -**描述:** - +**描述:** 启动扫描。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifeature | feature对象。 | +| ifeature | feature对象。  | | scan | 扫描参数。 | **返回:** @@ -738,9 +680,7 @@ IWlanInterface::StartScan ([in] struct HdfFeatureInfo ifeature, [in] struct HdfW ``` IWlanInterface::Stop () ``` - -**描述:** - +**描述:** 销毁HAL和驱动之间的通道,该函数调用在销毁IWiFi实体前进行。 **返回:** @@ -756,16 +696,14 @@ IWlanInterface::Stop () ``` IWlanInterface::UnregisterEventCallback ([in] IWlanCallback cbFunc, [in] String ifName ) ``` - -**描述:** - +**描述:** 去注册IWiFi的回调函数。 **参数:** | 名称 | 描述 | | -------- | -------- | -| cbFunc | 去注册的回调函数。 | +| cbFunc | 去注册的回调函数。  | | ifName | 网卡名称。 | **返回:** @@ -781,17 +719,15 @@ IWlanInterface::UnregisterEventCallback ([in] IWlanCallback cbFunc, [in] String ``` IWlanInterface::WifiSendCmdIoctl ([in] String ifName, [in] int cmdId, [in] byte[] paramBuf ) ``` - -**描述:** - +**描述:** 向驱动发送IO控制命令。 **参数:** | 名称 | 描述 | | -------- | -------- | -| ifName | 网卡名称。 | -| cmdId | 命令ID。 | +| ifName | 网卡名称。  | +| cmdId | 命令ID。  | | paramBuf | 命令内容。 | **返回:** diff --git a/zh-cn/device-dev/reference/hdi-apis/pin__auth_2_i_executor_callback_8idl.md b/zh-cn/device-dev/reference/hdi-apis/pin__auth_2_i_executor_callback_8idl.md deleted file mode 100644 index a8a0b816d93ea68433e534748afc275f544773b6..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/pin__auth_2_i_executor_callback_8idl.md +++ /dev/null @@ -1,35 +0,0 @@ -# IExecutorCallback.idl - - -## **概述** - -定义异步API接口回调,用于返回异步接口的请求处理结果和获取信息。使用细节见[IExecutor](interface_pin_i_executor.md)。 - -**Since:** - -3.2 - -**Version:** - -1.0 - -**所属模块:** - -[HdfPinAuth](_hdf_pin_auth.md) - - -## **汇总** - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [IExecutorCallback](interface_pin_i_executor_callback.md) | 定义异步API接口回调,用于返回异步接口的请求处理结果和信息。使用细节见[IExecutor](interface_pin_i_executor.md)。 | - - -### 关键字 - - | 名称 | 描述 | -| -------- | -------- | -| package ohos.hdi.pin_auth.v1_0 | 口令认证接口的包路径 | diff --git a/zh-cn/device-dev/reference/hdi-apis/power.md b/zh-cn/device-dev/reference/hdi-apis/power.md index 4383da36d209e4552fbf70c1e62d023c3c4adcd3..8d377936210920a92b884262d77f0b3b80e8d9aa 100644 --- a/zh-cn/device-dev/reference/hdi-apis/power.md +++ b/zh-cn/device-dev/reference/hdi-apis/power.md @@ -1,22 +1,22 @@ # Power -## **概述** +## 概述 -提供休眠/唤醒操作、订阅休眠/唤醒状态、运行锁管理的接口。 +提供休眠/唤醒操作、订阅休眠/唤醒状态和运行锁管理的接口。 电源模块为电源服务提供的休眠/唤醒操作、订阅休眠/唤醒状态和运行锁管理的接口。 服务获取此模块的对象或代理后,可以调用相关的接口对设备进行休眠/唤醒、订阅休眠/唤醒状态和管理运行锁。 -**Since**: +**Since:** 3.1 -**Version**: +**Version:** 1.0 -## **汇总** +## 汇总 ### 文件 @@ -32,15 +32,15 @@ | 名称 | 描述 | | -------- | -------- | -| [IPowerHdiCallback](interface_i_power_hdi_callback.md) | 休眠/唤醒状态的回调。 | -| [IPowerInterface](interface_i_power_interface.md) | 休眠/唤醒操作、订阅休眠/唤醒状态、运行锁管理的接口。 | +| [IPowerHdiCallback](interface_i_power_hdi_callback.md) | interface
休眠/唤醒状态的回调。 | +| [IPowerInterface](interface_i_power_interface.md) | interface
休眠/唤醒操作、订阅休眠/唤醒状态、运行锁管理的接口。 | ### 枚举 | 名称 | 描述 | | -------- | -------- | -| [PowerHdfCmd](#powerhdfcmd) {   CMD_REGISTER_CALLBCK = 0, CMD_START_SUSPEND, CMD_STOP_SUSPEND, CMD_FORCE_SUSPEND,   CMD_SUSPEND_BLOCK, CMD_SUSPEND_UNBLOCK, CMD_DUMP } | 枚举电源命令的参数。 | +| [PowerHdfCmd](#powerhdfcmd) { CMD_REGISTER_CALLBCK = 0, CMD_START_SUSPEND, CMD_STOP_SUSPEND, CMD_FORCE_SUSPEND,   CMD_SUSPEND_BLOCK, CMD_SUSPEND_UNBLOCK, CMD_DUMP } | 枚举电源命令的参数。 | | [PowerHdfCallbackCmd](#powerhdfcallbackcmd) { CMD_ON_SUSPEND = 0, CMD_ON_WAKEUP } | 枚举电源状态回调的参数。 | | [PowerHdfState](#powerhdfstate) { AWAKE = 0, INACTIVE, SLEEP } | 枚举电源的状态。 | @@ -52,7 +52,7 @@ | package ohos.hdi.power.v1_0 | 电源模块接口的包路径。 | -## **枚举类型说明** +## 枚举类型说明 ### PowerHdfCallbackCmd @@ -62,7 +62,7 @@ enum PowerHdfCallbackCmd ``` -**描述:** +**描述:** 枚举电源状态回调的参数。 @@ -79,7 +79,7 @@ enum PowerHdfCallbackCmd enum PowerHdfCmd ``` -**描述:** +**描述:** 枚举电源命令的参数。 @@ -101,7 +101,7 @@ enum PowerHdfCmd enum PowerHdfState ``` -**描述:** +**描述:** 枚举电源的状态。 diff --git a/zh-cn/device-dev/reference/hdi-apis/thermal.md b/zh-cn/device-dev/reference/hdi-apis/thermal.md index 72a5d3edf656d93a1cb5587840d022fc181f7e3d..baee01f86678c4fed89c47de392d408768630975 100644 --- a/zh-cn/device-dev/reference/hdi-apis/thermal.md +++ b/zh-cn/device-dev/reference/hdi-apis/thermal.md @@ -1,22 +1,22 @@ # Thermal -## **概述** +## 概述 提供设备温度管理、控制及订阅接口。 -热模块为热服务提供的设备温度管理、控制及订阅接口。服务获取此模块的对象或代理后,可以调用相关的接口管理、控制和订阅设备温度。 +热模块为热服务提供的设备温度管理、控制及订阅接口。 服务获取此模块的对象或代理后,可以调用相关的接口管理、控制和订阅设备温度。 -**Since**: +**Since:** 3.1 -**Version**: +**Version:** 1.0 -## **汇总** +## 汇总 ### 文件 @@ -32,10 +32,10 @@ | 名称 | 描述 | | -------- | -------- | -| [IThermalCallback](interface_i_thermal_callback.md) | 订阅设备发热状态的回调。 | -| [IThermalInterface](interface_i_thermal_interface.md) | 设备温度管理、控制及订阅接口。 | -| [ThermalZoneInfo](_thermal_zone_info.md) | 设备发热的信息。 | -| [HdfThermalCallbackInfo](_hdf_thermal_callback_info.md) | 设备发热的信息列表。 | +| [IThermalCallback](interface_i_thermal_callback.md) | interface
订阅设备发热状态的回调。 | +| [IThermalInterface](interface_i_thermal_interface.md) | interface
设备温度管理、控制及订阅接口。 | +| [ThermalZoneInfo](_thermal_zone_info.md) | struct
设备发热的信息。 | +| [HdfThermalCallbackInfo](_hdf_thermal_callback_info.md) | struct
设备发热的信息列表。 | ### 关键字 diff --git a/zh-cn/device-dev/reference/hdi-apis/union_audio_scene_descriptor_1_1_scene_desc.md b/zh-cn/device-dev/reference/hdi-apis/union_audio_scene_descriptor_1_1_scene_desc.md deleted file mode 100644 index f9291a99bb1b489827b8e47ed1a33301215de8df..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/union_audio_scene_descriptor_1_1_scene_desc.md +++ /dev/null @@ -1,21 +0,0 @@ -# AudioSceneDescriptor::SceneDesc - - -## **概述** - -音频场景描述。 - -**相关模块:** - -[Audio](_audio.md) - - -## **汇总** - - -### Public 属性 - - | 名称 | 描述 | -| -------- | -------- | -| [id](_audio.md#id) | 音频场景的ID。 | -| [desc](_audio.md#desc-35) | 以字符串命名的音频场景。 | diff --git a/zh-cn/device-dev/reference/hdi-apis/union_color_value.md b/zh-cn/device-dev/reference/hdi-apis/union_color_value.md index 49a63ccebf1a51b82141b05378791a5aa7030268..7026a44c27a85910708164c5eadd0f67aadc93fb 100644 --- a/zh-cn/device-dev/reference/hdi-apis/union_color_value.md +++ b/zh-cn/device-dev/reference/hdi-apis/union_color_value.md @@ -1,29 +1,33 @@ # ColorValue -## **概述** +## 概述 定义灯的颜色模式。 参数包括RGB模式和WRGB模式。 +**Since:** +3.2 +**Version:** +1.0 **相关模块:** -[Light](light.md) +[Light](_light.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [wrgbColor](#wrgbcolor) | WRGB模式 | -| [rgbColor](#rgbcolor) | RGB模式 | +| [wrgbColor](#wrgbcolor) | struct [WRGBColor](_w_r_g_b_color.md)
WRGB模式, 详见[WRGBColor](_w_r_g_b_color.md)。  | +| [rgbColor](#rgbcolor) | struct [RGBColor](_r_g_b_color.md)
RGB模式, 详见[RGBColor](_r_g_b_color.md)。  | -## **类成员变量说明** +## 类成员变量说明 ### rgbColor @@ -32,9 +36,7 @@ ``` struct RGBColor ColorValue::rgbColor ``` - -**描述:** - +**描述:** RGB模式, 详见[RGBColor](_r_g_b_color.md)。 @@ -44,7 +46,5 @@ RGB模式, 详见[RGBColor](_r_g_b_color.md)。 ``` struct WRGBColor ColorValue::wrgbColor ``` - -**描述:** - +**描述:** WRGB模式, 详见[WRGBColor](_w_r_g_b_color.md)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/union_current_service_cell_paras.md b/zh-cn/device-dev/reference/hdi-apis/union_current_service_cell_paras.md new file mode 100644 index 0000000000000000000000000000000000000000..7553024ab053073bf6d10fe69bb52c72acafea2e --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/union_current_service_cell_paras.md @@ -0,0 +1,88 @@ +# CurrentServiceCellParas + + +## 概述 + +当前蜂窝数据信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [gsm](#gsm) | struct [CellRatGsm](_cell_rat_gsm.md)
Gsm蜂窝信息  | +| [lte](#lte) | struct [CellRatLte](_cell_rat_lte.md)
LTE蜂窝信息  | +| [wcdma](#wcdma) | struct [CellRatWcdma](_cell_rat_wcdma.md)
WCDMA蜂窝信息  | +| [cdma](#cdma) | struct [CellRatCdma](_cell_rat_cdma.md)
CDMA蜂窝信息  | +| [tdscdma](#tdscdma) | struct [CellRatTdscdma](_cell_rat_tdscdma.md)
TDSCDMA蜂窝信息  | +| [nr](#nr) | struct [CellRatNr](_cell_rat_nr.md)
NR蜂窝信息  | + + +## 类成员变量说明 + + +### cdma + + +``` +struct CellRatCdma CurrentServiceCellParas::cdma +``` +**描述:** +CDMA蜂窝信息 + + +### gsm + + +``` +struct CellRatGsm CurrentServiceCellParas::gsm +``` +**描述:** +Gsm蜂窝信息 + + +### lte + + +``` +struct CellRatLte CurrentServiceCellParas::lte +``` +**描述:** +LTE蜂窝信息 + + +### nr + + +``` +struct CellRatNr CurrentServiceCellParas::nr +``` +**描述:** +NR蜂窝信息 + + +### tdscdma + + +``` +struct CellRatTdscdma CurrentServiceCellParas::tdscdma +``` +**描述:** +TDSCDMA蜂窝信息 + + +### wcdma + + +``` +struct CellRatWcdma CurrentServiceCellParas::wcdma +``` +**描述:** +WCDMA蜂窝信息 diff --git a/zh-cn/device-dev/reference/hdi-apis/union_port_cap.md b/zh-cn/device-dev/reference/hdi-apis/union_port_cap.md index 015901e57a6474e086908bec3f88c427c14db67e..650d631d0fd697093aed64ba1a44c72cb081bbc7 100644 --- a/zh-cn/device-dev/reference/hdi-apis/union_port_cap.md +++ b/zh-cn/device-dev/reference/hdi-apis/union_port_cap.md @@ -1,27 +1,27 @@ # PortCap -## **概述** +## 概述 定义音视频编解码能力。 **相关模块:** -[Codec](codec.md) +[Codec](_codec.md) -## **汇总** +## 汇总 ### Public 属性 | 名称 | 描述 | | -------- | -------- | -| [video](#video) | 视频编解码能力 | -| [audio](#audio) | 音频编解码能力 | +| [video](#video) | [VideoPortCap](_video_port_cap.md)
视频编解码能力。  | +| [audio](#audio) | [AudioPortCap](_audio_port_cap.md)
音频编解码能力。  | -## **类成员变量说明** +## 类成员变量说明 ### audio @@ -30,9 +30,7 @@ ``` AudioPortCap PortCap::audio ``` - -**描述:** - +**描述:** 音频编解码能力。 @@ -42,7 +40,5 @@ AudioPortCap PortCap::audio ``` VideoPortCap PortCap::video ``` - -**描述:** - +**描述:** 视频编解码能力。 diff --git a/zh-cn/device-dev/reference/hdi-apis/union_scene_desc.md b/zh-cn/device-dev/reference/hdi-apis/union_scene_desc.md new file mode 100644 index 0000000000000000000000000000000000000000..cbb45e95f4d94f2bf6c6c12ad6c10e8862c8c19e --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/union_scene_desc.md @@ -0,0 +1,37 @@ +# SceneDesc + + +## 概述 + +音频场景描述。 + +**Since:** +3.2 +**Version:** +1.0 +**相关模块:** + +[Audio](_audio.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [id](#id) | unsigned int
音频场景的ID,详情参考[AudioCategory](_audio.md#audiocategory)。  | + + +## 类成员变量说明 + + +### id + + +``` +unsigned int SceneDesc::id +``` +**描述:** +音频场景的ID,详情参考[AudioCategory](_audio.md#audiocategory)。 diff --git a/zh-cn/device-dev/reference/hdi-apis/union_service_cell_paras.md b/zh-cn/device-dev/reference/hdi-apis/union_service_cell_paras.md new file mode 100644 index 0000000000000000000000000000000000000000..710534c68405c4ebc1c1a715c756133fec9c1066 --- /dev/null +++ b/zh-cn/device-dev/reference/hdi-apis/union_service_cell_paras.md @@ -0,0 +1,88 @@ +# ServiceCellParas + + +## 概述 + +多种网络模式的小区信息。 + +**相关模块:** + +[Ril](_ril.md) + + +## 汇总 + + +### Public 属性 + + | 名称 | 描述 | +| -------- | -------- | +| [gsm](#gsm) | struct [CellListRatGsm](_cell_list_rat_gsm.md)
GSM小区信息,具体查看[CellListRatGsm](_cell_list_rat_gsm.md) | +| [lte](#lte) | struct [CellListRatLte](_cell_list_rat_lte.md)
LTE小区信息,具体查看[CellListRatLte](_cell_list_rat_lte.md) | +| [wcdma](#wcdma) | struct [CellListRatWcdma](_cell_list_rat_wcdma.md)
WCDMA小区信息,具体查看[CellListRatWcdma](_cell_list_rat_wcdma.md) | +| [cdma](#cdma) | struct [CellListRatCdma](_cell_list_rat_cdma.md)
CDMA小区信息,具体查看[CellListRatCdma](_cell_list_rat_cdma.md) | +| [tdscdma](#tdscdma) | struct [CellListRatTdscdma](_cell_list_rat_tdscdma.md)
TDSCDMA小区信息,具体查看[CellListRatTdscdma](_cell_list_rat_tdscdma.md) | +| [nr](#nr) | struct [CellListRatNr](_cell_list_rat_nr.md)
NR小区信息,具体查看[CellListRatNr](_cell_list_rat_nr.md) | + + +## 类成员变量说明 + + +### cdma + + +``` +struct CellListRatCdma ServiceCellParas::cdma +``` +**描述:** +CDMA小区信息,具体查看[CellListRatCdma](_cell_list_rat_cdma.md) + + +### gsm + + +``` +struct CellListRatGsm ServiceCellParas::gsm +``` +**描述:** +GSM小区信息,具体查看[CellListRatGsm](_cell_list_rat_gsm.md) + + +### lte + + +``` +struct CellListRatLte ServiceCellParas::lte +``` +**描述:** +LTE小区信息,具体查看[CellListRatLte](_cell_list_rat_lte.md) + + +### nr + + +``` +struct CellListRatNr ServiceCellParas::nr +``` +**描述:** +NR小区信息,具体查看[CellListRatNr](_cell_list_rat_nr.md) + + +### tdscdma + + +``` +struct CellListRatTdscdma ServiceCellParas::tdscdma +``` +**描述:** +TDSCDMA小区信息,具体查看[CellListRatTdscdma](_cell_list_rat_tdscdma.md) + + +### wcdma + + +``` +struct CellListRatWcdma ServiceCellParas::wcdma +``` +**描述:** +WCDMA小区信息,具体查看[CellListRatWcdma](_cell_list_rat_wcdma.md) diff --git a/zh-cn/device-dev/reference/hdi-apis/wlan.md b/zh-cn/device-dev/reference/hdi-apis/wlan.md deleted file mode 100644 index b2bba7253d37b14588ca2b44988dd6a0612e6800..0000000000000000000000000000000000000000 --- a/zh-cn/device-dev/reference/hdi-apis/wlan.md +++ /dev/null @@ -1,55 +0,0 @@ -# WLAN - - -## **概述** - -WLAN模块向上层WLAN服务提供了统一接口。 - -上层WLAN服务开发人员可根据WLAN模块提供的向上统一接口获取如下能力:建立/关闭WLAN热点,扫描/关联WLAN热点,WLAN平台芯片管理,网络数据缓冲的申请、释放、移动等操作,网络设备管理,电源管理等。 - -**Since**: - -3.2 - -**Version**: - -1.0 - - -## **汇总** - - -### 文件 - - | 名称 | 描述 | -| -------- | -------- | -| [IWlanCallback.idl](_i_wlan_callback_8idl.md) | WLAN模块为WLAN服务提供的重启驱动、扫描结果、Netlink消息处理的回调。 | -| [IWlanInterface.idl](_i_wlan_interface_8idl.md) | 建立/关闭WLAN热点,扫描/关联/去关联WLAN热点,设置国家码,管理网络设备等操作的接口。 | -| [WlanTypes.idl](_wlan_types_8idl.md) | WLAN模块相关的数据类型。 | - - -### 类 - - | 名称 | 描述 | -| -------- | -------- | -| [IWlanCallback](interface_i_wlan_callback.md) | 定义WLAN模块的回调函数。 | -| [IWlanInterface](interface_i_wlan_interface.md) | WLAN模块向上层WLAN服务提供了统一接口。 | -| [HdfFeatureInfo](_hdf_feature_info.md) | feature对象信息。 | -| [HdfStaInfo](_hdf_sta_info.md) | STA的信息。 | -| [HdfWifiDriverScanSsid](_hdf_wifi_driver_scan_ssid.md) | WiFi扫描参数SSID信息。 | -| [HdfWifiScan](_hdf_wifi_scan.md) | WiFi扫描参数。 | -| [HdfNetDeviceInfo](_hdf_net_device_info.md) | 网络设备信息。 | -| [HdfNetDeviceInfoResult](_hdf_net_device_info_result.md) | 网络设备信息集合。 | -| [HdfWifiScanResult](_hdf_wifi_scan_result.md) | WiFi扫描结果。 | -| [HdfWifiInfo](_hdf_wifi_info.md) | WiFi频段信息。 | -| [MeasChannelParam](_meas_channel_param.md) | 信道测量参数。 | -| [MeasChannelResult](_meas_channel_result.md) | 信道测量结果。 | -| [ProjectionScreenCmdParam](_projection_screen_cmd_param.md) | 投屏参数。 | -| [WifiStationInfo](_wifi_station_info.md) | STA的信息。 | - - -### 关键字 - - | 名称 | 描述 | -| -------- | -------- | -| package ohos.hdi.wlan.v1_0 | WLAN模块接口的包路径。 | diff --git a/zh-cn/device-dev/website.md b/zh-cn/device-dev/website.md index 5b7c3554ee4351f78c857c4c638c178b63955917..43302278d8057df1ec7c15b1f64d0ff373662520 100644 --- a/zh-cn/device-dev/website.md +++ b/zh-cn/device-dev/website.md @@ -562,258 +562,227 @@ - [移植常见问题](faqs/faqs-porting.md) - [启动恢复常见问题](faqs/faqs-startup.md) - [系统应用常见问题](faqs/faqs-system-applications.md) - - HDI接口参考 + - HDI接口参考 - 模块 - [Audio](reference/hdi-apis/_audio.md) - [Battery](reference/hdi-apis/battery.md) - - [Camera](reference/hdi-apis/camera.md) - - [Codec](reference/hdi-apis/codec.md) + - [Camera](reference/hdi-apis/_camera.md) + - [Codec](reference/hdi-apis/_codec.md) - [Display](reference/hdi-apis/_display.md) - [HdfFaceAuth](reference/hdi-apis/_hdf_face_auth.md) - [HdfPinAuth](reference/hdi-apis/_hdf_pin_auth.md) - [HdfUserAuth](reference/hdi-apis/_hdf_user_auth.md) - - [HdiActivityRecognition](reference/hdi-apis/activity_recognition.md) - - [Input](reference/hdi-apis/input.md) - - [Light](reference/hdi-apis/light.md) - - [Motion](reference/hdi-apis/motion.md) + - [HdiActivityRecognition](reference/hdi-apis/_hdi_activity_recognition.md) + - [HdiLpfenceCellbatching](reference/hdi-apis/_hdi_lpfence_cellbatching.md) + - [HdiLpfenceCellfence](reference/hdi-apis/_hdi_lpfence_cellfence.md) + - [HdiLpfenceGeofence](reference/hdi-apis/_hdi_lpfence_geofence.md) + - [HdiLpfenceWififence](reference/hdi-apis/_hdi_lpfence_wififence.md) + - [Input](reference/hdi-apis/_input.md) + - [Light](reference/hdi-apis/_light.md) + - [Motion](reference/hdi-apis/_motion.md) + - [NNRt](reference/hdi-apis/_n_n_rt.md) - [Power](reference/hdi-apis/power.md) - - [Sensor](reference/hdi-apis/sensor.md) + - [Ril](reference/hdi-apis/_ril.md) + - [Sensor](reference/hdi-apis/_sensor.md) - [Thermal](reference/hdi-apis/thermal.md) - - [USB](reference/hdi-apis/usb.md) - - [Vibrator](reference/hdi-apis/vibrator.md) - - [WLAN](reference/hdi-apis/wlan.md) - - 头文件和结构体 - - 头文件 - - [audio_adapter.h](reference/hdi-apis/audio__adapter_8h.md) - - [audio_attribute.h](reference/hdi-apis/audio__attribute_8h.md) - - [audio_capture.h](reference/hdi-apis/audio__capture_8h.md) - - [audio_control.h](reference/hdi-apis/audio__control_8h.md) - - [audio_manager.h](reference/hdi-apis/audio__manager_8h.md) - - [audio_render.h](reference/hdi-apis/audio__render_8h.md) - - [audio_scene.h](reference/hdi-apis/audio__scene_8h.md) - - [audio_types.h](reference/hdi-apis/audio__types_8h.md) - - [audio_volume.h](reference/hdi-apis/audio__volume_8h.md) - - [codec_callback_if.h](reference/hdi-apis/codec_callback_if_h.md) - - [codec_common_type.h](reference/hdi-apis/codec_common_type_h.md) - - [codec_component_if.h](reference/hdi-apis/codec_component_if_h.md) - - [codec_component_manager.h](reference/hdi-apis/codec__component__manager_h.md) - - [codec_component_type.h](reference/hdi-apis/codec__component__type_h.md) + - [USB](reference/hdi-apis/_u_s_b.md) + - [Vibrator](reference/hdi-apis/_vibrator.md) + - [WLAN](reference/hdi-apis/_w_l_a_n.md) + - 头文件 + - Audio模块头文件 + - [AudioTypes.idl](reference/hdi-apis/_audio_types_8idl.md) + - [IAudioAdapter.idl](reference/hdi-apis/_i_audio_adapter_8idl.md) + - [IAudioCallback.idl](reference/hdi-apis/_i_audio_callback_8idl.md) + - [IAudioCapture.idl](reference/hdi-apis/_i_audio_capture_8idl.md) + - [IAudioManager.idl](reference/hdi-apis/_i_audio_manager_8idl.md) + - [IAudioRender.idl](reference/hdi-apis/_i_audio_render_8idl.md) + - Battery模块相关头文件 + - [IBatteryCallback.idl](reference/hdi-apis/_i_battery_callback_8idl.md) + - [IBatteryInterface.idl](reference/hdi-apis/_i_battery_interface_8idl.md) + - [Types.idl](reference/hdi-apis/_battery_types_8idl.md) + - Camera模块头文件 + - [ICameraDevice.idl](reference/hdi-apis/_i_camera_device_8idl.md) + - [ICameraDeviceCallback.idl](reference/hdi-apis/_i_camera_device_callback_8idl.md) + - [ICameraHost.idl](reference/hdi-apis/_i_camera_host_8idl.md) + - [ICameraHostCallback.idl](reference/hdi-apis/_i_camera_host_callback_8idl.md) + - [IOfflineStreamOperator.idl](reference/hdi-apis/_i_offline_stream_operator_8idl.md) + - [IStreamOperator.idl](reference/hdi-apis/_i_stream_operator_8idl.md) + - [IStreamOperatorCallback.idl](reference/hdi-apis/_i_stream_operator_callback_8idl.md) + - [Types.idl](reference/hdi-apis/_types_8idl.md) + - Codec模块头文件 + - [codec_callback_if.h](reference/hdi-apis/codec__callback__if_8h.md) + - [codec_common_type.h](reference/hdi-apis/codec__common__type_8h.md) + - [codec_component_if.h](reference/hdi-apis/codec__component__if_8h.md) + - [codec_component_manager.h](reference/hdi-apis/codec__component__manager_8h.md) + - [codec_component_type.h](reference/hdi-apis/codec__component__type_8h.md) + - Display模块头文件 - [display_device.h](reference/hdi-apis/display__device_8h.md) - [display_gfx.h](reference/hdi-apis/display__gfx_8h.md) - [display_gralloc.h](reference/hdi-apis/display__gralloc_8h.md) - [display_layer.h](reference/hdi-apis/display__layer_8h.md) - [display_type.h](reference/hdi-apis/display__type_8h.md) - [display_vgu.h](reference/hdi-apis/display__vgu_8h.md) - - [input_controller.h](reference/hdi-apis/input__controller_8h.md) - - [input_manager.h](reference/hdi-apis/input__manager_8h.md) - - [input_reporter.h](reference/hdi-apis/input__reporter_8h.md) - - [input_type.h](reference/hdi-apis/input__type_8h.md) - - [ActivityRecognitionTypes.idl](reference/hdi-apis/activity_recognition_types_idl.md) - - [Types.idl](reference/hdi-apis/battery_types_idl.md) - - [IExecutor.idl](reference/hdi-apis/face__auth_2_i_executor_8idl.md) - - [IExecutorCallback.idl](reference/hdi-apis/face__auth_2_i_executor_callback_8idl.md) + - HdfFaceAuth模块头文件 - [FaceAuthTypes.idl](reference/hdi-apis/_face_auth_types_8idl.md) - - [PinAuthTypes.idl](reference/hdi-apis/_pin_auth_types_8idl.md) - - [IExecutor.idl](reference/hdi-apis/pin__auth_2_i_executor_8idl.md) - - [IExecutorCallback.idl](reference/hdi-apis/pin__auth_2_i_executor_callback_8idl.md) + - [IExecutor.idl](reference/hdi-apis/_i_executor_8idl_faceauth.md) + - [IExecutorCallback.idl](reference/hdi-apis/_i_executor_callback_8idl_faceauth.md) - [IFaceAuthInterface.idl](reference/hdi-apis/_i_face_auth_interface_8idl.md) + - HdfPinAuth模块头文件 + - [IExecutor.idl](reference/hdi-apis/_i_executor_8idl_pinauth.md) + - [IExecutorCallback.idl](reference/hdi-apis/_i_executor_callback_8idl_pinauth.md) - [IPinAuthInterface.idl](reference/hdi-apis/_i_pin_auth_interface_8idl.md) + - HdfUserAuth模块头文件 - [IUserAuthInterface.idl](reference/hdi-apis/_i_user_auth_interface_8idl.md) - [UserAuthTypes.idl](reference/hdi-apis/_user_auth_types_8idl.md) + - HdiActivityRecognition模块头文件 + - [ActivityRecognitionTypes.idl](reference/hdi-apis/_activity_recognition_types_8idl.md) - [IActivityChangedCallback.idl](reference/hdi-apis/_i_activity_changed_callback_8idl.md) - [IActivityInterface.idl](reference/hdi-apis/_i_activity_interface_8idl.md) - - [IBatteryCallback.idl](reference/hdi-apis/_i_battery_callback_8idl.md) - - [IBatteryInterface.idl](reference/hdi-apis/_i_battery_interface_8idl.md) - - [ICameraDevice.idl](reference/hdi-apis/_i_camera_device_8idl.md) - - [ICameraDeviceCallback.idl](reference/hdi-apis/_i_camera_device_callback_8idl.md) - - [ICameraHostCallback.idl](reference/hdi-apis/_i_camera_host_callback_8idl.md) - - [ICameraHost.idl](reference/hdi-apis/_i_camera_host_8idl.md) + - HdiLpfenceCellbatching模块头文件 + - [CellbatchingTypes.idl](reference/hdi-apis/_cellbatching_types_8idl.md) + - [ICellbatchingCallback.idl](reference/hdi-apis/_i_cellbatching_callback_8idl.md) + - [ICellbatchingInterface.idl](reference/hdi-apis/_i_cellbatching_interface_8idl.md) + - HdiLpfenceCellfence模块头文件 + - [CellfenceTypes.idl](reference/hdi-apis/_cellfence_types_8idl.md) + - [ICellfenceCallback.idl](reference/hdi-apis/_i_cellfence_callback_8idl.md) + - [ICellfenceInterface.idl](reference/hdi-apis/_i_cellfence_interface_8idl.md) + - HdiLpfenceGeofence模块头文件 + - [GeofenceTypes.idl](reference/hdi-apis/_geofence_types_8idl.md) + - [IGeofenceCallback.idl](reference/hdi-apis/_i_geofence_callback_8idl.md) + - [IGeofenceIntf.idl](reference/hdi-apis/_i_geofence_intf_8idl.md) + - HdiLpfenceWififence模块头文件 + - [IWififenceCallback.idl](reference/hdi-apis/_i_wififence_callback_8idl.md) + - [IWififenceInterface.idl](reference/hdi-apis/_i_wififence_interface_8idl.md) + - [WififenceTypes.idl](reference/hdi-apis/_wififence_types_8idl.md) + - Input模块头文件 + - [input_controller.h](reference/hdi-apis/input__controller_8h.md) + - [input_manager.h](reference/hdi-apis/input__manager_8h.md) + - [input_reporter.h](reference/hdi-apis/input__reporter_8h.md) + - [input_type.h](reference/hdi-apis/input__type_8h.md) + - Light模块头文件 - [ILightInterface.idl](reference/hdi-apis/_i_light_interface_8idl.md) + - [LightTypes.idl](reference/hdi-apis/_light_types_8idl.md) + - Motion模块头文件 - [IMotionCallback.idl](reference/hdi-apis/_i_motion_callback_8idl.md) - [IMotionInterface.idl](reference/hdi-apis/_i_motion_interface_8idl.md) - - [IOfflineStreamOperator.idl](reference/hdi-apis/_i_offline_stream_operator_8idl.md) + - [MotionTypes.idl](reference/hdi-apis/_motion_types_8idl.md) + - NNRt模块头文件 + - [INnrtDevice.idl](reference/hdi-apis/_i_nnrt_device_8idl.md) + - [IPreparedModel.idl](reference/hdi-apis/_i_prepared_model_8idl.md) + - [ModelTypes.idl](reference/hdi-apis/_model_types_8idl.md) + - [NnrtTypes.idl](reference/hdi-apis/_nnrt_types_8idl.md) + - [NodeAttrTypes.idl](reference/hdi-apis/_node_attr_types_8idl.md) + - Power模块头文件 - [IPowerHdiCallback.idl](reference/hdi-apis/_i_power_hdi_callback_8idl.md) - [IPowerInterface.idl](reference/hdi-apis/_i_power_interface_8idl.md) + - [PowerTypes.idl](reference/hdi-apis/_power_types_8idl.md) + - Ril模块头文件 + - [IRil.idl](reference/hdi-apis/_i_ril_8idl.md) + - [IRilCallback.idl](reference/hdi-apis/_i_ril_callback_8idl.md) + - [Types.idl](reference/hdi-apis/_ril_types_8idl.md) + - Sensor模块头文件 - [ISensorCallback.idl](reference/hdi-apis/_i_sensor_callback_8idl.md) - [ISensorInterface.idl](reference/hdi-apis/_i_sensor_interface_8idl.md) - - [IStreamOperator.idl](reference/hdi-apis/_i_stream_operator_8idl.md) - - [IStreamOperatorCallback.idl](reference/hdi-apis/_i_stream_operator_callback_8idl.md) + - [SensorTypes.idl](reference/hdi-apis/_sensor_types_8idl.md) + - Thermal模块头文件 - [IThermalCallback.idl](reference/hdi-apis/_i_thermal_callback_8idl.md) - [IThermalInterface.idl](reference/hdi-apis/_i_thermal_interface_8idl.md) + - [ThermalTypes.idl](reference/hdi-apis/_thermal_types_8idl.md) + - USB模块头文件 - [IUsbdBulkCallback.idl](reference/hdi-apis/_i_usbd_bulk_callback_8idl.md) - - [IUsbInterface.idl](reference/hdi-apis/_i_usb_interface_8idl.md) - [IUsbdSubscriber.idl](reference/hdi-apis/_i_usbd_subscriber_8idl.md) + - [IUsbInterface.idl](reference/hdi-apis/_i_usb_interface_8idl.md) + - [UsbTypes.idl](reference/hdi-apis/_usb_types_8idl.md) + - Vibrator模块头文件 - [IVibratorInterface.idl](reference/hdi-apis/_i_vibrator_interface_8idl.md) + - [VibratorTypes.idl](reference/hdi-apis/_vibrator_types_8idl.md) + - WLAN模块头文件 - [IWlanCallback.idl](reference/hdi-apis/_i_wlan_callback_8idl.md) - [IWlanInterface.idl](reference/hdi-apis/_i_wlan_interface_8idl.md) - - [LightTypes.idl](reference/hdi-apis/_light_types_8idl.md) - - [MotionTypes.idl](reference/hdi-apis/_motion_types_8idl.md) - - [PowerTypes.idl](reference/hdi-apis/_power_types_8idl.md) - - [SensorTypes.idl](reference/hdi-apis/_sensor_types_8idl.md) - - [ThermalTypes.idl](reference/hdi-apis/_thermal_types_8idl.md) - - [Types.idl](reference/hdi-apis/camera_2v1__0_2_types_8idl.md) - - [UsbTypes.idl](reference/hdi-apis/_usb_types_8idl.md) - - [VibratorTypes.idl](reference/hdi-apis/_vibrator_types_8idl.md) - [WlanTypes.idl](reference/hdi-apis/_wlan_types_8idl.md) - - 结构体 - - [YUVDescInfo](reference/hdi-apis/_yun_desc_info_.md) - - [ExtDataHandle](reference/hdi-apis/_ext_data_handle.md) - - [ActRecognitionEvent](reference/hdi-apis/_act_recognition_event.md) - - [AllocInfo](reference/hdi-apis/_alloc_info.md) - - [Alignment](reference/hdi-apis/_alignment.md) - - [AudioAdapter](reference/hdi-apis/_audio_adapter.md) + - 结构体 + - Audio模块结构体 - [AudioAdapterDescriptor](reference/hdi-apis/_audio_adapter_descriptor.md) - - [AudioAttribute](reference/hdi-apis/_audio_attribute.md) - - [AudioCapture](reference/hdi-apis/_audio_capture.md) - - [AudioControl](reference/hdi-apis/_audio_control.md) - [AudioDevExtInfo](reference/hdi-apis/_audio_dev_ext_info.md) - [AudioDeviceDescriptor](reference/hdi-apis/_audio_device_descriptor.md) - - [AudioManager](reference/hdi-apis/_audio_manager.md) + - [AudioDeviceStatus](reference/hdi-apis/_audio_device_status.md) + - [AudioEvent](reference/hdi-apis/_audio_event.md) + - [AudioInfo](reference/hdi-apis/_audio_info.md) - [AudioMixExtInfo](reference/hdi-apis/_audio_mix_ext_info.md) - - [AudioMmapBufferDescriptor](reference/hdi-apis/_audio_mmap_buffer_descriptor.md) + - [AudioMmapBufferDescripter](reference/hdi-apis/_audio_mmap_buffer_descripter.md) - [AudioPort](reference/hdi-apis/_audio_port.md) - - [AudioPortCap](reference/hdi-apis/audio_portcap.md) - [AudioPortCapability](reference/hdi-apis/_audio_port_capability.md) - - [AudioRender](reference/hdi-apis/_audio_render.md) - [AudioRoute](reference/hdi-apis/_audio_route.md) - [AudioRouteNode](reference/hdi-apis/_audio_route_node.md) - [AudioSampleAttributes](reference/hdi-apis/_audio_sample_attributes.md) - - [AudioScene](reference/hdi-apis/_audio_scene.md) - [AudioSceneDescriptor](reference/hdi-apis/_audio_scene_descriptor.md) - - [AudioSceneDescriptor::SceneDesc](reference/hdi-apis/union_audio_scene_descriptor_1_1_scene_desc.md) - [AudioSessionExtInfo](reference/hdi-apis/_audio_session_ext_info.md) - [AudioSubPortCapability](reference/hdi-apis/_audio_sub_port_capability.md) - [AudioTimeStamp](reference/hdi-apis/_audio_time_stamp.md) - - [AudioVolume](reference/hdi-apis/_audio_volume.md) - - [AuthResultInfo](reference/hdi-apis/_auth_result_info.md) - - [AuthSolution](reference/hdi-apis/_auth_solution.md) - - [BufferData](reference/hdi-apis/_buffer_data.md) + - [IAudioAdapter](reference/hdi-apis/interface_i_audio_adapter.md) + - [IAudioCallback](reference/hdi-apis/interface_i_audio_callback.md) + - [IAudioCapture](reference/hdi-apis/interface_i_audio_capture.md) + - [IAudioManager](reference/hdi-apis/interface_i_audio_manager.md) + - [IAudioRender](reference/hdi-apis/interface_i_audio_render.md) + - [SceneDesc](reference/hdi-apis/union_scene_desc.md) + - Battery模块结构体 - [BatteryInfo](reference/hdi-apis/_battery_info.md) + - [IBatteryCallback](reference/hdi-apis/interface_i_battery_callback.md) + - [IBatteryInterface](reference/hdi-apis/interface_i_battery_interface.md) + - Camera模块结构体 - [CaptureEndedInfo](reference/hdi-apis/_capture_ended_info.md) - [CaptureErrorInfo](reference/hdi-apis/_capture_error_info.md) - [CaptureInfo](reference/hdi-apis/_capture_info.md) + - [ICameraDevice](reference/hdi-apis/interface_i_camera_device.md) + - [ICameraDeviceCallback](reference/hdi-apis/interface_i_camera_device_callback.md) + - [ICameraHost](reference/hdi-apis/interface_i_camera_host.md) + - [ICameraHostCallback](reference/hdi-apis/interface_i_camera_host_callback.md) + - [IOfflineStreamOperator](reference/hdi-apis/interface_i_offline_stream_operator.md) + - [IStreamOperator](reference/hdi-apis/interface_i_stream_operator.md) + - [IStreamOperatorCallback](reference/hdi-apis/interface_i_stream_operator_callback.md) + - [StreamAttribute](reference/hdi-apis/_stream_attribute.md) + - [StreamInfo](reference/hdi-apis/_stream_info.md) + - Codec模块结构体 + - [Alignment](reference/hdi-apis/_alignment.md) + - [AudioPortCap](reference/hdi-apis/_audio_port_cap.md) - [CodecCallbackType](reference/hdi-apis/_codec_callback_type.md) - [CodecCompCapability](reference/hdi-apis/_codec_comp_capability.md) - [CodecComponentManager](reference/hdi-apis/_codec_component_manager.md) - [CodecComponentType](reference/hdi-apis/_codec_component_type.md) - - [ColorValue](reference/hdi-apis/union_color_value.md) - [CompVerInfo](reference/hdi-apis/_comp_ver_info.md) - - [CredentialInfo](reference/hdi-apis/_credential_info.md) + - [EventInfo](reference/hdi-apis/_event_info.md) + - [GetBufferHandleUsageParams](reference/hdi-apis/_get_buffer_handle_usage_params.md) + - [OmxCodecBuffer](reference/hdi-apis/_omx_codec_buffer.md) + - [PortCap](reference/hdi-apis/union_port_cap.md) + - [RangeValue](reference/hdi-apis/_range_value.md) + - [Rect](reference/hdi-apis/_rect.md) + - [SupportBufferType](reference/hdi-apis/_support_buffer_type.md) + - [UseBufferType](reference/hdi-apis/_use_buffer_type.md) + - [VideoPortCap](reference/hdi-apis/_video_port_cap.md) + - Display模块结构体 + - [AllocInfo](reference/hdi-apis/_alloc_info.md) + - [BufferData](reference/hdi-apis/_buffer_data.md) - [DeviceFuncs](reference/hdi-apis/_device_funcs.md) - [DisplayCapability](reference/hdi-apis/_display_capability.md) - [DisplayInfo](reference/hdi-apis/_display_info.md) - [DisplayModeInfo](reference/hdi-apis/_display_mode_info.md) - - [EnrolledInfo](reference/hdi-apis/_enrolled_info.md) - - [EnrollParam](reference/hdi-apis/_enroll_param.md) - - [EnrollResultInfo](reference/hdi-apis/_enroll_resultinfo.md) - - [EventInfo](reference/hdi-apis/_event_info.md) - - [ExecutorInfo](reference/hdi-apis/_executor_info.md) - - [ExecutorInfo](reference/hdi-apis/_user_executor_info.md) - - [ExecutorRegisterInfo](reference/hdi-apis/_executor_register_info.md) - - [ExecutorSendMsg](reference/hdi-apis/_executor_send_msg.md) - - [GetBufferHandleUsageParams](reference/hdi-apis/_get_buffer_handle_usage_params.md) + - [ExtDataHandle](reference/hdi-apis/_ex_data_handle.md) - [GfxFuncs](reference/hdi-apis/_gfx_funcs.md) - [GfxOpt](reference/hdi-apis/_gfx_opt.md) - [GrallocFuncs](reference/hdi-apis/_gralloc_funcs.md) - - [HdfFeatureInfo](reference/hdi-apis/_hdf_feature_info.md) - - [HdfLightColor](reference/hdi-apis/_hdf_light_color.md) - - [HdfLightEffect](reference/hdi-apis/_hdf_light_effect.md) - - [HdfLightFlashEffect](reference/hdi-apis/_hdf_light_flash_effect.md) - - [HdfLightInfo](reference/hdi-apis/_hdf_light_info.md) - - [HdfMotionEvent](reference/hdi-apis/_hdf_motion_event.md) - - [HdfNetDeviceInfo](reference/hdi-apis/_hdf_net_device_info.md) - - [HdfNetDeviceInfoResult](reference/hdi-apis/_hdf_net_device_info_result.md) - - [HdfSensorEvents](reference/hdi-apis/_hdf_sensor_events.md) - - [HdfSensorInformation](reference/hdi-apis/_hdf_sensor_information.md) - - [HdfStaInfo](reference/hdi-apis/_hdf_sta_info.md) - - [HdfThermalCallbackInfo](reference/hdi-apis/_hdf_thermal_callback_info.md) - - [HdfVibratorInfo](reference/hdi-apis/_hdf_vibrator_info.md) - - [HdfWifiDriverScanSsid](reference/hdi-apis/_hdf_wifi_driver_scan_ssid.md) - - [HdfWifiInfo](reference/hdi-apis/_hdf_wifi_info.md) - - [HdfWifiScan](reference/hdi-apis/_hdf_wifi_scan.md) - - [HdfWifiScanResult](reference/hdi-apis/_hdf_wifi_scan_result.md) - [HDRCapability](reference/hdi-apis/_h_d_r_capability.md) - [HDRMetaData](reference/hdi-apis/_h_d_r_meta_data.md) - - [IActivityChangedCallback](reference/hdi-apis/interface_i_activity_changed_callback.md) - - [IActivityInterface](reference/hdi-apis/interface_i_activity_interface.md) - - [IBatteryCallback](reference/hdi-apis/interface_i_battery_callback.md) - - [IBatteryInterface](reference/hdi-apis/interface_i_battery_interface.md) - - [ICameraDevice](reference/hdi-apis/interface_i_camera_device.md) - - [ICameraDeviceCallback](reference/hdi-apis/interface_i_camera_device_callback.md) - - [ICameraHost](reference/hdi-apis/interface_i_camera_host.md) - - [ICameraHostCallback](reference/hdi-apis/interface_i_camera_host_callback.md) - [ICircle](reference/hdi-apis/_i_circle.md) - - [IdentifyResultInfo](reference/hdi-apis/_identify_result_info.md) - - [IExecutor](reference/hdi-apis/interface_i_executor.md) - - [IExecutor](reference/hdi-apis/interface_pin_i_executor.md) - - [IExecutorCallback](reference/hdi-apis/interface_i_executor_callback.md) - - [IExecutorCallback](reference/hdi-apis/interface_pin_i_executor_callback.md) - - [IFaceAuthInterface](reference/hdi-apis/interface_i_face_auth_interface.md) - [ILine](reference/hdi-apis/_i_line.md) - - [IInputInterface](reference/hdi-apis/_i_input_interface.md) - - [ILightInterface](reference/hdi-apis/interface_i_light_interface.md) - - [IMotionCallback](reference/hdi-apis/interface_i_motion_callback.md) - - [IMotionInterface](reference/hdi-apis/interface_i_motion_interface.md) - - [InputController](reference/hdi-apis/_input_controller.md) - - [InputDevAbility](reference/hdi-apis/_input_dev_ability.md) - - [InputDevAttr](reference/hdi-apis/_input_dev_attr.md) - - [InputDevDesc](reference/hdi-apis/_input_dev_desc.md) - - [InputDeviceInfo](reference/hdi-apis/_input_device_info.md) - - [InputDevIdentify](reference/hdi-apis/_input_dev_identify.md) - - [InputDimensionInfo](reference/hdi-apis/_input_dimension_info.md) - - [InputEventCb](reference/hdi-apis/_input_event_cb.md) - - [InputEventPackage](reference/hdi-apis/_input_event_package.md) - - [IPowerHdiCallback](reference/hdi-apis/interface_i_power_hdi_callback.md) - - [InputExtraCmd](reference/hdi-apis/_input_extra_cmd.md) - - [InputHostCb](reference/hdi-apis/_input_host_cb.md) - - [InputHotPlugEvent](reference/hdi-apis/_input_hot_plug_event.md) - - [InputManager](reference/hdi-apis/_input_manager.md) - - [InputReporter](reference/hdi-apis/_input_reporter.md) - - [IOfflineStreamOperator](reference/hdi-apis/interface_i_offline_stream_operator.md) - - [IPinAuthInterface](reference/hdi-apis/interface_i_pin_auth_interface.md) - - [IPowerInterface](reference/hdi-apis/interface_i_power_interface.md) - [IRect](reference/hdi-apis/_i_rect.md) - - [ISensorCallback](reference/hdi-apis/interface_i_sensor_callback.md) - - [ISensorInterface](reference/hdi-apis/interface_i_sensor_interface.md) - - [IStreamOperator](reference/hdi-apis/interface_i_stream_operator.md) - - [IStreamOperatorCallback](reference/hdi-apis/interface_i_stream_operator_callback.md) - [ISurface](reference/hdi-apis/_i_surface.md) - - [IThermalCallback](reference/hdi-apis/interface_i_thermal_callback.md) - - [IThermalInterface](reference/hdi-apis/interface_i_thermal_interface.md) - - [IUsbdBulkCallback](reference/hdi-apis/interface_i_usbd_bulk_callback.md) - - [IUsbdSubscriber](reference/hdi-apis/interface_i_usbd_subscriber.md) - - [IUsbInterface](reference/hdi-apis/interface_i_usb_interface.md) - - [IUserAuthInterface](reference/hdi-apis/interface_i_user_auth_interface.md) - - [IVibratorInterface](reference/hdi-apis/interface_i_vibrator_interface.md) - - [IWlanCallback](reference/hdi-apis/interface_i_wlan_callback.md) - - [IWlanInterface](reference/hdi-apis/interface_i_wlan_interface.md) - [LayerAlpha](reference/hdi-apis/_layer_alpha.md) - [LayerBuffer](reference/hdi-apis/_layer_buffer.md) - [LayerFuncs](reference/hdi-apis/_layer_funcs.md) - [LayerInfo](reference/hdi-apis/_layer_info.md) - - [MeasChannelParam](reference/hdi-apis/_meas_channel_param.md) - - [MeasChannelResult](reference/hdi-apis/_meas_channel_result.md) - - [OmxCodecBuffer](reference/hdi-apis/_omx_codec_buffer.md) - - [PortCap](reference/hdi-apis/union_port_cap.md) - - [PortInfo](reference/hdi-apis/_port_info.md) - [PresentTimestamp](reference/hdi-apis/_present_timestamp.md) - [PropertyObject](reference/hdi-apis/_property_object.md) - - [ProjectionScreenCmdParam](reference/hdi-apis/_projection_screen_cmd_param.md) - - [RangeValue](reference/hdi-apis/_range_value.md) - - [Rect](reference/hdi-apis/_rect.md) - [Rectangle](reference/hdi-apis/_rectangle.md) - - [RGBColor](reference/hdi-apis/_r_g_b_color.md) - - [ScheduleInfo](reference/hdi-apis/_schedule_info.md) - - [StreamAttribute](reference/hdi-apis/_stream_attribute.md) - - [StreamInfo](reference/hdi-apis/_stream_info.md) - - [SupportBufferType](reference/hdi-apis/_support_buffer_type.md) - - [TemplateInfo](reference/hdi-apis/_template_info.md) - - [ThermalZoneInfo](reference/hdi-apis/_thermal_zone_info.md) - - [UsbCtrlTransfer](reference/hdi-apis/_usb_ctrl_transfer.md) - - [UsbDev](reference/hdi-apis/_usb_dev.md) - - [USBDeviceInfo](reference/hdi-apis/_u_s_b_device_info.md) - - [UsbPipe](reference/hdi-apis/_usb_pipe.md) - - [UseBufferType](reference/hdi-apis/_use_buffer_type.md) - [VerifyAllocInfo](reference/hdi-apis/_verify_alloc_info.md) - [VGUBuffer](reference/hdi-apis/_v_g_u_buffer.md) - [VGUColorStop](reference/hdi-apis/_v_g_u_color_stop.md) @@ -834,9 +803,285 @@ - [VGUSolid](reference/hdi-apis/_v_g_u_solid.md) - [VGUStrokeAttr](reference/hdi-apis/_v_g_u_stroke_attr.md) - [VGUSurface](reference/hdi-apis/_v_g_u_surface.md) - - [VideoPortCap](reference/hdi-apis/_video_port_cap.md) + - [YUVDescInfo](reference/hdi-apis/_yuv_desc_info.md) + - HdfFaceAuth模块结构体 + - [ExecutorInfo](reference/hdi-apis/_executor_info_faceauth.md) + - [IExecutor](reference/hdi-apis/interface_i_executor_faceauth.md) + - [IExecutorCallback](reference/hdi-apis/interface_i_executor_callback_faceauth.md) + - [IFaceAuthInterface](reference/hdi-apis/interface_i_face_auth_interface.md) + - [TemplateInfo](reference/hdi-apis/_template_info_faceauth.md) + - HdfPinAuth模块结构体 + - [ExecutorInfo](reference/hdi-apis/_executor_info_pinauth.md) + - [IExecutor](reference/hdi-apis/interface_i_executor_pinauth.md) + - [IExecutorCallback](reference/hdi-apis/interface_i_executor_callback_pinauth.md) + - [IPinAuthInterface](reference/hdi-apis/interface_i_pin_auth_interface.md) + - [TemplateInfo](reference/hdi-apis/_template_info_pinauth.md) + - HdfUserAuth模块结构体 + - [AuthResultInfo](reference/hdi-apis/_auth_result_info.md) + - [AuthSolution](reference/hdi-apis/_auth_solution.md) + - [CredentialInfo](reference/hdi-apis/_credential_info.md) + - [EnrolledInfo](reference/hdi-apis/_enrolled_info.md) + - [EnrollParam](reference/hdi-apis/_enroll_param.md) + - [EnrollResultInfo](reference/hdi-apis/_enroll_result_info.md) + - [ExecutorInfo](reference/hdi-apis/_executor_info_userauth.md) + - [ExecutorRegisterInfo](reference/hdi-apis/_executor_register_info.md) + - [ExecutorSendMsg](reference/hdi-apis/_executor_send_msg.md) + - [IdentifyResultInfo](reference/hdi-apis/_identify_result_info.md) + - [IUserAuthInterface](reference/hdi-apis/interface_i_user_auth_interface.md) + - [ScheduleInfo](reference/hdi-apis/_schedule_info.md) + - HdiActivityRecognition模块结构体 + - [ActRecognitionEvent](reference/hdi-apis/_act_recognition_event.md) + - [IActivityChangedCallback](reference/hdi-apis/interface_i_activity_changed_callback.md) + - [IActivityInterface](reference/hdi-apis/interface_i_activity_interface.md) + - HdiLpfenceCellbatching模块结构体 + - [CellbatchingRequest](reference/hdi-apis/_cellbatching_request.md) + - [CellTrajectoryData](reference/hdi-apis/_cell_trajectory_data.md) + - [ICellbatchingCallback](reference/hdi-apis/interface_i_cellbatching_callback.md) + - [ICellbatchingInterface](reference/hdi-apis/interface_i_cellbatching_interface.md) + - HdiLpfenceCellfence模块结构体 + - [CellfenceInfo](reference/hdi-apis/_cellfence_info.md) + - [CellfenceRequest](reference/hdi-apis/_cellfence_request.md) + - [CellfenceSize](reference/hdi-apis/_cellfence_size.md) + - [CellfenceStatus](reference/hdi-apis/_cellfence_status.md) + - [ICellfenceCallback](reference/hdi-apis/interface_i_cellfence_callback.md) + - [ICellfenceInterface](reference/hdi-apis/interface_i_cellfence_interface.md) + - HdiLpfenceGeofence模块结构体 + - [CurrentCell](reference/hdi-apis/_current_cell.md) + - [GeofenceCellInfo](reference/hdi-apis/_geofence_cell_info.md) + - [GeofenceCircleRequest](reference/hdi-apis/_geofence_circle_request.md) + - [GeofencePolygonRequest](reference/hdi-apis/_geofence_polygon_request.md) + - [GeofenceResult](reference/hdi-apis/_geofence_result.md) + - [GeofenceSize](reference/hdi-apis/_geofence_size.md) + - [GeoLocationInfo](reference/hdi-apis/_geo_location_info.md) + - [IGeofenceCallback](reference/hdi-apis/interface_i_geofence_callback.md) + - [IGeofenceInterface](reference/hdi-apis/interface_i_geofence_interface.md) + - [NeighborCell](reference/hdi-apis/_neighbor_cell.md) + - [OfflineDb](reference/hdi-apis/_offline_db.md) + - [Point](reference/hdi-apis/_point.md) + - [RequestCellDb](reference/hdi-apis/_request_cell_db.md) + - HdiLpfenceWififence模块结构体 + - [IWififenceCallback](reference/hdi-apis/interface_i_wififence_callback.md) + - [IWififenceInterface](reference/hdi-apis/interface_i_wififence_interface.md) + - [WififenceRequest](reference/hdi-apis/_wififence_request.md) + - [WififenceSize](reference/hdi-apis/_wififence_size.md) + - Input模块结构体 + - [IInputInterface](reference/hdi-apis/_i_input_interface.md) + - [InputController](reference/hdi-apis/_input_controller.md) + - [InputDevAbility](reference/hdi-apis/_input_dev_ability.md) + - [InputDevAttr](reference/hdi-apis/_input_dev_attr.md) + - [InputDevDesc](reference/hdi-apis/_input_dev_desc.md) + - [InputDeviceInfo](reference/hdi-apis/_input_device_info.md) + - [InputDevIdentify](reference/hdi-apis/_input_dev_identify.md) + - [InputDimensionInfo](reference/hdi-apis/_input_dimension_info.md) + - [InputEventCb](reference/hdi-apis/_input_event_cb.md) + - [InputEventPackage](reference/hdi-apis/_input_event_package.md) + - [InputExtraCmd](reference/hdi-apis/_input_extra_cmd.md) + - [InputHostCb](reference/hdi-apis/_input_host_cb.md) + - [InputHotPlugEvent](reference/hdi-apis/_input_hot_plug_event.md) + - [InputManager](reference/hdi-apis/_input_manager.md) + - [InputReporter](reference/hdi-apis/_input_reporter.md) + - Light模块结构体 + - [ColorValue](reference/hdi-apis/union_color_value.md) + - [HdfLightColor](reference/hdi-apis/_hdf_light_color.md) + - [HdfLightEffect](reference/hdi-apis/_hdf_light_effect.md) + - [HdfLightFlashEffect](reference/hdi-apis/_hdf_light_flash_effect.md) + - [HdfLightInfo](reference/hdi-apis/_hdf_light_info.md) + - [ILightInterface](reference/hdi-apis/interface_i_light_interface.md) + - [RGBColor](reference/hdi-apis/_r_g_b_color.md) + - [WRGBColor](reference/hdi-apis/_w_r_g_b_color.md) + - Motion模块结构体 + - [HdfMotionEvent](reference/hdi-apis/_hdf_motion_event.md) + - [IMotionCallback](reference/hdi-apis/interface_i_motion_callback.md) + - [IMotionInterface](reference/hdi-apis/interface_i_motion_interface.md) + - NNRt模块结构体 + - [Activation](reference/hdi-apis/_activation.md) + - [AddFusion](reference/hdi-apis/_add_fusion.md) + - [ArgMaxFusion](reference/hdi-apis/_arg_max_fusion.md) + - [AvgPoolFusion](reference/hdi-apis/_avg_pool_fusion.md) + - [BatchToSpaceND](reference/hdi-apis/_batch_to_space_n_d.md) + - [BiasAdd](reference/hdi-apis/_bias_add.md) + - [Cast](reference/hdi-apis/_cast.md) + - [Concat](reference/hdi-apis/_concat.md) + - [Conv2DFusion](reference/hdi-apis/_conv2_d_fusion.md) + - [Conv2dTransposeFusion](reference/hdi-apis/_conv2d_transpose_fusion.md) + - [DivFusion](reference/hdi-apis/_div_fusion.md) + - [Eltwise](reference/hdi-apis/_eltwise.md) + - [ExpandDims](reference/hdi-apis/_expand_dims.md) + - [Fill](reference/hdi-apis/_fill.md) + - [FullConnection](reference/hdi-apis/_full_connection.md) + - [FusedBatchNorm](reference/hdi-apis/_fused_batch_norm.md) + - [Gather](reference/hdi-apis/_gather.md) + - [INnrtDevice](reference/hdi-apis/interface_i_nnrt_device.md) + - [IOTensor](reference/hdi-apis/_i_o_tensor.md) + - [IPreparedModel](reference/hdi-apis/interface_i_prepared_model.md) + - [LayerNormFusion](reference/hdi-apis/_layer_norm_fusion.md) + - [LessEqual](reference/hdi-apis/_less_equal.md) + - [MatMulFusion](reference/hdi-apis/_mat_mul_fusion.md) + - [Maximum](reference/hdi-apis/_maximum.md) + - [MaxPoolFusion](reference/hdi-apis/_max_pool_fusion.md) + - [Model](reference/hdi-apis/_model.md) + - [ModelConfig](reference/hdi-apis/_model_config.md) + - [MulFusion](reference/hdi-apis/_mul_fusion.md) + - [Node](reference/hdi-apis/_node.md) + - [OneHot](reference/hdi-apis/_one_hot.md) + - [PadFusion](reference/hdi-apis/_pad_fusion.md) + - [PowFusion](reference/hdi-apis/_pow_fusion.md) + - [PReLUFusion](reference/hdi-apis/_p_re_l_u_fusion.md) + - [QuantDTypeCast](reference/hdi-apis/_quant_d_type_cast.md) + - [QuantParam](reference/hdi-apis/_quant_param.md) + - [ReduceFusion](reference/hdi-apis/_reduce_fusion.md) + - [Reshape](reference/hdi-apis/_reshape.md) + - [Resize](reference/hdi-apis/_resize.md) + - [Rsqrt](reference/hdi-apis/_rsqrt.md) + - [ScaleFusion](reference/hdi-apis/_scale_fusion.md) + - [Shape](reference/hdi-apis/_shape.md) + - [SharedBuffer](reference/hdi-apis/_shared_buffer.md) + - [SliceFusion](reference/hdi-apis/_slice_fusion.md) + - [Softmax](reference/hdi-apis/_softmax.md) + - [SpaceToBatchND](reference/hdi-apis/_space_to_batch_n_d.md) + - [Split](reference/hdi-apis/_split.md) + - [Sqrt](reference/hdi-apis/_sqrt.md) + - [SquaredDifference](reference/hdi-apis/_squared_difference.md) + - [Squeeze](reference/hdi-apis/_squeeze.md) + - [Stack](reference/hdi-apis/_stack.md) + - [StridedSlice](reference/hdi-apis/_strided_slice.md) + - [SubFusion](reference/hdi-apis/_sub_fusion.md) + - [SubGraph](reference/hdi-apis/_sub_graph.md) + - [Tensor](reference/hdi-apis/_tensor.md) + - [TileFusion](reference/hdi-apis/_tile_fusion.md) + - [TopKFusion](reference/hdi-apis/_top_k_fusion.md) + - [Transpose](reference/hdi-apis/_transpose.md) + - [Unsqueeze](reference/hdi-apis/_unsqueeze.md) + - Power模块结构体 + - [IPowerHdiCallback](reference/hdi-apis/interface_i_power_hdi_callback.md) + - [IPowerInterface](reference/hdi-apis/interface_i_power_interface.md) + - Ril模块结构体 + - [ApduSimIORequestInfo](reference/hdi-apis/_apdu_sim_i_o_request_info.md) + - [AvailableNetworkInfo](reference/hdi-apis/_available_network_info.md) + - [AvailableNetworkList](reference/hdi-apis/_available_network_list.md) + - [CallForwardQueryInfoList](reference/hdi-apis/_call_forward_query_info_list.md) + - [CallForwardQueryResult](reference/hdi-apis/_call_forward_query_result.md) + - [CallForwardSetInfo](reference/hdi-apis/_call_forward_set_info.md) + - [CallInfo](reference/hdi-apis/_call_info.md) + - [CallInfoList](reference/hdi-apis/_call_info_list.md) + - [CallRestrictionInfo](reference/hdi-apis/_call_restriction_info.md) + - [CallRestrictionResult](reference/hdi-apis/_call_restriction_result.md) + - [CallWaitResult](reference/hdi-apis/_call_wait_result.md) + - [CardStatusInfo](reference/hdi-apis/_card_status_info.md) + - [CBConfigInfo](reference/hdi-apis/_c_b_config_info.md) + - [CBConfigReportInfo](reference/hdi-apis/_c_b_config_report_info.md) + - [CdmaCBConfigInfo](reference/hdi-apis/_cdma_c_b_config_info.md) + - [CdmaCBConfigInfoList](reference/hdi-apis/_cdma_c_b_config_info_list.md) + - [CdmaRssi](reference/hdi-apis/_cdma_rssi.md) + - [CellListCurrentInfo](reference/hdi-apis/_cell_list_current_info.md) + - [CellListNearbyInfo](reference/hdi-apis/_cell_list_nearby_info.md) + - [CellListRatCdma](reference/hdi-apis/_cell_list_rat_cdma.md) + - [CellListRatGsm](reference/hdi-apis/_cell_list_rat_gsm.md) + - [CellListRatLte](reference/hdi-apis/_cell_list_rat_lte.md) + - [CellListRatNr](reference/hdi-apis/_cell_list_rat_nr.md) + - [CellListRatTdscdma](reference/hdi-apis/_cell_list_rat_tdscdma.md) + - [CellListRatWcdma](reference/hdi-apis/_cell_list_rat_wcdma.md) + - [CellNearbyInfo](reference/hdi-apis/_cell_nearby_info.md) + - [CellRatCdma](reference/hdi-apis/_cell_rat_cdma.md) + - [CellRatGsm](reference/hdi-apis/_cell_rat_gsm.md) + - [CellRatLte](reference/hdi-apis/_cell_rat_lte.md) + - [CellRatNr](reference/hdi-apis/_cell_rat_nr.md) + - [CellRatTdscdma](reference/hdi-apis/_cell_rat_tdscdma.md) + - [CellRatWcdma](reference/hdi-apis/_cell_rat_wcdma.md) + - [ChannelConfigInfoList](reference/hdi-apis/_channel_config_info_list.md) + - [CsRegStatusInfo](reference/hdi-apis/_cs_reg_status_info.md) + - [CurrentCellInfo](reference/hdi-apis/_current_cell_info.md) + - [CurrentServiceCellParas](reference/hdi-apis/union_current_service_cell_paras.md) + - [DataCallInfo](reference/hdi-apis/_data_call_info.md) + - [DataCallResultList](reference/hdi-apis/_data_call_result_list.md) + - [DataLinkBandwidthInfo](reference/hdi-apis/_data_link_bandwidth_info.md) + - [DataLinkBandwidthReportingRule](reference/hdi-apis/_data_link_bandwidth_reporting_rule.md) + - [DataPerformanceInfo](reference/hdi-apis/_data_performance_info.md) + - [DataProfileDataInfo](reference/hdi-apis/_data_profile_data_info.md) + - [DataProfilesInfo](reference/hdi-apis/_data_profiles_info.md) + - [DataSleepInfo](reference/hdi-apis/_data_sleep_info.md) + - [DialInfo](reference/hdi-apis/_dial_info.md) + - [DtmfInfo](reference/hdi-apis/_dtmf_info.md) + - [EmergencyCall](reference/hdi-apis/_emergency_call.md) + - [EmergencyInfoList](reference/hdi-apis/_emergency_info_list.md) + - [GetClipResult](reference/hdi-apis/_get_clip_result.md) + - [GetClirResult](reference/hdi-apis/_get_clir_result.md) + - [GsmRssi](reference/hdi-apis/_gsm_rssi.md) + - [GsmSmsMessageInfo](reference/hdi-apis/_gsm_sms_message_info.md) + - [IccIoResultInfo](reference/hdi-apis/_icc_io_result_info.md) + - [IRil](reference/hdi-apis/interface_i_ril.md) + - [IRilCallback](reference/hdi-apis/interface_i_ril_callback.md) + - [LockStatusResp](reference/hdi-apis/_lock_status_resp.md) + - [LteRssi](reference/hdi-apis/_lte_rssi.md) + - [ModeData](reference/hdi-apis/_mode_data.md) + - [NrRssi](reference/hdi-apis/_nr_rssi.md) + - [OpenLogicalChannelResponse](reference/hdi-apis/_open_logical_channel_response.md) + - [OperatorInfo](reference/hdi-apis/_operator_info.md) + - [PhysicalChannelConfig](reference/hdi-apis/_physical_channel_config.md) + - [PreferredNetworkTypeInfo](reference/hdi-apis/_preferred_network_type_info.md) + - [PsRegStatusInfo](reference/hdi-apis/_ps_reg_status_info.md) + - [RadioProtocol](reference/hdi-apis/_radio_protocol.md) + - [RilRadioResponseInfo](reference/hdi-apis/_ril_radio_response_info.md) + - [RingbackVoice](reference/hdi-apis/_ringback_voice.md) + - [Rssi](reference/hdi-apis/_rssi.md) + - [SendCdmaSmsMessageInfo](reference/hdi-apis/_send_cdma_sms_message_info.md) + - [SendSmsResultInfo](reference/hdi-apis/_send_sms_result_info.md) + - [ServiceCellParas](reference/hdi-apis/union_service_cell_paras.md) + - [ServiceCenterAddress](reference/hdi-apis/_service_center_address.md) + - [SetBarringInfo](reference/hdi-apis/_set_barring_info.md) + - [SetNetworkModeInfo](reference/hdi-apis/_set_network_mode_info.md) + - [SetupDataCallResultInfo](reference/hdi-apis/_setup_data_call_result_info.md) + - [SimAuthenticationRequestInfo](reference/hdi-apis/_sim_authentication_request_info.md) + - [SimIoRequestInfo](reference/hdi-apis/_sim_io_request_info.md) + - [SimLockInfo](reference/hdi-apis/_sim_lock_info.md) + - [SimPasswordInfo](reference/hdi-apis/_sim_password_info.md) + - [SimPinInputTimes](reference/hdi-apis/_sim_pin_input_times.md) + - [SmsMessageInfo](reference/hdi-apis/_sms_message_info.md) + - [SmsMessageIOInfo](reference/hdi-apis/_sms_message_i_o_info.md) + - [SrvccStatus](reference/hdi-apis/_srvcc_status.md) + - [SsNoticeInfo](reference/hdi-apis/_ss_notice_info.md) + - [TdScdmaRssi](reference/hdi-apis/_td_scdma_rssi.md) + - [UniInfo](reference/hdi-apis/_uni_info.md) + - [UssdNoticeInfo](reference/hdi-apis/_ussd_notice_info.md) + - [VoiceRadioTechnology](reference/hdi-apis/_voice_radio_technology.md) + - [WcdmaRssi](reference/hdi-apis/_wcdma_rssi.md) + - Sensor模块结构体 + - [HdfSensorEvents](reference/hdi-apis/_hdf_sensor_events.md) + - [HdfSensorInformation](reference/hdi-apis/_hdf_sensor_information.md) + - [ISensorCallback](reference/hdi-apis/interface_i_sensor_callback.md) + - [ISensorInterface](reference/hdi-apis/interface_i_sensor_interface.md) + - Thermal模块结构体 + - [HdfThermalCallbackInfo](reference/hdi-apis/_hdf_thermal_callback_info.md) + - [IThermalCallback](reference/hdi-apis/interface_i_thermal_callback.md) + - [IThermalInterface](reference/hdi-apis/interface_i_thermal_interface.md) + - [ThermalZoneInfo](reference/hdi-apis/_thermal_zone_info.md) + - USB模块结构体 + - [IUsbdBulkCallback](reference/hdi-apis/interface_i_usbd_bulk_callback.md) + - [IUsbdSubscriber](reference/hdi-apis/interface_i_usbd_subscriber.md) + - [IUsbInterface](reference/hdi-apis/interface_i_usb_interface.md) + - [PortInfo](reference/hdi-apis/_port_info.md) + - [UsbCtrlTransfer](reference/hdi-apis/_usb_ctrl_transfer.md) + - [UsbDev](reference/hdi-apis/_usb_dev.md) + - [USBDeviceInfo](reference/hdi-apis/_u_s_b_device_info.md) + - [UsbPipe](reference/hdi-apis/_usb_pipe.md) + - Vibrator模块结构体 + - [HdfVibratorInfo](reference/hdi-apis/_hdf_vibrator_info.md) + - [IVibratorInterface](reference/hdi-apis/interface_i_vibrator_interface.md) + - WLAN模块结构体 + - [HdfFeatureInfo](reference/hdi-apis/_hdf_feature_info.md) + - [HdfNetDeviceInfo](reference/hdi-apis/_hdf_net_device_info.md) + - [HdfNetDeviceInfoResult](reference/hdi-apis/_hdf_net_device_info_result.md) + - [HdfStaInfo](reference/hdi-apis/_hdf_sta_info.md) + - [HdfWifiDriverScanSsid](reference/hdi-apis/_hdf_wifi_driver_scan_ssid.md) + - [HdfWifiInfo](reference/hdi-apis/_hdf_wifi_info.md) + - [HdfWifiScan](reference/hdi-apis/_hdf_wifi_scan.md) + - [HdfWifiScanResult](reference/hdi-apis/_hdf_wifi_scan_result.md) + - [IWlanCallback](reference/hdi-apis/interface_i_wlan_callback.md) + - [IWlanInterface](reference/hdi-apis/interface_i_wlan_interface.md) + - [MeasChannelParam](reference/hdi-apis/_meas_channel_param.md) + - [MeasChannelResult](reference/hdi-apis/_meas_channel_result.md) + - [ProjectionScreenCmdParam](reference/hdi-apis/_projection_screen_cmd_param.md) - [WifiStationInfo](reference/hdi-apis/_wifi_station_info.md) - - [WRGBColor](reference/hdi-apis/_w_r_g_b_color.md) - CMSIS API参考 - [CMSIS](reference/kernel/cmsis/_c_m_s_i_s-_r_t_o_s.md) - 结构体