123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- #pragma once
- #define C_MACHINE_EXPORTS
- #include "Machine.h"
- #include "CDieBondFsm.h"
- #include "CMessageBox.h"
- #include "dt.h"
- #include "CRunButton.h"
- #include "CViewMotion.h"
- #include "CViewMatrix.h"
- #include "CCamerAndLamp.h"
- #pragma comment(lib,"CLog.lib")
- #pragma comment(lib,"Module.lib")
- #pragma comment(lib,"Control.lib")
- namespace ns_module
- {
- class __declspec(dllexport) CViewInterface
- {
- public:
- struct THREAD_BUTTON_RUN
- {
- CViewInterface* pClass;
- ST_BUTTON_FUN stButtonInfo;
- };
- private:
- static CViewInterface* m_instance;
- static HANDLE m_hEvent;
- bool m_bIsInitSuccess = false;
- CManageDB* m_pCManageDB = nullptr;
- Machine* m_pMachine = nullptr;
- CCameraManage* m_pCameraManage = nullptr;
- CBondHead* m_pBondHead = nullptr;
- CWaferTable* m_pWaferTable = nullptr;
- CWaferHead* m_pWaferHead = nullptr;
- CTransferTable* m_pWaferTransferTable = nullptr;
- CTransferTable* m_pWaffleTransferTable = nullptr;
- CResources* m_pResource = nullptr;
- CDieBondFsm* m_pDieBondFsm = nullptr;
- LONG Init();
- public:
- static CViewInterface* GetInstance();
- #pragma region 界面方面接口
- private:
- CXYCalib* GetCalibXY(int iCameraId);
- public:
- //界面退出通知
- long ViewExit();
-
- //机台重新加载所有配置
- long ResetLoadAllConfig();
- //将所有数据保存到数据库
- long SaveAllConfigToDateBase();
- CViewMotion* GetViewMotion();
- CViewMatrix* GetViewMatrix();
- CCamerAndLamp* GetCamerAndLamp();
- /// <summary>
- /// 获取CPK数据信息
- /// </summary>
- /// <param name="CpkList">CPK数据</param>
- /// <returns>成功返回0,否则返回错误码</returns>
- long GetCpkList(std::vector<CPK_LIST_STRUCT>& CpkList);
- /// <summary>
- /// 读取表中指定GroupId的配置信息
- /// </summary>
- /// <param name="iGroupId">组Id</param>
- /// <param name="strTableName">表名</param>
- /// <param name="vecConfig">返回的配置信息</param>
- /// <returns>成功返回0,否则返回错误码</returns>
- long LoadConfigDB(string strTableName, vector<int> iGroupId, vector<CONFIG_BASE_STRUCT>& vecConfig);
- /// <summary>
- /// 保存配置信息
- /// </summary>
- /// <param name="strTableName">表名</param>
- /// <param name="vecConfig">要保存的配置信息</param>
- /// <returns>成功返回0,否则返回错误码</returns>
- long SaveConfigDB(string strTableName, vector<CONFIG_BASE_STRUCT> vecConfig);
- //设置弹出框回调
- long SetButtonRunDoneFunc(SendButtonRunDone func);
- //设置按钮执行完回调
- long SetPopMessageBoxFunc(CallMessageBox func);
- //数据更改后发送通知
- long DataChangNotice(string strDbName,string strTableName);
- //接收数据更改后的通知
- void RecvDataChangNotice(string strDbName, string strTableName, DataNoticeCallbackFun callBackFun);
- //停止
- long RunStop();
- //自动固晶
- long RunAutoBond();
- //执行按钮命令
- long RunButton(ST_BUTTON_FUN stInfo);
- #pragma endregion
- };
- }
|