Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
Z
zap
管理
动态
成员
标记
计划
议题
议题看板
里程碑
迭代
Wiki
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
锁定的文件
构建
流水线
作业
流水线计划
产物
部署
发布
Package registry
容器镜像库
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
代码评审分析
议题分析
模型实验
效能分析
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
esp-mirror
project-chip
zap
提交
4043c97f
提交
4043c97f
编辑于
2 years ago
作者:
Bharat Dandu
提交者:
Bharat Raju
2 years ago
浏览文件
操作
下载
补丁
差异文件
Adding tests for custom xml removal in the case of cluster extensions for standard clusters
Github: ZAP#698
上级
615ca9d5
No related branches found
No related tags found
无相关合并请求
变更
2
隐藏空白变更内容
行内
左右并排
显示
2 个更改的文件
test/gen-zigbee-2.test.js
+36
-0
36 个添加, 0 个删除
test/gen-zigbee-2.test.js
test/resource/custom-cluster/custom-dut.xml
+11
-0
11 个添加, 0 个删除
test/resource/custom-cluster/custom-dut.xml
有
47 个添加
和
0 个删除
test/gen-zigbee-2.test.js
+
36
−
0
浏览文件 @
4043c97f
...
...
@@ -324,6 +324,11 @@ test(
expect
(
commands
).
toContain
(
'
#define emberAfFillCommandCustomClusterC13
'
)
expect
(
commands
).
toContain
(
'
ZCL_C13_COMMAND_ID
'
)
// Test custom command coming from standard cluster extensions(identify cluster extension)
expect
(
commands
).
toContain
(
'
#define emberAfFillCommandIdentifyClusterSampleMfgSpecificIdentifyCommand1
'
)
// Test command structs genereted
let
structs
=
genResult
.
content
[
'
zap-command-structs.h
'
]
expect
(
structs
).
toContain
(
...
...
@@ -336,6 +341,37 @@ test(
expect
(
ids
).
toContain
(
'
#define ZCL_C15_COMMAND_ID (0x03)
'
)
expect
(
ids
).
toContain
(
'
#define ZCL_A8_ATTRIBUTE_ID (0x0301)
'
)
expect
(
ids
).
toContain
(
'
#define ZCL_C11_COMMAND_ID (0x0A)
'
)
// Test custom attributes coming from standard cluster extensions(identify cluster extension)
expect
(
ids
).
toContain
(
'
#define ZCL_SAMPLE_MFG_SPECIFIC_IDENTIFY_1_ATTRIBUTE_ID (0x0000)
'
)
// Delete the custom xml packageId from the existing session and test generation again
await
queryPackage
.
deleteSessionPackage
(
db
,
sessionId
,
result
.
packageId
)
// Generate again after removing a custom xml file
genResult
=
await
genEngine
.
generate
(
db
,
sessionId
,
templateContext
.
packageId
,
{},
{
disableDeprecationWarnings
:
true
,
}
)
ids
=
genResult
.
content
[
'
zap-id.h
'
]
commands
=
genResult
.
content
[
'
zap-command-ver-2.h
'
]
// Test custom attributes removal coming from standard cluster extensions(identify cluster extension)
expect
(
ids
).
not
.
toContain
(
'
#define ZCL_SAMPLE_MFG_SPECIFIC_IDENTIFY_1_ATTRIBUTE_ID (0x0000)
'
)
// Test custom command removal coming from standard cluster extensions(identify cluster extension)
expect
(
commands
).
not
.
toContain
(
'
#define emberAfFillCommandIdentifyClusterSampleMfgSpecificIdentifyCommand1
'
)
},
testUtil
.
timeout
.
long
()
)
此差异已折叠。
点击以展开。
test/resource/custom-cluster/custom-dut.xml
+
11
−
0
浏览文件 @
4043c97f
...
...
@@ -293,4 +293,15 @@
<arg
name=
"arg3"
type=
"INT32S"
/>
</command>
</cluster>
<!-- Use the cluster extension to extend the identify cluster(Standard Cluster) -->
<clusterExtension
code=
"0x0003"
>
<attribute
side=
"server"
code=
"0x0000"
define=
"SAMPLE_MFG_SPECIFIC_IDENTIFY_1"
type=
"INT8U"
min=
"0x0000"
max=
"0xFFFF"
writable=
"true"
default=
"0x0000"
optional=
"true"
manufacturerCode=
"0xABCD"
>
Sample Mfg Specific Attribute: 0x0000 0xABCD
</attribute>
<attribute
side=
"server"
code=
"0x0001"
define=
"SAMPLE_MFG_SPECIFIC_IDENTIFY_2"
type=
"INT16U"
min=
"0x0000"
max=
"0xFFFF"
writable=
"true"
default=
"0x0000"
optional=
"true"
manufacturerCode=
"0xABCD"
>
Sample Mfg Specific Attribute: 0x0001 0x1040
</attribute>
<command
source=
"client"
code=
"0x01"
name=
"SampleMfgSpecificIdentifyCommand1"
optional=
"true"
manufacturerCode=
"0xABCD"
>
<description>
Command Extension 1
</description>
</command>
<command
source=
"client"
code=
"0x02"
name=
"SampleMfgSpecificIdentifyCommand2"
optional=
"true"
manufacturerCode=
"0xABCD"
>
<description>
Command Extension 2
</description>
</command>
</clusterExtension>
</configurator>
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录