diff --git a/3rdlib/DeviceManage/DeviceManage.pri b/3rdlib/DeviceManage/DeviceManage.pri
new file mode 100644
index 0000000..3a2a784
--- /dev/null
+++ b/3rdlib/DeviceManage/DeviceManage.pri
@@ -0,0 +1,6 @@
+INCLUDEPATH += \
+ $${PWD}/include
+
+win32 {
+ LIBS += -L$${PWD}/lib -lDeviceManage
+}
diff --git a/3rdlib/DeviceManage/bin/x64/DeviceManage.dll b/3rdlib/DeviceManage/bin/x64/DeviceManage.dll
new file mode 100644
index 0000000..6ca2ae6
Binary files /dev/null and b/3rdlib/DeviceManage/bin/x64/DeviceManage.dll differ
diff --git a/3rdlib/DeviceManage/bin/x64/FTD3XX.dll b/3rdlib/DeviceManage/bin/x64/FTD3XX.dll
new file mode 100644
index 0000000..f3b21ce
Binary files /dev/null and b/3rdlib/DeviceManage/bin/x64/FTD3XX.dll differ
diff --git a/3rdlib/DeviceManage/bin/x64/ScriptProcess.dll b/3rdlib/DeviceManage/bin/x64/ScriptProcess.dll
new file mode 100644
index 0000000..840e477
Binary files /dev/null and b/3rdlib/DeviceManage/bin/x64/ScriptProcess.dll differ
diff --git a/3rdlib/DeviceManage/bin/x64/UAVTransport.dll b/3rdlib/DeviceManage/bin/x64/UAVTransport.dll
new file mode 100644
index 0000000..1f6d1a3
Binary files /dev/null and b/3rdlib/DeviceManage/bin/x64/UAVTransport.dll differ
diff --git a/3rdlib/DeviceManage/bin/x64/ftd2xx64.dll b/3rdlib/DeviceManage/bin/x64/ftd2xx64.dll
new file mode 100644
index 0000000..4c8ab6c
Binary files /dev/null and b/3rdlib/DeviceManage/bin/x64/ftd2xx64.dll differ
diff --git a/3rdlib/DeviceManage/bin/x64/libgsl-dll.dll b/3rdlib/DeviceManage/bin/x64/libgsl-dll.dll
new file mode 100644
index 0000000..59ce132
Binary files /dev/null and b/3rdlib/DeviceManage/bin/x64/libgsl-dll.dll differ
diff --git a/3rdlib/DeviceManage/bin/x86/DeviceManage.dll b/3rdlib/DeviceManage/bin/x86/DeviceManage.dll
new file mode 100644
index 0000000..65224d1
Binary files /dev/null and b/3rdlib/DeviceManage/bin/x86/DeviceManage.dll differ
diff --git a/3rdlib/DeviceManage/bin/x86/FTD3XX.dll b/3rdlib/DeviceManage/bin/x86/FTD3XX.dll
new file mode 100644
index 0000000..51c58a4
Binary files /dev/null and b/3rdlib/DeviceManage/bin/x86/FTD3XX.dll differ
diff --git a/3rdlib/DeviceManage/bin/x86/ScriptProcess.dll b/3rdlib/DeviceManage/bin/x86/ScriptProcess.dll
new file mode 100644
index 0000000..b464306
Binary files /dev/null and b/3rdlib/DeviceManage/bin/x86/ScriptProcess.dll differ
diff --git a/3rdlib/DeviceManage/bin/x86/UAVTransport.dll b/3rdlib/DeviceManage/bin/x86/UAVTransport.dll
new file mode 100644
index 0000000..0400cc3
Binary files /dev/null and b/3rdlib/DeviceManage/bin/x86/UAVTransport.dll differ
diff --git a/3rdlib/DeviceManage/bin/x86/ftd2xx.dll b/3rdlib/DeviceManage/bin/x86/ftd2xx.dll
new file mode 100644
index 0000000..ecafeb7
Binary files /dev/null and b/3rdlib/DeviceManage/bin/x86/ftd2xx.dll differ
diff --git a/3rdlib/DeviceManage/bin/x86/libgsl-dll.dll b/3rdlib/DeviceManage/bin/x86/libgsl-dll.dll
new file mode 100644
index 0000000..9ab9286
Binary files /dev/null and b/3rdlib/DeviceManage/bin/x86/libgsl-dll.dll differ
diff --git a/3rdlib/DeviceManage/include/AnalyzeSpecturmExport.h b/3rdlib/DeviceManage/include/AnalyzeSpecturmExport.h
new file mode 100644
index 0000000..a968ed9
--- /dev/null
+++ b/3rdlib/DeviceManage/include/AnalyzeSpecturmExport.h
@@ -0,0 +1,582 @@
+#ifndef _ANALYZESPECTURMEXPORT_H_
+#define _ANALYZESPECTURMEXPORT_H_
+
+#ifdef ANALYZESPECTURM_EXPORTS
+#define ANALYZESPECTURM_API(type) __declspec(dllexport) type __stdcall
+#else
+#define ANALYZESPECTURM_API(type) __declspec(dllimport) type __stdcall
+#endif
+
+#include "NuclideLibraryDefine.h"
+#include "PeakInfoDefine.h"
+
+#define MSS_SPECTURMDATA_MAXSIZE 65536
+
+#pragma pack(push,1)
+
+//s - Peak fails shape tests.
+//D - Peak area deconvoluted.
+//M - Peak is close to a library peak.
+
+
+enum ePeakUseFlag
+{
+ ePUF_PEAK_FAILED_SHAPE_TEST,
+ ePUF_PEAK_DECONVOLUTED,
+ ePUF_PEAK_FIT_NUCLIDE,
+ ePUF_PEAK_SMALL_POS,
+
+
+ eNF_ACTIVITY_AVG_CALC = 16,
+ eNF_PEAK_TOO_WIDE,
+ eNF_PEAK_MULT_AREA_NEG,
+ eNF_PEAK_TOO_NARROW,
+ eNF_PEAK_FWH25M_WIDE,
+ eNF_PEAK_FAILED_SENS_TEST,
+ eNF_PEAK_IDTY_FIRST_PEAK_FIALED,
+ eNF_LARGE_INCALC_ACTIVITY,
+ eNF_SMALL_INCALC_ACTIVITY,
+ eNF_PEAK_OUTSIDE_ANS_ENERGY_RANGE,
+ eNF_PEAK_CENTROID_IS_NOT_CLOSE_TO_LIB,
+ eNF_PEAK_BACKGROUND_COR,
+};
+
+
+#define IS_POS_CHECKED(flag,pos) ( (flag & (1 << pos)) == (1 << pos) )
+
+#define SET_SHAPE_CHECK_FAILED(flag) (flag |= (1 << ePUF_PEAK_FAILED_SHAPE_TEST))
+#define SET_SHAPE_CHECK_SUCCESS(flag) (flag &= ~(1 << ePUF_PEAK_FAILED_SHAPE_TEST))
+
+#define SET_PEAK_DECONVOLUTED(flag) (flag |= (1 << ePUF_PEAK_DECONVOLUTED))
+#define RESET_PEAK_DECONVOLUTED(flag) (flag &=~(1 << ePUF_PEAK_DECONVOLUTED))
+
+#define SET_PEAK_FIT_NUCLIDE(flag) (flag |= (1 << ePUF_PEAK_FIT_NUCLIDE))
+#define RESET_PEAK_FIT_NUCLIDE(flag) (flag &=~(1 << ePUF_PEAK_FIT_NUCLIDE))
+#define IS_PEAK_FIT_NUCLIDE(flag) IS_POS_CHECKED( flag,ePUF_PEAK_FIT_NUCLIDE)
+
+#define SET_PEAK_SMALL(flag) (flag |= (1 << ePUF_PEAK_SMALL_POS))
+#define RESET_PEAK_SMALL(flag) (flag &=~(1 << ePUF_PEAK_SMALL_POS))
+#define IS_PEAK_SMALL(flag) IS_POS_CHECKED( flag,ePUF_PEAK_SMALL_POS)
+
+
+#define IS_NI_FLAG_CHECKED(flag,v) ( (flag &( 1 << v)) == (1 << v))
+#define SET_NI_FLAG(flag,v) (flag |= (1 << v))
+#define RESET_NI_FLAG(flag,v) (flag &= ~(1 << v))
+
+#define IS_NI_KEY_LINE(flag) IS_NI_FLAG_CHECKED(flag,eNI_K)
+#define IS_NI_NOT_IN_AVG(flag) IS_NI_FLAG_CHECKED(flag,eNI_A)
+
+#define SET_ACTIVITY_AVG_CALC(flag) SET_NI_FLAG(flag,eNF_ACTIVITY_AVG_CALC)
+#define IS_ACTIVITY_AVG_CALC_SET(flag) IS_NI_FLAG_CHECKED(flag,eNF_ACTIVITY_AVG_CALC)
+
+#define SET_LARGE_INCALC_ACTIVITY(flag) SET_NI_FLAG(flag,eNF_LARGE_INCALC_ACTIVITY)
+
+#define SET_SMALL_INCALC_ACTIVITY(flag) SET_NI_FLAG(flag,eNF_SMALL_INCALC_ACTIVITY)
+
+#define SET_PEAK_FAILED_SENS_TEST(flag) SET_NI_FLAG(flag,eNF_PEAK_FAILED_SENS_TEST)
+
+
+enum eLinearFitType
+{
+ eLFTNone,
+ // 线性插值
+ eInterpolative,
+ // 一次函数,2个未知数
+ eLine2,
+ // 二次函数,3个未知数
+ eLine3,
+ // 多次函数
+ eEFTPloy,
+ // 一次函数,2个未知数,有权重拟合
+ eLine2WithW,
+ // 二次函数,3个未知数,有权重拟合
+ eLine3WithW,
+ eLine4,// 三次函数拟合
+};
+
+typedef struct sLinearFitResult
+{
+ eLinearFitType type;
+ double a;
+ double b;
+ double c;
+ double d;
+ double e;
+ double f;
+ double sa;
+ double sb;
+ double sc;
+ double sd;
+ double se;
+ double sf;
+ double chisq;
+}sLinearFitResult;
+
+class NuclideLibrary;
+struct sDataInfo
+{
+ int *pOrgData;
+ int Orglen;
+
+ double dRealTime;
+ double dLiveTime;
+
+ int iPeakBeginCh; // 峰开始道址
+
+ NuclideLibrary *pNuclideLibaray;
+};
+
+typedef struct sSmoothConfig
+{
+ int bUseGaussSmoothNum;
+ int bUseGaussSmoothTimes;
+}sSmoothConfig;
+
+typedef struct sPeakSearchConfig
+{
+ double dSerachSensity;
+ int iChNumOnEachSide;
+
+ double dSfwhmRadioFwhmMaxValue;
+ double dSheightRadioHeightValue;
+}sPeakSearchConfig;
+
+typedef struct sResolvePeakConfig
+{
+ double dnofwhmofpeak;
+ double dnofwhmofSideBaseLine;
+}sResolvePeakConfig;
+
+typedef struct sMatchPeaksConfig
+{
+ double toler;
+ double dprob;
+}sMatchPeaksConfig;
+
+typedef struct sPeakInfoConfig
+{
+ BOOL isroi;
+ int leftch;
+ int righch;
+ int n;
+ int cursorpeak;
+}sPeakInfoConfig;
+
+typedef struct sCursorOnePeakInfo
+{
+ double dChannel; // 峰所在道址
+ double dEnergy; // 峰所在的能量
+ int iNIChannel;
+ double dNIEnergy;
+ int iLeftChannel;
+ int iRightChannel;
+ char cNName[32];
+ double fwhm;
+ double fwh5m;
+ double dGrossArea;
+ double dGrossAreaCountRate;
+ double dNetArea;
+ double dNetAreaCountRate;
+ double dNetAreaUncertain;
+ double dcA; // counting activity,
+
+}sCursorOnePeakInfo;
+
+typedef struct sPeakInfoResult
+{
+ double* pSmoothData;
+ int iSmoothDataLen;
+
+ double* pSecDiffData;
+ int iSecDiffDataLen;
+
+ sCursorOnePeakInfo peakinfo;
+}sPeakInfoResult;
+
+typedef struct sConfigInfo
+{
+ sSmoothConfig smoothconfig;
+ sPeakSearchConfig peaksearchconfig;
+ sResolvePeakConfig resolvepeakconfig;
+ sLinearFitResult energycal; // 能量刻度
+ sMatchPeaksConfig matchpeakconfig;
+ sPeakInfoConfig peakInfoConfig;
+}sConfigInfo;
+
+
+typedef struct OneValue
+{
+ double v;
+ double sv;
+}OneValue;
+
+typedef struct sOneBaseLineInfo
+{
+ eLinearFitType type;
+ int leftch;
+ int rightch;
+ OneValue a;
+ OneValue b;
+ OneValue c;
+ OneValue d;
+ double chisq;
+ double leftsmoothpoint;
+ double rightsmoothpoint;
+ double leftvalue;
+ double rightvalue;
+ double peakpos;
+
+ double grossarea;
+ double bdarea;
+ OneValue netarea;
+
+ double directfitnetarea;
+}sOneBaseLineInfo;
+
+typedef struct sOnePeakInfo
+{
+ OneValue height;
+ OneValue centor;
+ OneValue width;
+ // 半高宽,道址
+ OneValue fwhm;
+ ////y = a*exp(-b*(x-c)^2)); fwhmwidth = b
+ double fwhmwidth;
+ // 半高宽,道址
+ OneValue fittedfwhm;
+ // //y = a*exp(-b*(x-c)^2)); fittedwidth = b
+ OneValue fittedwidth;
+ OneValue area;
+ OneValue bdarea;
+
+ double leftch;
+ double rightch;
+
+ double energy;
+
+ int flag;
+
+ double leftsmoothpoint;
+ double rightsmoothpoint;
+ double leftvalue;
+ double rightvalue;
+
+ // 活度 校正到开始测量时的活度
+ OneValue activity;
+ // MDA
+ OneValue mda;
+ sOneNuclideInfo oni;
+ sOneEnergyLine onl;
+ sOneBaseLineInfo obli;
+}sOnePeakInfo;
+
+typedef struct sMulPeakInfo
+{
+ int MulPeakNum;
+ sOnePeakInfo peakinfo;
+}sMulPeakInfo;
+
+
+typedef struct sBaseLineInfo
+{
+ sOneBaseLineInfo leftbaseline;
+ sOneBaseLineInfo rightbaseline;
+ sOneBaseLineInfo peakbaseline;
+}sBaseLineInfo;
+
+class _sOneNuclideActivity;
+typedef struct sResultInfo
+{
+ char measureDate[32];
+ double dRealTime;
+ double dLiveTime;
+ int sprtLen;
+ double* pSmoothData;
+ int iSmoothDataLen;
+
+ double* pSecDiffData;
+ int iSecDiffDataLen;
+
+ double* pCandidatePeaks;
+ int iCandidatePeakNum;
+
+ int iFinalPeakNum; // 两个作用 inout 传入内存大小,字节单位,传出峰数量
+ int iNotEnoughMemery;
+ sOnePeakInfo* pSearchPeakResult;
+
+ sLinearFitResult linFitResult;
+
+ int iBaseLineNum; // 两个作用 inout 传入内存大小,字节单位,传出数量
+ int iNotEnoughMemeryofBaseLine;
+ sBaseLineInfo *pBaselineInfo;
+
+ int iMulPeakNum; // 两个作用 inout 传入内存大小,字节单位,传出重叠峰和单峰的数量
+ int iNotEnoughMemeryofMulPeak;
+ sMulPeakInfo *pMulPeakInfo;
+
+ int iNucResultNum; // 两个作用 inout 传入内存大小,字节单位,传出核素的数量
+ int iNotEnoughMemeryofNucResult;
+ _sOneNuclideActivity *pNucResultInfo;
+}sResultInfo;
+
+
+struct sFitData
+{
+ eLinearFitType type;
+ int size;
+ double *px;
+ double *py;
+ double *pw;
+};
+
+typedef struct ASDataInfo
+{
+ int* pHandle; // 设备句柄
+ int bdidx;
+ int chidx;
+ double beginchannel;
+ double endchannel;
+ eDisplaSprtInfoType calcType;
+ double energy;
+ eCalcSprtSubInfoType sprtSubType;
+ unsigned char reserve[20];
+}ASDataInfo;
+
+enum eSearchPeakSensityLevel
+{
+ eSPS_1,
+ eSPS_2,
+ eSPS_3,
+ eSPS_4,
+ eSPS_5
+};
+
+typedef struct OneDefaultConfig
+{
+ BOOL enalbe;
+ BOOL useInternal;
+ char path[MAX_PATH];
+}OneDefaultConfig;
+
+enum eBackgroundType
+{
+ eBTAuto,
+ eBTOne,
+ eBTThree,
+ eBTFive,
+};
+
+typedef struct AnalysisSampleConfig
+{
+ // 描述
+ char Description[128];
+ // 分析范围
+ double beginchannel;
+ double endchannel;
+ // 随机相加
+ double RandomSum;
+ // 本底类型
+ eBackgroundType BGType;
+ // 核素库
+ OneDefaultConfig NuclideLib;
+ // 校正文件,能量刻度,效率刻度
+ OneDefaultConfig Clb;
+}AnalysisSampleConfig;
+
+enum eMDAType
+{
+ eMDATP_1
+};
+
+enum eASUnit
+{
+ eASUBq,
+ eASUuCi,
+};
+
+typedef struct AnalysisSystemConfig
+{
+ // 实验室名
+ char LaboratoryName[128];
+ // 操作员名
+ char OperatorName[128];
+ // MDA类型
+ eMDAType mdaType;
+ // 寻峰参数
+ eSearchPeakSensityLevel eSPSLevel;
+ // 匹配配置
+ double dlibMatchWidth;
+ // 分支比限制 100
+ double dlibFractionLimit;
+ // 可疑核素库
+ OneDefaultConfig libSuspect;
+ // 单位
+ eASUnit asuUit;
+ double asuMultiplier;
+ double asuDivisor;
+ char asuActivity[32];
+ double asuSize;
+ char asuSizeUnit[32];
+ double asuSizeUncertain;
+}AnalysisSystemConfig;
+
+typedef struct AnalysisDecayConfig
+{
+ // 衰减校正
+ BOOL bDecayCorrection;
+ // 衰减校正 yyyy-MM-dd HH:mm:ss
+ char bDCDateTime[32];
+ // 谱线采集校正
+ BOOL bAcquisitionCorr;
+
+ // 样品采集时间校正
+ BOOL bSampleCorrect;
+ // 样品采集时间校正 yyyy-MM-dd HH:mm:ss
+ char bSCStartDateTime[32];
+ // 样品采集时间校正yyyy-MM-dd HH:mm:ss
+ char bSCStopDateTime[32];
+}AnalysisDecayConfig;
+
+enum eUncertainReportUnitType
+{
+ eUPUTPercent,
+ eUPUTActivity
+};
+
+enum eUncertainReportValueType
+{
+ eUPVTCouting,
+ eUPTVTotal
+};
+
+enum eUncertainLevel
+{
+ eULOne,
+ eULTwo,
+ eULThree,
+};
+
+enum eOutputType
+{
+ eOTPrinter,
+ eFile,
+ eProgram,
+};
+
+typedef struct AnalysisReportConfig
+{
+ // 报告峰信息
+ int dReportOption;
+ // 不确定度报告单位
+ eUncertainReportUnitType URUTType;
+ // 不确定度报告值类型
+ eUncertainReportUnitType URVTType;
+ // 不确定度水平
+ eUncertainLevel UncertainLevel;
+ // 输出类型
+ eOutputType OTType;
+ // 显示解谱结果
+ BOOL bDisplayAnalysisResult;
+ // 输出文件配置
+ char FileProgramInfo[260];
+ // 输出程序配置
+ char ProgramInfo[260];
+ // 报告器配置
+ char ReporterInfo[260];
+}AnalysisReportConfig;
+
+typedef struct AnalysisMethodConfig
+{
+ // 额外误差 %
+ double dSystematic;
+ // 随机误差
+ double dRandom;
+}AnalysisMethodConfig;
+
+typedef struct AnalysisCorrectionConfig
+{
+ // 峰本底校正
+ OneDefaultConfig PBC;
+ // 几何校正
+ OneDefaultConfig GeometryC;
+ // 衰减校正
+ OneDefaultConfig AttenuationC;
+}AnalysisCorrectionConfig;
+
+typedef struct AnalysisDataDealConfig
+{
+ int bUseGaussSmoothNum;
+ int bUseGaussSmoothTimes;
+ // 峰形测试
+ double dSfwhmRadioFwhmMaxValue;
+ double dSheightRadioHeightValue;
+ // 解谱
+ double dnofwhmofpeak;
+ double dnofwhmofSideBaseLine;
+
+ unsigned char reserve[128];
+}AnalysisDataDealConfig;
+
+typedef struct AnalysisSpecturmConfig
+{
+ AnalysisSampleConfig ascSample;
+ AnalysisSystemConfig ascSystem;
+ AnalysisDecayConfig ascDecay;
+ AnalysisReportConfig ascReport;
+ AnalysisMethodConfig ascMethod;
+ AnalysisCorrectionConfig ascCorrection;
+ AnalysisDataDealConfig ascDataDeal;
+
+ unsigned char reserve[128];
+}AnalysisSpecturmConfig;
+
+class _sOneNuclideActivity
+{
+public:
+ sOneNuclideInfo info;
+ OneValue activity;
+ OneValue totalActivityUncertain;
+ OneValue mda;
+};
+
+typedef struct AnalyzeSpecturmConfigInfo
+{
+ int head;
+ int version;
+ char CreateTime[32];
+ char LastModifyTime[32];
+ char Desc[128];
+ unsigned char reserve[256];
+}AnalyzeSpecturmConfigInfo;
+
+#pragma pack(pop)
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ ANALYZESPECTURM_API(int) NuclideIndentifaction(int*pInst, sDataInfo* pSpecturmData, sConfigInfo *pConfig, sResultInfo *pResultInfo, char *ErrorInfo);
+
+ ANALYZESPECTURM_API(int) NuclideIndentifactionV2(int*pInst, ASDataInfo* pASDI, sConfigInfo *pConfig, sResultInfo *pResultInfo, char *ErrorInfo);
+
+ ANALYZESPECTURM_API(int) NuclideIndentifactionV3(int*pInst, ASDataInfo* pASDI, sResultInfo *pResultInfo, char *ErrorInfo);
+
+ ANALYZESPECTURM_API(int) FitLinear(int*pInst, sFitData* pSpecturmData, sLinearFitResult *pResultInfo, char *ErrorInfo);
+
+ ANALYZESPECTURM_API(int*) GetInst(char *ErrorInfo);
+ ANALYZESPECTURM_API(int) FreeInst(int*pInst);
+
+ ANALYZESPECTURM_API(int) GetAnalyzeSpecturmConfig(AnalyzeSpecturmConfigInfo *pInfo, AnalysisSpecturmConfig *pconfig, char *ErrMsg);
+
+ ANALYZESPECTURM_API(int) SetAnalyzeSpecturmConfig(AnalyzeSpecturmConfigInfo *pInfo, AnalysisSpecturmConfig *pconfig, char *ErrMsg);
+
+ ANALYZESPECTURM_API(int) SaveAnalyzeSpecturmConfig(const char *path, char *ErrMsg);
+
+ ANALYZESPECTURM_API(int) ReadAnalyzeSpecturmConfig(const char *path, char *ErrMsg);
+
+ ANALYZESPECTURM_API(int) GetCusorNuclideInfo(int*pInst, ASDataInfo* pASDI, sResultInfo *pResultInfo, char *ErrorInfo);
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _ANALYZESPECTURMEXPORT_H_
\ No newline at end of file
diff --git a/3rdlib/DeviceManage/include/DeviceManage.h b/3rdlib/DeviceManage/include/DeviceManage.h
new file mode 100644
index 0000000..7136db5
--- /dev/null
+++ b/3rdlib/DeviceManage/include/DeviceManage.h
@@ -0,0 +1,371 @@
+#pragma once
+#include "UAVrtp.h"
+// #ifdef DEVICEMANAGE_EXPORTS
+// #include "UserConfigInfo.h"
+// #include "OneChannelConfigInfo.h"
+// #include "OneDeviceComptonSuppressSetting.h"
+// #endif
+
+#ifdef DEVICEMANAGE_EXPORTS
+#define DEVICEMANAGE_API(type) extern "C" _declspec(dllexport) type _stdcall
+#else
+#define DEVICEMANAGE_API(type) extern "C" _declspec(dllexport) type _stdcall
+#endif
+// #include "OneComptonResultDataExport.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ enum eMCSystemType
+ {
+ eReserve,
+ eHPGEDEFAULE = 1,
+ eCombineDevice = 2,
+ eProxyDevice = 3,
+ eRoundMC = 10,
+ eRoundMCV1 = 11, // 绗簩閫氶亾璁℃暟
+ eRoundMCHightThroughtput = 12, // 鍦嗙瓛澶氶亾楂樿鏁扮巼
+ eFP5XMC = 13,
+ eDMCA2023 = 14,
+ eHPGEMC = 30,
+ eMulParamMC = 50,
+ eDP3402PLUSMC = 51,
+ eMulParam863MC = 60,
+ eNeutronCount = 70,
+ eAnalogMC = 80,
+ eAnalogDigtalMC = 81,
+ eHightThroughtMC=90,
+ eHightThroughtMCCh2 = 91,
+ eGeneralMC = 92,
+ eAlphaMC = 93,
+ eHVDevice = 100,
+};
+
+// 娣诲姞鏂扮殑閲囨牱鐜囧悗锛岄渶瑕佹敞鎰忓湪DeviceInfo.cpp涓坊鍔犲搴旂殑绱㈠紩
+// 娣诲姞鏂扮殑閲囨牱鐜囧悗锛岄渶瑕佹敞鎰忓湪DeviceInfo.h 涓慨鏀筍ampleRateInMbpsToSampleRate淇敼
+enum eSampleRate
+{
+ eNone,
+ e80M,
+ e250M,
+ e500M,
+ e50M,
+ e200M,
+ e1G,
+ e125M,
+};
+
+#pragma pack(push,1)
+
+struct sDeviceInfo
+{
+ char GUID[64];
+ char SystemVersion[16];
+ char CommVersion[16];
+ eMCSystemType type;
+ char MacAddr[32];
+ char FilePath[MAX_PATH];
+ unsigned char reserve[60];
+};
+
+class ChannelOpInfo
+{
+public:
+ BOOL canop;
+ double adcperiod;
+ eSampleRate samplerate;
+ double lmperiod;
+ int adcmaxvalue;
+ double adcvoltageinmv;
+};
+typedef struct sDeviceDataPtr
+{
+ int totalNum;
+ void *pData[64];
+}sDeviceDataPtr;
+
+class DeviceData
+{
+public:
+ int len = 1024*1024;
+ BYTE pdata[1024*1024];
+};
+enum eDeviceManageOperate
+{
+ eAddDevice,
+ eRemoveDevice,
+};
+
+enum eDeviceType
+{
+ // 纭欢璁惧
+ eHardwareDevice,
+ // 鍥炴斁璁惧
+ eReplayDevice,
+ // 鏂囦欢璁惧
+ eFileDevice,
+ // 纭欢缁勫悎璁惧
+ eHardwareCombineDevice,
+ // 鍥炴斁缁勫悎璁惧
+ eReplayCombineDevice,
+ // 浠g悊璁惧
+ eDTProxyDevice,
+};
+
+enum eSprtOptType
+{
+ eAdd,
+ eDec,
+};
+
+enum eDisplaSprtInfoType;
+
+
+typedef struct sOneSprtOptInfo
+{
+ void *pdev;
+ int bdidx;
+ int chidx;
+ eSprtOptType opttype;
+ eDisplaSprtInfoType sprttype;
+}sOneSprtOptInfo;
+
+class OneNeutronData
+{
+public:
+ int chnum;
+ __int64 measuretime;
+ __int64 lowercount;
+ __int64 betweencount;
+ __int64 ttlcount;
+ unsigned char reserve[32];
+};
+
+#ifndef DEVICEMANAGE_EXPORTS
+#define ALIAS_NALE_LEN 64
+
+enum eTransferMode
+{
+ eSpecturmMode,
+ eFormWaveMode,
+ eADCMode,
+ eListMode,
+ eABMode,
+};
+
+enum eAutoSteadyStatus
+{
+ a, // 鏈紑鍚,
+ b, // 绋宠氨涓,
+ c, // 绋宠氨瀹屾垚,
+ d, // 涓嶆敮鎸,
+ e, // 鏍″噯涓,
+ f, // 绋宠氨澶辫触,
+ g, // 鏍″噯澶辫触,
+ h, // 绛夊緟涓,
+};
+
+typedef struct sAutoSteadyParam
+{
+ BOOL bEnable;
+ eAutoSteadyStatus status;
+ float offset; // 10
+ float a;
+ float b;
+ float c;
+ unsigned short maxchanneldivfactor;
+ unsigned short peakchannel; // 26
+ unsigned short steadyPeriodInSec; // 28
+ unsigned short peakhalfwidth; // 30
+ double dc;
+}sAutoSteadyParam;
+
+class UserConfigInfo
+{
+public:
+ char m_cAliasName[ALIAS_NALE_LEN];
+ char _strMCName[32];
+ int _iBDNum;
+ int _iChNum;
+ BOOL _bDisplayOrgCptSprt;
+ BOOL _bDisplayComptonCptSprt;
+ BOOL _bDisplayAntiComptonCptSprt;
+ BOOL _bDisplayLMSprt;
+ BOOL _bDisplayRiseTimeSprt;
+ BOOL _bDisplayFallTimeSprt;
+ __int64 _i64AdjustTickCount;
+ __int64 _i64MinAllowTickCount;
+ __int64 _i64MaxAllowTickCount;
+ BOOL _bDisplayConfig;
+ BOOL _bSaveLMData;
+ BOOL _bWork;
+ sAutoSteadyParam asp;
+ char m_cReserve[16];
+};
+
+class OneChannelConfigInfo
+{
+public:
+ void *__vfp;
+ ///
+ /// 鏁版嵁浼犺緭妯″紡
+ ///
+ eTransferMode m_eTransferModel = eSpecturmMode;
+ ///
+ /// 纭欢澧炵泭
+ ///
+ int m_iDeviceGain = 1;
+ ///
+ /// 纭欢澧炵泭
+ ///
+ int m_iDeviceGainSelectIndex = 1;
+ ///
+ /// 杞欢澧炵泭
+ ///
+ int m_iSoftGain = 3000;
+ ///
+ /// 鏃堕棿甯告暟
+ ///
+ double m_dConstTime = 45;
+ ///
+ /// 鎴愬舰鏃堕棿
+ ///
+ int m_iFormTime = 3;
+ ///
+ /// 蹇氶亾瑙﹀彂闃堝
+ ///
+ double m_iFastChannelTrigerValue = 10;
+ ///
+ /// 澶氶亾鍒嗚鲸鐜
+ ///
+ int m_iChannelNum = 1024;
+
+ int m_iHighVoltage = 0;
+
+ // sParamConfig ParamConfig;
+ ///
+ /// 杈撳叆12V淇″彿琛板噺鎺у埗锛1涓狝SCii瀛楃琛ㄧず锛夈傗0鈥欒〃绀哄叧闂紝鈥1鈥欒〃绀哄惎鐢ㄨ“鍑忥紝鍋忕Щ閲2
+ ///
+ int m_iInputVoltageDesc = 0;
+ ///
+ /// CR寰垎妯″紡鍚敤锛1涓狝SCii瀛楃琛ㄧず锛夈傗0鈥欒〃绀哄叧闂紝鈥1鈥欒〃绀哄惎鐢–R寰垎锛屽亸绉婚噺3銆傚浜庡浣嶅瀷鍓嶆斁鍏惰緭鍑虹殑涓洪樁姊俊鍙凤紝姝ゆ椂搴斿惎鐢–R寰垎锛屽惁鍒欏彲涓嶅惎鐢
+ ///
+ int m_iCRDivMode = 0;
+ ///
+ /// 杈撳叆淇″彿姝h礋鏋佹ч夋嫨锛1涓狝SCii瀛楃琛ㄧず锛夈傗0鈥欒〃绀鸿礋淇″彿锛屸1鈥欒〃绀烘淇″彿锛屽亸绉婚噺4
+ ///
+ int m_iInputSignalPostive = 0;
+ ///
+ /// 绗竴浣嶄负绗﹀彿浣嶏紝鍚庡洓浣嶄负鏁板硷紝浠V涓哄崟浣,璀鈥+0200鈥欒〃绀虹洿娴佸亸绉200mV, 鍦板潃鍋忕Щ閲5-9
+ ///
+ int m_iCurrentOffset = 0;
+ ///
+ /// 鏈澶ц兘閲忚寖鍥达紝浠eV涓哄崟浣嶏紙5涓狝SCII瀛楃锛 璀鈥04000鈥欙紝琛ㄧず鏈澶ц兘閲忚寖鍥翠负4MeV銆傝缃负鍏ㄩ浂鈥00000鈥欏垯琛ㄧず鍏抽棴鑷姩绋宠氨鍔熻兘銆
+ ///
+ int m_iMaxEnergy = 0;
+ ///
+ /// Am宄伴潰绉宄版硶鐨勯潰绉瘮渚 渚嬪锛氣15鈥欒〃绀烘埅鍙栧嘲椤堕珮搴15%鐨勯潰绉敤浜庨潰绉硶瀵诲嘲
+ ///
+ int m_iAMPeakDiv = 0;
+ ///
+ /// K-40涓嶢m-241鐨勫嘲浣嶆牎姝g郴鏁 渚嬪锛氣24513鈥欒〃绀篕-40涓嶢m-241鐨勫嘲浣嶆崲绠楃郴鏁颁负24.513
+ ///
+ short m_iHVDelt = 0;
+ short m_iHVCtrl = 0;
+
+ int m_iGetSpecturmPeirod = 1;
+
+ __int64 m_iTotalMeasureTime = 10;
+ int m_iTotalMeasureCount = 1;
+
+ int m_iTrapeTopShitBit = 0;
+
+ int m_iRiseTime = 2;
+ int m_iTopTime = 2;
+
+ BOOL m_bICRCorrect = FALSE;
+
+ int m_iCRZAValue = 0;
+
+ int m_iZAEnable = 30;
+
+ BYTE reserve[128];
+
+ UserConfigInfo m_pUserConfigInfo;
+};
+#endif
+
+typedef void(__stdcall *ONFINDDEVICEFINISHED)(int ret, sDeviceList* pDeviceList);
+
+typedef void(__stdcall *ONUPDATEONEDEVICEBOARDDATA)(void* pHandle, sDeviceDataPtr *pdata);
+
+typedef void(__stdcall *ONUPDATEONEDEVICECOMPTOMSUPRESSDATA)(void* pHandle,void *pComptonSet, sDeviceDataPtr *pdata);
+
+typedef void(__stdcall *ONDEVICEMANAGECHANGED)(eDeviceManageOperate op, int ret, sDeviceList *pDeviceList);
+
+typedef void(__stdcall *ONUPDATE_NEUTRONDATA)(void* pHandle, int ret, OneNeutronData* pData, int iLen);
+
+typedef void(__stdcall *ONUPDATE_DEVICE_CONFIG)(void* pHandle, int bdnum,int chnum, void* pData, int iLen,void *pData2, int iLen2);
+
+typedef void(__stdcall *ONUPDATE_PRESENT_CONFIG)(void* pHandle, int bdnum, int chnum);
+
+// 鏇存柊璁惧閰嶇疆缁撴瀯淇℃伅
+typedef void(__stdcall *ONUPDATE_DEVICE_STRUCT)(void* pHandle,void *pParent,int maxParentNum,void *pChild,int MaxChildNum, void *reserve);
+
+
+DEVICEMANAGE_API(int) FindDeviceAsync(sFindDeviceConfig *fdc, ONFINDDEVICEFINISHED OnFindFinished);
+DEVICEMANAGE_API(int) GetDeviceInfo(void *pHandle, sDeviceInfo *spDi, int budnum, int chnum);
+DEVICEMANAGE_API(int) GetDeviceBoardTotalNum(void *pHandle);
+DEVICEMANAGE_API(int) GetDeviceChTotalNum(void *pHandle, int bdidx);
+
+// DEVICEMANAGE_API(int) GetDeviceUserInfo(void *pHandle, UserConfigInfo *pUCI);
+// DEVICEMANAGE_API(int) SetDeviceUserInfo(void *pHandle, UserConfigInfo *pUCI);
+// DEVICEMANAGE_API(int) GetDeviceBoardUserInfo(void *pHandle, UserConfigInfo *pUCI, int bdidx);
+// DEVICEMANAGE_API(int) GetDeviceBoardChannelUserInfo(void *pHandle, UserConfigInfo *pUCI, int bdidx, int chidx);
+// DEVICEMANAGE_API(int) SetDeviceBoardChannelUserInfo(void *pHandle, UserConfigInfo *pUCI, int bdidx, int chidx);
+DEVICEMANAGE_API(int) GetDeviceBoardChannelConfiginfo(void *pHandle, OneChannelConfigInfo *pUCI, int bdidx, int chidx);
+
+DEVICEMANAGE_API(int) DBCSetHightVoltage(void *pHandle, OneChannelConfigInfo *pUCI, int bdidx, int chidx);
+DEVICEMANAGE_API(int) DBCSoftParamConfig(void *pHandle, OneChannelConfigInfo *pUCI, int bdidx, int chidx);
+DEVICEMANAGE_API(int) DBCHardDeviceParamConfig(void *pHandle, OneChannelConfigInfo *pUCI, int bdidx, int chidx);
+
+DEVICEMANAGE_API(int) DBCStartMeasure(void *pHandle, int bdidx, int chidx);
+DEVICEMANAGE_API(int) DBCStopMeasure(void *pHandle, int bdidx, int chidx);
+DEVICEMANAGE_API(int) DBCGetData(void *pHandle, int totalnum, DeviceData *pDevData, int bdidx, int chidx);
+DEVICEMANAGE_API(int) DBCCombineGetData(void *pHandle, int totalnum, DeviceData *pDevData, int bdidx, int chidx);
+DEVICEMANAGE_API(int) DBCSetUpdateDeviceBoardDataCallBack(void *pHandle, ONUPDATEONEDEVICEBOARDDATA d);
+DEVICEMANAGE_API(int) DBCSetUpdateDeviceBoardLMPointDataCallBack(void *pHandle, ONUPDATEONEDEVICEBOARDDATA d);
+DEVICEMANAGE_API(int) DBCClearData(void *pHandle, int bdidx, int chidx);
+DEVICEMANAGE_API(int) DBCSaveConfig(void *pHandle);
+
+
+// DEVICEMANAGE_API(int) DBCSetUpdateDeviceComptonSupressResultCallBack(void *pHandle, ONUPDATEONEDEVICECOMPTOMSUPRESSDATA d);
+
+// DEVICEMANAGE_API(int) DBCGetDeviceAntiComptonSetting(void *pHandle, OneDeviceComptonSuppressSetting *pDevSet);
+// DEVICEMANAGE_API(int) DBCGetDeviceOneMainAntiComptonSetting(void *pHandle, OneComptonSuppressSetting *pOneSet, int mainidx);
+// DEVICEMANAGE_API(int) DBCGetDeviceOneSubAntiComptonSetting(void *pHandle, OneComptonSuppressSetting *pOneSet, int mainidx, int subidx);
+// DEVICEMANAGE_API(int) DBCSetDeviceOneMainAntiComptonSetting(void *pHandle, OneComptonSuppressSetting *pOneSet, int mainidx);
+// DEVICEMANAGE_API(int) DBCSetDeviceOneSubAntiComptonSetting(void *pHandle, OneComptonSuppressSetting *pOneSet, int mainidx, int subidx);
+
+DEVICEMANAGE_API(void) DM_Con_Flushout();
+DEVICEMANAGE_API(void) DM_Con_KeyPressEvent(char c, int codetype);
+DEVICEMANAGE_API(void) DM_Con_Init(char *pStdOutBuff, int pStdOutBuffLen, char *pStdErrBuff, int pStdErrBuffLen);
+DEVICEMANAGE_API(void) DM_Con_Exit();
+DEVICEMANAGE_API(void) DM_Con_Run();
+DEVICEMANAGE_API(void) DM_Con_Free(void *buf);
+DEVICEMANAGE_API(int) CloseDevice(void *pHandle);
+
+// 鑾峰彇鏉垮崱閫氶亾瀵瑰簲鐨勮澶
+DEVICEMANAGE_API(void*) DMGetOperateDevice(void *pHandle, int bdidx, int chidx);
+// 璁剧疆鏌ヨ淇濆瓨lmaa鏍煎紡
+// set 鍙傛暟涓篎ALSE琛ㄧず璇诲彇褰撳墠淇℃伅锛屽鏋滀负TRUE琛ㄧず璁剧疆淇℃伅
+// DEVICEMANAGE_API(int) DBCSaveAntiLMDataToFile(void *pHandle, int bdidx, int chidx, BOOL set, BOOL *bEnable, char *filename);
+
+#pragma pack(pop)
+
+#ifdef __cplusplus
+}
+#endif
+
+
diff --git a/3rdlib/DeviceManage/include/DeviceManageDefine.h b/3rdlib/DeviceManage/include/DeviceManageDefine.h
new file mode 100644
index 0000000..ea18715
--- /dev/null
+++ b/3rdlib/DeviceManage/include/DeviceManageDefine.h
@@ -0,0 +1,34 @@
+#pragma once
+#ifdef DEVICEMANAGE_EXPORTS
+#define DEVICEMANAGE_API_DM_C(type) extern "C" _declspec(dllexport) type _stdcall
+#else
+#define DEVICEMANAGE_API_DM_C(type) extern "C" _declspec(dllexport) type _stdcall
+#endif
+
+#include "OneChannelDataDefine.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ DEVICEMANAGE_API_DM_C(void*) DMCreateOneFileDevice();
+ DEVICEMANAGE_API_DM_C(int) DBCSetOneChannelSprtData(sCursorInfo *pci, OneSpecturmDataInfo *osdi);
+
+ // 保存读取文件
+ DEVICEMANAGE_API_DM_C(int) DBCSaveDeviceDataToDdf(int *pHandle, const char *path, char* szErrMsg);
+ DEVICEMANAGE_API_DM_C(int) DBCSaveDeviceDataToGID(int *pHandle, const char *path, char* szErrMsg);
+ DEVICEMANAGE_API_DM_C(int) DBCSaveDeviceDataToSpe(int *pHandle, const char *path, char* szErrMsg);
+ DEVICEMANAGE_API_DM_C(int) DBCSaveDeviceDataToChn(int* pHandle, const char* path, char* szErrMsg);
+ DEVICEMANAGE_API_DM_C(int) DBCSaveDeviceDataToCnf(int* pHandle, const char* path, char* szErrMsg);
+ DEVICEMANAGE_API_DM_C(int) DBCSaveDeviceDataToSpc(int* pHandle, const char* path, char* szErrMsg);
+ DEVICEMANAGE_API_DM_C(int) DBCSaveDeviceDataToPHD(int *pHandle, const char *path, char* szErrMsg);
+ DEVICEMANAGE_API_DM_C(int) DBCReadDeviceDataFromDdf(const char *path, char* szErrMsg);
+ DEVICEMANAGE_API_DM_C(int) DBCReadDeviceDataFromChn(const char* path, char* szErrMsg);
+ DEVICEMANAGE_API_DM_C(int) DBCReadDeviceDataFromCnf(const char* path, char* szErrMsg);
+ DEVICEMANAGE_API_DM_C(int) DBCReadDeviceDataFromSpc(const char* path, char* szErrMsg);
+ DEVICEMANAGE_API_DM_C(int) DBCReadDeviceDataFromSpe(const char *path, char* szErrMsg);
+ DEVICEMANAGE_API_DM_C(int) DBCReadDeviceDataFromPHD(const char *path, char* szErrMsg);
+
+#ifdef __cplusplus
+}
+#endif
\ No newline at end of file
diff --git a/3rdlib/DeviceManage/include/NuclideLibraryDefine.h b/3rdlib/DeviceManage/include/NuclideLibraryDefine.h
new file mode 100644
index 0000000..157d6dd
--- /dev/null
+++ b/3rdlib/DeviceManage/include/NuclideLibraryDefine.h
@@ -0,0 +1,116 @@
+#pragma once
+#pragma pack(push,1)
+
+#ifdef DEVICEMANAGE_EXPORTS
+#define DEVICEMANAGE_API_NUCLIB_C(type) extern "C" _declspec(dllexport) type _stdcall
+#else
+#define DEVICEMANAGE_API_NUCLIB_C(type) extern "C" _declspec(dllexport) type _stdcall
+#endif
+
+#define NI_NAME_LEN 32
+
+enum eEnergyType
+{
+ GammaRay,
+ XRay,
+ PositronDecay,
+ SingleEscape,
+ DoubleEscape
+};
+
+enum eHalfLifeUnit
+{
+ Year,
+ Days,
+ Hours,
+ Min,
+};
+
+enum eEnergyFlay
+{
+ // KeyLine
+ eNI_K,
+ // Not In Average
+ eNI_A,
+};
+
+
+typedef struct sOneEnergyLine
+{
+ int rank;
+ double energy;
+ double percent;
+ eEnergyType energytype;
+ int flag;
+}sOneEnergyLine;
+
+enum eNuclideFlag
+{
+ eNF_T,
+ eNF_F,
+ eNF_I,
+ eNF_N,
+ eNF_P,
+ eNF_C,
+ eNF_M,
+ eNF_A
+};
+
+typedef struct sOneNuclideInfo
+{
+ char scname[64];
+ int flag;
+ double halflife;
+ eHalfLifeUnit halflifeunit;
+ double nuclidecertainty;
+ int energylinecount;
+}sOneNuclideInfo;
+
+typedef struct sOneNuclide
+{
+ sOneNuclideInfo info;
+ sOneEnergyLine *pEnergyLine;
+public:
+ sOneEnergyLine* GetEnergyLineByEnergy(double energy)
+ {
+ for (int i = 0; i < info.energylinecount; i++)
+ {
+ if (pEnergyLine[i].energy == energy)
+ {
+ return pEnergyLine + i;
+ }
+ }
+ return NULL;
+ }
+}sOneNuclide;
+
+typedef struct sNuclideLibraryInfo
+{
+ int head;
+ int version;
+ char createtime[NI_NAME_LEN];
+ char lastmodifytime[NI_NAME_LEN];
+ char nuclidelibname[NI_NAME_LEN];
+ int totalnuclidecount;
+ int totalenergycount;
+ unsigned char reserve[32];
+}sNuclideLibraryInfo;
+
+typedef void(__stdcall *ON_UPDATE_NUCLIDE_CALLBACK)(void *pHandle, sNuclideLibraryInfo* pnli, sOneNuclide *pNuclide, void *reserve);
+
+#pragma pack(pop)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ DEVICEMANAGE_API_NUCLIB_C(int) NLGetCurNuclideInfo(ON_UPDATE_NUCLIDE_CALLBACK pnli, char *ErrMsg);
+ DEVICEMANAGE_API_NUCLIB_C(void) NLFreeNuclideLibrary();
+ DEVICEMANAGE_API_NUCLIB_C(int) NLUpdateCurNuclideToDriver(void *pBuf, int len, char *ErrMsg);
+ DEVICEMANAGE_API_NUCLIB_C(int) NLSaveNuclideLibraryToFile(void* phandle, char *ErrMsg);
+ DEVICEMANAGE_API_NUCLIB_C(int) NLSaveAsNuclideLibraryToFile(void* phandle, const char *path, char *ErrMsg);
+ DEVICEMANAGE_API_NUCLIB_C(void*) NLReadNuclideFromFile(const char *path, char *ErrMsg);
+ DEVICEMANAGE_API_NUCLIB_C(int) NLGetNuclideInfo(void* phandle, ON_UPDATE_NUCLIDE_CALLBACK pnli, char *ErrMsg);
+ DEVICEMANAGE_API_NUCLIB_C(int) NLSetCurNuclideLibrary(void* phandle, char *ErrMsg);
+#ifdef __cplusplus
+}
+#endif
\ No newline at end of file
diff --git a/3rdlib/DeviceManage/include/OneChannelDataDefine.h b/3rdlib/DeviceManage/include/OneChannelDataDefine.h
new file mode 100644
index 0000000..29944aa
--- /dev/null
+++ b/3rdlib/DeviceManage/include/OneChannelDataDefine.h
@@ -0,0 +1,69 @@
+#pragma once
+#include
+#ifdef DEVICEMANAGE_EXPORTS
+#define DEVICEMANAGE_API_DATADEAL_C(type) extern "C" _declspec(dllexport) type _stdcall
+#else
+#define DEVICEMANAGE_API_DATADEAL_C(type) extern "C" _declspec(dllexport) type _stdcall
+#endif
+#pragma pack(push,1)
+
+typedef struct sPeriodMeasureInfo
+{
+ BOOL bEnable;
+ int iTotalMsrCount;
+ int iCurMsrCount;
+ int iOneTotalMsrTimeInMs;
+ unsigned char reserve[16];
+}sPeriodMeasureInfo;
+#ifndef DEVICEMANAGE_EXPORTS
+
+
+// 修改该结构后,一定要修改OneAntiSatisfyMainAndSubChCountStatistic结构
+class OneDataInfo
+{
+public:
+ void *virtualptr;
+ __int64 * m_pData;
+ int m_iDataLen;
+ void *m_pDataMutex;
+ double m_dRealTime;
+ __int64 m_i64TotalCount;
+ double m_dCountRate;
+ int m_LastUpdateTickCount;
+ __int64 m_BeginTickCount;
+ __int64 m_TotalTickCount;
+ double m_DeadTimeInSec;;
+ // 测量时间
+ SYSTEMTIME m_sDateTime;
+ double dreserve;
+ void *m_pPriveOnfo;
+};
+
+class OneSpecturmDataInfo :public OneDataInfo
+{
+public:
+ __int64 m_i64ICR;
+ double m_dLiveTimeSec;
+ double m_dLiveTimePercent;
+ sPeriodMeasureInfo m_pmi;
+};
+
+class OneRiseTimeStatisticInfo :public OneDataInfo
+{
+
+};
+
+class OneFallTimeStatisticInfo :public OneRiseTimeStatisticInfo
+{
+
+};
+
+class OneLMDeltTimeStatisticInfo :public OneDataInfo
+{
+
+};
+
+#endif
+
+
+#pragma pack(pop)
diff --git a/3rdlib/DeviceManage/include/OneChannelDataExport.h b/3rdlib/DeviceManage/include/OneChannelDataExport.h
new file mode 100644
index 0000000..4750c11
--- /dev/null
+++ b/3rdlib/DeviceManage/include/OneChannelDataExport.h
@@ -0,0 +1,72 @@
+#pragma once
+
+#ifndef DEVICEMANAGE_EXPORTS
+
+#pragma pack(push,1)
+
+typedef struct sPeriodMeasureInfo
+{
+ BOOL bEnable;
+ int iTotalMsrCount;
+ int iCurMsrCount;
+ int iOneTotalMsrTimeInMs;
+ unsigned char reserve[16];
+}sPeriodMeasureInfo;
+
+class OneDataInfo
+{
+public:
+ void* __vfp;
+ __int64 * m_pData;
+ int m_iDataLen;
+ void *m_pDataMutex;
+ double m_dRealTime;
+ __int64 m_i64TotalCount;
+ double m_dCountRate;
+ int m_LastUpdateTickCount;
+ __int64 m_BeginTickCount;
+ __int64 m_TotalTickCount;
+ double m_DeadTimeInSec;;
+ // 测量时间
+ SYSTEMTIME m_sDateTime;
+ double dreserve;
+ void *m_pPriveOnfo;
+};
+
+class OneSpecturmDataInfo :public OneDataInfo
+{
+public:
+ __int64 m_i64ICR;
+ double m_dLiveTimeSec;
+ double m_dLiveTimePercent;
+ sPeriodMeasureInfo m_pmi;
+};
+
+typedef struct sLMPointData
+{
+ __int64 time;
+ int amp;
+}sLMPointData;
+
+class OneChannelLMPointData
+{
+public:
+ void* __vfp;
+ sLMPointData * m_pData;
+ int m_iDataLen;
+};
+// 谱线数据
+class OneChannelData
+{
+public:
+ double m_LastUpdatePresentTime = 0;
+ OneSpecturmDataInfo m_OrgSprtData;
+ OneDataInfo m_RiseTimeInfo;
+ OneDataInfo m_FallTimeInfo;
+ OneChannelLMPointData m_LMPointData;
+ OneDataInfo m_LMDeltTimeInfo;
+};
+
+#pragma pack(pop)
+
+#endif
\ No newline at end of file
diff --git a/3rdlib/DeviceManage/include/OneChannelRoiConfigDefine.h b/3rdlib/DeviceManage/include/OneChannelRoiConfigDefine.h
new file mode 100644
index 0000000..e31f25c
--- /dev/null
+++ b/3rdlib/DeviceManage/include/OneChannelRoiConfigDefine.h
@@ -0,0 +1,85 @@
+#pragma once
+
+#ifdef DEVICEMANAGE_EXPORTS
+#define DEVICEMANAGE_API_ROI_C(type) extern "C" _declspec(dllexport) type _stdcall
+#else
+#define DEVICEMANAGE_API_ROI_C(type) extern "C" _declspec(dllexport) type _stdcall
+#endif
+
+#pragma pack(push,1)
+struct OneRoiDetailInfo
+{
+ int left;
+ int right;
+
+ unsigned char reserve[8];
+
+ void SetTop(int top)
+ {
+ int *t = (int*)reserve;
+ *t = top;
+ }
+ void SetBottom(int bot)
+ {
+ int *t = (int*)(reserve + 4);
+ *t = bot;
+ }
+ int GetTop()
+ {
+ int *t = (int*)reserve;
+ return *t;
+ }
+ int GetBottom()
+ {
+ int *t = (int*)(reserve + 4);
+ return *t;
+ }
+};
+
+enum eROICalcDataType
+{
+ eOrgSprt,
+ eCoinSprt,
+ eAntiSprt,
+ e2DMapSprt,
+ e2DMapMainCmbSubCmb,
+ e2DMapMainMulSubCmb,
+};
+
+struct OneRoiDatalInfo
+{
+ int version;
+ eROICalcDataType dataType;
+
+ __int64 i64TotalCount;
+ double dcps;
+ unsigned char reserve[32];
+};
+
+struct OneChannelROIInfo
+{
+ int head;
+ int version;
+
+ int iTotalNum;
+ unsigned char reserve[32];
+};
+
+#pragma pack(pop)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ DEVICEMANAGE_API_ROI_C(int) DBCAddROI(int *pHandle, int bdidx, int chidx, OneRoiDetailInfo *proi);
+ DEVICEMANAGE_API_ROI_C(int) DBCRemoveROI(int *pHandle, int bdidx, int chidx, OneRoiDetailInfo *proi);
+ DEVICEMANAGE_API_ROI_C(int) DBCRemoveAllROI(int *pHandle, int bdidx, int chidx);
+ DEVICEMANAGE_API_ROI_C(int) DBCGetROIDataInfo(void * pHandle, int bdidx, int chidx, OneRoiDetailInfo *proi, OneRoiDatalInfo *pdata);
+ DEVICEMANAGE_API_ROI_C(int) DBCSaveROIDataInfoToFile(void * pHandle, int bdidx, int chidx, OneRoiDetailInfo *proi, OneRoiDatalInfo *pdata, char *pDir);
+ DEVICEMANAGE_API_ROI_C(int) DBCGetROIInfo(int *pHandle, int bdidx, int chidx, OneChannelROIInfo *pinfo);
+ DEVICEMANAGE_API_ROI_C(int) DBCGetROIDetailInfo(int *pHandle, int bdidx, int chidx, int roiidx, OneRoiDetailInfo *pdetail);
+ DEVICEMANAGE_API_ROI_C(int) DBCSaveROIToFile(int *pHandle, int bdidx, int chidx, const char *path, char *ErrMsg);
+ DEVICEMANAGE_API_ROI_C(int) DBCReadROIFromFile(int *pHandle, int bdidx, int chidx, const char *path, char *ErrMsg);
+
+#ifdef __cplusplus
+}
+#endif
\ No newline at end of file
diff --git a/3rdlib/DeviceManage/include/OneComptonResultDataExport.h b/3rdlib/DeviceManage/include/OneComptonResultDataExport.h
new file mode 100644
index 0000000..dcbe983
--- /dev/null
+++ b/3rdlib/DeviceManage/include/OneComptonResultDataExport.h
@@ -0,0 +1,145 @@
+#pragma once
+
+#ifndef DEVICEMANAGE_EXPORTS
+
+#include
+#include "OneChannelDataExport.h"
+#include