Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
k-sdk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈伟灿
k-sdk
Commits
f66ee384
Commit
f66ee384
authored
Oct 22, 2020
by
陈伟灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'yjq' into 'master'
将read rsp转换为物模型格式上报 See merge request chenweican/k-sdk!53
parents
04d09cfe
b7f0c6d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.c
...m/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.c
+1
-0
platform/zigbee/app/builder/Z3GatewayHost/rpc_api/src/rpc_interface_parse.c
...p/builder/Z3GatewayHost/rpc_api/src/rpc_interface_parse.c
+7
-4
No files found.
platform/zigbee/app/builder/Z3GatewayHost/ZB/kk_device_manager.c
View file @
f66ee384
...
...
@@ -133,6 +133,7 @@ void kk_read_attr_response(EmberNodeId nodeId,
}
kk_colorlight_attr_read
(
nodeId
,
ep
,
cluster
,
attribute
,
status
,
dataType
,
dataSize
,
data
);
}
void
emberAfPluginDeviceTableNewDeviceCallback
(
EmberEUI64
nodeEui64
)
{
...
...
platform/zigbee/app/builder/Z3GatewayHost/rpc_api/src/rpc_interface_parse.c
View file @
f66ee384
...
...
@@ -845,6 +845,7 @@ bool rpc_ReadAttributesResponseCallback(EmberAfClusterId clusterId,
uint8_t
*
bufferTemp
;
uint8_t
*
bufferPtr
=
buffer
;
uint8_t
i
,
bufferSize
,
typeSize
;
uint8_t
dataType
;
EmberAfAttributeId
attributeId
;
uint8_t
cnt
=
1
;
uint8_t
Status
;
...
...
@@ -882,16 +883,16 @@ bool rpc_ReadAttributesResponseCallback(EmberAfClusterId clusterId,
if
(
Status
==
EMBER_ZCL_STATUS_SUCCESS
){
if
(
emberAfIsStringAttributeType
(
bufferPtr
[
3
])){
dataType
=
bufferPtr
[
3
];
if
(
emberAfIsStringAttributeType
(
dataType
)){
bufferSize
=
bufferPtr
[
4
];
typeSize
=
1
;
}
else
if
(
emberAfIsLongStringAttributeType
(
bufferPtr
[
3
]
)){
}
else
if
(
emberAfIsLongStringAttributeType
(
dataType
)){
bufferSize
=
HIGH_LOW_TO_INT
(
bufferPtr
[
5
],
bufferPtr
[
4
]);
typeSize
=
2
;
}
else
{
typeSize
=
0
;
bufferSize
=
emberAfGetDataSize
(
bufferPtr
[
3
]);
bufferSize
=
emberAfGetDataSize
(
dataType
);
}
bufferSize
=
bufferSize
+
4
+
typeSize
;
bufferTemp
=
(
uint8_t
*
)
malloc
(
bufferSize
);
...
...
@@ -920,6 +921,8 @@ bool rpc_ReadAttributesResponseCallback(EmberAfClusterId clusterId,
uint8_t
*
dataPtr
=
&
bufferTemp
[
ATTRIBUTE_BUFFER_REPORT_DATA_TYPE
+
1
+
1
+
typeSize
];
rpc_cJSON_AddDataToObject
(
item_attr
,
dataPtr
,
dataLen
);
kk_device_config_item_report
(
nodeEui64
,
ep
,
clusterId
,
attributeId
,
dataType
,
dataLen
,
dataPtr
);
kk_read_attr_response
(
nodeId
,
ep
,
clusterId
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment