This commit is contained in:
Chenwenxuan
2024-03-06 14:54:30 +08:00
commit edac2715f0
1525 changed files with 809982 additions and 0 deletions

BIN
lib/R_detection/RMS_Dll.dll Normal file

Binary file not shown.

View File

@@ -0,0 +1,12 @@
#ifndef RMS_DLL_GLOBAL_H
#define RMS_DLL_GLOBAL_H
#include <QtCore/qglobal.h>
#if defined(RMS_DLL_LIBRARY)
# define RMS_DLL_EXPORT Q_DECL_EXPORT
#else
# define RMS_DLL_EXPORT Q_DECL_IMPORT
#endif
#endif // RMS_DLL_GLOBAL_H

75
lib/R_detection/rms_dll.h Normal file
View File

@@ -0,0 +1,75 @@
#ifndef RMS_DLL_H
#define RMS_DLL_H
#include"qtcpserver.h"
#include"qtcpsocket.h"
#include "RMS_Dll_global.h"
#include <QImage>
class RMS_DLL_EXPORT RMS_Dll
{
public:
RMS_Dll();
int add(int a,int b);
QVector<double> x;//存储电阻率值
int isshow = 0;
QTcpSocket* _Socket;
//连接探头
bool RMS_Connect(QString IP, quint16 Port);
//取消连接
void RMS_Disconnect();
//RMS_Read_Empty()调用即空采
bool RMS_Read_Empty();
//正常采集传入x坐标y坐标
bool RMS_Read(int cx,int cy);
double RMS_Read_Single();
//所有点采集完成后,获取四个值
void RMS_ACQ(double *max,double *min,double *med,double *mode);//返回最大值,最小值,中位数,众数
//传入mode、Pm和Po获取Pt和Ps
void RMS_P(double mode,double *Pt,double *Ps,double Pm,double Po);
//传入晶锭尺寸size40、60、80分别为四英寸、六英寸和八英寸返回QImage
QImage RMS_Image(int size);
//之前tcp传输的点这回直接用就行
QString StrPlotSixInch = "(0,-60)(-30,-50)(-20,-50)(-10,-50)(0,-50)(10,-50)(20,-50)(30,-50)(-40,-40)(-30,-40)(-20,-40)(-10,-40)(0,-40)(10,-40)"
"(20,-40)(30,-40)(40,-40)(-50,-30)(-40,-30)(-30,-30)(-20,-30)(-10,-30)(0,-30)(10,-30)(20,-30)(30,-30)(40,-30)(50,-30)"
"(-50,-20)(-40,-20)(-30,-20)(-20,-20)(-10,-20)(0,-20)(10,-20)(20,-20)(30,-20)(40,-20)(50,-20)(-50,-10)(-40,-10)(-30,-10)"
"(-20,-10)(-10,-10)(0,-10)(10,-10)(20,-10)(30,-10)(40,-10)(50,-10)(-60,0)(-50,0)(-40,0)(-30,0)(-20,0)(-10,0)(0,0)(10,0)"
"(20,0)(30,0)(40,0)(50,0)(60,0)(-50,10)(-40,10)(-30,10)(-20,10)(-10,10)(0,10)(10,10)(20,10)(30,10)(40,10)(50,10)(-50,20)"
"(-40,20)(-30,20)(-20,20)(-10,20)(0,20)(10,20)(20,20)(30,20)(40,20)(50,20)(-50,30)(-40,30)(-30,30)(-20,30)(-10,30)(0,30)"
"(10,30)(20,30)(30,30)(40,30)(50,30)(-40,40)(-30,40)(-20,40)(-10,40)(0,40)(10,40)(20,40)(30,40)(40,40)(-30,50)(-20,50)"
"(-10,50)(0,50)(10,50)(20,50)(30,50)(0,60)";
QString StrPlotEightInch = "(-44,-72)(-30,-72)(-16,-72)(-2,-72)(12,-72)(26,-72)(40,-72)(-58,-58)"
"(-44,-58)(-30,-58)(-16,-58)(-2,-58)(12,-58)(26,-58)(40,-58)(54,-58)"
"(-72,-44)(-58,-44)(-44,-44)(-30,-44)(-16,-44)(-2,-44)(12,-44)(26,-44)"
"(40,-44)(54,-44)(68,-44)(-72,-30)(-58,-30)(-44,-30)(-30,-30)(-16,-30)"
"(-2,-30)(12,-30)(26,-30)(40,-30)(54,-30)(68,-30)(-72,-16)(-58,-16)"
"(-44,-16)(-30,-16)(-16,-16)(-2,-16)(12,-16)(26,-16)(40,-16)(54,-16)"
"(68,-16)(82,-16)(-72,-2)(-58,-2)(-44,-2)(-30,-2)(-16,-2)(-2,-2)"
"(12,-2)(26,-2)(40,-2)(54,-2)(68,-2)(82,-2)(-72,12)(-58,12)(-44,12)"
"(-30,12)(-16,12)(-2,12)(12,12)(26,12)(40,12)(54,12)(68,12)(82,12)"
"(-72,26)(-58,26)(-44,26)(-30,26)(-16,26)(-2,26)(12,26)(26,26)(40,26)"
"(54,26)(68,26)(-72,40)(-58,40)(-44,40)(-30,40)(-16,40)(-2,40)(12,40)"
"(26,40)(40,40)(54,40)(68,40)(-58,54)(-44,54)(-30,54)(-16,54)(-2,54)"
"(12,54)(26,54)(40,54)(54,54)(-44,68)(-30,68)(-16,68)(-2,68)(12,68)"
"(26,68)(40,68)(-16,82)(-2,82)(12,82)";
QString StrPlotFourInch = "(-2,-44)(-30,-30)(-16,-30)(-2,-30)(12,-30)(26,-30)(-30,-16)(-16,-16)"
"(-2,-16)(12,-16)(26,-16)(40,-16)(-44,-2)(-30,-2)(-16,-2)(-2,-2)(12,-2)"
"(26,-2)(40,-2)(-30,12)(-16,12)(-2,12)(12,12)(26,12)(40,12)(-30,26)(-16,26)"
"(-2,26)(12,26)(26,26)(-16,40)(-2,40)(12,40)";
};
#endif // RMS_DLL_H