|
|
/****************************************************************************
|
|
|
** File name : HTIEC61850FileParser.h
|
|
|
** Description : ISO iec 61850 dat file parser api
|
|
|
** Create date : 2019.09.01
|
|
|
** Auther by : Liuyx
|
|
|
** Version info : V1.0.01
|
|
|
** Copyright (C) 2002-2019 xi'an huatek, Inc Co., Ltd
|
|
|
** Update record:
|
|
|
** DATE AUTHER DESC
|
|
|
** -------------------------------------------------------------------------
|
|
|
** 2019.09.01 Liuyx first build
|
|
|
****************************************************************************/
|
|
|
#ifndef __HT_IEC61850_FILE_PARSER_H
|
|
|
#define __HT_IEC61850_FILE_PARSER_H
|
|
|
#pragma warning(disable: 4819)
|
|
|
#include <stdio.h>
|
|
|
#include "HTGlobal.h"
|
|
|
//#include "opencv/cv.h"
|
|
|
#include "opencv2/opencv.hpp"
|
|
|
#include "opencv2/core/core.hpp"
|
|
|
#include "opencv2/highgui/highgui.hpp"
|
|
|
#include "opencv2/imgproc/imgproc.hpp"
|
|
|
#include "opencv2/imgcodecs.hpp"
|
|
|
#include "opencv2/ml.hpp"
|
|
|
#include "opencv2/objdetect.hpp"
|
|
|
|
|
|
//OpencvDirTraverse.cpp : Defines the entry point for the console application.
|
|
|
#ifdef _WIN32
|
|
|
#pragma comment(lib,"opencv_world300d.lib")
|
|
|
//#pragma comment(lib,"opencv_ts300d.lib")
|
|
|
#endif
|
|
|
|
|
|
using namespace std;
|
|
|
using namespace cv;
|
|
|
|
|
|
//#ifdef __cplusplus
|
|
|
//extern "C" {
|
|
|
//#endif /* __cplusplus */
|
|
|
#pragma pack (push ,1)
|
|
|
|
|
|
//谱图文件列表
|
|
|
typedef struct _COMTRAD_FILE {
|
|
|
unsigned char id[DEF_BUFFER_32+1]; // 谱图文件ID
|
|
|
unsigned char szFileName[DEF_BUFFER_256]; // 谱图bin/asc文件名
|
|
|
}ST_FILE61850_LIST;
|
|
|
|
|
|
|
|
|
//入库队列
|
|
|
typedef struct {
|
|
|
int iLen;
|
|
|
char cOpt;
|
|
|
char *pBuf;
|
|
|
}ST_DB_INSERT_LIST;
|
|
|
|
|
|
// 谱图文件与设备对应关系
|
|
|
//00001080219102_ZJXJG006C0W003007_20191208010000_024001_3473a2c23ae341a48fcf2c50f1e8d734
|
|
|
typedef struct _DESIVE_REALTION {
|
|
|
unsigned char szPdID[DEF_BUFFER_32 + 1]; // 局放信号记录ID,源自表transformer_pd.id
|
|
|
unsigned char szSensorID[DEF_BUFFER_32 + 1]; // sensorid
|
|
|
unsigned char szCacTypeCode[6 + 1]; // CAC报文类型编码 024001,021001
|
|
|
unsigned char szMainTreeID[DEF_BUFFER_32+1]; // main_tree_id
|
|
|
}ST_DESIVE_REALTION;
|
|
|
#pragma pack (pop)
|
|
|
|
|
|
void *thread_sacnfile_proc(void *arg);
|
|
|
void *thread_file_parser_proc(void *arg);
|
|
|
void *thread_db_insert_proc(void *arg);
|
|
|
|
|
|
//#ifdef __cplusplus
|
|
|
//}
|
|
|
//#endif
|
|
|
|
|
|
#endif /* end __HT_IEC61850_FILE_PARSER_H */
|
|
|
|