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.
58 lines
1.4 KiB
C
58 lines
1.4 KiB
C
#ifndef _ANALYSIS_H
|
|
#define _ANALYSIS_H
|
|
|
|
//南网谱图
|
|
#define MAX_CHN 1 //通道号
|
|
#define MAX_PEAK 6
|
|
#define CHN_LEN 5000
|
|
|
|
|
|
//#define RSV_SPACE_SIZE 344
|
|
#define RSV_SPACE_SIZE 3000 /*2020-07-31修改为3000*/
|
|
|
|
|
|
|
|
typedef struct __attribute__ ((__packed__))
|
|
{
|
|
char peak_name[10];//组分名称H2,CH4,C2H2,C2H4,C2H6,CO,CO2
|
|
char peak_idx;//峰编号
|
|
float peak_top;//峰顶时间
|
|
float peak_start;//峰开始点时间
|
|
float peak_end;//峰结束点时间
|
|
float peak_hgt;//峰高
|
|
float peak_area;//峰面积
|
|
}PEAK_INFO;//27
|
|
|
|
typedef struct __attribute__ ((__packed__))
|
|
{
|
|
char peak_num;//通道中峰的个数MAX_PEAK
|
|
PEAK_INFO peak_info[MAX_PEAK];//峰信息
|
|
}CHN_INFO;//1+6*27=163
|
|
|
|
typedef struct __attribute__ ((__packed__))
|
|
{
|
|
float spec_ver;//规范版本0
|
|
float file_ver;//文件版本4
|
|
short wave_type;//谱图类型编码8
|
|
long long gen_time;//谱图生成时间10
|
|
char test_flag;//测试文件标志18
|
|
char dev_name[32];//被监测设备名称19
|
|
float xt;//X轴时间间隔t51
|
|
float ymax;//Y轴最大值55
|
|
char xunit;//X轴单位0:秒 1:毫秒 59
|
|
char yunit;//Y轴单位0:mV 1:uV 63
|
|
int data_num;//每通道数据点数CHN_LEN(要求所有通道数据点数相同)67
|
|
char chn_num;//通道数MAX_CHN 71
|
|
CHN_INFO chn_info[MAX_CHN];//通道信息72(0X48)
|
|
int separator;//0x24242424 235(0xEB)
|
|
float data[MAX_CHN][CHN_LEN];//通道谱图数据
|
|
}SOUTH_WAVE_TYPE;
|
|
|
|
|
|
extern int send_analysis_req(char *file_name,int len);
|
|
extern int analysis_init(void);
|
|
|
|
#endif
|
|
|
|
|