Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
39cf8419
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
39cf8419
编写于
9月 06, 2023
作者:
O
openharmony_ci
提交者:
Gitee
9月 06, 2023
浏览文件
操作
浏览文件
下载
差异文件
!24075 【master】分布式硬件(设备管理)ArkTs适配
Merge pull request !24075 from qinlong/master
上级
39d482e8
cae03386
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
59 addition
and
20 deletion
+59
-20
zh-cn/application-dev/reference/apis/js-apis-device-manager.md
.../application-dev/reference/apis/js-apis-device-manager.md
+35
-16
zh-cn/application-dev/reference/apis/js-apis-distributedDeviceManager.md
...on-dev/reference/apis/js-apis-distributedDeviceManager.md
+24
-4
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-device-manager.md
浏览文件 @
39cf8419
...
...
@@ -1186,20 +1186,19 @@ importCredential(credentialInfo: string, callback: AsyncCallback<{resultInfo: st
deviceId
:
string
,
version
:
string
,
devicePk
:
string
,
credentialData
:
CredentialData
[]
credentialData
:
CredentialData
}
let
credentialData
:
CredentialData
=
{
credentialType
:
2
,
credentialId
:
"
102
"
,
serverPk
:
"
3059301306072A8648CE3D020106082A8648CE3D03
"
,
pkInfoSignature
:
"
30440220490BCB4F822004C9A76AB8D97F80041FC0E
"
,
pkInfo
:
""
,
authCode
:
""
,
peerDeviceId
:
""
}
let
credentialData
:
CredentialData
=
[
{
credentialType
:
2
,
credentialId
:
"
102
"
,
serverPk
:
"
3059301306072A8648CE3D020106082A8648CE3D03
"
,
pkInfoSignature
:
"
30440220490BCB4F822004C9A76AB8D97F80041FC0E
"
,
pkInfo
:
""
,
authCode
:
""
,
peerDeviceId
:
""
}
]
let
credentialInfo
:
CredentialInfo
=
{
processType
:
1
,
...
...
@@ -1375,7 +1374,14 @@ on(type: 'deviceStateChange', callback: Callback<{ action: DeviceStateChange
class
Data
{
action
:
deviceManager
.
DeviceStateChangeAction
=
0
device
:
deviceManager
.
DeviceInfo
=
{}
device
:
deviceManager
.
DeviceInfo
=
{
deviceId
:
""
,
deviceName
:
""
,
deviceType
:
0
,
networkId
:
""
,
range
:
0
,
authForm
:
0
,
}
}
try
{
...
...
@@ -1413,7 +1419,14 @@ off(type: 'deviceStateChange', callback?: Callback<{ action: DeviceStateChang
class
Data
{
action
:
deviceManager
.
DeviceStateChangeAction
=
0
device
:
deviceManager
.
DeviceInfo
=
{}
device
:
deviceManager
.
DeviceInfo
=
{
deviceId
:
""
,
deviceName
:
""
,
deviceType
:
0
,
networkId
:
""
,
range
:
0
,
authForm
:
0
,
}
}
try
{
...
...
@@ -1454,7 +1467,6 @@ on(type: 'deviceFound', callback: Callback<{ subscribeId: number, device: Dev
device
:
deviceManager
.
DeviceInfo
=
{}
}
subscribeId
:
number
,
device
:
DeviceInfo
try
{
dmInstance
.
on
(
'
deviceFound
'
,
(
data
:
Data
)
=>
{
console
.
info
(
"
deviceFound:
"
+
JSON
.
stringify
(
data
));
...
...
@@ -1490,7 +1502,14 @@ off(type: 'deviceFound', callback?: Callback<{ subscribeId: number, device: D
class
Data
{
subscribeId
:
number
=
0
device
:
deviceManager
.
DeviceInfo
=
{}
device
:
deviceManager
.
DeviceInfo
=
{
deviceId
:
""
,
deviceName
:
""
,
deviceType
:
0
,
networkId
:
""
,
range
:
0
,
authForm
:
0
,
}
}
try
{
...
...
zh-cn/application-dev/reference/apis/js-apis-distributedDeviceManager.md
浏览文件 @
39cf8419
...
...
@@ -828,7 +828,12 @@ on(type: 'deviceStateChange', callback: Callback<{ action: DeviceStateChange,
class
Data
{
action
:
deviceManager
.
DeviceStateChange
=
0
device
:
deviceManager
.
DeviceBasicInfo
=
{}
device
:
deviceManager
.
DeviceBasicInfo
=
{
deviceId
:
""
,
deviceName
:
""
,
deviceType
:
""
,
networkId
:
""
,
}
}
try
{
...
...
@@ -866,7 +871,12 @@ off(type: 'deviceStateChange', callback?: Callback<{ action: DeviceStateChang
class
Data
{
action
:
deviceManager
.
DeviceStateChange
=
0
device
:
deviceManager
.
DeviceBasicInfo
=
{}
device
:
deviceManager
.
DeviceBasicInfo
=
{
deviceId
:
""
,
deviceName
:
""
,
deviceType
:
""
,
networkId
:
""
,
}
}
try
{
...
...
@@ -903,7 +913,12 @@ on(type: 'discoverSuccess', callback: Callback<{ device: DeviceBasicInfo }>
import
{
BusinessError
}
from
'
@ohos.base
'
class
Data
{
device
:
deviceManager
.
DeviceBasicInfo
=
{}
device
:
deviceManager
.
DeviceBasicInfo
=
{
deviceId
:
""
,
deviceName
:
""
,
deviceType
:
""
,
networkId
:
""
,
}
}
try
{
...
...
@@ -940,7 +955,12 @@ off(type: 'discoverSuccess', callback?: Callback<{ device: DeviceBasicInfo }&
import
{
BusinessError
}
from
'
@ohos.base
'
class
Data
{
device
:
deviceManager
.
DeviceBasicInfo
=
{}
device
:
deviceManager
.
DeviceBasicInfo
=
{
deviceId
:
""
,
deviceName
:
""
,
deviceType
:
""
,
networkId
:
""
,
}
}
try
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录