fix regist log too much
This commit is contained in:
@@ -6094,6 +6094,9 @@ void clearLDInfo(LD_info_t *ld_info) {
|
|||||||
ld_info->rptPstRecvFlag = 0;
|
ld_info->rptPstRecvFlag = 0;
|
||||||
ld_info->rptPstRecvCheckFlag = 0;
|
ld_info->rptPstRecvCheckFlag = 0;
|
||||||
|
|
||||||
|
ld_info->registcount = 0;
|
||||||
|
ld_info->has_logged_regist = 0;
|
||||||
|
|
||||||
ld_info->read_flag = 0;//监测点无效
|
ld_info->read_flag = 0;//监测点无效
|
||||||
|
|
||||||
ld_info->rptcount = 0;
|
ld_info->rptcount = 0;
|
||||||
@@ -6148,6 +6151,9 @@ void clearIedUsr(ied_usr_t *ied_usr) {
|
|||||||
ied_usr->time = 0; //台账更新时间
|
ied_usr->time = 0; //台账更新时间
|
||||||
ied_usr->update_flag = 0; //台账更新标志暂不使用
|
ied_usr->update_flag = 0; //台账更新标志暂不使用
|
||||||
|
|
||||||
|
ied_usr->lastconnectstat = 0;
|
||||||
|
ied_usr->has_logged_disconnect = 0;
|
||||||
|
|
||||||
// 清空指针部分,但不清理非空指针
|
// 清空指针部分,但不清理非空指针
|
||||||
if (ied_usr->LD_info != nullptr) {
|
if (ied_usr->LD_info != nullptr) {
|
||||||
|
|
||||||
|
|||||||
@@ -363,7 +363,22 @@ void ChannelCheckIECReports(chnl_usr_t *chnl_usr)
|
|||||||
chnl_usr->chnl_id, rptinfo->IntgPd,rptinfo->TrgOpt );
|
chnl_usr->chnl_id, rptinfo->IntgPd,rptinfo->TrgOpt );
|
||||||
|
|
||||||
//mq日志
|
//mq日志
|
||||||
DIY_WARNLOG(full_key_m_c,"【WARN】监测点:%s - id:%s注册报告失败,报告名:%s", LD_info->name,LD_info->mp_id,rpt_inst_name);
|
// 仅在还没达到5次上限时打印
|
||||||
|
if (!LD_info->has_logged_regist) {
|
||||||
|
LD_info->registcount++;
|
||||||
|
|
||||||
|
if (LD_info->registcount <= 5) {
|
||||||
|
DIY_WARNLOG(full_key_m_c, "【WARN】监测点:%s - id:%s注册报告失败,报告名:%s",
|
||||||
|
LD_info->name, LD_info->mp_id, rpt_inst_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 到5次就不再打印,并标记
|
||||||
|
if (LD_info->registcount > 5) {
|
||||||
|
LD_info->has_logged_regist = true;
|
||||||
|
DIY_WARNLOG(full_key_m_c, "【WARN】监测点:%s - id:%s注册报告失败日志已达本次注册上限,不再输出,请检查装置icd和映射文件是否匹配或者装置存在过多连接",
|
||||||
|
LD_info->name, LD_info->mp_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -381,6 +396,8 @@ void ChannelCheckIECReports(chnl_usr_t *chnl_usr)
|
|||||||
rptinfo->IntgPd,rptinfo->TrgOpt,rptinfo->OptFlds[0],rptinfo->OptFlds[1] );
|
rptinfo->IntgPd,rptinfo->TrgOpt,rptinfo->OptFlds[0],rptinfo->OptFlds[1] );
|
||||||
|
|
||||||
//mq日志
|
//mq日志
|
||||||
|
LD_info->has_logged_regist = FALSE;
|
||||||
|
LD_info->registcount = 0;
|
||||||
DIY_WARNLOG(full_key_m_c,"【WARN】监测点:%s - id:%s注册报告成功,报告名:%s", LD_info->name,LD_info->mp_id,rpt_inst_name);
|
DIY_WARNLOG(full_key_m_c,"【WARN】监测点:%s - id:%s注册报告成功,报告名:%s", LD_info->name,LD_info->mp_id,rpt_inst_name);
|
||||||
|
|
||||||
// add here to GI not the same time
|
// add here to GI not the same time
|
||||||
|
|||||||
@@ -445,7 +445,7 @@ static ST_RET process_jou_entry(loginfo_t *loginfo,apr_time_t t,
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
printf("\naft for");
|
if(DEBUGOPEN)printf("\naft for");
|
||||||
if ( log_data_type == QVVR_DATA ) {
|
if ( log_data_type == QVVR_DATA ) {
|
||||||
processQVVR_end(loginfo->LD_info);
|
processQVVR_end(loginfo->LD_info);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -269,6 +269,10 @@ struct LD_info_t{
|
|||||||
int rptPstRecvFlag;//CZY 2023-08-17 WW 2022-11-14判断报告是否收齐,rptRecvFlag=有效报告序号相加
|
int rptPstRecvFlag;//CZY 2023-08-17 WW 2022-11-14判断报告是否收齐,rptRecvFlag=有效报告序号相加
|
||||||
int rptPstRecvCheckFlag;//CZY 2023-08-17 WW 2022-11-14判断报告是否收齐,每次收到报告相加与rptRecvFlag一起判断是否收完
|
int rptPstRecvCheckFlag;//CZY 2023-08-17 WW 2022-11-14判断报告是否收齐,每次收到报告相加与rptRecvFlag一起判断是否收完
|
||||||
//报告
|
//报告
|
||||||
|
|
||||||
|
int registcount;//lnk20250812
|
||||||
|
bool has_logged_regist;//lnk20250812
|
||||||
|
|
||||||
//不使用
|
//不使用
|
||||||
int iUnitOfTime;//CZY 2023-08-17 WW 2022年12月7日15:43:34 装置上送事件持续时间单位切换(0-ms; 1-s)
|
int iUnitOfTime;//CZY 2023-08-17 WW 2022年12月7日15:43:34 装置上送事件持续时间单位切换(0-ms; 1-s)
|
||||||
int iStatOfTime;//CZY 2023-08-17 WW 2022年12月7日15:48:33 统计数据时间 0-北京时间 1-UTC时间
|
int iStatOfTime;//CZY 2023-08-17 WW 2022年12月7日15:48:33 统计数据时间 0-北京时间 1-UTC时间
|
||||||
|
|||||||
Reference in New Issue
Block a user