1 Star 0 Fork 1

Jason.shen1984/组合导航串口数据采集软件

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
SerialPort.h 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
TMRNic 提交于 2023-05-22 11:43 . Add introduction
/**************************************************************************
ϵݲɼ
File Name: SerialPort.h
Description:
Version: V1.0
Author: TMRNic
Create Time: 2021-04-01
**************************************************************************/
#pragma once
#define WM_SERIALMSG WM_USER+100 // SerialPort Msg
#define WM_DATAERRMSG WM_USER+101 // ���ݴ����쳣����
class SerialPort
{
public:
CString ComNum;
int bdr;
int stopb;
int checkb;
DCB COMPara;
CString ComNumG;
int bdrG;
int stopbG;
int checkbG;
DCB COMParaG;
HANDLE hCOM, hCOMG;
UCHAR pkgHead[2] = { 0x93 }; // FIMU֡ͷ
CHAR pkgHeadPOS[5] = { 'G','N','G','G','A' }; // GPGGA
CHAR pkgHeadVEL[8] = { 'B','E','S','T','V','E','L','A' }; // BESTVEL
BOOL GPSPOSVEL[2] = { FALSE, FALSE };
BOOL isOpen = FALSE;
BOOL isIMUOpen = FALSE;
BOOL isGPSOpen = FALSE;
BOOL isResolving = FALSE;
unsigned int pkgLen = 37; //���ݰ���Ч���ȣ���ȥ֡ͷ��
UCHAR rByte1; // FIMUʮ������������
CHAR rByte2; // GPS�ַ�������
UCHAR buffer[2][64]; //���ݰ�˫������
CHAR gpsbuffer0[512]; // GPS���ݻ�����(GPGGA)
CHAR gpsbuffer1[512]; // GPS���ݻ�����(BESTVEL)
char buftagR = 0;
char buftagW = 0;
BOOL ReadPkg = FALSE;
HWND hwndOfComm;
UINT msg_getpkg = 101;
UINT msg_getpkgfail = 102;
UINT msg_getGPGGA = 201;
UINT msg_getBESTVEL = 301;
int OpenCOM();
BOOL CloseCOM();
BOOL findHead();
void readPkg();
int OpenGPSCOM();
BOOL CloseGPSCOM();
BOOL findGPSHead();
void readGPSPkg();
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jason-shen1984/IntNavSerialAssistant.git
git@gitee.com:jason-shen1984/IntNavSerialAssistant.git
jason-shen1984
IntNavSerialAssistant
组合导航串口数据采集软件
master

搜索帮助