Commit 97630633 authored by 尹佳钦's avatar 尹佳钦

添加打印信息

parent 7a7f6abb
......@@ -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);
......
......@@ -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);
}
......
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