You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.3 KiB
C

1 year ago
/****************************************************************************
** 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)
//<2F><>ͼ<EFBFBD>ļ<EFBFBD><C4BC>б<EFBFBD>
typedef struct _COMTRAD_FILE {
unsigned char id[DEF_BUFFER_32+1]; // <20><>ͼ<EFBFBD>ļ<EFBFBD>ID
unsigned char szFileName[DEF_BUFFER_256]; // <20><>ͼbin/asc<73>ļ<EFBFBD><C4BC><EFBFBD>
}ST_FILE61850_LIST;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
typedef struct {
int iLen;
char cOpt;
char *pBuf;
}ST_DB_INSERT_LIST;
// <20><>ͼ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><E8B1B8>Ӧ<EFBFBD><D3A6>ϵ
//00001080219102_ZJXJG006C0W003007_20191208010000_024001_3473a2c23ae341a48fcf2c50f1e8d734
typedef struct _DESIVE_REALTION {
unsigned char szPdID[DEF_BUFFER_32 + 1]; // <20>ַ<EFBFBD><D6B7>źż<C5BA>¼ID,Դ<>Ա<EFBFBD>transformer_pd.id
unsigned char szSensorID[DEF_BUFFER_32 + 1]; // sensorid
unsigned char szCacTypeCode[6 + 1]; // CAC<41><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD> 024001<30><31>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 */