[1]陈荔 张菁.基于串口自定义协议传输文件的设计[J].计算机技术与发展,2012,(02):45-48.
 CHEN Li,ZHANG Jing.Transmission Document Design Based on Serial Port Definition Agreement[J].,2012,(02):45-48.
点击复制

基于串口自定义协议传输文件的设计()
分享到:

《计算机技术与发展》[ISSN:1006-6977/CN:61-1281/TN]

卷:
期数:
2012年02期
页码:
45-48
栏目:
智能、算法、系统工程
出版日期:
1900-01-01

文章信息/Info

Title:
Transmission Document Design Based on Serial Port Definition Agreement
文章编号:
1673-629X(2012)02-0045-04
作者:
陈荔1 张菁2
[1]长安大学教育技术与网络中心[2]长安大学电子与控制学院
Author(s):
CHEN LiZHANG Jing
[1]Educational Technology and Network Center,Chang'an University[2]School of Electronics and Control,Chang'an University
关键词:
串口通信RS-232接口数据帧关键字替换
Keywords:
serial port correspondence RS-232 connection data frame key words replacing
分类号:
TP31
文献标志码:
A
摘要:
为了利用串口准确高效地传输文件,文中采用了自定义协议封装数据帧的方式来实现这一目的。首先将文件发送分成3个过程,发送文件名和发送文件大小、发送文件内容以及发送文件结束确认。针对每一过程设计不同的数据帧结构,通过帧结构中的命令字来区分发送过程的不同阶段。线路受干扰可能出现传输数据丢失,线路故障将影响数据正常发送,采用定时器实时检测传输状态的模式提高数据发送过程的容错性,及时纠正发送过程中的错误,保证数据准且高效地传输。封装数据前对数据部分逐一字节进行对比,发现帧头帧尾关键字进行替换,保证了发送数据中关键字的唯一。结果表明,利用自定义数据帧结构封装数据通过串口进行发送,定时器模式及时纠正数据传输过程中的错误,高效准确地完成了文件的传输
Abstract:
In order to use the serial port to transmit the document correctly,it selected the seal data frame method to realize this goal.First the circulation process is divided into 3 parts:the transmission filename,the transmission document size and the transmission document content.In view of each process to design different data frame structure,use the order character of the structure to differentiate the different period of the transmission.In the sending process,there possibly presents the data missing or line fault to influence data transmissions,this question is avoided to establish the reproduction mechanism.Before sealing the data,carry on the contrast to the data part byte one by one,transmit the keywords of frame head and frame tail to carry on the replace,guarantee the key words is only in the transmission data.The result indicated that this method can complete the document transmission highly effective and accurate using the definition data frame structure to seal data to the transmit data

相似文献/References:

[1]马兆远 王勇 马志峰.基于AT89S52的智能报警系统的设计与实现[J].计算机技术与发展,2009,(12):181.
 MA Zhao-yuan,WANG Yong,MA Zhi-feng.Design and Implementation of a Household Alarming System Based on AT89S52[J].,2009,(02):181.
[2]谢世环 徐中伟 胡天一.车站列控中心测试平台——通信仿真子系统研究[J].计算机技术与发展,2008,(01):243.
 XIE Shi-huan,XU Zhong-wei,HU Tian-yi.Study on Testing Platform for Train Control Center——Simulation of Communication Sub - System[J].,2008,(02):243.
[3]凌有铸 徐晓光 潘伟.基于WinCE的嵌入式远程实时监控系统[J].计算机技术与发展,2007,(07):204.
 LING You-zhu,XU Xiao-guang,PAN Wei.Remote Testing and Control System Based on Embedded WinCE[J].,2007,(02):204.
[4]师于杰.高可用CompactPCI平台在串口通信上的应用[J].计算机技术与发展,2006,(04):203.
 SHI Yu-jie.Application of a Redundant System Slot CompactPCI HA Platform on Serial Port Communication[J].,2006,(02):203.
[5]贾瑞玉 赖大荣.车流量测量仪串口通信的设计与实现[J].计算机技术与发展,2006,(10):199.
 JIA Rui-yu,LAI Da-rong.Design and Implementation of Serial- port Communication in Traffic Volume Tester[J].,2006,(02):199.
[6]赵奇峰 闵涛 杨黔龙 田亚军.基于LabVIEW串口数据采集系统设计[J].计算机技术与发展,2011,(11):224.
 ZHAO Qi-feng,MIN Tao,YANG Qian-long,et al.Design of Serial Data Collection System Based on LabVIEW[J].,2011,(02):224.
[7]李招峰 刘建设 金华标.基于QT/E的串口通信故障及其解决方案[J].计算机技术与发展,2012,(06):254.
 LI Zhao-feng,LIU Jian-she,JIN Hua-biao.Serial Communication Failures and Their Solutions Based on QT/E[J].,2012,(02):254.
[8]唐原广,孙磊.SZF波浪浮标双通信数据接收回放系统[J].计算机技术与发展,2014,24(06):196.
 TANG Yuan-guang,SUN Lei.SZF Wave Buoy Receiving and Playback System of Double Communications[J].,2014,24(02):196.
[9]贾富强[],赵阳[]. 基于VC++串口通信软件的设计与实现[J].计算机技术与发展,2015,25(06):158.
 JIA Fu-qiang[],ZHAO Yang[]. Design and Implementation of Serial Communication Software Based on VC++[J].,2015,25(02):158.
[10]张海洋. 船载天线串口数据采集系统的设计与实现[J].计算机技术与发展,2016,26(01):150.
 ZHANG Hai-yang. Design and Implementation of Serial Data Acquisition System for Ship Antenna[J].,2016,26(02):150.

备注/Memo

备注/Memo:
国家自然科学基金项目(60806043)陈荔(1979-),男,福建莆田人,工程师,工学博士.研究方向为交通管理与控制
更新日期/Last Update: 1900-01-01