========================================================================
MICROSOFT FOUNDATION CLASS LIBRARY : SerialPortTest
========================================================================
AppWizard has created this SerialPortTest application for you. This application
not only demonstrates the basics of using the Microsoft Foundation classes
but is also a starting point for writing your application.
This file contains a summary of what you will find in each of the files that
make up your SerialPortTest application.
SerialPortTest.dsp
This file (the project file) contains information at the project level and
is used to build a single project or subproject. Other users can share the
project (.dsp) file, but they should export the makefiles locally.
SerialPortTest.h
This is the main header file for the application. It includes other
project specific headers (including Resource.h) and declares the
CSerialPortTestApp application class.
SerialPortTest.cpp
This is the main application source file that contains the application
class CSerialPortTestApp.
SerialPortTest.rc
This is a listing of all of the Microsoft Windows resources that the
program uses. It includes the icons, bitmaps, and cursors that are stored
in the RES subdirectory. This file can be directly edited in Microsoft
Visual C++.
SerialPortTest.clw
This file contains information used by ClassWizard to edit existing
classes or add new classes. ClassWizard also uses this file to store
information needed to create and edit message maps and dialog data
maps and to create prototype member functions.
res\SerialPortTest.ico
This is an icon file, which is used as the application's icon. This
icon is included by the main resource file SerialPortTest.rc.
res\SerialPortTest.rc2
This file contains resources that are not edited by Microsoft
Visual C++. You should place all resources not editable by
the resource editor in this file.
/////////////////////////////////////////////////////////////////////////////
AppWizard creates one dialog class:
SerialPortTestDlg.h, SerialPortTestDlg.cpp - the dialog
These files contain your CSerialPortTestDlg class. This class defines
the behavior of your application's main dialog. The dialog's
template is in SerialPortTest.rc, which can be edited in Microsoft
Visual C++.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named SerialPortTest.pch and a precompiled types file named StdAfx.obj.
Resource.h
This is the standard header file, which defines new resource IDs.
Microsoft Visual C++ reads and updates this file.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" to indicate parts of the source code you
should add to or customize.
If your application uses MFC in a shared DLL, and your application is
in a language other than the operating system's current language, you
will need to copy the corresponding localized resources MFC42XXX.DLL
from the Microsoft Visual C++ CD-ROM onto the system or system32 directory,
and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation.
For example, MFC42DEU.DLL contains resources translated to German.) If you
don't do this, some of the UI elements of your application will remain in the
language of the operating system.
/////////////////////////////////////////////////////////////////////////////
没有合适的资源?快使用搜索试试~ 我知道了~
串口调试-可通过串口发送接收文件
共73个文件
h:15个
cpp:13个
ico:13个
4星 · 超过85%的资源 需积分: 49 199 下载量 149 浏览量
2015-01-19
22:29:01
上传
评论 3
收藏 1.3MB ZIP 举报
温馨提示
基于MFC利用CSerialPort类自己写的串口小程序,可以发送文件;接收文件的程序是在《Visual C++/Turbo C串口通信编程实践》(第二版-龚建伟)一书中的“串口调试助手”源码的基础上改写的,文件默认保存于D:\RcvData.dat。 协议是:数据包的组成为:包头为一个字节(0xFF),接下来为一个字节的包长(200,可改变),接下来一个字节为包长的补码(256-200=56),接下来为200个字节的有效数据,接下来为两个字节的效验和。发送程序发送完一个数据包后等待接收程序的响应,如接收正确则发送下一个数据包,否则重发。接收程序接收到0xFF认为数据包开始,然后再累加接下来接收到的两个字节如其和为256则认为接收正确,然后累加接收到的200个有效字节,然后将其与接收到的效验和相比较,如相等则接收正确,向发送程序发送接收正确的响应,否则发送接收错误的响应。 感觉“雪莉蓝串口调试助手”中发送的十六进制输入时的输入模式比较好,打算自己效仿,由于没有源码,只能慢慢百度,于是花了一天,过程比较烦,中间也想过放弃算了,但还好最后实现了,happy一下。
资源推荐
资源详情
资源评论
收起资源包目录
串口通信-可发送接收文件.zip (73个子文件)
串口通信-和校验
SCOMM - 接收文件.exe 260KB
SerialPortTest - 发送文件.exe 40KB
说明.txt 896B
雪莉蓝串口调试助手.exe 2.04MB
SCOMMV23 - 接收文件
SCOMM.APS 34KB
PushPin.h 1KB
SCOMM.DSW 533B
resource.h 3KB
SerialPort.cpp 19KB
SCOMM.ncb 193KB
SCOMM.rc 12KB
Debug
AnimateDlgIcon.cpp 2KB
Scomm.cpp 2KB
SerialPort.h 3KB
PushPin.cpp 6KB
SCOMM.clw 4KB
ReadMe.txt 3KB
SCOMMDlg.h 4KB
SCOMM.plg 2KB
LABEL.CPP 5KB
AnimateDlgIcon.h 980B
SCOMM.dsp 5KB
RES
Pinned.bmp 238B
ICON_ON.ICO 1KB
GJWTECH1.ICO 3KB
icon_not1.ico 766B
ICON_NOT.ICO 1KB
RED.ICO 766B
OFF.ICO 766B
choosepath.ico 3KB
CURSOR1.CUR 326B
ICON_GRE.ICO 3KB
xiaofengstudio.bmp 11KB
SCOMM.RC2 397B
xiaofengstudio.ico 3KB
ANIM.BMP 694B
COMM.ICO 1KB
Pinned2.bmp 238B
UNPINNED.BMP 238B
GREEN.ICO 766B
ICON_ON1.ICO 766B
SCOMM.OPT 56KB
StdAfx.cpp 207B
SCOMMDlg.cpp 36KB
HYPERLINK.H 3KB
HYPERLINK.CPP 13KB
StdAfx.h 1KB
LABEL.H 2KB
SCOMM.H 1KB
SerialPortTest - 发送文件
SerialPortTest.cpp 2KB
SerialPortTest.rc 8KB
PushPin.h 1KB
resource.h 2KB
SerialPort.cpp 21KB
SerialPortTestDlg.h 3KB
SerialPortTest.h 1KB
SerialPortTestDlg.cpp 24KB
Debug
SerialPortTest.dsp 5KB
SerialPortTest.ncb 169KB
SerialPort.h 5KB
PushPin.cpp 6KB
SerialPortTest.opt 49KB
ReadMe.txt 4KB
res
Pinned.bmp 238B
SerialPortTest.ico 1KB
SerialPortTest.rc2 406B
UNPINNED.BMP 238B
SerialPortTest.plg 1KB
SerialPortTest.clw 3KB
SerialPortTest.aps 24KB
StdAfx.cpp 216B
SerialPortTest.dsw 534B
StdAfx.h 1KB
共 73 条
- 1
资源评论
- yyfather2016-11-18在WIN10下 一接收 就直接报错了. 呵呵.. 谢谢分享.
- careerhealth2016-01-27谢分享,尚在学习中
_ALittleMore_
- 粉丝: 7
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功