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
97630633
Commit
97630633
authored
Aug 31, 2020
by
尹佳钦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加打印信息
parent
7a7f6abb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
platform/zigbee/app/builder/Z3GatewayHost/kk_test.c
platform/zigbee/app/builder/Z3GatewayHost/kk_test.c
+9
-5
platform/zigbee/app/builder/Z3GatewayHost/rpc_api/src/rpc_interface_parse.c
...p/builder/Z3GatewayHost/rpc_api/src/rpc_interface_parse.c
+2
-0
No files found.
platform/zigbee/app/builder/Z3GatewayHost/kk_test.c
View file @
97630633
...
...
@@ -92,8 +92,9 @@ int kk_sendData2CCU(char* data, int len){
void
kk_rpc_reportDevices
(
EmberEUI64
mac
)
{
cJSON
*
devicesJson
;
//EmberEUI64 testMac = {0x4A,0x83,0xD3,0xFE,0xFF,0x81,0x8E,0x58};
EmberEUI64
testMac_GW
=
{
0x88
,
0x77
,
0x66
,
0x55
,
0x44
,
0x33
,
0x22
,
0x11
};
EmberEUI64
eui64
;
emberAfGetEui64
(
eui64
);
char
macString
[
19
]
=
{
0
};
devicesJson
=
rpc_cJSON_CreateObject
();
...
...
@@ -101,8 +102,9 @@ void kk_rpc_reportDevices(EmberEUI64 mac)
rpc_cJSON_AddStringToObject
(
devicesJson
,
"productCode"
,
TEST_PRODUCT_CODE
);
rpc_cJSON_AddStringToObject
(
devicesJson
,
"deviceCode"
,
macString
);
rpc_cJSON_AddStringToObject
(
devicesJson
,
"mac"
,
macString
);
//
kk_sub_tsl_add
(
mac
,
TEST_PRODUCT_CODE
);
kk_rpc_report_devices
(
devicesJson
,
testMac_GW
);
kk_rpc_report_devices
(
devicesJson
,
eui64
);
}
...
...
@@ -636,13 +638,15 @@ void kk_dispatch_report_attribute(EmberEUI64 eui64,
uint8_t
len
,
uint8_t
*
data
)
{
emberAfAppPrintln
(
"kk_dispatch_report_attribute"
);
int
i
,
j
,
result
;
kk_tsl_zigbee_map_t
*
device_item
;
kk_zigbee_ctrl_map_t
*
report_item
;
for
(
i
=
0
;
i
<
PROPERTIES_MAX_NUM
;
i
++
){
device_item
=
&
g_tsl_zigbee_map
[
i
];
report_item
=
&
device_item
[
i
].
zigbee_ctrl
;
for
(
j
=
0
;
j
<
device_item
[
i
].
num
;
j
++
){
report_item
=
&
device_item
->
zigbee_ctrl
;
for
(
j
=
0
;
j
<
device_item
->
num
;
j
++
){
if
(
report_item
[
j
].
clusterId
==
clusterId
&&
report_item
[
j
].
attributeId
==
attributeId
){
emberAfAppPrintln
(
"i=%d,j=%d"
,
i
,
j
);
...
...
platform/zigbee/app/builder/Z3GatewayHost/rpc_api/src/rpc_interface_parse.c
View file @
97630633
...
...
@@ -628,8 +628,10 @@ bool rpc_ReportAttributesCallback(EmberAfClusterId clusterId,
attributeId
=
HIGH_LOW_TO_INT
(
bufferTemp
[
ATTRIBUTE_BUFFER_ATTRIBUTEID_HIGH_BITS
],
bufferTemp
[
ATTRIBUTE_BUFFER_ATTRIBUTEID_LOW_BITS
]);
emberAfAppPrintln
(
"attributeId=0x%x"
,
attributeId
);
if
(
emberAfDeviceTableGetEui64FromNodeId
(
nodeId
,
nodeEui64
)){
emberAfAppPrintln
(
"nodeId=0x%x"
,
nodeId
);
kk_dispatch_report_attribute
(
nodeEui64
,
ep
,
clusterId
,
attributeId
,
dataType
,
dataLen
,
dataPtr
);
}
...
...
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