caicommview.h
来自「用于数据采集分析的对话框界面」· C头文件 代码 · 共 114 行
H
114 行
// CAICommView.h : interface of the CCAICommView class
//
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INCLUDES()
#include "mscomm.h"
//}}AFX_INCLUDES
#if !defined(AFX_CAICOMMVIEW_H__CE3CD56D_A846_11D8_B5CB_D89F8731BC00__INCLUDED_)
#define AFX_CAICOMMVIEW_H__CE3CD56D_A846_11D8_B5CB_D89F8731BC00__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
extern "C" __declspec(dllimport) void DllEntry(); // dummy function
#include "mscomm.h"
#include "MainFrm.h"
#define RYG_SETSTATE WM_USER + 0
#define RYG_GETSTATE WM_USER + 1
class CCAICommView : public CFormView
{
protected: // create from serialization only
CCAICommView();
DECLARE_DYNCREATE(CCAICommView);
private:
void OpenPort_Nj();
void OpenPort_Lamdar();
void OpenPort_ECU();
//发送函数
//符号判定
BOOL CheckSign(CString& strString);
BOOL CommTransfer(CString strOutChar);
BOOL CommSpeedRecive(CString strRecive);
BOOL TransferInteger(CString strFunc, CString strNumber);
BOOL DataTransfer(CString strFunc,CString strNumber) ;
BOOL m_comflag;
BOOL m_TimerOn;
BOOL CommAnalyse(CString strRecive);
void SendLamda();
int String2Hex(CString str, CByteArray &senddata);
char ConvertHexChar(char ch);
CMainFrame* m_MainFrame;//主窗口指针
public:
//{{AFX_DATA(CCAICommView)
enum { IDD = IDD_CAICOMM_FORM };
CMSComm m_mscomm1;
CMSComm m_mscomm2;
CMSComm m_mscomm3;
double m_PulseWidth;
int m_Load;
double m_Igition;
int m_RPM;
double m_Torque;
double m_Lamda;
//}}AFX_DATA
// Attributes
//public:
//CCAICommDoc* GetDocument();
// Operations
public:
CCAICommDoc* GetDocument();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCAICommView)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void OnInitialUpdate(); // called first time after construct
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CCAICommView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CCAICommView)
afx_msg void OnStart();
afx_msg void OnOnCommMscomm1();
afx_msg void OnCancel();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnOnCommMscomm3();
afx_msg void OnOnCommMscomm2();
DECLARE_EVENTSINK_MAP()
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in CAICommView.cpp
inline CCAICommDoc* CCAICommView::GetDocument()
{ return (CCAICommDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CAICOMMVIEW_H__CE3CD56D_A846_11D8_B5CB_D89F8731BC00__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?