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.
68 lines
2.0 KiB
C++
68 lines
2.0 KiB
C++
#pragma once
|
|
#include "GlobalDefine.h"
|
|
#include "module.h"
|
|
|
|
|
|
//结果的状态
|
|
enum EMesureResultType
|
|
{
|
|
_ResultType_No_Check=0,//没有检查
|
|
_ResultType_No_Qualified,//不合格
|
|
_ResultType_Qualified,//合格
|
|
};
|
|
|
|
//光束质量的参数
|
|
class CMeasureResultPar
|
|
{
|
|
public:
|
|
CMeasureResultPar()
|
|
{
|
|
m_MinVal = 0;
|
|
m_MaxVal = 0;
|
|
m_bUsed = true;//是否使用
|
|
Reset();
|
|
};
|
|
void Reset()
|
|
{
|
|
m_ParVal = 0;
|
|
m_ResultType = _ResultType_No_Check;
|
|
};
|
|
public:
|
|
bool m_bUsed;//是否使用
|
|
CString m_ParName;//参数名
|
|
double m_ParVal;//参数值
|
|
double m_MinVal;//允许的最小值
|
|
double m_MaxVal;//允许的最大值
|
|
EMesureResultType m_ResultType;//结果的状态
|
|
};
|
|
|
|
//加工前测量管理类
|
|
class CMeasureBeforeWorkMgr:public CModule
|
|
{
|
|
public:
|
|
CMeasureBeforeWorkMgr(void);
|
|
~CMeasureBeforeWorkMgr(void);
|
|
virtual void OnAppInitialize();
|
|
|
|
void InsertParToList(CListCtrl &List);
|
|
COLORREF GetParResultColor(int idx);
|
|
bool CheckResultQualified();
|
|
vector<CMeasureResultPar> &GetMeasureParVec(){return m_MeasureParVec;};
|
|
void ResetMeasureResult();
|
|
void InitParList(CListCtrl &List);
|
|
void InsertParList(CListCtrl &List);
|
|
void SaveMeasurePar();
|
|
void ReadMeasurePar();
|
|
void GetPar(int idx,double &MinVal,double &MaxVal);
|
|
void SetPar(int idx,double MinVal,double MaxVal);
|
|
void ResetAllMeasureParRange();
|
|
private:
|
|
void ReadMeasureParList();
|
|
private:
|
|
vector<CMeasureResultPar> m_MeasureParVec;//测量结果容器
|
|
bool m_bInsertList;
|
|
int m_CurMeasureParCnt;//当前测量参数的个数
|
|
};
|
|
|
|
extern CMeasureBeforeWorkMgr *gMeasureBeforeWorkMgr;
|