📄 cgedoc.h
字号:
// cgeDoc.h : interface of the CCgeDoc class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CGEDOC_H__D9F73F4C_313A_11D3_A324_DC37BD699B39__INCLUDED_)
#define AFX_CGEDOC_H__D9F73F4C_313A_11D3_A324_DC37BD699B39__INCLUDED_
#include "TTY.h" // Added by ClassView
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
//定义数据通信的常量
//开始采样标志
const BYTE start_caiyang = 0x0a;
//开始仪器校验标志
const BYTE start_imple_check = 0x0f;
//串码表1
const BYTE Channel_2[12]= {0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b};
const BYTE Channel_6[4] = {0x4c,0x4d,0x4e,0x4f};
const BYTE Channel_12[2]= {0x50,0x51};
const BYTE Channel_24 = 0x52;
const BYTE Power[4] = {0x53,0x54,0x55,0x56};
//串码表2
const BYTE xianbo[2] = {0x61,0x60};
//const BYTE xianbo[2] = {0x60,0x61}; //m616
//串码表3
//const BYTE dijie[8] = {0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77};
const BYTE dijie[8] = {0x70,0x73,0x74,0x75,0x76,0x77};
const BYTE md_dijie[2] = {0x70,0x71};
//串码表4
const BYTE gaojie[8] = {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87};
const BYTE md_gaojie[3] = {0x85,0x86,0x87};
//串码表5
const BYTE jiange[11] = {0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a};
const BYTE jiange_2[11] = {0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a};
const BYTE jiange_6[10] = {0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a};
const BYTE md_jiange_6[5] = {0x96,0x97,0x98,0x99,0x9a};
const BYTE jiange_12[9] = {0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a};
const BYTE jiange_24[8] = {0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a};
//串码表6
const BYTE length[8] = {0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7};
const BYTE md_length[4] = {0xa2,0xa3,0xa4,0xa5};
//串码表7
const BYTE zengyi[5] = {0xb0,0xb1,0xb2,0xb3,0xb4};
//串码表8
const BYTE chufa[2] = {0xc0,0xc1};
//串码表9
//DWORD yanshi; //其值为延时的ASCII码
//串码表10
const BYTE tongdao_number[4] = {0xd0,0xd1,0xd2,0xd3};
//采样结束标志
const BYTE end_caiyang = 0x0d;
//发送码串正确标志
const BYTE send_correct = 0x0e;
//主放零漂
const int Main_amp_nullshift = 25;
//初始步长
//const double m_stepY0 = 4.6566E-6;
class CCgeDoc : public CDocument
{
protected: // create from serialization only
CCgeDoc();
DECLARE_DYNCREATE(CCgeDoc)
// Attributes
public:
CString s[12]; //参数设置的字符串
CString para[5];//写Seg2文件的参数
CString m_wrtime;//获得采样时时间
CString m_wrdate;//获得采样时日期
CString Fangs; //放大
CString systemp;//获得采样时日期时间
CString sysdate;
bool fullScreen;
CView* view2;
//bool SaveKey;
bool blank; //空白关键字
bool unbas;//没画基线
// delete
BOOL bReadError; //???
BOOL bFirstValue;//???
BOOL bVirtualValue;//???
BOOL bShowSubCurve;//???
BOOL bDelSubCurve;//???
int nWhichCurve;//???
int ShortNodeNum;//???
int mNumViewChannel;//???
CSize m_xyAxisSize;//???
//ShortNode *m_pShortNode;
unsigned long LCursor,RCursor;
double LCursorA,RCursorA;
// delete
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCgeDoc)
public:
virtual BOOL OnNewDocument();
virtual void Serialize(CArchive& ar);
protected:
virtual BOOL SaveModified();
//}}AFX_VIRTUAL
// Implementation
public:
bool mdKey;
float m_initstepY;
int m_averY;
int E_Value();
CString mds[15];
void caiyang();
BOOL recentpath;
BOOL ret_par;
CString m_pa[10];
void UpdateView();
int m_N0;
void m_iniapage();
int m_maxydB;
int m_minydB;
int m_maxxdB;
int m_minxdB;
int m_lpt;
int m_com; //ibm
void fullscreen();
int m_ViewLeft;
CSize GetDocSize();
int m_nCurChannel;
int m_FirstBase;
int m_Fill;
void Relist();
float E_Data_v0(float TempData_v0[]);
int m_H;
int m_Ndb;
BOOL m_NdbKey;
BOOL m_Hkey;
void Seg2Write(CString m_path[10]);
void Seg2Read(CString m_path[10]);
void ManPing();
BOOL m_HFangdaKey;
BOOL m_HSuoxiaoKey;
BOOL m_SuoxiaoKey;
float Num_FScishu;
int Num_TimelabelStep;
int m_TimelabelStep;//???
BOOL m_manpingKey; //水平放大?
float s_stepX;//???传值给m_stepX?
int m_HAddX;//???
BOOL m_FangdaKey;//纵向放大?
RECT ViewRect;//???which 客户区?
//int m_jiange;//采样间隔
float m_jiange;//采样间隔
float m_dtf;
int m_maxY;//如何控制?
int Y_Max();//???
BOOL ZhengLi_Fun( BOOL f);//整理数据
POSITION m_Mps;//链表指针
BOOL Mcaiyang;//???
int m_Mcishu;//???
BOOL yiqi_zjiaozhun();//仪器自校
BOOL moniKey;//模拟采样关键字
BOOL monicaiyang;
void AddLine(int Ny);
int BtoInt(WORD H,WORD L);
BOOL Read_Epp(BYTE Data_epp[3]);
BOOL Read_Data(int Data_len);
BOOL CaiYang_Fun();
bool InterCeptKey;
bool FillKey;
int VPos;
int HPos;
CTTY MyTTY;
int m_viewX0;
int m_viewY0;
int m_viewY00;
CString m_No;
float m_stepX; //每个采样点间的象素个数
double m_stepY;
float old_m_stepY;
int basline;
float full_timelabel;
//初始步长
double m_stepY0;
BOOL olddataKey;//???
// int m_x;
BOOL recaiyangKey;
BOOL caiyangKey;
BOOL drawlineKey;
void DrawLine(CDC* pDC);
BOOL canshuKey;
BOOL FangsKey;
CObList m_CMyLineList;
int Num_Pointes;
int Num_Line;
virtual ~CCgeDoc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CCgeDoc)
afx_msg void Oncanshu5();
afx_msg void Oncaiyang1();
afx_msg void OnUpdateChuli1(CCmdUI* pCmdUI);
afx_msg void OnFileOpen();
afx_msg void OnCloseupDlgbarcombo1();
afx_msg void OnWrcom();
afx_msg void Onmcaiyang();
afx_msg void OnYiqizijiao();
afx_msg void OnMcaiyang();
afx_msg void OnMsin();
afx_msg void OnFangda();
afx_msg void OnSuoxiao();
afx_msg void OnShuipingfangda();
afx_msg void OnShuipingsuoxiao();
afx_msg void OnQuesheng();
afx_msg void OnDocmanping();
afx_msg void OnUpdateSuoxiao(CCmdUI* pCmdUI);
afx_msg void OnUpdateShuipingsuoxiao(CCmdUI* pCmdUI);
afx_msg void OnUpdateFangda(CCmdUI* pCmdUI);
afx_msg void OnCaiyangDanjia();
afx_msg void OnGONJVshujvfanzhan();
afx_msg void OnFileSave();
afx_msg void OnFillUp();
afx_msg void OnFillDown();
afx_msg void OnUpdateFillUp(CCmdUI* pCmdUI);
afx_msg void OnUpdateFillDown(CCmdUI* pCmdUI);
afx_msg void OnUpdateShuipingfangda(CCmdUI* pCmdUI);
afx_msg void OnChakanPass();
afx_msg void OnUpdateFileMruFile1(CCmdUI* pCmdUI);
afx_msg void OnYmanping();
afx_msg void OnMhelp();
afx_msg void OnMdcahnshu();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CGEDOC_H__D9F73F4C_313A_11D3_A324_DC37BD699B39__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -