数据追踪增加接线方式和来源

This commit is contained in:
lnk
2026-07-03 14:43:13 +08:00
parent 16a2c41627
commit 6ad37904f7
6 changed files with 34 additions and 30 deletions

View File

@@ -3635,13 +3635,14 @@ int json_block_create_data(char monid_char[], char* mms_str, double v, int flick
//lnk2024-8-16添加接线参数
int json_block_create_end(char v_wiring_type[], char monid_char[], int flicker_flag)//WW 2023年3月13日16:38:41 多ICD修改
int json_block_create_end(char v_wiring_type[], char monid_char[], int flicker_flag, const char *source_name)//WW 2023年3月13日16:38:41 多ICD修改
{
const char *end_source = (source_name && source_name[0]) ? source_name : "unknown";
json_block_data* pdata;
if (flicker_flag == 1) {
if (!json_flicker_data_map.contains(monid_char))//未查到数据
{
printf("---------- json_block_create_end: mp_id= %s json_flicker_data_map can't find MonitorId----------\n", monid_char);
printf("---------- json_block_create_end: source=%s mp_id= %s json_flicker_data_map can't find MonitorId----------\n", end_source, monid_char);
return 1;
}
pdata = json_flicker_data_map.value(monid_char);
@@ -3650,7 +3651,7 @@ int json_block_create_end(char v_wiring_type[], char monid_char[], int flicker_f
{
if (!json_data_map.contains(monid_char))//未查到数据
{
printf("---------- json_block_create_end: mp_id= %s json_data_map can't find MonitorId----------\n", monid_char);
printf("---------- json_block_create_end: source=%s mp_id= %s json_data_map can't find MonitorId----------\n", end_source, monid_char);
return 1;
}
pdata = json_data_map.value(monid_char);
@@ -3659,7 +3660,7 @@ int json_block_create_end(char v_wiring_type[], char monid_char[], int flicker_f
{
if (!json_pst_data_map.contains(monid_char))//未查到数据
{
printf("---------- json_block_create_end: mp_id= %s json_pst_data_map can't find MonitorId----------\n", monid_char);
printf("---------- json_block_create_end: source=%s mp_id= %s json_pst_data_map can't find MonitorId----------\n", end_source, monid_char);
return 1;
}
pdata = json_pst_data_map.value(monid_char);
@@ -3693,11 +3694,11 @@ int json_block_create_end(char v_wiring_type[], char monid_char[], int flicker_f
json_pst_data_map.remove(monid_char);
}
printf("---------- json_block_create_end: pdata->mms_str_map.count() == 0 ----------\n");
printf("---------- json_block_create_end: source=%s mp_id= %s pdata->mms_str_map.count() == 0 ----------\n", end_source, monid_char);
return 1;
}
//lnk2024-8-16添加接线参数
int ret = transfer_json_block_data(v_wiring_type, pdata);
int ret = transfer_json_block_data(v_wiring_type, pdata, end_source);
if (pdata != NULL)
delete pdata;
@@ -3714,7 +3715,7 @@ int json_block_create_end(char v_wiring_type[], char monid_char[], int flicker_f
json_pst_data_map.remove(monid_char);
}
printf("---------- json_block_create_end: MonitorId= %s ----------\n", monid_char);
printf("---------- json_block_create_end: source=%s MonitorId= %s ----------\n", end_source, monid_char);
return ret;
}
@@ -3878,4 +3879,4 @@ int sel_mvl_type_ctrl_flag(char doname[])
return -1;
}
}
//ZW 2024-01-31 end
//ZW 2024-01-31 end