@@ -21,7 +21,10 @@ using namespace std;
# define OTL_ODBC_UNIX
# include <unistd.h>
# include "otlv4.h"
//# include "otlv4.h"
# include <stdio.h>
# include <sstream> //lnk 2024-10-16
@@ -40,6 +43,17 @@ using namespace std;
# include "../log4cplus/log4.h" //lnk添加log4
# include <cstring>
class otl_datetime {
public :
int year ;
int month ;
int day ;
int hour ;
int minute ;
int second ;
} ;
//用于测试时防止数据激增
# ifndef apr_time_from_msec
# define apr_time_from_msec(ms) ((apr_time_t)(ms) * 1000)
@@ -1462,7 +1476,7 @@ int parse_rpt_log_ini()
//添加判断, 有的监测点没有cpuno为2, 直接申请了LD_info[1], 没申请LD_info[0]
if ( ied_usr - > LD_info [ cpuno ] . LD_name = = NULL ) {
printf ( " this ld_info didn't palloc space ,maybe this ledger has problem! " ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_RPTINIT , " 【ERROR】 终端%s的监测点序号为%d的监测点无法初始化报告,这个装置的台账存在缺失,请检查装置台账的监测点总数和各监测点的序号" , ied_usr - > terminal_id , cpuno + 1 ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_RPTINIT , " 终端%s的监测点序号为%d的监测点无法初始化报告,这个装置的台账存在缺失,请检查装置台账的监测点总数和各监测点的序号 " , ied_usr - > terminal_id , cpuno + 1 ) ;
continue ; //跳过防止崩溃
}
@@ -1804,18 +1818,18 @@ int parse_ledger_update_xml(trigger_update_xml_t* trigger_update_xml)
//加载一个文件的内容到数据结构
if ( ! load_ledger_update_from_xml ( trigger_update_xml , filename ) ) {
std : : cout < < " read /etc/ledgerupdate/ " < < filename < < " success... " < < std : : endl ;
DIY_WARNLOG_CODE ( " process " , LOG_CODE_LEDGER_UPDATE , " 【WARN】 前置的%s%d号进程 读取台账更新文件成功,开始更新台账" , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
DIY_WARNLOG_CODE ( " process " , LOG_CODE_LEDGER_UPDATE , " 前置的%s%d号进程 读取台账更新文件成功,开始更新台账 " , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
}
//处理过的文件删除掉
if ( std : : remove ( filename . c_str ( ) ) ! = 0 ) {
std : : cerr < < " Failed to remove file: " < < filename < < " Error: " < < strerror ( errno ) < < std : : endl ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_LEDGER_UPDATE , " 【ERROR】 前置的%s%d号进程 删除已读取的台账更新文件失败!请检查台账更新文件是否残留在/FeProject/etc/ledgerupdate" , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_LEDGER_UPDATE , " 前置的%s%d号进程 删除已读取的台账更新文件失败!请检查台账更新文件是否残留在/FeProject/etc/ledgerupdate " , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
return APR_EGENERAL ;
}
else {
std : : cout < < " remove file: " < < filename < < " success... " < < std : : endl ;
DIY_INFOLOG ( " process " , " 【NORMAL】 前置的%s%d号进程 删除已读取的台账更新文件成功" , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
DIY_INFOLOG ( " process " , " 前置的%s%d号进程 删除已读取的台账更新文件成功 " , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
}
}
}
@@ -1995,7 +2009,7 @@ int parse_3s_xml(trigger_3s_xml_t* trigger_3s_xml)
printf ( " /etc/trigger3s/*.xml success... \n " ) ;
DIY_INFOLOG ( " process " , " 【WARN】 前置读取实时数据触发文件成功,即将注册实时数据报告" ) ;
DIY_INFOLOG ( " process " , " 前置读取实时数据触发文件成功,即将注册实时数据报告 " ) ;
return APR_SUCCESS ;
}
@@ -2308,7 +2322,7 @@ int parse_recall_xml(recall_xml_t* recall_xml, char* id)
QDir dir ( cfg_dir ) ;
if ( ! dir . exists ( ) ) {
qDebug ( ) < < " folder does not exist! " ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_RECALL , " 【ERROR】 前置的%s%d号进程 无法解析补招文件,补招文件路径/FeProject/etc/recall/不存在" , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_RECALL , " 前置的%s%d号进程 无法解析补招文件,补招文件路径/FeProject/etc/recall/不存在 " , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
return false ;
}
//指定文件后缀名,可指定多种类型
@@ -2324,7 +2338,7 @@ int parse_recall_xml(recall_xml_t* recall_xml, char* id)
if ( ! file . open ( QIODevice : : ReadOnly ) )
{
qDebug ( ) < < " file.open error " ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_RECALL , " 【ERROR】 前置的%s%d号进程 无法打开补招文件%s" , get_front_msg_from_subdir ( ) , g_front_seg_index , qstrRecallPath . toStdString ( ) . c_str ( ) ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_RECALL , " 前置的%s%d号进程 无法打开补招文件%s " , get_front_msg_from_subdir ( ) , g_front_seg_index , qstrRecallPath . toStdString ( ) . c_str ( ) ) ;
continue ; //以只读方式打开
}
bool ret = doc . setContent ( & file ) ;
@@ -2332,7 +2346,7 @@ int parse_recall_xml(recall_xml_t* recall_xml, char* id)
if ( ! ret )
{
qDebug ( ) < < " doc.setContent error " ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_RECALL , " 【ERROR】 前置的%s%d号进程 无法解析补招文件%s,补招内容无效" , get_front_msg_from_subdir ( ) , g_front_seg_index , qstrRecallPath . toStdString ( ) . c_str ( ) ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_RECALL , " 前置的%s%d号进程 无法解析补招文件%s,补招内容无效 " , get_front_msg_from_subdir ( ) , g_front_seg_index , qstrRecallPath . toStdString ( ) . c_str ( ) ) ;
continue ;
}
//将文件内容读到doc中
@@ -2910,7 +2924,7 @@ void DeletcRecallXml() {
QDir dir ( cfg_dir ) ;
if ( ! dir . exists ( ) ) {
qDebug ( ) < < " folder does not exist! " ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_RECALL , " 【ERROR】 前置的%s%d号进程 删除旧的补招文件失败,补招文件路径/FeProject/etc/recall/不存在" , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_RECALL , " 前置的%s%d号进程 删除旧的补招文件失败,补招文件路径/FeProject/etc/recall/不存在 " , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
return ;
}
QStringList filter ( file_name ) ;
@@ -2925,7 +2939,7 @@ void DeletcRecallXml() {
if ( fileInfo . lastModified ( ) < saveDaysAgo ) {
QFile : : remove ( fileInfo . absoluteFilePath ( ) ) ;
DIY_INFOLOG ( " process " , " 【NORMAL】 前置的%s%d号进程 删除超过两天的补招文件" , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
DIY_INFOLOG ( " process " , " 前置的%s%d号进程 删除超过两天的补招文件 " , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
}
}
@@ -2942,7 +2956,7 @@ void CreateRecallXml()
{
printf ( " insert ID_CJournalRecall_Map! \n " ) ;
DIY_INFOLOG ( " process " , " 【NORMAL】 前置的%s%d号进程 开始写入补招文件" , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
DIY_INFOLOG ( " process " , " 前置的%s%d号进程 开始写入补招文件 " , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
QMap < QString , QList < CJournalRecall > > ID_CJournalRecall_Map ;
@@ -2975,7 +2989,7 @@ void CreateRecallXml()
if ( ! file . open ( QIODevice : : WriteOnly | QIODevice : : Truncate ) ) {
printf ( " 补招查询完成,打开%s失败,无法写入线路补招配置! \n " , qstrRecallPath . toAscii ( ) . data ( ) ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_RECALL , " 【ERROR】 前置的%s%d号进程 无法将补招文件写入补招文件路径/FeProject/etc/recall/" , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_RECALL , " 前置的%s%d号进程 无法将补招文件写入补招文件路径/FeProject/etc/recall/ " , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
QMap < QString , QList < CJournalRecall > > ( ) . swap ( ID_CJournalRecall_Map ) ;
return ;
@@ -3703,14 +3717,14 @@ int terminal_ledger_web(QMap<QString, terminal_dev*>* terminal_dev_map,
// 参数验证
if ( num < = 0 ) {
std : : cerr < < " Error: 'num' must be greater than 0. " < < std : : endl ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_LEDGER , " 【ERROR】 前置的多进程最大进程号为:%d,应该为大于0的整数" , num ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_LEDGER , " 前置的多进程最大进程号为:%d,应该为大于0的整数 " , num ) ;
return 1 ; // 返回适当的错误码
}
index = index - 1 ;
if ( index < 0 | | index > = num ) {
std : : cerr < < " Error: 'index' must be in the range [0, num]. " < < std : : endl ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_LEDGER , " 【ERROR】 前置当前进程的进程号为:%d,应该为0到最大进程号范围内的整数" , index ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_LEDGER , " 前置当前进程的进程号为:%d,应该为0到最大进程号范围内的整数 " , index ) ;
return 1 ; // 返回适当的错误码
}
}
@@ -3718,7 +3732,7 @@ int terminal_ledger_web(QMap<QString, terminal_dev*>* terminal_dev_map,
// 获取参数
if ( codes . empty ( ) ) {
std : : cerr < < " Error: 'codes' vector is empty. " < < std : : endl ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_LEDGER , " 【ERROR】 前置的%s%d号进程调用web台账接口的入参为空" , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_LEDGER , " 前置的%s%d号进程调用web台账接口的入参为空 " , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
return 1 ;
}
@@ -3838,7 +3852,7 @@ int terminal_ledger_web(QMap<QString, terminal_dev*>* terminal_dev_map,
}
}
std : : cerr < < " data 无效或为空数组,重试 " < < std : : endl ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_LEDGER , " 【ERROR】 前置从web接口中获取的台账信息为空或者无效信息无法解析,请核对前置使用的入参信息:%s" , parm . c_str ( ) ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_LEDGER , " 前置从web接口中获取的台账信息为空或者无效信息无法解析,请核对前置使用的入参信息:%s " , parm . c_str ( ) ) ;
}
}
@@ -3880,7 +3894,7 @@ int terminal_ledger_web(QMap<QString, terminal_dev*>* terminal_dev_map,
break ; // 本地台账解析成功且数组非空
}
}
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_LEDGER , " 【ERROR】 前置从本地台账中获取的台账信息为空或者无效信息无法解析,请核对前置使用的入参信息:%s" , parm . c_str ( ) ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_LEDGER , " 前置从本地台账中获取的台账信息为空或者无效信息无法解析,请核对前置使用的入参信息:%s " , parm . c_str ( ) ) ;
}
free ( ledger ) ; // root==null释放内容
@@ -4113,7 +4127,7 @@ int parse_device_cfg_web()
std : : cout < < " input_jstr: " < < input_jstr < < std : : endl ; // 输出结果
DIY_DEBUGLOG ( " process " , " 【DEBUG】 前置的%s%d号进程调用web接口获取台账使用的请求输入为:%s" , get_front_msg_from_subdir ( ) , g_front_seg_index , input_jstr ) ;
DIY_DEBUGLOG ( " process " , " 前置的%s%d号进程调用web接口获取台账使用的请求输入为:%s " , get_front_msg_from_subdir ( ) , g_front_seg_index , input_jstr ) ;
codes . push_back ( input_jstr ) ; //是否需要筛选状态直接在配置文件控制
@@ -4148,13 +4162,13 @@ int parse_device_cfg_web()
//判断是否相等
if ( max_process_num ! = max_index ) {
if ( max_process_num > 0 & & max_process_num < 10 ) {
DIY_WARNLOG_CODE ( " process " , LOG_CODE_LEDGER , " 【WARN】 前置比对台账获取的进程数:%d和本地配置的进程数:%d,不匹配,按照台账进程数重置前置的进程数量" , max_process_num , max_index ) ;
DIY_WARNLOG_CODE ( " process " , LOG_CODE_LEDGER , " 前置比对台账获取的进程数:%d和本地配置的进程数:%d,不匹配,按照台账进程数重置前置的进程数量 " , max_process_num , max_index ) ;
// 调用执行脚本函数
close_listening_socket ( ) ;
execute_bash ( " reset " , max_process_num , " all " ) ;
}
else {
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_LEDGER , " 【ERROR】 前置从台账获取的进程数:%d不符合范围1~9,按照本地配置进程数启动进程" , max_process_num ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_LEDGER , " 前置从台账获取的进程数:%d不符合范围1~9,按照本地配置进程数启动进程 " , max_process_num ) ;
}
}
}
@@ -4163,7 +4177,7 @@ int parse_device_cfg_web()
std : : cout < < " terminal_ledger_num: " < < count_cfg < < std : : endl ;
DIY_DEBUGLOG ( " process " , " 【DEBUG】 前置的%s%d号进程调用获取到的台账的数量为:%d" , get_front_msg_from_subdir ( ) , g_front_seg_index , count_cfg ) ;
DIY_DEBUGLOG ( " process " , " 前置的%s%d号进程调用获取到的台账的数量为:%d " , get_front_msg_from_subdir ( ) , g_front_seg_index , count_cfg ) ;
//如果当前进程获取的台账为0, 按照配置数量申请空间, 台账内容为空
g_node - > n_clients = count_cfg ;
@@ -4178,11 +4192,11 @@ int parse_device_cfg_web()
//添加提示
std : : cout < < " !!!!!!!!!!single process can not add any ledger unless reboot!!!!!!! " < < std : : endl ;
DIY_WARNLOG_CODE ( " process " , LOG_CODE_LEDGER , " 【WARN】 前置的%s%d号进程获取到的台账的数量大于配置文件中给单个进程配置的台账数量:%d,这个进程将按照获取到的台账的数量来创建台账空间,这个进程不能直接通过台账添加来新增台账,只能通过重启进程或者先删除已有台账再添加台账的方式来添加新台账" , get_front_msg_from_subdir ( ) , g_front_seg_index , IED_COUNT ) ;
DIY_WARNLOG_CODE ( " process " , LOG_CODE_LEDGER , " 前置的%s%d号进程获取到的台账的数量大于配置文件中给单个进程配置的台账数量:%d,这个进程将按照获取到的台账的数量来创建台账空间,这个进程不能直接通过台账添加来新增台账,只能通过重启进程或者先删除已有台账再添加台账的方式来添加新台账 " , get_front_msg_from_subdir ( ) , g_front_seg_index , IED_COUNT ) ;
}
else {
g_node - > clients = ( ied_t * * ) apr_pcalloc ( g_cfg_pool , IED_COUNT * sizeof ( ied_t * ) ) ; //g_node->clients 这块大内存空间存储了 count_cfg 个 ied_t* 类型的指针(即一个指针数组)这是(指向内存块的指针)的指针数组
DIY_INFOLOG ( " process " , " 【NORMAL】 前置的%s%d号进程根据配置文件中给单个进程配置的台账数量:%d来创建台账空间" , get_front_msg_from_subdir ( ) , g_front_seg_index , IED_COUNT ) ;
DIY_INFOLOG ( " process " , " 前置的%s%d号进程根据配置文件中给单个进程配置的台账数量:%d来创建台账空间 " , get_front_msg_from_subdir ( ) , g_front_seg_index , IED_COUNT ) ;
}
//把ied放入数组
@@ -4459,7 +4473,7 @@ int parse_device_cfg_web()
isdelta_flag = 1 ; //存在一个监测点为角型接线则这个前置就要启动第二个配置列表
cout < < " monitor_id " < < monitor_id < < " v_wiring_type: " < < line_info . v_wiring_type < < " is delta wiring: " < < isdelta_flag < < endl ;
DIY_WARNLOG_CODE ( " process " , LOG_CODE_LEDGER , " 【WARN】 前置连接的监测点 %s 是角形接线,对应终端为%s 终端类型是%s" , line_info . mp_id , ied_usr - > terminal_id , ied_usr - > dev_type ) ;
DIY_WARNLOG_CODE ( " process " , LOG_CODE_LEDGER , " 前置连接的监测点 %s 是角形接线,对应终端为%s 终端类型是%s " , line_info . mp_id , ied_usr - > terminal_id , ied_usr - > dev_type ) ;
}
strcpy ( line_info . monitor_status , monitor_status ) ;
@@ -4533,10 +4547,10 @@ int parse_device_cfg_web()
cout < < " dev init create count: " < < count_real ;
return APR_SUCCESS ;
}
catch ( otl_exception & e )
catch ( . . . )
{
printf ( " \n device error,ERROR code= %d,msg= %s \n " , e . code , e . msg ) ;
return e . code ;
printf ( " \n device ledger error \n " ) ;
return 1 ;
}
}
@@ -4690,7 +4704,7 @@ int parse_model_cfg_web()
/////////////////////////////////////////////////////////////////////////
if ( parse_model_web ( & icd_model_map , codes ) ) {
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_ICD_AND_DOWNLOAD , " 【ERROR】 前置的%s%d号进程 icd模型接口异常,将使用默认的icd模型,请检查接口配置" , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_ICD_AND_DOWNLOAD , " 前置的%s%d号进程 icd模型接口异常,将使用默认的icd模型,请检查接口配置 " , get_front_msg_from_subdir ( ) , g_front_seg_index ) ;
return APR_SUCCESS ; //可以使用默认的映射文件所以返回正常
}
@@ -4727,10 +4741,10 @@ int parse_model_cfg_web()
delete_icd_model_map ( icd_model_map ) ;
return APR_SUCCESS ;
}
catch ( otl_exception & e )
catch ( . . . )
{
printf ( " \n icd model error,ERROR code= %d,msg= %s \n " , e . code , e . msg ) ;
return e . code ;
printf ( " \n icd model error \n " ) ;
return 1 ;
}
}
////////////////////////////////////////////////////////////icd模型重构函数lnk20250116
@@ -4798,9 +4812,9 @@ char* parse_model_cfg_web_one(ied_t* ied, char* out_model)
delete_icd_model_map ( icd_model_map ) ; //lnk20250701
return NULL ;
}
catch ( otl_exception & e )
catch ( . . . )
{
printf ( " \n icd model error,ERROR code= %d,msg= %s \n " , e . code , e . msg ) ;
printf ( " \n icd model one error \n " ) ;
return NULL ;
}
}
@@ -4951,7 +4965,7 @@ int recall_json_handle(const char* jstr)
if ( strcmp ( ied_usr - > LD_info [ m ] . mp_id , monitorId . toStdString ( ) . c_str ( ) ) = = 0 ) { //匹配上了
DIY_INFOLOG ( " process " , " 【NORMAL】 前置的%s%d号进程处理监测点%s -id:%s 的数据补招" , get_front_msg_from_subdir ( ) , g_front_seg_index , ied_usr - > LD_info [ m ] . name , ied_usr - > LD_info [ m ] . mp_id ) ;
DIY_INFOLOG ( " process " , " 前置的%s%d号进程处理监测点%s -id:%s 的数据补招 " , get_front_msg_from_subdir ( ) , g_front_seg_index , ied_usr - > LD_info [ m ] . name , ied_usr - > LD_info [ m ] . mp_id ) ;
mppair = 1 ;
break ; //找到就退出监测点循环
}
@@ -5174,7 +5188,7 @@ void handleUploadResponse(const std::string& response, char* wavepath) {
cJSON * json_data = cJSON_Parse ( response . c_str ( ) ) ;
if ( json_data = = nullptr ) {
std : : cerr < < " Error parsing response: " < < cJSON_GetErrorPtr ( ) < < std : : endl ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_TRANSIENT_COMM , " 【ERROR】 前置上传暂态录波文件失败,web返回的消息错误, 无法解析" ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_TRANSIENT_COMM , " 前置上传暂态录波文件失败,web返回的消息错误, 无法解析 " ) ;
return ;
}
@@ -5220,11 +5234,11 @@ void handleUploadResponse(const std::string& response, char* wavepath) {
std : : cout < < " wavepath: " < < wavepath < < std : : endl ;
DIY_INFOLOG ( " process " , " 【NORMAL】 前置上传暂态录波文件成功,远端文件名:%s" , wavepath ) ;
DIY_INFOLOG ( " process " , " 前置上传暂态录波文件成功,远端文件名:%s " , wavepath ) ;
}
} else {
std : : cerr < < " Error: Missing expected fields in JSON response. " < < std : : endl ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_TRANSIENT_COMM , " 【ERROR】 前置上传暂态录波文件失败,web返回的消息没有远端文件名" ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_TRANSIENT_COMM , " 前置上传暂态录波文件失败,web返回的消息没有远端文件名 " ) ;
}
// 释放 JSON 对象
@@ -5341,7 +5355,7 @@ void SendFileWeb(const std::string& strUrl, const char* localpath, const char* c
CURLcode res = curl_easy_perform ( curl ) ;
if ( res ! = CURLE_OK ) {
std : : cerr < < " http web failed: " < < curl_easy_strerror ( res ) < < std : : endl ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_TRANSIENT_COMM , " 【ERROR】 前置上传暂态录波文件 %s 失败,请检查文件上传接口配置" , localpath ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_TRANSIENT_COMM , " 前置上传暂态录波文件 %s 失败,请检查文件上传接口配置 " , localpath ) ;
} else {
std : : cout < < " http web success, response: " < < resPost0 < < std : : endl ;
handleUploadResponse ( resPost0 , wavepath ) ; // 处理响应
@@ -5860,7 +5874,7 @@ int parse_rpt_log_ini_one(ied_t* ied)
//添加判断, 有的监测点没有cpuno为2, 直接申请了LD_info[2-1], 没申请LD_info[0]
if ( ied_usr - > LD_info [ cpuno ] . LD_name = = NULL ) {
printf ( " this ld_info didn't palloc space ,maybe this ledger has problem! " ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_RPTINIT , " 【ERROR】 终端%s的监测点序号为%d的监测点无法初始化报告,这个装置的台账存在缺失,请检查装置台账的监测点总数和各监测点的序号" , ied_usr - > terminal_id , cpuno + 1 ) ;
DIY_ERRORLOG_CODE ( " process " , LOG_CODE_RPTINIT , " 终端%s的监测点序号为%d的监测点无法初始化报告,这个装置的台账存在缺失,请检查装置台账的监测点总数和各监测点的序号 " , ied_usr - > terminal_id , cpuno + 1 ) ;
continue ; //跳过防止崩溃
}