Commit 55f0656d authored by chen.weican's avatar chen.weican

【修改内容】修改主动离网功能

【提交人】陈伟灿
parent 39117df4
...@@ -8,6 +8,8 @@ cJSON *kk_topo_change_operation(jrpc_context * ctx, cJSON *params, cJSON *id,cJS ...@@ -8,6 +8,8 @@ cJSON *kk_topo_change_operation(jrpc_context * ctx, cJSON *params, cJSON *id,cJS
{ {
int res = 0; int res = 0;
cJSON *changeTypeStr = NULL; cJSON *changeTypeStr = NULL;
uint8_t eui64[EUI64_SIZE] = {0};
EmberNodeId nodeId = EMBER_AF_PLUGIN_DEVICE_TABLE_NULL_NODE_ID;
UTIL_LOG_INFO("\n********************kk_topo_change_operation********************\n"); UTIL_LOG_INFO("\n********************kk_topo_change_operation********************\n");
...@@ -24,7 +26,9 @@ cJSON *kk_topo_change_operation(jrpc_context * ctx, cJSON *params, cJSON *id,cJS ...@@ -24,7 +26,9 @@ cJSON *kk_topo_change_operation(jrpc_context * ctx, cJSON *params, cJSON *id,cJS
cJSON * item = deviceArray->child; cJSON * item = deviceArray->child;
while(item != NULL){ while(item != NULL){
char *deviceCode = rpc_cJSON_GetObjectItem(item,MSG_DEVICE_CODE_STR)->valuestring; char *deviceCode = rpc_cJSON_GetObjectItem(item,MSG_DEVICE_CODE_STR)->valuestring;
rpc_get_mac(deviceCode,eui64);
nodeId = emberAfDeviceTableGetNodeIdFromEui64(eui64);
kk_zdo_leave_request(nodeId,false,false);
item = item->next; item = item->next;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment