#if !defined(AFX_DIALMEASUTASKPACKET_H__02C88A4B_A833_4D3B_BEC5_D2F5CA59162B__INCLUDED_) #define AFX_DIALMEASUTASKPACKET_H__02C88A4B_A833_4D3B_BEC5_D2F5CA59162B__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // DialMeasuTaskPacket.h : header file // #include "TaskDataOper.h" ///////////////////////////////////////////////////////////////////////////// // CDialMeasuTaskPacket dialog class CDialMeasuTaskPacket : public CDialog { // Construction public: CDialMeasuTaskPacket(CWnd* pParent = NULL); // standard constructor static UINT StartMeasuData(LPVOID pInfo); void StopMeasuDataInfo(bool bIsNormalExit = true); bool StartMeasuSigTask(const STTdBrowseInfo* pSigTask); bool GetCfgTaskData(DWORD dwTdID,char* pData, int& iLen, int iMaxLen); void SetDevID(UINT32 uiDevID){m_uiDevID = uiDevID;} static void NotifyResFunc(LPARAM lOperType, LPARAM lOperRes, LPVOID lpWnd); int ProcRcvMeasuData(); bool OperPLC(BYTE ucCmd, CString strPlcID, bool bIsShowErrSyn); bool QuitDial(); // Dialog Data //{{AFX_DATA(CDialMeasuTaskPacket) enum { IDD = IDD_DIALOG_MEASU_TASK_PACKET }; CListCtrl m_listMeasuData; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CDialMeasuTaskPacket) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CDialMeasuTaskPacket) afx_msg void OnButtonCfg(); afx_msg void OnButtonMeasuAll(); afx_msg void OnButtonPause(); afx_msg void OnButtonContinue(); virtual BOOL OnInitDialog(); afx_msg void OnClose(); virtual void OnCancel(); //}}AFX_MSG DECLARE_MESSAGE_MAP() protected: void SetBtnStatus(BYTE ucStatus); int GetNeedMeasuData(char* pData,int &iLen, int iMaxLen); void ThreadJoin(); void ClearRecvBuffer(){ memset(m_ucData, 0, sizeof(m_ucData)); m_iRecvDataLen = 0; } bool GetCfgTaskPacketAttr(); protected: CTaskDataOper m_TaskdDBOper; bool m_bIsRunning; CWinThread* m_pThread; bool m_bIsThreadFinshed; bool m_bIsOpenTbData; BYTE m_ucCmd; BYTE m_ucData[MAX_RECV_MEASURE]; //接收数据缓冲区 int m_iRepeatSndCnt; bool m_bIsSuspend; bool m_bIsSigMeasuring; int m_iRecvDataLen; BYTE m_ucProcStep; STQueryTaskBasicInfo m_stQueryTdInfo; UINT32 m_uiDevID; std::vector m_vtMeasureData; int m_iLoopTimes; int m_iInterval; //UINT m_uiPlcID CString m_strPlcID; std::vector m_vtTaskPacket; }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_DIALMEASUTASKPACKET_H__02C88A4B_A833_4D3B_BEC5_D2F5CA59162B__INCLUDED_)